akpm@xxxxxxxxxxxxxxxxxxxx wrote: > From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > > It's too large to be inlined. > > Acked-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx> > Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx> > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > --- > > 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 > @@ -1141,20 +1141,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 */ > _ So it's undefined now on !CONFIG_HAS_IOMEM? Eike
Attachment:
signature.asc
Description: This is a digitally signed message part.