diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2024-07-21 18:45:41 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2024-07-29 12:16:21 +0200 |
commit | 6623b0217d0c9bed80bfa43b778ce1c0eb03b497 (patch) | |
tree | 61e7cd88c5bc6c955cae62e8f1a9cc9e96072c79 /kernel/locking | |
parent | Linux 6.11-rc1 (diff) | |
download | linux-6623b0217d0c9bed80bfa43b778ce1c0eb03b497.tar.xz linux-6623b0217d0c9bed80bfa43b778ce1c0eb03b497.zip |
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: fea0e1820b51 ("locking/pvqspinlock: Use try_cmpxchg() in qspinlock_paravirt.h")
Closes: https://lore.kernel.org/lkml/20240719024010.3296488-1-maobibo@loongson.cn/
Reported-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Waiman Long <longman@redhat.com>
Link: https://lore.kernel.org/r/20240721164552.50175-1-ubizjak@gmail.com
Diffstat (limited to 'kernel/locking')
-rw-r--r-- | kernel/locking/qspinlock_paravirt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/locking/qspinlock_paravirt.h b/kernel/locking/qspinlock_paravirt.h index f5a36e67b593..ac2e22502741 100644 --- a/kernel/locking/qspinlock_paravirt.h +++ b/kernel/locking/qspinlock_paravirt.h @@ -357,7 +357,7 @@ static void pv_wait_node(struct mcs_spinlock *node, struct mcs_spinlock *prev) static void pv_kick_node(struct qspinlock *lock, struct mcs_spinlock *node) { struct pv_node *pn = (struct pv_node *)node; - enum vcpu_state old = vcpu_halted; + u8 old = vcpu_halted; /* * If the vCPU is indeed halted, advance its state to match that of * pv_wait_node(). If OTOH this fails, the vCPU was running and will |