Message ID | 7d72fe60f396407b4fbc68ba8f9910cda0fe24a8.1408279142.git.yann.morin.1998@free.fr |
---|---|
State | Accepted |
Commit | 1b5f0fc8dfdad74649d4e12737c83e727e116535 |
Headers | show |
"Yann E. MORIN" <yann.morin.1998@free.fr> schreef: >The fact that atomic operations are available is not really a >specificity of the toolchain, but rather of the architecture. > >So, add a new option that architectures that have atomic operations >can select. This in turn selects the current toolchain atomic option, >until all packages have been converted, at which point the old >toolchain option can be removed. > >Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> >Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> >Cc: Anton Kolesov <Anton.Kolesov@synopsys.com> >Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> >--- > arch/Config.in | 6 ++++++ > arch/Config.in.arc | 2 +- > toolchain/toolchain-common.in | 1 - > 3 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/arch/Config.in b/arch/Config.in >index 9cd85a5..5cee0d7 100644 >--- a/arch/Config.in >+++ b/arch/Config.in >@@ -250,6 +250,12 @@ config BR2_GCC_TARGET_FLOAT_ABI > config BR2_GCC_TARGET_MODE > string > >+# If the architecture has atomic operations, select this: >+config BR2_ARCH_HAS_ATOMICS >+ bool >+ default y if !BR2_arc >+ select BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS >+ Is there a specific reason why the option is now dubbed ATOMICS iso ATOMIC_INTRINSICS? The latter may be a bit more descriptive, no? Best regards, Thomas
Dear Thomas De Schampheleire, On Sun, 17 Aug 2014 14:55:06 +0200, Thomas De Schampheleire wrote: > Is there a specific reason why the option is now > dubbed ATOMICS iso ATOMIC_INTRINSICS? > > The latter may be a bit more descriptive, no? But wouldn't make sense. "intrinsics" is a compiler notion, which doesn't have much to do with an architecture. An architecture provides atomic instructions, which in turn allow compilers to implement a certain class of compiler intrinsics to access those atomic operations. Thomas
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> schreef: >Dear Thomas De Schampheleire, > >On Sun, 17 Aug 2014 14:55:06 +0200, Thomas De Schampheleire wrote: > >> Is there a specific reason why the option is now >> dubbed ATOMICS iso ATOMIC_INTRINSICS? >> >> The latter may be a bit more descriptive, no? > >But wouldn't make sense. "intrinsics" is a compiler notion, which >doesn't have much to do with an architecture. An architecture provides >atomic instructions, which in turn allow compilers to implement a >certain class of compiler intrinsics to access those atomic operations. Then what about HAS_ATOMIC_INSTRUCTIONS ?
ThomasĀ², All, On 2014-08-17 14:57 +0200, Thomas Petazzoni spake thusly: > On Sun, 17 Aug 2014 14:55:06 +0200, Thomas De Schampheleire wrote: > > > Is there a specific reason why the option is now > > dubbed ATOMICS iso ATOMIC_INTRINSICS? > > > > The latter may be a bit more descriptive, no? > > But wouldn't make sense. "intrinsics" is a compiler notion, which > doesn't have much to do with an architecture. An architecture provides > atomic instructions, which in turn allow compilers to implement a > certain class of compiler intrinsics to access those atomic operations. That. Plus, who could have resisted the 'atomics' pun? ;-) Regards, Yann E. MORIN.
diff --git a/arch/Config.in b/arch/Config.in index 9cd85a5..5cee0d7 100644 --- a/arch/Config.in +++ b/arch/Config.in @@ -250,6 +250,12 @@ config BR2_GCC_TARGET_FLOAT_ABI config BR2_GCC_TARGET_MODE string +# If the architecture has atomic operations, select this: +config BR2_ARCH_HAS_ATOMICS + bool + default y if !BR2_arc + select BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS + # Set up target binary format choice prompt "Target Binary Format" diff --git a/arch/Config.in.arc b/arch/Config.in.arc index 836cfef..8a7f290 100644 --- a/arch/Config.in.arc +++ b/arch/Config.in.arc @@ -1,7 +1,7 @@ # Choise of atomic instructions presence config BR2_ARC_ATOMIC_EXT bool "Atomic extension (LLOCK/SCOND instructions)" - select BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS + select BR2_ARCH_HAS_ATOMICS config BR2_ARCH default "arc" if BR2_arcle diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in index 6d43700..2fa4f61 100644 --- a/toolchain/toolchain-common.in +++ b/toolchain/toolchain-common.in @@ -46,7 +46,6 @@ config BR2_TOOLCHAIN_HAS_SSP config BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS bool - default y if !BR2_arc config BR2_ENABLE_LOCALE_PURGE bool "Purge unwanted locales"
The fact that atomic operations are available is not really a specificity of the toolchain, but rather of the architecture. So, add a new option that architectures that have atomic operations can select. This in turn selects the current toolchain atomic option, until all packages have been converted, at which point the old toolchain option can be removed. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Anton Kolesov <Anton.Kolesov@synopsys.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- arch/Config.in | 6 ++++++ arch/Config.in.arc | 2 +- toolchain/toolchain-common.in | 1 - 3 files changed, 7 insertions(+), 2 deletions(-)