Skip to content

Commit

Permalink
powerpc/xics: Reset the CPPR if H_EOI fails
Browse files Browse the repository at this point in the history
I have an intermittent kdump fail where the hypervisor fails an H_EOI.
As a result our CPPR is never reset to 0xff and we no longer accept
interrupts.

This patch calls icp_hv_set_cppr to reset the CPPR if H_EOI fails,
fixing the kdump fail.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Dec 8, 2011
1 parent a934904 commit 90e8f57
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions arch/powerpc/sysdev/xics/icp-hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,24 @@ static inline unsigned int icp_hv_get_xirr(unsigned char cppr)
return ret;
}

static inline void icp_hv_set_xirr(unsigned int value)
static inline void icp_hv_set_cppr(u8 value)
{
long rc = plpar_hcall_norets(H_EOI, value);
long rc = plpar_hcall_norets(H_CPPR, value);
if (rc != H_SUCCESS) {
pr_err("%s: bad return code eoi xirr=0x%x returned %ld\n",
pr_err("%s: bad return code cppr cppr=0x%x returned %ld\n",
__func__, value, rc);
WARN_ON_ONCE(1);
}
}

static inline void icp_hv_set_cppr(u8 value)
static inline void icp_hv_set_xirr(unsigned int value)
{
long rc = plpar_hcall_norets(H_CPPR, value);
long rc = plpar_hcall_norets(H_EOI, value);
if (rc != H_SUCCESS) {
pr_err("%s: bad return code cppr cppr=0x%x returned %ld\n",
pr_err("%s: bad return code eoi xirr=0x%x returned %ld\n",
__func__, value, rc);
WARN_ON_ONCE(1);
icp_hv_set_cppr(value >> 24);
}
}

Expand Down

0 comments on commit 90e8f57

Please sign in to comment.