diff options
Diffstat (limited to 'arch/parisc/kernel/real2.S')
| -rw-r--r-- | arch/parisc/kernel/real2.S | 56 |
1 files changed, 22 insertions, 34 deletions
diff --git a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S index 5f3d3a1f9037..509d18b8e0e6 100644 --- a/arch/parisc/kernel/real2.S +++ b/arch/parisc/kernel/real2.S @@ -15,34 +15,15 @@ #include <linux/linkage.h> - - .section .bss - - .export pdc_result - .export pdc_result2 - .align 8 -pdc_result: - .block ASM_PDC_RESULT_SIZE -pdc_result2: - .block ASM_PDC_RESULT_SIZE - .export real_stack - .export real32_stack .export real64_stack - .align 64 + __PAGE_ALIGNED_BSS real_stack: -real32_stack: real64_stack: .block 8192 -#ifdef CONFIG_64BIT -# define REG_SZ 8 -#else -# define REG_SZ 4 -#endif - #define N_SAVED_REGS 9 - + .section .bss save_cr_space: .block REG_SZ * N_SAVED_REGS save_cr_end: @@ -61,7 +42,7 @@ save_cr_end: * iodc_fn is the IODC function to call */ -ENTRY(real32_call_asm) +ENTRY_CFI(real32_call_asm) STREG %rp, -RP_OFFSET(%sp) /* save RP */ #ifdef CONFIG_64BIT callee_save @@ -119,14 +100,14 @@ ric_ret: LDREG -RP_OFFSET(%sp), %rp /* restore RP */ bv 0(%rp) nop -ENDPROC(real32_call_asm) +ENDPROC_CFI(real32_call_asm) # define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where) # define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r .text -save_control_regs: +ENTRY_CFI(save_control_regs) load32 PA(save_cr_space), %r28 PUSH_CR(%cr24, %r28) PUSH_CR(%cr25, %r28) @@ -139,8 +120,9 @@ save_control_regs: PUSH_CR(%cr15, %r28) bv 0(%r2) nop +ENDPROC_CFI(save_control_regs) -restore_control_regs: +ENTRY_CFI(restore_control_regs) load32 PA(save_cr_end), %r26 POP_CR(%cr15, %r26) POP_CR(%cr31, %r26) @@ -153,13 +135,15 @@ restore_control_regs: POP_CR(%cr24, %r26) bv 0(%r2) nop +ENDPROC_CFI(restore_control_regs) /* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for * more general-purpose use by the several places which need RFIs */ .text .align 128 -rfi_virt2real: +ENTRY_CFI(rfi_virt2real) +#if !defined(BOOTLOADER) /* switch to real mode... */ rsm PSW_SM_I,%r0 load32 PA(rfi_v2r_1), %r1 @@ -189,12 +173,15 @@ rfi_virt2real: nop rfi_v2r_1: tophys_r1 %r2 +#endif /* defined(BOOTLOADER) */ bv 0(%r2) nop +ENDPROC_CFI(rfi_virt2real) .text .align 128 -rfi_real2virt: +ENTRY_CFI(rfi_real2virt) +#if !defined(BOOTLOADER) rsm PSW_SM_I,%r0 load32 (rfi_r2v_1), %r1 nop @@ -223,8 +210,10 @@ rfi_real2virt: nop rfi_r2v_1: tovirt_r1 %r2 +#endif /* defined(BOOTLOADER) */ bv 0(%r2) nop +ENDPROC_CFI(rfi_real2virt) #ifdef CONFIG_64BIT @@ -238,7 +227,7 @@ rfi_r2v_1: * arg0p points to where saved arg values may be found * iodc_fn is the IODC function to call */ -ENTRY(real64_call_asm) +ENTRY_CFI(real64_call_asm) std %rp, -0x10(%sp) /* save RP */ std %sp, -8(%arg0) /* save SP on real-mode stack */ copy %arg0, %sp /* adopt the real-mode SP */ @@ -246,9 +235,6 @@ ENTRY(real64_call_asm) /* save fn */ copy %arg2, %r31 - /* set up the new ap */ - ldo 64(%arg1), %r29 - /* load up the arg registers from the saved arg area */ /* 32-bit calling convention passes first 4 args in registers */ ldd 0*REG_SZ(%arg1), %arg0 /* note overwriting arg0 */ @@ -260,7 +246,9 @@ ENTRY(real64_call_asm) ldd 7*REG_SZ(%arg1), %r19 ldd 1*REG_SZ(%arg1), %arg1 /* do this one last! */ + /* set up real-mode stack and real-mode ap */ tophys_r1 %sp + ldo -16(%sp), %r29 /* Reference param save area */ b,l rfi_virt2real,%r2 nop @@ -284,7 +272,7 @@ r64_ret: ldd -0x10(%sp), %rp /* restore RP */ bv 0(%rp) nop -ENDPROC(real64_call_asm) +ENDPROC_CFI(real64_call_asm) #endif @@ -293,12 +281,12 @@ ENDPROC(real64_call_asm) ** GCC 3.3 and later has a new function in libgcc.a for ** comparing function pointers. */ -ENTRY(__canonicalize_funcptr_for_compare) +ENTRY_CFI(__canonicalize_funcptr_for_compare) #ifdef CONFIG_64BIT bve (%r2) #else bv %r0(%r2) #endif copy %r26,%r28 -ENDPROC(__canonicalize_funcptr_for_compare) +ENDPROC_CFI(__canonicalize_funcptr_for_compare) |
