From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11949C43217 for ; Tue, 16 Nov 2021 09:09:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0F4261AA2 for ; Tue, 16 Nov 2021 09:09:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232823AbhKPJMM (ORCPT ); Tue, 16 Nov 2021 04:12:12 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:15825 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232734AbhKPJMJ (ORCPT ); Tue, 16 Nov 2021 04:12:09 -0500 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HtgGT3hNbz918F; Tue, 16 Nov 2021 17:08:49 +0800 (CST) Received: from dggema772-chm.china.huawei.com (10.1.198.214) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Tue, 16 Nov 2021 17:09:09 +0800 Received: from localhost.localdomain (10.67.165.2) by dggema772-chm.china.huawei.com (10.1.198.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Tue, 16 Nov 2021 17:09:09 +0800 From: Yicong Yang To: , , , , , , , , , , , , , , , , , , , , CC: , , , , , Subject: [PATCH v2 1/6] iommu: Export iommu_{get,put}_resv_regions() Date: Tue, 16 Nov 2021 17:06:20 +0800 Message-ID: <20211116090625.53702-2-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20211116090625.53702-1-yangyicong@hisilicon.com> References: <20211116090625.53702-1-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggema772-chm.china.huawei.com (10.1.198.214) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Export iommu_{get,put}_resv_regions() to the modules so that the driver can retrieve and use the reserved regions of the device. Signed-off-by: Yicong Yang --- drivers/iommu/iommu.c | 2 ++ include/linux/iommu.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index dd7863e453a5..e96711eee965 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2792,6 +2792,7 @@ void iommu_get_resv_regions(struct device *dev, struct list_head *list) if (ops && ops->get_resv_regions) ops->get_resv_regions(dev, list); } +EXPORT_SYMBOL_GPL(iommu_get_resv_regions); void iommu_put_resv_regions(struct device *dev, struct list_head *list) { @@ -2800,6 +2801,7 @@ void iommu_put_resv_regions(struct device *dev, struct list_head *list) if (ops && ops->put_resv_regions) ops->put_resv_regions(dev, list); } +EXPORT_SYMBOL_GPL(iommu_put_resv_regions); /** * generic_iommu_put_resv_regions - Reserved region driver helper diff --git a/include/linux/iommu.h b/include/linux/iommu.h index d2f3435e7d17..1b7b0f370e28 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -450,8 +450,8 @@ extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t io extern void iommu_set_fault_handler(struct iommu_domain *domain, iommu_fault_handler_t handler, void *token); -extern void iommu_get_resv_regions(struct device *dev, struct list_head *list); -extern void iommu_put_resv_regions(struct device *dev, struct list_head *list); +void iommu_get_resv_regions(struct device *dev, struct list_head *list); +void iommu_put_resv_regions(struct device *dev, struct list_head *list); extern void generic_iommu_put_resv_regions(struct device *dev, struct list_head *list); extern void iommu_set_default_passthrough(bool cmd_line); -- 2.33.0 From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73AF8C433F5 for ; Tue, 16 Nov 2021 09:11:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4171A61A8D for ; Tue, 16 Nov 2021 09:11:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4171A61A8D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=uEK+RXmDovASmBsdAq5AOp42nFns2ST7rTAJJUu9h3w=; b=UMAdxChLgr8emx rYV0c4S3VZpD9a+EJpMmO3ID04mpAuOYB1iMR2RDLBIL5OjjC02H9Q9FVlZbBxYxJrU3gOjFH504j 55K0IBihjoB4l/KsUkBFzMS53EO2s5qUp7BOfgR1zDMc+yuDGtJsuLpou7WmWZa4fafD+rR1vy9qn IG3DLMWaJIN7dd7Hep9Y9JjARGabk7NALq+3HK1EdOGbdELR9fS15NB3LfqQ4DHmmDNLvN3bH2288 V4dUkH5QsFcj7T6BI1brZd3+5DljmjGromaH4qcJhDo36JMR86dAIEQ4MWh5xltR/ACuWGFLTpu2n WqAH/3UtzXyt7FYpw1tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmuSx-000r63-V8; Tue, 16 Nov 2021 09:09:24 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmuSs-000r1Z-CP for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 09:09:20 +0000 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HtgGT3hNbz918F; Tue, 16 Nov 2021 17:08:49 +0800 (CST) Received: from dggema772-chm.china.huawei.com (10.1.198.214) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Tue, 16 Nov 2021 17:09:09 +0800 Received: from localhost.localdomain (10.67.165.2) by dggema772-chm.china.huawei.com (10.1.198.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Tue, 16 Nov 2021 17:09:09 +0800 From: Yicong Yang To: , , , , , , , , , , , , , , , , , , , , CC: , , , , , Subject: [PATCH v2 1/6] iommu: Export iommu_{get,put}_resv_regions() Date: Tue, 16 Nov 2021 17:06:20 +0800 Message-ID: <20211116090625.53702-2-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20211116090625.53702-1-yangyicong@hisilicon.com> References: <20211116090625.53702-1-yangyicong@hisilicon.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggema772-chm.china.huawei.com (10.1.198.214) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_010918_629231_359FFB04 X-CRM114-Status: UNSURE ( 9.47 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Export iommu_{get,put}_resv_regions() to the modules so that the driver can retrieve and use the reserved regions of the device. Signed-off-by: Yicong Yang --- drivers/iommu/iommu.c | 2 ++ include/linux/iommu.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index dd7863e453a5..e96711eee965 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2792,6 +2792,7 @@ void iommu_get_resv_regions(struct device *dev, struct list_head *list) if (ops && ops->get_resv_regions) ops->get_resv_regions(dev, list); } +EXPORT_SYMBOL_GPL(iommu_get_resv_regions); void iommu_put_resv_regions(struct device *dev, struct list_head *list) { @@ -2800,6 +2801,7 @@ void iommu_put_resv_regions(struct device *dev, struct list_head *list) if (ops && ops->put_resv_regions) ops->put_resv_regions(dev, list); } +EXPORT_SYMBOL_GPL(iommu_put_resv_regions); /** * generic_iommu_put_resv_regions - Reserved region driver helper diff --git a/include/linux/iommu.h b/include/linux/iommu.h index d2f3435e7d17..1b7b0f370e28 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -450,8 +450,8 @@ extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t io extern void iommu_set_fault_handler(struct iommu_domain *domain, iommu_fault_handler_t handler, void *token); -extern void iommu_get_resv_regions(struct device *dev, struct list_head *list); -extern void iommu_put_resv_regions(struct device *dev, struct list_head *list); +void iommu_get_resv_regions(struct device *dev, struct list_head *list); +void iommu_put_resv_regions(struct device *dev, struct list_head *list); extern void generic_iommu_put_resv_regions(struct device *dev, struct list_head *list); extern void iommu_set_default_passthrough(bool cmd_line); -- 2.33.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50D54C433F5 for ; Tue, 16 Nov 2021 09:39:29 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D95E461263 for ; Tue, 16 Nov 2021 09:39:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D95E461263 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lists.linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A33F540424; Tue, 16 Nov 2021 09:39:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3isJvax8W_BH; Tue, 16 Nov 2021 09:39:27 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 52BBE401D7; Tue, 16 Nov 2021 09:39:27 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2A6CBC001E; Tue, 16 Nov 2021 09:39:27 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4A23DC0012 for ; Tue, 16 Nov 2021 09:09:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1F0C3403F6 for ; Tue, 16 Nov 2021 09:09:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fMmr24zhmo_l for ; Tue, 16 Nov 2021 09:09:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by smtp2.osuosl.org (Postfix) with ESMTPS id D5D93400C9 for ; Tue, 16 Nov 2021 09:09:12 +0000 (UTC) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HtgGT3hNbz918F; Tue, 16 Nov 2021 17:08:49 +0800 (CST) Received: from dggema772-chm.china.huawei.com (10.1.198.214) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Tue, 16 Nov 2021 17:09:09 +0800 Received: from localhost.localdomain (10.67.165.2) by dggema772-chm.china.huawei.com (10.1.198.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Tue, 16 Nov 2021 17:09:09 +0800 To: , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 1/6] iommu: Export iommu_{get,put}_resv_regions() Date: Tue, 16 Nov 2021 17:06:20 +0800 Message-ID: <20211116090625.53702-2-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20211116090625.53702-1-yangyicong@hisilicon.com> References: <20211116090625.53702-1-yangyicong@hisilicon.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggema772-chm.china.huawei.com (10.1.198.214) X-CFilter-Loop: Reflected X-Mailman-Approved-At: Tue, 16 Nov 2021 09:39:26 +0000 Cc: prime.zeng@huawei.com, linuxarm@huawei.com, yangyicong@hisilicon.com, zhangshaokun@hisilicon.com, liuqi115@huawei.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Yicong Yang via iommu Reply-To: Yicong Yang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Export iommu_{get,put}_resv_regions() to the modules so that the driver can retrieve and use the reserved regions of the device. Signed-off-by: Yicong Yang --- drivers/iommu/iommu.c | 2 ++ include/linux/iommu.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index dd7863e453a5..e96711eee965 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2792,6 +2792,7 @@ void iommu_get_resv_regions(struct device *dev, struct list_head *list) if (ops && ops->get_resv_regions) ops->get_resv_regions(dev, list); } +EXPORT_SYMBOL_GPL(iommu_get_resv_regions); void iommu_put_resv_regions(struct device *dev, struct list_head *list) { @@ -2800,6 +2801,7 @@ void iommu_put_resv_regions(struct device *dev, struct list_head *list) if (ops && ops->put_resv_regions) ops->put_resv_regions(dev, list); } +EXPORT_SYMBOL_GPL(iommu_put_resv_regions); /** * generic_iommu_put_resv_regions - Reserved region driver helper diff --git a/include/linux/iommu.h b/include/linux/iommu.h index d2f3435e7d17..1b7b0f370e28 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -450,8 +450,8 @@ extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t io extern void iommu_set_fault_handler(struct iommu_domain *domain, iommu_fault_handler_t handler, void *token); -extern void iommu_get_resv_regions(struct device *dev, struct list_head *list); -extern void iommu_put_resv_regions(struct device *dev, struct list_head *list); +void iommu_get_resv_regions(struct device *dev, struct list_head *list); +void iommu_put_resv_regions(struct device *dev, struct list_head *list); extern void generic_iommu_put_resv_regions(struct device *dev, struct list_head *list); extern void iommu_set_default_passthrough(bool cmd_line); -- 2.33.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu