]> git.baikalelectronics.ru Git - kernel.git/commit
sh: Replace unsafe manipulation of MMUCR
authorMatt Fleming <matt@console-pimps.org>
Sun, 21 Mar 2010 19:51:52 +0000 (19:51 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 23 Mar 2010 04:36:21 +0000 (13:36 +0900)
commitff6f0ddb10fb25ba2408e74175764dcec8dd87a7
treed87983aa0d009f6cfc5813f67bc4beffbd4fadf2
parent73284999551afe4841b5b5255d8ada62d0e5fac1
sh: Replace unsafe manipulation of MMUCR

Setting the TI in MMUCR causes all the TLB bits in MMUCR to be
cleared. Unfortunately, the TLB wired bits are also cleared when setting
the TI bit, causing any wired TLB entries to become unwired.

Use local_flush_tlb_all() which implements TLB flushing in a safer
manner by using the memory-mapped TLB registers. As each CPU has its own
PMB the modifications in pmb_init() only affect the local CPU, so only
flush the local CPU's TLB.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/pmb.c
arch/sh/mm/tlbflush_32.c