]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sh: Enable the mmu in start_secondary()
authorMatt Fleming <matt@console-pimps.org>
Sun, 28 Mar 2010 20:08:25 +0000 (20:08 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:16 +0000 (07:41 -0700)
commit69fd993218cadae95f8315ce2ba2df2826f7475f
treeb6179c3a35365fe5214fbbd5cb98d8fa71a564d8
parent94aa7e9130a50f65acad20f67a872058001361b3
sh: Enable the mmu in start_secondary()

commit 4bea3418c737891894b9d3d3e9f8bbd67d66fa38 upstream.

For the boot, enable_mmu() is called from setup_arch() but we don't call
setup_arch() for any of the other cpus. So turn on the non-boot cpu's
mmu inside of start_secondary().

I noticed this bug on an SMP board when trying to map I/O memory
(smsc911x registers) into the kernel address space. Since the Address
Translation bit in MMUCR wasn't set, accessing the virtual address where
the smsc911x registers were supposedly mapped actually performed a
physical address access.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sh/kernel/smp.c