Skip to content

Commit

Permalink
Revert "Ported pcie-brcmstb bounce buffer implementation to ARM64. (#…
Browse files Browse the repository at this point in the history
…3144)"

This reverts commit 60f3db3.
  • Loading branch information
pelwell authored and popcornmix committed Jun 10, 2020
1 parent 83dd01b commit 41005b8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 610 deletions.
29 changes: 0 additions & 29 deletions arch/arm64/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,6 @@ void arch_dma_prep_coherent(struct page *page, size_t size)
}

#ifdef CONFIG_IOMMU_DMA
static int __swiotlb_get_sgtable_page(struct sg_table *sgt,
struct page *page, size_t size)
{
int ret = sg_alloc_table(sgt, 1, GFP_KERNEL);

if (!ret)
sg_set_page(sgt->sgl, page, PAGE_ALIGN(size), 0);

return ret;
}

static int __swiotlb_mmap_pfn(struct vm_area_struct *vma,
unsigned long pfn, size_t size)
{
int ret = -ENXIO;
unsigned long nr_vma_pages = vma_pages(vma);
unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT;
unsigned long off = vma->vm_pgoff;

if (off < nr_pages && nr_vma_pages <= (nr_pages - off)) {
ret = remap_pfn_range(vma, vma->vm_start,
pfn + off,
vma->vm_end - vma->vm_start,
vma->vm_page_prot);
}

return ret;
}

void arch_teardown_dma_ops(struct device *dev)
{
dev->dma_ops = NULL;
Expand Down
3 changes: 0 additions & 3 deletions drivers/pci/controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ obj-$(CONFIG_PCIE_BRCMSTB) += pcie-brcmstb.o
ifdef CONFIG_ARM
obj-$(CONFIG_PCIE_BRCMSTB) += pcie-brcmstb-bounce.o
endif
ifdef CONFIG_ARM64
obj-$(CONFIG_PCIE_BRCMSTB) += pcie-brcmstb-bounce64.o
endif

obj-$(CONFIG_VMD) += vmd.o
# pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/controller/pcie-brcmstb-bounce.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef _PCIE_BRCMSTB_BOUNCE_H
#define _PCIE_BRCMSTB_BOUNCE_H

#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
#ifdef CONFIG_ARM

int brcm_pcie_bounce_init(struct device *dev, unsigned long buffer_size,
dma_addr_t threshold);
Expand Down
Loading

0 comments on commit 41005b8

Please sign in to comment.