lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2c24bfd1-5f54-4b82-444e-833dc53b6efd@synopsys.com>
Date:   Fri, 5 Jan 2018 11:45:16 -0800
From:   Vineet Gupta <Vineet.Gupta1@...opsys.com>
To:     Christoph Hellwig <hch@....de>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>
CC:     "linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
        "linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
        "linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
        "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
        Guan Xuetao <gxt@...c.pku.edu.cn>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "linux-c6x-dev@...ux-c6x.org" <linux-c6x-dev@...ux-c6x.org>,
        "linux-hexagon@...r.kernel.org" <linux-hexagon@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        "adi-buildroot-devel@...ts.sourceforge.net" 
        <adi-buildroot-devel@...ts.sourceforge.net>,
        "linux-m68k@...ts.linux-m68k.org" <linux-m68k@...ts.linux-m68k.org>,
        "patches@...ups.riscv.org" <patches@...ups.riscv.org>,
        "linux-metag@...r.kernel.org" <linux-metag@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        Michal Simek <monstr@...str.eu>,
        "linux-parisc@...r.kernel.org" <linux-parisc@...r.kernel.org>,
        "linux-cris-kernel@...s.com" <linux-cris-kernel@...s.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-alpha@...r.kernel.org" <linux-alpha@...r.kernel.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH 09/67] arc: remove CONFIG_ARC_PLAT_NEEDS_PHYS_TO_DMA

On 12/29/2017 12:25 AM, Christoph Hellwig wrote:
> We always use the stub definitions, so remove the unused other code.
>
> Signed-off-by: Christoph Hellwig <hch@....de>

Acked-by: Vineet Gupta <vgupta@...opsys.com>

FWIW, it was removed and reintroduced as one of the customers wanted it, which is 
not relevant now !

Thx,
-Vineet

> ---
>   arch/arc/Kconfig                   |  3 ---
>   arch/arc/include/asm/dma-mapping.h |  7 -------
>   arch/arc/mm/dma.c                  | 14 +++++++-------
>   3 files changed, 7 insertions(+), 17 deletions(-)
>
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> index 9d5fd00d9e91..f3a80cf164cc 100644
> --- a/arch/arc/Kconfig
> +++ b/arch/arc/Kconfig
> @@ -463,9 +463,6 @@ config ARCH_PHYS_ADDR_T_64BIT
>   config ARCH_DMA_ADDR_T_64BIT
>   	bool
>   
> -config ARC_PLAT_NEEDS_PHYS_TO_DMA
> -	bool
> -
>   config ARC_KVADDR_SIZE
>   	int "Kernel Virtual Address Space size (MB)"
>   	range 0 512
> diff --git a/arch/arc/include/asm/dma-mapping.h b/arch/arc/include/asm/dma-mapping.h
> index 94285031c4fb..7a16824bfe98 100644
> --- a/arch/arc/include/asm/dma-mapping.h
> +++ b/arch/arc/include/asm/dma-mapping.h
> @@ -11,13 +11,6 @@
>   #ifndef ASM_ARC_DMA_MAPPING_H
>   #define ASM_ARC_DMA_MAPPING_H
>   
> -#ifndef CONFIG_ARC_PLAT_NEEDS_PHYS_TO_DMA
> -#define plat_dma_to_phys(dev, dma_handle) ((phys_addr_t)(dma_handle))
> -#define plat_phys_to_dma(dev, paddr) ((dma_addr_t)(paddr))
> -#else
> -#include <plat/dma.h>
> -#endif
> -
>   extern const struct dma_map_ops arc_dma_ops;
>   
>   static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
> diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c
> index fad18261ef6a..1d405b86250c 100644
> --- a/arch/arc/mm/dma.c
> +++ b/arch/arc/mm/dma.c
> @@ -60,7 +60,7 @@ static void *arc_dma_alloc(struct device *dev, size_t size,
>   	/* This is linear addr (0x8000_0000 based) */
>   	paddr = page_to_phys(page);
>   
> -	*dma_handle = plat_phys_to_dma(dev, paddr);
> +	*dma_handle = paddr;
>   
>   	/* This is kernel Virtual address (0x7000_0000 based) */
>   	if (need_kvaddr) {
> @@ -92,7 +92,7 @@ static void *arc_dma_alloc(struct device *dev, size_t size,
>   static void arc_dma_free(struct device *dev, size_t size, void *vaddr,
>   		dma_addr_t dma_handle, unsigned long attrs)
>   {
> -	phys_addr_t paddr = plat_dma_to_phys(dev, dma_handle);
> +	phys_addr_t paddr = dma_handle;
>   	struct page *page = virt_to_page(paddr);
>   	int is_non_coh = 1;
>   
> @@ -111,7 +111,7 @@ static int arc_dma_mmap(struct device *dev, struct vm_area_struct *vma,
>   {
>   	unsigned long user_count = vma_pages(vma);
>   	unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT;
> -	unsigned long pfn = __phys_to_pfn(plat_dma_to_phys(dev, dma_addr));
> +	unsigned long pfn = __phys_to_pfn(dma_addr);
>   	unsigned long off = vma->vm_pgoff;
>   	int ret = -ENXIO;
>   
> @@ -175,7 +175,7 @@ static dma_addr_t arc_dma_map_page(struct device *dev, struct page *page,
>   	if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC))
>   		_dma_cache_sync(paddr, size, dir);
>   
> -	return plat_phys_to_dma(dev, paddr);
> +	return paddr;
>   }
>   
>   /*
> @@ -190,7 +190,7 @@ static void arc_dma_unmap_page(struct device *dev, dma_addr_t handle,
>   			       size_t size, enum dma_data_direction dir,
>   			       unsigned long attrs)
>   {
> -	phys_addr_t paddr = plat_dma_to_phys(dev, handle);
> +	phys_addr_t paddr = handle;
>   
>   	if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC))
>   		_dma_cache_sync(paddr, size, dir);
> @@ -224,13 +224,13 @@ static void arc_dma_unmap_sg(struct device *dev, struct scatterlist *sg,
>   static void arc_dma_sync_single_for_cpu(struct device *dev,
>   		dma_addr_t dma_handle, size_t size, enum dma_data_direction dir)
>   {
> -	_dma_cache_sync(plat_dma_to_phys(dev, dma_handle), size, DMA_FROM_DEVICE);
> +	_dma_cache_sync(dma_handle, size, DMA_FROM_DEVICE);
>   }
>   
>   static void arc_dma_sync_single_for_device(struct device *dev,
>   		dma_addr_t dma_handle, size_t size, enum dma_data_direction dir)
>   {
> -	_dma_cache_sync(plat_dma_to_phys(dev, dma_handle), size, DMA_TO_DEVICE);
> +	_dma_cache_sync(dma_handle, size, DMA_TO_DEVICE);
>   }
>   
>   static void arc_dma_sync_sg_for_cpu(struct device *dev,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ