diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 2 | ||||
-rw-r--r-- | arch/x86/Makefile | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/topology.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/nmi.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 3 | ||||
-rw-r--r-- | arch/x86/kernel/hpet.c | 18 | ||||
-rw-r--r-- | arch/x86/kernel/quirks.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/uv_time.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/xsave.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/numa_32.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/numa_64.c | 3 | ||||
-rw-r--r-- | arch/x86/mm/srat_64.c | 6 | ||||
-rw-r--r-- | arch/x86/pci/amd_bus.c | 6 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 5 | ||||
-rw-r--r-- | arch/x86/pci/i386.c | 4 | ||||
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 6 |
18 files changed, 81 insertions, 20 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c9086e6307a5..df9e885eee14 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -277,6 +277,7 @@ config SPARSE_IRQ | |||
277 | config NUMA_MIGRATE_IRQ_DESC | 277 | config NUMA_MIGRATE_IRQ_DESC |
278 | bool "Move irq desc when changing irq smp_affinity" | 278 | bool "Move irq desc when changing irq smp_affinity" |
279 | depends on SPARSE_IRQ && NUMA | 279 | depends on SPARSE_IRQ && NUMA |
280 | depends on BROKEN | ||
280 | default n | 281 | default n |
281 | ---help--- | 282 | ---help--- |
282 | This enables moving irq_desc to cpu/node that irq will use handled. | 283 | This enables moving irq_desc to cpu/node that irq will use handled. |
@@ -664,6 +665,7 @@ config MAXSMP | |||
664 | 665 | ||
665 | config NR_CPUS | 666 | config NR_CPUS |
666 | int "Maximum number of CPUs" if SMP && !MAXSMP | 667 | int "Maximum number of CPUs" if SMP && !MAXSMP |
668 | range 2 8 if SMP && X86_32 && !X86_BIGSMP | ||
667 | range 2 512 if SMP && !MAXSMP | 669 | range 2 512 if SMP && !MAXSMP |
668 | default "1" if !SMP | 670 | default "1" if !SMP |
669 | default "4096" if MAXSMP | 671 | default "4096" if MAXSMP |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f05d8c91d9e5..8c86b72afdc2 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -153,7 +153,7 @@ endif | |||
153 | 153 | ||
154 | boot := arch/x86/boot | 154 | boot := arch/x86/boot |
155 | 155 | ||
156 | BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage install | 156 | BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage |
157 | 157 | ||
158 | PHONY += bzImage $(BOOT_TARGETS) | 158 | PHONY += bzImage $(BOOT_TARGETS) |
159 | 159 | ||
@@ -171,6 +171,10 @@ bzImage: vmlinux | |||
171 | $(BOOT_TARGETS): vmlinux | 171 | $(BOOT_TARGETS): vmlinux |
172 | $(Q)$(MAKE) $(build)=$(boot) $@ | 172 | $(Q)$(MAKE) $(build)=$(boot) $@ |
173 | 173 | ||
174 | PHONY += install | ||
175 | install: | ||
176 | $(Q)$(MAKE) $(build)=$(boot) $@ | ||
177 | |||
174 | PHONY += vdso_install | 178 | PHONY += vdso_install |
175 | vdso_install: | 179 | vdso_install: |
176 | $(Q)$(MAKE) $(build)=arch/x86/vdso $@ | 180 | $(Q)$(MAKE) $(build)=arch/x86/vdso $@ |
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 892b119dba6f..f44b49abca49 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -200,7 +200,7 @@ static inline void arch_fix_phys_package_id(int num, u32 slot) | |||
200 | } | 200 | } |
201 | 201 | ||
202 | struct pci_bus; | 202 | struct pci_bus; |
203 | void set_pci_bus_resources_arch_default(struct pci_bus *b); | 203 | void x86_pci_root_bus_res_quirks(struct pci_bus *b); |
204 | 204 | ||
205 | #ifdef CONFIG_SMP | 205 | #ifdef CONFIG_SMP |
206 | #define mc_capable() (cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids) | 206 | #define mc_capable() (cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids) |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index a2789e42e162..30da617d18e4 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3670,12 +3670,14 @@ int arch_setup_hpet_msi(unsigned int irq) | |||
3670 | { | 3670 | { |
3671 | int ret; | 3671 | int ret; |
3672 | struct msi_msg msg; | 3672 | struct msi_msg msg; |
3673 | struct irq_desc *desc = irq_to_desc(irq); | ||
3673 | 3674 | ||
3674 | ret = msi_compose_msg(NULL, irq, &msg); | 3675 | ret = msi_compose_msg(NULL, irq, &msg); |
3675 | if (ret < 0) | 3676 | if (ret < 0) |
3676 | return ret; | 3677 | return ret; |
3677 | 3678 | ||
3678 | hpet_msi_write(irq, &msg); | 3679 | hpet_msi_write(irq, &msg); |
3680 | desc->status |= IRQ_MOVE_PCNTXT; | ||
3679 | set_irq_chip_and_handler_name(irq, &hpet_msi_type, handle_edge_irq, | 3681 | set_irq_chip_and_handler_name(irq, &hpet_msi_type, handle_edge_irq, |
3680 | "edge"); | 3682 | "edge"); |
3681 | 3683 | ||
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c index d6bd62407152..ce4fbfa315a1 100644 --- a/arch/x86/kernel/apic/nmi.c +++ b/arch/x86/kernel/apic/nmi.c | |||
@@ -138,7 +138,7 @@ int __init check_nmi_watchdog(void) | |||
138 | if (!prev_nmi_count) | 138 | if (!prev_nmi_count) |
139 | goto error; | 139 | goto error; |
140 | 140 | ||
141 | alloc_cpumask_var(&backtrace_mask, GFP_KERNEL); | 141 | alloc_cpumask_var(&backtrace_mask, GFP_KERNEL|__GFP_ZERO); |
142 | printk(KERN_INFO "Testing NMI watchdog ... "); | 142 | printk(KERN_INFO "Testing NMI watchdog ... "); |
143 | 143 | ||
144 | #ifdef CONFIG_SMP | 144 | #ifdef CONFIG_SMP |
@@ -414,7 +414,8 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) | |||
414 | touched = 1; | 414 | touched = 1; |
415 | } | 415 | } |
416 | 416 | ||
417 | if (cpumask_test_cpu(cpu, backtrace_mask)) { | 417 | /* We can be called before check_nmi_watchdog, hence NULL check. */ |
418 | if (backtrace_mask != NULL && cpumask_test_cpu(cpu, backtrace_mask)) { | ||
418 | static DEFINE_SPINLOCK(lock); /* Serialise the printks */ | 419 | static DEFINE_SPINLOCK(lock); /* Serialise the printks */ |
419 | 420 | ||
420 | spin_lock(&lock); | 421 | spin_lock(&lock); |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index de1a50af807b..2bda69352976 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/io.h> | ||
22 | 23 | ||
23 | #include <asm/uv/uv_mmrs.h> | 24 | #include <asm/uv/uv_mmrs.h> |
24 | #include <asm/uv/uv_hub.h> | 25 | #include <asm/uv/uv_hub.h> |
@@ -34,6 +35,17 @@ DEFINE_PER_CPU(int, x2apic_extra_bits); | |||
34 | 35 | ||
35 | static enum uv_system_type uv_system_type; | 36 | static enum uv_system_type uv_system_type; |
36 | 37 | ||
38 | static int early_get_nodeid(void) | ||
39 | { | ||
40 | union uvh_node_id_u node_id; | ||
41 | unsigned long *mmr; | ||
42 | |||
43 | mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); | ||
44 | node_id.v = *mmr; | ||
45 | early_iounmap(mmr, sizeof(*mmr)); | ||
46 | return node_id.s.node_id; | ||
47 | } | ||
48 | |||
37 | static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 49 | static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
38 | { | 50 | { |
39 | if (!strcmp(oem_id, "SGI")) { | 51 | if (!strcmp(oem_id, "SGI")) { |
@@ -42,6 +54,8 @@ static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
42 | else if (!strcmp(oem_table_id, "UVX")) | 54 | else if (!strcmp(oem_table_id, "UVX")) |
43 | uv_system_type = UV_X2APIC; | 55 | uv_system_type = UV_X2APIC; |
44 | else if (!strcmp(oem_table_id, "UVH")) { | 56 | else if (!strcmp(oem_table_id, "UVH")) { |
57 | __get_cpu_var(x2apic_extra_bits) = | ||
58 | early_get_nodeid() << (UV_APIC_PNODE_SHIFT - 1); | ||
45 | uv_system_type = UV_NON_UNIQUE_APIC; | 59 | uv_system_type = UV_NON_UNIQUE_APIC; |
46 | return 1; | 60 | return 1; |
47 | } | 61 | } |
@@ -638,6 +652,7 @@ void __init uv_system_init(void) | |||
638 | if (uv_node_to_blade[nid] >= 0) | 652 | if (uv_node_to_blade[nid] >= 0) |
639 | continue; | 653 | continue; |
640 | paddr = node_start_pfn(nid) << PAGE_SHIFT; | 654 | paddr = node_start_pfn(nid) << PAGE_SHIFT; |
655 | paddr = uv_soc_phys_ram_to_gpa(paddr); | ||
641 | pnode = (paddr >> m_val) & pnode_mask; | 656 | pnode = (paddr >> m_val) & pnode_mask; |
642 | blade = boot_pnode_to_blade(pnode); | 657 | blade = boot_pnode_to_blade(pnode); |
643 | uv_node_to_blade[nid] = blade; | 658 | uv_node_to_blade[nid] = blade; |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index a331ec38af9e..38946c6e8433 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -1410,7 +1410,10 @@ ENTRY(paranoid_exit) | |||
1410 | paranoid_swapgs: | 1410 | paranoid_swapgs: |
1411 | TRACE_IRQS_IRETQ 0 | 1411 | TRACE_IRQS_IRETQ 0 |
1412 | SWAPGS_UNSAFE_STACK | 1412 | SWAPGS_UNSAFE_STACK |
1413 | RESTORE_ALL 8 | ||
1414 | jmp irq_return | ||
1413 | paranoid_restore: | 1415 | paranoid_restore: |
1416 | TRACE_IRQS_IRETQ 0 | ||
1414 | RESTORE_ALL 8 | 1417 | RESTORE_ALL 8 |
1415 | jmp irq_return | 1418 | jmp irq_return |
1416 | paranoid_userspace: | 1419 | paranoid_userspace: |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 3f0019e0a229..81408b93f887 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -236,6 +236,10 @@ static void hpet_stop_counter(void) | |||
236 | unsigned long cfg = hpet_readl(HPET_CFG); | 236 | unsigned long cfg = hpet_readl(HPET_CFG); |
237 | cfg &= ~HPET_CFG_ENABLE; | 237 | cfg &= ~HPET_CFG_ENABLE; |
238 | hpet_writel(cfg, HPET_CFG); | 238 | hpet_writel(cfg, HPET_CFG); |
239 | } | ||
240 | |||
241 | static void hpet_reset_counter(void) | ||
242 | { | ||
239 | hpet_writel(0, HPET_COUNTER); | 243 | hpet_writel(0, HPET_COUNTER); |
240 | hpet_writel(0, HPET_COUNTER + 4); | 244 | hpet_writel(0, HPET_COUNTER + 4); |
241 | } | 245 | } |
@@ -250,6 +254,7 @@ static void hpet_start_counter(void) | |||
250 | static void hpet_restart_counter(void) | 254 | static void hpet_restart_counter(void) |
251 | { | 255 | { |
252 | hpet_stop_counter(); | 256 | hpet_stop_counter(); |
257 | hpet_reset_counter(); | ||
253 | hpet_start_counter(); | 258 | hpet_start_counter(); |
254 | } | 259 | } |
255 | 260 | ||
@@ -309,7 +314,7 @@ static int hpet_setup_msi_irq(unsigned int irq); | |||
309 | static void hpet_set_mode(enum clock_event_mode mode, | 314 | static void hpet_set_mode(enum clock_event_mode mode, |
310 | struct clock_event_device *evt, int timer) | 315 | struct clock_event_device *evt, int timer) |
311 | { | 316 | { |
312 | unsigned long cfg; | 317 | unsigned long cfg, cmp, now; |
313 | uint64_t delta; | 318 | uint64_t delta; |
314 | 319 | ||
315 | switch (mode) { | 320 | switch (mode) { |
@@ -317,12 +322,23 @@ static void hpet_set_mode(enum clock_event_mode mode, | |||
317 | hpet_stop_counter(); | 322 | hpet_stop_counter(); |
318 | delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * evt->mult; | 323 | delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * evt->mult; |
319 | delta >>= evt->shift; | 324 | delta >>= evt->shift; |
325 | now = hpet_readl(HPET_COUNTER); | ||
326 | cmp = now + (unsigned long) delta; | ||
320 | cfg = hpet_readl(HPET_Tn_CFG(timer)); | 327 | cfg = hpet_readl(HPET_Tn_CFG(timer)); |
321 | /* Make sure we use edge triggered interrupts */ | 328 | /* Make sure we use edge triggered interrupts */ |
322 | cfg &= ~HPET_TN_LEVEL; | 329 | cfg &= ~HPET_TN_LEVEL; |
323 | cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | | 330 | cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | |
324 | HPET_TN_SETVAL | HPET_TN_32BIT; | 331 | HPET_TN_SETVAL | HPET_TN_32BIT; |
325 | hpet_writel(cfg, HPET_Tn_CFG(timer)); | 332 | hpet_writel(cfg, HPET_Tn_CFG(timer)); |
333 | hpet_writel(cmp, HPET_Tn_CMP(timer)); | ||
334 | udelay(1); | ||
335 | /* | ||
336 | * HPET on AMD 81xx needs a second write (with HPET_TN_SETVAL | ||
337 | * cleared) to T0_CMP to set the period. The HPET_TN_SETVAL | ||
338 | * bit is automatically cleared after the first write. | ||
339 | * (See AMD-8111 HyperTransport I/O Hub Data Sheet, | ||
340 | * Publication # 24674) | ||
341 | */ | ||
326 | hpet_writel((unsigned long) delta, HPET_Tn_CMP(timer)); | 342 | hpet_writel((unsigned long) delta, HPET_Tn_CMP(timer)); |
327 | hpet_start_counter(); | 343 | hpet_start_counter(); |
328 | hpet_print_config(); | 344 | hpet_print_config(); |
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index e95022e4f5d5..7563b31b4f03 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -261,8 +261,6 @@ static void old_ich_force_enable_hpet_user(struct pci_dev *dev) | |||
261 | { | 261 | { |
262 | if (hpet_force_user) | 262 | if (hpet_force_user) |
263 | old_ich_force_enable_hpet(dev); | 263 | old_ich_force_enable_hpet(dev); |
264 | else | ||
265 | hpet_print_force_info(); | ||
266 | } | 264 | } |
267 | 265 | ||
268 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, | 266 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, |
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c index 2ffb6c53326e..583f11d5c480 100644 --- a/arch/x86/kernel/uv_time.c +++ b/arch/x86/kernel/uv_time.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #define RTC_NAME "sgi_rtc" | 30 | #define RTC_NAME "sgi_rtc" |
31 | 31 | ||
32 | static cycle_t uv_read_rtc(void); | 32 | static cycle_t uv_read_rtc(struct clocksource *cs); |
33 | static int uv_rtc_next_event(unsigned long, struct clock_event_device *); | 33 | static int uv_rtc_next_event(unsigned long, struct clock_event_device *); |
34 | static void uv_rtc_timer_setup(enum clock_event_mode, | 34 | static void uv_rtc_timer_setup(enum clock_event_mode, |
35 | struct clock_event_device *); | 35 | struct clock_event_device *); |
@@ -123,7 +123,7 @@ static int uv_setup_intr(int cpu, u64 expires) | |||
123 | /* Initialize comparator value */ | 123 | /* Initialize comparator value */ |
124 | uv_write_global_mmr64(pnode, UVH_INT_CMPB, expires); | 124 | uv_write_global_mmr64(pnode, UVH_INT_CMPB, expires); |
125 | 125 | ||
126 | return (expires < uv_read_rtc() && !uv_intr_pending(pnode)); | 126 | return (expires < uv_read_rtc(NULL) && !uv_intr_pending(pnode)); |
127 | } | 127 | } |
128 | 128 | ||
129 | /* | 129 | /* |
@@ -256,7 +256,7 @@ static int uv_rtc_unset_timer(int cpu) | |||
256 | 256 | ||
257 | spin_lock_irqsave(&head->lock, flags); | 257 | spin_lock_irqsave(&head->lock, flags); |
258 | 258 | ||
259 | if (head->next_cpu == bcpu && uv_read_rtc() >= *t) | 259 | if (head->next_cpu == bcpu && uv_read_rtc(NULL) >= *t) |
260 | rc = 1; | 260 | rc = 1; |
261 | 261 | ||
262 | *t = ULLONG_MAX; | 262 | *t = ULLONG_MAX; |
@@ -278,7 +278,7 @@ static int uv_rtc_unset_timer(int cpu) | |||
278 | /* | 278 | /* |
279 | * Read the RTC. | 279 | * Read the RTC. |
280 | */ | 280 | */ |
281 | static cycle_t uv_read_rtc(void) | 281 | static cycle_t uv_read_rtc(struct clocksource *cs) |
282 | { | 282 | { |
283 | return (cycle_t)uv_read_local_mmr(UVH_RTC); | 283 | return (cycle_t)uv_read_local_mmr(UVH_RTC); |
284 | } | 284 | } |
@@ -291,7 +291,7 @@ static int uv_rtc_next_event(unsigned long delta, | |||
291 | { | 291 | { |
292 | int ced_cpu = cpumask_first(ced->cpumask); | 292 | int ced_cpu = cpumask_first(ced->cpumask); |
293 | 293 | ||
294 | return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc()); | 294 | return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc(NULL)); |
295 | } | 295 | } |
296 | 296 | ||
297 | /* | 297 | /* |
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c index 0a5b04aa98f1..c5ee17e8c6d9 100644 --- a/arch/x86/kernel/xsave.c +++ b/arch/x86/kernel/xsave.c | |||
@@ -89,7 +89,7 @@ int save_i387_xstate(void __user *buf) | |||
89 | 89 | ||
90 | if (!used_math()) | 90 | if (!used_math()) |
91 | return 0; | 91 | return 0; |
92 | clear_used_math(); /* trigger finit */ | 92 | |
93 | if (task_thread_info(tsk)->status & TS_USEDFPU) { | 93 | if (task_thread_info(tsk)->status & TS_USEDFPU) { |
94 | /* | 94 | /* |
95 | * Start with clearing the user buffer. This will present a | 95 | * Start with clearing the user buffer. This will present a |
@@ -114,6 +114,8 @@ int save_i387_xstate(void __user *buf) | |||
114 | return -1; | 114 | return -1; |
115 | } | 115 | } |
116 | 116 | ||
117 | clear_used_math(); /* trigger finit */ | ||
118 | |||
117 | if (task_thread_info(tsk)->status & TS_XSAVE) { | 119 | if (task_thread_info(tsk)->status & TS_XSAVE) { |
118 | struct _fpstate __user *fx = buf; | 120 | struct _fpstate __user *fx = buf; |
119 | struct _xstate __user *x = buf; | 121 | struct _xstate __user *x = buf; |
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c index 3daefa04ace5..d2530062fe00 100644 --- a/arch/x86/mm/numa_32.c +++ b/arch/x86/mm/numa_32.c | |||
@@ -257,7 +257,7 @@ void resume_map_numa_kva(pgd_t *pgd_base) | |||
257 | } | 257 | } |
258 | #endif | 258 | #endif |
259 | 259 | ||
260 | static unsigned long calculate_numa_remap_pages(void) | 260 | static __init unsigned long calculate_numa_remap_pages(void) |
261 | { | 261 | { |
262 | int nid; | 262 | int nid; |
263 | unsigned long size, reserve_pages = 0; | 263 | unsigned long size, reserve_pages = 0; |
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index d73aaa892371..2d05a12029dc 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -188,6 +188,9 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, | |||
188 | const int pgdat_size = roundup(sizeof(pg_data_t), PAGE_SIZE); | 188 | const int pgdat_size = roundup(sizeof(pg_data_t), PAGE_SIZE); |
189 | int nid; | 189 | int nid; |
190 | 190 | ||
191 | if (!end) | ||
192 | return; | ||
193 | |||
191 | start = roundup(start, ZONE_ALIGN); | 194 | start = roundup(start, ZONE_ALIGN); |
192 | 195 | ||
193 | printk(KERN_INFO "Bootmem setup node %d %016lx-%016lx\n", nodeid, | 196 | printk(KERN_INFO "Bootmem setup node %d %016lx-%016lx\n", nodeid, |
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index c7d272b8574c..33c5fa57e43d 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -28,6 +28,7 @@ int acpi_numa __initdata; | |||
28 | static struct acpi_table_slit *acpi_slit; | 28 | static struct acpi_table_slit *acpi_slit; |
29 | 29 | ||
30 | static nodemask_t nodes_parsed __initdata; | 30 | static nodemask_t nodes_parsed __initdata; |
31 | static nodemask_t cpu_nodes_parsed __initdata; | ||
31 | static struct bootnode nodes[MAX_NUMNODES] __initdata; | 32 | static struct bootnode nodes[MAX_NUMNODES] __initdata; |
32 | static struct bootnode nodes_add[MAX_NUMNODES]; | 33 | static struct bootnode nodes_add[MAX_NUMNODES]; |
33 | static int found_add_area __initdata; | 34 | static int found_add_area __initdata; |
@@ -141,6 +142,7 @@ acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) | |||
141 | 142 | ||
142 | apic_id = pa->apic_id; | 143 | apic_id = pa->apic_id; |
143 | apicid_to_node[apic_id] = node; | 144 | apicid_to_node[apic_id] = node; |
145 | node_set(node, cpu_nodes_parsed); | ||
144 | acpi_numa = 1; | 146 | acpi_numa = 1; |
145 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", | 147 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", |
146 | pxm, apic_id, node); | 148 | pxm, apic_id, node); |
@@ -174,6 +176,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) | |||
174 | else | 176 | else |
175 | apic_id = pa->apic_id; | 177 | apic_id = pa->apic_id; |
176 | apicid_to_node[apic_id] = node; | 178 | apicid_to_node[apic_id] = node; |
179 | node_set(node, cpu_nodes_parsed); | ||
177 | acpi_numa = 1; | 180 | acpi_numa = 1; |
178 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", | 181 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", |
179 | pxm, apic_id, node); | 182 | pxm, apic_id, node); |
@@ -402,7 +405,8 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
402 | return -1; | 405 | return -1; |
403 | } | 406 | } |
404 | 407 | ||
405 | node_possible_map = nodes_parsed; | 408 | /* Account for nodes with cpus and no memory */ |
409 | nodes_or(node_possible_map, nodes_parsed, cpu_nodes_parsed); | ||
406 | 410 | ||
407 | /* Finally register nodes */ | 411 | /* Finally register nodes */ |
408 | for_each_node_mask(i, node_possible_map) | 412 | for_each_node_mask(i, node_possible_map) |
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c index 9bb09823b362..f893d6a6e803 100644 --- a/arch/x86/pci/amd_bus.c +++ b/arch/x86/pci/amd_bus.c | |||
@@ -94,12 +94,16 @@ struct pci_root_info { | |||
94 | static int pci_root_num; | 94 | static int pci_root_num; |
95 | static struct pci_root_info pci_root_info[PCI_ROOT_NR]; | 95 | static struct pci_root_info pci_root_info[PCI_ROOT_NR]; |
96 | 96 | ||
97 | void set_pci_bus_resources_arch_default(struct pci_bus *b) | 97 | void x86_pci_root_bus_res_quirks(struct pci_bus *b) |
98 | { | 98 | { |
99 | int i; | 99 | int i; |
100 | int j; | 100 | int j; |
101 | struct pci_root_info *info; | 101 | struct pci_root_info *info; |
102 | 102 | ||
103 | /* don't go for it if _CRS is used */ | ||
104 | if (pci_probe & PCI_USE__CRS) | ||
105 | return; | ||
106 | |||
103 | /* if only one root bus, don't need to anything */ | 107 | /* if only one root bus, don't need to anything */ |
104 | if (pci_root_num < 2) | 108 | if (pci_root_num < 2) |
105 | return; | 109 | return; |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 8c362b96b644..2202b6257b82 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -147,10 +147,13 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | |||
147 | * are examined. | 147 | * are examined. |
148 | */ | 148 | */ |
149 | 149 | ||
150 | void __devinit pcibios_fixup_bus(struct pci_bus *b) | 150 | void __devinit pcibios_fixup_bus(struct pci_bus *b) |
151 | { | 151 | { |
152 | struct pci_dev *dev; | 152 | struct pci_dev *dev; |
153 | 153 | ||
154 | /* root bus? */ | ||
155 | if (!b->parent) | ||
156 | x86_pci_root_bus_res_quirks(b); | ||
154 | pci_read_bridge_bases(b); | 157 | pci_read_bridge_bases(b); |
155 | list_for_each_entry(dev, &b->devices, bus_list) | 158 | list_for_each_entry(dev, &b->devices, bus_list) |
156 | pcibios_fixup_device_resources(dev); | 159 | pcibios_fixup_device_resources(dev); |
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index f1817f71e009..a85bef20a3b9 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -238,6 +238,10 @@ void __init pcibios_resource_survey(void) | |||
238 | */ | 238 | */ |
239 | fs_initcall(pcibios_assign_resources); | 239 | fs_initcall(pcibios_assign_resources); |
240 | 240 | ||
241 | void __weak x86_pci_root_bus_res_quirks(struct pci_bus *b) | ||
242 | { | ||
243 | } | ||
244 | |||
241 | /* | 245 | /* |
242 | * If we set up a device for bus mastering, we need to check the latency | 246 | * If we set up a device for bus mastering, we need to check the latency |
243 | * timer as certain crappy BIOSes forget to set it properly. | 247 | * timer as certain crappy BIOSes forget to set it properly. |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 905bb526b133..5fa10bb9604f 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -375,7 +375,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res, | |||
375 | if (!fixmem32) | 375 | if (!fixmem32) |
376 | return AE_OK; | 376 | return AE_OK; |
377 | if ((mcfg_res->start >= fixmem32->address) && | 377 | if ((mcfg_res->start >= fixmem32->address) && |
378 | (mcfg_res->end < (fixmem32->address + | 378 | (mcfg_res->end <= (fixmem32->address + |
379 | fixmem32->address_length))) { | 379 | fixmem32->address_length))) { |
380 | mcfg_res->flags = 1; | 380 | mcfg_res->flags = 1; |
381 | return AE_CTRL_TERMINATE; | 381 | return AE_CTRL_TERMINATE; |
@@ -392,7 +392,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res, | |||
392 | return AE_OK; | 392 | return AE_OK; |
393 | 393 | ||
394 | if ((mcfg_res->start >= address.minimum) && | 394 | if ((mcfg_res->start >= address.minimum) && |
395 | (mcfg_res->end < (address.minimum + address.address_length))) { | 395 | (mcfg_res->end <= (address.minimum + address.address_length))) { |
396 | mcfg_res->flags = 1; | 396 | mcfg_res->flags = 1; |
397 | return AE_CTRL_TERMINATE; | 397 | return AE_CTRL_TERMINATE; |
398 | } | 398 | } |
@@ -439,7 +439,7 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved, | |||
439 | u64 old_size = size; | 439 | u64 old_size = size; |
440 | int valid = 0; | 440 | int valid = 0; |
441 | 441 | ||
442 | while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) { | 442 | while (!is_reserved(addr, addr + size, E820_RESERVED)) { |
443 | size >>= 1; | 443 | size >>= 1; |
444 | if (size < (16UL<<20)) | 444 | if (size < (16UL<<20)) |
445 | break; | 445 | break; |