diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 14:53:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 14:53:07 -0500 |
commit | 29a41e9e029d21c306e3ad6e723700348b04706a (patch) | |
tree | 3c7f807016a1e16c70992bbcba1269ac4cfe2fa5 /arch/parisc/include | |
parent | d9e8a3a5b8298a3c814ed37ac5756e6f67b6be41 (diff) | |
parent | ae16489eb1175066c8f3008fc3c0396c525e1906 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
parisc: export length of os_hpmc vector
parisc: fix kernel crash (protection id trap) when compiling ruby1.9
parisc: Use DEFINE_SPINLOCK
parisc: add uevent helper for parisc bus
parisc: fix ipv6 checksum
parisc: quiet palo not-found message from "which"
parisc: Replace NR_CPUS in parisc code
parisc: trivial fixes
parisc: fix braino in commit adding __space_to_prot
parisc: factor out sid to protid conversion
parisc: use leX_to_cpu in place of __fswabX
parisc: fix GFP_KERNEL use while atomic in unwinder
parisc: remove dead BIO_VMERGE_BOUNDARY and BIO_VMERGE_MAX_SIZE definitions
parisc: set_time() catch errors
parisc: use the new byteorder headers
parisc: drivers/parisc/: make code static
parisc: lib/: make code static
Diffstat (limited to 'arch/parisc/include')
-rw-r--r-- | arch/parisc/include/asm/byteorder.h | 37 | ||||
-rw-r--r-- | arch/parisc/include/asm/checksum.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/io.h | 12 | ||||
-rw-r--r-- | arch/parisc/include/asm/mmu_context.h | 13 | ||||
-rw-r--r-- | arch/parisc/include/asm/processor.h | 4 | ||||
-rw-r--r-- | arch/parisc/include/asm/uaccess.h | 2 |
6 files changed, 29 insertions, 41 deletions
diff --git a/arch/parisc/include/asm/byteorder.h b/arch/parisc/include/asm/byteorder.h index db148313de5d..83095c5bb379 100644 --- a/arch/parisc/include/asm/byteorder.h +++ b/arch/parisc/include/asm/byteorder.h | |||
@@ -4,9 +4,10 @@ | |||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
6 | 6 | ||
7 | #ifdef __GNUC__ | 7 | #define __BIG_ENDIAN |
8 | #define __SWAB_64_THRU_32__ | ||
8 | 9 | ||
9 | static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x) | 10 | static inline __attribute_const__ __u16 __arch_swab16(__u16 x) |
10 | { | 11 | { |
11 | __asm__("dep %0, 15, 8, %0\n\t" /* deposit 00ab -> 0bab */ | 12 | __asm__("dep %0, 15, 8, %0\n\t" /* deposit 00ab -> 0bab */ |
12 | "shd %%r0, %0, 8, %0" /* shift 000000ab -> 00ba */ | 13 | "shd %%r0, %0, 8, %0" /* shift 000000ab -> 00ba */ |
@@ -14,8 +15,9 @@ static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x) | |||
14 | : "0" (x)); | 15 | : "0" (x)); |
15 | return x; | 16 | return x; |
16 | } | 17 | } |
18 | #define __arch_swab16 __arch_swab16 | ||
17 | 19 | ||
18 | static __inline__ __attribute_const__ __u32 ___arch__swab24(__u32 x) | 20 | static inline __attribute_const__ __u32 __arch_swab24(__u32 x) |
19 | { | 21 | { |
20 | __asm__("shd %0, %0, 8, %0\n\t" /* shift xabcxabc -> cxab */ | 22 | __asm__("shd %0, %0, 8, %0\n\t" /* shift xabcxabc -> cxab */ |
21 | "dep %0, 15, 8, %0\n\t" /* deposit cxab -> cbab */ | 23 | "dep %0, 15, 8, %0\n\t" /* deposit cxab -> cbab */ |
@@ -25,7 +27,7 @@ static __inline__ __attribute_const__ __u32 ___arch__swab24(__u32 x) | |||
25 | return x; | 27 | return x; |
26 | } | 28 | } |
27 | 29 | ||
28 | static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) | 30 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) |
29 | { | 31 | { |
30 | unsigned int temp; | 32 | unsigned int temp; |
31 | __asm__("shd %0, %0, 16, %1\n\t" /* shift abcdabcd -> cdab */ | 33 | __asm__("shd %0, %0, 16, %1\n\t" /* shift abcdabcd -> cdab */ |
@@ -35,7 +37,7 @@ static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) | |||
35 | : "0" (x)); | 37 | : "0" (x)); |
36 | return x; | 38 | return x; |
37 | } | 39 | } |
38 | 40 | #define __arch_swab32 __arch_swab32 | |
39 | 41 | ||
40 | #if BITS_PER_LONG > 32 | 42 | #if BITS_PER_LONG > 32 |
41 | /* | 43 | /* |
@@ -48,7 +50,8 @@ static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) | |||
48 | ** HSHR 67452301 -> *6*4*2*0 into %0 | 50 | ** HSHR 67452301 -> *6*4*2*0 into %0 |
49 | ** OR %0 | %1 -> 76543210 into %0 (all done!) | 51 | ** OR %0 | %1 -> 76543210 into %0 (all done!) |
50 | */ | 52 | */ |
51 | static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x) { | 53 | static inline __attribute_const__ __u64 __arch_swab64(__u64 x) |
54 | { | ||
52 | __u64 temp; | 55 | __u64 temp; |
53 | __asm__("permh,3210 %0, %0\n\t" | 56 | __asm__("permh,3210 %0, %0\n\t" |
54 | "hshl %0, 8, %1\n\t" | 57 | "hshl %0, 8, %1\n\t" |
@@ -58,25 +61,9 @@ static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x) { | |||
58 | : "0" (x)); | 61 | : "0" (x)); |
59 | return x; | 62 | return x; |
60 | } | 63 | } |
61 | #define __arch__swab64(x) ___arch__swab64(x) | 64 | #define __arch_swab64 __arch_swab64 |
62 | #define __BYTEORDER_HAS_U64__ | 65 | #endif /* BITS_PER_LONG > 32 */ |
63 | #elif !defined(__STRICT_ANSI__) | ||
64 | static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x) | ||
65 | { | ||
66 | __u32 t1 = ___arch__swab32((__u32) x); | ||
67 | __u32 t2 = ___arch__swab32((__u32) (x >> 32)); | ||
68 | return (((__u64) t1 << 32) | t2); | ||
69 | } | ||
70 | #define __arch__swab64(x) ___arch__swab64(x) | ||
71 | #define __BYTEORDER_HAS_U64__ | ||
72 | #endif | ||
73 | |||
74 | #define __arch__swab16(x) ___arch__swab16(x) | ||
75 | #define __arch__swab24(x) ___arch__swab24(x) | ||
76 | #define __arch__swab32(x) ___arch__swab32(x) | ||
77 | |||
78 | #endif /* __GNUC__ */ | ||
79 | 66 | ||
80 | #include <linux/byteorder/big_endian.h> | 67 | #include <linux/byteorder.h> |
81 | 68 | ||
82 | #endif /* _PARISC_BYTEORDER_H */ | 69 | #endif /* _PARISC_BYTEORDER_H */ |
diff --git a/arch/parisc/include/asm/checksum.h b/arch/parisc/include/asm/checksum.h index e9639ccc3fce..c84b2fcb18a9 100644 --- a/arch/parisc/include/asm/checksum.h +++ b/arch/parisc/include/asm/checksum.h | |||
@@ -182,7 +182,7 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, | |||
182 | #endif | 182 | #endif |
183 | : "=r" (sum), "=r" (saddr), "=r" (daddr), "=r" (len) | 183 | : "=r" (sum), "=r" (saddr), "=r" (daddr), "=r" (len) |
184 | : "0" (sum), "1" (saddr), "2" (daddr), "3" (len), "r" (proto) | 184 | : "0" (sum), "1" (saddr), "2" (daddr), "3" (len), "r" (proto) |
185 | : "r19", "r20", "r21", "r22"); | 185 | : "r19", "r20", "r21", "r22", "memory"); |
186 | return csum_fold(sum); | 186 | return csum_fold(sum); |
187 | } | 187 | } |
188 | 188 | ||
diff --git a/arch/parisc/include/asm/io.h b/arch/parisc/include/asm/io.h index 55ddb1842107..d3031d1f9d03 100644 --- a/arch/parisc/include/asm/io.h +++ b/arch/parisc/include/asm/io.h | |||
@@ -4,12 +4,6 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <asm/pgtable.h> | 5 | #include <asm/pgtable.h> |
6 | 6 | ||
7 | extern unsigned long parisc_vmerge_boundary; | ||
8 | extern unsigned long parisc_vmerge_max_size; | ||
9 | |||
10 | #define BIO_VMERGE_BOUNDARY parisc_vmerge_boundary | ||
11 | #define BIO_VMERGE_MAX_SIZE parisc_vmerge_max_size | ||
12 | |||
13 | #define virt_to_phys(a) ((unsigned long)__pa(a)) | 7 | #define virt_to_phys(a) ((unsigned long)__pa(a)) |
14 | #define phys_to_virt(a) __va(a) | 8 | #define phys_to_virt(a) __va(a) |
15 | #define virt_to_bus virt_to_phys | 9 | #define virt_to_bus virt_to_phys |
@@ -182,9 +176,9 @@ static inline void __raw_writeq(unsigned long long b, volatile void __iomem *add | |||
182 | 176 | ||
183 | /* readb can never be const, so use __fswab instead of le*_to_cpu */ | 177 | /* readb can never be const, so use __fswab instead of le*_to_cpu */ |
184 | #define readb(addr) __raw_readb(addr) | 178 | #define readb(addr) __raw_readb(addr) |
185 | #define readw(addr) __fswab16(__raw_readw(addr)) | 179 | #define readw(addr) le16_to_cpu(__raw_readw(addr)) |
186 | #define readl(addr) __fswab32(__raw_readl(addr)) | 180 | #define readl(addr) le32_to_cpu(__raw_readl(addr)) |
187 | #define readq(addr) __fswab64(__raw_readq(addr)) | 181 | #define readq(addr) le64_to_cpu(__raw_readq(addr)) |
188 | #define writeb(b, addr) __raw_writeb(b, addr) | 182 | #define writeb(b, addr) __raw_writeb(b, addr) |
189 | #define writew(b, addr) __raw_writew(cpu_to_le16(b), addr) | 183 | #define writew(b, addr) __raw_writew(cpu_to_le16(b), addr) |
190 | #define writel(b, addr) __raw_writel(cpu_to_le32(b), addr) | 184 | #define writel(b, addr) __raw_writel(cpu_to_le32(b), addr) |
diff --git a/arch/parisc/include/asm/mmu_context.h b/arch/parisc/include/asm/mmu_context.h index 85856c74ad1d..354b2aca990e 100644 --- a/arch/parisc/include/asm/mmu_context.h +++ b/arch/parisc/include/asm/mmu_context.h | |||
@@ -34,16 +34,21 @@ destroy_context(struct mm_struct *mm) | |||
34 | mm->context = 0; | 34 | mm->context = 0; |
35 | } | 35 | } |
36 | 36 | ||
37 | static inline void load_context(mm_context_t context) | 37 | static inline unsigned long __space_to_prot(mm_context_t context) |
38 | { | 38 | { |
39 | mtsp(context, 3); | ||
40 | #if SPACEID_SHIFT == 0 | 39 | #if SPACEID_SHIFT == 0 |
41 | mtctl(context << 1,8); | 40 | return context << 1; |
42 | #else | 41 | #else |
43 | mtctl(context >> (SPACEID_SHIFT - 1),8); | 42 | return context >> (SPACEID_SHIFT - 1); |
44 | #endif | 43 | #endif |
45 | } | 44 | } |
46 | 45 | ||
46 | static inline void load_context(mm_context_t context) | ||
47 | { | ||
48 | mtsp(context, 3); | ||
49 | mtctl(__space_to_prot(context), 8); | ||
50 | } | ||
51 | |||
47 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | 52 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) |
48 | { | 53 | { |
49 | 54 | ||
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index 3c9d34844c83..9d64df8754ba 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
18 | #include <asm/types.h> | 18 | #include <asm/types.h> |
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | #include <asm/percpu.h> | ||
20 | #endif /* __ASSEMBLY__ */ | 21 | #endif /* __ASSEMBLY__ */ |
21 | 22 | ||
22 | #define KERNEL_STACK_SIZE (4*PAGE_SIZE) | 23 | #define KERNEL_STACK_SIZE (4*PAGE_SIZE) |
@@ -109,8 +110,7 @@ struct cpuinfo_parisc { | |||
109 | }; | 110 | }; |
110 | 111 | ||
111 | extern struct system_cpuinfo_parisc boot_cpu_data; | 112 | extern struct system_cpuinfo_parisc boot_cpu_data; |
112 | extern struct cpuinfo_parisc cpu_data[NR_CPUS]; | 113 | DECLARE_PER_CPU(struct cpuinfo_parisc, cpu_data); |
113 | #define current_cpu_data cpu_data[smp_processor_id()] | ||
114 | 114 | ||
115 | #define CPU_HVERSION ((boot_cpu_data.hversion >> 4) & 0x0FFF) | 115 | #define CPU_HVERSION ((boot_cpu_data.hversion >> 4) & 0x0FFF) |
116 | 116 | ||
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 4878b9501f24..1c6dbb6f6e56 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h | |||
@@ -241,4 +241,6 @@ unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned lo | |||
241 | #define __copy_to_user_inatomic __copy_to_user | 241 | #define __copy_to_user_inatomic __copy_to_user |
242 | #define __copy_from_user_inatomic __copy_from_user | 242 | #define __copy_from_user_inatomic __copy_from_user |
243 | 243 | ||
244 | int fixup_exception(struct pt_regs *regs); | ||
245 | |||
244 | #endif /* __PARISC_UACCESS_H */ | 246 | #endif /* __PARISC_UACCESS_H */ |