[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <168095071696.404.7766479024018397126.tip-bot2@tip-bot2>
Date: Sat, 08 Apr 2023 10:45:16 -0000
From: "irqchip-bot for Anup Patel" <tip-bot2@...utronix.de>
To: linux-kernel@...r.kernel.org
Cc: Anup Patel <apatel@...tanamicro.com>,
Atish Patra <atishp@...osinc.com>,
Palmer Dabbelt <palmer@...osinc.com>,
Marc Zyngier <maz@...nel.org>, tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] RISC-V: Use IPIs for remote icache flush
when possible
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: 6279228432352f43f43f5e760771151605bf6d82
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/6279228432352f43f43f5e760771151605bf6d82
Author: Anup Patel <apatel@...tanamicro.com>
AuthorDate: Tue, 28 Mar 2023 09:22:22 +05:30
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Sat, 08 Apr 2023 11:26:24 +01:00
RISC-V: Use IPIs for remote icache flush when possible
If we have specialized interrupt controller (such as AIA IMSIC) which
allows supervisor mode to directly inject IPIs without any assistance
from M-mode or HS-mode then using such specialized interrupt controller,
we can do remote icache flushe directly from supervisor mode instead of
using the SBI RFENCE calls.
This patch extends remote icache flush functions to use supervisor mode
IPIs whenever direct supervisor mode IPIs.are supported by interrupt
controller.
Signed-off-by: Anup Patel <apatel@...tanamicro.com>
Reviewed-by: Atish Patra <atishp@...osinc.com>
Acked-by: Palmer Dabbelt <palmer@...osinc.com>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20230328035223.1480939-7-apatel@ventanamicro.com
---
arch/riscv/mm/cacheflush.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/mm/cacheflush.c b/arch/riscv/mm/cacheflush.c
index fcd6145..20cec5e 100644
--- a/arch/riscv/mm/cacheflush.c
+++ b/arch/riscv/mm/cacheflush.c
@@ -19,7 +19,7 @@ void flush_icache_all(void)
{
local_flush_icache_all();
- if (IS_ENABLED(CONFIG_RISCV_SBI))
+ if (IS_ENABLED(CONFIG_RISCV_SBI) && !riscv_use_ipi_for_rfence())
sbi_remote_fence_i(NULL);
else
on_each_cpu(ipi_remote_fence_i, NULL, 1);
@@ -67,7 +67,8 @@ void flush_icache_mm(struct mm_struct *mm, bool local)
* with flush_icache_deferred().
*/
smp_mb();
- } else if (IS_ENABLED(CONFIG_RISCV_SBI)) {
+ } else if (IS_ENABLED(CONFIG_RISCV_SBI) &&
+ !riscv_use_ipi_for_rfence()) {
sbi_remote_fence_i(&others);
} else {
on_each_cpu_mask(&others, ipi_remote_fence_i, NULL, 1);
Powered by blists - more mailing lists