]> Git Repo - linux.git/commit
MIPS: Fix CM region target definitions
authorPaul Burton <[email protected]>
Tue, 31 Oct 2017 22:09:22 +0000 (15:09 -0700)
committerJames Hogan <[email protected]>
Tue, 31 Oct 2017 23:54:20 +0000 (23:54 +0000)
commit6a6cba1d945a7511cdfaf338526871195e420762
tree505790d6355129f8e7aa1a2014313dacf5c0544c
parent7f005f112f527f0762386c6fd182966d0e066eaf
MIPS: Fix CM region target definitions

The default CM target field in the GCR_BASE register is encoded with 0
meaning memory & 1 being reserved. However the definitions we use for
those bits effectively get these two values backwards - likely because
they were copied from the definitions for the CM regions where the
target is encoded differently. This results in use setting up GCR_BASE
with the reserved target value by default, rather than targeting memory
as intended. Although we currently seem to get away with this it's not a
great idea to rely upon.

Fix this by changing our macros to match the documentated target values.

The incorrect encoding became used as of commit 9f98f3dd0c51 ("MIPS: Add
generic CM probe & access code") in the Linux v3.15 cycle, and was
likely carried forwards from older but unused code introduced by
commit 39b8d5254246 ("[MIPS] Add support for MIPS CMP platform.") in the
v2.6.26 cycle.

Fixes: 9f98f3dd0c51 ("MIPS: Add generic CM probe & access code")
Signed-off-by: Paul Burton <[email protected]>
Reported-by: Matt Redfearn <[email protected]>
Reviewed-by: James Hogan <[email protected]>
Cc: Matt Redfearn <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v3.15+
Patchwork: https://patchwork.linux-mips.org/patch/17562/
Signed-off-by: James Hogan <[email protected]>
arch/mips/include/asm/mips-cm.h
This page took 0.049085 seconds and 4 git commands to generate.