Commit 81a02e34 authored by Markos Chandras's avatar Markos Chandras Committed by Ralf Baechle

MIPS: kernel: cps-vec: Replace 'la' macro with PTR_LA

The PTR_LA macro will pick the correct "la" or "dla" macro to
load an address to a register. This gets rids of the following
warnings (and others) when building a 64-bit CPS kernel:

arch/mips/kernel/cps-vec.S:63: Warning: la used to load 64-bit address
arch/mips/kernel/cps-vec.S:159: Warning: la used to load 64-bit address
arch/mips/kernel/cps-vec.S:220: Warning: la used to load 64-bit address
arch/mips/kernel/cps-vec.S:240: Warning: la used to load 64-bit address
[...]

Cc: <stable@vger.kernel.org> # 3.16+
Reviewed-by: default avatarPaul Burton <paul.burton@imgtec.com>
Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10587/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent fd5ed306
...@@ -60,7 +60,7 @@ LEAF(mips_cps_core_entry) ...@@ -60,7 +60,7 @@ LEAF(mips_cps_core_entry)
nop nop
/* This is an NMI */ /* This is an NMI */
la k0, nmi_handler PTR_LA k0, nmi_handler
jr k0 jr k0
nop nop
...@@ -156,7 +156,7 @@ dcache_done: ...@@ -156,7 +156,7 @@ dcache_done:
ehb ehb
/* Jump to kseg0 */ /* Jump to kseg0 */
la t0, 1f PTR_LA t0, 1f
jr t0 jr t0
nop nop
...@@ -217,7 +217,7 @@ LEAF(excep_intex) ...@@ -217,7 +217,7 @@ LEAF(excep_intex)
.org 0x480 .org 0x480
LEAF(excep_ejtag) LEAF(excep_ejtag)
la k0, ejtag_debug_handler PTR_LA k0, ejtag_debug_handler
jr k0 jr k0
nop nop
END(excep_ejtag) END(excep_ejtag)
...@@ -237,7 +237,7 @@ LEAF(mips_cps_core_init) ...@@ -237,7 +237,7 @@ LEAF(mips_cps_core_init)
/* ...and for the moment only 1 VPE */ /* ...and for the moment only 1 VPE */
dvpe dvpe
la t1, 1f PTR_LA t1, 1f
jr.hb t1 jr.hb t1
nop nop
...@@ -298,14 +298,14 @@ LEAF(mips_cps_core_init) ...@@ -298,14 +298,14 @@ LEAF(mips_cps_core_init)
LEAF(mips_cps_boot_vpes) LEAF(mips_cps_boot_vpes)
/* Retrieve CM base address */ /* Retrieve CM base address */
la t0, mips_cm_base PTR_LA t0, mips_cm_base
lw t0, 0(t0) lw t0, 0(t0)
/* Calculate a pointer to this cores struct core_boot_config */ /* Calculate a pointer to this cores struct core_boot_config */
lw t0, GCR_CL_ID_OFS(t0) lw t0, GCR_CL_ID_OFS(t0)
li t1, COREBOOTCFG_SIZE li t1, COREBOOTCFG_SIZE
mul t0, t0, t1 mul t0, t0, t1
la t1, mips_cps_core_bootcfg PTR_LA t1, mips_cps_core_bootcfg
lw t1, 0(t1) lw t1, 0(t1)
addu t0, t0, t1 addu t0, t0, t1
...@@ -351,7 +351,7 @@ LEAF(mips_cps_boot_vpes) ...@@ -351,7 +351,7 @@ LEAF(mips_cps_boot_vpes)
1: /* Enter VPE configuration state */ 1: /* Enter VPE configuration state */
dvpe dvpe
la t1, 1f PTR_LA t1, 1f
jr.hb t1 jr.hb t1
nop nop
1: mfc0 t1, CP0_MVPCONTROL 1: mfc0 t1, CP0_MVPCONTROL
...@@ -445,7 +445,7 @@ LEAF(mips_cps_boot_vpes) ...@@ -445,7 +445,7 @@ LEAF(mips_cps_boot_vpes)
/* This VPE should be offline, halt the TC */ /* This VPE should be offline, halt the TC */
li t0, TCHALT_H li t0, TCHALT_H
mtc0 t0, CP0_TCHALT mtc0 t0, CP0_TCHALT
la t0, 1f PTR_LA t0, 1f
1: jr.hb t0 1: jr.hb t0
nop nop
...@@ -466,10 +466,10 @@ LEAF(mips_cps_boot_vpes) ...@@ -466,10 +466,10 @@ LEAF(mips_cps_boot_vpes)
.set noat .set noat
lw $1, TI_CPU(gp) lw $1, TI_CPU(gp)
sll $1, $1, LONGLOG sll $1, $1, LONGLOG
la \dest, __per_cpu_offset PTR_LA \dest, __per_cpu_offset
addu $1, $1, \dest addu $1, $1, \dest
lw $1, 0($1) lw $1, 0($1)
la \dest, cps_cpu_state PTR_LA \dest, cps_cpu_state
addu \dest, \dest, $1 addu \dest, \dest, $1
.set pop .set pop
.endm .endm
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment