aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-28 19:20:26 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-28 19:20:26 -0400
commit76a22271fd14e3fe7660f8646db12f0780fa4fd2 (patch)
treed0cf8ffb69c3d4030fa66c43662285f57bea12cb /include
parentfffcb480e4224f25c965b93fa65541bfc7dd732e (diff)
parente033108bf7e585755350b554048229d1fd10a02e (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 3672/1: PXA: don't probe output GPIOs for interrupt [ARM] 3671/1: ep93xx: add cirrus logic edb9315 support [ARM] 3370/2: ep93xx: add crunch support [ARM] 3665/1: crunch: add ptrace support [ARM] 3664/1: crunch: add signal frame save/restore [ARM] 3663/1: fix resource->end off-by-one thinko during physmap conversion [ARM] 3662/1: ixp23xx: don't include asm/hardware.h in uncompress.h [ARM] 3660/1: Remove legacy defines [ARM] 3661/1: S3C2412: Fix compilation if CPU_S3C2410 only [ARM] 3658/1: S3C244X: Change usb-gadget name to s3c2440-usbgadget [ARM] Remove the __arch_* layer from uaccess.h
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-at91rm9200/memory.h2
-rw-r--r--include/asm-arm/arch-h720x/memory.h2
-rw-r--r--include/asm-arm/arch-imx/memory.h6
-rw-r--r--include/asm-arm/arch-ixp23xx/ixp23xx.h11
-rw-r--r--include/asm-arm/arch-ixp23xx/platform.h10
-rw-r--r--include/asm-arm/arch-ixp23xx/uncompress.h2
-rw-r--r--include/asm-arm/arch-s3c2410/regs-dsc.h16
-rw-r--r--include/asm-arm/fpstate.h8
-rw-r--r--include/asm-arm/ptrace.h5
-rw-r--r--include/asm-arm/thread_info.h6
-rw-r--r--include/asm-arm/uaccess.h45
-rw-r--r--include/asm-arm/ucontext.h14
12 files changed, 66 insertions, 61 deletions
diff --git a/include/asm-arm/arch-at91rm9200/memory.h b/include/asm-arm/arch-at91rm9200/memory.h
index 3c327c404373..f985069e6d01 100644
--- a/include/asm-arm/arch-at91rm9200/memory.h
+++ b/include/asm-arm/arch-at91rm9200/memory.h
@@ -33,9 +33,7 @@
33 * bus_to_virt: Used to convert an address for DMA operations 33 * bus_to_virt: Used to convert an address for DMA operations
34 * to an address that the kernel can use. 34 * to an address that the kernel can use.
35 */ 35 */
36#define __virt_to_bus__is_a_macro
37#define __virt_to_bus(x) __virt_to_phys(x) 36#define __virt_to_bus(x) __virt_to_phys(x)
38#define __bus_to_virt__is_a_macro
39#define __bus_to_virt(x) __phys_to_virt(x) 37#define __bus_to_virt(x) __phys_to_virt(x)
40 38
41#endif 39#endif
diff --git a/include/asm-arm/arch-h720x/memory.h b/include/asm-arm/arch-h720x/memory.h
index 4a1bfd78a0fe..53e923dba76e 100644
--- a/include/asm-arm/arch-h720x/memory.h
+++ b/include/asm-arm/arch-h720x/memory.h
@@ -23,9 +23,7 @@
23 * There is something to do here later !, Mar 2000, Jungjun Kim 23 * There is something to do here later !, Mar 2000, Jungjun Kim
24 */ 24 */
25 25
26#define __virt_to_bus__is_a_macro
27#define __virt_to_bus(x) __virt_to_phys(x) 26#define __virt_to_bus(x) __virt_to_phys(x)
28#define __bus_to_virt__is_a_macro
29#define __bus_to_virt(x) __phys_to_virt(x) 27#define __bus_to_virt(x) __phys_to_virt(x)
30 28
31#endif 29#endif
diff --git a/include/asm-arm/arch-imx/memory.h b/include/asm-arm/arch-imx/memory.h
index d09ae32cd2f4..5ad90127915f 100644
--- a/include/asm-arm/arch-imx/memory.h
+++ b/include/asm-arm/arch-imx/memory.h
@@ -30,9 +30,7 @@
30 * bus_to_virt: Used to convert an address for DMA operations 30 * bus_to_virt: Used to convert an address for DMA operations
31 * to an address that the kernel can use. 31 * to an address that the kernel can use.
32 */ 32 */
33#define __virt_to_bus__is_a_macro 33#define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET)
34#define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET) 34#define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET)
35#define __bus_to_virt__is_a_macro
36#define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET)
37 35
38#endif 36#endif
diff --git a/include/asm-arm/arch-ixp23xx/ixp23xx.h b/include/asm-arm/arch-ixp23xx/ixp23xx.h
index d0a72201ee96..3927b1d61b17 100644
--- a/include/asm-arm/arch-ixp23xx/ixp23xx.h
+++ b/include/asm-arm/arch-ixp23xx/ixp23xx.h
@@ -295,15 +295,4 @@
295#define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) 295#define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160)
296 296
297 297
298#ifndef __ASSEMBLY__
299/*
300 * Is system memory on the XSI or CPP bus?
301 */
302static inline unsigned ixp23xx_cpp_boot(void)
303{
304 return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
305}
306#endif
307
308
309#endif 298#endif
diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h
index 19a73b39c864..56e16d66645a 100644
--- a/include/asm-arm/arch-ixp23xx/platform.h
+++ b/include/asm-arm/arch-ixp23xx/platform.h
@@ -43,5 +43,15 @@ extern struct sys_timer ixp23xx_timer;
43 43
44#define IXP23XX_UART_XTAL 14745600 44#define IXP23XX_UART_XTAL 14745600
45 45
46#ifndef __ASSEMBLY__
47/*
48 * Is system memory on the XSI or CPP bus?
49 */
50static inline unsigned ixp23xx_cpp_boot(void)
51{
52 return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
53}
54#endif
55
46 56
47#endif 57#endif
diff --git a/include/asm-arm/arch-ixp23xx/uncompress.h b/include/asm-arm/arch-ixp23xx/uncompress.h
index 013575e6a9a1..16c1110f2304 100644
--- a/include/asm-arm/arch-ixp23xx/uncompress.h
+++ b/include/asm-arm/arch-ixp23xx/uncompress.h
@@ -11,7 +11,7 @@
11#ifndef __ASM_ARCH_UNCOMPRESS_H 11#ifndef __ASM_ARCH_UNCOMPRESS_H
12#define __ASM_ARCH_UNCOMPRESS_H 12#define __ASM_ARCH_UNCOMPRESS_H
13 13
14#include <asm/hardware.h> 14#include <asm/arch/ixp23xx.h>
15#include <linux/serial_reg.h> 15#include <linux/serial_reg.h>
16 16
17#define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) 17#define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS)
diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h
index 84aca61cbaa3..a0a124875164 100644
--- a/include/asm-arm/arch-s3c2410/regs-dsc.h
+++ b/include/asm-arm/arch-s3c2410/regs-dsc.h
@@ -7,25 +7,23 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2440 Signal Drive Strength Control 10 * S3C2440/S3C2412 Signal Drive Strength Control
11 *
12 * Changelog:
13 * 11-Aug-2004 BJD Created file
14 * 25-Aug-2004 BJD Added the _SELECT_* defs for using with functions
15*/ 11*/
16 12
17 13
18#ifndef __ASM_ARCH_REGS_DSC_H 14#ifndef __ASM_ARCH_REGS_DSC_H
19#define __ASM_ARCH_REGS_DSC_H "2440-dsc" 15#define __ASM_ARCH_REGS_DSC_H "2440-dsc"
20 16
21#ifdef CONFIG_CPU_S3C2440 17#if defined(CONFIG_CPU_S3C2412)
18#define S3C2412_DSC0 S3C2410_GPIOREG(0xdc)
19#define S3C2412_DSC1 S3C2410_GPIOREG(0xe0)
20#endif
21
22#if defined(CONFIG_CPU_S3C2440)
22 23
23#define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) 24#define S3C2440_DSC0 S3C2410_GPIOREG(0xc4)
24#define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) 25#define S3C2440_DSC1 S3C2410_GPIOREG(0xc8)
25 26
26#define S3C2412_DSC0 S3C2410_GPIOREG(0xdc)
27#define S3C2412_DSC1 S3C2410_GPIOREG(0xe0)
28
29#define S3C2440_SELECT_DSC0 (0) 27#define S3C2440_SELECT_DSC0 (0)
30#define S3C2440_SELECT_DSC1 (1<<31) 28#define S3C2440_SELECT_DSC1 (1<<31)
31 29
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h
index 132c3c5628b2..6af4e6bd1290 100644
--- a/include/asm-arm/fpstate.h
+++ b/include/asm-arm/fpstate.h
@@ -72,6 +72,14 @@ union fp_state {
72 72
73#define FP_SIZE (sizeof(union fp_state) / sizeof(int)) 73#define FP_SIZE (sizeof(union fp_state) / sizeof(int))
74 74
75struct crunch_state {
76 unsigned int mvdx[16][2];
77 unsigned int mvax[4][3];
78 unsigned int dspsc[2];
79};
80
81#define CRUNCH_SIZE sizeof(struct crunch_state)
82
75#endif 83#endif
76 84
77#endif 85#endif
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h
index 2bebe3dc0a30..5a8ef787dbf8 100644
--- a/include/asm-arm/ptrace.h
+++ b/include/asm-arm/ptrace.h
@@ -25,6 +25,11 @@
25 25
26#define PTRACE_SET_SYSCALL 23 26#define PTRACE_SET_SYSCALL 23
27 27
28/* PTRACE_SYSCALL is 24 */
29
30#define PTRACE_GETCRUNCHREGS 25
31#define PTRACE_SETCRUNCHREGS 26
32
28/* 33/*
29 * PSR bits 34 * PSR bits
30 */ 35 */
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h
index cfbccb63c67b..c46b5c84275f 100644
--- a/include/asm-arm/thread_info.h
+++ b/include/asm-arm/thread_info.h
@@ -59,6 +59,7 @@ struct thread_info {
59 struct cpu_context_save cpu_context; /* cpu context */ 59 struct cpu_context_save cpu_context; /* cpu context */
60 __u8 used_cp[16]; /* thread used copro */ 60 __u8 used_cp[16]; /* thread used copro */
61 unsigned long tp_value; 61 unsigned long tp_value;
62 struct crunch_state crunchstate;
62 union fp_state fpstate __attribute__((aligned(8))); 63 union fp_state fpstate __attribute__((aligned(8)));
63 union vfp_state vfpstate; 64 union vfp_state vfpstate;
64 struct restart_block restart_block; 65 struct restart_block restart_block;
@@ -101,6 +102,11 @@ extern void free_thread_info(struct thread_info *);
101#define thread_saved_fp(tsk) \ 102#define thread_saved_fp(tsk) \
102 ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) 103 ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))
103 104
105extern void crunch_task_disable(struct thread_info *);
106extern void crunch_task_copy(struct thread_info *, void *);
107extern void crunch_task_restore(struct thread_info *, void *);
108extern void crunch_task_release(struct thread_info *);
109
104extern void iwmmxt_task_disable(struct thread_info *); 110extern void iwmmxt_task_disable(struct thread_info *);
105extern void iwmmxt_task_copy(struct thread_info *, void *); 111extern void iwmmxt_task_copy(struct thread_info *, void *);
106extern void iwmmxt_task_restore(struct thread_info *, void *); 112extern void iwmmxt_task_restore(struct thread_info *, void *);
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h
index 064f0f5e8e2b..f909dc75301a 100644
--- a/include/asm-arm/uaccess.h
+++ b/include/asm-arm/uaccess.h
@@ -353,66 +353,47 @@ do { \
353 : "r" (x), "i" (-EFAULT) \ 353 : "r" (x), "i" (-EFAULT) \
354 : "cc") 354 : "cc")
355 355
356extern unsigned long __arch_copy_from_user(void *to, const void __user *from, unsigned long n); 356
357extern unsigned long __arch_copy_to_user(void __user *to, const void *from, unsigned long n); 357extern unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n);
358extern unsigned long __arch_clear_user(void __user *addr, unsigned long n); 358extern unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n);
359extern unsigned long __arch_strncpy_from_user(char *to, const char __user *from, unsigned long count); 359extern unsigned long __clear_user(void __user *addr, unsigned long n);
360extern unsigned long __arch_strnlen_user(const char __user *s, long n); 360extern unsigned long __strncpy_from_user(char *to, const char __user *from, unsigned long count);
361extern unsigned long __strnlen_user(const char __user *s, long n);
361 362
362static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) 363static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
363{ 364{
364 if (access_ok(VERIFY_READ, from, n)) 365 if (access_ok(VERIFY_READ, from, n))
365 n = __arch_copy_from_user(to, from, n); 366 n = __copy_from_user(to, from, n);
366 else /* security hole - plug it */ 367 else /* security hole - plug it */
367 memzero(to, n); 368 memzero(to, n);
368 return n; 369 return n;
369} 370}
370 371
371static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n)
372{
373 return __arch_copy_from_user(to, from, n);
374}
375
376static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) 372static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
377{ 373{
378 if (access_ok(VERIFY_WRITE, to, n)) 374 if (access_ok(VERIFY_WRITE, to, n))
379 n = __arch_copy_to_user(to, from, n); 375 n = __copy_to_user(to, from, n);
380 return n; 376 return n;
381} 377}
382 378
383static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n)
384{
385 return __arch_copy_to_user(to, from, n);
386}
387
388#define __copy_to_user_inatomic __copy_to_user 379#define __copy_to_user_inatomic __copy_to_user
389#define __copy_from_user_inatomic __copy_from_user 380#define __copy_from_user_inatomic __copy_from_user
390 381
391static inline unsigned long clear_user (void __user *to, unsigned long n) 382static inline unsigned long clear_user(void __user *to, unsigned long n)
392{ 383{
393 if (access_ok(VERIFY_WRITE, to, n)) 384 if (access_ok(VERIFY_WRITE, to, n))
394 n = __arch_clear_user(to, n); 385 n = __clear_user(to, n);
395 return n; 386 return n;
396} 387}
397 388
398static inline unsigned long __clear_user (void __user *to, unsigned long n) 389static inline long strncpy_from_user(char *dst, const char __user *src, long count)
399{
400 return __arch_clear_user(to, n);
401}
402
403static inline long strncpy_from_user (char *dst, const char __user *src, long count)
404{ 390{
405 long res = -EFAULT; 391 long res = -EFAULT;
406 if (access_ok(VERIFY_READ, src, 1)) 392 if (access_ok(VERIFY_READ, src, 1))
407 res = __arch_strncpy_from_user(dst, src, count); 393 res = __strncpy_from_user(dst, src, count);
408 return res; 394 return res;
409} 395}
410 396
411static inline long __strncpy_from_user (char *dst, const char __user *src, long count)
412{
413 return __arch_strncpy_from_user(dst, src, count);
414}
415
416#define strlen_user(s) strnlen_user(s, ~0UL >> 1) 397#define strlen_user(s) strnlen_user(s, ~0UL >> 1)
417 398
418static inline long strnlen_user(const char __user *s, long n) 399static inline long strnlen_user(const char __user *s, long n)
@@ -420,7 +401,7 @@ static inline long strnlen_user(const char __user *s, long n)
420 unsigned long res = 0; 401 unsigned long res = 0;
421 402
422 if (__addr_ok(s)) 403 if (__addr_ok(s))
423 res = __arch_strnlen_user(s, n); 404 res = __strnlen_user(s, n);
424 405
425 return res; 406 return res;
426} 407}
diff --git a/include/asm-arm/ucontext.h b/include/asm-arm/ucontext.h
index 9e6f7ca9f5ae..bf65e9f4525d 100644
--- a/include/asm-arm/ucontext.h
+++ b/include/asm-arm/ucontext.h
@@ -35,6 +35,17 @@ struct ucontext {
35 * bytes, to prevent unpredictable padding in the signal frame. 35 * bytes, to prevent unpredictable padding in the signal frame.
36 */ 36 */
37 37
38#ifdef CONFIG_CRUNCH
39#define CRUNCH_MAGIC 0x5065cf03
40#define CRUNCH_STORAGE_SIZE (CRUNCH_SIZE + 8)
41
42struct crunch_sigframe {
43 unsigned long magic;
44 unsigned long size;
45 struct crunch_state storage;
46} __attribute__((__aligned__(8)));
47#endif
48
38#ifdef CONFIG_IWMMXT 49#ifdef CONFIG_IWMMXT
39/* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */ 50/* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */
40#define IWMMXT_MAGIC 0x12ef842a 51#define IWMMXT_MAGIC 0x12ef842a
@@ -74,6 +85,9 @@ struct vfp_sigframe
74 * one of these. 85 * one of these.
75 */ 86 */
76struct aux_sigframe { 87struct aux_sigframe {
88#ifdef CONFIG_CRUNCH
89 struct crunch_sigframe crunch;
90#endif
77#ifdef CONFIG_IWMMXT 91#ifdef CONFIG_IWMMXT
78 struct iwmmxt_sigframe iwmmxt; 92 struct iwmmxt_sigframe iwmmxt;
79#endif 93#endif