diff options
-rw-r--r-- | arch/x86/kernel/devicetree.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 13 | ||||
-rw-r--r-- | kernel/irq/manage.c | 3 |
3 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 690bc8461835..9aeb78a23de4 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/of_pci.h> | 15 | #include <linux/of_pci.h> |
16 | #include <linux/initrd.h> | ||
16 | 17 | ||
17 | #include <asm/hpet.h> | 18 | #include <asm/hpet.h> |
18 | #include <asm/irq_controller.h> | 19 | #include <asm/irq_controller.h> |
@@ -98,6 +99,16 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | |||
98 | return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); | 99 | return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); |
99 | } | 100 | } |
100 | 101 | ||
102 | #ifdef CONFIG_BLK_DEV_INITRD | ||
103 | void __init early_init_dt_setup_initrd_arch(unsigned long start, | ||
104 | unsigned long end) | ||
105 | { | ||
106 | initrd_start = (unsigned long)__va(start); | ||
107 | initrd_end = (unsigned long)__va(end); | ||
108 | initrd_below_start_ok = 1; | ||
109 | } | ||
110 | #endif | ||
111 | |||
101 | void __init add_dtb(u64 data) | 112 | void __init add_dtb(u64 data) |
102 | { | 113 | { |
103 | initial_dtb = data + offsetof(struct setup_data, data); | 114 | initial_dtb = data + offsetof(struct setup_data, data); |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 33a0c11797de..9fd3137230d4 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -285,6 +285,19 @@ notrace static void __cpuinit start_secondary(void *unused) | |||
285 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 285 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
286 | x86_platform.nmi_init(); | 286 | x86_platform.nmi_init(); |
287 | 287 | ||
288 | /* | ||
289 | * Wait until the cpu which brought this one up marked it | ||
290 | * online before enabling interrupts. If we don't do that then | ||
291 | * we can end up waking up the softirq thread before this cpu | ||
292 | * reached the active state, which makes the scheduler unhappy | ||
293 | * and schedule the softirq thread on the wrong cpu. This is | ||
294 | * only observable with forced threaded interrupts, but in | ||
295 | * theory it could also happen w/o them. It's just way harder | ||
296 | * to achieve. | ||
297 | */ | ||
298 | while (!cpumask_test_cpu(smp_processor_id(), cpu_active_mask)) | ||
299 | cpu_relax(); | ||
300 | |||
288 | /* enable local interrupts */ | 301 | /* enable local interrupts */ |
289 | local_irq_enable(); | 302 | local_irq_enable(); |
290 | 303 | ||
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index d64bafb1afd0..0a7840aeb0fb 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -491,6 +491,9 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on) | |||
491 | struct irq_desc *desc = irq_get_desc_buslock(irq, &flags); | 491 | struct irq_desc *desc = irq_get_desc_buslock(irq, &flags); |
492 | int ret = 0; | 492 | int ret = 0; |
493 | 493 | ||
494 | if (!desc) | ||
495 | return -EINVAL; | ||
496 | |||
494 | /* wakeup-capable irqs can be shared between drivers that | 497 | /* wakeup-capable irqs can be shared between drivers that |
495 | * don't need to have the same sleep mode behaviors. | 498 | * don't need to have the same sleep mode behaviors. |
496 | */ | 499 | */ |