From patchwork Mon Feb 21 15:43:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shameerali Kolothum Thodi X-Patchwork-Id: 12753804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE34EC433F5 for ; Mon, 21 Feb 2022 15:45:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UdtzGXujkyqrE27q5uXLf6C5OgVML1IgG35oOfgQXRE=; b=B/eLt13BHm7lVH +1JYdeUg9dBGQrqr8cDRDF6YS+YtUbJ/Ze8eK8yXxAioVqpH2/ssJVP4V9CLLlWVfZOc1iUOgDOIV B/mEJ6mZP9suHoY0c411qAmgvSbtVeP2N9NDJkM1HzSwbwk5zn9dr9QWTUKLS9bzWNvWNzqA8+CdR W+SLgmjcw5jjAPl9TTPcxCSv5wOqt23IJQ0gR/9oNblRRXP+w8hwZ5CmN4yH45muG2iNT1RUYultV d/q8WMmzMEXmFRowtQUhwT078kJm9NyZ1H3BXDhW5sbForL1JRljVvjHb3CKqBpYJK5bzyNI/dwyC rEovGXpF1QSXMbW/1r6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMAro-006RlH-Og; Mon, 21 Feb 2022 15:44:48 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMArk-006Rk6-4V for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 15:44:46 +0000 Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4K2RM41mmqz6GD3m; Mon, 21 Feb 2022 23:40:00 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml715-chm.china.huawei.com (10.206.15.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 21 Feb 2022 16:44:42 +0100 Received: from A2006125610.china.huawei.com (10.47.91.169) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 21 Feb 2022 15:44:33 +0000 From: Shameer Kolothum To: , , CC: , , , , , , , , , , , Subject: [PATCH v8 01/11] ACPI/IORT: Add temporary RMR node flag definitions Date: Mon, 21 Feb 2022 15:43:34 +0000 Message-ID: <20220221154344.2126-2-shameerali.kolothum.thodi@huawei.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20220221154344.2126-1-shameerali.kolothum.thodi@huawei.com> References: <20220221154344.2126-1-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.91.169] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_074444_346444_3A01AABB X-CRM114-Status: UNSURE ( 7.70 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org IORT rev E.d introduces more details into the RMR node Flags field. Add temporary definitions to describe and access these Flags field until ACPICA header is updated to support E.d. This patch can be reverted once the include/acpi/actbl2.h has all the relevant definitions. Signed-off-by: Shameer Kolothum --- Please find the ACPICA E.d related changes pull request here, https://github.com/acpica/acpica/pull/752 --- drivers/acpi/arm64/iort.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index f2f8f05662de..0730c4dbb700 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -25,6 +25,30 @@ #define IORT_IOMMU_TYPE ((1 << ACPI_IORT_NODE_SMMU) | \ (1 << ACPI_IORT_NODE_SMMU_V3)) +/* + * The following RMR related definitions are temporary and + * can be removed once ACPICA headers support IORT rev E.d + */ +#ifndef ACPI_IORT_RMR_REMAP_PERMITTED +#define ACPI_IORT_RMR_REMAP_PERMITTED (1) +#endif + +#ifndef ACPI_IORT_RMR_ACCESS_PRIVILEGE +#define ACPI_IORT_RMR_ACCESS_PRIVILEGE (1 << 1) +#endif + +#ifndef ACPI_IORT_RMR_ACCESS_ATTRIBUTES +#define ACPI_IORT_RMR_ACCESS_ATTRIBUTES(flags) (((flags) >> 2) & 0xFF) +#endif + +#ifndef ACPI_IORT_RMR_ATTR_DEVICE_GRE +#define ACPI_IORT_RMR_ATTR_DEVICE_GRE 0x03 +#endif + +#ifndef ACPI_IORT_RMR_ATTR_NORMAL +#define ACPI_IORT_RMR_ATTR_NORMAL 0x05 +#endif + struct iort_its_msi_chip { struct list_head list; struct fwnode_handle *fw_node;