diff options
author | Huang, Ying <ying.huang@intel.com> | 2008-01-30 07:33:44 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:44 -0500 |
commit | beacfaac3f23b30814aafee37a055257c7062ef3 (patch) | |
tree | 9a9a25cafa5fa4b79026caa8b0b442dc54b78889 /arch/x86/mm/ioremap_32.c | |
parent | 4716e79c9946044a53a65418cfba04836f6a5c36 (diff) |
x86 32-bit boot: rename bt_ioremap() to early_ioremap()
This patch renames bt_ioremap to early_ioremap, which is used in
x86_64. This makes it easier to merge i386 and x86_64 usage.
[ mingo@elte.hu: fix ]
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/ioremap_32.c')
-rw-r--r-- | arch/x86/mm/ioremap_32.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/arch/x86/mm/ioremap_32.c b/arch/x86/mm/ioremap_32.c index fd1f5b6cfa20..43b5e9fd6370 100644 --- a/arch/x86/mm/ioremap_32.c +++ b/arch/x86/mm/ioremap_32.c | |||
@@ -212,36 +212,36 @@ static __initdata int after_paging_init; | |||
212 | static __initdata unsigned long bm_pte[1024] | 212 | static __initdata unsigned long bm_pte[1024] |
213 | __attribute__((aligned(PAGE_SIZE))); | 213 | __attribute__((aligned(PAGE_SIZE))); |
214 | 214 | ||
215 | static inline unsigned long * __init bt_ioremap_pgd(unsigned long addr) | 215 | static inline unsigned long * __init early_ioremap_pgd(unsigned long addr) |
216 | { | 216 | { |
217 | return (unsigned long *)swapper_pg_dir + ((addr >> 22) & 1023); | 217 | return (unsigned long *)swapper_pg_dir + ((addr >> 22) & 1023); |
218 | } | 218 | } |
219 | 219 | ||
220 | static inline unsigned long * __init bt_ioremap_pte(unsigned long addr) | 220 | static inline unsigned long * __init early_ioremap_pte(unsigned long addr) |
221 | { | 221 | { |
222 | return bm_pte + ((addr >> PAGE_SHIFT) & 1023); | 222 | return bm_pte + ((addr >> PAGE_SHIFT) & 1023); |
223 | } | 223 | } |
224 | 224 | ||
225 | void __init bt_ioremap_init(void) | 225 | void __init early_ioremap_init(void) |
226 | { | 226 | { |
227 | unsigned long *pgd; | 227 | unsigned long *pgd; |
228 | 228 | ||
229 | pgd = bt_ioremap_pgd(fix_to_virt(FIX_BTMAP_BEGIN)); | 229 | pgd = early_ioremap_pgd(fix_to_virt(FIX_BTMAP_BEGIN)); |
230 | *pgd = __pa(bm_pte) | _PAGE_TABLE; | 230 | *pgd = __pa(bm_pte) | _PAGE_TABLE; |
231 | memset(bm_pte, 0, sizeof(bm_pte)); | 231 | memset(bm_pte, 0, sizeof(bm_pte)); |
232 | BUG_ON(pgd != bt_ioremap_pgd(fix_to_virt(FIX_BTMAP_END))); | 232 | BUG_ON(pgd != early_ioremap_pgd(fix_to_virt(FIX_BTMAP_END))); |
233 | } | 233 | } |
234 | 234 | ||
235 | void __init bt_ioremap_clear(void) | 235 | void __init early_ioremap_clear(void) |
236 | { | 236 | { |
237 | unsigned long *pgd; | 237 | unsigned long *pgd; |
238 | 238 | ||
239 | pgd = bt_ioremap_pgd(fix_to_virt(FIX_BTMAP_BEGIN)); | 239 | pgd = early_ioremap_pgd(fix_to_virt(FIX_BTMAP_BEGIN)); |
240 | *pgd = 0; | 240 | *pgd = 0; |
241 | __flush_tlb_all(); | 241 | __flush_tlb_all(); |
242 | } | 242 | } |
243 | 243 | ||
244 | void __init bt_ioremap_reset(void) | 244 | void __init early_ioremap_reset(void) |
245 | { | 245 | { |
246 | enum fixed_addresses idx; | 246 | enum fixed_addresses idx; |
247 | unsigned long *pte, phys, addr; | 247 | unsigned long *pte, phys, addr; |
@@ -249,7 +249,7 @@ void __init bt_ioremap_reset(void) | |||
249 | after_paging_init = 1; | 249 | after_paging_init = 1; |
250 | for (idx = FIX_BTMAP_BEGIN; idx <= FIX_BTMAP_END; idx--) { | 250 | for (idx = FIX_BTMAP_BEGIN; idx <= FIX_BTMAP_END; idx--) { |
251 | addr = fix_to_virt(idx); | 251 | addr = fix_to_virt(idx); |
252 | pte = bt_ioremap_pte(addr); | 252 | pte = early_ioremap_pte(addr); |
253 | if (!*pte & _PAGE_PRESENT) { | 253 | if (!*pte & _PAGE_PRESENT) { |
254 | phys = *pte & PAGE_MASK; | 254 | phys = *pte & PAGE_MASK; |
255 | set_fixmap(idx, phys); | 255 | set_fixmap(idx, phys); |
@@ -257,7 +257,7 @@ void __init bt_ioremap_reset(void) | |||
257 | } | 257 | } |
258 | } | 258 | } |
259 | 259 | ||
260 | static void __init __bt_set_fixmap(enum fixed_addresses idx, | 260 | static void __init __early_set_fixmap(enum fixed_addresses idx, |
261 | unsigned long phys, pgprot_t flags) | 261 | unsigned long phys, pgprot_t flags) |
262 | { | 262 | { |
263 | unsigned long *pte, addr = __fix_to_virt(idx); | 263 | unsigned long *pte, addr = __fix_to_virt(idx); |
@@ -266,7 +266,7 @@ static void __init __bt_set_fixmap(enum fixed_addresses idx, | |||
266 | BUG(); | 266 | BUG(); |
267 | return; | 267 | return; |
268 | } | 268 | } |
269 | pte = bt_ioremap_pte(addr); | 269 | pte = early_ioremap_pte(addr); |
270 | if (pgprot_val(flags)) | 270 | if (pgprot_val(flags)) |
271 | *pte = (phys & PAGE_MASK) | pgprot_val(flags); | 271 | *pte = (phys & PAGE_MASK) | pgprot_val(flags); |
272 | else | 272 | else |
@@ -274,24 +274,24 @@ static void __init __bt_set_fixmap(enum fixed_addresses idx, | |||
274 | __flush_tlb_one(addr); | 274 | __flush_tlb_one(addr); |
275 | } | 275 | } |
276 | 276 | ||
277 | static inline void __init bt_set_fixmap(enum fixed_addresses idx, | 277 | static inline void __init early_set_fixmap(enum fixed_addresses idx, |
278 | unsigned long phys) | 278 | unsigned long phys) |
279 | { | 279 | { |
280 | if (after_paging_init) | 280 | if (after_paging_init) |
281 | set_fixmap(idx, phys); | 281 | set_fixmap(idx, phys); |
282 | else | 282 | else |
283 | __bt_set_fixmap(idx, phys, PAGE_KERNEL); | 283 | __early_set_fixmap(idx, phys, PAGE_KERNEL); |
284 | } | 284 | } |
285 | 285 | ||
286 | static inline void __init bt_clear_fixmap(enum fixed_addresses idx) | 286 | static inline void __init early_clear_fixmap(enum fixed_addresses idx) |
287 | { | 287 | { |
288 | if (after_paging_init) | 288 | if (after_paging_init) |
289 | clear_fixmap(idx); | 289 | clear_fixmap(idx); |
290 | else | 290 | else |
291 | __bt_set_fixmap(idx, 0, __pgprot(0)); | 291 | __early_set_fixmap(idx, 0, __pgprot(0)); |
292 | } | 292 | } |
293 | 293 | ||
294 | void __init *bt_ioremap(unsigned long phys_addr, unsigned long size) | 294 | void __init *early_ioremap(unsigned long phys_addr, unsigned long size) |
295 | { | 295 | { |
296 | unsigned long offset, last_addr; | 296 | unsigned long offset, last_addr; |
297 | unsigned int nrpages; | 297 | unsigned int nrpages; |
@@ -327,7 +327,7 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size) | |||
327 | */ | 327 | */ |
328 | idx = FIX_BTMAP_BEGIN; | 328 | idx = FIX_BTMAP_BEGIN; |
329 | while (nrpages > 0) { | 329 | while (nrpages > 0) { |
330 | bt_set_fixmap(idx, phys_addr); | 330 | early_set_fixmap(idx, phys_addr); |
331 | phys_addr += PAGE_SIZE; | 331 | phys_addr += PAGE_SIZE; |
332 | --idx; | 332 | --idx; |
333 | --nrpages; | 333 | --nrpages; |
@@ -335,7 +335,7 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size) | |||
335 | return (void*) (offset + fix_to_virt(FIX_BTMAP_BEGIN)); | 335 | return (void*) (offset + fix_to_virt(FIX_BTMAP_BEGIN)); |
336 | } | 336 | } |
337 | 337 | ||
338 | void __init bt_iounmap(void *addr, unsigned long size) | 338 | void __init early_iounmap(void *addr, unsigned long size) |
339 | { | 339 | { |
340 | unsigned long virt_addr; | 340 | unsigned long virt_addr; |
341 | unsigned long offset; | 341 | unsigned long offset; |
@@ -350,7 +350,7 @@ void __init bt_iounmap(void *addr, unsigned long size) | |||
350 | 350 | ||
351 | idx = FIX_BTMAP_BEGIN; | 351 | idx = FIX_BTMAP_BEGIN; |
352 | while (nrpages > 0) { | 352 | while (nrpages > 0) { |
353 | bt_clear_fixmap(idx); | 353 | early_clear_fixmap(idx); |
354 | --idx; | 354 | --idx; |
355 | --nrpages; | 355 | --nrpages; |
356 | } | 356 | } |