]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix checkstop in native_hpte_clear() with lockdep
authorCyril Bur <cyrilbur@gmail.com>
Thu, 8 Oct 2015 00:04:26 +0000 (11:04 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 8 Oct 2015 21:01:38 +0000 (08:01 +1100)
commitc5fd3bc11428ae75a1b596c5e0ee7c26cd41ef31
tree46bc0900e03a565b432b658a09c890903c7b2a63
parent0e5b9e5600a6871084139d7b4ba53d0014689b3e
powerpc: Fix checkstop in native_hpte_clear() with lockdep

native_hpte_clear() is called in real mode from two places:
- Early in boot during htab initialisation if firmware assisted dump is
  active.
- Late in the kexec path.

In both contexts there is no need to disable interrupts are they are
already disabled. Furthermore, locking around the tlbie() is only required
for pre POWER5 hardware.

On POWER5 or newer hardware concurrent tlbie()s work as expected and on pre
POWER5 hardware concurrent tlbie()s could result in deadlock. This code
would only be executed at crashdump time, during which all bets are off,
concurrent tlbie()s are unlikely and taking locks is unsafe therefore the
best course of action is to simply do nothing. Concurrent tlbie()s are not
possible in the first case as secondary CPUs have not come up yet.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/machdep.h
arch/powerpc/mm/hash_native_64.c