diff options
author | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
commit | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (patch) | |
tree | 8d104ec2a459346b99413b0b77421ca7b9936c1a /arch/mips/include | |
parent | ca44d6e60f9de26281fda203f58b570e1748c015 (diff) | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/atomic.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/bitsperlong.h | 8 | ||||
-rw-r--r-- | arch/mips/include/asm/cpu-info.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/delay.h | 92 | ||||
-rw-r--r-- | arch/mips/include/asm/ioctl.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/irq.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/page.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/signal.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/suspend.h | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/types.h | 3 | ||||
-rw-r--r-- | arch/mips/include/asm/uaccess.h | 2 |
11 files changed, 24 insertions, 103 deletions
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index 1b332e15ab52..eb7f01cfd1ac 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
@@ -793,6 +793,6 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
793 | #define smp_mb__before_atomic_inc() smp_llsc_mb() | 793 | #define smp_mb__before_atomic_inc() smp_llsc_mb() |
794 | #define smp_mb__after_atomic_inc() smp_llsc_mb() | 794 | #define smp_mb__after_atomic_inc() smp_llsc_mb() |
795 | 795 | ||
796 | #include <asm-generic/atomic.h> | 796 | #include <asm-generic/atomic-long.h> |
797 | 797 | ||
798 | #endif /* _ASM_ATOMIC_H */ | 798 | #endif /* _ASM_ATOMIC_H */ |
diff --git a/arch/mips/include/asm/bitsperlong.h b/arch/mips/include/asm/bitsperlong.h new file mode 100644 index 000000000000..3e4c10a8e787 --- /dev/null +++ b/arch/mips/include/asm/bitsperlong.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __ASM_MIPS_BITSPERLONG_H | ||
2 | #define __ASM_MIPS_BITSPERLONG_H | ||
3 | |||
4 | #define __BITS_PER_LONG _MIPS_SZLONG | ||
5 | |||
6 | #include <asm-generic/bitsperlong.h> | ||
7 | |||
8 | #endif /* __ASM_MIPS_BITSPERLONG_H */ | ||
diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index 744cd8fb107f..126044308dec 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h | |||
@@ -39,8 +39,8 @@ struct cache_desc { | |||
39 | #define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */ | 39 | #define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */ |
40 | 40 | ||
41 | struct cpuinfo_mips { | 41 | struct cpuinfo_mips { |
42 | unsigned long udelay_val; | 42 | unsigned int udelay_val; |
43 | unsigned long asid_cache; | 43 | unsigned int asid_cache; |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Capability and feature descriptor structure for MIPS CPU | 46 | * Capability and feature descriptor structure for MIPS CPU |
diff --git a/arch/mips/include/asm/delay.h b/arch/mips/include/asm/delay.h index b0bccd2c4ed5..a07e51b2be13 100644 --- a/arch/mips/include/asm/delay.h +++ b/arch/mips/include/asm/delay.h | |||
@@ -11,94 +11,12 @@ | |||
11 | #ifndef _ASM_DELAY_H | 11 | #ifndef _ASM_DELAY_H |
12 | #define _ASM_DELAY_H | 12 | #define _ASM_DELAY_H |
13 | 13 | ||
14 | #include <linux/param.h> | 14 | extern void __delay(unsigned int loops); |
15 | #include <linux/smp.h> | 15 | extern void __ndelay(unsigned int ns); |
16 | extern void __udelay(unsigned int us); | ||
16 | 17 | ||
17 | #include <asm/compiler.h> | 18 | #define ndelay(ns) __udelay(ns) |
18 | #include <asm/war.h> | 19 | #define udelay(us) __udelay(us) |
19 | |||
20 | static inline void __delay(unsigned long loops) | ||
21 | { | ||
22 | if (sizeof(long) == 4) | ||
23 | __asm__ __volatile__ ( | ||
24 | " .set noreorder \n" | ||
25 | " .align 3 \n" | ||
26 | "1: bnez %0, 1b \n" | ||
27 | " subu %0, 1 \n" | ||
28 | " .set reorder \n" | ||
29 | : "=r" (loops) | ||
30 | : "0" (loops)); | ||
31 | else if (sizeof(long) == 8 && !DADDI_WAR) | ||
32 | __asm__ __volatile__ ( | ||
33 | " .set noreorder \n" | ||
34 | " .align 3 \n" | ||
35 | "1: bnez %0, 1b \n" | ||
36 | " dsubu %0, 1 \n" | ||
37 | " .set reorder \n" | ||
38 | : "=r" (loops) | ||
39 | : "0" (loops)); | ||
40 | else if (sizeof(long) == 8 && DADDI_WAR) | ||
41 | __asm__ __volatile__ ( | ||
42 | " .set noreorder \n" | ||
43 | " .align 3 \n" | ||
44 | "1: bnez %0, 1b \n" | ||
45 | " dsubu %0, %2 \n" | ||
46 | " .set reorder \n" | ||
47 | : "=r" (loops) | ||
48 | : "0" (loops), "r" (1)); | ||
49 | } | ||
50 | |||
51 | |||
52 | /* | ||
53 | * Division by multiplication: you don't have to worry about | ||
54 | * loss of precision. | ||
55 | * | ||
56 | * Use only for very small delays ( < 1 msec). Should probably use a | ||
57 | * lookup table, really, as the multiplications take much too long with | ||
58 | * short delays. This is a "reasonable" implementation, though (and the | ||
59 | * first constant multiplications gets optimized away if the delay is | ||
60 | * a constant) | ||
61 | */ | ||
62 | |||
63 | static inline void __udelay(unsigned long usecs, unsigned long lpj) | ||
64 | { | ||
65 | unsigned long hi, lo; | ||
66 | |||
67 | /* | ||
68 | * The rates of 128 is rounded wrongly by the catchall case | ||
69 | * for 64-bit. Excessive precission? Probably ... | ||
70 | */ | ||
71 | #if defined(CONFIG_64BIT) && (HZ == 128) | ||
72 | usecs *= 0x0008637bd05af6c7UL; /* 2**64 / (1000000 / HZ) */ | ||
73 | #elif defined(CONFIG_64BIT) | ||
74 | usecs *= (0x8000000000000000UL / (500000 / HZ)); | ||
75 | #else /* 32-bit junk follows here */ | ||
76 | usecs *= (unsigned long) (((0x8000000000000000ULL / (500000 / HZ)) + | ||
77 | 0x80000000ULL) >> 32); | ||
78 | #endif | ||
79 | |||
80 | if (sizeof(long) == 4) | ||
81 | __asm__("multu\t%2, %3" | ||
82 | : "=h" (usecs), "=l" (lo) | ||
83 | : "r" (usecs), "r" (lpj) | ||
84 | : GCC_REG_ACCUM); | ||
85 | else if (sizeof(long) == 8 && !R4000_WAR) | ||
86 | __asm__("dmultu\t%2, %3" | ||
87 | : "=h" (usecs), "=l" (lo) | ||
88 | : "r" (usecs), "r" (lpj) | ||
89 | : GCC_REG_ACCUM); | ||
90 | else if (sizeof(long) == 8 && R4000_WAR) | ||
91 | __asm__("dmultu\t%3, %4\n\tmfhi\t%0" | ||
92 | : "=r" (usecs), "=h" (hi), "=l" (lo) | ||
93 | : "r" (usecs), "r" (lpj) | ||
94 | : GCC_REG_ACCUM); | ||
95 | |||
96 | __delay(usecs); | ||
97 | } | ||
98 | |||
99 | #define __udelay_val cpu_data[raw_smp_processor_id()].udelay_val | ||
100 | |||
101 | #define udelay(usecs) __udelay((usecs), __udelay_val) | ||
102 | 20 | ||
103 | /* make sure "usecs *= ..." in udelay do not overflow. */ | 21 | /* make sure "usecs *= ..." in udelay do not overflow. */ |
104 | #if HZ >= 1000 | 22 | #if HZ >= 1000 |
diff --git a/arch/mips/include/asm/ioctl.h b/arch/mips/include/asm/ioctl.h index 85067e248a83..916163401b2c 100644 --- a/arch/mips/include/asm/ioctl.h +++ b/arch/mips/include/asm/ioctl.h | |||
@@ -60,12 +60,16 @@ | |||
60 | ((nr) << _IOC_NRSHIFT) | \ | 60 | ((nr) << _IOC_NRSHIFT) | \ |
61 | ((size) << _IOC_SIZESHIFT)) | 61 | ((size) << _IOC_SIZESHIFT)) |
62 | 62 | ||
63 | #ifdef __KERNEL__ | ||
63 | /* provoke compile error for invalid uses of size argument */ | 64 | /* provoke compile error for invalid uses of size argument */ |
64 | extern unsigned int __invalid_size_argument_for_IOC; | 65 | extern unsigned int __invalid_size_argument_for_IOC; |
65 | #define _IOC_TYPECHECK(t) \ | 66 | #define _IOC_TYPECHECK(t) \ |
66 | ((sizeof(t) == sizeof(t[1]) && \ | 67 | ((sizeof(t) == sizeof(t[1]) && \ |
67 | sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ | 68 | sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ |
68 | sizeof(t) : __invalid_size_argument_for_IOC) | 69 | sizeof(t) : __invalid_size_argument_for_IOC) |
70 | #else | ||
71 | #define _IOC_TYPECHECK(t) (sizeof(t)) | ||
72 | #endif | ||
69 | 73 | ||
70 | /* used to create numbers */ | 74 | /* used to create numbers */ |
71 | #define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0) | 75 | #define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0) |
diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h index 3214ade02d10..4f1eed107b08 100644 --- a/arch/mips/include/asm/irq.h +++ b/arch/mips/include/asm/irq.h | |||
@@ -49,7 +49,7 @@ static inline void smtc_im_ack_irq(unsigned int irq) | |||
49 | #ifdef CONFIG_MIPS_MT_SMTC_IRQAFF | 49 | #ifdef CONFIG_MIPS_MT_SMTC_IRQAFF |
50 | #include <linux/cpumask.h> | 50 | #include <linux/cpumask.h> |
51 | 51 | ||
52 | extern void plat_set_irq_affinity(unsigned int irq, | 52 | extern int plat_set_irq_affinity(unsigned int irq, |
53 | const struct cpumask *affinity); | 53 | const struct cpumask *affinity); |
54 | extern void smtc_forward_irq(unsigned int irq); | 54 | extern void smtc_forward_irq(unsigned int irq); |
55 | 55 | ||
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index 9f946e4ca057..72c80d2034c2 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -189,6 +189,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
189 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) | 189 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) |
190 | 190 | ||
191 | #include <asm-generic/memory_model.h> | 191 | #include <asm-generic/memory_model.h> |
192 | #include <asm-generic/page.h> | 192 | #include <asm-generic/getorder.h> |
193 | 193 | ||
194 | #endif /* _ASM_PAGE_H */ | 194 | #endif /* _ASM_PAGE_H */ |
diff --git a/arch/mips/include/asm/signal.h b/arch/mips/include/asm/signal.h index bee5153aca48..c783f364938c 100644 --- a/arch/mips/include/asm/signal.h +++ b/arch/mips/include/asm/signal.h | |||
@@ -109,7 +109,7 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ | |||
109 | #define SIG_UNBLOCK 2 /* for unblocking signals */ | 109 | #define SIG_UNBLOCK 2 /* for unblocking signals */ |
110 | #define SIG_SETMASK 3 /* for setting the signal mask */ | 110 | #define SIG_SETMASK 3 /* for setting the signal mask */ |
111 | 111 | ||
112 | #include <asm-generic/signal.h> | 112 | #include <asm-generic/signal-defs.h> |
113 | 113 | ||
114 | struct sigaction { | 114 | struct sigaction { |
115 | unsigned int sa_flags; | 115 | unsigned int sa_flags; |
diff --git a/arch/mips/include/asm/suspend.h b/arch/mips/include/asm/suspend.h deleted file mode 100644 index 2562f8f9be0e..000000000000 --- a/arch/mips/include/asm/suspend.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_SUSPEND_H | ||
2 | #define __ASM_SUSPEND_H | ||
3 | |||
4 | /* Somewhen... Maybe :-) */ | ||
5 | |||
6 | #endif /* __ASM_SUSPEND_H */ | ||
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h index 7956e69a3bd5..544a2854598f 100644 --- a/arch/mips/include/asm/types.h +++ b/arch/mips/include/asm/types.h | |||
@@ -31,9 +31,6 @@ typedef unsigned short umode_t; | |||
31 | * These aren't exported outside the kernel to avoid name space clashes | 31 | * These aren't exported outside the kernel to avoid name space clashes |
32 | */ | 32 | */ |
33 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
34 | |||
35 | #define BITS_PER_LONG _MIPS_SZLONG | ||
36 | |||
37 | #ifndef __ASSEMBLY__ | 34 | #ifndef __ASSEMBLY__ |
38 | 35 | ||
39 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ | 36 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ |
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h index 8de858f5449f..c2d53c18fd36 100644 --- a/arch/mips/include/asm/uaccess.h +++ b/arch/mips/include/asm/uaccess.h | |||
@@ -956,7 +956,7 @@ __clear_user(void __user *addr, __kernel_size_t size) | |||
956 | void __user * __cl_addr = (addr); \ | 956 | void __user * __cl_addr = (addr); \ |
957 | unsigned long __cl_size = (n); \ | 957 | unsigned long __cl_size = (n); \ |
958 | if (__cl_size && access_ok(VERIFY_WRITE, \ | 958 | if (__cl_size && access_ok(VERIFY_WRITE, \ |
959 | ((unsigned long)(__cl_addr)), __cl_size)) \ | 959 | __cl_addr, __cl_size)) \ |
960 | __cl_size = __clear_user(__cl_addr, __cl_size); \ | 960 | __cl_size = __clear_user(__cl_addr, __cl_size); \ |
961 | __cl_size; \ | 961 | __cl_size; \ |
962 | }) | 962 | }) |