From patchwork Fri Jul 16 08:34:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shameerali Kolothum Thodi X-Patchwork-Id: 478366 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1145969jao; Fri, 16 Jul 2021 01:34:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT/l/sCVzh0uf2Ouibgd06KeWO+/LPFOAmpUAbuN/UPw8C1vLazVB+cED8IcGj3MnzB3jW X-Received: by 2002:a05:6402:1a38:: with SMTP id be24mr12916468edb.58.1626424499414; Fri, 16 Jul 2021 01:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626424499; cv=none; d=google.com; s=arc-20160816; b=P79KnpcqI5bRnS0tZPFwBGCtJIzeDq3clgDQhnkb0X7PT/yEIgdpAIT7IBK25wI2rg qS5kA4wnhZuroPX7h4L0XJ27GwUrkAyJqgIyAf2iFq4tE/ppMvAA6PGJDIsrbLlpNqsb Ah7kWkYZG9TjkDCKzd6o2zMBad6UwRqMNyj7hCpf81X1/TeyzYMlcsBcaCWOoW8DMN1e zrA/n6HU38OLBsuxy8uFDnEfvNym7cgOQre6TR3+z/DPuUVLjS2CS2HssjIe8bGj/lxC iRJJkHzYM//oHpx87+X23Lgj7OeZm7CAtwT3YUynzydC9jWAX4T6tRMimhT0DiKzY7Cb yzNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=NGMMLDAwgjy2DHBxsNtABryITZnNnq19kNJr7Bb5FGw=; b=k0UK608RWY5QvDmnaeVWrz66zoWIcYwUIXLM+VKWXY1n04eVdsmVsZQ6qsfcP/TZNt 2ehioDl++BPycf6r2FHWCCICLoutYzSMOVYOlFV9P7fV62ogNY6Nf+0n0mWOe/Gt/Rx4 JG9/sEhxw+9Rxe2FbJ10ws2HaGfgPoBjHw4IAfQz9j0uz/BZiC02bKXVyGk5iG/W+m/d 2BXLgdve7ZbsZA1Va1z4OgWxWzM+JcHsrcVar6kvVjXqhiH2hQcVe1uDW1gRMswJUZYi ATougGyEDE7JRfysUApUQ2/gh9tc2KQzWZi86J+LeN6sxVUxn0r50BQX13B8Bi4V1EeC 7LOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g14si10518330eds.289.2021.07.16.01.34.59; Fri, 16 Jul 2021 01:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237069AbhGPIhx (ORCPT + 4 others); Fri, 16 Jul 2021 04:37:53 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3418 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237805AbhGPIhw (ORCPT ); Fri, 16 Jul 2021 04:37:52 -0400 Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GR41P26f5z6D8nl; Fri, 16 Jul 2021 16:20:25 +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.2176.2; Fri, 16 Jul 2021 10:34:56 +0200 Received: from A2006125610.china.huawei.com (10.47.80.222) 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.2176.2; Fri, 16 Jul 2021 09:34:49 +0100 From: Shameer Kolothum To: , , CC: , , , , , , , , , , Subject: [PATCH v6 1/9] iommu: Introduce a union to struct iommu_resv_region Date: Fri, 16 Jul 2021 09:34:34 +0100 Message-ID: <20210716083442.1708-2-shameerali.kolothum.thodi@huawei.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20210716083442.1708-1-shameerali.kolothum.thodi@huawei.com> References: <20210716083442.1708-1-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.80.222] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org A union is introduced to struct iommu_resv_region to hold any firmware specific data. This is in preparation to add support for IORT RMR reserve regions and the union now holds the RMR specific information. Signed-off-by: Shameer Kolothum --- include/linux/iommu.h | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.17.1 diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 32d448050bf7..bd0e4641c569 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -114,6 +114,13 @@ enum iommu_resv_type { IOMMU_RESV_SW_MSI, }; +struct iommu_iort_rmr_data { +#define IOMMU_RMR_REMAP_PERMITTED (1 << 0) + u32 flags; + u32 sid; /* Stream Id associated with RMR entry */ + void *smmu; /* Associated IORT SMMU node pointer */ +}; + /** * struct iommu_resv_region - descriptor for a reserved memory region * @list: Linked list pointers @@ -121,6 +128,7 @@ enum iommu_resv_type { * @length: Length of the region in bytes * @prot: IOMMU Protection flags (READ/WRITE/...) * @type: Type of the reserved region + * @rmr: ACPI IORT RMR specific data */ struct iommu_resv_region { struct list_head list; @@ -128,6 +136,9 @@ struct iommu_resv_region { size_t length; int prot; enum iommu_resv_type type; + union { + struct iommu_iort_rmr_data rmr; + } fw_data; }; /**