From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-mm@kvack.org, clameter@engr.sgi.com, apw@shadowen.org
Subject: [RFC][PATCH] vmemmap on sparsemem v2 [5/5] optimzied pfn_valid support for ia64
Date: Tue, 5 Dec 2006 22:10:34 +0900 [thread overview]
Message-ID: <20061205221034.6bed736c.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20061205214517.5ad924f6.kamezawa.hiroyu@jp.fujitsu.com>
USE_OPT_PFN_VALID support for ia64.
Because ia64 already has its own VIRTUAL_MEM_MAP handling,
This patch is simple.
When porting other archs, you have to add hook in page fault handler
and write a func like mapped_kernel_page_is_present() (ia64).
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
arch/ia64/Kconfig | 4 ++++
arch/ia64/mm/fault.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
Index: devel-2.6.19-rc6-mm2/arch/ia64/Kconfig
===================================================================
--- devel-2.6.19-rc6-mm2.orig/arch/ia64/Kconfig 2006-12-05 20:41:55.000000000 +0900
+++ devel-2.6.19-rc6-mm2/arch/ia64/Kconfig 2006-12-05 20:45:34.000000000 +0900
@@ -349,6 +349,10 @@
def_bool y
depends on ARCH_SPARSEMEM_ENABLE
+config USE_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.19-rc6-mm2/arch/ia64/mm/fault.c
===================================================================
--- devel-2.6.19-rc6-mm2.orig/arch/ia64/mm/fault.c 2006-12-05 20:41:55.000000000 +0900
+++ devel-2.6.19-rc6-mm2/arch/ia64/mm/fault.c 2006-12-05 20:45:34.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_USE_OPT_PFN_VALID)
/*
* 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)
bad_area_no_up:
#endif
if ((isr & IA64_ISR_SP)
--
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:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-12-05 13:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-05 12:45 [RFC][PATCH] vmemmap on sparsemem v2 KAMEZAWA Hiroyuki
2006-12-05 12:49 ` [RFC][PATCH] vmemmap on sparsemem v2 [1/5] generic vmemmap on sparsemem KAMEZAWA Hiroyuki
2006-12-06 18:13 ` Heiko Carstens
2006-12-06 18:17 ` Christoph Lameter
2006-12-07 0:20 ` KAMEZAWA Hiroyuki
2006-12-07 0:20 ` Christoph Lameter
2006-12-07 10:11 ` Heiko Carstens
2006-12-07 10:50 ` KAMEZAWA Hiroyuki
2006-12-07 10:06 ` Heiko Carstens
2006-12-07 10:17 ` KAMEZAWA Hiroyuki
2006-12-08 3:06 ` KAMEZAWA Hiroyuki
2006-12-05 12:53 ` [RFC][PATCH] vmemmap on sparsemem v2 [2/5] memory hotplug support KAMEZAWA Hiroyuki
2006-12-05 12:59 ` [RFC][PATCH] vmemmap on sparsemem v2 [3/5] ia64 vmemamp on sparsemem KAMEZAWA Hiroyuki
2006-12-08 1:09 ` KAMEZAWA Hiroyuki
2006-12-05 13:09 ` [RFC][PATCH] vmemmap on sparsemem v2 [4/5] optimized pfn_valid KAMEZAWA Hiroyuki
2006-12-05 13:10 ` KAMEZAWA Hiroyuki [this message]
2006-12-10 13:37 ` [RFC][PATCH] vmemmap on sparsemem v2 Andy Whitcroft
2006-12-10 15:19 ` Heiko Carstens
2006-12-11 1:09 ` KAMEZAWA Hiroyuki
2006-12-11 17:23 ` Christoph Lameter
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=20061205221034.6bed736c.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=apw@shadowen.org \
--cc=clameter@engr.sgi.com \
--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