diff options
Diffstat (limited to 'arch/ppc/kernel/traps.c')
-rw-r--r-- | arch/ppc/kernel/traps.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 16adde6b429d..9dbc4d28fa28 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -49,7 +49,7 @@ extern int xmon_sstep(struct pt_regs *regs); | |||
49 | extern int xmon_iabr_match(struct pt_regs *regs); | 49 | extern int xmon_iabr_match(struct pt_regs *regs); |
50 | extern int xmon_dabr_match(struct pt_regs *regs); | 50 | extern int xmon_dabr_match(struct pt_regs *regs); |
51 | 51 | ||
52 | void (*debugger)(struct pt_regs *regs) = xmon; | 52 | int (*debugger)(struct pt_regs *regs) = xmon; |
53 | int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt; | 53 | int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt; |
54 | int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep; | 54 | int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep; |
55 | int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match; | 55 | int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match; |
@@ -57,7 +57,7 @@ int (*debugger_dabr_match)(struct pt_regs *regs) = xmon_dabr_match; | |||
57 | void (*debugger_fault_handler)(struct pt_regs *regs); | 57 | void (*debugger_fault_handler)(struct pt_regs *regs); |
58 | #else | 58 | #else |
59 | #ifdef CONFIG_KGDB | 59 | #ifdef CONFIG_KGDB |
60 | void (*debugger)(struct pt_regs *regs); | 60 | int (*debugger)(struct pt_regs *regs); |
61 | int (*debugger_bpt)(struct pt_regs *regs); | 61 | int (*debugger_bpt)(struct pt_regs *regs); |
62 | int (*debugger_sstep)(struct pt_regs *regs); | 62 | int (*debugger_sstep)(struct pt_regs *regs); |
63 | int (*debugger_iabr_match)(struct pt_regs *regs); | 63 | int (*debugger_iabr_match)(struct pt_regs *regs); |
@@ -159,7 +159,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
159 | */ | 159 | */ |
160 | static inline int check_io_access(struct pt_regs *regs) | 160 | static inline int check_io_access(struct pt_regs *regs) |
161 | { | 161 | { |
162 | #ifdef CONFIG_PPC_PMAC | 162 | #if defined CONFIG_PPC_PMAC || defined CONFIG_8xx |
163 | unsigned long msr = regs->msr; | 163 | unsigned long msr = regs->msr; |
164 | const struct exception_table_entry *entry; | 164 | const struct exception_table_entry *entry; |
165 | unsigned int *nip = (unsigned int *)regs->nip; | 165 | unsigned int *nip = (unsigned int *)regs->nip; |
@@ -178,7 +178,11 @@ static inline int check_io_access(struct pt_regs *regs) | |||
178 | nip -= 2; | 178 | nip -= 2; |
179 | else if (*nip == 0x4c00012c) /* isync */ | 179 | else if (*nip == 0x4c00012c) /* isync */ |
180 | --nip; | 180 | --nip; |
181 | if (*nip == 0x7c0004ac || (*nip >> 26) == 3) { | 181 | /* eieio from I/O string functions */ |
182 | else if ((*nip) == 0x7c0006ac || *(nip+1) == 0x7c0006ac) | ||
183 | nip += 2; | ||
184 | if (*nip == 0x7c0004ac || (*nip >> 26) == 3 || | ||
185 | (*(nip+1) >> 26) == 3) { | ||
182 | /* sync or twi */ | 186 | /* sync or twi */ |
183 | unsigned int rb; | 187 | unsigned int rb; |
184 | 188 | ||