x86, pat: Generalize the use of page flag PG_uncached
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Fri, 10 Jul 2009 16:57:37 +0000 (09:57 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 26 Aug 2009 22:41:22 +0000 (15:41 -0700)
Only IA64 was using PG_uncached as of now. We now intend to use this bit
in x86 as well, to keep track of memory type of those addresses that
have page struct for them. So, generalize the use of that bit across
ia64 and x86.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/ia64/Kconfig
arch/x86/Kconfig
include/linux/page-flags.h

index 170042b420d466829ff7baba523a7b357b43d7a5..e6246119932aad2e260d8ffd19329c30ed5d9fd1 100644 (file)
@@ -112,6 +112,10 @@ config IA64_UNCACHED_ALLOCATOR
        bool
        select GENERIC_ALLOCATOR
 
+config ARCH_USES_PG_UNCACHED
+       def_bool y
+       depends on IA64_UNCACHED_ALLOCATOR
+
 config AUDIT_ARCH
        bool
        default y
index c07f722059094567ef61ceedda182a6de01bdfae..8e15953821961cc455c6022440997ce7db4cdaf8 100644 (file)
@@ -1414,6 +1414,10 @@ config X86_PAT
 
          If unsure, say Y.
 
+config ARCH_USES_PG_UNCACHED
+       def_bool y
+       depends on X86_PAT
+
 config EFI
        bool "EFI runtime service support"
        depends on ACPI
index e2e5ce543595df658b883a227fd753f9ab2a92e0..2b87acfc5f87496f323d69b1c2a487f634331878 100644 (file)
@@ -99,7 +99,7 @@ enum pageflags {
 #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
        PG_mlocked,             /* Page is vma mlocked */
 #endif
-#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
+#ifdef CONFIG_ARCH_USES_PG_UNCACHED
        PG_uncached,            /* Page has been mapped as uncached */
 #endif
        __NR_PAGEFLAGS,
@@ -257,7 +257,7 @@ PAGEFLAG_FALSE(Mlocked)
        SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked)
 #endif
 
-#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
+#ifdef CONFIG_ARCH_USES_PG_UNCACHED
 PAGEFLAG(Uncached, uncached)
 #else
 PAGEFLAG_FALSE(Uncached)