ARM: re-implement physical address space switching
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 4 Apr 2015 15:58:38 +0000 (16:58 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 1 Jun 2015 22:46:33 +0000 (23:46 +0100)
commitd8dc7fbd53eeb329a1dda5a19df7058b9c1c413e
tree9350da1b44869917801c2445f1faad7aecf23986
parentc0b759d87eab301af0380f5459057656178e78cf
ARM: re-implement physical address space switching

Re-implement the physical address space switching to be architecturally
compliant.  This involves flushing the caches, disabling the MMU, and
only then updating the page tables.  Once that is complete, the system
can be brought back up again.

Since we disable the MMU, we need to do the update in assembly code.
Luckily, the entries which need updating are fairly trivial, and are
all setup by the early assembly code.  We can merely adjust each entry
by the delta required.

Not only does this fix the code to be architecturally compliant, but it
fixes a couple of bugs too:

1. The original code would only ever update the first L2 entry covering
   a fraction of the kernel; the remainder were left untouched.
2. The L2 entries covering the DTB blob were likewise untouched.

This solution fixes up all entries.

Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/Kconfig
arch/arm/mm/Makefile
arch/arm/mm/mmu.c
arch/arm/mm/pv-fixup-asm.S [new file with mode: 0644]
This page took 0.026084 seconds and 5 git commands to generate.