diff options
| -rw-r--r-- | arch/powerpc/kernel/mce.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c index 15c99b649b04..b2eb4686bd8f 100644 --- a/arch/powerpc/kernel/mce.c +++ b/arch/powerpc/kernel/mce.c | |||
| @@ -73,7 +73,7 @@ void save_mce_event(struct pt_regs *regs, long handled, | |||
| 73 | uint64_t nip, uint64_t addr) | 73 | uint64_t nip, uint64_t addr) |
| 74 | { | 74 | { |
| 75 | uint64_t srr1; | 75 | uint64_t srr1; |
| 76 | int index = __this_cpu_inc_return(mce_nest_count); | 76 | int index = __this_cpu_inc_return(mce_nest_count) - 1; |
| 77 | struct machine_check_event *mce = this_cpu_ptr(&mce_event[index]); | 77 | struct machine_check_event *mce = this_cpu_ptr(&mce_event[index]); |
| 78 | 78 | ||
| 79 | /* | 79 | /* |
| @@ -184,7 +184,7 @@ void machine_check_queue_event(void) | |||
| 184 | if (!get_mce_event(&evt, MCE_EVENT_RELEASE)) | 184 | if (!get_mce_event(&evt, MCE_EVENT_RELEASE)) |
| 185 | return; | 185 | return; |
| 186 | 186 | ||
| 187 | index = __this_cpu_inc_return(mce_queue_count); | 187 | index = __this_cpu_inc_return(mce_queue_count) - 1; |
| 188 | /* If queue is full, just return for now. */ | 188 | /* If queue is full, just return for now. */ |
| 189 | if (index >= MAX_MC_EVT) { | 189 | if (index >= MAX_MC_EVT) { |
| 190 | __this_cpu_dec(mce_queue_count); | 190 | __this_cpu_dec(mce_queue_count); |
