mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>, linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>, Will Deacon <will@kernel.org>,
	Boqun Feng <boqun.feng@gmail.com>, Bibo Mao <maobibo@loongson.cn>
Subject: Re: [PATCH] locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node()
Date: Sun, 21 Jul 2024 16:45:51 -0400	[thread overview]
Message-ID: <f63f46c0-bf30-4332-accc-7562a259309e@redhat.com> (raw)
In-Reply-To: <20240721164552.50175-1-ubizjak@gmail.com>


On 7/21/24 12:45, Uros Bizjak wrote:
> "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".
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Will Deacon <will@kernel.org>
> Cc: Waiman Long <longman@redhat.com>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Fixes: fea0e1820b51 ("locking/pvqspinlock: Use try_cmpxchg() in qspinlock_paravirt.h")
> Reported-by: Bibo Mao <maobibo@loongson.cn>
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> Closes: https://lore.kernel.org/lkml/20240719024010.3296488-1-maobibo@loongson.cn/
> ---
>   kernel/locking/qspinlock_paravirt.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
Acked-by: Waiman Long <longman@redhat.com>


  reply	other threads:[~2024-07-21 20:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-21 16:45 Uros Bizjak
2024-07-21 20:45 ` Waiman Long [this message]
2024-07-22  6:54 ` maobibo
2024-07-22 15:13   ` Waiman Long
2024-07-23  1:13     ` maobibo
2024-07-29 10:24 ` [tip: locking/urgent] " tip-bot2 for Uros Bizjak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f63f46c0-bf30-4332-accc-7562a259309e@redhat.com \
    --to=longman@redhat.com \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maobibo@loongson.cn \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ubizjak@gmail.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®