aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-03 18:49:14 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-03 18:49:14 -0400
commit87e8b821ed8db3dab03d96cd542e29666bf210aa (patch)
tree0027060473aafbbb125655ba027319c8a1a665fc /arch/sparc/kernel
parent33cd9dfa3a13e3d8e41aef225a9f98169816723b (diff)
parent5e11611a5d22252f3f9c169a3c9377eac0c32033 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/iommu.c10
-rw-r--r--arch/sparc/kernel/ioport.c11
-rw-r--r--arch/sparc/kernel/nmi.c7
-rw-r--r--arch/sparc/kernel/perf_event.c4
-rw-r--r--arch/sparc/kernel/rtrap_64.S8
-rw-r--r--arch/sparc/kernel/sys_sparc_32.c113
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c13
-rw-r--r--arch/sparc/kernel/systbls.h5
-rw-r--r--arch/sparc/kernel/systbls_64.S6
9 files changed, 14 insertions, 163 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}
864EXPORT_SYMBOL(dma_supported); 864EXPORT_SYMBOL(dma_supported);
865
866int 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}
874EXPORT_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}
677EXPORT_SYMBOL(dma_supported); 677EXPORT_SYMBOL(dma_supported);
678 678
679int 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}
687EXPORT_SYMBOL(dma_set_mask);
688
689
690#ifdef CONFIG_PROC_FS 679#ifdef CONFIG_PROC_FS
691 680
692static int sparc_io_proc_show(struct seq_file *m, void *v) 681static int sparc_io_proc_show(struct seq_file *m, void *v)
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c
index d242a7340541..b287b62c7ea3 100644
--- a/arch/sparc/kernel/nmi.c
+++ b/arch/sparc/kernel/nmi.c
@@ -21,7 +21,6 @@
21 21
22#include <asm/perf_event.h> 22#include <asm/perf_event.h>
23#include <asm/ptrace.h> 23#include <asm/ptrace.h>
24#include <asm/local.h>
25#include <asm/pcr.h> 24#include <asm/pcr.h>
26 25
27/* We don't have a real NMI on sparc64, but we can fake one 26/* We don't have a real NMI on sparc64, but we can fake one
@@ -113,13 +112,13 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
113 touched = 1; 112 touched = 1;
114 } 113 }
115 if (!touched && __get_cpu_var(last_irq_sum) == sum) { 114 if (!touched && __get_cpu_var(last_irq_sum) == sum) {
116 __this_cpu_inc(per_cpu_var(alert_counter)); 115 __this_cpu_inc(alert_counter);
117 if (__this_cpu_read(per_cpu_var(alert_counter)) == 30 * nmi_hz) 116 if (__this_cpu_read(alert_counter) == 30 * nmi_hz)
118 die_nmi("BUG: NMI Watchdog detected LOCKUP", 117 die_nmi("BUG: NMI Watchdog detected LOCKUP",
119 regs, panic_on_timeout); 118 regs, panic_on_timeout);
120 } else { 119 } else {
121 __get_cpu_var(last_irq_sum) = sum; 120 __get_cpu_var(last_irq_sum) = sum;
122 __this_cpu_write(per_cpu_var(alert_counter), 0); 121 __this_cpu_write(alert_counter, 0);
123 } 122 }
124 if (__get_cpu_var(wd_enabled)) { 123 if (__get_cpu_var(wd_enabled)) {
125 write_pic(picl_value(nmi_hz)); 124 write_pic(picl_value(nmi_hz));
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index 610112ec518a..e2771939341d 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1189,7 +1189,7 @@ static int __kprobes perf_event_nmi_handler(struct notifier_block *self,
1189 1189
1190 regs = args->regs; 1190 regs = args->regs;
1191 1191
1192 data.addr = 0; 1192 perf_sample_data_init(&data, 0);
1193 1193
1194 cpuc = &__get_cpu_var(cpu_hw_events); 1194 cpuc = &__get_cpu_var(cpu_hw_events);
1195 1195
@@ -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 */
1358static DEFINE_PER_CPU(struct perf_callchain_entry, callchain); 1358static DEFINE_PER_CPU(struct perf_callchain_entry, callchain);
1359 1359
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S
index e829a42b7139..83f1873c6c13 100644
--- a/arch/sparc/kernel/rtrap_64.S
+++ b/arch/sparc/kernel/rtrap_64.S
@@ -107,11 +107,11 @@ rtrap_nmi: ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
107rtrap_irq: 107rtrap_irq:
108rtrap: 108rtrap:
109#ifndef CONFIG_SMP 109#ifndef CONFIG_SMP
110 sethi %hi(per_cpu____cpu_data), %l0 110 sethi %hi(__cpu_data), %l0
111 lduw [%l0 + %lo(per_cpu____cpu_data)], %l1 111 lduw [%l0 + %lo(__cpu_data)], %l1
112#else 112#else
113 sethi %hi(per_cpu____cpu_data), %l0 113 sethi %hi(__cpu_data), %l0
114 or %l0, %lo(per_cpu____cpu_data), %l0 114 or %l0, %lo(__cpu_data), %l0
115 lduw [%l0 + %g5], %l1 115 lduw [%l0 + %g5], %l1
116#endif 116#endif
117 cmp %l1, 0 117 cmp %l1, 0
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
107asmlinkage 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;
210out:
211 return err;
212}
213
214int sparc_mmap_check(unsigned long addr, unsigned long len) 101int 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
429SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second, 429SYSCALL_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
513SYSCALL_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
524SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality) 513SYSCALL_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
9struct new_utsname;
10
11extern asmlinkage unsigned long sys_getpagesize(void); 9extern asmlinkage unsigned long sys_getpagesize(void);
12extern asmlinkage long sparc_pipe(struct pt_regs *regs); 10extern asmlinkage long sparc_pipe(struct pt_regs *regs);
13extern asmlinkage long sys_ipc(unsigned int call, int first, 11extern 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);
17extern asmlinkage long sparc64_newuname(struct new_utsname __user *name);
18extern asmlinkage long sparc64_personality(unsigned long personality); 15extern asmlinkage long sparc64_personality(unsigned long personality);
19extern asmlinkage long sys64_munmap(unsigned long addr, size_t len); 16extern asmlinkage long sys64_munmap(unsigned long addr, size_t len);
20extern asmlinkage unsigned long sys64_mremap(unsigned long addr, 17extern 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