Skip to contentSkip to conversation

MIPS: BMIPS: Centralize FIXADDR_TOP

PATCH New Florian Fainelli 1 participant 3 messages May 4, 2015

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

cover MIPS: BMIPS: Centralize FIXADDR_TOP

Hi all,

This patch series centralizes the special FIXADDR_TOP value required when using BMIPS3300-class CPUs in Broadcom SoCs to avoid clashes with the System Base Register

Florian Fainelli (2):
MIPS: BMIPS: Define BMIPS_FIXADDR_TOP in asm/bmips-spaces.h
MIPS: BCM63xx: Utilize asm/bmips-spaces.h

 arch/mips/include/asm/bmips-spaces.h        | 7 +++++++
 arch/mips/include/asm/mach-bcm63xx/spaces.h | 2 +-
 arch/mips/include/asm/mach-bmips/spaces.h   | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 arch/mips/include/asm/bmips-spaces.h
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/2 MIPS: BMIPS: Define BMIPS_FIXADDR_TOP in asm/bmips-spaces.h

The FIXADDR_TOP value used by mach-bmips is in fact required whenever we run on BMIPS3300 BMIPS CPUs, and is not machine, but CPU-specific, move this constant to asm/bmips-spaces.h and use it in mach-bmips/spaces.h.

---
 arch/mips/include/asm/bmips-spaces.h      | 7 +++++++
 arch/mips/include/asm/mach-bmips/spaces.h | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 arch/mips/include/asm/bmips-spaces.h
arch/mips/include/asm/bmips-spaces.h new file +7 -0
new file mode 100644
index 000000000000..eb96541ae67e
@@ -0,0 +1,7 @@
+#ifndef __ASM_BMIPS_SPACES_H
+#define __ASM_BMIPS_SPACES_H
+
+/* Avoid collisions with system base register (SBR) region on BMIPS3300 */
+#define FIXADDR_TOP		((unsigned long)(long)(int)0xff000000)
+
+#endif /* __ASM_BMIPS_SPACES_H */
arch/mips/include/asm/mach-bmips/spaces.h +1 -1
index 1b05bddc8ec5..c59b28fd9e1d 100644
@@ -11,7 +11,7 @@
 #define _ASM_BMIPS_SPACES_H
 
 /* Avoid collisions with system base register (SBR) region on BMIPS3300 */
-#define FIXADDR_TOP		((unsigned long)(long)(int)0xff000000)
+#include <asm/bmips-spaces.h>
 
 #include <asm/mach-generic/spaces.h>
 
Signature · 1 line
2.1.0
#2 lore raw

PATCH 2/2 MIPS: BCM63xx: Utilize asm/bmips-spaces.h

In reply to Florian Fainelli

Since BCM63xx runs on BMIPS3300 which requires the use of a FIXADDR_TOP to avoid collisions with the SBR, utilize asm/bmips-spaces.h which defines FIXADDR_TOP for us now.

---
 arch/mips/include/asm/mach-bcm63xx/spaces.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/mach-bcm63xx/spaces.h +1 -1
index 61e750fb4653..1410ed0da4df 100644
@@ -10,7 +10,7 @@
 #ifndef _ASM_BCM63XX_SPACES_H
 #define _ASM_BCM63XX_SPACES_H
 
-#define FIXADDR_TOP		((unsigned long)(long)(int)0xff000000)
+#include <asm/bmips-spaces.h>
 
 #include <asm/mach-generic/spaces.h>
 
Signature · 1 line
2.1.0