]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/mm/ioremap.c
[MIPS] Alchemy: Set board type on initialization.
[linux-2.6-omap-h63xx.git] / arch / mips / mm / ioremap.c
index d06107360db426ebd5a9924ab48021ac621a1d5d..3101d1db55921b3c195351be551a39623c34d19b 100644 (file)
@@ -55,7 +55,7 @@ static inline int remap_area_pmd(pmd_t * pmd, unsigned long address,
        if (address >= end)
                BUG();
        do {
-               pte_t * pte = pte_alloc_kernel(&init_mm, pmd, address);
+               pte_t * pte = pte_alloc_kernel(pmd, address);
                if (!pte)
                        return -ENOMEM;
                remap_area_pte(pte, address, end - address, address + phys_addr, flags);
@@ -77,7 +77,6 @@ static int remap_area_pages(unsigned long address, phys_t phys_addr,
        flush_cache_all();
        if (address >= end)
                BUG();
-       spin_lock(&init_mm.page_table_lock);
        do {
                pud_t *pud;
                pmd_t *pmd;
@@ -96,20 +95,10 @@ static int remap_area_pages(unsigned long address, phys_t phys_addr,
                address = (address + PGDIR_SIZE) & PGDIR_MASK;
                dir++;
        } while (address && (address < end));
-       spin_unlock(&init_mm.page_table_lock);
        flush_tlb_all();
        return error;
 }
 
-/*
- * Allow physical addresses to be fixed up to help 36 bit peripherals.
- */
-phys_t __attribute__ ((weak))
-fixup_bigphys_addr(phys_t phys_addr, phys_t size)
-{
-       return phys_addr;
-}
-
 /*
  * Generic mapping function (not visible outside):
  */
@@ -126,7 +115,7 @@ fixup_bigphys_addr(phys_t phys_addr, phys_t size)
 
 #define IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL))
 
-void * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
+void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
 {
        struct vm_struct * area;
        unsigned long offset;
@@ -146,7 +135,7 @@ void * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
         */
        if (IS_LOW512(phys_addr) && IS_LOW512(last_addr) &&
            flags == _CACHE_UNCACHED)
-               return (void *) CKSEG1ADDR(phys_addr);
+               return (void __iomem *) CKSEG1ADDR(phys_addr);
 
        /*
         * Don't allow anybody to remap normal RAM that we're using..
@@ -182,7 +171,7 @@ void * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
                return NULL;
        }
 
-       return (void *) (offset + (char *)addr);
+       return (void __iomem *) (offset + (char *)addr);
 }
 
 #define IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1)