Skip to contentSkip to conversation

MIPS: SmartMIPS: Fix build

PATCH In review Thierry Reding 3 participants 3 messages Oct 7, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: SmartMIPS: Fix build

All CONFIG_CPU_HAS_SMARTMIPS #ifdefs have been removed from code, but the ACX register declaration in struct pt_regs is still protected by it, causing builds to fail. Remove the #ifdef protection and always declare the register.

---
 arch/mips/include/asm/ptrace.h | 2 --
 1 file changed, 2 deletions(-)
arch/mips/include/asm/ptrace.h +0 -2
index 7bba9da..d47bdce 100644
@@ -33,9 +33,7 @@ struct pt_regs {
 	unsigned long cp0_status;
 	unsigned long hi;
 	unsigned long lo;
-#ifdef CONFIG_CPU_HAS_SMARTMIPS
 	unsigned long acx;
-#endif
 	unsigned long cp0_badvaddr;
 	unsigned long cp0_cause;
 	unsigned long cp0_epc;
Signature · 1 line
1.8.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Thierry Reding

All CONFIG_CPU_HAS_SMARTMIPS #ifdefs have been removed from code, but the ACX register declaration in struct pt_regs is still protected by it, causing builds to fail. Remove the #ifdef protection and always declare the register.

---
  arch/mips/include/asm/ptrace.h | 2 --
  1 file changed, 2 deletions(-)
arch/mips/include/asm/ptrace.h +0 -0
index 7bba9da..d47bdce 100644

arch/mips/include/asm/ptrace.h struct pt_regs { · line 39

Quoted 9 lines
arch/mips/include/asm/ptrace.h +0 -2
@@ -33,9 +33,7 @@ struct pt_regs {
  	unsigned long cp0_status;
  	unsigned long hi;
  	unsigned long lo;
-#ifdef CONFIG_CPU_HAS_SMARTMIPS
  	unsigned long acx;
-#endif
  	unsigned long cp0_badvaddr;
  	unsigned long cp0_cause;
  	unsigned long cp0_epc;

Hi Thierry,

Looks good to me. Thanks!

#2 lore raw
Quoted 29 lines · Markos Chandras
Quoted 16 lines · Thierry Reding

All CONFIG_CPU_HAS_SMARTMIPS #ifdefs have been removed from code, but the ACX register declaration in struct pt_regs is still protected by it, causing builds to fail. Remove the #ifdef protection and always declare the register.

---
 arch/mips/include/asm/ptrace.h | 2 --
 1 file changed, 2 deletions(-)
arch/mips/include/asm/ptrace.h +0 -0
index 7bba9da..d47bdce 100644

arch/mips/include/asm/ptrace.h struct pt_regs { · line 39

Quoted 9 lines
arch/mips/include/asm/ptrace.h +0 -2
@@ -33,9 +33,7 @@ struct pt_regs {
 	unsigned long cp0_status;
 	unsigned long hi;
 	unsigned long lo;
-#ifdef CONFIG_CPU_HAS_SMARTMIPS
 	unsigned long acx;
-#endif
 	unsigned long cp0_badvaddr;
 	unsigned long cp0_cause;
 	unsigned long cp0_epc;

Hi Thierry,

Quoted 3 lines

Looks good to me. Thanks!

Looking good - but I've already pulled the offending patch. Processor specific registers in the register frame have historically been a PITA - in particular because much of what's requiring space there is also requiring space in the signal frame and that's a kernel ABI.

Ralf