diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-08 05:14:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 05:14:58 -0400 |
commit | 3de352bbd86f890dd0c5e1c09a6a1b0b29e0f8ce (patch) | |
tree | d4c5eba8cd2abefd7c9f16d089393f0f5999cf63 /include | |
parent | 1b8ba39a3fad9c58532f6dad12c94d6e675be656 (diff) | |
parent | 9340e1ccdf7b9b22a2be7f51cd74e8b5e11961bf (diff) |
Merge branch 'x86/mpparse' into x86/devel
Conflicts:
arch/x86/Kconfig
arch/x86/kernel/io_apic_32.c
arch/x86/kernel/setup_64.c
arch/x86/mm/init_32.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
31 files changed, 191 insertions, 265 deletions
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index 14411c9de46f..635d764dc13e 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/numa.h> | 28 | #include <asm/numa.h> |
29 | #include <asm/processor.h> | 29 | #include <asm/processor.h> |
30 | #include <asm/mmu.h> | 30 | #include <asm/mmu.h> |
31 | #include <asm/mpspec.h> | ||
31 | 32 | ||
32 | #define COMPILER_DEPENDENT_INT64 long long | 33 | #define COMPILER_DEPENDENT_INT64 long long |
33 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | 34 | #define COMPILER_DEPENDENT_UINT64 unsigned long long |
@@ -160,9 +161,7 @@ struct bootnode; | |||
160 | #ifdef CONFIG_ACPI_NUMA | 161 | #ifdef CONFIG_ACPI_NUMA |
161 | extern int acpi_numa; | 162 | extern int acpi_numa; |
162 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); | 163 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); |
163 | #ifdef CONFIG_X86_64 | 164 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) |
164 | # define NR_NODE_MEMBLKS (MAX_NUMNODES*2) | ||
165 | #endif | ||
166 | extern void acpi_fake_nodes(const struct bootnode *fake_nodes, | 165 | extern void acpi_fake_nodes(const struct bootnode *fake_nodes, |
167 | int num_nodes); | 166 | int num_nodes); |
168 | #else | 167 | #else |
diff --git a/include/asm-x86/bios_ebda.h b/include/asm-x86/bios_ebda.h index b4a46b7be794..0033e50c13b2 100644 --- a/include/asm-x86/bios_ebda.h +++ b/include/asm-x86/bios_ebda.h | |||
@@ -14,4 +14,6 @@ static inline unsigned int get_bios_ebda(void) | |||
14 | return address; /* 0 means none */ | 14 | return address; /* 0 means none */ |
15 | } | 15 | } |
16 | 16 | ||
17 | void reserve_ebda_region(void); | ||
18 | |||
17 | #endif /* _MACH_BIOS_EBDA_H */ | 19 | #endif /* _MACH_BIOS_EBDA_H */ |
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index 3e36ba8f288b..55ae9d0c4255 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | /* setup data types */ | 12 | /* setup data types */ |
13 | #define SETUP_NONE 0 | 13 | #define SETUP_NONE 0 |
14 | #define SETUP_E820_EXT 1 | ||
14 | 15 | ||
15 | /* extensible setup data list node */ | 16 | /* extensible setup data list node */ |
16 | struct setup_data { | 17 | struct setup_data { |
@@ -107,4 +108,7 @@ struct boot_params { | |||
107 | __u8 _pad9[276]; /* 0xeec */ | 108 | __u8 _pad9[276]; /* 0xeec */ |
108 | } __attribute__((packed)); | 109 | } __attribute__((packed)); |
109 | 110 | ||
111 | void reserve_setup_data(void); | ||
112 | void parse_setup_data(void); | ||
113 | |||
110 | #endif /* _ASM_BOOTPARAM_H */ | 114 | #endif /* _ASM_BOOTPARAM_H */ |
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h index 4edf7514a750..58a86571fe0f 100644 --- a/include/asm-x86/dmi.h +++ b/include/asm-x86/dmi.h | |||
@@ -3,12 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm/io.h> | 4 | #include <asm/io.h> |
5 | 5 | ||
6 | #ifdef CONFIG_X86_32 | ||
7 | |||
8 | #define dmi_alloc alloc_bootmem | ||
9 | |||
10 | #else /* CONFIG_X86_32 */ | ||
11 | |||
12 | #define DMI_MAX_DATA 2048 | 6 | #define DMI_MAX_DATA 2048 |
13 | 7 | ||
14 | extern int dmi_alloc_index; | 8 | extern int dmi_alloc_index; |
@@ -25,8 +19,6 @@ static inline void *dmi_alloc(unsigned len) | |||
25 | return dmi_alloc_data + idx; | 19 | return dmi_alloc_data + idx; |
26 | } | 20 | } |
27 | 21 | ||
28 | #endif | ||
29 | |||
30 | /* Use early IO mappings for DMI because it's initialized early */ | 22 | /* Use early IO mappings for DMI because it's initialized early */ |
31 | #define dmi_ioremap early_ioremap | 23 | #define dmi_ioremap early_ioremap |
32 | #define dmi_iounmap early_iounmap | 24 | #define dmi_iounmap early_iounmap |
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h index 5103d0b2c46c..0e92b6a2ea00 100644 --- a/include/asm-x86/e820.h +++ b/include/asm-x86/e820.h | |||
@@ -2,6 +2,41 @@ | |||
2 | #define __ASM_E820_H | 2 | #define __ASM_E820_H |
3 | #define E820MAP 0x2d0 /* our map */ | 3 | #define E820MAP 0x2d0 /* our map */ |
4 | #define E820MAX 128 /* number of entries in E820MAP */ | 4 | #define E820MAX 128 /* number of entries in E820MAP */ |
5 | |||
6 | /* | ||
7 | * Legacy E820 BIOS limits us to 128 (E820MAX) nodes due to the | ||
8 | * constrained space in the zeropage. If we have more nodes than | ||
9 | * that, and if we've booted off EFI firmware, then the EFI tables | ||
10 | * passed us from the EFI firmware can list more nodes. Size our | ||
11 | * internal memory map tables to have room for these additional | ||
12 | * nodes, based on up to three entries per node for which the | ||
13 | * kernel was built: MAX_NUMNODES == (1 << CONFIG_NODES_SHIFT), | ||
14 | * plus E820MAX, allowing space for the possible duplicate E820 | ||
15 | * entries that might need room in the same arrays, prior to the | ||
16 | * call to sanitize_e820_map() to remove duplicates. The allowance | ||
17 | * of three memory map entries per node is "enough" entries for | ||
18 | * the initial hardware platform motivating this mechanism to make | ||
19 | * use of additional EFI map entries. Future platforms may want | ||
20 | * to allow more than three entries per node or otherwise refine | ||
21 | * this size. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Odd: 'make headers_check' complains about numa.h if I try | ||
26 | * to collapse the next two #ifdef lines to a single line: | ||
27 | * #if defined(__KERNEL__) && defined(CONFIG_EFI) | ||
28 | */ | ||
29 | #ifdef __KERNEL__ | ||
30 | #ifdef CONFIG_EFI | ||
31 | #include <linux/numa.h> | ||
32 | #define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES) | ||
33 | #else /* ! CONFIG_EFI */ | ||
34 | #define E820_X_MAX E820MAX | ||
35 | #endif | ||
36 | #else /* ! __KERNEL__ */ | ||
37 | #define E820_X_MAX E820MAX | ||
38 | #endif | ||
39 | |||
5 | #define E820NR 0x1e8 /* # entries in E820MAP */ | 40 | #define E820NR 0x1e8 /* # entries in E820MAP */ |
6 | 41 | ||
7 | #define E820_RAM 1 | 42 | #define E820_RAM 1 |
@@ -18,8 +53,59 @@ struct e820entry { | |||
18 | 53 | ||
19 | struct e820map { | 54 | struct e820map { |
20 | __u32 nr_map; | 55 | __u32 nr_map; |
21 | struct e820entry map[E820MAX]; | 56 | struct e820entry map[E820_X_MAX]; |
22 | }; | 57 | }; |
58 | |||
59 | extern struct e820map e820; | ||
60 | |||
61 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); | ||
62 | extern int e820_all_mapped(u64 start, u64 end, unsigned type); | ||
63 | extern void e820_add_region(u64 start, u64 size, int type); | ||
64 | extern void e820_print_map(char *who); | ||
65 | extern int | ||
66 | sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map); | ||
67 | extern int copy_e820_map(struct e820entry *biosmap, int nr_map); | ||
68 | extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, | ||
69 | unsigned new_type); | ||
70 | extern void update_e820(void); | ||
71 | extern void e820_setup_gap(void); | ||
72 | struct setup_data; | ||
73 | extern void parse_e820_ext(struct setup_data *data, unsigned long pa_data); | ||
74 | |||
75 | #if defined(CONFIG_X86_64) || \ | ||
76 | (defined(CONFIG_X86_32) && defined(CONFIG_HIBERNATION)) | ||
77 | extern void e820_mark_nosave_regions(unsigned long limit_pfn); | ||
78 | #else | ||
79 | static inline void e820_mark_nosave_regions(unsigned long limit_pfn) | ||
80 | { | ||
81 | } | ||
82 | #endif | ||
83 | |||
84 | extern unsigned long end_user_pfn; | ||
85 | |||
86 | extern u64 find_e820_area(u64 start, u64 end, u64 size, u64 align); | ||
87 | extern u64 find_e820_area_size(u64 start, u64 *sizep, u64 align); | ||
88 | extern void reserve_early(u64 start, u64 end, char *name); | ||
89 | extern void free_early(u64 start, u64 end); | ||
90 | extern void early_res_to_bootmem(u64 start, u64 end); | ||
91 | extern u64 early_reserve_e820(u64 startt, u64 sizet, u64 align); | ||
92 | |||
93 | extern unsigned long e820_end_of_ram(void); | ||
94 | extern int e820_find_active_region(const struct e820entry *ei, | ||
95 | unsigned long start_pfn, | ||
96 | unsigned long last_pfn, | ||
97 | unsigned long *ei_startpfn, | ||
98 | unsigned long *ei_endpfn); | ||
99 | extern void e820_register_active_regions(int nid, unsigned long start_pfn, | ||
100 | unsigned long end_pfn); | ||
101 | extern u64 e820_hole_size(u64 start, u64 end); | ||
102 | extern void finish_e820_parsing(void); | ||
103 | extern void e820_reserve_resources(void); | ||
104 | extern void setup_memory_map(void); | ||
105 | extern char *default_machine_specific_memory_setup(void); | ||
106 | extern char *machine_specific_memory_setup(void); | ||
107 | extern char *memory_setup(void); | ||
108 | |||
23 | #endif /* __ASSEMBLY__ */ | 109 | #endif /* __ASSEMBLY__ */ |
24 | 110 | ||
25 | #define ISA_START_ADDRESS 0xa0000 | 111 | #define ISA_START_ADDRESS 0xa0000 |
@@ -30,11 +116,9 @@ struct e820map { | |||
30 | #define BIOS_END 0x00100000 | 116 | #define BIOS_END 0x00100000 |
31 | 117 | ||
32 | #ifdef __KERNEL__ | 118 | #ifdef __KERNEL__ |
33 | #ifdef CONFIG_X86_32 | 119 | #include <linux/ioport.h> |
34 | # include "e820_32.h" | 120 | |
35 | #else | 121 | #define HIGH_MEMORY (1024*1024) |
36 | # include "e820_64.h" | ||
37 | #endif | ||
38 | #endif /* __KERNEL__ */ | 122 | #endif /* __KERNEL__ */ |
39 | 123 | ||
40 | #endif /* __ASM_E820_H */ | 124 | #endif /* __ASM_E820_H */ |
diff --git a/include/asm-x86/e820_32.h b/include/asm-x86/e820_32.h deleted file mode 100644 index a9f7c6ec32bf..000000000000 --- a/include/asm-x86/e820_32.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * structures and definitions for the int 15, ax=e820 memory map | ||
3 | * scheme. | ||
4 | * | ||
5 | * In a nutshell, arch/i386/boot/setup.S populates a scratch table | ||
6 | * in the empty_zero_block that contains a list of usable address/size | ||
7 | * duples. In arch/i386/kernel/setup.c, this information is | ||
8 | * transferred into the e820map, and in arch/i386/mm/init.c, that | ||
9 | * new information is used to mark pages reserved or not. | ||
10 | * | ||
11 | */ | ||
12 | #ifndef __E820_HEADER | ||
13 | #define __E820_HEADER | ||
14 | |||
15 | #include <linux/ioport.h> | ||
16 | |||
17 | #define HIGH_MEMORY (1024*1024) | ||
18 | |||
19 | #ifndef __ASSEMBLY__ | ||
20 | |||
21 | extern struct e820map e820; | ||
22 | extern void update_e820(void); | ||
23 | |||
24 | extern int e820_all_mapped(unsigned long start, unsigned long end, | ||
25 | unsigned type); | ||
26 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); | ||
27 | extern void propagate_e820_map(void); | ||
28 | extern void register_bootmem_low_pages(unsigned long max_low_pfn); | ||
29 | extern void add_memory_region(unsigned long long start, | ||
30 | unsigned long long size, int type); | ||
31 | extern void update_memory_range(u64 start, u64 size, unsigned old_type, | ||
32 | unsigned new_type); | ||
33 | extern void e820_register_memory(void); | ||
34 | extern void limit_regions(unsigned long long size); | ||
35 | extern void print_memory_map(char *who); | ||
36 | extern void init_iomem_resources(struct resource *code_resource, | ||
37 | struct resource *data_resource, | ||
38 | struct resource *bss_resource); | ||
39 | |||
40 | #if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION) | ||
41 | extern void e820_mark_nosave_regions(void); | ||
42 | #else | ||
43 | static inline void e820_mark_nosave_regions(void) | ||
44 | { | ||
45 | } | ||
46 | #endif | ||
47 | |||
48 | |||
49 | #endif/*!__ASSEMBLY__*/ | ||
50 | #endif/*__E820_HEADER*/ | ||
diff --git a/include/asm-x86/e820_64.h b/include/asm-x86/e820_64.h deleted file mode 100644 index 71c4d685d30d..000000000000 --- a/include/asm-x86/e820_64.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * structures and definitions for the int 15, ax=e820 memory map | ||
3 | * scheme. | ||
4 | * | ||
5 | * In a nutshell, setup.S populates a scratch table in the | ||
6 | * empty_zero_block that contains a list of usable address/size | ||
7 | * duples. setup.c, this information is transferred into the e820map, | ||
8 | * and in init.c/numa.c, that new information is used to mark pages | ||
9 | * reserved or not. | ||
10 | */ | ||
11 | #ifndef __E820_HEADER | ||
12 | #define __E820_HEADER | ||
13 | |||
14 | #include <linux/ioport.h> | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | extern unsigned long find_e820_area(unsigned long start, unsigned long end, | ||
18 | unsigned long size, unsigned long align); | ||
19 | extern unsigned long find_e820_area_size(unsigned long start, | ||
20 | unsigned long *sizep, | ||
21 | unsigned long align); | ||
22 | extern void add_memory_region(unsigned long start, unsigned long size, | ||
23 | int type); | ||
24 | extern void update_memory_range(u64 start, u64 size, unsigned old_type, | ||
25 | unsigned new_type); | ||
26 | extern void setup_memory_region(void); | ||
27 | extern void contig_e820_setup(void); | ||
28 | extern unsigned long e820_end_of_ram(void); | ||
29 | extern void e820_reserve_resources(void); | ||
30 | extern void e820_mark_nosave_regions(void); | ||
31 | extern int e820_any_mapped(unsigned long start, unsigned long end, | ||
32 | unsigned type); | ||
33 | extern int e820_all_mapped(unsigned long start, unsigned long end, | ||
34 | unsigned type); | ||
35 | extern int e820_any_non_reserved(unsigned long start, unsigned long end); | ||
36 | extern int is_memory_any_valid(unsigned long start, unsigned long end); | ||
37 | extern int e820_all_non_reserved(unsigned long start, unsigned long end); | ||
38 | extern int is_memory_all_valid(unsigned long start, unsigned long end); | ||
39 | extern unsigned long e820_hole_size(unsigned long start, unsigned long end); | ||
40 | |||
41 | extern void e820_setup_gap(void); | ||
42 | extern void e820_register_active_regions(int nid, unsigned long start_pfn, | ||
43 | unsigned long end_pfn); | ||
44 | |||
45 | extern void finish_e820_parsing(void); | ||
46 | |||
47 | extern struct e820map e820; | ||
48 | extern void update_e820(void); | ||
49 | |||
50 | extern void reserve_early(unsigned long start, unsigned long end, char *name); | ||
51 | extern void free_early(unsigned long start, unsigned long end); | ||
52 | extern void early_res_to_bootmem(unsigned long start, unsigned long end); | ||
53 | |||
54 | #endif/*!__ASSEMBLY__*/ | ||
55 | |||
56 | #endif/*__E820_HEADER*/ | ||
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h index d53004b855cc..7ed2bd7a7f51 100644 --- a/include/asm-x86/efi.h +++ b/include/asm-x86/efi.h | |||
@@ -90,7 +90,7 @@ extern void *efi_ioremap(unsigned long addr, unsigned long size); | |||
90 | 90 | ||
91 | #endif /* CONFIG_X86_32 */ | 91 | #endif /* CONFIG_X86_32 */ |
92 | 92 | ||
93 | extern void efi_reserve_bootmem(void); | 93 | extern void efi_reserve_early(void); |
94 | extern void efi_call_phys_prelog(void); | 94 | extern void efi_call_phys_prelog(void); |
95 | extern void efi_call_phys_epilog(void); | 95 | extern void efi_call_phys_epilog(void); |
96 | 96 | ||
diff --git a/include/asm-x86/highmem.h b/include/asm-x86/highmem.h index e153f3b44774..4514b16cc723 100644 --- a/include/asm-x86/highmem.h +++ b/include/asm-x86/highmem.h | |||
@@ -74,6 +74,9 @@ struct page *kmap_atomic_to_page(void *ptr); | |||
74 | 74 | ||
75 | #define flush_cache_kmaps() do { } while (0) | 75 | #define flush_cache_kmaps() do { } while (0) |
76 | 76 | ||
77 | extern void add_highpages_with_active_regions(int nid, unsigned long start_pfn, | ||
78 | unsigned long end_pfn); | ||
79 | |||
77 | #endif /* __KERNEL__ */ | 80 | #endif /* __KERNEL__ */ |
78 | 81 | ||
79 | #endif /* _ASM_HIGHMEM_H */ | 82 | #endif /* _ASM_HIGHMEM_H */ |
diff --git a/include/asm-x86/io_apic.h b/include/asm-x86/io_apic.h index dc0f55f2b034..8b1f5684842e 100644 --- a/include/asm-x86/io_apic.h +++ b/include/asm-x86/io_apic.h | |||
@@ -121,21 +121,32 @@ extern int nr_ioapic_registers[MAX_IO_APICS]; | |||
121 | 121 | ||
122 | #define MP_MAX_IOAPIC_PIN 127 | 122 | #define MP_MAX_IOAPIC_PIN 127 |
123 | 123 | ||
124 | struct mp_ioapic_routing { | 124 | struct mp_config_ioapic { |
125 | int apic_id; | 125 | unsigned long mp_apicaddr; |
126 | int gsi_base; | 126 | unsigned int mp_apicid; |
127 | int gsi_end; | 127 | unsigned char mp_type; |
128 | DECLARE_BITMAP(pin_programmed, MP_MAX_IOAPIC_PIN + 1); | 128 | unsigned char mp_apicver; |
129 | unsigned char mp_flags; | ||
130 | }; | ||
131 | |||
132 | struct mp_config_intsrc { | ||
133 | unsigned int mp_dstapic; | ||
134 | unsigned char mp_type; | ||
135 | unsigned char mp_irqtype; | ||
136 | unsigned short mp_irqflag; | ||
137 | unsigned char mp_srcbus; | ||
138 | unsigned char mp_srcbusirq; | ||
139 | unsigned char mp_dstirq; | ||
129 | }; | 140 | }; |
130 | 141 | ||
131 | /* I/O APIC entries */ | 142 | /* I/O APIC entries */ |
132 | extern struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS]; | 143 | extern struct mp_config_ioapic mp_ioapics[MAX_IO_APICS]; |
133 | 144 | ||
134 | /* # of MP IRQ source entries */ | 145 | /* # of MP IRQ source entries */ |
135 | extern int mp_irq_entries; | 146 | extern int mp_irq_entries; |
136 | 147 | ||
137 | /* MP IRQ source entries */ | 148 | /* MP IRQ source entries */ |
138 | extern struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; | 149 | extern struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; |
139 | 150 | ||
140 | /* non-0 if default (table-less) MP configuration */ | 151 | /* non-0 if default (table-less) MP configuration */ |
141 | extern int mpc_default_type; | 152 | extern int mpc_default_type; |
diff --git a/include/asm-x86/ipi.h b/include/asm-x86/ipi.h index ecc80f341f37..196d63c28aa4 100644 --- a/include/asm-x86/ipi.h +++ b/include/asm-x86/ipi.h | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <asm/hw_irq.h> | 21 | #include <asm/hw_irq.h> |
22 | #include <asm/apic.h> | 22 | #include <asm/apic.h> |
23 | #include <asm/smp.h> | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * the following functions deal with sending IPIs between CPUs. | 26 | * the following functions deal with sending IPIs between CPUs. |
diff --git a/include/asm-x86/mach-bigsmp/mach_mpspec.h b/include/asm-x86/mach-bigsmp/mach_mpspec.h deleted file mode 100644 index 6b5dadcf1d0e..000000000000 --- a/include/asm-x86/mach-bigsmp/mach_mpspec.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_MPSPEC_H | ||
2 | #define __ASM_MACH_MPSPEC_H | ||
3 | |||
4 | #define MAX_IRQ_SOURCES 256 | ||
5 | |||
6 | #define MAX_MP_BUSSES 32 | ||
7 | |||
8 | #endif /* __ASM_MACH_MPSPEC_H */ | ||
diff --git a/include/asm-x86/mach-es7000/mach_mpspec.h b/include/asm-x86/mach-es7000/mach_mpspec.h deleted file mode 100644 index b1f5039d4506..000000000000 --- a/include/asm-x86/mach-es7000/mach_mpspec.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_MPSPEC_H | ||
2 | #define __ASM_MACH_MPSPEC_H | ||
3 | |||
4 | #define MAX_IRQ_SOURCES 256 | ||
5 | |||
6 | #define MAX_MP_BUSSES 256 | ||
7 | |||
8 | #endif /* __ASM_MACH_MPSPEC_H */ | ||
diff --git a/include/asm-x86/mach-generic/mach_mpparse.h b/include/asm-x86/mach-generic/mach_mpparse.h index 0d0b5ba2e9d1..586cadbf3787 100644 --- a/include/asm-x86/mach-generic/mach_mpparse.h +++ b/include/asm-x86/mach-generic/mach_mpparse.h | |||
@@ -1,7 +1,10 @@ | |||
1 | #ifndef _MACH_MPPARSE_H | 1 | #ifndef _MACH_MPPARSE_H |
2 | #define _MACH_MPPARSE_H 1 | 2 | #define _MACH_MPPARSE_H 1 |
3 | 3 | ||
4 | int mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid); | 4 | |
5 | int acpi_madt_oem_check(char *oem_id, char *oem_table_id); | 5 | extern int mps_oem_check(struct mp_config_table *mpc, char *oem, |
6 | char *productid); | ||
7 | |||
8 | extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id); | ||
6 | 9 | ||
7 | #endif | 10 | #endif |
diff --git a/include/asm-x86/mach-numaq/mach_apic.h b/include/asm-x86/mach-numaq/mach_apic.h index 75a56e5afbe7..d802465e026a 100644 --- a/include/asm-x86/mach-numaq/mach_apic.h +++ b/include/asm-x86/mach-numaq/mach_apic.h | |||
@@ -20,8 +20,14 @@ static inline cpumask_t target_cpus(void) | |||
20 | #define INT_DELIVERY_MODE dest_LowestPrio | 20 | #define INT_DELIVERY_MODE dest_LowestPrio |
21 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ | 21 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ |
22 | 22 | ||
23 | #define check_apicid_used(bitmap, apicid) physid_isset(apicid, bitmap) | 23 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) |
24 | #define check_apicid_present(bit) physid_isset(bit, phys_cpu_present_map) | 24 | { |
25 | return physid_isset(apicid, bitmap); | ||
26 | } | ||
27 | static inline unsigned long check_apicid_present(int bit) | ||
28 | { | ||
29 | return physid_isset(bit, phys_cpu_present_map); | ||
30 | } | ||
25 | #define apicid_cluster(apicid) (apicid & 0xF0) | 31 | #define apicid_cluster(apicid) (apicid & 0xF0) |
26 | 32 | ||
27 | static inline int apic_id_registered(void) | 33 | static inline int apic_id_registered(void) |
@@ -77,11 +83,6 @@ static inline int cpu_present_to_apicid(int mps_cpu) | |||
77 | return BAD_APICID; | 83 | return BAD_APICID; |
78 | } | 84 | } |
79 | 85 | ||
80 | static inline int generate_logical_apicid(int quad, int phys_apicid) | ||
81 | { | ||
82 | return (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1); | ||
83 | } | ||
84 | |||
85 | static inline int apicid_to_node(int logical_apicid) | 86 | static inline int apicid_to_node(int logical_apicid) |
86 | { | 87 | { |
87 | return logical_apicid >> 4; | 88 | return logical_apicid >> 4; |
@@ -95,30 +96,6 @@ static inline physid_mask_t apicid_to_cpu_present(int logical_apicid) | |||
95 | return physid_mask_of_physid(cpu + 4*node); | 96 | return physid_mask_of_physid(cpu + 4*node); |
96 | } | 97 | } |
97 | 98 | ||
98 | struct mpc_config_translation { | ||
99 | unsigned char mpc_type; | ||
100 | unsigned char trans_len; | ||
101 | unsigned char trans_type; | ||
102 | unsigned char trans_quad; | ||
103 | unsigned char trans_global; | ||
104 | unsigned char trans_local; | ||
105 | unsigned short trans_reserved; | ||
106 | }; | ||
107 | |||
108 | static inline int mpc_apic_id(struct mpc_config_processor *m, | ||
109 | struct mpc_config_translation *translation_record) | ||
110 | { | ||
111 | int quad = translation_record->trans_quad; | ||
112 | int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); | ||
113 | |||
114 | printk("Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", | ||
115 | m->mpc_apicid, | ||
116 | (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, | ||
117 | (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, | ||
118 | m->mpc_apicver, quad, logical_apicid); | ||
119 | return logical_apicid; | ||
120 | } | ||
121 | |||
122 | extern void *xquad_portio; | 99 | extern void *xquad_portio; |
123 | 100 | ||
124 | static inline void setup_portio_remap(void) | 101 | static inline void setup_portio_remap(void) |
diff --git a/include/asm-x86/mach-numaq/mach_mpparse.h b/include/asm-x86/mach-numaq/mach_mpparse.h index 459b12401187..626aef6b155f 100644 --- a/include/asm-x86/mach-numaq/mach_mpparse.h +++ b/include/asm-x86/mach-numaq/mach_mpparse.h | |||
@@ -1,14 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef __ASM_MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define __ASM_MACH_MPPARSE_H |
3 | 3 | ||
4 | extern void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | 4 | extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, |
5 | struct mpc_config_translation *translation); | 5 | char *productid); |
6 | extern void mpc_oem_pci_bus(struct mpc_config_bus *m, | ||
7 | struct mpc_config_translation *translation); | ||
8 | |||
9 | /* Hook from generic ACPI tables.c */ | ||
10 | static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
11 | { | ||
12 | } | ||
13 | 6 | ||
14 | #endif /* __ASM_MACH_MPPARSE_H */ | 7 | #endif /* __ASM_MACH_MPPARSE_H */ |
diff --git a/include/asm-x86/mach-numaq/mach_mpspec.h b/include/asm-x86/mach-numaq/mach_mpspec.h deleted file mode 100644 index dffb09856f8f..000000000000 --- a/include/asm-x86/mach-numaq/mach_mpspec.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_MPSPEC_H | ||
2 | #define __ASM_MACH_MPSPEC_H | ||
3 | |||
4 | #define MAX_IRQ_SOURCES 512 | ||
5 | |||
6 | #define MAX_MP_BUSSES 32 | ||
7 | |||
8 | #endif /* __ASM_MACH_MPSPEC_H */ | ||
diff --git a/include/asm-x86/mach-summit/mach_mpspec.h b/include/asm-x86/mach-summit/mach_mpspec.h deleted file mode 100644 index bd765523511a..000000000000 --- a/include/asm-x86/mach-summit/mach_mpspec.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_MPSPEC_H | ||
2 | #define __ASM_MACH_MPSPEC_H | ||
3 | |||
4 | #define MAX_IRQ_SOURCES 256 | ||
5 | |||
6 | /* Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. */ | ||
7 | #define MAX_MP_BUSSES 260 | ||
8 | |||
9 | #endif /* __ASM_MACH_MPSPEC_H */ | ||
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 | ||
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h index 57a991b9c053..6ec1a5453b3e 100644 --- a/include/asm-x86/mpspec.h +++ b/include/asm-x86/mpspec.h | |||
@@ -13,6 +13,12 @@ extern int apic_version[MAX_APICS]; | |||
13 | extern u8 apicid_2_node[]; | 13 | extern u8 apicid_2_node[]; |
14 | extern int pic_mode; | 14 | extern int pic_mode; |
15 | 15 | ||
16 | #ifdef CONFIG_X86_NUMAQ | ||
17 | extern int mp_bus_id_to_node[MAX_MP_BUSSES]; | ||
18 | extern int mp_bus_id_to_local[MAX_MP_BUSSES]; | ||
19 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | ||
20 | #endif | ||
21 | |||
16 | #define MAX_APICID 256 | 22 | #define MAX_APICID 256 |
17 | 23 | ||
18 | #else | 24 | #else |
@@ -21,26 +27,30 @@ extern int pic_mode; | |||
21 | /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ | 27 | /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ |
22 | #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) | 28 | #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) |
23 | 29 | ||
30 | #endif | ||
31 | |||
24 | extern void early_find_smp_config(void); | 32 | extern void early_find_smp_config(void); |
25 | extern void early_get_smp_config(void); | 33 | extern void early_get_smp_config(void); |
26 | 34 | ||
27 | #endif | ||
28 | |||
29 | #if defined(CONFIG_MCA) || defined(CONFIG_EISA) | 35 | #if defined(CONFIG_MCA) || defined(CONFIG_EISA) |
30 | extern int mp_bus_id_to_type[MAX_MP_BUSSES]; | 36 | extern int mp_bus_id_to_type[MAX_MP_BUSSES]; |
31 | #endif | 37 | #endif |
32 | 38 | ||
33 | extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); | 39 | extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); |
34 | 40 | ||
35 | extern int mp_bus_id_to_pci_bus[MAX_MP_BUSSES]; | ||
36 | |||
37 | extern unsigned int boot_cpu_physical_apicid; | 41 | extern unsigned int boot_cpu_physical_apicid; |
42 | extern unsigned int max_physical_apicid; | ||
38 | extern int smp_found_config; | 43 | extern int smp_found_config; |
39 | extern int mpc_default_type; | 44 | extern int mpc_default_type; |
40 | extern unsigned long mp_lapic_addr; | 45 | extern unsigned long mp_lapic_addr; |
41 | 46 | ||
42 | extern void find_smp_config(void); | 47 | extern void find_smp_config(void); |
43 | extern void get_smp_config(void); | 48 | extern void get_smp_config(void); |
49 | #ifdef CONFIG_X86_MPPARSE | ||
50 | extern void early_reserve_e820_mpc_new(void); | ||
51 | #else | ||
52 | static inline void early_reserve_e820_mpc_new(void) { } | ||
53 | #endif | ||
44 | 54 | ||
45 | void __cpuinit generic_processor_info(int apicid, int version); | 55 | void __cpuinit generic_processor_info(int apicid, int version); |
46 | #ifdef CONFIG_ACPI | 56 | #ifdef CONFIG_ACPI |
@@ -49,6 +59,17 @@ extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, | |||
49 | u32 gsi); | 59 | u32 gsi); |
50 | extern void mp_config_acpi_legacy_irqs(void); | 60 | extern void mp_config_acpi_legacy_irqs(void); |
51 | extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low); | 61 | extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low); |
62 | #ifdef CONFIG_X86_IO_APIC | ||
63 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | ||
64 | u32 gsi, int triggering, int polarity); | ||
65 | #else | ||
66 | static inline int | ||
67 | mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | ||
68 | u32 gsi, int triggering, int polarity) | ||
69 | { | ||
70 | return 0; | ||
71 | } | ||
72 | #endif | ||
52 | #endif /* CONFIG_ACPI */ | 73 | #endif /* CONFIG_ACPI */ |
53 | 74 | ||
54 | #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS) | 75 | #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS) |
diff --git a/include/asm-x86/numa_32.h b/include/asm-x86/numa_32.h index 03d0f7a9bf02..a02674f64869 100644 --- a/include/asm-x86/numa_32.h +++ b/include/asm-x86/numa_32.h | |||
@@ -5,7 +5,7 @@ extern int pxm_to_nid(int pxm); | |||
5 | 5 | ||
6 | #ifdef CONFIG_NUMA | 6 | #ifdef CONFIG_NUMA |
7 | extern void __init remap_numa_kva(void); | 7 | extern void __init remap_numa_kva(void); |
8 | extern void set_highmem_pages_init(int); | 8 | extern void set_highmem_pages_init(void); |
9 | #else | 9 | #else |
10 | static inline void remap_numa_kva(void) | 10 | static inline void remap_numa_kva(void) |
11 | { | 11 | { |
diff --git a/include/asm-x86/numaq.h b/include/asm-x86/numaq.h index 94b86c31239a..ef068d2465d6 100644 --- a/include/asm-x86/numaq.h +++ b/include/asm-x86/numaq.h | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #ifdef CONFIG_X86_NUMAQ | 29 | #ifdef CONFIG_X86_NUMAQ |
30 | 30 | ||
31 | extern int found_numaq; | ||
31 | extern int get_memcfg_numaq(void); | 32 | extern int get_memcfg_numaq(void); |
32 | 33 | ||
33 | /* | 34 | /* |
@@ -156,9 +157,10 @@ struct sys_cfg_data { | |||
156 | struct eachquadmem eq[MAX_NUMNODES]; /* indexed by quad id */ | 157 | struct eachquadmem eq[MAX_NUMNODES]; /* indexed by quad id */ |
157 | }; | 158 | }; |
158 | 159 | ||
159 | static inline unsigned long *get_zholes_size(int nid) | 160 | #else |
161 | static inline int get_memcfg_numaq(void) | ||
160 | { | 162 | { |
161 | return NULL; | 163 | return 0; |
162 | } | 164 | } |
163 | #endif /* CONFIG_X86_NUMAQ */ | 165 | #endif /* CONFIG_X86_NUMAQ */ |
164 | #endif /* NUMAQ_H */ | 166 | #endif /* NUMAQ_H */ |
diff --git a/include/asm-x86/proto.h b/include/asm-x86/proto.h index 6c8b41b03f6d..3dd458c385c0 100644 --- a/include/asm-x86/proto.h +++ b/include/asm-x86/proto.h | |||
@@ -14,8 +14,6 @@ extern void ia32_syscall(void); | |||
14 | extern void ia32_cstar_target(void); | 14 | extern void ia32_cstar_target(void); |
15 | extern void ia32_sysenter_target(void); | 15 | extern void ia32_sysenter_target(void); |
16 | 16 | ||
17 | extern void reserve_bootmem_generic(unsigned long phys, unsigned len); | ||
18 | |||
19 | extern void syscall32_cpu_init(void); | 17 | extern void syscall32_cpu_init(void); |
20 | 18 | ||
21 | extern void check_efer(void); | 19 | extern void check_efer(void); |
diff --git a/include/asm-x86/setup.h b/include/asm-x86/setup.h index fa6763af8d26..e14b6e73d266 100644 --- a/include/asm-x86/setup.h +++ b/include/asm-x86/setup.h | |||
@@ -8,7 +8,6 @@ | |||
8 | /* Interrupt control for vSMPowered x86_64 systems */ | 8 | /* Interrupt control for vSMPowered x86_64 systems */ |
9 | void vsmp_init(void); | 9 | void vsmp_init(void); |
10 | 10 | ||
11 | char *machine_specific_memory_setup(void); | ||
12 | #ifndef CONFIG_PARAVIRT | 11 | #ifndef CONFIG_PARAVIRT |
13 | #define paravirt_post_allocator_init() do {} while (0) | 12 | #define paravirt_post_allocator_init() do {} while (0) |
14 | #endif | 13 | #endif |
@@ -43,27 +42,19 @@ char *machine_specific_memory_setup(void); | |||
43 | */ | 42 | */ |
44 | extern struct boot_params boot_params; | 43 | extern struct boot_params boot_params; |
45 | 44 | ||
46 | #ifdef __i386__ | ||
47 | /* | 45 | /* |
48 | * Do NOT EVER look at the BIOS memory size location. | 46 | * Do NOT EVER look at the BIOS memory size location. |
49 | * It does not work on many machines. | 47 | * It does not work on many machines. |
50 | */ | 48 | */ |
51 | #define LOWMEMSIZE() (0x9f000) | 49 | #define LOWMEMSIZE() (0x9f000) |
52 | 50 | ||
53 | struct e820entry; | 51 | #ifdef __i386__ |
54 | |||
55 | char * __init machine_specific_memory_setup(void); | ||
56 | char *memory_setup(void); | ||
57 | 52 | ||
58 | int __init copy_e820_map(struct e820entry *biosmap, int nr_map); | 53 | void __init i386_start_kernel(void); |
59 | int __init sanitize_e820_map(struct e820entry *biosmap, char *pnr_map); | ||
60 | void __init add_memory_region(unsigned long long start, | ||
61 | unsigned long long size, int type); | ||
62 | 54 | ||
55 | extern unsigned long init_pg_tables_start; | ||
63 | extern unsigned long init_pg_tables_end; | 56 | extern unsigned long init_pg_tables_end; |
64 | 57 | ||
65 | |||
66 | |||
67 | #endif /* __i386__ */ | 58 | #endif /* __i386__ */ |
68 | #endif /* _SETUP */ | 59 | #endif /* _SETUP */ |
69 | #endif /* __ASSEMBLY__ */ | 60 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index 1ebaa5cd3112..514e52b95cef 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -201,7 +201,6 @@ extern void cpu_exit_clear(void); | |||
201 | extern void cpu_uninit(void); | 201 | extern void cpu_uninit(void); |
202 | #endif | 202 | #endif |
203 | 203 | ||
204 | extern void smp_alloc_memory(void); | ||
205 | extern void lock_ipi_call_lock(void); | 204 | extern void lock_ipi_call_lock(void); |
206 | extern void unlock_ipi_call_lock(void); | 205 | extern void unlock_ipi_call_lock(void); |
207 | #endif /* __ASSEMBLY__ */ | 206 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-x86/srat.h b/include/asm-x86/srat.h index f4bba131d068..456fe0b5a921 100644 --- a/include/asm-x86/srat.h +++ b/include/asm-x86/srat.h | |||
@@ -27,11 +27,13 @@ | |||
27 | #ifndef _ASM_SRAT_H_ | 27 | #ifndef _ASM_SRAT_H_ |
28 | #define _ASM_SRAT_H_ | 28 | #define _ASM_SRAT_H_ |
29 | 29 | ||
30 | #ifndef CONFIG_ACPI_SRAT | 30 | #ifdef CONFIG_ACPI_SRAT |
31 | #error CONFIG_ACPI_SRAT not defined, and srat.h header has been included | ||
32 | #endif | ||
33 | |||
34 | extern int get_memcfg_from_srat(void); | 31 | extern int get_memcfg_from_srat(void); |
35 | extern unsigned long *get_zholes_size(int); | 32 | #else |
33 | static inline int get_memcfg_from_srat(void) | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | #endif | ||
36 | 38 | ||
37 | #endif /* _ASM_SRAT_H_ */ | 39 | #endif /* _ASM_SRAT_H_ */ |
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index 7e4c133795a1..bacfceedf1d2 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h | |||
@@ -303,7 +303,6 @@ static inline void clflush(volatile void *__p) | |||
303 | void disable_hlt(void); | 303 | void disable_hlt(void); |
304 | void enable_hlt(void); | 304 | void enable_hlt(void); |
305 | 305 | ||
306 | extern int es7000_plat; | ||
307 | void cpu_idle_wait(void); | 306 | void cpu_idle_wait(void); |
308 | 307 | ||
309 | extern unsigned long arch_align_stack(unsigned long sp); | 308 | extern unsigned long arch_align_stack(unsigned long sp); |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 686895bacd9d..a1d9b79078ea 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -84,6 +84,8 @@ extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags); | |||
84 | __alloc_bootmem_low(x, PAGE_SIZE, 0) | 84 | __alloc_bootmem_low(x, PAGE_SIZE, 0) |
85 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | 85 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ |
86 | 86 | ||
87 | extern int reserve_bootmem_generic(unsigned long addr, unsigned long size, | ||
88 | int flags); | ||
87 | extern unsigned long free_all_bootmem(void); | 89 | extern unsigned long free_all_bootmem(void); |
88 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); | 90 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); |
89 | extern void *__alloc_bootmem_node(pg_data_t *pgdat, | 91 | extern void *__alloc_bootmem_node(pg_data_t *pgdat, |
diff --git a/include/linux/efi.h b/include/linux/efi.h index a5f359a7ad0e..807373d467f7 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -287,7 +287,6 @@ efi_guid_unparse(efi_guid_t *guid, char *out) | |||
287 | extern void efi_init (void); | 287 | extern void efi_init (void); |
288 | extern void *efi_get_pal_addr (void); | 288 | extern void *efi_get_pal_addr (void); |
289 | extern void efi_map_pal_code (void); | 289 | extern void efi_map_pal_code (void); |
290 | extern void efi_map_memmap(void); | ||
291 | extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); | 290 | extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); |
292 | extern void efi_gettimeofday (struct timespec *ts); | 291 | extern void efi_gettimeofday (struct timespec *ts); |
293 | extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ | 292 | extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ |
@@ -295,14 +294,11 @@ extern u64 efi_get_iobase (void); | |||
295 | extern u32 efi_mem_type (unsigned long phys_addr); | 294 | extern u32 efi_mem_type (unsigned long phys_addr); |
296 | extern u64 efi_mem_attributes (unsigned long phys_addr); | 295 | extern u64 efi_mem_attributes (unsigned long phys_addr); |
297 | extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); | 296 | extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); |
298 | extern int efi_mem_attribute_range (unsigned long phys_addr, unsigned long size, | ||
299 | u64 attr); | ||
300 | extern int __init efi_uart_console_only (void); | 297 | extern int __init efi_uart_console_only (void); |
301 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 298 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
302 | struct resource *data_resource, struct resource *bss_resource); | 299 | struct resource *data_resource, struct resource *bss_resource); |
303 | extern unsigned long efi_get_time(void); | 300 | extern unsigned long efi_get_time(void); |
304 | extern int efi_set_rtc_mmss(unsigned long nowtime); | 301 | extern int efi_set_rtc_mmss(unsigned long nowtime); |
305 | extern int is_available_memory(efi_memory_desc_t * md); | ||
306 | extern struct efi_memory_map memmap; | 302 | extern struct efi_memory_map memmap; |
307 | 303 | ||
308 | /** | 304 | /** |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 586a943cab01..e4de460907c1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -998,8 +998,8 @@ extern void free_area_init_node(int nid, pg_data_t *pgdat, | |||
998 | extern void free_area_init_nodes(unsigned long *max_zone_pfn); | 998 | extern void free_area_init_nodes(unsigned long *max_zone_pfn); |
999 | extern void add_active_range(unsigned int nid, unsigned long start_pfn, | 999 | extern void add_active_range(unsigned int nid, unsigned long start_pfn, |
1000 | unsigned long end_pfn); | 1000 | unsigned long end_pfn); |
1001 | extern void shrink_active_range(unsigned int nid, unsigned long old_end_pfn, | 1001 | extern void remove_active_range(unsigned int nid, unsigned long start_pfn, |
1002 | unsigned long new_end_pfn); | 1002 | unsigned long end_pfn); |
1003 | extern void push_node_boundaries(unsigned int nid, unsigned long start_pfn, | 1003 | extern void push_node_boundaries(unsigned int nid, unsigned long start_pfn, |
1004 | unsigned long end_pfn); | 1004 | unsigned long end_pfn); |
1005 | extern void remove_all_active_ranges(void); | 1005 | extern void remove_all_active_ranges(void); |
@@ -1011,6 +1011,8 @@ extern unsigned long find_min_pfn_with_active_regions(void); | |||
1011 | extern unsigned long find_max_pfn_with_active_regions(void); | 1011 | extern unsigned long find_max_pfn_with_active_regions(void); |
1012 | extern void free_bootmem_with_active_regions(int nid, | 1012 | extern void free_bootmem_with_active_regions(int nid, |
1013 | unsigned long max_low_pfn); | 1013 | unsigned long max_low_pfn); |
1014 | typedef void (*work_fn_t)(unsigned long, unsigned long, void *); | ||
1015 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); | ||
1014 | extern void sparse_memory_present_with_active_regions(int nid); | 1016 | extern void sparse_memory_present_with_active_regions(int nid); |
1015 | #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID | 1017 | #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID |
1016 | extern int early_pfn_to_nid(unsigned long pfn); | 1018 | extern int early_pfn_to_nid(unsigned long pfn); |
diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h index e875905f7b12..e8c06122be36 100644 --- a/include/linux/pageblock-flags.h +++ b/include/linux/pageblock-flags.h | |||
@@ -25,13 +25,11 @@ | |||
25 | 25 | ||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | 27 | ||
28 | /* Macro to aid the definition of ranges of bits */ | ||
29 | #define PB_range(name, required_bits) \ | ||
30 | name, name ## _end = (name + required_bits) - 1 | ||
31 | |||
32 | /* Bit indices that affect a whole block of pages */ | 28 | /* Bit indices that affect a whole block of pages */ |
33 | enum pageblock_bits { | 29 | enum pageblock_bits { |
34 | PB_range(PB_migrate, 3), /* 3 bits required for migrate types */ | 30 | PB_migrate, |
31 | PB_migrate_end = PB_migrate + 3 - 1, | ||
32 | /* 3 bits required for migrate types */ | ||
35 | NR_PAGEBLOCK_BITS | 33 | NR_PAGEBLOCK_BITS |
36 | }; | 34 | }; |
37 | 35 | ||