[RFC/PATCH 7/12] powerpc: Use FW_FEATURE_ISERIES in pgtable_64.c
Michael Ellerman
michael at ellerman.id.au
Tue Jan 17 14:22:31 EST 2006
Convert from #ifdef ISERIES to FW_FEATURE_ISERIES tests in pgtable_64.c
arch/powerpc/mm/pgtable_64.c | 30 +++++++-----------------------
1 files changed, 7 insertions(+), 23 deletions(-)
Index: linux/arch/powerpc/mm/pgtable_64.c
===================================================================
--- linux.orig/arch/powerpc/mm/pgtable_64.c
+++ linux/arch/powerpc/mm/pgtable_64.c
@@ -70,26 +70,6 @@
unsigned long ioremap_bot = IMALLOC_BASE;
static unsigned long phbs_io_bot = PHBS_IO_BASE;
-#ifdef CONFIG_PPC_ISERIES
-
-void __iomem *ioremap(unsigned long addr, unsigned long size)
-{
- return (void __iomem *)addr;
-}
-
-extern void __iomem *__ioremap(unsigned long addr, unsigned long size,
- unsigned long flags)
-{
- return (void __iomem *)addr;
-}
-
-void iounmap(volatile void __iomem *addr)
-{
- return;
-}
-
-#else
-
/*
* map_io_page currently only called by __ioremap
* map_io_page adds an entry to the ioremap page table
@@ -162,6 +142,9 @@ void __iomem * __ioremap(unsigned long a
unsigned long pa, ea;
void __iomem *ret;
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ return (void __iomem *)addr;
+
/*
* Choose an address to map it to.
* Once the imalloc system is running, we use it.
@@ -256,9 +239,12 @@ void iounmap(volatile void __iomem *toke
{
void *addr;
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ return;
+
if (!mem_init_done)
return;
-
+
addr = (void *) ((unsigned long __force) token & PAGE_MASK);
im_free(addr);
@@ -316,8 +302,6 @@ int iounmap_explicit(volatile void __iom
return 0;
}
-#endif
-
EXPORT_SYMBOL(ioremap);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
More information about the Linuxppc64-dev
mailing list