aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-frv
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-02-14 16:53:18 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-14 19:09:35 -0500
commit68f624fc8b9fa50de9cc0ebd612ef7b7b9fa32d0 (patch)
tree2e25482dd6a482ccf1378d2b01b863f99603bab5 /include/asm-frv
parent06027bdd278a32a84b273e41db68a5db8ffd2bb6 (diff)
[PATCH] FRV: Miscellaneous fixes
Make various alterations and fixes to the FRV arch: (1) Resyncs the FRV system call collection with the i386 arch. (2) Discards __iounmap() as it's not used. (3) Fixes the use of the SWAP/SWAPI instruction to get the arguments the right way around in atomic.h, and also to get the asm constraints correct. (4) Moves copy_to/from_user_page() to asm/cacheflush.h to be consistent with other archs. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-frv')
-rw-r--r--include/asm-frv/atomic.h6
-rw-r--r--include/asm-frv/cacheflush.h12
-rw-r--r--include/asm-frv/io.h1
-rw-r--r--include/asm-frv/uaccess.h3
-rw-r--r--include/asm-frv/unistd.h28
5 files changed, 37 insertions, 13 deletions
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h
index a59f684b4f33..5d9f84bfdcad 100644
--- a/include/asm-frv/atomic.h
+++ b/include/asm-frv/atomic.h
@@ -220,9 +220,9 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig
220 switch (sizeof(__xg_orig)) { \ 220 switch (sizeof(__xg_orig)) { \
221 case 4: \ 221 case 4: \
222 asm volatile( \ 222 asm volatile( \
223 "swap%I0 %2,%M0" \ 223 "swap%I0 %M0,%1" \
224 : "+m"(*__xg_ptr), "=&r"(__xg_orig) \ 224 : "+m"(*__xg_ptr), "=r"(__xg_orig) \
225 : "r"(x) \ 225 : "1"(x) \
226 : "memory" \ 226 : "memory" \
227 ); \ 227 ); \
228 break; \ 228 break; \
diff --git a/include/asm-frv/cacheflush.h b/include/asm-frv/cacheflush.h
index 3007deccb490..eaa5826bc1c8 100644
--- a/include/asm-frv/cacheflush.h
+++ b/include/asm-frv/cacheflush.h
@@ -87,5 +87,17 @@ static inline void flush_icache_page(struct vm_area_struct *vma, struct page *pa
87 flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE); 87 flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE);
88} 88}
89 89
90/*
91 * permit ptrace to access another process's address space through the icache
92 * and the dcache
93 */
94#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
95do { \
96 memcpy((dst), (src), (len)); \
97 flush_icache_user_range((vma), (page), (vaddr), (len)); \
98} while(0)
99
100#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
101 memcpy((dst), (src), (len))
90 102
91#endif /* _ASM_CACHEFLUSH_H */ 103#endif /* _ASM_CACHEFLUSH_H */
diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h
index 075369b1a34b..01247cb2bc39 100644
--- a/include/asm-frv/io.h
+++ b/include/asm-frv/io.h
@@ -251,7 +251,6 @@ static inline void writel(uint32_t datum, volatile void __iomem *addr)
251#define IOMAP_WRITETHROUGH 3 251#define IOMAP_WRITETHROUGH 3
252 252
253extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); 253extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag);
254extern void __iounmap(void __iomem *addr, unsigned long size);
255 254
256static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) 255static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size)
257{ 256{
diff --git a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h
index b6bcbe01f6ee..a1d140438863 100644
--- a/include/asm-frv/uaccess.h
+++ b/include/asm-frv/uaccess.h
@@ -306,7 +306,4 @@ extern long strnlen_user(const char *src, long count);
306 306
307extern unsigned long search_exception_table(unsigned long addr); 307extern unsigned long search_exception_table(unsigned long addr);
308 308
309#define copy_to_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len)
310#define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len)
311
312#endif /* _ASM_UACCESS_H */ 309#endif /* _ASM_UACCESS_H */
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
index 4d994d2e99e3..322531caa484 100644
--- a/include/asm-frv/unistd.h
+++ b/include/asm-frv/unistd.h
@@ -295,13 +295,29 @@
295#define __NR_add_key 286 295#define __NR_add_key 286
296#define __NR_request_key 287 296#define __NR_request_key 287
297#define __NR_keyctl 288 297#define __NR_keyctl 288
298#define __NR_vperfctr_open 289 298#define __NR_ioprio_set 289
299#define __NR_vperfctr_control (__NR_perfctr_info+1) 299#define __NR_ioprio_get 290
300#define __NR_vperfctr_unlink (__NR_perfctr_info+2) 300#define __NR_inotify_init 291
301#define __NR_vperfctr_iresume (__NR_perfctr_info+3) 301#define __NR_inotify_add_watch 292
302#define __NR_vperfctr_read (__NR_perfctr_info+4) 302#define __NR_inotify_rm_watch 293
303#define __NR_migrate_pages 294
304#define __NR_openat 295
305#define __NR_mkdirat 296
306#define __NR_mknodat 297
307#define __NR_fchownat 298
308#define __NR_futimesat 299
309#define __NR_newfstatat 300
310#define __NR_unlinkat 301
311#define __NR_renameat 302
312#define __NR_linkat 303
313#define __NR_symlinkat 304
314#define __NR_readlinkat 305
315#define __NR_fchmodat 306
316#define __NR_faccessat 307
317#define __NR_pselect6 308
318#define __NR_ppoll 309
303 319
304#define NR_syscalls 294 320#define NR_syscalls 310
305 321
306/* 322/*
307 * process the return value of a syscall, consigning it to one of two possible fates 323 * process the return value of a syscall, consigning it to one of two possible fates