From: Thomas Gleixner <tglx@linutronix.de>
To: Xu Lu <luxu.kernel@bytedance.com>,
anup@brainfault.org, charlie@rivosinc.com,
paul.walmsley@sifive.com, palmer@dabbelt.com
Cc: lihangjing@bytedance.com, xieyongji@bytedance.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Xu Lu <luxu.kernel@bytedance.com>
Subject: Re: [PATCH RESEND] irqchip: riscv: Order normal writes and IPI writes
Date: Mon, 27 Jan 2025 11:33:39 +0100 [thread overview]
Message-ID: <87plk88s1o.ffs@tglx> (raw)
In-Reply-To: <20250127093846.98625-1-luxu.kernel@bytedance.com>
On Mon, Jan 27 2025 at 17:38, Xu Lu wrote:
This is not a RESEND. The change log has been modified, no?
The prefix is incorrect. See
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html
> RISC-V distinguishes between normal memory accesses and device I/O and
What is a normal memory write? Are there abnormal memory writes too?
> uses FENCE instruction to order them as viewed by othe RISC-V harts and
> external devices or coprocessors. The FENCE instruction can order any
> combination of device input(I), device output(O), memory reads(R) and
> memory writes(W). For example, 'fence w, o' can be used to ensure all
Can be? It _is_ used, no?
> memory writes from instructions preceding the FENCE instruction appear
> earlier in the global memory order than device output writes from
> instructions after the FENCE instruction.
>
> RISC-V issues IPI by writing certain value to IMSIC/ACLINT MMIO
> registers, which is regarded as device output operation. However, the
> existing implementation of IMSIC/ACLINT driver issues IPI via
> writel_relaxed(), which does not guarantee the order of device output
> operation and preceding memory writes. Then the hart receiving IPI may
> not have seen the latest data yet.
>
> This commit fixes this by replacing writel_relaxed() with writel()
> when
'This commit' is equally wrong as 'This patch'. See Documentation/process/
> issuing IPI, which will use 'fence w, o' to ensure all previous writes
> made by current hart are visible to other harts before they receive
> the IPI.
I've fixed it up for you.
Thanks,
tglx
_______________________________________________
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: Thomas Gleixner <tglx@linutronix.de>
To: Xu Lu <luxu.kernel@bytedance.com>,
anup@brainfault.org, charlie@rivosinc.com,
paul.walmsley@sifive.com, palmer@dabbelt.com
Cc: lihangjing@bytedance.com, xieyongji@bytedance.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Xu Lu <luxu.kernel@bytedance.com>
Subject: Re: [PATCH RESEND] irqchip: riscv: Order normal writes and IPI writes
Date: Mon, 27 Jan 2025 11:33:39 +0100 [thread overview]
Message-ID: <87plk88s1o.ffs@tglx> (raw)
In-Reply-To: <20250127093846.98625-1-luxu.kernel@bytedance.com>
On Mon, Jan 27 2025 at 17:38, Xu Lu wrote:
This is not a RESEND. The change log has been modified, no?
The prefix is incorrect. See
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html
> RISC-V distinguishes between normal memory accesses and device I/O and
What is a normal memory write? Are there abnormal memory writes too?
> uses FENCE instruction to order them as viewed by othe RISC-V harts and
> external devices or coprocessors. The FENCE instruction can order any
> combination of device input(I), device output(O), memory reads(R) and
> memory writes(W). For example, 'fence w, o' can be used to ensure all
Can be? It _is_ used, no?
> memory writes from instructions preceding the FENCE instruction appear
> earlier in the global memory order than device output writes from
> instructions after the FENCE instruction.
>
> RISC-V issues IPI by writing certain value to IMSIC/ACLINT MMIO
> registers, which is regarded as device output operation. However, the
> existing implementation of IMSIC/ACLINT driver issues IPI via
> writel_relaxed(), which does not guarantee the order of device output
> operation and preceding memory writes. Then the hart receiving IPI may
> not have seen the latest data yet.
>
> This commit fixes this by replacing writel_relaxed() with writel()
> when
'This commit' is equally wrong as 'This patch'. See Documentation/process/
> issuing IPI, which will use 'fence w, o' to ensure all previous writes
> made by current hart are visible to other harts before they receive
> the IPI.
I've fixed it up for you.
Thanks,
tglx
next prev parent reply other threads:[~2025-01-27 10:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-27 9:38 [PATCH RESEND] irqchip: riscv: Order normal writes and IPI writes Xu Lu
2025-01-27 9:38 ` Xu Lu
2025-01-27 10:13 ` [tip: irq/urgent] irqchip/riscv: Ensure ordering of memory " tip-bot2 for Xu Lu
2025-01-27 10:33 ` Thomas Gleixner [this message]
2025-01-27 10:33 ` [PATCH RESEND] irqchip: riscv: Order normal " Thomas Gleixner
2025-01-27 14:26 ` [External] " Xu Lu
2025-01-27 14:26 ` Xu Lu
2025-01-27 16:21 ` Arnd Bergmann
2025-01-27 16:21 ` Arnd Bergmann
2025-01-27 16:37 ` [External] " Xu Lu
2025-01-27 16:37 ` Xu Lu
2025-01-27 19:07 ` Arnd Bergmann
2025-01-27 19:07 ` Arnd Bergmann
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=87plk88s1o.ffs@tglx \
--to=tglx@linutronix.de \
--cc=anup@brainfault.org \
--cc=charlie@rivosinc.com \
--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=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.