Hi Chenxiang,
On 2023/6/12 21:26, chenxiang wrote:
From: Xiang Chen chenxiang66@hisilicon.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7C103
When enabled GICv4.1 in hip09, there are some invalid vPE configurations in configuration table for some situations, which will cause some vSGI interrupts lost. To fix the issue, need to send vinvall command after vmovp.
Signed-off-by: Nianyao Tang tangnianyao@huawei.com Signed-off-by: Xiang Chen chenxiang66@hisilicon.com Signed-off-by: caijian caijian11@h-partners.com
Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 11 +++++++ arch/arm64/configs/openeuler_defconfig | 1 + drivers/irqchip/irq-gic-v3-its.c | 40 ++++++++++++++++++++------ 4 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/Documentation/arm64/silicon-errata.rst b/Documentation/arm64/silicon-errata.rst index b72fbbfe3fcb..2305def38396 100644 --- a/Documentation/arm64/silicon-errata.rst +++ b/Documentation/arm64/silicon-errata.rst @@ -149,6 +149,8 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | Hisilicon | TSV{110,200} | #1980005 | HISILICON_ERRATUM_1980005 | +----------------+-----------------+-----------------+-----------------------------+ +| Hisilicon | Hip09 | #162100801 | HISILICON_ERRATUM_162100801 | ++----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+ | Qualcomm Tech. | Kryo/Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 | +----------------+-----------------+-----------------+-----------------------------+ diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 3dcf96f37a3c..766356f04abc 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -802,6 +802,17 @@ config HISILICON_ERRATUM_1980005
If unsure, say N.
+config HISILICON_ERRATUM_162100801
- bool "Hip09 162100801 erratum support"
- default y
- help
- When enabled GICv4.1 in hip09, there are some invalid vPE config
- in configuration tables for some situation, which will cause vSGI
- interrupts lost. So fix it by sending vinvall commands after vmovp.
- If unsure, say Y.
Please remove the blank line.
@@ -1307,6 +1316,10 @@ static void its_send_vmovp(struct its_vpe *vpe) its = list_first_entry(&its_nodes, struct its_node, entry); desc.its_vmovp_cmd.col = &its->collections[col_id]; its_send_single_vcommand(its, its_build_vmovp_cmd, &desc);
if (is_v4_1(its) && (its->flags &
ITS_FLAGS_WORKAROUND_HISILICON_162100801))
its_send_vinvall(its, vpe);
This part is specific to *Single VMOVP* capable system. Does Hip09 support Single VMOVP?
@@ -1333,19 +1346,14 @@ static void its_send_vmovp(struct its_vpe *vpe)
desc.its_vmovp_cmd.col = &its->collections[col_id]; its_send_single_vcommand(its, its_build_vmovp_cmd, &desc);
if (is_v4_1(its) && (its->flags &
ITS_FLAGS_WORKAROUND_HISILICON_162100801))
its_send_vinvall(its, vpe);
If I read the spec correctly, a single VINVALL command is enough to invalidate all caches associated with the vPE. You don't need to send VINVALL to every ITS. But please keep it as is if this *is* the right way to fix the broken HW.
Thanks, Zenghui