atomic64 support on sparc32?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While trying to see how bad a "allyesconfig" looked for sparc32
I noticed a lot of build errors were related to missing
definition of atomic64.

A few samples:
kernel/trace/trace_clock.c:117:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'trace_counter'
kernel/trace/trace_clock.c: In function 'trace_clock_counter':
kernel/trace/trace_clock.c:126:2: error: implicit declaration of function 'atomic64_add_return'


In file included from net/mac80211/ieee80211_i.h:30:0,
                 from net/mac80211/main.c:27:
net/mac80211/key.h:88:4: error: expected specifier-qualifier-list before 'atomic64_t'
net/mac80211/key.h:100:4: error: expected specifier-qualifier-list before 'atomic64_t'
make[3]: *** [net/mac80211/main.o] Error 1


In file included from net/mac80211/ieee80211_i.h:30:0,
                 from net/mac80211/chan.c:6:
net/mac80211/key.h:88:4: error: expected specifier-qualifier-list before 'atomic64_t'
net/mac80211/key.h:100:4: error: expected specifier-qualifier-list before 'atomic64_t'


To add generic support for atomic64_t looks to be trivial.
But do we want to add this - when it is not really required?

We could of course hide it behind a 
CONFIG_SPARC32_ATOMIC64 option..

I do not have the footprint numbers yet, will post them in ~24 hours.

	Sam

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index f92602e..27060b2 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -31,6 +31,7 @@ config SPARC
 
 config SPARC32
 	def_bool !64BIT
+	select GENERIC_ATOMIC64
 
 config SPARC64
 	def_bool 64BIT
diff --git a/arch/sparc/include/asm/atomic_32.h b/arch/sparc/include/asm/atomic_32.h
index 03fd0c5..9dd0a76 100644
--- a/arch/sparc/include/asm/atomic_32.h
+++ b/arch/sparc/include/asm/atomic_32.h
@@ -13,6 +13,8 @@
 
 #include <linux/types.h>
 
+#include <asm-generic/atomic64.h>
+
 #include <asm/system.h>
 
 #define ATOMIC_INIT(i)  { (i) }
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux