public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: ak@suse.de
Cc: linux-mm@kvack.org, Dave Hansen <haveblue@us.ibm.com>
Subject: [patch] CONFIG_ARCH_HAS_ATOMIC_UNSIGNED
Date: Thu, 16 Dec 2004 16:44:20 -0800	[thread overview]
Message-ID: <E1Cf6EG-00015y-00@kernel.beaverton.ibm.com> (raw)

This reduces another one of the dependencies that struct page's
definition has on any arch-specific header files.  Currently,
only x86_64 uses this, so it's the only architecture that needed
to be modified.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 apw2-dave/arch/x86_64/Kconfig         |    4 ++++
 apw2-dave/include/asm-x86_64/bitops.h |    2 --
 apw2-dave/include/linux/mm.h          |    2 +-
 apw2-dave/include/linux/mmzone.h      |    2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff -puN arch/x86_64/Kconfig~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED arch/x86_64/Kconfig
--- apw2/arch/x86_64/Kconfig~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED	2004-12-16 16:29:29.000000000 -0800
+++ apw2-dave/arch/x86_64/Kconfig	2004-12-16 16:30:48.000000000 -0800
@@ -193,6 +193,10 @@ config X86_LOCAL_APIC
 	bool
 	default y
 
+config ARCH_HAS_ATOMIC_UNSIGNED
+	bool
+	default y
+
 config MTRR
 	bool "MTRR (Memory Type Range Register) support"
 	---help---
diff -puN include/linux/mm.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED include/linux/mm.h
--- apw2/include/linux/mm.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED	2004-12-16 16:29:29.000000000 -0800
+++ apw2-dave/include/linux/mm.h	2004-12-16 16:30:57.000000000 -0800
@@ -216,7 +216,7 @@ struct vm_operations_struct {
 struct mmu_gather;
 struct inode;
 
-#ifdef ARCH_HAS_ATOMIC_UNSIGNED
+#ifdef CONFIG_ARCH_HAS_ATOMIC_UNSIGNED
 typedef unsigned page_flags_t;
 #else
 typedef unsigned long page_flags_t;
diff -puN include/linux/mmzone.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED include/linux/mmzone.h
--- apw2/include/linux/mmzone.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED	2004-12-16 16:29:29.000000000 -0800
+++ apw2-dave/include/linux/mmzone.h	2004-12-16 16:31:07.000000000 -0800
@@ -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 || defined(CONFIG_ARCH_HAS_ATOMIC_UNSIGNED)
 /*
  * 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.
diff -puN include/asm-x86_64/bitops.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED include/asm-x86_64/bitops.h
--- apw2/include/asm-x86_64/bitops.h~000-CONFIG_ARCH_HAS_ATOMIC_UNSIGNED	2004-12-16 16:32:42.000000000 -0800
+++ apw2-dave/include/asm-x86_64/bitops.h	2004-12-16 16:32:48.000000000 -0800
@@ -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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

             reply	other threads:[~2004-12-17  0:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-17  0:44 Dave Hansen [this message]
2004-12-17  6:11 ` [patch] CONFIG_ARCH_HAS_ATOMIC_UNSIGNED Andi Kleen
2004-12-17  8:42   ` Dave Hansen
2004-12-17 16:27   ` Christoph Lameter
2004-12-17 16:33     ` Andi Kleen
2004-12-17 19:26       ` Christoph Lameter
2004-12-17 19:37         ` Andi Kleen
2004-12-17 22:11           ` Christoph Lameter
2004-12-18  6:50             ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Cf6EG-00015y-00@kernel.beaverton.ibm.com \
    --to=haveblue@us.ibm.com \
    --cc=ak@suse.de \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox