]>
Commit | Line | Data |
---|---|---|
4d1e5b62 AF |
1 | From: Bernhard Walle <bwalle@suse.de> |
2 | Subject: [PATCH] Fix memory map for ia64/discontmem for kdump | |
3 | ||
4 | makedumpfile[1] cannot run on ia64 discontigmem kernel, because the member | |
5 | node_mem_map of struct pgdat_list has invalid value. This patch fixes it. | |
6 | ||
7 | node_start_pfn shows the start pfn of each node, and node_mem_map should | |
8 | point 'struct page' of each node's node_start_pfn. | |
9 | On my machine, node0's node_start_pfn shows 0x400 and its node_mem_map points | |
10 | 0xa0007fffbf000000. This address is the same as vmem_map, so the node_mem_map | |
11 | points 'struct page' of pfn 0, even if its node_start_pfn shows 0x400. | |
12 | ||
13 | The cause is due to the round down of min_pfn in count_node_pages() and | |
14 | node0's node_mem_map points 'struct page' of inactive pfn (0x0). | |
15 | This patch fixes it. | |
16 | ||
17 | ||
18 | makedumpfile[1]: dump filtering command | |
19 | https://sourceforge.net/projects/makedumpfile/ | |
20 | ||
21 | Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | |
22 | Acked-by: Bernhard Walle <bwalle@suse.de> | |
23 | ||
24 | --- | |
25 | arch/ia64/include/asm/meminit.h | 1 - | |
26 | arch/ia64/mm/discontig.c | 1 - | |
27 | 2 files changed, 2 deletions(-) | |
28 | ||
29 | --- a/arch/ia64/include/asm/meminit.h | |
30 | +++ b/arch/ia64/include/asm/meminit.h | |
31 | @@ -47,7 +47,6 @@ extern int reserve_elfcorehdr(unsigned l | |
32 | */ | |
33 | #define GRANULEROUNDDOWN(n) ((n) & ~(IA64_GRANULE_SIZE-1)) | |
34 | #define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1)) | |
35 | -#define ORDERROUNDDOWN(n) ((n) & ~((PAGE_SIZE<<MAX_ORDER)-1)) | |
36 | ||
37 | #ifdef CONFIG_NUMA | |
38 | extern void call_pernode_memory (unsigned long start, unsigned long len, void *func); | |
39 | --- a/arch/ia64/mm/discontig.c | |
40 | +++ b/arch/ia64/mm/discontig.c | |
41 | @@ -635,7 +635,6 @@ static __init int count_node_pages(unsig | |
42 | (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT; | |
43 | #endif | |
44 | start = GRANULEROUNDDOWN(start); | |
45 | - start = ORDERROUNDDOWN(start); | |
46 | end = GRANULEROUNDUP(end); | |
47 | mem_data[node].max_pfn = max(mem_data[node].max_pfn, | |
48 | end >> PAGE_SHIFT); |