aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/Makefile1
-rw-r--r--arch/sparc64/kernel/binfmt_aout32.c3
-rw-r--r--arch/sparc64/kernel/binfmt_elf32.c136
-rw-r--r--arch/sparc64/kernel/irq.c2
-rw-r--r--arch/sparc64/kernel/process.c12
-rw-r--r--arch/sparc64/kernel/ptrace.c266
-rw-r--r--arch/sparc64/kernel/setup.c1
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c1
-rw-r--r--arch/sparc64/kernel/sys_sparc.c1
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c1
-rw-r--r--arch/sparc64/kernel/systbls.S2
11 files changed, 112 insertions, 314 deletions
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
index 4b78b24ef413..1bf5b187de49 100644
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -21,7 +21,6 @@ obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o \
21obj-$(CONFIG_PCI_MSI) += pci_msi.o 21obj-$(CONFIG_PCI_MSI) += pci_msi.o
22obj-$(CONFIG_SMP) += smp.o trampoline.o hvtramp.o 22obj-$(CONFIG_SMP) += smp.o trampoline.o hvtramp.o
23obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o 23obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o
24obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o
25obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o 24obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o
26obj-$(CONFIG_MODULES) += module.o 25obj-$(CONFIG_MODULES) += module.o
27obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o 26obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c
index 92c1b36a2e16..9877f2d7672d 100644
--- a/arch/sparc64/kernel/binfmt_aout32.c
+++ b/arch/sparc64/kernel/binfmt_aout32.c
@@ -32,6 +32,7 @@
32#include <asm/uaccess.h> 32#include <asm/uaccess.h>
33#include <asm/pgalloc.h> 33#include <asm/pgalloc.h>
34#include <asm/mmu_context.h> 34#include <asm/mmu_context.h>
35#include <asm/a.out-core.h>
35 36
36static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs); 37static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs);
37static int load_aout32_library(struct file*); 38static int load_aout32_library(struct file*);
@@ -101,7 +102,7 @@ static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file,
101 current->flags |= PF_DUMPCORE; 102 current->flags |= PF_DUMPCORE;
102 strncpy(dump.u_comm, current->comm, sizeof(dump.u_comm)); 103 strncpy(dump.u_comm, current->comm, sizeof(dump.u_comm));
103 dump.signal = signr; 104 dump.signal = signr;
104 dump_thread(regs, &dump); 105 aout_dump_thread(regs, &dump);
105 106
106/* If the size of the dump file exceeds the rlimit, then see what would happen 107/* If the size of the dump file exceeds the rlimit, then see what would happen
107 if we wrote the stack, but not the data area. */ 108 if we wrote the stack, but not the data area. */
diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c
deleted file mode 100644
index d141300e76b7..000000000000
--- a/arch/sparc64/kernel/binfmt_elf32.c
+++ /dev/null
@@ -1,136 +0,0 @@
1/*
2 * binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra.
3 *
4 * Copyright (C) 1995, 1996, 1997, 1998, 2008 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz)
6 */
7
8#define ELF_ARCH EM_SPARC
9#define ELF_CLASS ELFCLASS32
10#define ELF_DATA ELFDATA2MSB;
11
12/* Format is:
13 * G0 --> G7
14 * O0 --> O7
15 * L0 --> L7
16 * I0 --> I7
17 * PSR, PC, nPC, Y, WIM, TBR
18 */
19typedef unsigned int elf_greg_t;
20#define ELF_NGREG 38
21typedef elf_greg_t elf_gregset_t[ELF_NGREG];
22
23typedef struct {
24 union {
25 unsigned int pr_regs[32];
26 unsigned long pr_dregs[16];
27 } pr_fr;
28 unsigned int __unused;
29 unsigned int pr_fsr;
30 unsigned char pr_qcnt;
31 unsigned char pr_q_entrysize;
32 unsigned char pr_en;
33 unsigned int pr_q[64];
34} elf_fpregset_t;
35
36/* UltraSparc extensions. Still unused, but will be eventually. */
37typedef struct {
38 unsigned int pr_type;
39 unsigned int pr_align;
40 union {
41 struct {
42 union {
43 unsigned int pr_regs[32];
44 unsigned long pr_dregs[16];
45 long double pr_qregs[8];
46 } pr_xfr;
47 } pr_v8p;
48 unsigned int pr_xfsr;
49 unsigned int pr_fprs;
50 unsigned int pr_xg[8];
51 unsigned int pr_xo[8];
52 unsigned long pr_tstate;
53 unsigned int pr_filler[8];
54 } pr_un;
55} elf_xregset_t;
56
57#define elf_check_arch(x) (((x)->e_machine == EM_SPARC) || ((x)->e_machine == EM_SPARC32PLUS))
58
59#define ELF_ET_DYN_BASE 0x70000000
60
61
62#include <asm/processor.h>
63#include <linux/module.h>
64#include <linux/elfcore.h>
65#include <linux/compat.h>
66
67#define elf_prstatus elf_prstatus32
68struct elf_prstatus32
69{
70 struct elf_siginfo pr_info; /* Info associated with signal */
71 short pr_cursig; /* Current signal */
72 unsigned int pr_sigpend; /* Set of pending signals */
73 unsigned int pr_sighold; /* Set of held signals */
74 pid_t pr_pid;
75 pid_t pr_ppid;
76 pid_t pr_pgrp;
77 pid_t pr_sid;
78 struct compat_timeval pr_utime; /* User time */
79 struct compat_timeval pr_stime; /* System time */
80 struct compat_timeval pr_cutime; /* Cumulative user time */
81 struct compat_timeval pr_cstime; /* Cumulative system time */
82 elf_gregset_t pr_reg; /* GP registers */
83 int pr_fpvalid; /* True if math co-processor being used. */
84};
85
86#define elf_prpsinfo elf_prpsinfo32
87struct elf_prpsinfo32
88{
89 char pr_state; /* numeric process state */
90 char pr_sname; /* char for pr_state */
91 char pr_zomb; /* zombie */
92 char pr_nice; /* nice val */
93 unsigned int pr_flag; /* flags */
94 u16 pr_uid;
95 u16 pr_gid;
96 pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
97 /* Lots missing */
98 char pr_fname[16]; /* filename of executable */
99 char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */
100};
101
102#include <linux/highuid.h>
103
104#undef NEW_TO_OLD_UID
105#undef NEW_TO_OLD_GID
106#define NEW_TO_OLD_UID(uid) ((uid) > 65535) ? (u16)overflowuid : (u16)(uid)
107#define NEW_TO_OLD_GID(gid) ((gid) > 65535) ? (u16)overflowgid : (u16)(gid)
108
109#include <linux/time.h>
110
111#undef cputime_to_timeval
112#define cputime_to_timeval cputime_to_compat_timeval
113static inline void
114cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value)
115{
116 unsigned long jiffies = cputime_to_jiffies(cputime);
117 value->tv_usec = (jiffies % HZ) * (1000000L / HZ);
118 value->tv_sec = jiffies / HZ;
119}
120
121#undef start_thread
122#define start_thread start_thread32
123#define init_elf_binfmt init_elf32_binfmt
124
125MODULE_DESCRIPTION("Binary format loader for compatibility with 32bit SparcLinux binaries on the Ultra");
126MODULE_AUTHOR("Eric Youngdale, David S. Miller, Jakub Jelinek");
127
128#undef MODULE_DESCRIPTION
129#undef MODULE_AUTHOR
130
131#include <asm/a.out.h>
132
133#undef TASK_SIZE
134#define TASK_SIZE STACK_TOP32
135
136#include "../../../fs/binfmt_elf.c"
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 30431bd24e1e..5ec06c8c7fea 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -522,7 +522,7 @@ static struct irq_chip sun4v_virq = {
522 .set_affinity = sun4v_virt_set_affinity, 522 .set_affinity = sun4v_virt_set_affinity,
523}; 523};
524 524
525static void fastcall pre_flow_handler(unsigned int virt_irq, 525static void pre_flow_handler(unsigned int virt_irq,
526 struct irq_desc *desc) 526 struct irq_desc *desc)
527{ 527{
528 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 528 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index ca7cdfd55f72..1b2379174988 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -24,7 +24,6 @@
24#include <linux/ptrace.h> 24#include <linux/ptrace.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/user.h> 26#include <linux/user.h>
27#include <linux/a.out.h>
28#include <linux/reboot.h> 27#include <linux/reboot.h>
29#include <linux/delay.h> 28#include <linux/delay.h>
30#include <linux/compat.h> 29#include <linux/compat.h>
@@ -725,17 +724,6 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
725 return retval; 724 return retval;
726} 725}
727 726
728/*
729 * fill in the user structure for a core dump..
730 */
731void dump_thread(struct pt_regs * regs, struct user * dump)
732{
733 /* Only should be used for SunOS and ancient a.out
734 * SparcLinux binaries... Not worth implementing.
735 */
736 memset(dump, 0, sizeof(struct user));
737}
738
739typedef struct { 727typedef struct {
740 union { 728 union {
741 unsigned int pr_regs[32]; 729 unsigned int pr_regs[32];
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index 51f012410f9d..9a1ba1fe859d 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -684,72 +684,39 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
684 return &user_sparc64_view; 684 return &user_sparc64_view;
685} 685}
686 686
687long arch_ptrace(struct task_struct *child, long request, long addr, long data) 687struct compat_fps {
688 unsigned int regs[32];
689 unsigned int fsr;
690 unsigned int flags;
691 unsigned int extra;
692 unsigned int fpqd;
693 struct compat_fq {
694 unsigned int insnaddr;
695 unsigned int insn;
696 } fpq[16];
697};
698
699long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
700 compat_ulong_t caddr, compat_ulong_t cdata)
688{ 701{
689 long addr2 = task_pt_regs(current)->u_regs[UREG_I4]; 702 const struct user_regset_view *view = task_user_regset_view(child);
690 const struct user_regset_view *view; 703 compat_ulong_t caddr2 = task_pt_regs(current)->u_regs[UREG_I4];
704 struct pt_regs32 __user *pregs;
705 struct compat_fps __user *fps;
706 unsigned long addr2 = caddr2;
707 unsigned long addr = caddr;
708 unsigned long data = cdata;
691 int ret; 709 int ret;
692 710
693 if (test_thread_flag(TIF_32BIT)) 711 pregs = (struct pt_regs32 __user *) addr;
694 addr2 &= 0xffffffffUL; 712 fps = (struct compat_fps __user *) addr;
695 713
696 view = task_user_regset_view(child); 714 switch (request) {
697
698 switch(request) {
699 case PTRACE_PEEKUSR: 715 case PTRACE_PEEKUSR:
700 ret = (addr != 0) ? -EIO : 0; 716 ret = (addr != 0) ? -EIO : 0;
701 break; 717 break;
702 718
703 case PTRACE_PEEKTEXT: /* read word at location addr. */ 719 case PTRACE_GETREGS:
704 case PTRACE_PEEKDATA: {
705 unsigned long tmp64;
706 unsigned int tmp32;
707 int copied;
708
709 ret = -EIO;
710 if (test_thread_flag(TIF_32BIT)) {
711 copied = access_process_vm(child, addr,
712 &tmp32, sizeof(tmp32), 0);
713 if (copied == sizeof(tmp32))
714 ret = put_user(tmp32,
715 (unsigned int __user *) data);
716 } else {
717 copied = access_process_vm(child, addr,
718 &tmp64, sizeof(tmp64), 0);
719 if (copied == sizeof(tmp64))
720 ret = put_user(tmp64,
721 (unsigned long __user *) data);
722 }
723 break;
724 }
725
726 case PTRACE_POKETEXT: /* write the word at location addr. */
727 case PTRACE_POKEDATA: {
728 unsigned long tmp64;
729 unsigned int tmp32;
730 int copied;
731
732 ret = -EIO;
733 if (test_thread_flag(TIF_32BIT)) {
734 tmp32 = data;
735 copied = access_process_vm(child, addr,
736 &tmp32, sizeof(tmp32), 1);
737 if (copied == sizeof(tmp32))
738 ret = 0;
739 } else {
740 tmp64 = data;
741 copied = access_process_vm(child, addr,
742 &tmp64, sizeof(tmp64), 1);
743 if (copied == sizeof(tmp64))
744 ret = 0;
745 }
746 break;
747 }
748
749 case PTRACE_GETREGS: {
750 struct pt_regs32 __user *pregs =
751 (struct pt_regs32 __user *) addr;
752
753 ret = copy_regset_to_user(child, view, REGSET_GENERAL, 720 ret = copy_regset_to_user(child, view, REGSET_GENERAL,
754 32 * sizeof(u32), 721 32 * sizeof(u32),
755 4 * sizeof(u32), 722 4 * sizeof(u32),
@@ -760,29 +727,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
760 15 * sizeof(u32), 727 15 * sizeof(u32),
761 &pregs->u_regs[0]); 728 &pregs->u_regs[0]);
762 break; 729 break;
763 }
764
765 case PTRACE_GETREGS64: {
766 struct pt_regs __user *pregs = (struct pt_regs __user *) addr;
767
768 ret = copy_regset_to_user(child, view, REGSET_GENERAL,
769 1 * sizeof(u64),
770 15 * sizeof(u64),
771 &pregs->u_regs[0]);
772 if (!ret) {
773 /* XXX doesn't handle 'y' register correctly XXX */
774 ret = copy_regset_to_user(child, view, REGSET_GENERAL,
775 32 * sizeof(u64),
776 4 * sizeof(u64),
777 &pregs->tstate);
778 }
779 break;
780 }
781
782 case PTRACE_SETREGS: {
783 struct pt_regs32 __user *pregs =
784 (struct pt_regs32 __user *) addr;
785 730
731 case PTRACE_SETREGS:
786 ret = copy_regset_from_user(child, view, REGSET_GENERAL, 732 ret = copy_regset_from_user(child, view, REGSET_GENERAL,
787 32 * sizeof(u32), 733 32 * sizeof(u32),
788 4 * sizeof(u32), 734 4 * sizeof(u32),
@@ -793,39 +739,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
793 15 * sizeof(u32), 739 15 * sizeof(u32),
794 &pregs->u_regs[0]); 740 &pregs->u_regs[0]);
795 break; 741 break;
796 }
797
798 case PTRACE_SETREGS64: {
799 struct pt_regs __user *pregs = (struct pt_regs __user *) addr;
800
801 ret = copy_regset_from_user(child, view, REGSET_GENERAL,
802 1 * sizeof(u64),
803 15 * sizeof(u64),
804 &pregs->u_regs[0]);
805 if (!ret) {
806 /* XXX doesn't handle 'y' register correctly XXX */
807 ret = copy_regset_from_user(child, view, REGSET_GENERAL,
808 32 * sizeof(u64),
809 4 * sizeof(u64),
810 &pregs->tstate);
811 }
812 break;
813 }
814
815 case PTRACE_GETFPREGS: {
816 struct fps {
817 unsigned int regs[32];
818 unsigned int fsr;
819 unsigned int flags;
820 unsigned int extra;
821 unsigned int fpqd;
822 struct fq {
823 unsigned int insnaddr;
824 unsigned int insn;
825 } fpq[16];
826 };
827 struct fps __user *fps = (struct fps __user *) addr;
828 742
743 case PTRACE_GETFPREGS:
829 ret = copy_regset_to_user(child, view, REGSET_FP, 744 ret = copy_regset_to_user(child, view, REGSET_FP,
830 0 * sizeof(u32), 745 0 * sizeof(u32),
831 32 * sizeof(u32), 746 32 * sizeof(u32),
@@ -843,36 +758,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
843 ret = -EFAULT; 758 ret = -EFAULT;
844 } 759 }
845 break; 760 break;
846 }
847
848 case PTRACE_GETFPREGS64: {
849 struct fps {
850 unsigned int regs[64];
851 unsigned long fsr;
852 };
853 struct fps __user *fps = (struct fps __user *) addr;
854
855 ret = copy_regset_to_user(child, view, REGSET_FP,
856 0 * sizeof(u64),
857 33 * sizeof(u64),
858 fps);
859 break;
860 }
861
862 case PTRACE_SETFPREGS: {
863 struct fps {
864 unsigned int regs[32];
865 unsigned int fsr;
866 unsigned int flags;
867 unsigned int extra;
868 unsigned int fpqd;
869 struct fq {
870 unsigned int insnaddr;
871 unsigned int insn;
872 } fpq[16];
873 };
874 struct fps __user *fps = (struct fps __user *) addr;
875 761
762 case PTRACE_SETFPREGS:
876 ret = copy_regset_from_user(child, view, REGSET_FP, 763 ret = copy_regset_from_user(child, view, REGSET_FP,
877 0 * sizeof(u32), 764 0 * sizeof(u32),
878 32 * sizeof(u32), 765 32 * sizeof(u32),
@@ -883,21 +770,94 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
883 1 * sizeof(u32), 770 1 * sizeof(u32),
884 &fps->fsr); 771 &fps->fsr);
885 break; 772 break;
773
774 case PTRACE_READTEXT:
775 case PTRACE_READDATA:
776 ret = ptrace_readdata(child, addr,
777 (char __user *)addr2, data);
778 if (ret == data)
779 ret = 0;
780 else if (ret >= 0)
781 ret = -EIO;
782 break;
783
784 case PTRACE_WRITETEXT:
785 case PTRACE_WRITEDATA:
786 ret = ptrace_writedata(child, (char __user *) addr2,
787 addr, data);
788 if (ret == data)
789 ret = 0;
790 else if (ret >= 0)
791 ret = -EIO;
792 break;
793
794 default:
795 ret = compat_ptrace_request(child, request, addr, data);
796 break;
886 } 797 }
887 798
888 case PTRACE_SETFPREGS64: { 799 return ret;
889 struct fps { 800}
890 unsigned int regs[64]; 801
891 unsigned long fsr; 802struct fps {
892 }; 803 unsigned int regs[64];
893 struct fps __user *fps = (struct fps __user *) addr; 804 unsigned long fsr;
805};
806
807long arch_ptrace(struct task_struct *child, long request, long addr, long data)
808{
809 const struct user_regset_view *view = task_user_regset_view(child);
810 struct pt_regs __user *pregs = (struct pt_regs __user *) addr;
811 unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4];
812 struct fps __user *fps = (struct fps __user *) addr;
813 int ret;
814
815 switch (request) {
816 case PTRACE_PEEKUSR:
817 ret = (addr != 0) ? -EIO : 0;
818 break;
894 819
820 case PTRACE_GETREGS64:
821 ret = copy_regset_to_user(child, view, REGSET_GENERAL,
822 1 * sizeof(u64),
823 15 * sizeof(u64),
824 &pregs->u_regs[0]);
825 if (!ret) {
826 /* XXX doesn't handle 'y' register correctly XXX */
827 ret = copy_regset_to_user(child, view, REGSET_GENERAL,
828 32 * sizeof(u64),
829 4 * sizeof(u64),
830 &pregs->tstate);
831 }
832 break;
833
834 case PTRACE_SETREGS64:
835 ret = copy_regset_from_user(child, view, REGSET_GENERAL,
836 1 * sizeof(u64),
837 15 * sizeof(u64),
838 &pregs->u_regs[0]);
839 if (!ret) {
840 /* XXX doesn't handle 'y' register correctly XXX */
841 ret = copy_regset_from_user(child, view, REGSET_GENERAL,
842 32 * sizeof(u64),
843 4 * sizeof(u64),
844 &pregs->tstate);
845 }
846 break;
847
848 case PTRACE_GETFPREGS64:
849 ret = copy_regset_to_user(child, view, REGSET_FP,
850 0 * sizeof(u64),
851 33 * sizeof(u64),
852 fps);
853 break;
854
855 case PTRACE_SETFPREGS64:
895 ret = copy_regset_to_user(child, view, REGSET_FP, 856 ret = copy_regset_to_user(child, view, REGSET_FP,
896 0 * sizeof(u64), 857 0 * sizeof(u64),
897 33 * sizeof(u64), 858 33 * sizeof(u64),
898 fps); 859 fps);
899 break; 860 break;
900 }
901 861
902 case PTRACE_READTEXT: 862 case PTRACE_READTEXT:
903 case PTRACE_READDATA: 863 case PTRACE_READDATA:
@@ -919,16 +879,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
919 ret = -EIO; 879 ret = -EIO;
920 break; 880 break;
921 881
922 case PTRACE_GETEVENTMSG: {
923 if (test_thread_flag(TIF_32BIT))
924 ret = put_user(child->ptrace_message,
925 (unsigned int __user *) data);
926 else
927 ret = put_user(child->ptrace_message,
928 (unsigned long __user *) data);
929 break;
930 }
931
932 default: 882 default:
933 ret = ptrace_request(child, request, addr, data); 883 ret = ptrace_request(child, request, addr, data);
934 break; 884 break;
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index a813441b358f..5964d8653ade 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -15,7 +15,6 @@
15#include <linux/slab.h> 15#include <linux/slab.h>
16#include <asm/smp.h> 16#include <asm/smp.h>
17#include <linux/user.h> 17#include <linux/user.h>
18#include <linux/a.out.h>
19#include <linux/screen_info.h> 18#include <linux/screen_info.h>
20#include <linux/delay.h> 19#include <linux/delay.h>
21#include <linux/fs.h> 20#include <linux/fs.h>
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 8649635d6d74..68db08930399 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -53,7 +53,6 @@
53#include <asm/ebus.h> 53#include <asm/ebus.h>
54#include <asm/isa.h> 54#include <asm/isa.h>
55#endif 55#endif
56#include <asm/a.out.h>
57#include <asm/ns87303.h> 56#include <asm/ns87303.h>
58#include <asm/timer.h> 57#include <asm/timer.h>
59#include <asm/cpudata.h> 58#include <asm/cpudata.h>
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index c56573a10eee..134d801579f9 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -28,7 +28,6 @@
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/utrap.h> 29#include <asm/utrap.h>
30#include <asm/perfctr.h> 30#include <asm/perfctr.h>
31#include <asm/a.out.h>
32#include <asm/unistd.h> 31#include <asm/unistd.h>
33 32
34/* #define DEBUG_UNIMP_SYSCALL */ 33/* #define DEBUG_UNIMP_SYSCALL */
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 98c468803ce3..deaba2bd0535 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -57,7 +57,6 @@
57#include <asm/fpumacro.h> 57#include <asm/fpumacro.h>
58#include <asm/semaphore.h> 58#include <asm/semaphore.h>
59#include <asm/mmu_context.h> 59#include <asm/mmu_context.h>
60#include <asm/a.out.h>
61#include <asm/compat_signal.h> 60#include <asm/compat_signal.h>
62 61
63asmlinkage long sys32_chown16(const char __user * filename, u16 user, u16 group) 62asmlinkage long sys32_chown16(const char __user * filename, u16 user, u16 group)
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index adc62f490f36..6b9b718e24af 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -23,7 +23,7 @@ sys_call_table32:
23/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys32_chown16, sys32_mknod 23/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys32_chown16, sys32_mknod
24/*15*/ .word sys_chmod, sys32_lchown16, sparc_brk, sys32_perfctr, sys32_lseek 24/*15*/ .word sys_chmod, sys32_lchown16, sparc_brk, sys32_perfctr, sys32_lseek
25/*20*/ .word sys_getpid, sys_capget, sys_capset, sys32_setuid16, sys32_getuid16 25/*20*/ .word sys_getpid, sys_capget, sys_capset, sys32_setuid16, sys32_getuid16
26/*25*/ .word sys32_vmsplice, sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause 26/*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause
27/*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice 27/*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice
28 .word sys_chown, sys_sync, sys32_kill, compat_sys_newstat, sys32_sendfile 28 .word sys_chown, sys_sync, sys32_kill, compat_sys_newstat, sys32_sendfile
29/*40*/ .word compat_sys_newlstat, sys_dup, sys_pipe, compat_sys_times, sys_getuid 29/*40*/ .word compat_sys_newlstat, sys_dup, sys_pipe, compat_sys_times, sys_getuid