View | Details | Raw Unified | Return to bug 1043231
Collapse All | Expand All

(-)a/arch/arm/Kconfig (+1 lines)
Lines 21-26 config ARM Link Here
21
	select GENERIC_ALLOCATOR
21
	select GENERIC_ALLOCATOR
22
	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
22
	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
23
	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
23
	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
24
	select GENERIC_EARLY_IOREMAP
24
	select GENERIC_IDLE_POLL_SETUP
25
	select GENERIC_IDLE_POLL_SETUP
25
	select GENERIC_IRQ_PROBE
26
	select GENERIC_IRQ_PROBE
26
	select GENERIC_IRQ_SHOW
27
	select GENERIC_IRQ_SHOW
(-)a/arch/arm/include/asm/Kbuild (+1 lines)
Lines 3-8 Link Here
3
generic-y += bitsperlong.h
3
generic-y += bitsperlong.h
4
generic-y += cputime.h
4
generic-y += cputime.h
5
generic-y += current.h
5
generic-y += current.h
6
generic-y += early_ioremap.h
6
generic-y += emergency-restart.h
7
generic-y += emergency-restart.h
7
generic-y += errno.h
8
generic-y += errno.h
8
generic-y += exec.h
9
generic-y += exec.h
(-)a/arch/arm/include/asm/fixmap.h (-1 / +28 lines)
Lines 19-38 enum fixed_addresses { Link Here
19
	FIX_TEXT_POKE0,
19
	FIX_TEXT_POKE0,
20
	FIX_TEXT_POKE1,
20
	FIX_TEXT_POKE1,
21
21
22
	__end_of_fixed_addresses
22
	__end_of_fixmap_region,
23
24
	/*
25
	 * Share the kmap() region with early_ioremap(): this is guaranteed
26
	 * not to clash since early_ioremap() is only available before
27
	 * paging_init(), and kmap() only after.
28
	 */
29
#define NR_FIX_BTMAPS		32
30
#define FIX_BTMAPS_SLOTS	7
31
#define TOTAL_FIX_BTMAPS	(NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS)
32
33
	FIX_BTMAP_END = __end_of_permanent_fixed_addresses,
34
	FIX_BTMAP_BEGIN = FIX_BTMAP_END + TOTAL_FIX_BTMAPS - 1,
35
	__end_of_early_ioremap_region
23
};
36
};
24
37
38
static const enum fixed_addresses __end_of_fixed_addresses =
39
	__end_of_fixmap_region > __end_of_early_ioremap_region ?
40
	__end_of_fixmap_region : __end_of_early_ioremap_region;
41
25
#define FIXMAP_PAGE_COMMON	(L_PTE_YOUNG | L_PTE_PRESENT | L_PTE_XN | L_PTE_DIRTY)
42
#define FIXMAP_PAGE_COMMON	(L_PTE_YOUNG | L_PTE_PRESENT | L_PTE_XN | L_PTE_DIRTY)
26
43
27
#define FIXMAP_PAGE_NORMAL	(FIXMAP_PAGE_COMMON | L_PTE_MT_WRITEBACK)
44
#define FIXMAP_PAGE_NORMAL	(FIXMAP_PAGE_COMMON | L_PTE_MT_WRITEBACK)
45
#define FIXMAP_PAGE_RO		(FIXMAP_PAGE_NORMAL | L_PTE_RDONLY)
28
46
29
/* Used by set_fixmap_(io|nocache), both meant for mapping a device */
47
/* Used by set_fixmap_(io|nocache), both meant for mapping a device */
30
#define FIXMAP_PAGE_IO		(FIXMAP_PAGE_COMMON | L_PTE_MT_DEV_SHARED | L_PTE_SHARED)
48
#define FIXMAP_PAGE_IO		(FIXMAP_PAGE_COMMON | L_PTE_MT_DEV_SHARED | L_PTE_SHARED)
31
#define FIXMAP_PAGE_NOCACHE	FIXMAP_PAGE_IO
49
#define FIXMAP_PAGE_NOCACHE	FIXMAP_PAGE_IO
32
50
51
#define __early_set_fixmap	__set_fixmap
52
53
#ifdef CONFIG_MMU
54
33
void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
55
void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
34
void __init early_fixmap_init(void);
56
void __init early_fixmap_init(void);
35
57
36
#include <asm-generic/fixmap.h>
58
#include <asm-generic/fixmap.h>
37
59
60
#else
61
62
static inline void early_fixmap_init(void) { }
63
64
#endif
38
#endif
65
#endif
(-)a/arch/arm/kernel/setup.c (-2 / +5 lines)
Lines 40-45 Link Here
40
#include <asm/cputype.h>
40
#include <asm/cputype.h>
41
#include <asm/efi.h>
41
#include <asm/efi.h>
42
#include <asm/elf.h>
42
#include <asm/elf.h>
43
#include <asm/early_ioremap.h>
43
#include <asm/fixmap.h>
44
#include <asm/fixmap.h>
44
#include <asm/procinfo.h>
45
#include <asm/procinfo.h>
45
#include <asm/psci.h>
46
#include <asm/psci.h>
Lines 958-965 void __init setup_arch(char **cmdline_p) Link Here
958
	strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE);
959
	strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE);
959
	*cmdline_p = cmd_line;
960
	*cmdline_p = cmd_line;
960
961
961
	if (IS_ENABLED(CONFIG_FIX_EARLYCON_MEM))
962
	early_fixmap_init();
962
		early_fixmap_init();
963
	early_ioremap_init();
963
964
964
	parse_early_param();
965
	parse_early_param();
965
966
Lines 971-976 void __init setup_arch(char **cmdline_p) Link Here
971
	sanity_check_meminfo();
972
	sanity_check_meminfo();
972
	arm_memblock_init(mdesc);
973
	arm_memblock_init(mdesc);
973
974
975
	early_ioremap_reset();
976
974
	paging_init(mdesc);
977
	paging_init(mdesc);
975
	request_standard_resources(mdesc);
978
	request_standard_resources(mdesc);
976
979
(-)a/arch/arm/mm/ioremap.c (+9 lines)
Lines 30-35 Link Here
30
#include <asm/cp15.h>
30
#include <asm/cp15.h>
31
#include <asm/cputype.h>
31
#include <asm/cputype.h>
32
#include <asm/cacheflush.h>
32
#include <asm/cacheflush.h>
33
#include <asm/early_ioremap.h>
33
#include <asm/mmu_context.h>
34
#include <asm/mmu_context.h>
34
#include <asm/pgalloc.h>
35
#include <asm/pgalloc.h>
35
#include <asm/tlbflush.h>
36
#include <asm/tlbflush.h>
Lines 469-471 int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr) Link Here
469
}
470
}
470
EXPORT_SYMBOL_GPL(pci_ioremap_io);
471
EXPORT_SYMBOL_GPL(pci_ioremap_io);
471
#endif
472
#endif
473
474
/*
475
 * Must be called after early_fixmap_init
476
 */
477
void __init early_ioremap_init(void)
478
{
479
	early_ioremap_setup();
480
}
(-)a/arch/arm/mm/mmu.c (-2 / +1 lines)
Lines 390-396 void __init early_fixmap_init(void) Link Here
390
	 * The early fixmap range spans multiple pmds, for which
390
	 * The early fixmap range spans multiple pmds, for which
391
	 * we are not prepared:
391
	 * we are not prepared:
392
	 */
392
	 */
393
	BUILD_BUG_ON((__fix_to_virt(__end_of_permanent_fixed_addresses) >> PMD_SHIFT)
393
	BUILD_BUG_ON((__fix_to_virt(__end_of_early_ioremap_region) >> PMD_SHIFT)
394
		     != FIXADDR_TOP >> PMD_SHIFT);
394
		     != FIXADDR_TOP >> PMD_SHIFT);
395
395
396
	pmd = fixmap_pmd(FIXADDR_TOP);
396
	pmd = fixmap_pmd(FIXADDR_TOP);
397
- 

Return to bug 1043231