From: Charlie Jenkins <charlie@rivosinc.com>
To: Xu Lu <luxu.kernel@bytedance.com>
Cc: anup@brainfault.org, tglx@linutronix.de,
paul.walmsley@sifive.com, palmer@dabbelt.com,
lihangjing@bytedance.com, xieyongji@bytedance.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irqchip: riscv: Order normal writes and IPI writes
Date: Thu, 16 Jan 2025 13:09:18 -0800 [thread overview]
Message-ID: <Z4l1fklnUPyTSLO4@ghost> (raw)
In-Reply-To: <20250116120710.51673-1-luxu.kernel@bytedance.com>
On Thu, Jan 16, 2025 at 08:07:10PM +0800, Xu Lu wrote:
> Replace writel_relaxed() with writel() when issuing IPI to ensure all
> previous write operations made by current CPU are visible to other CPUs.
Did you experience an ordering issue from this?
- Charlie
>
> Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
> ---
> drivers/irqchip/irq-riscv-imsic-early.c | 2 +-
> drivers/irqchip/irq-thead-c900-aclint-sswi.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c
> index c5c2e6929a2f..275df5005705 100644
> --- a/drivers/irqchip/irq-riscv-imsic-early.c
> +++ b/drivers/irqchip/irq-riscv-imsic-early.c
> @@ -27,7 +27,7 @@ static void imsic_ipi_send(unsigned int cpu)
> {
> struct imsic_local_config *local = per_cpu_ptr(imsic->global.local, cpu);
>
> - writel_relaxed(IMSIC_IPI_ID, local->msi_va);
> + writel(IMSIC_IPI_ID, local->msi_va);
> }
>
> static void imsic_ipi_starting_cpu(void)
> diff --git a/drivers/irqchip/irq-thead-c900-aclint-sswi.c b/drivers/irqchip/irq-thead-c900-aclint-sswi.c
> index b0e366ade427..8ff6e7a1363b 100644
> --- a/drivers/irqchip/irq-thead-c900-aclint-sswi.c
> +++ b/drivers/irqchip/irq-thead-c900-aclint-sswi.c
> @@ -31,7 +31,7 @@ static DEFINE_PER_CPU(void __iomem *, sswi_cpu_regs);
>
> static void thead_aclint_sswi_ipi_send(unsigned int cpu)
> {
> - writel_relaxed(0x1, per_cpu(sswi_cpu_regs, cpu));
> + writel(0x1, per_cpu(sswi_cpu_regs, cpu));
> }
>
> static void thead_aclint_sswi_ipi_clear(void)
> --
> 2.20.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Charlie Jenkins <charlie@rivosinc.com>
To: Xu Lu <luxu.kernel@bytedance.com>
Cc: anup@brainfault.org, tglx@linutronix.de,
paul.walmsley@sifive.com, palmer@dabbelt.com,
lihangjing@bytedance.com, xieyongji@bytedance.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irqchip: riscv: Order normal writes and IPI writes
Date: Thu, 16 Jan 2025 13:09:18 -0800 [thread overview]
Message-ID: <Z4l1fklnUPyTSLO4@ghost> (raw)
In-Reply-To: <20250116120710.51673-1-luxu.kernel@bytedance.com>
On Thu, Jan 16, 2025 at 08:07:10PM +0800, Xu Lu wrote:
> Replace writel_relaxed() with writel() when issuing IPI to ensure all
> previous write operations made by current CPU are visible to other CPUs.
Did you experience an ordering issue from this?
- Charlie
>
> Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
> ---
> drivers/irqchip/irq-riscv-imsic-early.c | 2 +-
> drivers/irqchip/irq-thead-c900-aclint-sswi.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c
> index c5c2e6929a2f..275df5005705 100644
> --- a/drivers/irqchip/irq-riscv-imsic-early.c
> +++ b/drivers/irqchip/irq-riscv-imsic-early.c
> @@ -27,7 +27,7 @@ static void imsic_ipi_send(unsigned int cpu)
> {
> struct imsic_local_config *local = per_cpu_ptr(imsic->global.local, cpu);
>
> - writel_relaxed(IMSIC_IPI_ID, local->msi_va);
> + writel(IMSIC_IPI_ID, local->msi_va);
> }
>
> static void imsic_ipi_starting_cpu(void)
> diff --git a/drivers/irqchip/irq-thead-c900-aclint-sswi.c b/drivers/irqchip/irq-thead-c900-aclint-sswi.c
> index b0e366ade427..8ff6e7a1363b 100644
> --- a/drivers/irqchip/irq-thead-c900-aclint-sswi.c
> +++ b/drivers/irqchip/irq-thead-c900-aclint-sswi.c
> @@ -31,7 +31,7 @@ static DEFINE_PER_CPU(void __iomem *, sswi_cpu_regs);
>
> static void thead_aclint_sswi_ipi_send(unsigned int cpu)
> {
> - writel_relaxed(0x1, per_cpu(sswi_cpu_regs, cpu));
> + writel(0x1, per_cpu(sswi_cpu_regs, cpu));
> }
>
> static void thead_aclint_sswi_ipi_clear(void)
> --
> 2.20.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-01-16 21:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 12:07 [PATCH] irqchip: riscv: Order normal writes and IPI writes Xu Lu
2025-01-16 12:07 ` Xu Lu
2025-01-16 21:09 ` Charlie Jenkins [this message]
2025-01-16 21:09 ` Charlie Jenkins
2025-01-17 10:35 ` Thomas Gleixner
2025-01-17 10:35 ` Thomas Gleixner
2025-01-17 15:53 ` Anup Patel
2025-01-17 15:53 ` Anup Patel
2025-01-20 7:37 ` Thomas Gleixner
2025-01-20 7:37 ` Thomas Gleixner
2025-01-20 11:05 ` [External] " Xu Lu
2025-01-20 11:05 ` Xu Lu
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=Z4l1fklnUPyTSLO4@ghost \
--to=charlie@rivosinc.com \
--cc=anup@brainfault.org \
--cc=lihangjing@bytedance.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luxu.kernel@bytedance.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=tglx@linutronix.de \
--cc=xieyongji@bytedance.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.