diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-09 01:00:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-09 01:00:55 -0500 |
commit | 40bdac7dbc161639a498697f34fbd1ee800e51f4 (patch) | |
tree | 5eef654722ba36d2921cafd8440d5e346f0fbdb5 /arch/sparc/kernel/head_64.S | |
parent | 1c2f61d40b691789626489fa947a3e003c9a84be (diff) |
sparc64: Kill .fixup section bloat.
This is an implementation of a suggestion made by Chris Torek:
--------------------
Something else I noticed in passing: the EX and EX_LD/EX_ST macros
scattered throughout the various .S files make a fair bit of .fixup
code, all of which does the same thing. At the cost of one symbol
in copy_in_user.S, you could just have one common two-instruction
retl-and-mov-1 fixup that they all share.
--------------------
The following is with a defconfig build:
text data bss dec hex filename
3972767 344024 584449 4901240 4ac978 vmlinux.orig
3968887 344024 584449 4897360 4aba50 vmlinux
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/head_64.S')
-rw-r--r-- | arch/sparc/kernel/head_64.S | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index 8ffee714f932..a46c3a21e26d 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S | |||
@@ -891,10 +891,35 @@ prom_tba: .xword 0 | |||
891 | tlb_type: .word 0 /* Must NOT end up in BSS */ | 891 | tlb_type: .word 0 /* Must NOT end up in BSS */ |
892 | .section ".fixup",#alloc,#execinstr | 892 | .section ".fixup",#alloc,#execinstr |
893 | 893 | ||
894 | .globl __ret_efault, __retl_efault | 894 | .globl __ret_efault, __retl_efault, __ret_one, __retl_one |
895 | __ret_efault: | 895 | ENTRY(__ret_efault) |
896 | ret | 896 | ret |
897 | restore %g0, -EFAULT, %o0 | 897 | restore %g0, -EFAULT, %o0 |
898 | __retl_efault: | 898 | ENDPROC(__ret_efault) |
899 | |||
900 | ENTRY(__retl_efault) | ||
899 | retl | 901 | retl |
900 | mov -EFAULT, %o0 | 902 | mov -EFAULT, %o0 |
903 | ENDPROC(__retl_efault) | ||
904 | |||
905 | ENTRY(__retl_one) | ||
906 | retl | ||
907 | mov 1, %o0 | ||
908 | ENDPROC(__retl_one) | ||
909 | |||
910 | ENTRY(__ret_one_asi) | ||
911 | wr %g0, ASI_AIUS, %asi | ||
912 | ret | ||
913 | restore %g0, 1, %o0 | ||
914 | ENDPROC(__ret_one_asi) | ||
915 | |||
916 | ENTRY(__retl_one_asi) | ||
917 | wr %g0, ASI_AIUS, %asi | ||
918 | retl | ||
919 | mov 1, %o0 | ||
920 | ENDPROC(__retl_one_asi) | ||
921 | |||
922 | ENTRY(__retl_o1) | ||
923 | retl | ||
924 | mov %o1, %o0 | ||
925 | ENDPROC(__retl_o1) | ||