Commit 3d05b8ae authored by Helge Deller's avatar Helge Deller

Revert "parisc: Improve interrupt handling in arch_spin_lock_flags()"

This reverts commit 2772f0ef.
It turns out that we want to implement the spinlock code differently.
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v5.7+
parent 693a0654
...@@ -10,34 +10,25 @@ ...@@ -10,34 +10,25 @@
static inline int arch_spin_is_locked(arch_spinlock_t *x) static inline int arch_spin_is_locked(arch_spinlock_t *x)
{ {
volatile unsigned int *a = __ldcw_align(x); volatile unsigned int *a = __ldcw_align(x);
smp_mb();
return *a == 0; return *a == 0;
} }
static inline void arch_spin_lock(arch_spinlock_t *x) #define arch_spin_lock(lock) arch_spin_lock_flags(lock, 0)
{
volatile unsigned int *a;
a = __ldcw_align(x);
while (__ldcw(a) == 0)
while (*a == 0)
cpu_relax();
}
static inline void arch_spin_lock_flags(arch_spinlock_t *x, static inline void arch_spin_lock_flags(arch_spinlock_t *x,
unsigned long flags) unsigned long flags)
{ {
volatile unsigned int *a; volatile unsigned int *a;
unsigned long flags_dis;
a = __ldcw_align(x); a = __ldcw_align(x);
while (__ldcw(a) == 0) { while (__ldcw(a) == 0)
local_save_flags(flags_dis);
local_irq_restore(flags);
while (*a == 0) while (*a == 0)
cpu_relax(); if (flags & PSW_SM_I) {
local_irq_restore(flags_dis); local_irq_enable();
} cpu_relax();
local_irq_disable();
} else
cpu_relax();
} }
#define arch_spin_lock_flags arch_spin_lock_flags #define arch_spin_lock_flags arch_spin_lock_flags
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment