* [PATCH] Revert "ARC: Add guard macro to uapi/asm/unistd.h"
@ 2013-12-19 11:13 Vineet Gupta
2013-12-19 12:34 ` Chen Gang
0 siblings, 1 reply; 6+ messages in thread
From: Vineet Gupta @ 2013-12-19 11:13 UTC (permalink / raw)
To: Linus Torvalds
Cc: lkml, Francois Bedard, David Howells, Chen Gang, Arnd Bergmann,
Vineet Gupta
This reverts commit 97bc386fc12deeb41d5bff33548e3002b258d4e0.
Generic syscall table generator relies on ARCH unistd.h as follows:
void *sys_call_table[NR_syscalls] = {
[0 ... NR_syscalls-1] = sys_ni_syscall,
#include <asm/unistd.h>
};
And turns out that prior dependencies already include that header by
the time preprocessor hits the above. Meaning ARCH unistd.h needs to be
able to included twice.
This however means that perf cross comilation warning will re-appear
which needs to be discussed with perf folks (why they need to include
both libc variant as well as kernel internal header directly).
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
arch/arc/include/uapi/asm/unistd.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/arc/include/uapi/asm/unistd.h b/arch/arc/include/uapi/asm/unistd.h
index 68125dd766c6..6f30484f34b7 100644
--- a/arch/arc/include/uapi/asm/unistd.h
+++ b/arch/arc/include/uapi/asm/unistd.h
@@ -8,9 +8,6 @@
/******** no-legacy-syscalls-ABI *******/
-#ifndef _UAPI_ASM_ARC_UNISTD_H
-#define _UAPI_ASM_ARC_UNISTD_H
-
#define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_SYS_CLONE
#define __ARCH_WANT_SYS_VFORK
@@ -35,5 +32,3 @@ __SYSCALL(__NR_arc_gettls, sys_arc_gettls)
/* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */
#define __NR_sysfs (__NR_arch_specific_syscall + 3)
__SYSCALL(__NR_sysfs, sys_sysfs)
-
-#endif
--
1.8.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] Revert "ARC: Add guard macro to uapi/asm/unistd.h" 2013-12-19 11:13 [PATCH] Revert "ARC: Add guard macro to uapi/asm/unistd.h" Vineet Gupta @ 2013-12-19 12:34 ` Chen Gang 2013-12-19 12:42 ` Geert Uytterhoeven 2013-12-19 13:11 ` Vineet Gupta 0 siblings, 2 replies; 6+ messages in thread From: Chen Gang @ 2013-12-19 12:34 UTC (permalink / raw) To: Vineet Gupta Cc: Linus Torvalds, lkml, Francois Bedard, David Howells, Arnd Bergmann On 12/19/2013 07:13 PM, Vineet Gupta wrote: > This reverts commit 97bc386fc12deeb41d5bff33548e3002b258d4e0. > > Generic syscall table generator relies on ARCH unistd.h as follows: > > void *sys_call_table[NR_syscalls] = { > [0 ... NR_syscalls-1] = sys_ni_syscall, > #include <asm/unistd.h> > }; > > And turns out that prior dependencies already include that header by > the time preprocessor hits the above. Meaning ARCH unistd.h needs to be > able to included twice. > OK, thanks, it sounds reasonable to me. But why many other architectures contents these guard macros? (arm, sh, blackfin, cris, frv, ia64, m32r, m68k, mips, s390, microblaze, mn10300, parisc, powerpc, sparc, x86). Do they need improvement too? And for our case, what xtensa has done looks like a better way to me. Thanks. > This however means that perf cross comilation warning will re-appear > which needs to be discussed with perf folks (why they need to include > both libc variant as well as kernel internal header directly). > > Signed-off-by: Vineet Gupta <vgupta@synopsys.com> > --- > arch/arc/include/uapi/asm/unistd.h | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/arch/arc/include/uapi/asm/unistd.h b/arch/arc/include/uapi/asm/unistd.h > index 68125dd766c6..6f30484f34b7 100644 > --- a/arch/arc/include/uapi/asm/unistd.h > +++ b/arch/arc/include/uapi/asm/unistd.h > @@ -8,9 +8,6 @@ > > /******** no-legacy-syscalls-ABI *******/ > > -#ifndef _UAPI_ASM_ARC_UNISTD_H > -#define _UAPI_ASM_ARC_UNISTD_H > - > #define __ARCH_WANT_SYS_EXECVE > #define __ARCH_WANT_SYS_CLONE > #define __ARCH_WANT_SYS_VFORK > @@ -35,5 +32,3 @@ __SYSCALL(__NR_arc_gettls, sys_arc_gettls) > /* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */ > #define __NR_sysfs (__NR_arch_specific_syscall + 3) > __SYSCALL(__NR_sysfs, sys_sysfs) > - > -#endif > -- Chen Gang Open, share and attitude like air, water and life which God blessed ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "ARC: Add guard macro to uapi/asm/unistd.h" 2013-12-19 12:34 ` Chen Gang @ 2013-12-19 12:42 ` Geert Uytterhoeven 2013-12-19 13:41 ` Chen Gang 2013-12-19 13:11 ` Vineet Gupta 1 sibling, 1 reply; 6+ messages in thread From: Geert Uytterhoeven @ 2013-12-19 12:42 UTC (permalink / raw) To: Chen Gang Cc: Vineet Gupta, Linus Torvalds, lkml, Francois Bedard, David Howells, Arnd Bergmann On Thu, Dec 19, 2013 at 1:34 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote: > On 12/19/2013 07:13 PM, Vineet Gupta wrote: >> This reverts commit 97bc386fc12deeb41d5bff33548e3002b258d4e0. >> >> Generic syscall table generator relies on ARCH unistd.h as follows: >> >> void *sys_call_table[NR_syscalls] = { >> [0 ... NR_syscalls-1] = sys_ni_syscall, >> #include <asm/unistd.h> >> }; >> >> And turns out that prior dependencies already include that header by >> the time preprocessor hits the above. Meaning ARCH unistd.h needs to be >> able to included twice. > > OK, thanks, it sounds reasonable to me. > > But why many other architectures contents these guard macros? (arm, sh, > blackfin, cris, frv, ia64, m32r, m68k, mips, s390, microblaze, mn10300, > parisc, powerpc, sparc, x86). Do they need improvement too? Those architectures don't use the generic syscall table generator. 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "ARC: Add guard macro to uapi/asm/unistd.h" 2013-12-19 12:42 ` Geert Uytterhoeven @ 2013-12-19 13:41 ` Chen Gang 0 siblings, 0 replies; 6+ messages in thread From: Chen Gang @ 2013-12-19 13:41 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Vineet Gupta, Linus Torvalds, lkml, Francois Bedard, David Howells, Arnd Bergmann On 12/19/2013 08:42 PM, Geert Uytterhoeven wrote: > On Thu, Dec 19, 2013 at 1:34 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote: >> On 12/19/2013 07:13 PM, Vineet Gupta wrote: >>> This reverts commit 97bc386fc12deeb41d5bff33548e3002b258d4e0. >>> >>> Generic syscall table generator relies on ARCH unistd.h as follows: >>> >>> void *sys_call_table[NR_syscalls] = { >>> [0 ... NR_syscalls-1] = sys_ni_syscall, >>> #include <asm/unistd.h> >>> }; >>> >>> And turns out that prior dependencies already include that header by >>> the time preprocessor hits the above. Meaning ARCH unistd.h needs to be >>> able to included twice. >> >> OK, thanks, it sounds reasonable to me. >> >> But why many other architectures contents these guard macros? (arm, sh, >> blackfin, cris, frv, ia64, m32r, m68k, mips, s390, microblaze, mn10300, >> parisc, powerpc, sparc, x86). Do they need improvement too? > > Those architectures don't use the generic syscall table generator. > OK, thanks. :-) > 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 > -- Chen Gang Open, share and attitude like air, water and life which God blessed ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "ARC: Add guard macro to uapi/asm/unistd.h" 2013-12-19 12:34 ` Chen Gang 2013-12-19 12:42 ` Geert Uytterhoeven @ 2013-12-19 13:11 ` Vineet Gupta 2013-12-19 13:42 ` Chen Gang 1 sibling, 1 reply; 6+ messages in thread From: Vineet Gupta @ 2013-12-19 13:11 UTC (permalink / raw) To: Chen Gang Cc: Linus Torvalds, lkml, Francois Bedard, David Howells, Arnd Bergmann On 12/19/2013 06:04 PM, Chen Gang wrote: > On 12/19/2013 07:13 PM, Vineet Gupta wrote: >> > This reverts commit 97bc386fc12deeb41d5bff33548e3002b258d4e0. >> > >> > Generic syscall table generator relies on ARCH unistd.h as follows: >> > >> > void *sys_call_table[NR_syscalls] = { >> > [0 ... NR_syscalls-1] = sys_ni_syscall, >> > #include <asm/unistd.h> >> > }; >> > >> > And turns out that prior dependencies already include that header by >> > the time preprocessor hits the above. Meaning ARCH unistd.h needs to be >> > able to included twice. >> > > OK, thanks, it sounds reasonable to me. > > But why many other architectures contents these guard macros? (arm, sh, > blackfin, cris, frv, ia64, m32r, m68k, mips, s390, microblaze, mn10300, > parisc, powerpc, sparc, x86). Do they need improvement too? > > And for our case, what xtensa has done looks like a better way to me. Yeah, looks like that'll work - good find. Linus, please ignore the Revert, I'll follow up with a pull request. -Vineet ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "ARC: Add guard macro to uapi/asm/unistd.h" 2013-12-19 13:11 ` Vineet Gupta @ 2013-12-19 13:42 ` Chen Gang 0 siblings, 0 replies; 6+ messages in thread From: Chen Gang @ 2013-12-19 13:42 UTC (permalink / raw) To: Vineet Gupta Cc: Linus Torvalds, lkml, Francois Bedard, David Howells, Arnd Bergmann On 12/19/2013 09:11 PM, Vineet Gupta wrote: > On 12/19/2013 06:04 PM, Chen Gang wrote: >> On 12/19/2013 07:13 PM, Vineet Gupta wrote: >>>> This reverts commit 97bc386fc12deeb41d5bff33548e3002b258d4e0. >>>> >>>> Generic syscall table generator relies on ARCH unistd.h as follows: >>>> >>>> void *sys_call_table[NR_syscalls] = { >>>> [0 ... NR_syscalls-1] = sys_ni_syscall, >>>> #include <asm/unistd.h> >>>> }; >>>> >>>> And turns out that prior dependencies already include that header by >>>> the time preprocessor hits the above. Meaning ARCH unistd.h needs to be >>>> able to included twice. >>>> >> OK, thanks, it sounds reasonable to me. >> >> But why many other architectures contents these guard macros? (arm, sh, >> blackfin, cris, frv, ia64, m32r, m68k, mips, s390, microblaze, mn10300, >> parisc, powerpc, sparc, x86). Do they need improvement too? >> >> And for our case, what xtensa has done looks like a better way to me. > > Yeah, looks like that'll work - good find. Linus, please ignore the Revert, I'll > follow up with a pull request. > Thanks. :-) > -Vineet > -- Chen Gang Open, share and attitude like air, water and life which God blessed ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-12-19 13:43 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-19 11:13 [PATCH] Revert "ARC: Add guard macro to uapi/asm/unistd.h" Vineet Gupta 2013-12-19 12:34 ` Chen Gang 2013-12-19 12:42 ` Geert Uytterhoeven 2013-12-19 13:41 ` Chen Gang 2013-12-19 13:11 ` Vineet Gupta 2013-12-19 13:42 ` Chen Gang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox