ia64/linux-2.6.18-xen.hg

view include/asm-m32r/mmzone.h @ 452:c7ed6fe5dca0

kexec: dont initialise regions in reserve_memory()

There is no need to initialise efi_memmap_res and boot_param_res in
reserve_memory() for the initial xen domain as it is done in
machine_kexec_setup_resources() using values from the kexec hypercall.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 10:55:18 2008 +0000 (2008-02-28)
parents 831230e53067
children
line source
1 /*
2 * Written by Pat Gaughen (gone@us.ibm.com) Mar 2002
3 *
4 */
6 #ifndef _ASM_MMZONE_H_
7 #define _ASM_MMZONE_H_
9 #include <asm/smp.h>
11 #ifdef CONFIG_DISCONTIGMEM
13 extern struct pglist_data *node_data[];
14 #define NODE_DATA(nid) (node_data[nid])
16 #define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn)
17 #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
18 #define node_end_pfn(nid) \
19 ({ \
20 pg_data_t *__pgdat = NODE_DATA(nid); \
21 __pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1; \
22 })
24 #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
25 /*
26 * pfn_valid should be made as fast as possible, and the current definition
27 * is valid for machines that are NUMA, but still contiguous, which is what
28 * is currently supported. A more generalised, but slower definition would
29 * be something like this - mbligh:
30 * ( pfn_to_pgdat(pfn) && ((pfn) < node_end_pfn(pfn_to_nid(pfn))) )
31 */
32 #if 1 /* M32R_FIXME */
33 #define pfn_valid(pfn) (1)
34 #else
35 #define pfn_valid(pfn) ((pfn) < num_physpages)
36 #endif
38 /*
39 * generic node memory support, the following assumptions apply:
40 */
42 static __inline__ int pfn_to_nid(unsigned long pfn)
43 {
44 int node;
46 for (node = 0 ; node < MAX_NUMNODES ; node++)
47 if (pfn >= node_start_pfn(node) && pfn <= node_end_pfn(node))
48 break;
50 return node;
51 }
53 static __inline__ struct pglist_data *pfn_to_pgdat(unsigned long pfn)
54 {
55 return(NODE_DATA(pfn_to_nid(pfn)));
56 }
58 #endif /* CONFIG_DISCONTIGMEM */
59 #endif /* _ASM_MMZONE_H_ */