From 56a4c6e31a25a218c066d8da27558a86310bbfd7 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Mon, 23 Jul 2007 11:55:32 +1000 Subject: [POWERPC] iSeries: We need vio_enable_interrupts Commit 3d0e91f7ace12499c4b00088e9a6b1361e1bb0ca introduced a requirement for vio_enable_interrupts which iSeires has never needed. So create a dummy one. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- include/asm-powerpc/vio.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index 0117b54..3a0975e2 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h @@ -80,6 +80,11 @@ extern const void *vio_get_attribute(struct vio_dev *vdev, char *which, extern struct vio_dev *vio_find_node(struct device_node *vnode); extern int vio_enable_interrupts(struct vio_dev *dev); extern int vio_disable_interrupts(struct vio_dev *dev); +#else +static inline int vio_enable_interrupts(struct vio_dev *dev) +{ + return 0; +} #endif static inline struct vio_driver *to_vio_driver(struct device_driver *drv) -- cgit v1.1 From c40b91b59de079583cde5f0c8e2c96d8af0f76a7 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 25 Jul 2007 09:27:35 +1000 Subject: [POWERPC] iSeries: Fix section mismatch warnings WARNING: vmlinux.o(.text+0x8124): Section mismatch: reference to .init.text:.iSeries_early_setup (between '.__start_initialization_iSeries' and '.__mmu_off') WARNING: vmlinux.o(.text+0x8128): Section mismatch: reference to .init.text:.early_setup (between '.__start_initialization_iSeries' and '.__mmu_off') Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- include/asm-powerpc/ppc_asm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h index fa083d8..6532572 100644 --- a/include/asm-powerpc/ppc_asm.h +++ b/include/asm-powerpc/ppc_asm.h @@ -181,6 +181,18 @@ name: \ .type GLUE(.,name),@function; \ GLUE(.,name): +#define _INIT_STATIC(name) \ + .section ".text.init.refok"; \ + .align 2 ; \ + .section ".opd","aw"; \ +name: \ + .quad GLUE(.,name); \ + .quad .TOC.@tocbase; \ + .quad 0; \ + .previous; \ + .type GLUE(.,name),@function; \ +GLUE(.,name): + #else /* 32-bit */ #define _GLOBAL(n) \ -- cgit v1.1 From 6dfbde209171cd15407e7540d363a434a489aaca Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Thu, 26 Jul 2007 14:07:13 +1000 Subject: [POWERPC] Add function to check if address is an IO port This adds a function that tells you if a given kernel virtual address is hitting a PCI or ISA IO port permanent mapping or not. This is to be used in the next patch to fix iomap APIs to properly unmap things. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- include/asm-powerpc/pci-bridge.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index d53e0eb..e909769 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h @@ -71,6 +71,14 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) return bus->sysdata; } +static inline int isa_vaddr_is_ioport(void __iomem *address) +{ + /* No specific ISA handling on ppc32 at this stage, it + * all goes through PCI + */ + return 0; +} + /* These are used for config access before all the PCI probing has been done. */ int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn, @@ -241,6 +249,13 @@ extern void pcibios_free_controller(struct pci_controller *phb); extern void isa_bridge_find_early(struct pci_controller *hose); +static inline int isa_vaddr_is_ioport(void __iomem *address) +{ + /* Check if address hits the reserved legacy IO range */ + unsigned long ea = (unsigned long)address; + return ea >= ISA_IO_BASE && ea < ISA_IO_END; +} + extern int pcibios_unmap_io_space(struct pci_bus *bus); extern int pcibios_map_io_space(struct pci_bus *bus); @@ -271,11 +286,16 @@ extern struct pci_controller * pcibios_alloc_controller(struct device_node *dev); #ifdef CONFIG_PCI extern unsigned long pci_address_to_pio(phys_addr_t address); +extern int pcibios_vaddr_is_ioport(void __iomem *address); #else static inline unsigned long pci_address_to_pio(phys_addr_t address) { return (unsigned long)-1; } +static inline int pcibios_vaddr_is_ioport(void __iomem *address) +{ + return 0; +} #endif -- cgit v1.1