Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1606469 > unrolled thread
| Started by | David Woodhouse <dwmw2@infradead.org> |
|---|---|
| First post | 2017-03-22 14:30 +0100 |
| Last post | 2017-03-22 14:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 11/17] cris: Use generic pci_mmap_resource_range() David Woodhouse <dwmw2@infradead.org> - 2017-03-22 14:30 +0100
Re: [PATCH 11/17] cris: Use generic pci_mmap_resource_range() Jesper Nilsson <jesper.nilsson@axis.com> - 2017-03-22 14:40 +0100
| From | David Woodhouse <dwmw2@infradead.org> |
|---|---|
| Date | 2017-03-22 14:30 +0100 |
| Subject | [PATCH 11/17] cris: Use generic pci_mmap_resource_range() |
| Message-ID | <tnOuR-32T-13@gated-at.bofh.it> |
From: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
arch/cris/arch-v32/drivers/pci/bios.c | 23 -----------------------
arch/cris/include/asm/pci.h | 1 +
2 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c
index a589686d..394c2a73 100644
--- a/arch/cris/arch-v32/drivers/pci/bios.c
+++ b/arch/cris/arch-v32/drivers/pci/bios.c
@@ -14,29 +14,6 @@ void pcibios_set_master(struct pci_dev *dev)
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
-int pci_mmap_page_range(struct pci_dev *dev, int bar,
- struct vm_area_struct *vma,
- enum pci_mmap_state mmap_state, int write_combine)
-{
- unsigned long prot;
-
- /* Leave vm_pgoff as-is, the PCI space address is the physical
- * address on this platform.
- */
- prot = pgprot_val(vma->vm_page_prot);
- vma->vm_page_prot = __pgprot(prot);
-
- /* Write-combine setting is ignored, it is changed via the mtrr
- * interfaces on this platform.
- */
- if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
- vma->vm_end - vma->vm_start,
- vma->vm_page_prot))
- return -EAGAIN;
-
- return 0;
-}
-
resource_size_t
pcibios_align_resource(void *data, const struct resource *res,
resource_size_t size, resource_size_t align)
diff --git a/arch/cris/include/asm/pci.h b/arch/cris/include/asm/pci.h
index 65198cb..6e50533 100644
--- a/arch/cris/include/asm/pci.h
+++ b/arch/cris/include/asm/pci.h
@@ -42,6 +42,7 @@ struct pci_dev;
#define PCI_DMA_BUS_IS_PHYS (1)
#define HAVE_PCI_MMAP
+#define ARCH_GENERIC_PCI_MMAP_RESOURCE
#endif /* __KERNEL__ */
--
2.9.3
[toc] | [next] | [standalone]
| From | Jesper Nilsson <jesper.nilsson@axis.com> |
|---|---|
| Date | 2017-03-22 14:40 +0100 |
| Message-ID | <tnOEx-37h-7@gated-at.bofh.it> |
| In reply to | #1606469 |
On Wed, Mar 22, 2017 at 01:25:25PM +0000, David Woodhouse wrote:
> From: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> ---
> arch/cris/arch-v32/drivers/pci/bios.c | 23 -----------------------
> arch/cris/include/asm/pci.h | 1 +
> 2 files changed, 1 insertion(+), 23 deletions(-)
>
> diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c
> index a589686d..394c2a73 100644
> --- a/arch/cris/arch-v32/drivers/pci/bios.c
> +++ b/arch/cris/arch-v32/drivers/pci/bios.c
> @@ -14,29 +14,6 @@ void pcibios_set_master(struct pci_dev *dev)
> pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
> }
>
> -int pci_mmap_page_range(struct pci_dev *dev, int bar,
> - struct vm_area_struct *vma,
> - enum pci_mmap_state mmap_state, int write_combine)
> -{
> - unsigned long prot;
> -
> - /* Leave vm_pgoff as-is, the PCI space address is the physical
> - * address on this platform.
> - */
> - prot = pgprot_val(vma->vm_page_prot);
> - vma->vm_page_prot = __pgprot(prot);
> -
> - /* Write-combine setting is ignored, it is changed via the mtrr
> - * interfaces on this platform.
> - */
> - if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
> - vma->vm_end - vma->vm_start,
> - vma->vm_page_prot))
> - return -EAGAIN;
> -
> - return 0;
> -}
> -
> resource_size_t
> pcibios_align_resource(void *data, const struct resource *res,
> resource_size_t size, resource_size_t align)
> diff --git a/arch/cris/include/asm/pci.h b/arch/cris/include/asm/pci.h
> index 65198cb..6e50533 100644
> --- a/arch/cris/include/asm/pci.h
> +++ b/arch/cris/include/asm/pci.h
> @@ -42,6 +42,7 @@ struct pci_dev;
> #define PCI_DMA_BUS_IS_PHYS (1)
>
> #define HAVE_PCI_MMAP
> +#define ARCH_GENERIC_PCI_MMAP_RESOURCE
>
> #endif /* __KERNEL__ */
>
> --
> 2.9.3
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web