Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101697
b: refs/heads/master
c: 5acb080
h: refs/heads/master
i:
  101695: a88e8af
v: v3
  • Loading branch information
Arnd Bergmann authored and Paul Mackerras committed Jun 30, 2008
1 parent b8e9ca0 commit 5e4269e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 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: cf2076012f3efbd945ceea67704fe515f8d6171f
refs/heads/master: 5acb08070dcbabf7347ad73cb8a79a145a2a5152
22 changes: 18 additions & 4 deletions trunk/arch/powerpc/platforms/cell/ras.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <asm/reg.h>
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/kexec.h>
#include <asm/machdep.h>
#include <asm/rtas.h>
#include <asm/cell-regs.h>
Expand Down Expand Up @@ -226,6 +227,11 @@ static int cbe_ptcal_notify_reboot(struct notifier_block *nb,
return cbe_ptcal_disable();
}

static void cbe_ptcal_crash_shutdown(void)
{
cbe_ptcal_disable();
}

static struct notifier_block cbe_ptcal_reboot_notifier = {
.notifier_call = cbe_ptcal_notify_reboot
};
Expand All @@ -241,12 +247,20 @@ int __init cbe_ptcal_init(void)
return -ENODEV;

ret = register_reboot_notifier(&cbe_ptcal_reboot_notifier);
if (ret) {
printk(KERN_ERR "Can't disable PTCAL, so not enabling\n");
return ret;
}
if (ret)
goto out1;

ret = crash_shutdown_register(&cbe_ptcal_crash_shutdown);
if (ret)
goto out2;

return cbe_ptcal_enable();

out2:
unregister_reboot_notifier(&cbe_ptcal_reboot_notifier);
out1:
printk(KERN_ERR "Can't disable PTCAL, so not enabling\n");
return ret;
}

arch_initcall(cbe_ptcal_init);
Expand Down

0 comments on commit 5e4269e

Please sign in to comment.