m68knommu: fix overwriting of bits in ColdFire V3 cache control
authorGreg Ungerer <gerg@linux-m68k.org>
Sat, 13 Jun 2020 07:17:52 +0000 (17:17 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 09:49:05 +0000 (11:49 +0200)
commit2a9eccbe614edbb6960040d3940e1ece16a2679a
tree6c849d7230a8a18dc6c38e5fa833b85813981f33
parent4accb5af385b80d2cb68aa56fcbe818bcd6ee7b9
m68knommu: fix overwriting of bits in ColdFire V3 cache control

[ Upstream commit bdee0e793cea10c516ff48bf3ebb4ef1820a116b ]

The Cache Control Register (CACR) of the ColdFire V3 has bits that
control high level caching functions, and also enable/disable the use
of the alternate stack pointer register (the EUSP bit) to provide
separate supervisor and user stack pointer registers. The code as
it is today will blindly clear the EUSP bit on cache actions like
invalidation. So it is broken for this case - and that will result
in failed booting (interrupt entry and exit processing will be
completely hosed).

This only affects ColdFire V3 parts that support the alternate stack
register (like the 5329 for example) - generally speaking new parts do,
older parts don't. It has no impact on ColdFire V3 parts with the single
stack pointer, like the 5307 for example.

Fix the cache bit defines used, so they maintain the EUSP bit when
carrying out cache actions through the CACR register.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/m68k/include/asm/m53xxacr.h