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 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 80448C433F5 for ; Wed, 24 Nov 2021 17:52:55 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bKSfJ7VDzwLZs4gJCXEDpsJlhRqeZ4ufTym3zdvrv2U=; b=WrBkLPbo529FuQ tpEQzW32SSI6GuOMLDQKmJXcdnGo99a5U+IAwciSb4JBv5TufQA1o6Z8GA50mnrrdU0dLyOjbmf5f ioVDiO47kYzHNqvKGxdmgezSVCZL4aGQeuK/UFvLj6n0iLeOQA8fYwq+wwKlTXtrZZeJCSgUkUK9I 7kceF9lROAo/uJY+Uij2dUmPwr8aXSqo45bBBck27/ILVO3cOkgyg1mqFDgbyIJ5V6UjLk4Cyg/pi LK4mnj/w2vrWv25l5hgszmtcmtZnGzossg0Cg/IDCoAiVFgQ9mdoNc7KqBDemp0hIFsLG84FWTNDX yY9wKoPipzyn5DL1wX+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpwQS-005RXy-P4; Wed, 24 Nov 2021 17:51:21 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpwQO-005RXM-TK for linux-arm-kernel@lists.infradead.org; Wed, 24 Nov 2021 17:51:18 +0000 Received: by mail-pf1-x432.google.com with SMTP id n85so3350889pfd.10 for ; Wed, 24 Nov 2021 09:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oTDchkafpOp/46IgeNxQuNHz+bM7M0+5Ox+wOnWqwfQ=; b=Qb2R4+I+DtEcOkXq0TYH/CagTNAxs9vdwiKlDdzULoiuVos13Xj0bBoEZSIPlJijzR C478wnOgwX2OIroiZLUXmkCPPl7ne/tYZ6BhKk2rJK6CwWNPOkQPdhuayJPTVdRrDcgL lYvMSdRGlCmlv6Yx0LePe8p8yv07r0peWf6/ErtsteaCes01s8SNwZ2q+UfiZQEciJ5R 14+qbgLpmXR5b1sK15zTGPdKVkRwKQ9vgA4LZtRxlhr6dxnNSySqCpZULAsRTj6j4ZuC AymmMd7hKuQHEFmtp6YoDZPpoqm3daj0NDEv0m+0NdMYu4USrjQ47MKRLlI/ImkVjBPx BcWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oTDchkafpOp/46IgeNxQuNHz+bM7M0+5Ox+wOnWqwfQ=; b=jOqpJjovxJASx6DyGThPbgS3mXNw5XkMb+oiPpIotFYxMFwRiZTCZVS+lLkzUJjr+r UsweDPUqowSlpd2gwIGcShbOjx2bLOdk87YL+wKEM2q0GxTzwtkxOkA38YwuXELHGst7 t5VLqq6Q2q5Yj21v++50aFdcFkt0x0LeDLA7kHjf0mg0s7fYblcEIR4vV8xoZ7ruGMSf /ND0jG32h8xiPwqsCAlehfvr4redQDiPQewatJ/FzZ0YwHkVI/pTteBzDu0LICnxLIuk dgivrUGXZGAJUSzBEjeCs4DWVH7aq3NRjDrIY5gM7ERTcT/2dBvUs8VsrN9NR+qms32F ZBtQ== X-Gm-Message-State: AOAM5322tz//CezgwhUavhfvFWeKswEb838O3+vvsOAo50f2dKL+cUWH pN2F5DAXhST7scxN8L2ZnmYKyQ== X-Google-Smtp-Source: ABdhPJwuLqZldVSYdI75Ai+PcBDkHa+xkpmfqt3+9vDSJ2R9/PWi5Orovy471RaYzID644RlCM4n+A== X-Received: by 2002:aa7:9404:0:b0:494:6e78:67cd with SMTP id x4-20020aa79404000000b004946e7867cdmr7671622pfo.84.1637776275657; Wed, 24 Nov 2021 09:51:15 -0800 (PST) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id d2sm330981pfu.203.2021.11.24.09.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 09:51:14 -0800 (PST) Date: Wed, 24 Nov 2021 10:51:11 -0700 From: Mathieu Poirier To: Yicong Yang Cc: gregkh@linuxfoundation.org, helgaas@kernel.org, alexander.shishkin@linux.intel.com, lorenzo.pieralisi@arm.com, will@kernel.org, mark.rutland@arm.com, suzuki.poulose@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, jonathan.cameron@huawei.com, daniel.thompson@linaro.org, joro@8bytes.org, john.garry@huawei.com, shameerali.kolothum.thodi@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-pci@vger.kernel.org, linux-perf-users@vger.kernel.org, iommu@lists.linux-foundation.org, prime.zeng@huawei.com, liuqi115@huawei.com, zhangshaokun@hisilicon.com, linuxarm@huawei.com, song.bao.hua@hisilicon.com Subject: Re: [PATCH v2 1/6] iommu: Export iommu_{get,put}_resv_regions() Message-ID: <20211124175111.GA35341@p14s> References: <20211116090625.53702-1-yangyicong@hisilicon.com> <20211116090625.53702-2-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211116090625.53702-2-yangyicong@hisilicon.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_095116_974386_725473C6 X-CRM114-Status: GOOD ( 17.12 ) 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 On Tue, Nov 16, 2021 at 05:06:20PM +0800, Yicong Yang wrote: > 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); Acked-by: Mathieu Poirier > 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