diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-12-20 23:39:21 -0500 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2007-12-23 14:11:59 -0500 |
commit | 47c0bd1ae24c34e851cf0f2b02ef2a6847d7ae15 (patch) | |
tree | 86fab68618a4afa03660cc576c9e7da3e5a0b520 /include/asm-powerpc/cputable.h | |
parent | c2a7dcad9f0d92d7a96e735abb8bec7b9c621536 (diff) |
[POWERPC] Reworking machine check handling and Fix 440/440A
This adds a cputable function pointer for the CPU-side machine
check handling. The semantic is still the same as the old one,
the one in ppc_md. overrides the one in cputable, though
ultimately we'll want to change that so the CPU gets first.
This removes CONFIG_440A which was a problem for multiplatform
kernels and instead fixes up the IVOR at runtime from a setup_cpu
function. The "A" version of the machine check also tweaks the
regs->trap value to differenciate the 2 versions at the C level.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'include/asm-powerpc/cputable.h')
-rw-r--r-- | include/asm-powerpc/cputable.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 4525c784dfd0..528ef183c221 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -57,6 +57,14 @@ enum powerpc_pmc_type { | |||
57 | PPC_PMC_PA6T = 2, | 57 | PPC_PMC_PA6T = 2, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | struct pt_regs; | ||
61 | |||
62 | extern int machine_check_generic(struct pt_regs *regs); | ||
63 | extern int machine_check_4xx(struct pt_regs *regs); | ||
64 | extern int machine_check_440A(struct pt_regs *regs); | ||
65 | extern int machine_check_e500(struct pt_regs *regs); | ||
66 | extern int machine_check_e200(struct pt_regs *regs); | ||
67 | |||
60 | /* NOTE WELL: Update identify_cpu() if fields are added or removed! */ | 68 | /* NOTE WELL: Update identify_cpu() if fields are added or removed! */ |
61 | struct cpu_spec { | 69 | struct cpu_spec { |
62 | /* CPU is matched via (PVR & pvr_mask) == pvr_value */ | 70 | /* CPU is matched via (PVR & pvr_mask) == pvr_value */ |
@@ -97,6 +105,11 @@ struct cpu_spec { | |||
97 | 105 | ||
98 | /* Name of processor class, for the ELF AT_PLATFORM entry */ | 106 | /* Name of processor class, for the ELF AT_PLATFORM entry */ |
99 | char *platform; | 107 | char *platform; |
108 | |||
109 | /* Processor specific machine check handling. Return negative | ||
110 | * if the error is fatal, 1 if it was fully recovered and 0 to | ||
111 | * pass up (not CPU originated) */ | ||
112 | int (*machine_check)(struct pt_regs *regs); | ||
100 | }; | 113 | }; |
101 | 114 | ||
102 | extern struct cpu_spec *cur_cpu_spec; | 115 | extern struct cpu_spec *cur_cpu_spec; |