Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212879
b: refs/heads/master
c: c71635d
h: refs/heads/master
i:
  212877: be97d77
  212875: a8155e3
  212871: 9ebe54a
  212863: b277bf5
v: v3
  • Loading branch information
Matthew McClintock authored and Kumar Gala committed Oct 14, 2010
1 parent d7d04e4 commit 0f53328
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fbdd7144ceadd578bc2a875af1dabd67e80ba0d0
refs/heads/master: c71635d288ffd3bcdfb30308f681f9af34f0fc81
1 change: 1 addition & 0 deletions trunk/arch/powerpc/include/asm/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ extern void machine_kexec_simple(struct kimage *image);
extern void crash_kexec_secondary(struct pt_regs *regs);
extern int overlaps_crashkernel(unsigned long start, unsigned long size);
extern void reserve_crashkernel(void);
extern void machine_kexec_mask_interrupts(void);

#else /* !CONFIG_KEXEC */
static inline int kexec_sr_activated(int cpu) { return 0; }
Expand Down
13 changes: 1 addition & 12 deletions trunk/arch/powerpc/kernel/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,18 +414,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
crash_kexec_wait_realmode(crashing_cpu);
#endif

for_each_irq(i) {
struct irq_desc *desc = irq_to_desc(i);

if (!desc || !desc->chip || !desc->chip->eoi)
continue;

if (desc->status & IRQ_INPROGRESS)
desc->chip->eoi(i);

if (!(desc->status & IRQ_DISABLED))
desc->chip->shutdown(i);
}
machine_kexec_mask_interrupts();

/*
* Call registered shutdown routines savely. Swap out
Expand Down
24 changes: 24 additions & 0 deletions trunk/arch/powerpc/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,34 @@
#include <linux/threads.h>
#include <linux/memblock.h>
#include <linux/of.h>
#include <linux/irq.h>

#include <asm/machdep.h>
#include <asm/prom.h>
#include <asm/sections.h>

void machine_kexec_mask_interrupts(void) {
unsigned int i;

for_each_irq(i) {
struct irq_desc *desc = irq_to_desc(i);

if (!desc || !desc->chip)
continue;

if (desc->chip->eoi &&
desc->status & IRQ_INPROGRESS)
desc->chip->eoi(i);

if (desc->chip->mask)
desc->chip->mask(i);

if (desc->chip->disable &&
!(desc->status & IRQ_DISABLED))
desc->chip->disable(i);
}
}

void machine_crash_shutdown(struct pt_regs *regs)
{
if (ppc_md.machine_crash_shutdown)
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/kernel/machine_kexec_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ void default_machine_kexec(struct kimage *image)
/* Interrupts aren't acceptable while we reboot */
local_irq_disable();

/* mask each interrupt so we are in a more sane state for the
* kexec kernel */
machine_kexec_mask_interrupts();

page_list = image->head;

/* we need both effective and real address here */
Expand Down

0 comments on commit 0f53328

Please sign in to comment.