Skip to content

Commit bdee0e7

Browse files
author
Greg Ungerer
committed
m68knommu: fix overwriting of bits in ColdFire V3 cache control
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 <[email protected]>
1 parent 416426a commit bdee0e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/m68k/include/asm/m53xxacr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
* coherency though in all cases. And for copyback caches we will need
9090
* to push cached data as well.
9191
*/
92-
#define CACHE_INIT CACR_CINVA
93-
#define CACHE_INVALIDATE CACR_CINVA
94-
#define CACHE_INVALIDATED CACR_CINVA
92+
#define CACHE_INIT (CACHE_MODE + CACR_CINVA - CACR_EC)
93+
#define CACHE_INVALIDATE (CACHE_MODE + CACR_CINVA)
94+
#define CACHE_INVALIDATED (CACHE_MODE + CACR_CINVA)
9595

9696
#define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \
9797
(0x000f0000) + \

0 commit comments

Comments
 (0)