Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: asm/pm.h: Use platform agnostic macros

Use platform agnostic macros so it can be compiled on all
MIPS platforms.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Jiaxun Yang and committed by
Thomas Bogendoerfer
16c6d88f e6dc7bc5

+11 -11
+11 -11
arch/mips/include/asm/pm.h
··· 17 17 18 18 /* Save CPU state to stack for suspend to RAM */ 19 19 .macro SUSPEND_SAVE_REGS 20 - subu sp, PT_SIZE 20 + PTR_SUBU sp, PT_SIZE 21 21 /* Call preserved GPRs */ 22 22 LONG_S $16, PT_R16(sp) 23 23 LONG_S $17, PT_R17(sp) ··· 56 56 LONG_L $31, PT_R31(sp) 57 57 /* Pop and return */ 58 58 jr ra 59 - addiu sp, PT_SIZE 59 + PTR_ADDIU sp, PT_SIZE 60 60 .set pop 61 61 .endm 62 62 63 63 /* Get address of static suspend state into t1 */ 64 64 .macro LA_STATIC_SUSPEND 65 - la t1, mips_static_suspend_state 65 + PTR_LA t1, mips_static_suspend_state 66 66 .endm 67 67 68 68 /* Save important CPU state for early restoration to global data */ ··· 72 72 * Segment configuration is saved in global data where it can be easily 73 73 * reloaded without depending on the segment configuration. 74 74 */ 75 - mfc0 k0, CP0_PAGEMASK, 2 /* SegCtl0 */ 75 + mfc0 k0, CP0_SEGCTL0 76 76 LONG_S k0, SSS_SEGCTL0(t1) 77 - mfc0 k0, CP0_PAGEMASK, 3 /* SegCtl1 */ 77 + mfc0 k0, CP0_SEGCTL1 78 78 LONG_S k0, SSS_SEGCTL1(t1) 79 - mfc0 k0, CP0_PAGEMASK, 4 /* SegCtl2 */ 79 + mfc0 k0, CP0_SEGCTL2 80 80 LONG_S k0, SSS_SEGCTL2(t1) 81 81 #endif 82 82 /* save stack pointer (pointing to GPRs) */ ··· 92 92 * segments. 93 93 */ 94 94 LONG_L k0, SSS_SEGCTL0(t1) 95 - mtc0 k0, CP0_PAGEMASK, 2 /* SegCtl0 */ 95 + mtc0 k0, CP0_SEGCTL0 96 96 LONG_L k0, SSS_SEGCTL1(t1) 97 - mtc0 k0, CP0_PAGEMASK, 3 /* SegCtl1 */ 97 + mtc0 k0, CP0_SEGCTL1 98 98 LONG_L k0, SSS_SEGCTL2(t1) 99 - mtc0 k0, CP0_PAGEMASK, 4 /* SegCtl2 */ 99 + mtc0 k0, CP0_SEGCTL2 100 100 tlbw_use_hazard 101 101 #endif 102 102 /* restore stack pointer (pointing to GPRs) */ ··· 105 105 106 106 /* flush caches to make sure context has reached memory */ 107 107 .macro SUSPEND_CACHE_FLUSH 108 - .extern __wback_cache_all 108 + .extern __flush_cache_all 109 109 .set push 110 110 .set noreorder 111 - la t1, __wback_cache_all 111 + PTR_LA t1, __flush_cache_all 112 112 LONG_L t0, 0(t1) 113 113 jalr t0 114 114 nop