lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230904020431.27057-1-fangxiang3@xiaomi.com>
Date:   Mon, 4 Sep 2023 10:04:31 +0800
From:   Fang Xiang <fangxiang3@...omi.com>
To:     <tglx@...utronix.de>, <maz@...nel.org>,
        <linux-kernel@...r.kernel.org>
CC:     <fangxiang3@...omi.com>
Subject: [PATCH] irqchip/gic-v3-its: Mark GIC as non-shareable by OF property

GIC600/GIC700 integration in some platforms does not support the
sharability feature. Commit a8707f553884 ("irqchip/gic-v3: Add
Rockchip 3588001 erratum workaround") added flags to indicate the
integration design error, but the quirk is just applied with
RK3588/RK3588S and GIC600.

The property are named "force-non-shareable" to be vendor agnostic,
since apparently similar integration design errors exist in other
platforms and they can reuse the same property in their GIC ITS
device-node.

Signed-off-by: Fang Xiang <fangxiang3@...omi.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index e0c2b10d154d..2e92eac1e5f3 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5055,6 +5055,16 @@ static int __init its_compute_its_list_map(struct resource *res,
        return its_number;
 }

+static void its_of_update_shareability(struct its_node *its)
+{
+       if (!fwnode_property_present(its->fwnode_handle,
+                               "force-non-shareable"))
+               return;
+
+       its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
+       gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
+}
+
 static int __init its_probe_one(struct resource *res,
                                struct fwnode_handle *handle, int numa_node)
 {
@@ -5130,6 +5140,7 @@ static int __init its_probe_one(struct resource *res,
        its->msi_domain_flags = IRQ_DOMAIN_FLAG_ISOLATED_MSI;

        its_enable_quirks(its);
+       its_of_update_shareability(its);

        err = its_alloc_tables(its);
        if (err)
--
2.34.1

#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ