[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b11497b4-424b-ac42-e85b-e89524e67e8b@amd.com>
Date: Thu, 18 Jul 2019 17:29:30 +0000
From: "Lendacky, Thomas" <Thomas.Lendacky@....com>
To: Thiago Jung Bauermann <bauerman@...ux.ibm.com>,
"x86@...nel.org" <x86@...nel.org>
CC: "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>, Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Robin Murphy <robin.murphy@....com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Alexey Dobriyan <adobriyan@...il.com>,
Halil Pasic <pasic@...ux.ibm.com>,
Mike Anderson <andmike@...ux.ibm.com>,
Ram Pai <linuxram@...ibm.com>
Subject: Re: [PATCH v3 3/6] dma-mapping: Remove dma_check_mask()
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote:
> sme_active() is an x86-specific function so it's better not to call it from
> generic code. Christoph Hellwig mentioned that "There is no reason why we
> should have a special debug printk just for one specific reason why there
> is a requirement for a large DMA mask.", so just remove dma_check_mask().
>
> Signed-off-by: Thiago Jung Bauermann <bauerman@...ux.ibm.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@....com>
> ---
> kernel/dma/mapping.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c
> index 1f628e7ac709..61eeefbfcb36 100644
> --- a/kernel/dma/mapping.c
> +++ b/kernel/dma/mapping.c
> @@ -291,12 +291,6 @@ void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
> }
> EXPORT_SYMBOL(dma_free_attrs);
>
> -static inline void dma_check_mask(struct device *dev, u64 mask)
> -{
> - if (sme_active() && (mask < (((u64)sme_get_me_mask() << 1) - 1)))
> - dev_warn(dev, "SME is active, device will require DMA bounce buffers\n");
> -}
> -
> int dma_supported(struct device *dev, u64 mask)
> {
> const struct dma_map_ops *ops = get_dma_ops(dev);
> @@ -327,7 +321,6 @@ int dma_set_mask(struct device *dev, u64 mask)
> return -EIO;
>
> arch_dma_set_mask(dev, mask);
> - dma_check_mask(dev, mask);
> *dev->dma_mask = mask;
> return 0;
> }
> @@ -345,7 +338,6 @@ int dma_set_coherent_mask(struct device *dev, u64 mask)
> if (!dma_supported(dev, mask))
> return -EIO;
>
> - dma_check_mask(dev, mask);
> dev->coherent_dma_mask = mask;
> return 0;
> }
>
Powered by blists - more mailing lists