From: Andrew Morton Fix the alpha build, too: In file included from /usr/src/devel/arch/alpha/include/asm/core_mcpcia.h:9, from /usr/src/devel/arch/alpha/include/asm/io.h:226, from arch/alpha/kernel/asm-offsets.c:12: include/linux/pci.h: In function 'pci_ioremap_bar': include/linux/pci.h:1139: error: implicit declaration of function 'ioremap_nocache' include/linux/pci.h:1140: warning: return makes pointer from integer without a cast In file included from arch/alpha/kernel/asm-offsets.c:12: /usr/src/devel/arch/alpha/include/asm/io.h: At top level: /usr/src/devel/arch/alpha/include/asm/io.h:300: error: conflicting types for 'ioremap_nocache' include/linux/pci.h:1139: error: previous implicit declaration of 'ioremap_nocache' was here Repairs commit aa42d7c6138afdc54f74e971456a0fbfec16b77b Author: Arjan van de Ven Date: Sun Sep 28 16:36:11 2008 -0700 PCI: introduce an pci_ioremap(pdev, barnr) function Cc: Arjan van de Ven Cc: Jesse Barnes Signed-off-by: Andrew Morton --- drivers/pci/pci.c | 16 ++++++++++++++++ include/linux/pci.h | 15 +-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff -puN drivers/pci/pci.c~pci-uninline-pci_ioremap_bar drivers/pci/pci.c --- a/drivers/pci/pci.c~pci-uninline-pci_ioremap_bar +++ a/drivers/pci/pci.c @@ -56,6 +56,22 @@ unsigned char pci_bus_max_busnr(struct p } EXPORT_SYMBOL_GPL(pci_bus_max_busnr); +#ifdef CONFIG_HAS_IOMEM +void *pci_ioremap_bar(struct pci_dev *pdev, int bar) +{ + /* + * Make sure the BAR is actually a memory resource, not an IO resource + */ + if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) { + WARN_ON(1); + return NULL; + } + return ioremap_nocache(pci_resource_start(pdev, bar), + pci_resource_len(pdev, bar)); +} +EXPORT_SYMBOL_GPL(pci_ioremap_bar); +#endif + #if 0 /** * pci_max_busnr - returns maximum PCI bus number diff -puN include/linux/pci.h~pci-uninline-pci_ioremap_bar include/linux/pci.h --- a/include/linux/pci.h~pci-uninline-pci_ioremap_bar +++ a/include/linux/pci.h @@ -1126,20 +1126,7 @@ static inline void pci_mmcfg_early_init( static inline void pci_mmcfg_late_init(void) { } #endif -#ifdef CONFIG_HAS_IOMEM -static inline void * pci_ioremap_bar(struct pci_dev *pdev, int bar) -{ - /* - * Make sure the BAR is actually a memory resource, not an IO resource - */ - if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) { - WARN_ON(1); - return NULL; - } - return ioremap_nocache(pci_resource_start(pdev, bar), - pci_resource_len(pdev, bar)); -} -#endif +void *pci_ioremap_bar(struct pci_dev *pdev, int bar); #endif /* __KERNEL__ */ #endif /* LINUX_PCI_H */ _