diff options
Diffstat (limited to 'arch/arm/kernel/machine_kexec.c')
-rw-r--r-- | arch/arm/kernel/machine_kexec.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 56995983eed8..dfcdb9f7c126 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/delay.h> | 7 | #include <linux/delay.h> |
8 | #include <linux/reboot.h> | 8 | #include <linux/reboot.h> |
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/irq.h> | ||
10 | #include <asm/pgtable.h> | 11 | #include <asm/pgtable.h> |
11 | #include <asm/pgalloc.h> | 12 | #include <asm/pgalloc.h> |
12 | #include <asm/mmu_context.h> | 13 | #include <asm/mmu_context.h> |
@@ -53,6 +54,29 @@ void machine_crash_nonpanic_core(void *unused) | |||
53 | cpu_relax(); | 54 | cpu_relax(); |
54 | } | 55 | } |
55 | 56 | ||
57 | static void machine_kexec_mask_interrupts(void) | ||
58 | { | ||
59 | unsigned int i; | ||
60 | struct irq_desc *desc; | ||
61 | |||
62 | for_each_irq_desc(i, desc) { | ||
63 | struct irq_chip *chip; | ||
64 | |||
65 | chip = irq_desc_get_chip(desc); | ||
66 | if (!chip) | ||
67 | continue; | ||
68 | |||
69 | if (chip->irq_eoi && irqd_irq_inprogress(&desc->irq_data)) | ||
70 | chip->irq_eoi(&desc->irq_data); | ||
71 | |||
72 | if (chip->irq_mask) | ||
73 | chip->irq_mask(&desc->irq_data); | ||
74 | |||
75 | if (chip->irq_disable && !irqd_irq_disabled(&desc->irq_data)) | ||
76 | chip->irq_disable(&desc->irq_data); | ||
77 | } | ||
78 | } | ||
79 | |||
56 | void machine_crash_shutdown(struct pt_regs *regs) | 80 | void machine_crash_shutdown(struct pt_regs *regs) |
57 | { | 81 | { |
58 | unsigned long msecs; | 82 | unsigned long msecs; |
@@ -70,6 +94,7 @@ void machine_crash_shutdown(struct pt_regs *regs) | |||
70 | printk(KERN_WARNING "Non-crashing CPUs did not react to IPI\n"); | 94 | printk(KERN_WARNING "Non-crashing CPUs did not react to IPI\n"); |
71 | 95 | ||
72 | crash_save_cpu(regs, smp_processor_id()); | 96 | crash_save_cpu(regs, smp_processor_id()); |
97 | machine_kexec_mask_interrupts(); | ||
73 | 98 | ||
74 | printk(KERN_INFO "Loading crashdump kernel...\n"); | 99 | printk(KERN_INFO "Loading crashdump kernel...\n"); |
75 | } | 100 | } |