aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang, Ying <ying.huang@intel.com>2008-01-30 07:33:44 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:44 -0500
commitbeacfaac3f23b30814aafee37a055257c7062ef3 (patch)
tree9a9a25cafa5fa4b79026caa8b0b442dc54b78889
parent4716e79c9946044a53a65418cfba04836f6a5c36 (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>
-rw-r--r--arch/x86/kernel/efi.c24
-rw-r--r--arch/x86/kernel/efi_32.c2
-rw-r--r--arch/x86/kernel/setup_32.c6
-rw-r--r--arch/x86/kernel/srat_32.c6
-rw-r--r--arch/x86/mm/init_32.c4
-rw-r--r--arch/x86/mm/ioremap_32.c38
-rw-r--r--include/asm-x86/dmi.h7
-rw-r--r--include/asm-x86/efi.h8
-rw-r--r--include/asm-x86/io_32.h16
9 files changed, 50 insertions, 61 deletions
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index 2939b015c2ed..5d492f99d967 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -256,12 +256,12 @@ void __init efi_init(void)
256 memmap.desc_version = boot_params.efi_info.efi_memdesc_version; 256 memmap.desc_version = boot_params.efi_info.efi_memdesc_version;
257 memmap.desc_size = boot_params.efi_info.efi_memdesc_size; 257 memmap.desc_size = boot_params.efi_info.efi_memdesc_size;
258 258
259 efi.systab = efi_early_ioremap((unsigned long)efi_phys.systab, 259 efi.systab = early_ioremap((unsigned long)efi_phys.systab,
260 sizeof(efi_system_table_t)); 260 sizeof(efi_system_table_t));
261 if (efi.systab == NULL) 261 if (efi.systab == NULL)
262 printk(KERN_ERR "Couldn't map the EFI system table!\n"); 262 printk(KERN_ERR "Couldn't map the EFI system table!\n");
263 memcpy(&efi_systab, efi.systab, sizeof(efi_system_table_t)); 263 memcpy(&efi_systab, efi.systab, sizeof(efi_system_table_t));
264 efi_early_iounmap(efi.systab, sizeof(efi_system_table_t)); 264 early_iounmap(efi.systab, sizeof(efi_system_table_t));
265 efi.systab = &efi_systab; 265 efi.systab = &efi_systab;
266 266
267 /* 267 /*
@@ -278,14 +278,14 @@ void __init efi_init(void)
278 /* 278 /*
279 * Show what we know for posterity 279 * Show what we know for posterity
280 */ 280 */
281 c16 = tmp = efi_early_ioremap(efi.systab->fw_vendor, 2); 281 c16 = tmp = early_ioremap(efi.systab->fw_vendor, 2);
282 if (c16) { 282 if (c16) {
283 for (i = 0; i < sizeof(vendor) && *c16; ++i) 283 for (i = 0; i < sizeof(vendor) && *c16; ++i)
284 vendor[i] = *c16++; 284 vendor[i] = *c16++;
285 vendor[i] = '\0'; 285 vendor[i] = '\0';
286 } else 286 } else
287 printk(KERN_ERR PFX "Could not map the firmware vendor!\n"); 287 printk(KERN_ERR PFX "Could not map the firmware vendor!\n");
288 efi_early_iounmap(tmp, 2); 288 early_iounmap(tmp, 2);
289 289
290 printk(KERN_INFO "EFI v%u.%.02u by %s \n", 290 printk(KERN_INFO "EFI v%u.%.02u by %s \n",
291 efi.systab->hdr.revision >> 16, 291 efi.systab->hdr.revision >> 16,
@@ -294,7 +294,7 @@ void __init efi_init(void)
294 /* 294 /*
295 * Let's see what config tables the firmware passed to us. 295 * Let's see what config tables the firmware passed to us.
296 */ 296 */
297 config_tables = efi_early_ioremap( 297 config_tables = early_ioremap(
298 efi.systab->tables, 298 efi.systab->tables,
299 efi.systab->nr_tables * sizeof(efi_config_table_t)); 299 efi.systab->nr_tables * sizeof(efi_config_table_t));
300 if (config_tables == NULL) 300 if (config_tables == NULL)
@@ -328,7 +328,7 @@ void __init efi_init(void)
328 } 328 }
329 } 329 }
330 printk("\n"); 330 printk("\n");
331 efi_early_iounmap(config_tables, 331 early_iounmap(config_tables,
332 efi.systab->nr_tables * sizeof(efi_config_table_t)); 332 efi.systab->nr_tables * sizeof(efi_config_table_t));
333 333
334 /* 334 /*
@@ -337,8 +337,8 @@ void __init efi_init(void)
337 * address of several of the EFI runtime functions, needed to 337 * address of several of the EFI runtime functions, needed to
338 * set the firmware into virtual mode. 338 * set the firmware into virtual mode.
339 */ 339 */
340 runtime = efi_early_ioremap((unsigned long)efi.systab->runtime, 340 runtime = early_ioremap((unsigned long)efi.systab->runtime,
341 sizeof(efi_runtime_services_t)); 341 sizeof(efi_runtime_services_t));
342 if (runtime != NULL) { 342 if (runtime != NULL) {
343 /* 343 /*
344 * We will only need *early* access to the following 344 * We will only need *early* access to the following
@@ -357,11 +357,11 @@ void __init efi_init(void)
357 } else 357 } else
358 printk(KERN_ERR "Could not map the EFI runtime service " 358 printk(KERN_ERR "Could not map the EFI runtime service "
359 "table!\n"); 359 "table!\n");
360 efi_early_iounmap(runtime, sizeof(efi_runtime_services_t)); 360 early_iounmap(runtime, sizeof(efi_runtime_services_t));
361 361
362 /* Map the EFI memory map */ 362 /* Map the EFI memory map */
363 memmap.map = efi_early_ioremap((unsigned long)memmap.phys_map, 363 memmap.map = early_ioremap((unsigned long)memmap.phys_map,
364 memmap.nr_map * memmap.desc_size); 364 memmap.nr_map * memmap.desc_size);
365 if (memmap.map == NULL) 365 if (memmap.map == NULL)
366 printk(KERN_ERR "Could not map the EFI memory map!\n"); 366 printk(KERN_ERR "Could not map the EFI memory map!\n");
367 memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size); 367 memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size);
diff --git a/arch/x86/kernel/efi_32.c b/arch/x86/kernel/efi_32.c
index afd2c3b039d6..114b896d7573 100644
--- a/arch/x86/kernel/efi_32.c
+++ b/arch/x86/kernel/efi_32.c
@@ -117,7 +117,7 @@ void __init efi_map_memmap(void)
117{ 117{
118 memmap.map = NULL; 118 memmap.map = NULL;
119 119
120 memmap.map = bt_ioremap((unsigned long) memmap.phys_map, 120 memmap.map = early_ioremap((unsigned long) memmap.phys_map,
121 (memmap.nr_map * memmap.desc_size)); 121 (memmap.nr_map * memmap.desc_size));
122 if (memmap.map == NULL) 122 if (memmap.map == NULL)
123 printk(KERN_ERR "Could not remap the EFI memmap!\n"); 123 printk(KERN_ERR "Could not remap the EFI memmap!\n");
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index 35db426de300..c038b09b1723 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -577,9 +577,9 @@ static void __init relocate_initrd(void)
577 if (clen > MAX_MAP_CHUNK-slop) 577 if (clen > MAX_MAP_CHUNK-slop)
578 clen = MAX_MAP_CHUNK-slop; 578 clen = MAX_MAP_CHUNK-slop;
579 mapaddr = ramdisk_image & PAGE_MASK; 579 mapaddr = ramdisk_image & PAGE_MASK;
580 p = bt_ioremap(mapaddr, clen+slop); 580 p = early_ioremap(mapaddr, clen+slop);
581 memcpy(q, p+slop, clen); 581 memcpy(q, p+slop, clen);
582 bt_iounmap(p, clen+slop); 582 early_iounmap(p, clen+slop);
583 q += clen; 583 q += clen;
584 ramdisk_image += clen; 584 ramdisk_image += clen;
585 ramdisk_size -= clen; 585 ramdisk_size -= clen;
@@ -697,7 +697,7 @@ void __init setup_arch(char **cmdline_p)
697 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); 697 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
698 pre_setup_arch_hook(); 698 pre_setup_arch_hook();
699 early_cpu_init(); 699 early_cpu_init();
700 bt_ioremap_init(); 700 early_ioremap_init();
701 701
702#ifdef CONFIG_EFI 702#ifdef CONFIG_EFI
703 if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, 703 if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature,
diff --git a/arch/x86/kernel/srat_32.c b/arch/x86/kernel/srat_32.c
index 24bfd4a9e62a..2bf6903cb444 100644
--- a/arch/x86/kernel/srat_32.c
+++ b/arch/x86/kernel/srat_32.c
@@ -297,7 +297,7 @@ int __init get_memcfg_from_srat(void)
297 } 297 }
298 298
299 rsdt = (struct acpi_table_rsdt *) 299 rsdt = (struct acpi_table_rsdt *)
300 bt_ioremap(rsdp->rsdt_physical_address, sizeof(struct acpi_table_rsdt)); 300 early_ioremap(rsdp->rsdt_physical_address, sizeof(struct acpi_table_rsdt));
301 301
302 if (!rsdt) { 302 if (!rsdt) {
303 printk(KERN_WARNING 303 printk(KERN_WARNING
@@ -337,11 +337,11 @@ int __init get_memcfg_from_srat(void)
337 for (i = 0; i < tables; i++) { 337 for (i = 0; i < tables; i++) {
338 /* Map in header, then map in full table length. */ 338 /* Map in header, then map in full table length. */
339 header = (struct acpi_table_header *) 339 header = (struct acpi_table_header *)
340 bt_ioremap(saved_rsdt.table.table_offset_entry[i], sizeof(struct acpi_table_header)); 340 early_ioremap(saved_rsdt.table.table_offset_entry[i], sizeof(struct acpi_table_header));
341 if (!header) 341 if (!header)
342 break; 342 break;
343 header = (struct acpi_table_header *) 343 header = (struct acpi_table_header *)
344 bt_ioremap(saved_rsdt.table.table_offset_entry[i], header->length); 344 early_ioremap(saved_rsdt.table.table_offset_entry[i], header->length);
345 if (!header) 345 if (!header)
346 break; 346 break;
347 347
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index f4e1894367a6..e00c1d7128b1 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -429,11 +429,11 @@ static void __init pagetable_init (void)
429 * Fixed mappings, only the page table structure has to be 429 * Fixed mappings, only the page table structure has to be
430 * created - mappings will be set by set_fixmap(): 430 * created - mappings will be set by set_fixmap():
431 */ 431 */
432 bt_ioremap_clear(); 432 early_ioremap_clear();
433 vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK; 433 vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
434 end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK; 434 end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK;
435 page_table_range_init(vaddr, end, pgd_base); 435 page_table_range_init(vaddr, end, pgd_base);
436 bt_ioremap_reset(); 436 early_ioremap_reset();
437 437
438 permanent_kmaps_init(pgd_base); 438 permanent_kmaps_init(pgd_base);
439 439
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;
212static __initdata unsigned long bm_pte[1024] 212static __initdata unsigned long bm_pte[1024]
213 __attribute__((aligned(PAGE_SIZE))); 213 __attribute__((aligned(PAGE_SIZE)));
214 214
215static inline unsigned long * __init bt_ioremap_pgd(unsigned long addr) 215static 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
220static inline unsigned long * __init bt_ioremap_pte(unsigned long addr) 220static 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
225void __init bt_ioremap_init(void) 225void __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
235void __init bt_ioremap_clear(void) 235void __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
244void __init bt_ioremap_reset(void) 244void __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
260static void __init __bt_set_fixmap(enum fixed_addresses idx, 260static 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
277static inline void __init bt_set_fixmap(enum fixed_addresses idx, 277static 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
286static inline void __init bt_clear_fixmap(enum fixed_addresses idx) 286static 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
294void __init *bt_ioremap(unsigned long phys_addr, unsigned long size) 294void __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
338void __init bt_iounmap(void *addr, unsigned long size) 338void __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 }
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h
index 5008c365e6e4..1241e6ad1935 100644
--- a/include/asm-x86/dmi.h
+++ b/include/asm-x86/dmi.h
@@ -5,9 +5,6 @@
5 5
6#ifdef CONFIG_X86_32 6#ifdef CONFIG_X86_32
7 7
8/* Use early IO mappings for DMI because it's initialized early */
9#define dmi_ioremap bt_ioremap
10#define dmi_iounmap bt_iounmap
11#define dmi_alloc alloc_bootmem 8#define dmi_alloc alloc_bootmem
12 9
13#else /* CONFIG_X86_32 */ 10#else /* CONFIG_X86_32 */
@@ -28,9 +25,9 @@ static inline void *dmi_alloc(unsigned len)
28 return dmi_alloc_data + idx; 25 return dmi_alloc_data + idx;
29} 26}
30 27
28#endif
29
31#define dmi_ioremap early_ioremap 30#define dmi_ioremap early_ioremap
32#define dmi_iounmap early_iounmap 31#define dmi_iounmap early_iounmap
33 32
34#endif 33#endif
35
36#endif
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h
index 10fcf20bdc73..8380131ca542 100644
--- a/include/asm-x86/efi.h
+++ b/include/asm-x86/efi.h
@@ -33,9 +33,6 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
33#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \ 33#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
34 efi_call_virt(f, a1, a2, a3, a4, a5, a6) 34 efi_call_virt(f, a1, a2, a3, a4, a5, a6)
35 35
36#define efi_early_ioremap(addr, size) bt_ioremap(addr, size)
37#define efi_early_iounmap(vaddr, size) bt_iounmap(vaddr, size)
38
39#define efi_ioremap(addr, size) ioremap(addr, size) 36#define efi_ioremap(addr, size) ioremap(addr, size)
40 37
41#define end_pfn_map max_low_pfn 38#define end_pfn_map max_low_pfn
@@ -91,13 +88,8 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
91 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 88 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
92 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) 89 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
93 90
94#define efi_early_ioremap(addr, size) early_ioremap(addr, size)
95#define efi_early_iounmap(vaddr, size) early_iounmap(vaddr, size)
96
97extern void *efi_ioremap(unsigned long offset, unsigned long size); 91extern void *efi_ioremap(unsigned long offset, unsigned long size);
98 92
99extern int efi_time;
100
101#endif /* CONFIG_X86_32 */ 93#endif /* CONFIG_X86_32 */
102 94
103extern void efi_reserve_bootmem(void); 95extern void efi_reserve_bootmem(void);
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h
index f7b733d9ace9..059a1fee4de3 100644
--- a/include/asm-x86/io_32.h
+++ b/include/asm-x86/io_32.h
@@ -135,20 +135,20 @@ static inline void __iomem * ioremap(unsigned long offset, unsigned long size)
135extern void iounmap(volatile void __iomem *addr); 135extern void iounmap(volatile void __iomem *addr);
136 136
137/* 137/*
138 * bt_ioremap() and bt_iounmap() are for temporary early boot-time 138 * early_ioremap() and early_iounmap() are for temporary early boot-time
139 * mappings, before the real ioremap() is functional. 139 * mappings, before the real ioremap() is functional.
140 * A boot-time mapping is currently limited to at most 16 pages. 140 * A boot-time mapping is currently limited to at most 16 pages.
141 */ 141 */
142extern void bt_ioremap_init(void); 142extern void early_ioremap_init(void);
143extern void bt_ioremap_clear(void); 143extern void early_ioremap_clear(void);
144extern void bt_ioremap_reset(void); 144extern void early_ioremap_reset(void);
145extern void *bt_ioremap(unsigned long offset, unsigned long size); 145extern void *early_ioremap(unsigned long offset, unsigned long size);
146extern void bt_iounmap(void *addr, unsigned long size); 146extern void early_iounmap(void *addr, unsigned long size);
147extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); 147extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
148 148
149/* Use early IO mappings for DMI because it's initialized early */ 149/* Use early IO mappings for DMI because it's initialized early */
150#define dmi_ioremap bt_ioremap 150#define dmi_ioremap early_ioremap
151#define dmi_iounmap bt_iounmap 151#define dmi_iounmap early_iounmap
152#define dmi_alloc alloc_bootmem 152#define dmi_alloc alloc_bootmem
153 153
154/* 154/*