use __attribute__ in asm-powerpc
PATCH 1/1 use __attribute__ in asm-powerpc
Pretty much everyone uses "__attribute__" or "attribute", no one uses "__attribute". This patch tweaks the three places in asm-powerpc where this comes up. While only asm-powerpc/types.h is interesting (for userspace), I did asm-powerpc/processor.h as well for consistency.
---
include/asm-powerpc/processor.h +2 -2
@@ -153,9 +153,9 @@ struct thread_struct {unsigned long dabr;/* Data address breakpoint register */ #ifdef CONFIG_ALTIVEC /* Complete AltiVec register set */ - vector128 vr[32] __attribute((aligned(16))); + vector128 vr[32] __attribute__((aligned(16)));/* AltiVec status */ - vector128 vscr __attribute((aligned(16))); + vector128 vscr __attribute__((aligned(16)));unsigned long vrsave;int used_vr;/* set if process has used altivec */ #endif /* CONFIG_ALTIVEC */
include/asm-powerpc/types.h +1 -1
@@ -48,7 +48,7 @@ typedef unsigned long long __u64;typedef struct {__u32 u[4 ]; -} __attribute((aligned (16 )))__vector128 ; +} __attribute__((aligned (16 )))__vector128 ;#endif /* __ASSEMBLY__ */
Quoted 12 lines · Mike Frysinger
Pretty much everyone uses "
__attribute__" or "attribute", no one uses "__attribute". This patch tweaks the three places in asm-powerpc where this comes up. While onlyasm-powerpc/types.his interesting (for userspace), I didasm-powerpc/processor.has well for consistency.Signed-off-by Mike Frysinger <[email protected]>---
include/asm-powerpc/processor.h +0
-0
include/asm-powerpc/processor.h struct thread_struct { · line 156
Quoted 5 lines
include/asm-powerpc/processor.h +1
-1@@ -153,9 +153,9 @@ struct thread_struct {unsigned long dabr;/* Data address breakpoint register */ #ifdef CONFIG_ALTIVEC /* Complete AltiVec register set */ - vector128 vr[32] __attribute((aligned(16))); + vector128 vr[32] __attribute__((aligned(16)));
If the code is not exported to userspace (and thus not subject to different compilers), I think the preferred form is plain `attribute'.
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [email protected] Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Mike Frysinger
Pretty much everyone uses "
__attribute__" or "attribute", no one uses "__attribute". This patch tweaks the three places in asm-powerpc where this comes up. While onlyasm-powerpc/types.his interesting (for userspace), I didasm-powerpc/processor.has well for consistency.
Quoted 16 lines
include/asm-powerpc/processor.h struct thread_struct { · line 156
Quoted 12 lines
Signed-off-by Mike Frysinger <[email protected]>---
include/asm-powerpc/processor.h +1
-1@@ -153,9 +153,9 @@ struct thread_struct {unsigned long dabr;/* Data address breakpoint register */ #ifdef CONFIG_ALTIVEC /* Complete AltiVec register set */ - vector128 vr[32] __attribute((aligned(16))); + vector128 vr[32] __attribute__((aligned(16)));If the code is not exported to userspace (and thus not subject to different compilers), I think the preferred form is plain `attribute'.
compiler-gcc.h also defines the common form of the shortcut:
#define __aligned(x) __attribute__((aligned(x)))
rday
Signature · 7 lines
======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://fsdev.net/wiki/index.php?title=Main_Page ========================================================================
Quoted 2 lines · Geert Uytterhoeven
If the code is not exported to userspace (and thus not subject to different compilers), I think the preferred form is plain `attribute'.
That does not exist without underscores.
Andreas.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Mike Frysinger
Pretty much everyone uses "
__attribute__" or "attribute", no one uses "__attribute". This patch tweaks the three places in asm-powerpc where this comes up. While onlyasm-powerpc/types.his interesting (for userspace), I didasm-powerpc/processor.has well for consistency.
Quoted 15 lines
include/asm-powerpc/processor.h struct thread_struct { · line 156
Quoted 12 lines
Signed-off-by Mike Frysinger <[email protected]>---
(quoted diff) +0
-0
b/include/asm-powerpc/processor.hindex d947b16..2ce6ea6 100644include/asm-powerpc/processor.h +1
-1@@ -153,9 +153,9 @@ struct thread_struct {unsigned long dabr;/* Data address breakpoint register */ #ifdef CONFIG_ALTIVEC /* Complete AltiVec register set */ - vector128 vr[32] __attribute((aligned(16))); + vector128 vr[32] __attribute__((aligned(16)));If the code is not exported to userspace (and thus not subject to different compilers), I think the preferred form is plain `attribute'.
i never said asm-powerpc/processor.h was exported to userspace ... i did say that i changed the file to be consistent with all other files. -mike