aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/ioremap.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2005-06-30 06:48:40 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:34 -0400
commitc3455b0efc2b5b1bdc755602f77ce7f43725bf61 (patch)
tree835ffe4b5509053c0623146157d92c4ca2d32aea /arch/mips/mm/ioremap.c
parentc134a5ecdb8f4aee09feca0d4d395915e752fcb8 (diff)
Inline ioremap() calls for constant addresses that map to KSEG1.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm/ioremap.c')
-rw-r--r--arch/mips/mm/ioremap.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c
index d06107360db4..9c44ca70befa 100644
--- a/arch/mips/mm/ioremap.c
+++ b/arch/mips/mm/ioremap.c
@@ -102,15 +102,6 @@ static int remap_area_pages(unsigned long address, phys_t phys_addr,
102} 102}
103 103
104/* 104/*
105 * Allow physical addresses to be fixed up to help 36 bit peripherals.
106 */
107phys_t __attribute__ ((weak))
108fixup_bigphys_addr(phys_t phys_addr, phys_t size)
109{
110 return phys_addr;
111}
112
113/*
114 * Generic mapping function (not visible outside): 105 * Generic mapping function (not visible outside):
115 */ 106 */
116 107
@@ -126,7 +117,7 @@ fixup_bigphys_addr(phys_t phys_addr, phys_t size)
126 117
127#define IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL)) 118#define IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL))
128 119
129void * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags) 120void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
130{ 121{
131 struct vm_struct * area; 122 struct vm_struct * area;
132 unsigned long offset; 123 unsigned long offset;
@@ -146,7 +137,7 @@ void * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
146 */ 137 */
147 if (IS_LOW512(phys_addr) && IS_LOW512(last_addr) && 138 if (IS_LOW512(phys_addr) && IS_LOW512(last_addr) &&
148 flags == _CACHE_UNCACHED) 139 flags == _CACHE_UNCACHED)
149 return (void *) CKSEG1ADDR(phys_addr); 140 return (void __iomem *) CKSEG1ADDR(phys_addr);
150 141
151 /* 142 /*
152 * Don't allow anybody to remap normal RAM that we're using.. 143 * Don't allow anybody to remap normal RAM that we're using..
@@ -182,7 +173,7 @@ void * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
182 return NULL; 173 return NULL;
183 } 174 }
184 175
185 return (void *) (offset + (char *)addr); 176 return (void __iomem *) (offset + (char *)addr);
186} 177}
187 178
188#define IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1) 179#define IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1)