Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix probe_kernel_{read,write}().
  sparc64: Kill .fixup section bloat.
  sparc64: Don't hook up pcr_ops on spitfire chips.
  sparc64: Call dump_stack() in die_nmi().
  • Loading branch information
Linus Torvalds committed Feb 10, 2009
2 parents 29ef011 + aeb3987 commit 226b791
Show file tree
Hide file tree
Showing 17 changed files with 74 additions and 126 deletions.
31 changes: 28 additions & 3 deletions arch/sparc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -891,10 +891,35 @@ prom_tba: .xword 0
tlb_type: .word 0 /* Must NOT end up in BSS */
.section ".fixup",#alloc,#execinstr

.globl __ret_efault, __retl_efault
__ret_efault:
.globl __ret_efault, __retl_efault, __ret_one, __retl_one
ENTRY(__ret_efault)
ret
restore %g0, -EFAULT, %o0
__retl_efault:
ENDPROC(__ret_efault)

ENTRY(__retl_efault)
retl
mov -EFAULT, %o0
ENDPROC(__retl_efault)

ENTRY(__retl_one)
retl
mov 1, %o0
ENDPROC(__retl_one)

ENTRY(__ret_one_asi)
wr %g0, ASI_AIUS, %asi
ret
restore %g0, 1, %o0
ENDPROC(__ret_one_asi)

ENTRY(__retl_one_asi)
wr %g0, ASI_AIUS, %asi
retl
mov 1, %o0
ENDPROC(__retl_one_asi)

ENTRY(__retl_o1)
retl
mov %o1, %o0
ENDPROC(__retl_o1)
1 change: 1 addition & 0 deletions arch/sparc/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static void die_nmi(const char *str, struct pt_regs *regs, int do_panic)
printk(" on CPU%d, ip %08lx, registers:\n",
smp_processor_id(), regs->tpc);
show_regs(regs);
dump_stack();

bust_spinlocks(0);

Expand Down
7 changes: 6 additions & 1 deletion arch/sparc/kernel/pcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,16 @@ int __init pcr_arch_init(void)

case cheetah:
case cheetah_plus:
case spitfire:
pcr_ops = &direct_pcr_ops;
pcr_enable = PCR_SUN4U_ENABLE;
break;

case spitfire:
/* UltraSPARC-I/II and derivatives lack a profile
* counter overflow interrupt so we can't make use of
* their hardware currently.
*/
/* fallthrough */
default:
err = -ENODEV;
goto out_unregister;
Expand Down
6 changes: 1 addition & 5 deletions arch/sparc/lib/GENbzero.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@

#define EX_ST(x,y) \
98: x,y; \
.section .fixup; \
.align 4; \
99: retl; \
mov %o1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_o1; \
.text; \
.align 4;

Expand Down
8 changes: 2 additions & 6 deletions arch/sparc/lib/GENcopy_from_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

#define EX_LD(x) \
98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_one; \
.text; \
.align 4;

Expand All @@ -27,7 +23,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop
#endif

Expand Down
8 changes: 2 additions & 6 deletions arch/sparc/lib/GENcopy_to_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

#define EX_ST(x) \
98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_one; \
.text; \
.align 4;

Expand All @@ -31,7 +27,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop
#endif

Expand Down
9 changes: 2 additions & 7 deletions arch/sparc/lib/NG2copy_from_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@

#define EX_LD(x) \
98: x; \
.section .fixup; \
.align 4; \
99: wr %g0, ASI_AIUS, %asi;\
retl; \
mov 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_one_asi;\
.text; \
.align 4;

Expand All @@ -33,7 +28,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop
#endif

Expand Down
9 changes: 2 additions & 7 deletions arch/sparc/lib/NG2copy_to_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@

#define EX_ST(x) \
98: x; \
.section .fixup; \
.align 4; \
99: wr %g0, ASI_AIUS, %asi;\
retl; \
mov 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_one_asi;\
.text; \
.align 4;

Expand Down Expand Up @@ -42,7 +37,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop
#endif

Expand Down
6 changes: 1 addition & 5 deletions arch/sparc/lib/NGbzero.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@

#define EX_ST(x,y) \
98: x,y; \
.section .fixup; \
.align 4; \
99: retl; \
mov %o1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_o1; \
.text; \
.align 4;

Expand Down
9 changes: 2 additions & 7 deletions arch/sparc/lib/NGcopy_from_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@

#define EX_LD(x) \
98: x; \
.section .fixup; \
.align 4; \
99: wr %g0, ASI_AIUS, %asi;\
ret; \
restore %g0, 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __ret_one_asi;\
.text; \
.align 4;

Expand All @@ -30,7 +25,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop
#endif

Expand Down
9 changes: 2 additions & 7 deletions arch/sparc/lib/NGcopy_to_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@

#define EX_ST(x) \
98: x; \
.section .fixup; \
.align 4; \
99: wr %g0, ASI_AIUS, %asi;\
ret; \
restore %g0, 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __ret_one_asi;\
.text; \
.align 4;

Expand All @@ -33,7 +28,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop
#endif

Expand Down
8 changes: 2 additions & 6 deletions arch/sparc/lib/U1copy_from_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

#define EX_LD(x) \
98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_one; \
.text; \
.align 4;

Expand All @@ -27,7 +23,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop; \

#include "U1memcpy.S"
8 changes: 2 additions & 6 deletions arch/sparc/lib/U1copy_to_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

#define EX_ST(x) \
98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_one; \
.text; \
.align 4;

Expand All @@ -27,7 +23,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop; \

#include "U1memcpy.S"
6 changes: 1 addition & 5 deletions arch/sparc/lib/U3copy_from_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

#define EX_LD(x) \
98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_one; \
.text; \
.align 4;

Expand Down
8 changes: 2 additions & 6 deletions arch/sparc/lib/U3copy_to_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

#define EX_ST(x) \
98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_one; \
.text; \
.align 4;

Expand All @@ -27,7 +23,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \
bne,pn %icc, ___copy_in_user; \
nop; \

#include "U3memcpy.S"
6 changes: 1 addition & 5 deletions arch/sparc/lib/bzero.S
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,9 @@ __bzero_done:

#define EX_ST(x,y) \
98: x,y; \
.section .fixup; \
.align 4; \
99: retl; \
mov %o1, %o0; \
.section __ex_table,"a";\
.align 4; \
.word 98b, 99b; \
.word 98b, __retl_o1; \
.text; \
.align 4;

Expand Down
Loading

0 comments on commit 226b791

Please sign in to comment.