diff options
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/iommu.c | 10 | ||||
-rw-r--r-- | arch/sparc/kernel/ioport.c | 11 | ||||
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc_32.c | 113 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc_64.c | 13 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls.h | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls_64.S | 6 |
7 files changed, 6 insertions, 154 deletions
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c index 5fad94950e76..8414549c1834 100644 --- a/arch/sparc/kernel/iommu.c +++ b/arch/sparc/kernel/iommu.c | |||
@@ -862,13 +862,3 @@ int dma_supported(struct device *dev, u64 device_mask) | |||
862 | return 0; | 862 | return 0; |
863 | } | 863 | } |
864 | EXPORT_SYMBOL(dma_supported); | 864 | EXPORT_SYMBOL(dma_supported); |
865 | |||
866 | int dma_set_mask(struct device *dev, u64 dma_mask) | ||
867 | { | ||
868 | #ifdef CONFIG_PCI | ||
869 | if (dev->bus == &pci_bus_type) | ||
870 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | ||
871 | #endif | ||
872 | return -EINVAL; | ||
873 | } | ||
874 | EXPORT_SYMBOL(dma_set_mask); | ||
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 3c8c44f6a41c..84e5386714cd 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -676,17 +676,6 @@ int dma_supported(struct device *dev, u64 mask) | |||
676 | } | 676 | } |
677 | EXPORT_SYMBOL(dma_supported); | 677 | EXPORT_SYMBOL(dma_supported); |
678 | 678 | ||
679 | int dma_set_mask(struct device *dev, u64 dma_mask) | ||
680 | { | ||
681 | #ifdef CONFIG_PCI | ||
682 | if (dev->bus == &pci_bus_type) | ||
683 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | ||
684 | #endif | ||
685 | return -EOPNOTSUPP; | ||
686 | } | ||
687 | EXPORT_SYMBOL(dma_set_mask); | ||
688 | |||
689 | |||
690 | #ifdef CONFIG_PROC_FS | 679 | #ifdef CONFIG_PROC_FS |
691 | 680 | ||
692 | static int sparc_io_proc_show(struct seq_file *m, void *v) | 681 | static int sparc_io_proc_show(struct seq_file *m, void *v) |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 6504208f375f..68cb9b42088f 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -1353,7 +1353,7 @@ static void perf_callchain_user_32(struct pt_regs *regs, | |||
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | /* Like powerpc we can't get PMU interrupts within the PMU handler, | 1355 | /* Like powerpc we can't get PMU interrupts within the PMU handler, |
1356 | * so no need for seperate NMI and IRQ chains as on x86. | 1356 | * so no need for separate NMI and IRQ chains as on x86. |
1357 | */ | 1357 | */ |
1358 | static DEFINE_PER_CPU(struct perf_callchain_entry, callchain); | 1358 | static DEFINE_PER_CPU(struct perf_callchain_entry, callchain); |
1359 | 1359 | ||
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c index 3a82e65d8db2..ee995b7dae7e 100644 --- a/arch/sparc/kernel/sys_sparc_32.c +++ b/arch/sparc/kernel/sys_sparc_32.c | |||
@@ -98,119 +98,6 @@ out: | |||
98 | return error; | 98 | return error; |
99 | } | 99 | } |
100 | 100 | ||
101 | /* | ||
102 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | ||
103 | * | ||
104 | * This is really horribly ugly. | ||
105 | */ | ||
106 | |||
107 | asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user *ptr, long fifth) | ||
108 | { | ||
109 | int version, err; | ||
110 | |||
111 | version = call >> 16; /* hack for backward compatibility */ | ||
112 | call &= 0xffff; | ||
113 | |||
114 | if (call <= SEMCTL) | ||
115 | switch (call) { | ||
116 | case SEMOP: | ||
117 | err = sys_semtimedop (first, (struct sembuf __user *)ptr, second, NULL); | ||
118 | goto out; | ||
119 | case SEMTIMEDOP: | ||
120 | err = sys_semtimedop (first, (struct sembuf __user *)ptr, second, (const struct timespec __user *) fifth); | ||
121 | goto out; | ||
122 | case SEMGET: | ||
123 | err = sys_semget (first, second, third); | ||
124 | goto out; | ||
125 | case SEMCTL: { | ||
126 | union semun fourth; | ||
127 | err = -EINVAL; | ||
128 | if (!ptr) | ||
129 | goto out; | ||
130 | err = -EFAULT; | ||
131 | if (get_user(fourth.__pad, | ||
132 | (void __user * __user *)ptr)) | ||
133 | goto out; | ||
134 | err = sys_semctl (first, second, third, fourth); | ||
135 | goto out; | ||
136 | } | ||
137 | default: | ||
138 | err = -ENOSYS; | ||
139 | goto out; | ||
140 | } | ||
141 | if (call <= MSGCTL) | ||
142 | switch (call) { | ||
143 | case MSGSND: | ||
144 | err = sys_msgsnd (first, (struct msgbuf __user *) ptr, | ||
145 | second, third); | ||
146 | goto out; | ||
147 | case MSGRCV: | ||
148 | switch (version) { | ||
149 | case 0: { | ||
150 | struct ipc_kludge tmp; | ||
151 | err = -EINVAL; | ||
152 | if (!ptr) | ||
153 | goto out; | ||
154 | err = -EFAULT; | ||
155 | if (copy_from_user(&tmp, (struct ipc_kludge __user *) ptr, sizeof (tmp))) | ||
156 | goto out; | ||
157 | err = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, third); | ||
158 | goto out; | ||
159 | } | ||
160 | case 1: default: | ||
161 | err = sys_msgrcv (first, | ||
162 | (struct msgbuf __user *) ptr, | ||
163 | second, fifth, third); | ||
164 | goto out; | ||
165 | } | ||
166 | case MSGGET: | ||
167 | err = sys_msgget ((key_t) first, second); | ||
168 | goto out; | ||
169 | case MSGCTL: | ||
170 | err = sys_msgctl (first, second, (struct msqid_ds __user *) ptr); | ||
171 | goto out; | ||
172 | default: | ||
173 | err = -ENOSYS; | ||
174 | goto out; | ||
175 | } | ||
176 | if (call <= SHMCTL) | ||
177 | switch (call) { | ||
178 | case SHMAT: | ||
179 | switch (version) { | ||
180 | case 0: default: { | ||
181 | ulong raddr; | ||
182 | err = do_shmat (first, (char __user *) ptr, second, &raddr); | ||
183 | if (err) | ||
184 | goto out; | ||
185 | err = -EFAULT; | ||
186 | if (put_user (raddr, (ulong __user *) third)) | ||
187 | goto out; | ||
188 | err = 0; | ||
189 | goto out; | ||
190 | } | ||
191 | case 1: /* iBCS2 emulator entry point */ | ||
192 | err = -EINVAL; | ||
193 | goto out; | ||
194 | } | ||
195 | case SHMDT: | ||
196 | err = sys_shmdt ((char __user *)ptr); | ||
197 | goto out; | ||
198 | case SHMGET: | ||
199 | err = sys_shmget (first, second, third); | ||
200 | goto out; | ||
201 | case SHMCTL: | ||
202 | err = sys_shmctl (first, second, (struct shmid_ds __user *) ptr); | ||
203 | goto out; | ||
204 | default: | ||
205 | err = -ENOSYS; | ||
206 | goto out; | ||
207 | } | ||
208 | else | ||
209 | err = -ENOSYS; | ||
210 | out: | ||
211 | return err; | ||
212 | } | ||
213 | |||
214 | int sparc_mmap_check(unsigned long addr, unsigned long len) | 101 | int sparc_mmap_check(unsigned long addr, unsigned long len) |
215 | { | 102 | { |
216 | if (ARCH_SUN4C && | 103 | if (ARCH_SUN4C && |
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c index cb1bef6f14b7..3d435c42e6db 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c | |||
@@ -426,7 +426,7 @@ out: | |||
426 | * This is really horribly ugly. | 426 | * This is really horribly ugly. |
427 | */ | 427 | */ |
428 | 428 | ||
429 | SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second, | 429 | SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, second, |
430 | unsigned long, third, void __user *, ptr, long, fifth) | 430 | unsigned long, third, void __user *, ptr, long, fifth) |
431 | { | 431 | { |
432 | long err; | 432 | long err; |
@@ -510,17 +510,6 @@ out: | |||
510 | return err; | 510 | return err; |
511 | } | 511 | } |
512 | 512 | ||
513 | SYSCALL_DEFINE1(sparc64_newuname, struct new_utsname __user *, name) | ||
514 | { | ||
515 | int ret = sys_newuname(name); | ||
516 | |||
517 | if (current->personality == PER_LINUX32 && !ret) { | ||
518 | ret = (copy_to_user(name->machine, "sparc\0\0", 8) | ||
519 | ? -EFAULT : 0); | ||
520 | } | ||
521 | return ret; | ||
522 | } | ||
523 | |||
524 | SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality) | 513 | SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality) |
525 | { | 514 | { |
526 | int ret; | 515 | int ret; |
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h index 68312fe8da74..118759cd7342 100644 --- a/arch/sparc/kernel/systbls.h +++ b/arch/sparc/kernel/systbls.h | |||
@@ -6,15 +6,12 @@ | |||
6 | #include <asm/utrap.h> | 6 | #include <asm/utrap.h> |
7 | #include <asm/signal.h> | 7 | #include <asm/signal.h> |
8 | 8 | ||
9 | struct new_utsname; | ||
10 | |||
11 | extern asmlinkage unsigned long sys_getpagesize(void); | 9 | extern asmlinkage unsigned long sys_getpagesize(void); |
12 | extern asmlinkage long sparc_pipe(struct pt_regs *regs); | 10 | extern asmlinkage long sparc_pipe(struct pt_regs *regs); |
13 | extern asmlinkage long sys_ipc(unsigned int call, int first, | 11 | extern asmlinkage long sys_sparc_ipc(unsigned int call, int first, |
14 | unsigned long second, | 12 | unsigned long second, |
15 | unsigned long third, | 13 | unsigned long third, |
16 | void __user *ptr, long fifth); | 14 | void __user *ptr, long fifth); |
17 | extern asmlinkage long sparc64_newuname(struct new_utsname __user *name); | ||
18 | extern asmlinkage long sparc64_personality(unsigned long personality); | 15 | extern asmlinkage long sparc64_personality(unsigned long personality); |
19 | extern asmlinkage long sys64_munmap(unsigned long addr, size_t len); | 16 | extern asmlinkage long sys64_munmap(unsigned long addr, size_t len); |
20 | extern asmlinkage unsigned long sys64_mremap(unsigned long addr, | 17 | extern asmlinkage unsigned long sys64_mremap(unsigned long addr, |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 17614251fb6d..9db058dd039e 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -55,7 +55,7 @@ sys_call_table32: | |||
55 | /*170*/ .word sys32_lsetxattr, sys32_fsetxattr, sys_getxattr, sys_lgetxattr, compat_sys_getdents | 55 | /*170*/ .word sys32_lsetxattr, sys32_fsetxattr, sys_getxattr, sys_lgetxattr, compat_sys_getdents |
56 | .word sys_setsid, sys_fchdir, sys32_fgetxattr, sys_listxattr, sys_llistxattr | 56 | .word sys_setsid, sys_fchdir, sys32_fgetxattr, sys_listxattr, sys_llistxattr |
57 | /*180*/ .word sys32_flistxattr, sys_removexattr, sys_lremovexattr, compat_sys_sigpending, sys_ni_syscall | 57 | /*180*/ .word sys32_flistxattr, sys_removexattr, sys_lremovexattr, compat_sys_sigpending, sys_ni_syscall |
58 | .word sys32_setpgid, sys32_fremovexattr, sys32_tkill, sys32_exit_group, sys_sparc64_newuname | 58 | .word sys32_setpgid, sys32_fremovexattr, sys32_tkill, sys32_exit_group, sys_newuname |
59 | /*190*/ .word sys32_init_module, sys_sparc64_personality, sys_remap_file_pages, sys32_epoll_create, sys32_epoll_ctl | 59 | /*190*/ .word sys32_init_module, sys_sparc64_personality, sys_remap_file_pages, sys32_epoll_create, sys32_epoll_ctl |
60 | .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask | 60 | .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask |
61 | /*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir | 61 | /*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir |
@@ -130,13 +130,13 @@ sys_call_table: | |||
130 | /*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys_getdents | 130 | /*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys_getdents |
131 | .word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr | 131 | .word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr |
132 | /*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall | 132 | /*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall |
133 | .word sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_sparc64_newuname | 133 | .word sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname |
134 | /*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl | 134 | /*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl |
135 | .word sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_nis_syscall, sys_sgetmask | 135 | .word sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_nis_syscall, sys_sgetmask |
136 | /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall | 136 | /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall |
137 | .word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 | 137 | .word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 |
138 | /*210*/ .word sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo | 138 | /*210*/ .word sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo |
139 | .word sys_ipc, sys_nis_syscall, sys_clone, sys_ioprio_get, sys_adjtimex | 139 | .word sys_sparc_ipc, sys_nis_syscall, sys_clone, sys_ioprio_get, sys_adjtimex |
140 | /*220*/ .word sys_nis_syscall, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid | 140 | /*220*/ .word sys_nis_syscall, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid |
141 | .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid | 141 | .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid |
142 | /*230*/ .word sys_select, sys_nis_syscall, sys_splice, sys_stime, sys_statfs64 | 142 | /*230*/ .word sys_select, sys_nis_syscall, sys_splice, sys_stime, sys_statfs64 |