Skip to contentSkip to conversation

kill off ARCH_HAS_ATOMIC_UNSIGNED

PATCH In review Dave Hansen 2 participants 2 messages Dec 17, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kill off ARCH_HAS_ATOMIC_UNSIGNED

Andi says that we don't need this on x86_64 any more. Since it is the only user, let's kill it off completely. BTW, this now makes 4 free bytes of space in page->flags for all 64-bit architectures to use.

---

 apw2-dave/include/asm-x86_64/bitops.h |    2 --
 apw2-dave/include/linux/mm.h          |    4 ----
 apw2-dave/include/linux/mmzone.h      |    2 +-
 3 files changed, 1 insertion(+), 7 deletions(-)

diff -puN arch/x86_64/Kconfig~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED arch/x86_64/Kconfig

include/linux/mm.h renamed from include/linux/mm.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED +0 -4
diff -puN include/linux/mm.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED include/linux/mm.h
@@ -216,11 +216,7 @@ struct vm_operations_struct {
 struct mmu_gather;
 struct inode;
 
-#ifdef ARCH_HAS_ATOMIC_UNSIGNED
-typedef unsigned page_flags_t;
-#else
 typedef unsigned long page_flags_t;
-#endif
 
 /*
  * Each physical page in the system has a struct page associated with
include/linux/mmzone.h renamed from include/linux/mmzone.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED +1 -1
diff -puN include/linux/mmzone.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED include/linux/mmzone.h
@@ -388,7 +388,7 @@ extern struct pglist_data contig_page_da
 
 #include <asm/mmzone.h>
 
-#if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED)
+#if BITS_PER_LONG == 32
 /*
  * with 32 bit page->flags field, we reserve 8 bits for node/zone info.
  * there are 3 zones (2 bits) and this leaves 8-2=6 bits for nodes.
include/asm-x86_64/bitops.h renamed from include/asm-x86_64/bitops.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED +0 -2
diff -puN include/asm-x86_64/bitops.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED include/asm-x86_64/bitops.h
@@ -411,8 +411,6 @@ static __inline__ int ffs(int x)
 /* find last set bit */
 #define fls(x) generic_fls(x)
 
-#define ARCH_HAS_ATOMIC_UNSIGNED 1
-
 #endif /* __KERNEL__ */
 
 #endif /* _X86_64_BITOPS_H */

_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw

include/linux/mm.h struct vm_operations_struct { · line 223

Quoted 5 lines
include/linux/mm.h renamed from include/linux/mm.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED +0 -4
-#ifdef ARCH_HAS_ATOMIC_UNSIGNED
-typedef unsigned page_flags_t;
-#else
 typedef unsigned long page_flags_t;
-#endif

Better remove the type completely and use unsigned long in struct page. No need for typedefs when not needed.

-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>