Commit 11df1954 authored by David Woodhouse's avatar David Woodhouse Committed by Bjorn Helgaas

PCI: Move multiple declarations of pci_mmap_page_range() to <linux/pci.h>

We can declare it <linux/pci.h> even on platforms where it isn't going to
be defined.  There's no need to have it littered through the various
<asm/pci.h> files.
Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent ae749c7a
...@@ -29,8 +29,6 @@ static inline int pci_proc_domain(struct pci_bus *bus) ...@@ -29,8 +29,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
#define PCI_DMA_BUS_IS_PHYS (1) #define PCI_DMA_BUS_IS_PHYS (1)
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
{ {
......
...@@ -42,9 +42,6 @@ struct pci_dev; ...@@ -42,9 +42,6 @@ struct pci_dev;
#define PCI_DMA_BUS_IS_PHYS (1) #define PCI_DMA_BUS_IS_PHYS (1)
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -53,8 +53,6 @@ extern unsigned long ia64_max_iommu_merge_mask; ...@@ -53,8 +53,6 @@ extern unsigned long ia64_max_iommu_merge_mask;
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
#define arch_can_pci_mmap_wc() 1 #define arch_can_pci_mmap_wc() 1
extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
#define HAVE_PCI_LEGACY #define HAVE_PCI_LEGACY
extern int pci_mmap_legacy_page_range(struct pci_bus *bus, extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
struct vm_area_struct *vma, struct vm_area_struct *vma,
......
...@@ -46,9 +46,6 @@ extern int pci_domain_nr(struct pci_bus *bus); ...@@ -46,9 +46,6 @@ extern int pci_domain_nr(struct pci_bus *bus);
extern int pci_proc_domain(struct pci_bus *bus); extern int pci_proc_domain(struct pci_bus *bus);
struct vm_area_struct; struct vm_area_struct;
/* Map a range of PCI memory or I/O space for a device into user space */
int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
#define HAVE_PCI_MMAP 1 #define HAVE_PCI_MMAP 1
......
...@@ -111,9 +111,6 @@ extern void pcibios_set_master(struct pci_dev *dev); ...@@ -111,9 +111,6 @@ extern void pcibios_set_master(struct pci_dev *dev);
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
#define HAVE_ARCH_PCI_RESOURCE_TO_USER #define HAVE_ARCH_PCI_RESOURCE_TO_USER
/* /*
......
...@@ -74,9 +74,6 @@ static inline int pci_controller_num(struct pci_dev *dev) ...@@ -74,9 +74,6 @@ static inline int pci_controller_num(struct pci_dev *dev)
} }
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state,
int write_combine);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -201,7 +201,4 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) ...@@ -201,7 +201,4 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
#endif /* __ASM_PARISC_PCI_H */ #endif /* __ASM_PARISC_PCI_H */
...@@ -77,9 +77,6 @@ extern int pci_domain_nr(struct pci_bus *bus); ...@@ -77,9 +77,6 @@ extern int pci_domain_nr(struct pci_bus *bus);
extern int pci_proc_domain(struct pci_bus *bus); extern int pci_proc_domain(struct pci_bus *bus);
struct vm_area_struct; struct vm_area_struct;
/* Map a range of PCI memory or I/O space for a device into user space */
int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() and it does WC */ /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() and it does WC */
#define HAVE_PCI_MMAP 1 #define HAVE_PCI_MMAP 1
......
...@@ -66,8 +66,7 @@ extern unsigned long PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM; ...@@ -66,8 +66,7 @@ extern unsigned long PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM;
struct pci_dev; struct pci_dev;
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
extern void pcibios_set_master(struct pci_dev *dev); extern void pcibios_set_master(struct pci_dev *dev);
/* Dynamic DMA mapping stuff. /* Dynamic DMA mapping stuff.
......
...@@ -45,10 +45,6 @@ static inline int pci_proc_domain(struct pci_bus *bus) ...@@ -45,10 +45,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
#define HAVE_ARCH_PCI_GET_UNMAPPED_AREA #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA
#define get_pci_unmapped_area get_fb_unmapped_area #define get_pci_unmapped_area get_fb_unmapped_area
int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state,
int write_combine);
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
{ {
return PCI_IRQ_NONE; return PCI_IRQ_NONE;
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#include <mach/hardware.h> /* for PCIBIOS_MIN_* */ #include <mach/hardware.h> /* for PCIBIOS_MIN_* */
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif #endif
...@@ -104,10 +104,6 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq); ...@@ -104,10 +104,6 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
#define HAVE_PCI_MMAP #define HAVE_PCI_MMAP
#define arch_can_pci_mmap_wc() pat_enabled() #define arch_can_pci_mmap_wc() pat_enabled()
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state,
int write_combine);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
extern void early_quirks(void); extern void early_quirks(void);
......
...@@ -46,10 +46,6 @@ struct pci_dev; ...@@ -46,10 +46,6 @@ struct pci_dev;
#define PCI_DMA_BUS_IS_PHYS (1) #define PCI_DMA_BUS_IS_PHYS (1)
/* Map a range of PCI memory or I/O space for a device into user space */
int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
#define HAVE_PCI_MMAP 1 #define HAVE_PCI_MMAP 1
......
...@@ -1626,6 +1626,13 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } ...@@ -1626,6 +1626,13 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }
#include <asm/pci.h> #include <asm/pci.h>
/* Map a range of PCI memory or I/O space for a device into user space.
* Architectures provide this function if they set HAVE_PCI_MMAP, and
* it accepts the 'write_combine' argument when arch_can_pci_mmap_wc()
* evaluates to nonzero. */
int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
#ifndef arch_can_pci_mmap_wc #ifndef arch_can_pci_mmap_wc
#define arch_can_pci_mmap_wc() 0 #define arch_can_pci_mmap_wc() 0
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment