Skip to content

Commit 6623b02

Browse files
ubizjakPeter Zijlstra
authored and
Peter Zijlstra
committed
locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node()
"enum vcpu_state" is not compatible with "u8" type for all targets, resulting in: error: initialization of 'u8 *' {aka 'unsigned char *'} from incompatible pointer type 'enum vcpu_state *' for LoongArch. Correct the type of "old" variable to "u8". Fixes: fea0e18 ("locking/pvqspinlock: Use try_cmpxchg() in qspinlock_paravirt.h") Closes: https://lore.kernel.org/lkml/[email protected]/ Reported-by: Bibo Mao <[email protected]> Signed-off-by: Uros Bizjak <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Waiman Long <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8400291 commit 6623b02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/locking/qspinlock_paravirt.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ static void pv_wait_node(struct mcs_spinlock *node, struct mcs_spinlock *prev)
357357
static void pv_kick_node(struct qspinlock *lock, struct mcs_spinlock *node)
358358
{
359359
struct pv_node *pn = (struct pv_node *)node;
360-
enum vcpu_state old = vcpu_halted;
360+
u8 old = vcpu_halted;
361361
/*
362362
* If the vCPU is indeed halted, advance its state to match that of
363363
* pv_wait_node(). If OTOH this fails, the vCPU was running and will

0 commit comments

Comments
 (0)