early_ioremap is a better interface for accessing this information than phys_to_virt as it works with highmem and other exotic types.
Signed-off-by: Al Stone al.stone@linaro.org Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- arch/arm/kernel/setup.c | 16 +++++++--------- drivers/acpi/Kconfig | 1 + drivers/acpi/plat/arm/boot.c | 12 ++---------- 3 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index b372798..c3ed159 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -888,8 +888,9 @@ void __init setup_arch(char **cmdline_p) sanity_check_meminfo(); arm_memblock_init(&meminfo, mdesc);
- paging_init(mdesc); - request_standard_resources(mdesc); +#ifdef CONFIG_ACPI + arm_acpi_reserve_memory(); +#endif
#ifdef CONFIG_ACPI /* @@ -897,10 +898,11 @@ void __init setup_arch(char **cmdline_p) */ acpi_boot_table_init(); early_acpi_boot_init(); + acpi_boot_init(); #endif -#ifdef CONFIG_ACPI - arm_acpi_reserve_memory(); -#endif + + paging_init(mdesc); + request_standard_resources(mdesc);
if (mdesc->restart) arm_pm_restart = mdesc->restart; @@ -941,10 +943,6 @@ void __init setup_arch(char **cmdline_p)
if (mdesc->init_early) mdesc->init_early(); - -#ifdef CONFIG_ACPI - acpi_boot_init(); -#endif }
#ifdef CONFIG_HAVE_PROC_CPU diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index b6f87a8..70813fe 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -4,6 +4,7 @@
config ACPI_ARM bool + select EARLY_IOREMAP
menuconfig ACPI bool "ACPI (Advanced Configuration and Power Interface) Support" diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 80792dc..4fcdd9f 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -103,17 +103,12 @@ static unsigned int gsi_to_irq(unsigned int gsi) return irq; }
-/* - * BOZO: is it reasonable to just reserve the memory space? Or are there - * other restrictions needed? Or does it need copying to some other place? - */ char *__init __acpi_map_table(phys_addr_t phys, unsigned long size) { if (!phys || !size) return NULL;
- /* we're already in memory so we cannot io_remap the entry */ - return phys_to_virt(phys); + return early_memremap(phys, size); }
void __init __acpi_unmap_table(char *map, unsigned long size) @@ -121,10 +116,7 @@ void __init __acpi_unmap_table(char *map, unsigned long size) if (!map || !size) return;
- /* we're already in memory so we cannot io_remap the entry; - * since we're not io_remap'ing, unmap'ing is especially - * pointless - */ + early_iounmap(map, size); return; }