12 #include <linux/types.h>
13 #include <linux/kernel.h>
14 #include <linux/slab.h>
16 #include <linux/reboot.h>
17 #include <linux/kexec.h>
20 #include <asm/kexec.h>
24 #include <asm/machdep.h>
31 static void dump_fir(
int cpu)
73 printk(
KERN_ERR "Unhandled Maintenance interrupt on CPU %d !\n", cpu);
89 static int cbe_machine_check_handler(
struct pt_regs *
regs)
109 static int ptcal_start_tok, ptcal_stop_tok;
111 static int __init cbe_ptcal_enable_on_node(
int nid,
int order)
117 if (is_kdump_kernel())
131 __func__, area->
nid);
142 __func__, area->
nid, addr);
146 (
unsigned int)(addr >> 32),
147 (
unsigned int)(addr & 0xffffffff))) {
153 list_add(&area->
list, &ptcal_list);
165 static int __init cbe_ptcal_enable(
void)
169 int order, found_mic = 0;
181 pr_debug(
"%s: enabling PTCAL, size = 0x%x\n", __func__, *size);
186 for_each_node_by_type(np,
"mic-tm") {
195 for_each_node_by_type(np,
"cpu") {
202 cbe_ptcal_enable_on_node(*nid, order);
206 return found_mic ? 0 : -
ENODEV;
209 static int cbe_ptcal_disable(
void)
214 pr_debug(
"%s: disabling PTCAL\n", __func__);
220 "on node %d!\n", __func__,
242 return cbe_ptcal_disable();
245 static void cbe_ptcal_crash_shutdown(
void)
251 .notifier_call = cbe_ptcal_notify_reboot
254 #ifdef CONFIG_PPC_IBM_CELL_RESETBUTTON
255 static int sysreset_hack;
257 static int __init cbe_sysreset_init(
void)
278 int cbe_sysreset_hack(
void)
291 if (in_be64(®s->
ras_esc_0) & 0x0000ffff) {
303 ptcal_start_tok =
rtas_token(
"ibm,cbe-start-ptcal");
304 ptcal_stop_tok =
rtas_token(
"ibm,cbe-stop-ptcal");
306 if (ptcal_start_tok == RTAS_UNKNOWN_SERVICE
307 || ptcal_stop_tok == RTAS_UNKNOWN_SERVICE)
318 return cbe_ptcal_enable();
337 hid0 =
mfspr(SPRN_HID0);
340 mtspr(SPRN_HID0, hid0);
347 ppc_md.machine_check_exception = cbe_machine_check_handler;