linux/arch/arm
Will Deacon 2c8951ab0c ARM: idmap: use idmap_pgd when setting up mm for reboot
For soft-rebooting a system, it is necessary to map the MMU-off code
with an identity mapping so that execution can continue safely once the
MMU has been switched off.

Currently, switch_mm_for_reboot takes out a 1:1 mapping from 0x0 to
TASK_SIZE during reboot in the hope that the reset code lives at a
physical address corresponding to a userspace virtual address.

This patch modifies the code so that we switch to the idmap_pgd tables,
which contain a 1:1 mapping of the cpu_reset code. This has the
advantage of only remapping the code that we need and also means we
don't need to worry about allocating a pgd from an atomic context in the
case that the physical address of the cpu_reset code aliases with the
virtual space used by the kernel.

Acked-by: Dave Martin <dave.martin@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2011-12-06 14:04:15 +00:00
..
boot arm/dt: Fix ventana SDHCI power-gpios 2011-11-09 11:24:37 -08:00
common ARM: VIC: remove non MULTI_IRQ_HANDLER support 2011-11-15 18:14:04 +00:00
configs ARM: EXYNOS: Add ARCH_EXYNOS and reorganize arch/arm/mach-exynos 2011-11-06 13:54:56 +09:00
include/asm ARM: idmap: populate identity map pgd at init time using .init.text 2011-12-06 14:04:14 +00:00
kernel ARM: suspend: use idmap_pgd instead of suspend_pgd 2011-12-06 14:04:14 +00:00
lib Merge branch 'misc' into for-linus 2011-10-25 08:19:59 +01:00
mach-at91 ARM: at91: Fix USBA gadget registration 2011-11-09 23:02:12 +08:00
mach-bcmring arm: fix implicit use of sched.h in bcmring/dma.c 2011-10-31 19:30:47 -04:00
mach-clps711x Merge branch 'restart-cleanup' into restart 2011-11-21 09:49:47 +00:00
mach-cns3xxx ARM: cns3xxx: convert to CONFIG_MULTI_IRQ_HANDLER 2011-11-15 18:14:02 +00:00
mach-davinci Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2011-11-07 10:13:52 -08:00
mach-dove Merge branch 'depends/rmk/memory_h' into next/cleanup2 2011-11-01 13:47:27 +01:00
mach-ebsa110 ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-ep93xx Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable 2011-11-21 21:56:56 +00:00
mach-exynos ARM: exynos4: Fix build error 2011-12-02 10:30:03 +00:00
mach-footbridge ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-gemini Merge branch 'depends/rmk/memory_h' into next/fixes 2011-11-01 00:25:01 +01:00
mach-h720x Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-28 12:02:27 -07:00
mach-highbank ARM: highbank: convert to CONFIG_MULTI_IRQ_HANDLER 2011-11-15 18:13:59 +00:00
mach-imx arm/imx: fix imx6q mmc error when mounting rootfs 2011-11-11 16:53:35 +01:00
mach-integrator Merge branch 'depends/rmk/memory_h' into next/cleanup2 2011-11-01 13:47:27 +01:00
mach-iop13xx arm: Add export.h to ARM specific files as required. 2011-10-31 19:30:50 -04:00
mach-iop32x Merge branch 'restart-cleanup' into restart 2011-11-21 09:49:47 +00:00
mach-iop33x ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-ixp4xx ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-ixp23xx Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-28 12:02:27 -07:00
mach-ixp2000 ARM: restart: remove local_irq_disable() from within arch_reset() 2011-11-17 17:09:30 +00:00
mach-kirkwood Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2011-11-07 10:13:52 -08:00
mach-ks8695 ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-l7200/include/mach ARM: add an extra temp register to the low level debugging addruart macro 2011-09-26 10:11:25 -04:00
mach-lpc32xx ARM: restart: remove local_irq_disable() from within arch_reset() 2011-11-17 17:09:30 +00:00
mach-mmp ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-msm ARM: GIC: Make MULTI_IRQ_HANDLER mandatory 2011-11-15 18:14:02 +00:00
mach-mv78xx0 Merge branch 'depends/rmk/memory_h' into next/fixes 2011-11-01 00:25:01 +01:00
mach-mx5 Merge branch 'imx-fixes-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes 2011-11-11 08:53:46 -08:00
mach-mxs Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable 2011-11-21 21:56:56 +00:00
mach-netx ARM: netx: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:03 +00:00
mach-nomadik ARM: nomadik: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:03 +00:00
mach-omap1 ARM: 7159/1: OMAP: Introduce local common.h files 2011-11-17 17:09:30 +00:00
mach-omap2 ARM: 7189/1: OMAP3: Fix build break in cpuidle34xx.c because of irq function 2011-12-05 23:19:50 +00:00
mach-orion5x Merge git://git.infradead.org/mtd-2.6 2011-11-07 09:11:16 -08:00
mach-picoxcell ARM: picoxcell: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:04 +00:00
mach-pnx4008 ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-prima2 Merge branch 'next/pm' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:22:01 -07:00
mach-pxa Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable 2011-11-21 21:56:56 +00:00
mach-realview ARM: RealView: convert to CONFIG_MULTI_IRQ_HANDLER 2011-11-15 18:13:59 +00:00
mach-rpc ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-s3c64xx Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable 2011-11-21 21:56:56 +00:00
mach-s3c2410 ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-s3c2412 Merge branch 'next/cleanup3' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:18:05 -07:00
mach-s3c2416 Merge branch 'next/devel2' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:21:21 -07:00
mach-s3c2440 Merge branch 'next/cleanup3' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:18:05 -07:00
mach-s3c2443 Merge branch 'next/devel2' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:21:21 -07:00
mach-s5p64x0 ARM: samsung: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:04 +00:00
mach-s5pc100 ARM: samsung: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:04 +00:00
mach-s5pv210 ARM: samsung: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:04 +00:00
mach-sa1100 ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
mach-shark ARM: restart: remove local_irq_disable() from within arch_reset() 2011-11-17 17:09:30 +00:00
mach-shmobile Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable 2011-11-21 21:56:56 +00:00
mach-spear3xx ARM: spear: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:03 +00:00
mach-spear6xx ARM: spear: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:03 +00:00
mach-tcc8k Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-28 12:02:27 -07:00
mach-tegra ARM: GIC: Make MULTI_IRQ_HANDLER mandatory 2011-11-15 18:14:02 +00:00
mach-u300 Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable 2011-11-21 21:56:56 +00:00
mach-ux500 ARM: GIC: Make MULTI_IRQ_HANDLER mandatory 2011-11-15 18:14:02 +00:00
mach-versatile ARM: versatile: convert to MULTI_IRQ_HANDLER 2011-11-15 18:14:04 +00:00
mach-vexpress ARM: VExpress: convert to CONFIG_MULTI_IRQ_HANDLER 2011-11-15 18:14:00 +00:00
mach-vt8500 Merge branch 'depends/rmk/memory_h' into next/fixes 2011-11-01 00:25:01 +01:00
mach-w90x900 Merge branch 'restart-cleanup' into restart 2011-11-21 09:49:47 +00:00
mach-zynq ARM: zynq: convert to CONFIG_MULTI_IRQ_HANDLER 2011-11-15 18:14:02 +00:00
mm ARM: idmap: use idmap_pgd when setting up mm for reboot 2011-12-06 14:04:15 +00:00
nwfpe
oprofile
plat-iop arm: Add export.h to ARM specific files as required. 2011-10-31 19:30:50 -04:00
plat-mxc Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable 2011-11-21 21:56:56 +00:00
plat-nomadik Merge branch 'next/timer' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:18:05 -07:00
plat-omap Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable 2011-11-21 21:56:56 +00:00
plat-orion
plat-pxa Merge git://git.infradead.org/mtd-2.6 2011-11-07 09:11:16 -08:00
plat-s3c24xx Merge branch 'next/devel2' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:21:21 -07:00
plat-s5p ARM: gic: allow GIC to support non-banked setups 2011-11-15 18:13:03 +00:00
plat-samsung arm: Add export.h to recently added files for EXPORT_SYMBOL 2011-11-07 10:28:58 -08:00
plat-spear ARM: restart: only perform setup for restart when soft-restarting 2011-11-21 09:47:48 +00:00
plat-tcc ARM: plat-tcc: remove mach/memory.h 2011-10-13 12:49:42 -04:00
plat-versatile ARM: versatile: convert logical CPU numbers to physical numbers 2011-10-17 10:01:11 +01:00
tools ARM: Add a few machine types to mach-types 2011-10-17 13:28:46 +01:00
vfp arm: remove several unnecessary module.h include instances 2011-10-31 19:30:48 -04:00
Kconfig ARM: VIC: remove non MULTI_IRQ_HANDLER support 2011-11-15 18:14:04 +00:00
Kconfig-nommu
Kconfig.debug Merge branch 'next/soc' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 21:08:03 -07:00
Makefile ARM: EXYNOS: Add ARCH_EXYNOS and reorganize arch/arm/mach-exynos 2011-11-06 13:54:56 +09:00