summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/pci-dma.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-08-13 12:40:10 +0200
committerTony Lindgren <tony@atomide.com>2019-08-13 12:40:10 +0200
commit58e16d792a6a8c6b750f637a4649967fcac853dc (patch)
tree778a940499ecfc6fb2d811dbfef735913d30618a /arch/xtensa/kernel/pci-dma.c
parentARM: OMAP1: ams-delta-fiq: Fix missing irq_ack (diff)
parentbus: ti-sysc: Simplify cleanup upon failures in sysc_probe() (diff)
downloadlinux-58e16d792a6a8c6b750f637a4649967fcac853dc.tar.xz
linux-58e16d792a6a8c6b750f637a4649967fcac853dc.zip
Merge branch 'ti-sysc-fixes' into fixes
Diffstat (limited to 'arch/xtensa/kernel/pci-dma.c')
-rw-r--r--arch/xtensa/kernel/pci-dma.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c
index 9171bff76fc4..65f05776d827 100644
--- a/arch/xtensa/kernel/pci-dma.c
+++ b/arch/xtensa/kernel/pci-dma.c
@@ -1,11 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* DMA coherent memory allocation.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
* Copyright (C) 2002 - 2005 Tensilica Inc.
* Copyright (C) 2015 Cadence Design Systems Inc.
*
@@ -167,10 +163,6 @@ void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
*handle = phys_to_dma(dev, page_to_phys(page));
- if (attrs & DMA_ATTR_NO_KERNEL_MAPPING) {
- return page;
- }
-
#ifdef CONFIG_MMU
if (PageHighMem(page)) {
void *p;
@@ -196,9 +188,7 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,
unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT;
struct page *page;
- if (attrs & DMA_ATTR_NO_KERNEL_MAPPING) {
- page = vaddr;
- } else if (platform_vaddr_uncached(vaddr)) {
+ if (platform_vaddr_uncached(vaddr)) {
page = virt_to_page(platform_vaddr_to_cached(vaddr));
} else {
#ifdef CONFIG_MMU