From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Cc: linux-mm@kvack.org
Subject: [RFC] virtual memmap for sparsemem [2/2] for ia64.
Date: Thu, 19 Oct 2006 17:23:28 +0900 [thread overview]
Message-ID: <20061019172328.4bcb1551.kamezawa.hiroyu@jp.fujitsu.com> (raw)
vmemap_sparsemem support for ia64.
The same logic as CONFIG_VIRTUAL_MEMMAP is used for allocating virtual address range
for virtual memmap.
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
arch/ia64/Kconfig | 4 ++++
arch/ia64/mm/discontig.c | 5 ++++-
arch/ia64/mm/init.c | 4 +++-
include/asm-ia64/pgtable.h | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
Index: linux-2.6.19-rc2/arch/ia64/mm/discontig.c
===================================================================
--- linux-2.6.19-rc2.orig/arch/ia64/mm/discontig.c 2006-10-19 09:12:06.000000000 +0900
+++ linux-2.6.19-rc2/arch/ia64/mm/discontig.c 2006-10-19 17:04:31.000000000 +0900
@@ -685,7 +685,10 @@
unsigned long max_zone_pfns[MAX_NR_ZONES];
max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
-
+#ifdef CONFIG_VMEMMAP_SPARSEMEM
+ vmalloc_end -= NR_MEM_SECTIONS * PAGES_PER_SECTION * sizeof(struct page);
+ init_vmemmap_sparsemem(vmalloc_end);
+#endif
arch_sparse_init();
efi_memmap_walk(filter_rsvd_memory, count_node_pages);
Index: linux-2.6.19-rc2/arch/ia64/Kconfig
===================================================================
--- linux-2.6.19-rc2.orig/arch/ia64/Kconfig 2006-10-19 09:12:06.000000000 +0900
+++ linux-2.6.19-rc2/arch/ia64/Kconfig 2006-10-19 17:04:31.000000000 +0900
@@ -333,6 +333,10 @@
def_bool y
depends on ARCH_DISCONTIGMEM_ENABLE
+config ARCH_VMEMMAP_SPARSEMEM_SUPPORT
+ def_bool y
+ depends on PGTABLE_4 && ARCH_SPARSEMEM_ENABLE
+
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: linux-2.6.19-rc2/arch/ia64/mm/init.c
===================================================================
--- linux-2.6.19-rc2.orig/arch/ia64/mm/init.c 2006-10-19 09:12:06.000000000 +0900
+++ linux-2.6.19-rc2/arch/ia64/mm/init.c 2006-10-19 17:04:31.000000000 +0900
@@ -45,9 +45,11 @@
unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL;
-#ifdef CONFIG_VIRTUAL_MEM_MAP
+#if defined(CONFIG_VIRTUAL_MEM_MAP) || defined(CONFIG_VMEMMAP_SPARSEMEM)
unsigned long vmalloc_end = VMALLOC_END_INIT;
EXPORT_SYMBOL(vmalloc_end);
+#endif
+#ifdef CONFIG_VIRTUAL_MEM_MAP
struct page *vmem_map;
EXPORT_SYMBOL(vmem_map);
#endif
Index: linux-2.6.19-rc2/include/asm-ia64/pgtable.h
===================================================================
--- linux-2.6.19-rc2.orig/include/asm-ia64/pgtable.h 2006-10-19 09:12:06.000000000 +0900
+++ linux-2.6.19-rc2/include/asm-ia64/pgtable.h 2006-10-19 17:04:31.000000000 +0900
@@ -231,7 +231,7 @@
#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
#define VMALLOC_START (RGN_BASE(RGN_GATE) + 0x200000000UL)
-#ifdef CONFIG_VIRTUAL_MEM_MAP
+#if defined(CONFIG_VIRTUAL_MEM_MAP) || defined(CONFIG_VMEMMAP_SPARSEMEM)
# define VMALLOC_END_INIT (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9)))
# define VMALLOC_END vmalloc_end
extern unsigned long vmalloc_end;
--
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 reply other threads:[~2006-10-19 8:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-19 8:23 KAMEZAWA Hiroyuki [this message]
2006-10-19 15:23 ` Andy Whitcroft
2006-10-20 1:20 ` KAMEZAWA Hiroyuki
2006-10-19 16:41 ` Christoph Lameter
2006-10-20 1:35 ` KAMEZAWA Hiroyuki
2006-10-20 1:45 ` Christoph Lameter
2006-10-20 2:08 ` KAMEZAWA Hiroyuki
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=20061019172328.4bcb1551.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-ia64@vger.kernel.org \
--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