public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nam Cao <namcao@linutronix.de>
To: litaliano00 <litaliano00.contact@gmail.com>
Cc: palmer@dabbelt.com, pjw@kernel.org, aou@eecs.berkeley.edu,
	alex@ghiti.fr, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: Add WFI to secondary hart spinwait loop
Date: Tue, 07 Apr 2026 13:48:41 +0200	[thread overview]
Message-ID: <87tstnuh2e.fsf@yellow.woof> (raw)
In-Reply-To: <CAK-CEVO6h+v-2iRdsR6THbOvoTrxM7xnmsDyXfnP5sAgUdmhYQ@mail.gmail.com>

litaliano00 <litaliano00.contact@gmail.com> writes:
> You are correct to question this. There is no interrupt sent to the
> waiting harts in the current spinwait design — the primary hart simply
> writes to __cpu_spinwait_stack_pointer and __cpu_spinwait_task_pointer.
> A bare WFI would cause secondary harts to sleep indefinitely since no
> IPI is issued after those writes.
>
> The correct fix would require the primary hart to send an IPI to all
> waiting harts after populating the pointers, which is a more involved
> change. The current patch is insufficient as-is.

Yeah, that's also what I would do.

> I will send a v2 that reverts this change. Apologies for the noise.

There's no need for that, this patch has not been applied.

Best regards,
Nam

  parent reply	other threads:[~2026-04-07 11:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  7:45 [PATCH] riscv: Add WFI to secondary hart spinwait loop Adriano Vero
2026-04-07  8:40 ` Nam Cao
2026-04-07  8:45 ` Nam Cao
     [not found]   ` <CAK-CEVO6h+v-2iRdsR6THbOvoTrxM7xnmsDyXfnP5sAgUdmhYQ@mail.gmail.com>
2026-04-07 11:48     ` Nam Cao [this message]
     [not found] ` <8c77810f-8198-46b5-9b6b-23095dbfee1a@lanxincomputing.com>
2026-04-07 12:27   ` litaliano00

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=87tstnuh2e.fsf@yellow.woof \
    --to=namcao@linutronix.de \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=litaliano00.contact@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pjw@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