1 From 9fb2640159f9d4f5a2a9d60e490482d4cbecafdb Mon Sep 17 00:00:00 2001
2 From: Michael Wolf <mjw@linux.vnet.ibm.com>
3 Date: Fri, 5 Apr 2013 10:41:40 +0000
4 Subject: powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being performed before the ANDCOND test
6 From: Michael Wolf <mjw@linux.vnet.ibm.com>
8 commit 9fb2640159f9d4f5a2a9d60e490482d4cbecafdb upstream.
10 Some versions of pHyp will perform the adjunct partition test before the
11 ANDCOND test. The result of this is that H_RESOURCE can be returned and
12 cause the BUG_ON condition to occur. The HPTE is not removed. So add a
13 check for H_RESOURCE, it is ok if this HPTE is not removed as
14 pSeries_lpar_hpte_remove is looking for an HPTE to remove and not a
15 specific HPTE to remove. So it is ok to just move on to the next slot
18 Signed-off-by: Michael Wolf <mjw@linux.vnet.ibm.com>
19 Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 arch/powerpc/platforms/pseries/lpar.c | 8 +++++++-
24 1 file changed, 7 insertions(+), 1 deletion(-)
26 --- a/arch/powerpc/platforms/pseries/lpar.c
27 +++ b/arch/powerpc/platforms/pseries/lpar.c
28 @@ -187,7 +187,13 @@ static long pSeries_lpar_hpte_remove(uns
29 (0x1UL << 4), &dummy1, &dummy2);
30 if (lpar_rc == H_SUCCESS)
32 - BUG_ON(lpar_rc != H_NOT_FOUND);
35 + * The test for adjunct partition is performed before the
36 + * ANDCOND test. H_RESOURCE may be returned, so we need to
37 + * check for that as well.
39 + BUG_ON(lpar_rc != H_NOT_FOUND && lpar_rc != H_RESOURCE);