From: Thomas Bogendoerfer Date: Thu, 29 May 2008 20:05:07 +0000 (+0200) Subject: [MIPS] Malta: Fix build errors for 64-bit kernels X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=938b2b14172bd098972df2a5157bfabf161c90e5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [MIPS] Malta: Fix build errors for 64-bit kernels Fix 64-bit Malta by using CKSEG0ADDR and correct casts. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/mips-boards/generic/amon.c b/arch/mips/mips-boards/generic/amon.c index b7633fda4180..96236bf33838 100644 --- a/arch/mips/mips-boards/generic/amon.c +++ b/arch/mips/mips-boards/generic/amon.c @@ -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; diff --git a/include/asm-mips/gic.h b/include/asm-mips/gic.h index 3a492f225f00..954807d9d66a 100644 --- a/include/asm-mips/gic.h +++ b/include/asm-mips/gic.h @@ -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) \