Skip to content

Commit

Permalink
sparc32: support atomic64_t
Browse files Browse the repository at this point in the history
There is no-one that really require atomic64_t support on sparc32.
But several drivers fails to build without proper atomic64 support.
And for an allyesconfig build for sparc32 this is annoying.

Include the generic atomic64_t support for sparc32.
This has a text footprint cost:

$size vmlinux (before atomic64_t support)
   text    data     bss     dec     hex filename
3578860  134260  108781 3821901  3a514d vmlinux

$size vmlinux (after atomic64_t support)
   text    data     bss     dec     hex filename
3579892  130684  108781 3819357  3a475d vmlinux

text increase (3579892 - 3578860) = 1032 bytes

data decreases - but I fail to explain why!
I have rebuild twice to check my numbers.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Dec 27, 2011
1 parent ab17da5 commit aea1181
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ config SPARC

config SPARC32
def_bool !64BIT
select GENERIC_ATOMIC64

config SPARC64
def_bool 64BIT
Expand Down
2 changes: 2 additions & 0 deletions arch/sparc/include/asm/atomic_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

#include <linux/types.h>

#include <asm-generic/atomic64.h>

#include <asm/system.h>

#define ATOMIC_INIT(i) { (i) }
Expand Down

0 comments on commit aea1181

Please sign in to comment.