[MIPS] Malta: Fix build errors for 64-bit kernels
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 29 May 2008 20:05:07 +0000 (22:05 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 16 Jun 2008 14:14:48 +0000 (15:14 +0100)
Fix 64-bit Malta by using CKSEG0ADDR and correct casts.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mips-boards/generic/amon.c
include/asm-mips/gic.h

index b7633fda4180510c4326b7c54f538a568a30216b..96236bf33838a20ef8ab147472adba28faf51bb9 100644 (file)
@@ -28,7 +28,7 @@
 
 int amon_cpu_avail(int cpu)
 {
-       struct cpulaunch *launch = (struct cpulaunch *)KSEG0ADDR(CPULAUNCH);
+       struct cpulaunch *launch = (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
 
        if (cpu < 0 || cpu >= NCPULAUNCH) {
                pr_debug("avail: cpu%d is out of range\n", cpu);
@@ -53,7 +53,7 @@ void amon_cpu_start(int cpu,
                    unsigned long gp, unsigned long a0)
 {
        volatile struct cpulaunch *launch =
-               (struct cpulaunch  *)KSEG0ADDR(CPULAUNCH);
+               (struct cpulaunch  *)CKSEG0ADDR(CPULAUNCH);
 
        if (!amon_cpu_avail(cpu))
                return;
index 3a492f225f009d2c4e4b9715e18a61d7c1cfa18d..954807d9d66ae82233cc48362c0ebeb7ce144eff 100644 (file)
@@ -24,8 +24,8 @@
 
 #define MSK(n) ((1 << (n)) - 1)
 #define REG32(addr)            (*(volatile unsigned int *) (addr))
-#define REG(base, offs)                REG32((unsigned int)(base) + offs##_##OFS)
-#define REGP(base, phys)       REG32((unsigned int)(base) + (phys))
+#define REG(base, offs)                REG32((unsigned long)(base) + offs##_##OFS)
+#define REGP(base, phys)       REG32((unsigned long)(base) + (phys))
 
 /* Accessors */
 #define GIC_REG(segment, offset) \