diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig | 3 | ||||
-rw-r--r-- | arch/sh/include/asm/pci.h | 19 | ||||
-rw-r--r-- | arch/sh/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/syscalls.h | 5 | ||||
-rw-r--r-- | arch/sh/include/asm/unistd_32.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/unistd_64.h | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/clock.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/sys_sh.c | 115 |
8 files changed, 8 insertions, 142 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 05cef5061293..8d90564c2bcf 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -183,6 +183,9 @@ config DMA_COHERENT | |||
183 | config DMA_NONCOHERENT | 183 | config DMA_NONCOHERENT |
184 | def_bool !DMA_COHERENT | 184 | def_bool !DMA_COHERENT |
185 | 185 | ||
186 | config NEED_DMA_MAP_STATE | ||
187 | def_bool DMA_NONCOHERENT | ||
188 | |||
186 | source "init/Kconfig" | 189 | source "init/Kconfig" |
187 | 190 | ||
188 | source "kernel/Kconfig.freezer" | 191 | source "kernel/Kconfig.freezer" |
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h index 1042f7f0a48b..8bd952fcf3ba 100644 --- a/arch/sh/include/asm/pci.h +++ b/arch/sh/include/asm/pci.h | |||
@@ -83,25 +83,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
83 | */ | 83 | */ |
84 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) | 84 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) |
85 | 85 | ||
86 | /* pci_unmap_{single,page} being a nop depends upon the | ||
87 | * configuration. | ||
88 | */ | ||
89 | #ifdef CONFIG_DMA_NONCOHERENT | ||
90 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; | ||
91 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME; | ||
92 | #define pci_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME) | ||
93 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) (((PTR)->ADDR_NAME) = (VAL)) | ||
94 | #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) | ||
95 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) | ||
96 | #else | ||
97 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
98 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
99 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
100 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
101 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
102 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
103 | #endif | ||
104 | |||
105 | #ifdef CONFIG_PCI | 86 | #ifdef CONFIG_PCI |
106 | /* | 87 | /* |
107 | * None of the SH PCI controllers support MWI, it is always treated as a | 88 | * None of the SH PCI controllers support MWI, it is always treated as a |
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index e11b14ea2c43..2168fde25611 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -123,8 +123,6 @@ extern void show_regs(struct pt_regs *); | |||
123 | struct task_struct; | 123 | struct task_struct; |
124 | 124 | ||
125 | #define arch_has_single_step() (1) | 125 | #define arch_has_single_step() (1) |
126 | extern void user_enable_single_step(struct task_struct *); | ||
127 | extern void user_disable_single_step(struct task_struct *); | ||
128 | 126 | ||
129 | struct perf_event; | 127 | struct perf_event; |
130 | struct perf_sample_data; | 128 | struct perf_sample_data; |
diff --git a/arch/sh/include/asm/syscalls.h b/arch/sh/include/asm/syscalls.h index c1e2b8deb837..507725af2e54 100644 --- a/arch/sh/include/asm/syscalls.h +++ b/arch/sh/include/asm/syscalls.h | |||
@@ -3,17 +3,12 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | struct old_utsname; | ||
7 | |||
8 | asmlinkage int old_mmap(unsigned long addr, unsigned long len, | 6 | asmlinkage int old_mmap(unsigned long addr, unsigned long len, |
9 | unsigned long prot, unsigned long flags, | 7 | unsigned long prot, unsigned long flags, |
10 | int fd, unsigned long off); | 8 | int fd, unsigned long off); |
11 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | 9 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, |
12 | unsigned long prot, unsigned long flags, | 10 | unsigned long prot, unsigned long flags, |
13 | unsigned long fd, unsigned long pgoff); | 11 | unsigned long fd, unsigned long pgoff); |
14 | asmlinkage int sys_ipc(uint call, int first, int second, | ||
15 | int third, void __user *ptr, long fifth); | ||
16 | asmlinkage int sys_uname(struct old_utsname __user *name); | ||
17 | 12 | ||
18 | #ifdef CONFIG_SUPERH32 | 13 | #ifdef CONFIG_SUPERH32 |
19 | # include "syscalls_32.h" | 14 | # include "syscalls_32.h" |
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h index 365744b05269..0e7f0fc8f086 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/asm/unistd_32.h | |||
@@ -358,6 +358,7 @@ | |||
358 | #define __ARCH_WANT_STAT64 | 358 | #define __ARCH_WANT_STAT64 |
359 | #define __ARCH_WANT_SYS_ALARM | 359 | #define __ARCH_WANT_SYS_ALARM |
360 | #define __ARCH_WANT_SYS_GETHOSTNAME | 360 | #define __ARCH_WANT_SYS_GETHOSTNAME |
361 | #define __ARCH_WANT_SYS_IPC | ||
361 | #define __ARCH_WANT_SYS_PAUSE | 362 | #define __ARCH_WANT_SYS_PAUSE |
362 | #define __ARCH_WANT_SYS_SGETMASK | 363 | #define __ARCH_WANT_SYS_SGETMASK |
363 | #define __ARCH_WANT_SYS_SIGNAL | 364 | #define __ARCH_WANT_SYS_SIGNAL |
@@ -370,6 +371,7 @@ | |||
370 | #define __ARCH_WANT_SYS_LLSEEK | 371 | #define __ARCH_WANT_SYS_LLSEEK |
371 | #define __ARCH_WANT_SYS_NICE | 372 | #define __ARCH_WANT_SYS_NICE |
372 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | 373 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT |
374 | #define __ARCH_WANT_SYS_OLD_UNAME | ||
373 | #define __ARCH_WANT_SYS_OLDUMOUNT | 375 | #define __ARCH_WANT_SYS_OLDUMOUNT |
374 | #define __ARCH_WANT_SYS_SIGPENDING | 376 | #define __ARCH_WANT_SYS_SIGPENDING |
375 | #define __ARCH_WANT_SYS_SIGPROCMASK | 377 | #define __ARCH_WANT_SYS_SIGPROCMASK |
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h index 25de158aac3a..0580c33a1e04 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/asm/unistd_64.h | |||
@@ -398,6 +398,7 @@ | |||
398 | #define __ARCH_WANT_STAT64 | 398 | #define __ARCH_WANT_STAT64 |
399 | #define __ARCH_WANT_SYS_ALARM | 399 | #define __ARCH_WANT_SYS_ALARM |
400 | #define __ARCH_WANT_SYS_GETHOSTNAME | 400 | #define __ARCH_WANT_SYS_GETHOSTNAME |
401 | #define __ARCH_WANT_SYS_IPC | ||
401 | #define __ARCH_WANT_SYS_PAUSE | 402 | #define __ARCH_WANT_SYS_PAUSE |
402 | #define __ARCH_WANT_SYS_SGETMASK | 403 | #define __ARCH_WANT_SYS_SGETMASK |
403 | #define __ARCH_WANT_SYS_SIGNAL | 404 | #define __ARCH_WANT_SYS_SIGNAL |
@@ -410,6 +411,7 @@ | |||
410 | #define __ARCH_WANT_SYS_LLSEEK | 411 | #define __ARCH_WANT_SYS_LLSEEK |
411 | #define __ARCH_WANT_SYS_NICE | 412 | #define __ARCH_WANT_SYS_NICE |
412 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | 413 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT |
414 | #define __ARCH_WANT_SYS_OLD_UNAME | ||
413 | #define __ARCH_WANT_SYS_OLDUMOUNT | 415 | #define __ARCH_WANT_SYS_OLDUMOUNT |
414 | #define __ARCH_WANT_SYS_SIGPENDING | 416 | #define __ARCH_WANT_SYS_SIGPENDING |
415 | #define __ARCH_WANT_SYS_SIGPROCMASK | 417 | #define __ARCH_WANT_SYS_SIGPROCMASK |
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 83da5debeedf..e9fa1bfed53e 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
@@ -404,7 +404,7 @@ EXPORT_SYMBOL_GPL(clk_round_rate); | |||
404 | * If an entry has a device ID, it must match | 404 | * If an entry has a device ID, it must match |
405 | * If an entry has a connection ID, it must match | 405 | * If an entry has a connection ID, it must match |
406 | * Then we take the most specific entry - with the following | 406 | * Then we take the most specific entry - with the following |
407 | * order of precidence: dev+con > dev only > con only. | 407 | * order of precedence: dev+con > dev only > con only. |
408 | */ | 408 | */ |
409 | static struct clk *clk_find(const char *dev_id, const char *con_id) | 409 | static struct clk *clk_find(const char *dev_id, const char *con_id) |
410 | { | 410 | { |
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 71399cde03b5..81f58371613d 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -53,110 +53,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | |||
53 | return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); | 53 | return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); |
54 | } | 54 | } |
55 | 55 | ||
56 | /* | ||
57 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | ||
58 | * | ||
59 | * This is really horribly ugly. | ||
60 | */ | ||
61 | asmlinkage int sys_ipc(uint call, int first, int second, | ||
62 | int third, void __user *ptr, long fifth) | ||
63 | { | ||
64 | int version, ret; | ||
65 | |||
66 | version = call >> 16; /* hack for backward compatibility */ | ||
67 | call &= 0xffff; | ||
68 | |||
69 | if (call <= SEMTIMEDOP) | ||
70 | switch (call) { | ||
71 | case SEMOP: | ||
72 | return sys_semtimedop(first, | ||
73 | (struct sembuf __user *)ptr, | ||
74 | second, NULL); | ||
75 | case SEMTIMEDOP: | ||
76 | return sys_semtimedop(first, | ||
77 | (struct sembuf __user *)ptr, second, | ||
78 | (const struct timespec __user *)fifth); | ||
79 | case SEMGET: | ||
80 | return sys_semget (first, second, third); | ||
81 | case SEMCTL: { | ||
82 | union semun fourth; | ||
83 | if (!ptr) | ||
84 | return -EINVAL; | ||
85 | if (get_user(fourth.__pad, (void __user * __user *) ptr)) | ||
86 | return -EFAULT; | ||
87 | return sys_semctl (first, second, third, fourth); | ||
88 | } | ||
89 | default: | ||
90 | return -EINVAL; | ||
91 | } | ||
92 | |||
93 | if (call <= MSGCTL) | ||
94 | switch (call) { | ||
95 | case MSGSND: | ||
96 | return sys_msgsnd (first, (struct msgbuf __user *) ptr, | ||
97 | second, third); | ||
98 | case MSGRCV: | ||
99 | switch (version) { | ||
100 | case 0: | ||
101 | { | ||
102 | struct ipc_kludge tmp; | ||
103 | |||
104 | if (!ptr) | ||
105 | return -EINVAL; | ||
106 | |||
107 | if (copy_from_user(&tmp, | ||
108 | (struct ipc_kludge __user *) ptr, | ||
109 | sizeof (tmp))) | ||
110 | return -EFAULT; | ||
111 | |||
112 | return sys_msgrcv (first, tmp.msgp, second, | ||
113 | tmp.msgtyp, third); | ||
114 | } | ||
115 | default: | ||
116 | return sys_msgrcv (first, | ||
117 | (struct msgbuf __user *) ptr, | ||
118 | second, fifth, third); | ||
119 | } | ||
120 | case MSGGET: | ||
121 | return sys_msgget ((key_t) first, second); | ||
122 | case MSGCTL: | ||
123 | return sys_msgctl (first, second, | ||
124 | (struct msqid_ds __user *) ptr); | ||
125 | default: | ||
126 | return -EINVAL; | ||
127 | } | ||
128 | if (call <= SHMCTL) | ||
129 | switch (call) { | ||
130 | case SHMAT: | ||
131 | switch (version) { | ||
132 | default: { | ||
133 | ulong raddr; | ||
134 | ret = do_shmat (first, (char __user *) ptr, | ||
135 | second, &raddr); | ||
136 | if (ret) | ||
137 | return ret; | ||
138 | return put_user (raddr, (ulong __user *) third); | ||
139 | } | ||
140 | case 1: /* iBCS2 emulator entry point */ | ||
141 | if (!segment_eq(get_fs(), get_ds())) | ||
142 | return -EINVAL; | ||
143 | return do_shmat (first, (char __user *) ptr, | ||
144 | second, (ulong *) third); | ||
145 | } | ||
146 | case SHMDT: | ||
147 | return sys_shmdt ((char __user *)ptr); | ||
148 | case SHMGET: | ||
149 | return sys_shmget (first, second, third); | ||
150 | case SHMCTL: | ||
151 | return sys_shmctl (first, second, | ||
152 | (struct shmid_ds __user *) ptr); | ||
153 | default: | ||
154 | return -EINVAL; | ||
155 | } | ||
156 | |||
157 | return -EINVAL; | ||
158 | } | ||
159 | |||
160 | /* sys_cacheflush -- flush (part of) the processor cache. */ | 56 | /* sys_cacheflush -- flush (part of) the processor cache. */ |
161 | asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op) | 57 | asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op) |
162 | { | 58 | { |
@@ -197,14 +93,3 @@ asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op) | |||
197 | up_read(¤t->mm->mmap_sem); | 93 | up_read(¤t->mm->mmap_sem); |
198 | return 0; | 94 | return 0; |
199 | } | 95 | } |
200 | |||
201 | asmlinkage int sys_uname(struct old_utsname __user *name) | ||
202 | { | ||
203 | int err; | ||
204 | if (!name) | ||
205 | return -EFAULT; | ||
206 | down_read(&uts_sem); | ||
207 | err = copy_to_user(name, utsname(), sizeof(*name)); | ||
208 | up_read(&uts_sem); | ||
209 | return err?-EFAULT:0; | ||
210 | } | ||