Re: [PATCH 22/34] dma-mapping: add an arch_dma_supported hook
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Christoph Hellwig <hch@xxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx
- Subject: Re: [PATCH 22/34] dma-mapping: add an arch_dma_supported hook
- From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
- Date: Fri, 2 Feb 2018 09:47:23 -0800
- Cc: Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx, linux-cris-kernel@xxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-metag@xxxxxxxxxxxxxxx, Michal Simek <monstr@xxxxxxxxx>, linux-mips@xxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, patches@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, Guan Xuetao <gxt@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- In-reply-to: <20180112084232.2857-23-hch@lst.de>
- References: <20180112084232.2857-1-hch@lst.de> <20180112084232.2857-23-hch@lst.de>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
On 01/12/2018 12:42 AM, Christoph Hellwig wrote:
> To implement the x86 forbid_dac and iommu_sac_force we want an arch hook
> so that it can apply the global options across all dma_map_ops
> implementations.
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
> arch/x86/include/asm/dma-mapping.h | 3 +++
> arch/x86/kernel/pci-dma.c | 19 ++++++++++++-------
> include/linux/dma-mapping.h | 11 +++++++++++
> 3 files changed, 26 insertions(+), 7 deletions(-)
> diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
> index 88bcb1a8211d..d67742dad904 100644
> --- a/include/linux/dma-mapping.h
> +++ b/include/linux/dma-mapping.h
> @@ -576,6 +576,14 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
> return 0;
> }
>
> +/*
> + * This is a hack for the legacy x86 forbid_dac and iommu_sac_force. Please
> + * don't use this is new code.
in new code.
> + */
> +#ifndef arch_dma_supported
> +#define arch_dma_supported(dev, mask) (1)
> +#endif
--
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]