[PATCH][2.6.20-rc1-mm1] sparsemem vmem_map optimzed pfn_valid() [2/2] for ia64

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

 



ia64 support for sparsemem vmem_map optimize pfn_valid() patch.

Because ia64 has its own virtual mem_map, we can reuse the same code.
So this patch is simple.

To support optimized pfn_valid() in other arch, you (may) have to modify fault
handler in kernel address space.

Signed-Off-By: KAMEZAWA Hiroyuki <[email protected]>

 arch/ia64/Kconfig    |    4 ++++
 arch/ia64/mm/fault.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

Index: devel-2.6.20-rc1-mm1/arch/ia64/Kconfig
===================================================================
--- devel-2.6.20-rc1-mm1.orig/arch/ia64/Kconfig	2006-12-16 14:42:57.000000000 +0900
+++ devel-2.6.20-rc1-mm1/arch/ia64/Kconfig	2006-12-16 14:43:14.000000000 +0900
@@ -353,6 +353,10 @@
 	def_bool y
 	depends on SPARSEMEM_VMEMMAP
 
+config ARCH_SPARSEMEM_VMEMMAP_OPT_PFN_VALID
+	def_bool y
+	depends on SPARSEMEM_VMEMMAP
+
 config ARCH_DISCONTIGMEM_DEFAULT
 	def_bool y if (IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB)
 	depends on ARCH_DISCONTIGMEM_ENABLE
Index: devel-2.6.20-rc1-mm1/arch/ia64/mm/fault.c
===================================================================
--- devel-2.6.20-rc1-mm1.orig/arch/ia64/mm/fault.c	2006-12-16 14:42:57.000000000 +0900
+++ devel-2.6.20-rc1-mm1/arch/ia64/mm/fault.c	2006-12-16 14:43:40.000000000 +0900
@@ -103,7 +103,7 @@
 	if (in_atomic() || !mm)
 		goto no_context;
 
-#ifdef CONFIG_VIRTUAL_MEM_MAP
+#if defined(CONFIG_VIRTUAL_MEM_MAP) || defined(CONFIG_SPARSEMEM_VMEMMAP_OPT_PFNVALID)
 	/*
 	 * If fault is in region 5 and we are in the kernel, we may already
 	 * have the mmap_sem (pfn_valid macro is called during mmap). There
@@ -211,7 +211,7 @@
 
   bad_area:
 	up_read(&mm->mmap_sem);
-#ifdef CONFIG_VIRTUAL_MEM_MAP
+#if defined(CONFIG_VIRTUAL_MEM_MAP) || defined(CONFIG_SPARSEMEM_VMEMMAP_OPT_PFNVALID)
   bad_area_no_up:
 #endif
 	if ((isr & IA64_ISR_SP)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux