|
@@ -568,12 +568,12 @@ static void __init __early_set_fixmap(enum fixed_addresses idx,
|
|
}
|
|
}
|
|
|
|
|
|
static inline void __init early_set_fixmap(enum fixed_addresses idx,
|
|
static inline void __init early_set_fixmap(enum fixed_addresses idx,
|
|
- unsigned long phys)
|
|
|
|
|
|
+ unsigned long phys, pgprot_t prot)
|
|
{
|
|
{
|
|
if (after_paging_init)
|
|
if (after_paging_init)
|
|
- set_fixmap(idx, phys);
|
|
|
|
|
|
+ __set_fixmap(idx, phys, prot);
|
|
else
|
|
else
|
|
- __early_set_fixmap(idx, phys, PAGE_KERNEL);
|
|
|
|
|
|
+ __early_set_fixmap(idx, phys, prot);
|
|
}
|
|
}
|
|
|
|
|
|
static inline void __init early_clear_fixmap(enum fixed_addresses idx)
|
|
static inline void __init early_clear_fixmap(enum fixed_addresses idx)
|
|
@@ -601,7 +601,7 @@ static int __init check_early_ioremap_leak(void)
|
|
}
|
|
}
|
|
late_initcall(check_early_ioremap_leak);
|
|
late_initcall(check_early_ioremap_leak);
|
|
|
|
|
|
-void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
|
|
|
|
|
|
+static void __init *__early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot)
|
|
{
|
|
{
|
|
unsigned long offset, last_addr;
|
|
unsigned long offset, last_addr;
|
|
unsigned int nrpages, nesting;
|
|
unsigned int nrpages, nesting;
|
|
@@ -650,7 +650,7 @@ void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
|
|
idx0 = FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*nesting;
|
|
idx0 = FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*nesting;
|
|
idx = idx0;
|
|
idx = idx0;
|
|
while (nrpages > 0) {
|
|
while (nrpages > 0) {
|
|
- early_set_fixmap(idx, phys_addr);
|
|
|
|
|
|
+ early_set_fixmap(idx, phys_addr, prot);
|
|
phys_addr += PAGE_SIZE;
|
|
phys_addr += PAGE_SIZE;
|
|
--idx;
|
|
--idx;
|
|
--nrpages;
|
|
--nrpages;
|
|
@@ -661,6 +661,18 @@ void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
|
|
return (void *) (offset + fix_to_virt(idx0));
|
|
return (void *) (offset + fix_to_virt(idx0));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/* Remap an IO device */
|
|
|
|
+void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
|
|
|
|
+{
|
|
|
|
+ return __early_ioremap(phys_addr, size, PAGE_KERNEL_IO);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* Remap memory */
|
|
|
|
+void __init *early_memremap(unsigned long phys_addr, unsigned long size)
|
|
|
|
+{
|
|
|
|
+ return __early_ioremap(phys_addr, size, PAGE_KERNEL);
|
|
|
|
+}
|
|
|
|
+
|
|
void __init early_iounmap(void *addr, unsigned long size)
|
|
void __init early_iounmap(void *addr, unsigned long size)
|
|
{
|
|
{
|
|
unsigned long virt_addr;
|
|
unsigned long virt_addr;
|