MIPS: KVM: Fix CP0_EBASE redefined build warning
PATCH 1/1 MIPS: KVM: Fix CP0_EBASE redefined build warning
The patch "MIPS: CPS: Early debug using an ns16550-compatible UART" in linux-next causes a build warning in locore.S by adding an identical definition of CP0_EBASE in asm/mipsregs.h.
arch/mips/kvm/locore.S:41:0: warning: "CP0_EBASE" redefined
#define CP0_EBASE $15,1
^
In file included from ./arch/mips/include/asm/msa.h:13:0,
from ./arch/mips/include/asm/asmmacro.h:13,
from arch/mips/kvm/locore.S:13:./arch/mips/include/asm/mipsregs.h:62:0: note: this is the location of the previous definition
#define CP0_EBASE $15, 1
^
Remove the definition in locore.S and move a few of the other similar definitions in asm/mipsregs.h too. CP0_INTCTL, CP0_SRSCTL, & CP0_SRSMAP are unused so they're just dropped instead. CP0_DDATA_LO is left where it is as I have patches to eliminate its use in locore.S and it otherwise is unlikely to need to be used from assembly code.
---
Ralf: Please can you take this patch, as the thing it fixes is in the mips-for-linux-next branch.
--- arch/mips/include/asm/mipsregs.h | 3 +++ arch/mips/kvm/locore.S | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-)
arch/mips/include/asm/mipsregs.h +3 -0
@@ -50,6 +50,7 @@#define CP0_PAGEMASK $5#define CP0_WIRED $6#define CP0_INFO $7 +#define CP0_HWRENA $7, 0#define CP0_BADVADDR $8#define CP0_BADINSTR $8, 1#define CP0_COUNT $9
@@ -62,6 +63,8 @@#define CP0_EBASE $15, 1#define CP0_CMGCRBASE $15, 3#define CP0_CONFIG $16 +#define CP0_CONFIG3 $16, 3 +#define CP0_CONFIG5 $16, 5#define CP0_LLADDR $17#define CP0_WATCHLO $18#define CP0_WATCHHI $19
arch/mips/kvm/locore.S +0 -8
@@ -36,14 +36,6 @@ #define PT_HOST_USERLOCAL PT_EPC #define CP0_DDATA_LO $28,3 -#define CP0_CONFIG3 $16,3 -#define CP0_CONFIG5 $16,5 -#define CP0_EBASE $15,1 - -#define CP0_INTCTL $12,1 -#define CP0_SRSCTL $12,2 -#define CP0_SRSMAP $12,3 -#define CP0_HWRENA $7,0 /* Resume Flags */ #define RESUME_FLAG_HOST (1<<1) /* Resume host? */
Signature · 1 line
2.4.10