lock validator: s390 use raw_spinlock in mcck handler
PATCH 7/8 lock validator: s390 use raw_spinlock in mcck handler
From: Heiko Carstens <[email protected]>
Machine checks on s390 are always enabled (except in the machine check handler itself). Therefore use a raw_spinlock in the machine check handler to avoid deadlocks in the lock validator.
---
drivers/s390/s390mach.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/s390/s390mach.c +3 -3
@@ -372,7 +372,7 @@ s390_revalidate_registers(struct mci *mcvoid s390_do_machine_check (struct pt_regs *regs) { -static DEFINE_SPINLOCK (ipd_lock); +static raw_spinlock_t ipd_lock = (raw_spinlock_t )__RAW_SPIN_LOCK_UNLOCKED;static unsigned long long last_ipd;static int ipd_count;unsigned long long tmp;
@@ -418,7 +418,7 @@ s390_do_machine_check(struct pt_regs *re* retry this instruction. */ -spin_lock (&ipd_lock); +__raw_spin_lock (&ipd_lock); tmp =get_clock ();
@@ -432,7 +432,7 @@ s390_do_machine_check(struct pt_regs *reif (ipd_count ==MAX_IPD_COUNT )s390_handle_damage ("too many ipd retries." ); -spin_unlock (&ipd_lock); +__raw_spin_unlock (&ipd_lock); }else {/* Processing damage -> stopping machine */
Quoted 5 lines · Heiko Carstens
From: Heiko Carstens <[email protected]>
Machine checks on s390 are always enabled (except in the machine check handler itself). Therefore use a
raw_spinlockin the machine check handler to avoid deadlocks in the lock validator.
hm, couldnt you use the ->lockdep_recursion mechanism to take care of such cases? Just call lockdep_off() when entering a machine exception handler, and lockdep_on() when exiting it.
Ingo
Quoted 5 lines · Ingo Molnar
Quoted 2 lines · Heiko Carstens
From: Heiko Carstens <[email protected]>
Quoted 7 lines
Quoted 3 lines
Machine checks on s390 are always enabled (except in the machine check handler itself). Therefore use a
raw_spinlockin the machine check handler to avoid deadlocks in the lock validator.hm, couldnt you use the ->lockdep_recursion mechanism to take care of such cases? Just call
lockdep_off()when entering a machine exception handler, andlockdep_on()when exiting it.
Ah, sure. Wasn't aware that there is such an interface. Will do.