From eea68b551464538657fd89d8fa7c66adb3ca1a3a Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 17 Aug 2003 11:09:25 -0700 Subject: [PATCH] [SPARC64]: Fix syscall table base loading assembler. --- arch/sparc64/solaris/entry64.S | 5 ++++- arch/sparc64/solaris/systbl.S | 1 - include/asm-sparc64/ttable.h | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/sparc64/solaris/entry64.S b/arch/sparc64/solaris/entry64.S index f710edf1d6cdc..ba045302373ca 100644 --- a/arch/sparc64/solaris/entry64.S +++ b/arch/sparc64/solaris/entry64.S @@ -63,6 +63,8 @@ solaris_reg: mov %i4, %o4 linux_syscall_for_solaris: + sethi %hi(sys_call_table32), %l6 + or %l6, %lo(sys_call_table32), %l6 sll %l3, 2, %l4 ba,pt %xcc, 10f lduw [%l6 + %l4], %l3 @@ -77,6 +79,7 @@ entry64_personality_patch: bg,pn %icc, solaris_unimplemented srl %g1, 0, %g1 sethi %hi(solaris_sys_table), %l7 + or %l7, %lo(solaris_sys_table), %l7 brz,pn %g1, solaris_sucks mov %i4, %o4 sll %g1, 2, %l4 @@ -88,7 +91,7 @@ entry64_personality_patch: ldx [%g6 + TI_FLAGS], %l5 cmp %l3, NR_SYSCALLS bleu,a,pn %xcc, linux_syscall_for_solaris - sethi %hi(sys_call_table32), %l6 + nop andcc %l3, 1, %g0 bne,a,pn %icc, 10f add %sp, PTREGS_OFF, %o0 diff --git a/arch/sparc64/solaris/systbl.S b/arch/sparc64/solaris/systbl.S index 39ba2770b1a7b..3822937768938 100644 --- a/arch/sparc64/solaris/systbl.S +++ b/arch/sparc64/solaris/systbl.S @@ -21,7 +21,6 @@ #define solaris_semsys solaris_unimplemented .data - .align 1024 .globl solaris_sys_table solaris_sys_table: .word solaris_unimplemented /* nosys 0 */ diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index 828d1e145e6f7..6771343442333 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h @@ -95,9 +95,10 @@ sethi %hi(109f), %g7; \ ba,pt %xcc, scetrap; \ 109: or %g7, %lo(109b), %g7; \ + sethi %hi(systbl), %l7; \ ba,pt %xcc, routine; \ - sethi %hi(systbl), %l7; \ - nop; nop; nop; + or %l7, %lo(systbl), %l7; \ + nop; nop; #define INDIRECT_SOLARIS_SYSCALL(num) \ sethi %hi(109f), %g7; \ -- 2.53.0