Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501639 > unrolled thread

Re: [GIT PULL] kbuild changes for v4.9-rc1

Started byNicholas Piggin <npiggin@gmail.com>
First post2016-10-17 09:10 +0200
Last post2016-10-20 10:30 +0200
Articles 8 on this page of 28 — 8 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [GIT PULL] kbuild changes for v4.9-rc1 Nicholas Piggin <npiggin@gmail.com> - 2016-10-17 09:10 +0200
    Re: [GIT PULL] kbuild changes for v4.9-rc1 Adam Borowski <kilobyte@angband.pl> - 2016-10-17 12:10 +0200
      Re: [GIT PULL] kbuild changes for v4.9-rc1 Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-17 13:20 +0200
        Re: [GIT PULL] kbuild changes for v4.9-rc1 Alexey Dobriyan <adobriyan@gmail.com> - 2016-10-17 13:40 +0200
      Re: [GIT PULL] kbuild changes for v4.9-rc1 Alexey Dobriyan <adobriyan@gmail.com> - 2016-10-17 13:20 +0200
      Re: [GIT PULL] kbuild changes for v4.9-rc1 Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-10-17 14:30 +0200
        Re: [GIT PULL] kbuild changes for v4.9-rc1 Adam Borowski <kilobyte@angband.pl> - 2016-10-18 02:20 +0200
          Re: [GIT PULL] kbuild changes for v4.9-rc1 Nicholas Piggin <npiggin@gmail.com> - 2016-10-18 03:40 +0200
            Re: [GIT PULL] kbuild changes for v4.9-rc1 Michal Marek <mmarek@suse.com> - 2016-10-19 16:40 +0200
              Re: [GIT PULL] kbuild changes for v4.9-rc1 Nicholas Piggin <npiggin@gmail.com> - 2016-10-20 06:00 +0200
    [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Arnd Bergmann <arnd@arndb.de> - 2016-10-17 14:30 +0200
      Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Michal Marek <mmarek@suse.com> - 2016-10-19 17:00 +0200
        Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Arnd Bergmann <arnd@arndb.de> - 2016-10-19 17:10 +0200
          Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-10-19 17:40 +0200
            Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Nicholas Piggin <npiggin@gmail.com> - 2016-10-20 06:20 +0200
              Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-10-20 15:30 +0200
                Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Nicholas Piggin <npiggin@gmail.com> - 2016-10-20 16:30 +0200
                  Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-10-20 16:40 +0200
                    Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Nicholas Piggin <npiggin@gmail.com> - 2016-10-20 17:00 +0200
                    Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Michal Marek <mmarek@suse.com> - 2016-10-22 22:00 +0200
              [PATCH 2/2, variant A] ARM: add hidden mmioset/mmiocpy prototypes Arnd Bergmann <arnd@arndb.de> - 2016-10-24 17:10 +0200
              [PATCH 2/2, variant B] ARM: move mmiocpy/mmioset exports to io.c Arnd Bergmann <arnd@arndb.de> - 2016-10-24 17:10 +0200
              [PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for ARM Arnd Bergmann <arnd@arndb.de> - 2016-10-24 17:10 +0200
                Re: [PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for  ARM Nicholas Piggin <npiggin@gmail.com> - 2016-10-25 10:40 +0200
              Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Arnd Bergmann <arnd@arndb.de> - 2016-10-24 17:10 +0200
            Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-20 09:40 +0200
              Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-10-20 10:30 +0200
                Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-20 10:30 +0200

Page 2 of 2 — ← Prev page 1 [2]


#1507280 — [PATCH 2/2, variant A] ARM: add hidden mmioset/mmiocpy prototypes

FromArnd Bergmann <arnd@arndb.de>
Date2016-10-24 17:10 +0200
Subject[PATCH 2/2, variant A] ARM: add hidden mmioset/mmiocpy prototypes
Message-ID<svP2W-Pj-13@gated-at.bofh.it>
In reply to#1504514
The prototypes for mmioset/mmiocpy are intentionally hidden
inside of inline functions, which breaks the EXPORT_SYMBOL
statements when symbol versioning is enabled.

This adds a prototype to asm/asm-prototypes.h but hides it
in an #ifdef so normal drivers don't see it and won't be
able to abuse the interface.

Suggested-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/arch/arm/include/asm/asm-prototypes.h b/arch/arm/include/asm/asm-prototypes.h
index 04e5616a7b15..e46b09536b14 100644
--- a/arch/arm/include/asm/asm-prototypes.h
+++ b/arch/arm/include/asm/asm-prototypes.h
@@ -32,3 +32,8 @@ extern void __muldi3(void);
 extern void __ucmpdi2(void);
 extern void __udivsi3(void);
 extern void __umodsi3(void);
+
+#ifdef __GENKSYMS__
+extern void mmioset(void *, unsigned int, size_t);
+extern void mmiocpy(void *, const void *, size_t);
+#endif

[toc] | [prev] | [next] | [standalone]


#1507283 — [PATCH 2/2, variant B] ARM: move mmiocpy/mmioset exports to io.c

FromArnd Bergmann <arnd@arndb.de>
Date2016-10-24 17:10 +0200
Subject[PATCH 2/2, variant B] ARM: move mmiocpy/mmioset exports to io.c
Message-ID<svP2W-Pj-27@gated-at.bofh.it>
In reply to#1504514
The prototypes for mmioset/mmiocpy are intentionally hidden
inside of inline functions, which breaks the EXPORT_SYMBOL
statements when symbol versioning is enabled.

This moves the two exports from the files that implement the
code into the kernel/io.c file, adding another local declaration
there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/arch/arm/kernel/io.c b/arch/arm/kernel/io.c
index eedefe050022..c74746997626 100644
--- a/arch/arm/kernel/io.c
+++ b/arch/arm/kernel/io.c
@@ -82,3 +82,10 @@ void _memset_io(volatile void __iomem *dst, int c, size_t count)
 	}
 }
 EXPORT_SYMBOL(_memset_io);
+
+/* can't export them from memcpy.S/memset.S because of hidden declaration */
+void mmioset(void __iomem *addr, unsigned int c, size_t n);
+EXPORT_SYMBOL(mmioset);
+
+void mmiocpy(void *dest, const void __iomem *src, size_t n);
+EXPORT_SYMBOL(mmiocpy);
diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S
index 1be5b6ddf37c..1f822fc52400 100644
--- a/arch/arm/lib/memcpy.S
+++ b/arch/arm/lib/memcpy.S
@@ -70,4 +70,3 @@ ENTRY(memcpy)
 ENDPROC(memcpy)
 ENDPROC(mmiocpy)
 EXPORT_SYMBOL(memcpy)
-EXPORT_SYMBOL(mmiocpy)
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S
index 7b72044cba62..6f075ca09abc 100644
--- a/arch/arm/lib/memset.S
+++ b/arch/arm/lib/memset.S
@@ -137,4 +137,3 @@ UNWIND( .fnend   )
 ENDPROC(memset)
 ENDPROC(mmioset)
 EXPORT_SYMBOL(memset)
-EXPORT_SYMBOL(mmioset)

[toc] | [prev] | [next] | [standalone]


#1507284 — [PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for ARM

FromArnd Bergmann <arnd@arndb.de>
Date2016-10-24 17:10 +0200
Subject[PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for ARM
Message-ID<svP2W-Pj-29@gated-at.bofh.it>
In reply to#1504514
This adds an asm/asm-prototypes.h header for ARM to fix the
broken symbol versioning for symbols exported from assembler
files.

In addition to the header, we have to do these other small
changes:

- move the exports from bitops.h to {change,clear,set,...}bit.S
- move the exports from csumpartialgeneric.S into the files
  including it

I couldn't find the correct prototypes for the compiler builtins,
so I went with the fake 'void f(void)' prototypes that we had
before.

This leaves the mmioset/mmiocpy function for now, as it's not
obvious how to best handle them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/arch/arm/include/asm/asm-prototypes.h b/arch/arm/include/asm/asm-prototypes.h
new file mode 100644
index 000000000000..04e5616a7b15
--- /dev/null
+++ b/arch/arm/include/asm/asm-prototypes.h
@@ -0,0 +1,34 @@
+#include <linux/arm-smccc.h>
+#include <linux/bitops.h>
+#include <linux/ftrace.h>
+#include <linux/io.h>
+#include <linux/platform_data/asoc-imx-ssi.h>
+#include <linux/string.h>
+#include <linux/uaccess.h>
+
+#include <asm/checksum.h>
+#include <asm/div64.h>
+#include <asm/memory.h>
+
+extern void __aeabi_idivmod(void);
+extern void __aeabi_idiv(void);
+extern void __aeabi_lasr(void);
+extern void __aeabi_llsl(void);
+extern void __aeabi_llsr(void);
+extern void __aeabi_lmul(void);
+extern void __aeabi_uidivmod(void);
+extern void __aeabi_uidiv(void);
+extern void __aeabi_ulcmp(void);
+
+extern void __ashldi3(void);
+extern void __ashrdi3(void);
+extern void __bswapdi2(void);
+extern void __bswapsi2(void);
+extern void __divsi3(void);
+extern void __do_div64(void);
+extern void __lshrdi3(void);
+extern void __modsi3(void);
+extern void __muldi3(void);
+extern void __ucmpdi2(void);
+extern void __udivsi3(void);
+extern void __umodsi3(void);
diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h
index df06638b327c..afaef2a7faec 100644
--- a/arch/arm/lib/bitops.h
+++ b/arch/arm/lib/bitops.h
@@ -26,7 +26,6 @@ UNWIND(	.fnstart	)
 	bx	lr
 UNWIND(	.fnend		)
 ENDPROC(\name		)
-EXPORT_SYMBOL(\name	)
 	.endm
 
 	.macro	testop, name, instr, store
@@ -57,7 +56,6 @@ UNWIND(	.fnstart	)
 2:	bx	lr
 UNWIND(	.fnend		)
 ENDPROC(\name		)
-EXPORT_SYMBOL(\name	)
 	.endm
 #else
 	.macro	bitop, name, instr
@@ -77,7 +75,6 @@ UNWIND(	.fnstart	)
 	ret	lr
 UNWIND(	.fnend		)
 ENDPROC(\name		)
-EXPORT_SYMBOL(\name	)
 	.endm
 
 /**
@@ -106,6 +103,5 @@ UNWIND(	.fnstart	)
 	ret	lr
 UNWIND(	.fnend		)
 ENDPROC(\name		)
-EXPORT_SYMBOL(\name	)
 	.endm
 #endif
diff --git a/arch/arm/lib/changebit.S b/arch/arm/lib/changebit.S
index f4027862172f..005fdd18c509 100644
--- a/arch/arm/lib/changebit.S
+++ b/arch/arm/lib/changebit.S
@@ -13,3 +13,4 @@
                 .text
 
 bitop	_change_bit, eor
+EXPORT_SYMBOL(_change_bit)
diff --git a/arch/arm/lib/clearbit.S b/arch/arm/lib/clearbit.S
index f6b75fb64d30..501eff09968d 100644
--- a/arch/arm/lib/clearbit.S
+++ b/arch/arm/lib/clearbit.S
@@ -13,3 +13,4 @@
                 .text
 
 bitop	_clear_bit, bic
+EXPORT_SYMBOL(_clear_bit)
diff --git a/arch/arm/lib/csumpartialcopy.S b/arch/arm/lib/csumpartialcopy.S
index 9c3383fed129..bdcc2eea4e5c 100644
--- a/arch/arm/lib/csumpartialcopy.S
+++ b/arch/arm/lib/csumpartialcopy.S
@@ -49,6 +49,7 @@
 
 #define FN_ENTRY	ENTRY(csum_partial_copy_nocheck)
 #define FN_EXIT		ENDPROC(csum_partial_copy_nocheck)
-#define FN_EXPORT	EXPORT_SYMBOL(csum_partial_copy_nocheck)
 
 #include "csumpartialcopygeneric.S"
+
+EXPORT_SYMBOL(csum_partial_copy_nocheck)
diff --git a/arch/arm/lib/csumpartialcopygeneric.S b/arch/arm/lib/csumpartialcopygeneric.S
index 8b94d20e51d1..06825566c0f7 100644
--- a/arch/arm/lib/csumpartialcopygeneric.S
+++ b/arch/arm/lib/csumpartialcopygeneric.S
@@ -332,4 +332,3 @@ FN_ENTRY
 		mov	r5, r4, get_byte_1
 		b	.Lexit
 FN_EXIT
-FN_EXPORT
diff --git a/arch/arm/lib/csumpartialcopyuser.S b/arch/arm/lib/csumpartialcopyuser.S
index 5d495edf3d83..d5522c94f58c 100644
--- a/arch/arm/lib/csumpartialcopyuser.S
+++ b/arch/arm/lib/csumpartialcopyuser.S
@@ -73,9 +73,9 @@
 
 #define FN_ENTRY	ENTRY(csum_partial_copy_from_user)
 #define FN_EXIT		ENDPROC(csum_partial_copy_from_user)
-#define FN_EXPORT	EXPORT_SYMBOL(csum_partial_copy_from_user)
 
 #include "csumpartialcopygeneric.S"
+EXPORT_SYMBOL(csum_partial_copy_from_user)
 
 /*
  * FIXME: minor buglet here
diff --git a/arch/arm/lib/setbit.S b/arch/arm/lib/setbit.S
index 618fedae4b37..d748b8d1326f 100644
--- a/arch/arm/lib/setbit.S
+++ b/arch/arm/lib/setbit.S
@@ -13,3 +13,4 @@
 		.text
 
 bitop	_set_bit, orr
+EXPORT_SYMBOL(_set_bit)
diff --git a/arch/arm/lib/testchangebit.S b/arch/arm/lib/testchangebit.S
index 4becdc3a59cb..4d2dafa9b787 100644
--- a/arch/arm/lib/testchangebit.S
+++ b/arch/arm/lib/testchangebit.S
@@ -13,3 +13,4 @@
                 .text
 
 testop	_test_and_change_bit, eor, str
+EXPORT_SYMBOL(_test_and_change_bit)
diff --git a/arch/arm/lib/testclearbit.S b/arch/arm/lib/testclearbit.S
index 918841dcce7a..fe5cae2e480a 100644
--- a/arch/arm/lib/testclearbit.S
+++ b/arch/arm/lib/testclearbit.S
@@ -13,3 +13,4 @@
                 .text
 
 testop	_test_and_clear_bit, bicne, strne
+EXPORT_SYMBOL(_test_and_clear_bit)
diff --git a/arch/arm/lib/testsetbit.S b/arch/arm/lib/testsetbit.S
index 8d1b2fe9e487..25fed837edb3 100644
--- a/arch/arm/lib/testsetbit.S
+++ b/arch/arm/lib/testsetbit.S
@@ -13,3 +13,4 @@
                 .text
 
 testop	_test_and_set_bit, orreq, streq
+EXPORT_SYMBOL(_test_and_set_bit)

[toc] | [prev] | [next] | [standalone]


#1508072 — Re: [PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for ARM

FromNicholas Piggin <npiggin@gmail.com>
Date2016-10-25 10:40 +0200
SubjectRe: [PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for ARM
Message-ID<sw5r4-39J-17@gated-at.bofh.it>
In reply to#1507284
On Mon, 24 Oct 2016 17:05:26 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> This adds an asm/asm-prototypes.h header for ARM to fix the
> broken symbol versioning for symbols exported from assembler
> files.
> 
> In addition to the header, we have to do these other small
> changes:
> 
> - move the exports from bitops.h to {change,clear,set,...}bit.S
> - move the exports from csumpartialgeneric.S into the files
>   including it
> 
> I couldn't find the correct prototypes for the compiler builtins,
> so I went with the fake 'void f(void)' prototypes that we had
> before.
> 
> This leaves the mmioset/mmiocpy function for now, as it's not
> obvious how to best handle them.


This looks nicer. I like variant B because it keeps the GENKSYMS cruft to
a single location, but either one isn't too bad.

I'd like to get moving on this, so let's at least get the generic kbuild
change merged. In the end, the kbuild code does not prevent a maintainer
from putting their EXPORT_SYMBOL in whatever location they like, so there
is no reason not to merge it (certainly there will be archs that do use
it).

Michal, what's your thoughts? If you merge my patch 2/2 and skip 1/2, it
should not give any new build warnings or errors, so then arch patches can
go via arch trees. 1/2 could go in after everyone is up to date.

Thanks,
Nick

[toc] | [prev] | [next] | [standalone]


#1507285 — Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM

FromArnd Bergmann <arnd@arndb.de>
Date2016-10-24 17:10 +0200
SubjectRe: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM
Message-ID<svP2W-Pj-15@gated-at.bofh.it>
In reply to#1504514
On Thursday, October 20, 2016 3:08:14 PM CEST Nicholas Piggin wrote:
> On Wed, 19 Oct 2016 16:32:00 +0100 Russell King - ARM Linux <linux@armlinux.org.uk> wrote:
> > I'm not in favour of this.
> > 
> >    +extern void mmioset(void *, unsigned int, size_t);
> >    +extern void mmiocpy(void *, const void *, size_t);
> >    +
> >     #ifndef __ARMBE__
> >     static inline void memset_io(volatile void __iomem *dst, unsigned c,
> >            size_t count)
> >     {
> >    -       extern void mmioset(void *, unsigned int, size_t);
> >            mmioset((void __force *)dst, c, count);
> >     }
> > 
> > The reason they're declared _within_ memset_io() is to prevent people
> > from using them by hiding their declaration.  Moving them outside is
> > an open invitation to stupid people starting to use them as an "oh it
> > must be an official API".
> > 

I've split out that change from the other ones now, and will follow
up with the patch to address all the other ones first.

> Fair point, what about leaving those as they are, and also adding
> them to asm-prototypes.h protected with GENKSYMS ifdef? It's not
> beautiful, but still better than armksyms.c before Al's patches (or
> at least no worse).

I'm trying this one, and an alternative patch that moves the
export into arch/arm/kernel/io.h. Let's see if we can agree
on one of these.

	Arnd

[toc] | [prev] | [next] | [standalone]


#1504583 — Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-10-20 09:40 +0200
SubjectRe: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM
Message-ID<sug7f-4u4-1@gated-at.bofh.it>
In reply to#1503941
On Wed, Oct 19, 2016 at 5:32 PM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> I'm not in favour of this.
>
>    +extern void mmioset(void *, unsigned int, size_t);
>    +extern void mmiocpy(void *, const void *, size_t);
>    +
>     #ifndef __ARMBE__
>     static inline void memset_io(volatile void __iomem *dst, unsigned c,
>            size_t count)
>     {
>    -       extern void mmioset(void *, unsigned int, size_t);
>            mmioset((void __force *)dst, c, count);
>     }
>
> The reason they're declared _within_ memset_io() is to prevent people
> from using them by hiding their declaration.  Moving them outside is
> an open invitation to stupid people starting to use them as an "oh it
> must be an official API".

If they're not intended for public use, they should (also) be prefixed
with "__" or even "____" to make this clear.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [prev] | [next] | [standalone]


#1504629 — Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM

FromRussell King - ARM Linux <linux@armlinux.org.uk>
Date2016-10-20 10:30 +0200
SubjectRe: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM
Message-ID<sugTD-53C-3@gated-at.bofh.it>
In reply to#1504583
On Thu, Oct 20, 2016 at 09:37:30AM +0200, Geert Uytterhoeven wrote:
> On Wed, Oct 19, 2016 at 5:32 PM, Russell King - ARM Linux
> <linux@armlinux.org.uk> wrote:
> > I'm not in favour of this.
> >
> >    +extern void mmioset(void *, unsigned int, size_t);
> >    +extern void mmiocpy(void *, const void *, size_t);
> >    +
> >     #ifndef __ARMBE__
> >     static inline void memset_io(volatile void __iomem *dst, unsigned c,
> >            size_t count)
> >     {
> >    -       extern void mmioset(void *, unsigned int, size_t);
> >            mmioset((void __force *)dst, c, count);
> >     }
> >
> > The reason they're declared _within_ memset_io() is to prevent people
> > from using them by hiding their declaration.  Moving them outside is
> > an open invitation to stupid people starting to use them as an "oh it
> > must be an official API".
> 
> If they're not intended for public use, they should (also) be prefixed
> with "__" or even "____" to make this clear.

Tried that with the __cpuc_* cache flushing interfaces.  It doesn't
have any effect what so ever.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [next] | [standalone]


#1504632 — Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-10-20 10:30 +0200
SubjectRe: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM
Message-ID<sugTD-53C-11@gated-at.bofh.it>
In reply to#1504629
Hi Russell,

On Thu, Oct 20, 2016 at 10:20 AM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> On Thu, Oct 20, 2016 at 09:37:30AM +0200, Geert Uytterhoeven wrote:
>> On Wed, Oct 19, 2016 at 5:32 PM, Russell King - ARM Linux
>> <linux@armlinux.org.uk> wrote:
>> > I'm not in favour of this.
>> >
>> >    +extern void mmioset(void *, unsigned int, size_t);
>> >    +extern void mmiocpy(void *, const void *, size_t);
>> >    +
>> >     #ifndef __ARMBE__
>> >     static inline void memset_io(volatile void __iomem *dst, unsigned c,
>> >            size_t count)
>> >     {
>> >    -       extern void mmioset(void *, unsigned int, size_t);
>> >            mmioset((void __force *)dst, c, count);
>> >     }
>> >
>> > The reason they're declared _within_ memset_io() is to prevent people
>> > from using them by hiding their declaration.  Moving them outside is
>> > an open invitation to stupid people starting to use them as an "oh it
>> > must be an official API".
>>
>> If they're not intended for public use, they should (also) be prefixed
>> with "__" or even "____" to make this clear.
>
> Tried that with the __cpuc_* cache flushing interfaces.  It doesn't
> have any effect what so ever.

it may not stop the deliberate abuser, but it hints the casual reviewer.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.kernel


csiph-web