Loading arch/arm/Kconfig +3 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,9 @@ config EARLY_IOREMAP the same virtual memory range as kmap so all early mappings must be unmapped before paging_init() is called. config FIX_EARLYCON_MEM def_bool EARLY_IOREMAP if ARM_DMA_USE_IOMMU config ARM_DMA_IOMMU_ALIGNMENT Loading arch/arm/include/asm/fixmap.h +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ enum fixed_addresses { extern void __early_set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags); #define __set_fixmap __early_set_fixmap #include <asm-generic/fixmap.h> #endif arch/arm/include/asm/mach/map.h +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ enum { }; #ifdef CONFIG_MMU extern void create_mapping(struct map_desc *); extern void iotable_init(struct map_desc *, int); extern void vm_reserve_area_early(unsigned long addr, unsigned long size, void *caller); Loading arch/arm/mm/early_ioremap.c +21 −0 Original line number Diff line number Diff line Loading @@ -86,5 +86,26 @@ void __init __early_set_fixmap(enum fixed_addresses idx, void __init early_ioremap_shutdown(void) { int i; pmd_clear(early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN))); /* Create new entries for permanent mappings */ for (i = 0; i < __end_of_permanent_fixed_addresses; i++) { pte_t *pte; struct map_desc map; map.virtual = fix_to_virt(i); pte = early_ioremap_pte(map.virtual); /* Only i/o device mappings are supported ATM */ if (pte_none(*pte) || (pte_val(*pte) & L_PTE_MT_MASK) != L_PTE_MT_DEV_SHARED) continue; map.pfn = pte_pfn(*pte); map.type = MT_DEVICE; map.length = PAGE_SIZE; create_mapping(&map); } } arch/arm/mm/mmu.c +3 −3 Original line number Diff line number Diff line Loading @@ -843,7 +843,7 @@ static void __init create_36bit_mapping(struct map_desc *md, * offsets, and we take full advantage of sections and * supersections. */ static void __init create_mapping(struct map_desc *md) void __init create_mapping(struct map_desc *md) { unsigned long addr, length, end; phys_addr_t phys; Loading @@ -858,7 +858,7 @@ static void __init create_mapping(struct map_desc *md) } if ((md->type == MT_DEVICE || md->type == MT_ROM) && md->virtual >= PAGE_OFFSET && md->virtual >= PAGE_OFFSET && md->virtual < 0xffc00000 && (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) { printk(KERN_WARNING "BUG: mapping for 0x%08llx" " at 0x%08lx out of vmalloc space\n", Loading Loading @@ -1238,7 +1238,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) early_trap_init(vectors); for (addr = VMALLOC_START; addr; addr += PMD_SIZE) for (addr = VMALLOC_START; addr < FIXADDR_START; addr += PMD_SIZE) pmd_clear(pmd_off_k(addr)); /* Loading Loading
arch/arm/Kconfig +3 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,9 @@ config EARLY_IOREMAP the same virtual memory range as kmap so all early mappings must be unmapped before paging_init() is called. config FIX_EARLYCON_MEM def_bool EARLY_IOREMAP if ARM_DMA_USE_IOMMU config ARM_DMA_IOMMU_ALIGNMENT Loading
arch/arm/include/asm/fixmap.h +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ enum fixed_addresses { extern void __early_set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags); #define __set_fixmap __early_set_fixmap #include <asm-generic/fixmap.h> #endif
arch/arm/include/asm/mach/map.h +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ enum { }; #ifdef CONFIG_MMU extern void create_mapping(struct map_desc *); extern void iotable_init(struct map_desc *, int); extern void vm_reserve_area_early(unsigned long addr, unsigned long size, void *caller); Loading
arch/arm/mm/early_ioremap.c +21 −0 Original line number Diff line number Diff line Loading @@ -86,5 +86,26 @@ void __init __early_set_fixmap(enum fixed_addresses idx, void __init early_ioremap_shutdown(void) { int i; pmd_clear(early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN))); /* Create new entries for permanent mappings */ for (i = 0; i < __end_of_permanent_fixed_addresses; i++) { pte_t *pte; struct map_desc map; map.virtual = fix_to_virt(i); pte = early_ioremap_pte(map.virtual); /* Only i/o device mappings are supported ATM */ if (pte_none(*pte) || (pte_val(*pte) & L_PTE_MT_MASK) != L_PTE_MT_DEV_SHARED) continue; map.pfn = pte_pfn(*pte); map.type = MT_DEVICE; map.length = PAGE_SIZE; create_mapping(&map); } }
arch/arm/mm/mmu.c +3 −3 Original line number Diff line number Diff line Loading @@ -843,7 +843,7 @@ static void __init create_36bit_mapping(struct map_desc *md, * offsets, and we take full advantage of sections and * supersections. */ static void __init create_mapping(struct map_desc *md) void __init create_mapping(struct map_desc *md) { unsigned long addr, length, end; phys_addr_t phys; Loading @@ -858,7 +858,7 @@ static void __init create_mapping(struct map_desc *md) } if ((md->type == MT_DEVICE || md->type == MT_ROM) && md->virtual >= PAGE_OFFSET && md->virtual >= PAGE_OFFSET && md->virtual < 0xffc00000 && (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) { printk(KERN_WARNING "BUG: mapping for 0x%08llx" " at 0x%08lx out of vmalloc space\n", Loading Loading @@ -1238,7 +1238,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) early_trap_init(vectors); for (addr = VMALLOC_START; addr; addr += PMD_SIZE) for (addr = VMALLOC_START; addr < FIXADDR_START; addr += PMD_SIZE) pmd_clear(pmd_off_k(addr)); /* Loading