MIPS: Avoid magic numbers probing kscratch_mask
authorJames Hogan <james.hogan@imgtec.com>
Wed, 11 May 2016 14:50:27 +0000 (15:50 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 13:30:25 +0000 (15:30 +0200)
commit9e575f753576d85e83ae0afc27eca9708259a797
tree3a8c171b002fed3835b6446d9bd25c80febe040d
parent30228c40f0c6f0a93910325f120904505a4c39cc
MIPS: Avoid magic numbers probing kscratch_mask

The decode_config4() function reads kscratch_mask from
CP0_Config4.KScrExist using a hard coded shift and mask. We already have
a definition for the mask in mipsregs.h, so add a definition for the
shift and make use of them.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13227/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/cpu-probe.c