projects/linux·commit f011a08c

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes

f011a08c · Linus Torvalds <[email protected]> · 2013-04-08 16:10:43 -07:00

Pull powerpc bugfix from Stephen Rothwell:
 "A single BUG_ON fix for a condition that could happen for machines
  with certain hardware installed."

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes:
  powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being performed before the ANDCOND test
Commit
f011a08c804d50eeff4abf2d308cdce492f015aa
Parents
79e5f05e · 9fb26401

Merge commit. Changes below are compared with the first parent: 79e5f05e.

Changes

1 files changed · +7 −1

FileStatusAddDelContent
arch/powerpc/platforms/pseries/lpar.cmodified+7−1View file

arch/powerpc/platforms/pseries/lpar.c

View file
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 0da39fe..299731e 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -186,7 +186,13 @@ static long pSeries_lpar_hpte_remove(unsigned long hpte_group)
(0x1UL << 4), &dummy1, &dummy2);
if (lpar_rc == H_SUCCESS)
return i;
- BUG_ON(lpar_rc != H_NOT_FOUND);
+
+ /*
+ * The test for adjunct partition is performed before the
+ * ANDCOND test. H_RESOURCE may be returned, so we need to
+ * check for that as well.
+ */
+ BUG_ON(lpar_rc != H_NOT_FOUND && lpar_rc != H_RESOURCE);
slot_offset++;
slot_offset &= 0x7;