]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Fix corrupted PE allocation bitmap on releasing PE
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Tue, 6 Sep 2016 04:17:18 +0000 (14:17 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 8 Sep 2016 03:12:52 +0000 (13:12 +1000)
commit3188bc1f42f7e40115c0f7e7c5e0f8a99516f1f2
tree2efb3435c952cabf2ac784b8406aacd152b54f61
parent6625c90234263f4d5d45478fc95aeabbc0edcdc0
powerpc/powernv: Fix corrupted PE allocation bitmap on releasing PE

In pnv_ioda_free_pe(), the PE object (including the associated PE
number) is cleared before resetting the corresponding bit in the
PE allocation bitmap. It means PE#0 is always released to the bitmap
wrongly.

This fixes above issue by caching the PE number before the PE object
is cleared.

Fixes: e79ee13b043e ("powerpc/powernv: Use PE instead of number during setup and release"
Cc: stable@vger.kernel.org # v4.7+
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c