diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 16:43:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 16:43:24 -0400 |
commit | a3da5bf84a97d48cfaf66c6842470fc403da5121 (patch) | |
tree | cdf66c0cff8c61eedd60601fc9dffdd1ed39b880 /include/asm-x86/mmzone_32.h | |
parent | 3b23e665b68387f5ee7b21f7b75ceea4d9acae4a (diff) | |
parent | d59fdcf2ac501de99c3dfb452af5e254d4342886 (diff) |
Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (821 commits)
x86: make 64bit hpet_set_mapping to use ioremap too, v2
x86: get x86_phys_bits early
x86: max_low_pfn_mapped fix #4
x86: change _node_to_cpumask_ptr to return const ptr
x86: I/O APIC: remove an IRQ2-mask hack
x86: fix numaq_tsc_disable calling
x86, e820: remove end_user_pfn
x86: max_low_pfn_mapped fix, #3
x86: max_low_pfn_mapped fix, #2
x86: max_low_pfn_mapped fix, #1
x86_64: fix delayed signals
x86: remove conflicting nx6325 and nx6125 quirks
x86: Recover timer_ack lost in the merge of the NMI watchdog
x86: I/O APIC: Never configure IRQ2
x86: L-APIC: Always fully configure IRQ0
x86: L-APIC: Set IRQ0 as edge-triggered
x86: merge dwarf2 headers
x86: use AS_CFI instead of UNWIND_INFO
x86: use ignore macro instead of hash comment
x86: use matching CFI_ENDPROC
...
Diffstat (limited to 'include/asm-x86/mmzone_32.h')
-rw-r--r-- | include/asm-x86/mmzone_32.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h index cb2cad0b65a7..b2298a227567 100644 --- a/include/asm-x86/mmzone_32.h +++ b/include/asm-x86/mmzone_32.h | |||
@@ -12,11 +12,9 @@ | |||
12 | extern struct pglist_data *node_data[]; | 12 | extern struct pglist_data *node_data[]; |
13 | #define NODE_DATA(nid) (node_data[nid]) | 13 | #define NODE_DATA(nid) (node_data[nid]) |
14 | 14 | ||
15 | #ifdef CONFIG_X86_NUMAQ | 15 | #include <asm/numaq.h> |
16 | #include <asm/numaq.h> | 16 | /* summit or generic arch */ |
17 | #elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */ | 17 | #include <asm/srat.h> |
18 | #include <asm/srat.h> | ||
19 | #endif | ||
20 | 18 | ||
21 | extern int get_memcfg_numa_flat(void); | 19 | extern int get_memcfg_numa_flat(void); |
22 | /* | 20 | /* |
@@ -26,28 +24,20 @@ extern int get_memcfg_numa_flat(void); | |||
26 | */ | 24 | */ |
27 | static inline void get_memcfg_numa(void) | 25 | static inline void get_memcfg_numa(void) |
28 | { | 26 | { |
29 | #ifdef CONFIG_X86_NUMAQ | 27 | |
30 | if (get_memcfg_numaq()) | 28 | if (get_memcfg_numaq()) |
31 | return; | 29 | return; |
32 | #elif defined(CONFIG_ACPI_SRAT) | ||
33 | if (get_memcfg_from_srat()) | 30 | if (get_memcfg_from_srat()) |
34 | return; | 31 | return; |
35 | #endif | ||
36 | |||
37 | get_memcfg_numa_flat(); | 32 | get_memcfg_numa_flat(); |
38 | } | 33 | } |
39 | 34 | ||
40 | extern int early_pfn_to_nid(unsigned long pfn); | 35 | extern int early_pfn_to_nid(unsigned long pfn); |
41 | extern void numa_kva_reserve(void); | ||
42 | 36 | ||
43 | #else /* !CONFIG_NUMA */ | 37 | #else /* !CONFIG_NUMA */ |
44 | 38 | ||
45 | #define get_memcfg_numa get_memcfg_numa_flat | 39 | #define get_memcfg_numa get_memcfg_numa_flat |
46 | #define get_zholes_size(n) (0) | ||
47 | 40 | ||
48 | static inline void numa_kva_reserve(void) | ||
49 | { | ||
50 | } | ||
51 | #endif /* CONFIG_NUMA */ | 41 | #endif /* CONFIG_NUMA */ |
52 | 42 | ||
53 | #ifdef CONFIG_DISCONTIGMEM | 43 | #ifdef CONFIG_DISCONTIGMEM |
@@ -55,14 +45,14 @@ static inline void numa_kva_reserve(void) | |||
55 | /* | 45 | /* |
56 | * generic node memory support, the following assumptions apply: | 46 | * generic node memory support, the following assumptions apply: |
57 | * | 47 | * |
58 | * 1) memory comes in 256Mb contigious chunks which are either present or not | 48 | * 1) memory comes in 64Mb contigious chunks which are either present or not |
59 | * 2) we will not have more than 64Gb in total | 49 | * 2) we will not have more than 64Gb in total |
60 | * | 50 | * |
61 | * for now assume that 64Gb is max amount of RAM for whole system | 51 | * for now assume that 64Gb is max amount of RAM for whole system |
62 | * 64Gb / 4096bytes/page = 16777216 pages | 52 | * 64Gb / 4096bytes/page = 16777216 pages |
63 | */ | 53 | */ |
64 | #define MAX_NR_PAGES 16777216 | 54 | #define MAX_NR_PAGES 16777216 |
65 | #define MAX_ELEMENTS 256 | 55 | #define MAX_ELEMENTS 1024 |
66 | #define PAGES_PER_ELEMENT (MAX_NR_PAGES/MAX_ELEMENTS) | 56 | #define PAGES_PER_ELEMENT (MAX_NR_PAGES/MAX_ELEMENTS) |
67 | 57 | ||
68 | extern s8 physnode_map[]; | 58 | extern s8 physnode_map[]; |
@@ -87,9 +77,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
87 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \ | 77 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \ |
88 | }) | 78 | }) |
89 | 79 | ||
90 | #ifdef CONFIG_X86_NUMAQ /* we have contiguous memory on NUMA-Q */ | ||
91 | #define pfn_valid(pfn) ((pfn) < num_physpages) | ||
92 | #else | ||
93 | static inline int pfn_valid(int pfn) | 80 | static inline int pfn_valid(int pfn) |
94 | { | 81 | { |
95 | int nid = pfn_to_nid(pfn); | 82 | int nid = pfn_to_nid(pfn); |
@@ -98,7 +85,6 @@ static inline int pfn_valid(int pfn) | |||
98 | return (pfn < node_end_pfn(nid)); | 85 | return (pfn < node_end_pfn(nid)); |
99 | return 0; | 86 | return 0; |
100 | } | 87 | } |
101 | #endif /* CONFIG_X86_NUMAQ */ | ||
102 | 88 | ||
103 | #endif /* CONFIG_DISCONTIGMEM */ | 89 | #endif /* CONFIG_DISCONTIGMEM */ |
104 | 90 | ||