diff options
Diffstat (limited to 'include')
113 files changed, 876 insertions, 785 deletions
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index cc9c7e8cced5..f3b7b1a59c56 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -572,7 +572,7 @@ __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) | |||
572 | if something tries to do an invalid cmpxchg(). */ | 572 | if something tries to do an invalid cmpxchg(). */ |
573 | extern void __cmpxchg_called_with_bad_pointer(void); | 573 | extern void __cmpxchg_called_with_bad_pointer(void); |
574 | 574 | ||
575 | static inline unsigned long | 575 | static __always_inline unsigned long |
576 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | 576 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) |
577 | { | 577 | { |
578 | switch (size) { | 578 | switch (size) { |
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index f5bcc9a1aed6..b726acfcab14 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h | |||
@@ -116,7 +116,11 @@ typedef struct { volatile u32 offset[4096]; } __regbase32; | |||
116 | ->offset[((vaddr)&4095)>>2] | 116 | ->offset[((vaddr)&4095)>>2] |
117 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) | 117 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) |
118 | 118 | ||
119 | extern void omap_map_common_io(void); | 119 | extern void omap1_map_common_io(void); |
120 | extern void omap1_init_common_hw(void); | ||
121 | |||
122 | extern void omap2_map_common_io(void); | ||
123 | extern void omap2_init_common_hw(void); | ||
120 | 124 | ||
121 | #else | 125 | #else |
122 | 126 | ||
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 1c9de29cafef..a2330bf83695 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -17,6 +17,7 @@ | |||
17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio | 17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio |
18 | * 01-Oct-2004 BJD Added the new gpio functions | 18 | * 01-Oct-2004 BJD Added the new gpio functions |
19 | * 16-Oct-2004 BJD Removed the clock variables | 19 | * 16-Oct-2004 BJD Removed the clock variables |
20 | * 15-Jan-2006 LCVR Added s3c2400_gpio_getirq() | ||
20 | */ | 21 | */ |
21 | 22 | ||
22 | #ifndef __ASM_ARCH_HARDWARE_H | 23 | #ifndef __ASM_ARCH_HARDWARE_H |
@@ -55,6 +56,12 @@ extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); | |||
55 | 56 | ||
56 | extern int s3c2410_gpio_getirq(unsigned int pin); | 57 | extern int s3c2410_gpio_getirq(unsigned int pin); |
57 | 58 | ||
59 | #ifdef CONFIG_CPU_S3C2400 | ||
60 | |||
61 | extern int s3c2400_gpio_getirq(unsigned int pin); | ||
62 | |||
63 | #endif /* CONFIG_CPU_S3C2400 */ | ||
64 | |||
58 | /* s3c2410_gpio_irqfilter | 65 | /* s3c2410_gpio_irqfilter |
59 | * | 66 | * |
60 | * set the irq filtering on the given pin | 67 | * set the irq filtering on the given pin |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 7f1be48ad67e..9697f93afe74 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -22,6 +22,7 @@ | |||
22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 | 22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 |
23 | * 26-Oct-2005 BJD Added generic configuration types | 23 | * 26-Oct-2005 BJD Added generic configuration types |
24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers | 24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers |
25 | * 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro | ||
25 | */ | 26 | */ |
26 | 27 | ||
27 | 28 | ||
@@ -39,6 +40,27 @@ | |||
39 | #define S3C2410_GPIO_BANKG (32*6) | 40 | #define S3C2410_GPIO_BANKG (32*6) |
40 | #define S3C2410_GPIO_BANKH (32*7) | 41 | #define S3C2410_GPIO_BANKH (32*7) |
41 | 42 | ||
43 | #ifdef CONFIG_CPU_S3C2400 | ||
44 | #define S3C24XX_GPIO_BASE(x) S3C2400_GPIO_BASE(x) | ||
45 | #define S3C24XX_MISCCR S3C2400_MISCCR | ||
46 | #else | ||
47 | #define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x) | ||
48 | #define S3C24XX_MISCCR S3C2410_MISCCR | ||
49 | #endif /* CONFIG_CPU_S3C2400 */ | ||
50 | |||
51 | |||
52 | /* S3C2400 doesn't have a 1:1 mapping to S3C2410 gpio base pins */ | ||
53 | |||
54 | #define S3C2400_BANKNUM(pin) (((pin) & ~31) / 32) | ||
55 | #define S3C2400_BASEA2B(pin) ((((pin) & ~31) >> 2)) | ||
56 | #define S3C2400_BASEC2H(pin) ((S3C2400_BANKNUM(pin) * 10) + \ | ||
57 | (2 * (S3C2400_BANKNUM(pin)-2))) | ||
58 | |||
59 | #define S3C2400_GPIO_BASE(pin) (pin < S3C2410_GPIO_BANKC ? \ | ||
60 | S3C2400_BASEA2B(pin)+S3C24XX_VA_GPIO : \ | ||
61 | S3C2400_BASEC2H(pin)+S3C24XX_VA_GPIO) | ||
62 | |||
63 | |||
42 | #define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO) | 64 | #define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO) |
43 | #define S3C2410_GPIO_OFFSET(pin) ((pin) & 31) | 65 | #define S3C2410_GPIO_OFFSET(pin) ((pin) & 31) |
44 | 66 | ||
diff --git a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h index d4256d5f3a7c..747bdd31a74b 100644 --- a/include/asm-arm/checksum.h +++ b/include/asm-arm/checksum.h | |||
@@ -77,7 +77,7 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl) | |||
77 | mov %0, %0, lsr #16" | 77 | mov %0, %0, lsr #16" |
78 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) | 78 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) |
79 | : "1" (iph), "2" (ihl) | 79 | : "1" (iph), "2" (ihl) |
80 | : "cc"); | 80 | : "cc", "memory"); |
81 | return sum; | 81 | return sum; |
82 | } | 82 | } |
83 | 83 | ||
diff --git a/include/asm-arm/mutex.h b/include/asm-arm/mutex.h index 6caa59f1f595..cb29d84e690d 100644 --- a/include/asm-arm/mutex.h +++ b/include/asm-arm/mutex.h | |||
@@ -23,72 +23,71 @@ | |||
23 | * simply bail out immediately through the slow path where the lock will be | 23 | * simply bail out immediately through the slow path where the lock will be |
24 | * reattempted until it succeeds. | 24 | * reattempted until it succeeds. |
25 | */ | 25 | */ |
26 | #define __mutex_fastpath_lock(count, fail_fn) \ | 26 | static inline void |
27 | do { \ | 27 | __mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
28 | int __ex_flag, __res; \ | 28 | { |
29 | \ | 29 | int __ex_flag, __res; |
30 | typecheck(atomic_t *, count); \ | 30 | |
31 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 31 | __asm__ ( |
32 | \ | 32 | |
33 | __asm__ ( \ | 33 | "ldrex %0, [%2] \n\t" |
34 | "ldrex %0, [%2] \n" \ | 34 | "sub %0, %0, #1 \n\t" |
35 | "sub %0, %0, #1 \n" \ | 35 | "strex %1, %0, [%2] " |
36 | "strex %1, %0, [%2] \n" \ | 36 | |
37 | \ | 37 | : "=&r" (__res), "=&r" (__ex_flag) |
38 | : "=&r" (__res), "=&r" (__ex_flag) \ | 38 | : "r" (&(count)->counter) |
39 | : "r" (&(count)->counter) \ | 39 | : "cc","memory" ); |
40 | : "cc","memory" ); \ | 40 | |
41 | \ | 41 | __res |= __ex_flag; |
42 | if (unlikely(__res || __ex_flag)) \ | 42 | if (unlikely(__res != 0)) |
43 | fail_fn(count); \ | 43 | fail_fn(count); |
44 | } while (0) | 44 | } |
45 | 45 | ||
46 | #define __mutex_fastpath_lock_retval(count, fail_fn) \ | 46 | static inline int |
47 | ({ \ | 47 | __mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t *)) |
48 | int __ex_flag, __res; \ | 48 | { |
49 | \ | 49 | int __ex_flag, __res; |
50 | typecheck(atomic_t *, count); \ | 50 | |
51 | typecheck_fn(fastcall int (*)(atomic_t *), fail_fn); \ | 51 | __asm__ ( |
52 | \ | 52 | |
53 | __asm__ ( \ | 53 | "ldrex %0, [%2] \n\t" |
54 | "ldrex %0, [%2] \n" \ | 54 | "sub %0, %0, #1 \n\t" |
55 | "sub %0, %0, #1 \n" \ | 55 | "strex %1, %0, [%2] " |
56 | "strex %1, %0, [%2] \n" \ | 56 | |
57 | \ | 57 | : "=&r" (__res), "=&r" (__ex_flag) |
58 | : "=&r" (__res), "=&r" (__ex_flag) \ | 58 | : "r" (&(count)->counter) |
59 | : "r" (&(count)->counter) \ | 59 | : "cc","memory" ); |
60 | : "cc","memory" ); \ | 60 | |
61 | \ | 61 | __res |= __ex_flag; |
62 | __res |= __ex_flag; \ | 62 | if (unlikely(__res != 0)) |
63 | if (unlikely(__res != 0)) \ | 63 | __res = fail_fn(count); |
64 | __res = fail_fn(count); \ | 64 | return __res; |
65 | __res; \ | 65 | } |
66 | }) | ||
67 | 66 | ||
68 | /* | 67 | /* |
69 | * Same trick is used for the unlock fast path. However the original value, | 68 | * Same trick is used for the unlock fast path. However the original value, |
70 | * rather than the result, is used to test for success in order to have | 69 | * rather than the result, is used to test for success in order to have |
71 | * better generated assembly. | 70 | * better generated assembly. |
72 | */ | 71 | */ |
73 | #define __mutex_fastpath_unlock(count, fail_fn) \ | 72 | static inline void |
74 | do { \ | 73 | __mutex_fastpath_unlock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
75 | int __ex_flag, __res, __orig; \ | 74 | { |
76 | \ | 75 | int __ex_flag, __res, __orig; |
77 | typecheck(atomic_t *, count); \ | 76 | |
78 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 77 | __asm__ ( |
79 | \ | 78 | |
80 | __asm__ ( \ | 79 | "ldrex %0, [%3] \n\t" |
81 | "ldrex %0, [%3] \n" \ | 80 | "add %1, %0, #1 \n\t" |
82 | "add %1, %0, #1 \n" \ | 81 | "strex %2, %1, [%3] " |
83 | "strex %2, %1, [%3] \n" \ | 82 | |
84 | \ | 83 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) |
85 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) \ | 84 | : "r" (&(count)->counter) |
86 | : "r" (&(count)->counter) \ | 85 | : "cc","memory" ); |
87 | : "cc","memory" ); \ | 86 | |
88 | \ | 87 | __orig |= __ex_flag; |
89 | if (unlikely(__orig || __ex_flag)) \ | 88 | if (unlikely(__orig != 0)) |
90 | fail_fn(count); \ | 89 | fail_fn(count); |
91 | } while (0) | 90 | } |
92 | 91 | ||
93 | /* | 92 | /* |
94 | * If the unlock was done on a contended lock, or if the unlock simply fails | 93 | * If the unlock was done on a contended lock, or if the unlock simply fails |
@@ -110,12 +109,12 @@ __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) | |||
110 | 109 | ||
111 | __asm__ ( | 110 | __asm__ ( |
112 | 111 | ||
113 | "1: ldrex %0, [%3] \n" | 112 | "1: ldrex %0, [%3] \n\t" |
114 | "subs %1, %0, #1 \n" | 113 | "subs %1, %0, #1 \n\t" |
115 | "strexeq %2, %1, [%3] \n" | 114 | "strexeq %2, %1, [%3] \n\t" |
116 | "movlt %0, #0 \n" | 115 | "movlt %0, #0 \n\t" |
117 | "cmpeq %2, #0 \n" | 116 | "cmpeq %2, #0 \n\t" |
118 | "bgt 1b \n" | 117 | "bgt 1b " |
119 | 118 | ||
120 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) | 119 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) |
121 | : "r" (&count->counter) | 120 | : "r" (&count->counter) |
diff --git a/include/asm-cris/bitops.h b/include/asm-cris/bitops.h index d3eb0f1e4208..b7fef1572dc0 100644 --- a/include/asm-cris/bitops.h +++ b/include/asm-cris/bitops.h | |||
@@ -290,7 +290,7 @@ static inline int find_next_zero_bit (const unsigned long * addr, int size, int | |||
290 | tmp = *p; | 290 | tmp = *p; |
291 | 291 | ||
292 | found_first: | 292 | found_first: |
293 | tmp |= ~0UL >> size; | 293 | tmp |= ~0UL << size; |
294 | found_middle: | 294 | found_middle: |
295 | return result + ffz(tmp); | 295 | return result + ffz(tmp); |
296 | } | 296 | } |
diff --git a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h index 02be7b3a8a83..f686b519878e 100644 --- a/include/asm-frv/bitops.h +++ b/include/asm-frv/bitops.h | |||
@@ -209,7 +209,7 @@ static inline int find_next_zero_bit(const void *addr, int size, int offset) | |||
209 | tmp = *p; | 209 | tmp = *p; |
210 | 210 | ||
211 | found_first: | 211 | found_first: |
212 | tmp |= ~0UL >> size; | 212 | tmp |= ~0UL << size; |
213 | found_middle: | 213 | found_middle: |
214 | return result + ffz(tmp); | 214 | return result + ffz(tmp); |
215 | } | 215 | } |
diff --git a/include/asm-h8300/bitops.h b/include/asm-h8300/bitops.h index c0411ec9d651..ff7c2b721594 100644 --- a/include/asm-h8300/bitops.h +++ b/include/asm-h8300/bitops.h | |||
@@ -227,7 +227,7 @@ static __inline__ int find_next_zero_bit (const unsigned long * addr, int size, | |||
227 | tmp = *p; | 227 | tmp = *p; |
228 | 228 | ||
229 | found_first: | 229 | found_first: |
230 | tmp |= ~0UL >> size; | 230 | tmp |= ~0UL << size; |
231 | found_middle: | 231 | found_middle: |
232 | return result + ffz(tmp); | 232 | return result + ffz(tmp); |
233 | } | 233 | } |
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 36a92ed6a9d0..399145a247f2 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -507,7 +507,7 @@ struct alt_instr { | |||
507 | #define smp_rmb() rmb() | 507 | #define smp_rmb() rmb() |
508 | #define smp_wmb() wmb() | 508 | #define smp_wmb() wmb() |
509 | #define smp_read_barrier_depends() read_barrier_depends() | 509 | #define smp_read_barrier_depends() read_barrier_depends() |
510 | #define set_mb(var, value) do { xchg(&var, value); } while (0) | 510 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) |
511 | #else | 511 | #else |
512 | #define smp_mb() barrier() | 512 | #define smp_mb() barrier() |
513 | #define smp_rmb() barrier() | 513 | #define smp_rmb() barrier() |
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index d7e19eb344b7..af503a122b23 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -27,6 +27,15 @@ | |||
27 | #ifndef _ASM_I386_TOPOLOGY_H | 27 | #ifndef _ASM_I386_TOPOLOGY_H |
28 | #define _ASM_I386_TOPOLOGY_H | 28 | #define _ASM_I386_TOPOLOGY_H |
29 | 29 | ||
30 | #ifdef CONFIG_SMP | ||
31 | #define topology_physical_package_id(cpu) \ | ||
32 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) | ||
33 | #define topology_core_id(cpu) \ | ||
34 | (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) | ||
35 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | ||
36 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | ||
37 | #endif | ||
38 | |||
30 | #ifdef CONFIG_NUMA | 39 | #ifdef CONFIG_NUMA |
31 | 40 | ||
32 | #include <asm/mpspec.h> | 41 | #include <asm/mpspec.h> |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 597496ed2aee..cf6f2cd9c514 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -315,8 +315,9 @@ | |||
315 | #define __NR_faccessat 307 | 315 | #define __NR_faccessat 307 |
316 | #define __NR_pselect6 308 | 316 | #define __NR_pselect6 308 |
317 | #define __NR_ppoll 309 | 317 | #define __NR_ppoll 309 |
318 | #define __NR_unshare 310 | ||
318 | 319 | ||
319 | #define NR_syscalls 310 | 320 | #define NR_syscalls 311 |
320 | 321 | ||
321 | /* | 322 | /* |
322 | * user-visible error numbers are in the range -1 - -128: see | 323 | * user-visible error numbers are in the range -1 - -128: see |
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h index e62b95301d51..93f45c5f189f 100644 --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h | |||
@@ -17,14 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | 19 | ||
20 | #ifndef MAX_HWIFS | ||
21 | # ifdef CONFIG_PCI | ||
22 | #define MAX_HWIFS 10 | ||
23 | # else | ||
24 | #define MAX_HWIFS 6 | ||
25 | # endif | ||
26 | #endif | ||
27 | |||
28 | #define IDE_ARCH_OBSOLETE_DEFAULTS | 20 | #define IDE_ARCH_OBSOLETE_DEFAULTS |
29 | 21 | ||
30 | static inline int ide_default_irq(unsigned long base) | 22 | static inline int ide_default_irq(unsigned long base) |
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 09b99029ac1a..23c8e1be1911 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h | |||
@@ -559,6 +559,23 @@ ia64_eoi (void) | |||
559 | 559 | ||
560 | #define cpu_relax() ia64_hint(ia64_hint_pause) | 560 | #define cpu_relax() ia64_hint(ia64_hint_pause) |
561 | 561 | ||
562 | static inline int | ||
563 | ia64_get_irr(unsigned int vector) | ||
564 | { | ||
565 | unsigned int reg = vector / 64; | ||
566 | unsigned int bit = vector % 64; | ||
567 | u64 irr; | ||
568 | |||
569 | switch (reg) { | ||
570 | case 0: irr = ia64_getreg(_IA64_REG_CR_IRR0); break; | ||
571 | case 1: irr = ia64_getreg(_IA64_REG_CR_IRR1); break; | ||
572 | case 2: irr = ia64_getreg(_IA64_REG_CR_IRR2); break; | ||
573 | case 3: irr = ia64_getreg(_IA64_REG_CR_IRR3); break; | ||
574 | } | ||
575 | |||
576 | return test_bit(bit, &irr); | ||
577 | } | ||
578 | |||
562 | static inline void | 579 | static inline void |
563 | ia64_set_lrr0 (unsigned long val) | 580 | ia64_set_lrr0 (unsigned long val) |
564 | { | 581 | { |
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h index 313cad0628d0..0b210abbe003 100644 --- a/include/asm-ia64/sal.h +++ b/include/asm-ia64/sal.h | |||
@@ -658,15 +658,7 @@ ia64_sal_freq_base (unsigned long which, unsigned long *ticks_per_second, | |||
658 | return isrv.status; | 658 | return isrv.status; |
659 | } | 659 | } |
660 | 660 | ||
661 | /* Flush all the processor and platform level instruction and/or data caches */ | 661 | extern s64 ia64_sal_cache_flush (u64 cache_type); |
662 | static inline s64 | ||
663 | ia64_sal_cache_flush (u64 cache_type) | ||
664 | { | ||
665 | struct ia64_sal_retval isrv; | ||
666 | SAL_CALL(isrv, SAL_CACHE_FLUSH, cache_type, 0, 0, 0, 0, 0, 0); | ||
667 | return isrv.status; | ||
668 | } | ||
669 | |||
670 | 662 | ||
671 | /* Initialize all the processor and platform level instruction and data caches */ | 663 | /* Initialize all the processor and platform level instruction and data caches */ |
672 | static inline s64 | 664 | static inline s64 |
diff --git a/include/asm-ia64/sn/bte.h b/include/asm-ia64/sn/bte.h index f50da3d91d07..01e5b4103235 100644 --- a/include/asm-ia64/sn/bte.h +++ b/include/asm-ia64/sn/bte.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
@@ -100,13 +100,28 @@ | |||
100 | #define BTE_LNSTAT_STORE(_bte, _x) \ | 100 | #define BTE_LNSTAT_STORE(_bte, _x) \ |
101 | HUB_S(_bte->bte_base_addr, (_x)) | 101 | HUB_S(_bte->bte_base_addr, (_x)) |
102 | #define BTE_SRC_STORE(_bte, _x) \ | 102 | #define BTE_SRC_STORE(_bte, _x) \ |
103 | HUB_S(_bte->bte_source_addr, (_x)) | 103 | ({ \ |
104 | u64 __addr = ((_x) & ~AS_MASK); \ | ||
105 | if (is_shub2()) \ | ||
106 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
107 | HUB_S(_bte->bte_source_addr, __addr); \ | ||
108 | }) | ||
104 | #define BTE_DEST_STORE(_bte, _x) \ | 109 | #define BTE_DEST_STORE(_bte, _x) \ |
105 | HUB_S(_bte->bte_destination_addr, (_x)) | 110 | ({ \ |
111 | u64 __addr = ((_x) & ~AS_MASK); \ | ||
112 | if (is_shub2()) \ | ||
113 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
114 | HUB_S(_bte->bte_destination_addr, __addr); \ | ||
115 | }) | ||
106 | #define BTE_CTRL_STORE(_bte, _x) \ | 116 | #define BTE_CTRL_STORE(_bte, _x) \ |
107 | HUB_S(_bte->bte_control_addr, (_x)) | 117 | HUB_S(_bte->bte_control_addr, (_x)) |
108 | #define BTE_NOTIF_STORE(_bte, _x) \ | 118 | #define BTE_NOTIF_STORE(_bte, _x) \ |
109 | HUB_S(_bte->bte_notify_addr, (_x)) | 119 | ({ \ |
120 | u64 __addr = ia64_tpa((_x) & ~AS_MASK); \ | ||
121 | if (is_shub2()) \ | ||
122 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
123 | HUB_S(_bte->bte_notify_addr, __addr); \ | ||
124 | }) | ||
110 | 125 | ||
111 | #define BTE_START_TRANSFER(_bte, _len, _mode) \ | 126 | #define BTE_START_TRANSFER(_bte, _len, _mode) \ |
112 | is_shub2() ? BTE_CTRL_STORE(_bte, IBLS_BUSY | (_mode << 24) | _len) \ | 127 | is_shub2() ? BTE_CTRL_STORE(_bte, IBLS_BUSY | (_mode << 24) | _len) \ |
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index a3431372c6e7..60a51a406eec 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992 - 1997, 2000-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _ASM_IA64_SN_INTR_H | 9 | #ifndef _ASM_IA64_SN_INTR_H |
@@ -11,26 +11,26 @@ | |||
11 | 11 | ||
12 | #include <linux/rcupdate.h> | 12 | #include <linux/rcupdate.h> |
13 | 13 | ||
14 | #define SGI_UART_VECTOR (0xe9) | 14 | #define SGI_UART_VECTOR 0xe9 |
15 | 15 | ||
16 | /* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */ | 16 | /* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */ |
17 | #define SGI_XPC_ACTIVATE (0x30) | 17 | #define SGI_XPC_ACTIVATE 0x30 |
18 | #define SGI_II_ERROR (0x31) | 18 | #define SGI_II_ERROR 0x31 |
19 | #define SGI_XBOW_ERROR (0x32) | 19 | #define SGI_XBOW_ERROR 0x32 |
20 | #define SGI_PCIASIC_ERROR (0x33) | 20 | #define SGI_PCIASIC_ERROR 0x33 |
21 | #define SGI_ACPI_SCI_INT (0x34) | 21 | #define SGI_ACPI_SCI_INT 0x34 |
22 | #define SGI_TIOCA_ERROR (0x35) | 22 | #define SGI_TIOCA_ERROR 0x35 |
23 | #define SGI_TIO_ERROR (0x36) | 23 | #define SGI_TIO_ERROR 0x36 |
24 | #define SGI_TIOCX_ERROR (0x37) | 24 | #define SGI_TIOCX_ERROR 0x37 |
25 | #define SGI_MMTIMER_VECTOR (0x38) | 25 | #define SGI_MMTIMER_VECTOR 0x38 |
26 | #define SGI_XPC_NOTIFY (0xe7) | 26 | #define SGI_XPC_NOTIFY 0xe7 |
27 | 27 | ||
28 | #define IA64_SN2_FIRST_DEVICE_VECTOR (0x3c) | 28 | #define IA64_SN2_FIRST_DEVICE_VECTOR 0x3c |
29 | #define IA64_SN2_LAST_DEVICE_VECTOR (0xe6) | 29 | #define IA64_SN2_LAST_DEVICE_VECTOR 0xe6 |
30 | 30 | ||
31 | #define SN2_IRQ_RESERVED (0x1) | 31 | #define SN2_IRQ_RESERVED 0x1 |
32 | #define SN2_IRQ_CONNECTED (0x2) | 32 | #define SN2_IRQ_CONNECTED 0x2 |
33 | #define SN2_IRQ_SHARED (0x4) | 33 | #define SN2_IRQ_SHARED 0x4 |
34 | 34 | ||
35 | // The SN PROM irq struct | 35 | // The SN PROM irq struct |
36 | struct sn_irq_info { | 36 | struct sn_irq_info { |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 80c5a234e259..062538715623 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -249,32 +249,7 @@ extern void ia64_load_extra (struct task_struct *task); | |||
249 | # define switch_to(prev,next,last) __switch_to(prev, next, last) | 249 | # define switch_to(prev,next,last) __switch_to(prev, next, last) |
250 | #endif | 250 | #endif |
251 | 251 | ||
252 | /* | ||
253 | * On IA-64, we don't want to hold the runqueue's lock during the low-level context-switch, | ||
254 | * because that could cause a deadlock. Here is an example by Erich Focht: | ||
255 | * | ||
256 | * Example: | ||
257 | * CPU#0: | ||
258 | * schedule() | ||
259 | * -> spin_lock_irq(&rq->lock) | ||
260 | * -> context_switch() | ||
261 | * -> wrap_mmu_context() | ||
262 | * -> read_lock(&tasklist_lock) | ||
263 | * | ||
264 | * CPU#1: | ||
265 | * sys_wait4() or release_task() or forget_original_parent() | ||
266 | * -> write_lock(&tasklist_lock) | ||
267 | * -> do_notify_parent() | ||
268 | * -> wake_up_parent() | ||
269 | * -> try_to_wake_up() | ||
270 | * -> spin_lock_irq(&parent_rq->lock) | ||
271 | * | ||
272 | * If the parent's rq happens to be on CPU#0, we'll wait for the rq->lock | ||
273 | * of that CPU which will not be released, because there we wait for the | ||
274 | * tasklist_lock to become available. | ||
275 | */ | ||
276 | #define __ARCH_WANT_UNLOCKED_CTXSW | 252 | #define __ARCH_WANT_UNLOCKED_CTXSW |
277 | |||
278 | #define ARCH_HAS_PREFETCH_SWITCH_STACK | 253 | #define ARCH_HAS_PREFETCH_SWITCH_STACK |
279 | #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) | 254 | #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) |
280 | 255 | ||
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 412ef8e493a8..3ee19dfa46df 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -102,6 +102,13 @@ void build_cpu_to_node_map(void); | |||
102 | 102 | ||
103 | #endif /* CONFIG_NUMA */ | 103 | #endif /* CONFIG_NUMA */ |
104 | 104 | ||
105 | #ifdef CONFIG_SMP | ||
106 | #define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id) | ||
107 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) | ||
108 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | ||
109 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | ||
110 | #endif | ||
111 | |||
105 | #include <asm-generic/topology.h> | 112 | #include <asm-generic/topology.h> |
106 | 113 | ||
107 | #endif /* _ASM_IA64_TOPOLOGY_H */ | 114 | #endif /* _ASM_IA64_TOPOLOGY_H */ |
diff --git a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h index e8659e739a64..476180f4cba2 100644 --- a/include/asm-m68knommu/hardirq.h +++ b/include/asm-m68knommu/hardirq.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
6 | #include <linux/threads.h> | 6 | #include <linux/threads.h> |
7 | #include <asm/irq.h> | ||
7 | 8 | ||
8 | typedef struct { | 9 | typedef struct { |
9 | unsigned int __softirq_pending; | 10 | unsigned int __softirq_pending; |
diff --git a/include/asm-mips/abi.h b/include/asm-mips/abi.h index 2e7e651c3e3f..1ce0518ace2e 100644 --- a/include/asm-mips/abi.h +++ b/include/asm-mips/abi.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2005 by Ralf Baechle | 6 | * Copyright (C) 2005, 06 by Ralf Baechle (ralf@linux-mips.org) |
7 | * Copyright (C) 2005 MIPS Technologies, Inc. | 7 | * Copyright (C) 2005 MIPS Technologies, Inc. |
8 | */ | 8 | */ |
9 | #ifndef _ASM_ABI_H | 9 | #ifndef _ASM_ABI_H |
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/siginfo.h> | 13 | #include <asm/siginfo.h> |
14 | 14 | ||
15 | struct mips_abi { | 15 | struct mips_abi { |
16 | int (* const do_signal)(sigset_t *oldset, struct pt_regs *regs); | 16 | void (* const do_signal)(struct pt_regs *regs); |
17 | int (* const setup_frame)(struct k_sigaction * ka, | 17 | int (* const setup_frame)(struct k_sigaction * ka, |
18 | struct pt_regs *regs, int signr, | 18 | struct pt_regs *regs, int signr, |
19 | sigset_t *set); | 19 | sigset_t *set); |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 3b0c8aaf6e8b..8e802059fe67 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -644,20 +644,26 @@ static inline unsigned long ffz(unsigned long word) | |||
644 | } | 644 | } |
645 | 645 | ||
646 | /* | 646 | /* |
647 | * flz - find last zero in word. | 647 | * fls - find last bit set. |
648 | * @word: The word to search | 648 | * @word: The word to search |
649 | * | 649 | * |
650 | * Returns 0..SZLONG-1 | 650 | * Returns 1..SZLONG |
651 | * Undefined if no zero exists, so code should check against ~0UL first. | 651 | * Returns 0 if no bit exists |
652 | */ | 652 | */ |
653 | static inline unsigned long flz(unsigned long word) | 653 | static inline unsigned long fls(unsigned long word) |
654 | { | 654 | { |
655 | #if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) | ||
656 | return __ilog2(~word); | ||
657 | #else | ||
658 | #ifdef CONFIG_32BIT | 655 | #ifdef CONFIG_32BIT |
659 | int r = 31, s; | 656 | #ifdef CONFIG_CPU_MIPS32 |
660 | word = ~word; | 657 | __asm__ ("clz %0, %1" : "=r" (word) : "r" (word)); |
658 | |||
659 | return 32 - word; | ||
660 | #else | ||
661 | { | ||
662 | int r = 32, s; | ||
663 | |||
664 | if (word == 0) | ||
665 | return 0; | ||
666 | |||
661 | s = 16; if ((word & 0xffff0000)) s = 0; r -= s; word <<= s; | 667 | s = 16; if ((word & 0xffff0000)) s = 0; r -= s; word <<= s; |
662 | s = 8; if ((word & 0xff000000)) s = 0; r -= s; word <<= s; | 668 | s = 8; if ((word & 0xff000000)) s = 0; r -= s; word <<= s; |
663 | s = 4; if ((word & 0xf0000000)) s = 0; r -= s; word <<= s; | 669 | s = 4; if ((word & 0xf0000000)) s = 0; r -= s; word <<= s; |
@@ -665,10 +671,23 @@ static inline unsigned long flz(unsigned long word) | |||
665 | s = 1; if ((word & 0x80000000)) s = 0; r -= s; | 671 | s = 1; if ((word & 0x80000000)) s = 0; r -= s; |
666 | 672 | ||
667 | return r; | 673 | return r; |
674 | } | ||
668 | #endif | 675 | #endif |
676 | #endif /* CONFIG_32BIT */ | ||
677 | |||
669 | #ifdef CONFIG_64BIT | 678 | #ifdef CONFIG_64BIT |
670 | int r = 63, s; | 679 | #ifdef CONFIG_CPU_MIPS64 |
671 | word = ~word; | 680 | |
681 | __asm__ ("dclz %0, %1" : "=r" (word) : "r" (word)); | ||
682 | |||
683 | return 64 - word; | ||
684 | #else | ||
685 | { | ||
686 | int r = 64, s; | ||
687 | |||
688 | if (word == 0) | ||
689 | return 0; | ||
690 | |||
672 | s = 32; if ((word & 0xffffffff00000000UL)) s = 0; r -= s; word <<= s; | 691 | s = 32; if ((word & 0xffffffff00000000UL)) s = 0; r -= s; word <<= s; |
673 | s = 16; if ((word & 0xffff000000000000UL)) s = 0; r -= s; word <<= s; | 692 | s = 16; if ((word & 0xffff000000000000UL)) s = 0; r -= s; word <<= s; |
674 | s = 8; if ((word & 0xff00000000000000UL)) s = 0; r -= s; word <<= s; | 693 | s = 8; if ((word & 0xff00000000000000UL)) s = 0; r -= s; word <<= s; |
@@ -677,24 +696,11 @@ static inline unsigned long flz(unsigned long word) | |||
677 | s = 1; if ((word & 0x8000000000000000UL)) s = 0; r -= s; | 696 | s = 1; if ((word & 0x8000000000000000UL)) s = 0; r -= s; |
678 | 697 | ||
679 | return r; | 698 | return r; |
699 | } | ||
680 | #endif | 700 | #endif |
681 | #endif | 701 | #endif /* CONFIG_64BIT */ |
682 | } | 702 | } |
683 | 703 | ||
684 | /* | ||
685 | * fls - find last bit set. | ||
686 | * @word: The word to search | ||
687 | * | ||
688 | * Returns 1..SZLONG | ||
689 | * Returns 0 if no bit exists | ||
690 | */ | ||
691 | static inline unsigned long fls(unsigned long word) | ||
692 | { | ||
693 | if (word == 0) | ||
694 | return 0; | ||
695 | |||
696 | return flz(~word) + 1; | ||
697 | } | ||
698 | #define fls64(x) generic_fls64(x) | 704 | #define fls64(x) generic_fls64(x) |
699 | 705 | ||
700 | /* | 706 | /* |
diff --git a/include/asm-mips/byteorder.h b/include/asm-mips/byteorder.h index d1fe9e5c62e4..584f8128fffd 100644 --- a/include/asm-mips/byteorder.h +++ b/include/asm-mips/byteorder.h | |||
@@ -8,10 +8,39 @@ | |||
8 | #ifndef _ASM_BYTEORDER_H | 8 | #ifndef _ASM_BYTEORDER_H |
9 | #define _ASM_BYTEORDER_H | 9 | #define _ASM_BYTEORDER_H |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/compiler.h> | ||
11 | #include <asm/types.h> | 13 | #include <asm/types.h> |
12 | 14 | ||
13 | #ifdef __GNUC__ | 15 | #ifdef __GNUC__ |
14 | 16 | ||
17 | #ifdef CONFIG_CPU_MIPSR2 | ||
18 | |||
19 | static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x) | ||
20 | { | ||
21 | __asm__( | ||
22 | " wsbh %0, %1 \n" | ||
23 | : "=r" (x) | ||
24 | : "r" (x)); | ||
25 | |||
26 | return x; | ||
27 | } | ||
28 | #define __arch__swab16(x) ___arch__swab16(x) | ||
29 | |||
30 | static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) | ||
31 | { | ||
32 | __asm__( | ||
33 | " wsbh %0, %1 \n" | ||
34 | " rotr %0, %0, 16 \n" | ||
35 | : "=r" (x) | ||
36 | : "r" (x)); | ||
37 | |||
38 | return x; | ||
39 | } | ||
40 | #define __arch__swab32(x) ___arch__swab32(x) | ||
41 | |||
42 | #endif /* CONFIG_CPU_MIPSR2 */ | ||
43 | |||
15 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 44 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
16 | # define __BYTEORDER_HAS_U64__ | 45 | # define __BYTEORDER_HAS_U64__ |
17 | # define __SWAB_64_THRU_32__ | 46 | # define __SWAB_64_THRU_32__ |
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h index a18ba2edc0b6..aeae9fabf4a9 100644 --- a/include/asm-mips/cacheflush.h +++ b/include/asm-mips/cacheflush.h | |||
@@ -49,8 +49,7 @@ static inline void flush_dcache_page(struct page *page) | |||
49 | 49 | ||
50 | extern void (*flush_icache_page)(struct vm_area_struct *vma, | 50 | extern void (*flush_icache_page)(struct vm_area_struct *vma, |
51 | struct page *page); | 51 | struct page *page); |
52 | extern void (*flush_icache_range)(unsigned long __user start, | 52 | extern void (*flush_icache_range)(unsigned long start, unsigned long end); |
53 | unsigned long __user end); | ||
54 | #define flush_cache_vmap(start, end) flush_cache_all() | 53 | #define flush_cache_vmap(start, end) flush_cache_all() |
55 | #define flush_cache_vunmap(start, end) flush_cache_all() | 54 | #define flush_cache_vunmap(start, end) flush_cache_all() |
56 | 55 | ||
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index 2fc90632f88c..6111a0ce58c4 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h | |||
@@ -100,7 +100,7 @@ | |||
100 | 100 | ||
101 | __asm__( | 101 | __asm__( |
102 | " .macro _ssnop \n\t" | 102 | " .macro _ssnop \n\t" |
103 | " sll $0, $2, 1 \n\t" | 103 | " sll $0, $0, 1 \n\t" |
104 | " .endm \n\t" | 104 | " .endm \n\t" |
105 | " \n\t" | 105 | " \n\t" |
106 | " .macro _ehb \n\t" | 106 | " .macro _ehb \n\t" |
diff --git a/include/asm-mips/interrupt.h b/include/asm-mips/interrupt.h index abdf54ee64cf..774348734fa0 100644 --- a/include/asm-mips/interrupt.h +++ b/include/asm-mips/interrupt.h | |||
@@ -47,6 +47,17 @@ static inline void local_irq_enable(void) | |||
47 | * R4000/R4400 need three nops, the R4600 two nops and the R10000 needs | 47 | * R4000/R4400 need three nops, the R4600 two nops and the R10000 needs |
48 | * no nops at all. | 48 | * no nops at all. |
49 | */ | 49 | */ |
50 | /* | ||
51 | * For TX49, operating only IE bit is not enough. | ||
52 | * | ||
53 | * If mfc0 $12 follows store and the mfc0 is last instruction of a | ||
54 | * page and fetching the next instruction causes TLB miss, the result | ||
55 | * of the mfc0 might wrongly contain EXL bit. | ||
56 | * | ||
57 | * ERT-TX49H2-027, ERT-TX49H3-012, ERT-TX49HL3-006, ERT-TX49H4-008 | ||
58 | * | ||
59 | * Workaround: mask EXL bit of the result or place a nop before mfc0. | ||
60 | */ | ||
50 | __asm__ ( | 61 | __asm__ ( |
51 | " .macro local_irq_disable\n" | 62 | " .macro local_irq_disable\n" |
52 | " .set push \n" | 63 | " .set push \n" |
@@ -55,8 +66,8 @@ __asm__ ( | |||
55 | " di \n" | 66 | " di \n" |
56 | #else | 67 | #else |
57 | " mfc0 $1,$12 \n" | 68 | " mfc0 $1,$12 \n" |
58 | " ori $1,1 \n" | 69 | " ori $1,0x1f \n" |
59 | " xori $1,1 \n" | 70 | " xori $1,0x1f \n" |
60 | " .set noreorder \n" | 71 | " .set noreorder \n" |
61 | " mtc0 $1,$12 \n" | 72 | " mtc0 $1,$12 \n" |
62 | #endif | 73 | #endif |
@@ -96,8 +107,8 @@ __asm__ ( | |||
96 | " andi \\result, 1 \n" | 107 | " andi \\result, 1 \n" |
97 | #else | 108 | #else |
98 | " mfc0 \\result, $12 \n" | 109 | " mfc0 \\result, $12 \n" |
99 | " ori $1, \\result, 1 \n" | 110 | " ori $1, \\result, 0x1f \n" |
100 | " xori $1, 1 \n" | 111 | " xori $1, 0x1f \n" |
101 | " .set noreorder \n" | 112 | " .set noreorder \n" |
102 | " mtc0 $1, $12 \n" | 113 | " mtc0 $1, $12 \n" |
103 | #endif | 114 | #endif |
@@ -114,6 +125,7 @@ __asm__ __volatile__( \ | |||
114 | 125 | ||
115 | __asm__ ( | 126 | __asm__ ( |
116 | " .macro local_irq_restore flags \n" | 127 | " .macro local_irq_restore flags \n" |
128 | " .set push \n" | ||
117 | " .set noreorder \n" | 129 | " .set noreorder \n" |
118 | " .set noat \n" | 130 | " .set noat \n" |
119 | #if defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) | 131 | #if defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) |
@@ -135,14 +147,13 @@ __asm__ ( | |||
135 | #else | 147 | #else |
136 | " mfc0 $1, $12 \n" | 148 | " mfc0 $1, $12 \n" |
137 | " andi \\flags, 1 \n" | 149 | " andi \\flags, 1 \n" |
138 | " ori $1, 1 \n" | 150 | " ori $1, 0x1f \n" |
139 | " xori $1, 1 \n" | 151 | " xori $1, 0x1f \n" |
140 | " or \\flags, $1 \n" | 152 | " or \\flags, $1 \n" |
141 | " mtc0 \\flags, $12 \n" | 153 | " mtc0 \\flags, $12 \n" |
142 | #endif | 154 | #endif |
143 | " irq_disable_hazard \n" | 155 | " irq_disable_hazard \n" |
144 | " .set at \n" | 156 | " .set pop \n" |
145 | " .set reorder \n" | ||
146 | " .endm \n"); | 157 | " .endm \n"); |
147 | 158 | ||
148 | #define local_irq_restore(flags) \ | 159 | #define local_irq_restore(flags) \ |
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index d42685747e7d..5a4c8a54b8f4 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | 19 | ||
20 | #include <asm/addrspace.h> | 20 | #include <asm/addrspace.h> |
21 | #include <asm/bug.h> | ||
22 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
23 | #include <asm/cpu.h> | 22 | #include <asm/cpu.h> |
24 | #include <asm/cpu-features.h> | 23 | #include <asm/cpu-features.h> |
@@ -57,38 +56,38 @@ | |||
57 | * variations of functions: non-prefixed ones that preserve the value | 56 | * variations of functions: non-prefixed ones that preserve the value |
58 | * and prefixed ones that preserve byte addresses. The latters are | 57 | * and prefixed ones that preserve byte addresses. The latters are |
59 | * typically used for moving raw data between a peripheral and memory (cf. | 58 | * typically used for moving raw data between a peripheral and memory (cf. |
60 | * string I/O functions), hence the "mem_" prefix. | 59 | * string I/O functions), hence the "__mem_" prefix. |
61 | */ | 60 | */ |
62 | #if defined(CONFIG_SWAP_IO_SPACE) | 61 | #if defined(CONFIG_SWAP_IO_SPACE) |
63 | 62 | ||
64 | # define ioswabb(x) (x) | 63 | # define ioswabb(x) (x) |
65 | # define mem_ioswabb(x) (x) | 64 | # define __mem_ioswabb(x) (x) |
66 | # ifdef CONFIG_SGI_IP22 | 65 | # ifdef CONFIG_SGI_IP22 |
67 | /* | 66 | /* |
68 | * IP22 seems braindead enough to swap 16bits values in hardware, but | 67 | * IP22 seems braindead enough to swap 16bits values in hardware, but |
69 | * not 32bits. Go figure... Can't tell without documentation. | 68 | * not 32bits. Go figure... Can't tell without documentation. |
70 | */ | 69 | */ |
71 | # define ioswabw(x) (x) | 70 | # define ioswabw(x) (x) |
72 | # define mem_ioswabw(x) le16_to_cpu(x) | 71 | # define __mem_ioswabw(x) le16_to_cpu(x) |
73 | # else | 72 | # else |
74 | # define ioswabw(x) le16_to_cpu(x) | 73 | # define ioswabw(x) le16_to_cpu(x) |
75 | # define mem_ioswabw(x) (x) | 74 | # define __mem_ioswabw(x) (x) |
76 | # endif | 75 | # endif |
77 | # define ioswabl(x) le32_to_cpu(x) | 76 | # define ioswabl(x) le32_to_cpu(x) |
78 | # define mem_ioswabl(x) (x) | 77 | # define __mem_ioswabl(x) (x) |
79 | # define ioswabq(x) le64_to_cpu(x) | 78 | # define ioswabq(x) le64_to_cpu(x) |
80 | # define mem_ioswabq(x) (x) | 79 | # define __mem_ioswabq(x) (x) |
81 | 80 | ||
82 | #else | 81 | #else |
83 | 82 | ||
84 | # define ioswabb(x) (x) | 83 | # define ioswabb(x) (x) |
85 | # define mem_ioswabb(x) (x) | 84 | # define __mem_ioswabb(x) (x) |
86 | # define ioswabw(x) (x) | 85 | # define ioswabw(x) (x) |
87 | # define mem_ioswabw(x) cpu_to_le16(x) | 86 | # define __mem_ioswabw(x) cpu_to_le16(x) |
88 | # define ioswabl(x) (x) | 87 | # define ioswabl(x) (x) |
89 | # define mem_ioswabl(x) cpu_to_le32(x) | 88 | # define __mem_ioswabl(x) cpu_to_le32(x) |
90 | # define ioswabq(x) (x) | 89 | # define ioswabq(x) (x) |
91 | # define mem_ioswabq(x) cpu_to_le32(x) | 90 | # define __mem_ioswabq(x) cpu_to_le32(x) |
92 | 91 | ||
93 | #endif | 92 | #endif |
94 | 93 | ||
@@ -343,7 +342,7 @@ static inline void pfx##write##bwlq(type val, \ | |||
343 | BUG(); \ | 342 | BUG(); \ |
344 | } \ | 343 | } \ |
345 | \ | 344 | \ |
346 | static inline type pfx##read##bwlq(volatile void __iomem *mem) \ | 345 | static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ |
347 | { \ | 346 | { \ |
348 | volatile type *__mem; \ | 347 | volatile type *__mem; \ |
349 | type __val; \ | 348 | type __val; \ |
@@ -418,7 +417,7 @@ __BUILD_MEMORY_SINGLE(bus, bwlq, type, 1) | |||
418 | \ | 417 | \ |
419 | __BUILD_MEMORY_PFX(__raw_, bwlq, type) \ | 418 | __BUILD_MEMORY_PFX(__raw_, bwlq, type) \ |
420 | __BUILD_MEMORY_PFX(, bwlq, type) \ | 419 | __BUILD_MEMORY_PFX(, bwlq, type) \ |
421 | __BUILD_MEMORY_PFX(mem_, bwlq, type) \ | 420 | __BUILD_MEMORY_PFX(__mem_, bwlq, type) \ |
422 | 421 | ||
423 | BUILDIO_MEM(b, u8) | 422 | BUILDIO_MEM(b, u8) |
424 | BUILDIO_MEM(w, u16) | 423 | BUILDIO_MEM(w, u16) |
@@ -431,7 +430,7 @@ BUILDIO_MEM(q, u64) | |||
431 | 430 | ||
432 | #define BUILDIO_IOPORT(bwlq, type) \ | 431 | #define BUILDIO_IOPORT(bwlq, type) \ |
433 | __BUILD_IOPORT_PFX(, bwlq, type) \ | 432 | __BUILD_IOPORT_PFX(, bwlq, type) \ |
434 | __BUILD_IOPORT_PFX(mem_, bwlq, type) | 433 | __BUILD_IOPORT_PFX(__mem_, bwlq, type) |
435 | 434 | ||
436 | BUILDIO_IOPORT(b, u8) | 435 | BUILDIO_IOPORT(b, u8) |
437 | BUILDIO_IOPORT(w, u16) | 436 | BUILDIO_IOPORT(w, u16) |
@@ -465,7 +464,7 @@ static inline void writes##bwlq(volatile void __iomem *mem, \ | |||
465 | const volatile type *__addr = addr; \ | 464 | const volatile type *__addr = addr; \ |
466 | \ | 465 | \ |
467 | while (count--) { \ | 466 | while (count--) { \ |
468 | mem_write##bwlq(*__addr, mem); \ | 467 | __mem_write##bwlq(*__addr, mem); \ |
469 | __addr++; \ | 468 | __addr++; \ |
470 | } \ | 469 | } \ |
471 | } \ | 470 | } \ |
@@ -476,7 +475,7 @@ static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \ | |||
476 | volatile type *__addr = addr; \ | 475 | volatile type *__addr = addr; \ |
477 | \ | 476 | \ |
478 | while (count--) { \ | 477 | while (count--) { \ |
479 | *__addr = mem_read##bwlq(mem); \ | 478 | *__addr = __mem_read##bwlq(mem); \ |
480 | __addr++; \ | 479 | __addr++; \ |
481 | } \ | 480 | } \ |
482 | } | 481 | } |
@@ -489,7 +488,7 @@ static inline void outs##bwlq(unsigned long port, const void *addr, \ | |||
489 | const volatile type *__addr = addr; \ | 488 | const volatile type *__addr = addr; \ |
490 | \ | 489 | \ |
491 | while (count--) { \ | 490 | while (count--) { \ |
492 | mem_out##bwlq(*__addr, port); \ | 491 | __mem_out##bwlq(*__addr, port); \ |
493 | __addr++; \ | 492 | __addr++; \ |
494 | } \ | 493 | } \ |
495 | } \ | 494 | } \ |
@@ -500,7 +499,7 @@ static inline void ins##bwlq(unsigned long port, void *addr, \ | |||
500 | volatile type *__addr = addr; \ | 499 | volatile type *__addr = addr; \ |
501 | \ | 500 | \ |
502 | while (count--) { \ | 501 | while (count--) { \ |
503 | *__addr = mem_in##bwlq(port); \ | 502 | *__addr = __mem_in##bwlq(port); \ |
504 | __addr++; \ | 503 | __addr++; \ |
505 | } \ | 504 | } \ |
506 | } | 505 | } |
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index 8e1d7ed7d8e3..4686e17c206c 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h | |||
@@ -1198,7 +1198,11 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
1198 | 1198 | ||
1199 | /* UARTS 0-3 */ | 1199 | /* UARTS 0-3 */ |
1200 | #define UART_BASE UART0_ADDR | 1200 | #define UART_BASE UART0_ADDR |
1201 | #ifdef CONFIG_SOC_AU1200 | ||
1202 | #define UART_DEBUG_BASE UART1_ADDR | ||
1203 | #else | ||
1201 | #define UART_DEBUG_BASE UART3_ADDR | 1204 | #define UART_DEBUG_BASE UART3_ADDR |
1205 | #endif | ||
1202 | 1206 | ||
1203 | #define UART_RX 0 /* Receive buffer */ | 1207 | #define UART_RX 0 /* Receive buffer */ |
1204 | #define UART_TX 4 /* Transmit buffer */ | 1208 | #define UART_TX 4 /* Transmit buffer */ |
diff --git a/include/asm-mips/cobalt/cobalt.h b/include/asm-mips/mach-cobalt/cobalt.h index 78e1df2095fb..78e1df2095fb 100644 --- a/include/asm-mips/cobalt/cobalt.h +++ b/include/asm-mips/mach-cobalt/cobalt.h | |||
diff --git a/include/asm-mips/mach-cobalt/cpu-feature-overrides.h b/include/asm-mips/mach-cobalt/cpu-feature-overrides.h new file mode 100644 index 000000000000..ace8c5ef9701 --- /dev/null +++ b/include/asm-mips/mach-cobalt/cpu-feature-overrides.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | ||
8 | #ifndef __ASM_COBALT_CPU_FEATURE_OVERRIDES_H | ||
9 | #define __ASM_COBALT_CPU_FEATURE_OVERRIDES_H | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | |||
13 | #define cpu_has_tlb 1 | ||
14 | #define cpu_has_4kex 1 | ||
15 | #define cpu_has_3k_cache 0 | ||
16 | #define cpu_has_4k_cache 1 | ||
17 | #define cpu_has_tx39_cache 0 | ||
18 | #define cpu_has_sb1_cache 0 | ||
19 | #define cpu_has_fpu 1 | ||
20 | #define cpu_has_32fpr 1 | ||
21 | #define cpu_has_counter 1 | ||
22 | #define cpu_has_watch 0 | ||
23 | #define cpu_has_divec 1 | ||
24 | #define cpu_has_vce 0 | ||
25 | #define cpu_has_cache_cdex_p 0 | ||
26 | #define cpu_has_cache_cdex_s 0 | ||
27 | #define cpu_has_prefetch 0 | ||
28 | #define cpu_has_mcheck 0 | ||
29 | #define cpu_has_ejtag 0 | ||
30 | |||
31 | #define cpu_has_subset_pcaches 0 | ||
32 | #define cpu_dcache_line_size() 32 | ||
33 | #define cpu_icache_line_size() 32 | ||
34 | #define cpu_scache_line_size() 0 | ||
35 | |||
36 | #ifdef CONFIG_64BIT | ||
37 | #define cpu_has_llsc 0 | ||
38 | #else | ||
39 | #define cpu_has_llsc 1 | ||
40 | #endif | ||
41 | |||
42 | #define cpu_has_mips16 0 | ||
43 | #define cpu_has_mdmx 0 | ||
44 | #define cpu_has_mips3d 0 | ||
45 | #define cpu_has_smartmips 0 | ||
46 | #define cpu_has_vtag_icache 0 | ||
47 | #define cpu_has_ic_fills_f_dc 0 | ||
48 | #define cpu_icache_snoops_remote_store 0 | ||
49 | #define cpu_has_dsp 0 | ||
50 | |||
51 | #define cpu_has_mips32r1 0 | ||
52 | #define cpu_has_mips32r2 0 | ||
53 | #define cpu_has_mips64r1 0 | ||
54 | #define cpu_has_mips64r2 0 | ||
55 | |||
56 | #endif /* __ASM_COBALT_CPU_FEATURE_OVERRIDES_H */ | ||
diff --git a/include/asm-mips/cobalt/mach-gt64120.h b/include/asm-mips/mach-cobalt/mach-gt64120.h index 587fc4378f44..587fc4378f44 100644 --- a/include/asm-mips/cobalt/mach-gt64120.h +++ b/include/asm-mips/mach-cobalt/mach-gt64120.h | |||
diff --git a/include/asm-mips/mach-ip32/cpu-feature-overrides.h b/include/asm-mips/mach-ip32/cpu-feature-overrides.h index b80c30725cf6..36070b5654ab 100644 --- a/include/asm-mips/mach-ip32/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip32/cpu-feature-overrides.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * so, for 64bit IP32 kernel we just don't use ll/sc. | 18 | * so, for 64bit IP32 kernel we just don't use ll/sc. |
19 | * This does not affect luserland. | 19 | * This does not affect luserland. |
20 | */ | 20 | */ |
21 | #if defined(CONFIG_CPU_R5000) && defined(CONFIG_64BIT) | 21 | #if (defined(CONFIG_CPU_R5000) || defined(CONFIG_CPU_NEVADA)) && defined(CONFIG_64BIT) |
22 | #define cpu_has_llsc 0 | 22 | #define cpu_has_llsc 0 |
23 | #else | 23 | #else |
24 | #define cpu_has_llsc 1 | 24 | #define cpu_has_llsc 1 |
diff --git a/include/asm-mips/r4kcache.h b/include/asm-mips/r4kcache.h index a5ea9d828aee..cc53196efa40 100644 --- a/include/asm-mips/r4kcache.h +++ b/include/asm-mips/r4kcache.h | |||
@@ -166,123 +166,6 @@ static inline void invalidate_tcache_page(unsigned long addr) | |||
166 | : "r" (base), \ | 166 | : "r" (base), \ |
167 | "i" (op)); | 167 | "i" (op)); |
168 | 168 | ||
169 | static inline void blast_dcache16(void) | ||
170 | { | ||
171 | unsigned long start = INDEX_BASE; | ||
172 | unsigned long end = start + current_cpu_data.dcache.waysize; | ||
173 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | ||
174 | unsigned long ws_end = current_cpu_data.dcache.ways << | ||
175 | current_cpu_data.dcache.waybit; | ||
176 | unsigned long ws, addr; | ||
177 | |||
178 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
179 | for (addr = start; addr < end; addr += 0x200) | ||
180 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); | ||
181 | } | ||
182 | |||
183 | static inline void blast_dcache16_page(unsigned long page) | ||
184 | { | ||
185 | unsigned long start = page; | ||
186 | unsigned long end = start + PAGE_SIZE; | ||
187 | |||
188 | do { | ||
189 | cache16_unroll32(start,Hit_Writeback_Inv_D); | ||
190 | start += 0x200; | ||
191 | } while (start < end); | ||
192 | } | ||
193 | |||
194 | static inline void blast_dcache16_page_indexed(unsigned long page) | ||
195 | { | ||
196 | unsigned long start = page; | ||
197 | unsigned long end = start + PAGE_SIZE; | ||
198 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | ||
199 | unsigned long ws_end = current_cpu_data.dcache.ways << | ||
200 | current_cpu_data.dcache.waybit; | ||
201 | unsigned long ws, addr; | ||
202 | |||
203 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
204 | for (addr = start; addr < end; addr += 0x200) | ||
205 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); | ||
206 | } | ||
207 | |||
208 | static inline void blast_icache16(void) | ||
209 | { | ||
210 | unsigned long start = INDEX_BASE; | ||
211 | unsigned long end = start + current_cpu_data.icache.waysize; | ||
212 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
213 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
214 | current_cpu_data.icache.waybit; | ||
215 | unsigned long ws, addr; | ||
216 | |||
217 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
218 | for (addr = start; addr < end; addr += 0x200) | ||
219 | cache16_unroll32(addr|ws,Index_Invalidate_I); | ||
220 | } | ||
221 | |||
222 | static inline void blast_icache16_page(unsigned long page) | ||
223 | { | ||
224 | unsigned long start = page; | ||
225 | unsigned long end = start + PAGE_SIZE; | ||
226 | |||
227 | do { | ||
228 | cache16_unroll32(start,Hit_Invalidate_I); | ||
229 | start += 0x200; | ||
230 | } while (start < end); | ||
231 | } | ||
232 | |||
233 | static inline void blast_icache16_page_indexed(unsigned long page) | ||
234 | { | ||
235 | unsigned long start = page; | ||
236 | unsigned long end = start + PAGE_SIZE; | ||
237 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
238 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
239 | current_cpu_data.icache.waybit; | ||
240 | unsigned long ws, addr; | ||
241 | |||
242 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
243 | for (addr = start; addr < end; addr += 0x200) | ||
244 | cache16_unroll32(addr|ws,Index_Invalidate_I); | ||
245 | } | ||
246 | |||
247 | static inline void blast_scache16(void) | ||
248 | { | ||
249 | unsigned long start = INDEX_BASE; | ||
250 | unsigned long end = start + current_cpu_data.scache.waysize; | ||
251 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
252 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
253 | current_cpu_data.scache.waybit; | ||
254 | unsigned long ws, addr; | ||
255 | |||
256 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
257 | for (addr = start; addr < end; addr += 0x200) | ||
258 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
259 | } | ||
260 | |||
261 | static inline void blast_scache16_page(unsigned long page) | ||
262 | { | ||
263 | unsigned long start = page; | ||
264 | unsigned long end = page + PAGE_SIZE; | ||
265 | |||
266 | do { | ||
267 | cache16_unroll32(start,Hit_Writeback_Inv_SD); | ||
268 | start += 0x200; | ||
269 | } while (start < end); | ||
270 | } | ||
271 | |||
272 | static inline void blast_scache16_page_indexed(unsigned long page) | ||
273 | { | ||
274 | unsigned long start = page; | ||
275 | unsigned long end = start + PAGE_SIZE; | ||
276 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
277 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
278 | current_cpu_data.scache.waybit; | ||
279 | unsigned long ws, addr; | ||
280 | |||
281 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
282 | for (addr = start; addr < end; addr += 0x200) | ||
283 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
284 | } | ||
285 | |||
286 | #define cache32_unroll32(base,op) \ | 169 | #define cache32_unroll32(base,op) \ |
287 | __asm__ __volatile__( \ | 170 | __asm__ __volatile__( \ |
288 | " .set push \n" \ | 171 | " .set push \n" \ |
@@ -309,123 +192,6 @@ static inline void blast_scache16_page_indexed(unsigned long page) | |||
309 | : "r" (base), \ | 192 | : "r" (base), \ |
310 | "i" (op)); | 193 | "i" (op)); |
311 | 194 | ||
312 | static inline void blast_dcache32(void) | ||
313 | { | ||
314 | unsigned long start = INDEX_BASE; | ||
315 | unsigned long end = start + current_cpu_data.dcache.waysize; | ||
316 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | ||
317 | unsigned long ws_end = current_cpu_data.dcache.ways << | ||
318 | current_cpu_data.dcache.waybit; | ||
319 | unsigned long ws, addr; | ||
320 | |||
321 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
322 | for (addr = start; addr < end; addr += 0x400) | ||
323 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); | ||
324 | } | ||
325 | |||
326 | static inline void blast_dcache32_page(unsigned long page) | ||
327 | { | ||
328 | unsigned long start = page; | ||
329 | unsigned long end = start + PAGE_SIZE; | ||
330 | |||
331 | do { | ||
332 | cache32_unroll32(start,Hit_Writeback_Inv_D); | ||
333 | start += 0x400; | ||
334 | } while (start < end); | ||
335 | } | ||
336 | |||
337 | static inline void blast_dcache32_page_indexed(unsigned long page) | ||
338 | { | ||
339 | unsigned long start = page; | ||
340 | unsigned long end = start + PAGE_SIZE; | ||
341 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | ||
342 | unsigned long ws_end = current_cpu_data.dcache.ways << | ||
343 | current_cpu_data.dcache.waybit; | ||
344 | unsigned long ws, addr; | ||
345 | |||
346 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
347 | for (addr = start; addr < end; addr += 0x400) | ||
348 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); | ||
349 | } | ||
350 | |||
351 | static inline void blast_icache32(void) | ||
352 | { | ||
353 | unsigned long start = INDEX_BASE; | ||
354 | unsigned long end = start + current_cpu_data.icache.waysize; | ||
355 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
356 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
357 | current_cpu_data.icache.waybit; | ||
358 | unsigned long ws, addr; | ||
359 | |||
360 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
361 | for (addr = start; addr < end; addr += 0x400) | ||
362 | cache32_unroll32(addr|ws,Index_Invalidate_I); | ||
363 | } | ||
364 | |||
365 | static inline void blast_icache32_page(unsigned long page) | ||
366 | { | ||
367 | unsigned long start = page; | ||
368 | unsigned long end = start + PAGE_SIZE; | ||
369 | |||
370 | do { | ||
371 | cache32_unroll32(start,Hit_Invalidate_I); | ||
372 | start += 0x400; | ||
373 | } while (start < end); | ||
374 | } | ||
375 | |||
376 | static inline void blast_icache32_page_indexed(unsigned long page) | ||
377 | { | ||
378 | unsigned long start = page; | ||
379 | unsigned long end = start + PAGE_SIZE; | ||
380 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
381 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
382 | current_cpu_data.icache.waybit; | ||
383 | unsigned long ws, addr; | ||
384 | |||
385 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
386 | for (addr = start; addr < end; addr += 0x400) | ||
387 | cache32_unroll32(addr|ws,Index_Invalidate_I); | ||
388 | } | ||
389 | |||
390 | static inline void blast_scache32(void) | ||
391 | { | ||
392 | unsigned long start = INDEX_BASE; | ||
393 | unsigned long end = start + current_cpu_data.scache.waysize; | ||
394 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
395 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
396 | current_cpu_data.scache.waybit; | ||
397 | unsigned long ws, addr; | ||
398 | |||
399 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
400 | for (addr = start; addr < end; addr += 0x400) | ||
401 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
402 | } | ||
403 | |||
404 | static inline void blast_scache32_page(unsigned long page) | ||
405 | { | ||
406 | unsigned long start = page; | ||
407 | unsigned long end = page + PAGE_SIZE; | ||
408 | |||
409 | do { | ||
410 | cache32_unroll32(start,Hit_Writeback_Inv_SD); | ||
411 | start += 0x400; | ||
412 | } while (start < end); | ||
413 | } | ||
414 | |||
415 | static inline void blast_scache32_page_indexed(unsigned long page) | ||
416 | { | ||
417 | unsigned long start = page; | ||
418 | unsigned long end = start + PAGE_SIZE; | ||
419 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
420 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
421 | current_cpu_data.scache.waybit; | ||
422 | unsigned long ws, addr; | ||
423 | |||
424 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
425 | for (addr = start; addr < end; addr += 0x400) | ||
426 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
427 | } | ||
428 | |||
429 | #define cache64_unroll32(base,op) \ | 195 | #define cache64_unroll32(base,op) \ |
430 | __asm__ __volatile__( \ | 196 | __asm__ __volatile__( \ |
431 | " .set push \n" \ | 197 | " .set push \n" \ |
@@ -452,84 +218,6 @@ static inline void blast_scache32_page_indexed(unsigned long page) | |||
452 | : "r" (base), \ | 218 | : "r" (base), \ |
453 | "i" (op)); | 219 | "i" (op)); |
454 | 220 | ||
455 | static inline void blast_icache64(void) | ||
456 | { | ||
457 | unsigned long start = INDEX_BASE; | ||
458 | unsigned long end = start + current_cpu_data.icache.waysize; | ||
459 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
460 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
461 | current_cpu_data.icache.waybit; | ||
462 | unsigned long ws, addr; | ||
463 | |||
464 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
465 | for (addr = start; addr < end; addr += 0x800) | ||
466 | cache64_unroll32(addr|ws,Index_Invalidate_I); | ||
467 | } | ||
468 | |||
469 | static inline void blast_icache64_page(unsigned long page) | ||
470 | { | ||
471 | unsigned long start = page; | ||
472 | unsigned long end = start + PAGE_SIZE; | ||
473 | |||
474 | do { | ||
475 | cache64_unroll32(start,Hit_Invalidate_I); | ||
476 | start += 0x800; | ||
477 | } while (start < end); | ||
478 | } | ||
479 | |||
480 | static inline void blast_icache64_page_indexed(unsigned long page) | ||
481 | { | ||
482 | unsigned long start = page; | ||
483 | unsigned long end = start + PAGE_SIZE; | ||
484 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
485 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
486 | current_cpu_data.icache.waybit; | ||
487 | unsigned long ws, addr; | ||
488 | |||
489 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
490 | for (addr = start; addr < end; addr += 0x800) | ||
491 | cache64_unroll32(addr|ws,Index_Invalidate_I); | ||
492 | } | ||
493 | |||
494 | static inline void blast_scache64(void) | ||
495 | { | ||
496 | unsigned long start = INDEX_BASE; | ||
497 | unsigned long end = start + current_cpu_data.scache.waysize; | ||
498 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
499 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
500 | current_cpu_data.scache.waybit; | ||
501 | unsigned long ws, addr; | ||
502 | |||
503 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
504 | for (addr = start; addr < end; addr += 0x800) | ||
505 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
506 | } | ||
507 | |||
508 | static inline void blast_scache64_page(unsigned long page) | ||
509 | { | ||
510 | unsigned long start = page; | ||
511 | unsigned long end = page + PAGE_SIZE; | ||
512 | |||
513 | do { | ||
514 | cache64_unroll32(start,Hit_Writeback_Inv_SD); | ||
515 | start += 0x800; | ||
516 | } while (start < end); | ||
517 | } | ||
518 | |||
519 | static inline void blast_scache64_page_indexed(unsigned long page) | ||
520 | { | ||
521 | unsigned long start = page; | ||
522 | unsigned long end = start + PAGE_SIZE; | ||
523 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
524 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
525 | current_cpu_data.scache.waybit; | ||
526 | unsigned long ws, addr; | ||
527 | |||
528 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
529 | for (addr = start; addr < end; addr += 0x800) | ||
530 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
531 | } | ||
532 | |||
533 | #define cache128_unroll32(base,op) \ | 221 | #define cache128_unroll32(base,op) \ |
534 | __asm__ __volatile__( \ | 222 | __asm__ __volatile__( \ |
535 | " .set push \n" \ | 223 | " .set push \n" \ |
@@ -556,43 +244,55 @@ static inline void blast_scache64_page_indexed(unsigned long page) | |||
556 | : "r" (base), \ | 244 | : "r" (base), \ |
557 | "i" (op)); | 245 | "i" (op)); |
558 | 246 | ||
559 | static inline void blast_scache128(void) | 247 | /* build blast_xxx, blast_xxx_page, blast_xxx_page_indexed */ |
560 | { | 248 | #define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize) \ |
561 | unsigned long start = INDEX_BASE; | 249 | static inline void blast_##pfx##cache##lsize(void) \ |
562 | unsigned long end = start + current_cpu_data.scache.waysize; | 250 | { \ |
563 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 251 | unsigned long start = INDEX_BASE; \ |
564 | unsigned long ws_end = current_cpu_data.scache.ways << | 252 | unsigned long end = start + current_cpu_data.desc.waysize; \ |
565 | current_cpu_data.scache.waybit; | 253 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
566 | unsigned long ws, addr; | 254 | unsigned long ws_end = current_cpu_data.desc.ways << \ |
567 | 255 | current_cpu_data.desc.waybit; \ | |
568 | for (ws = 0; ws < ws_end; ws += ws_inc) | 256 | unsigned long ws, addr; \ |
569 | for (addr = start; addr < end; addr += 0x1000) | 257 | \ |
570 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); | 258 | for (ws = 0; ws < ws_end; ws += ws_inc) \ |
571 | } | 259 | for (addr = start; addr < end; addr += lsize * 32) \ |
572 | 260 | cache##lsize##_unroll32(addr|ws,indexop); \ | |
573 | static inline void blast_scache128_page(unsigned long page) | 261 | } \ |
574 | { | 262 | \ |
575 | unsigned long start = page; | 263 | static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \ |
576 | unsigned long end = page + PAGE_SIZE; | 264 | { \ |
577 | 265 | unsigned long start = page; \ | |
578 | do { | 266 | unsigned long end = page + PAGE_SIZE; \ |
579 | cache128_unroll32(start,Hit_Writeback_Inv_SD); | 267 | \ |
580 | start += 0x1000; | 268 | do { \ |
581 | } while (start < end); | 269 | cache##lsize##_unroll32(start,hitop); \ |
582 | } | 270 | start += lsize * 32; \ |
583 | 271 | } while (start < end); \ | |
584 | static inline void blast_scache128_page_indexed(unsigned long page) | 272 | } \ |
585 | { | 273 | \ |
586 | unsigned long start = page; | 274 | static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page) \ |
587 | unsigned long end = start + PAGE_SIZE; | 275 | { \ |
588 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 276 | unsigned long start = page; \ |
589 | unsigned long ws_end = current_cpu_data.scache.ways << | 277 | unsigned long end = start + PAGE_SIZE; \ |
590 | current_cpu_data.scache.waybit; | 278 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
591 | unsigned long ws, addr; | 279 | unsigned long ws_end = current_cpu_data.desc.ways << \ |
592 | 280 | current_cpu_data.desc.waybit; \ | |
593 | for (ws = 0; ws < ws_end; ws += ws_inc) | 281 | unsigned long ws, addr; \ |
594 | for (addr = start; addr < end; addr += 0x1000) | 282 | \ |
595 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); | 283 | for (ws = 0; ws < ws_end; ws += ws_inc) \ |
596 | } | 284 | for (addr = start; addr < end; addr += lsize * 32) \ |
285 | cache##lsize##_unroll32(addr|ws,indexop); \ | ||
286 | } | ||
287 | |||
288 | __BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16) | ||
289 | __BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16) | ||
290 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16) | ||
291 | __BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32) | ||
292 | __BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32) | ||
293 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32) | ||
294 | __BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64) | ||
295 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64) | ||
296 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128) | ||
597 | 297 | ||
598 | #endif /* _ASM_R4KCACHE_H */ | 298 | #endif /* _ASM_R4KCACHE_H */ |
diff --git a/include/asm-mips/reboot.h b/include/asm-mips/reboot.h index 2f10ebcbe141..e48c0bfab257 100644 --- a/include/asm-mips/reboot.h +++ b/include/asm-mips/reboot.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1997, 1999, 2001 by Ralf Baechle | 6 | * Copyright (C) 1997, 1999, 2001, 06 by Ralf Baechle |
7 | * Copyright (C) 2001 MIPS Technologies, Inc. | 7 | * Copyright (C) 2001 MIPS Technologies, Inc. |
8 | */ | 8 | */ |
9 | #ifndef _ASM_REBOOT_H | 9 | #ifndef _ASM_REBOOT_H |
@@ -11,6 +11,5 @@ | |||
11 | 11 | ||
12 | extern void (*_machine_restart)(char *command); | 12 | extern void (*_machine_restart)(char *command); |
13 | extern void (*_machine_halt)(void); | 13 | extern void (*_machine_halt)(void); |
14 | extern void (*_machine_power_off)(void); | ||
15 | 14 | ||
16 | #endif /* _ASM_REBOOT_H */ | 15 | #endif /* _ASM_REBOOT_H */ |
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h index 5a06f6d13899..907da600fddd 100644 --- a/include/asm-mips/string.h +++ b/include/asm-mips/string.h | |||
@@ -141,26 +141,4 @@ extern void *memcpy(void *__to, __const__ void *__from, size_t __n); | |||
141 | #define __HAVE_ARCH_MEMMOVE | 141 | #define __HAVE_ARCH_MEMMOVE |
142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); | 142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); |
143 | 143 | ||
144 | #ifdef CONFIG_32BIT | ||
145 | #define __HAVE_ARCH_MEMSCAN | ||
146 | static __inline__ void *memscan(void *__addr, int __c, size_t __size) | ||
147 | { | ||
148 | char *__end = (char *)__addr + __size; | ||
149 | unsigned char __uc = (unsigned char) __c; | ||
150 | |||
151 | __asm__(".set\tpush\n\t" | ||
152 | ".set\tnoat\n\t" | ||
153 | ".set\treorder\n\t" | ||
154 | "1:\tbeq\t%0,%1,2f\n\t" | ||
155 | "addiu\t%0,1\n\t" | ||
156 | "lbu\t$1,-1(%0)\n\t" | ||
157 | "bne\t$1,%z4,1b\n" | ||
158 | "2:\t.set\tpop" | ||
159 | : "=r" (__addr), "=r" (__end) | ||
160 | : "0" (__addr), "1" (__end), "Jr" (__uc)); | ||
161 | |||
162 | return __addr; | ||
163 | } | ||
164 | #endif /* CONFIG_32BIT */ | ||
165 | |||
166 | #endif /* _ASM_STRING_H */ | 144 | #endif /* _ASM_STRING_H */ |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 1612b3fe1080..fa193f861e71 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
@@ -114,6 +114,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
114 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 114 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
115 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ | 115 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ |
116 | #define TIF_SECCOMP 5 /* secure computing */ | 116 | #define TIF_SECCOMP 5 /* secure computing */ |
117 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | ||
117 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 118 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
118 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 119 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
119 | #define TIF_MEMDIE 18 | 120 | #define TIF_MEMDIE 18 |
@@ -125,6 +126,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
125 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 126 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
126 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 127 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
127 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 128 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
129 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
128 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 130 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
129 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 131 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
130 | 132 | ||
diff --git a/include/asm-mips/tx4927/tx4927.h b/include/asm-mips/tx4927/tx4927.h index 3bb7f0087d68..de85bd2245f7 100644 --- a/include/asm-mips/tx4927/tx4927.h +++ b/include/asm-mips/tx4927/tx4927.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Author: MontaVista Software, Inc. | 2 | * Author: MontaVista Software, Inc. |
3 | * source@mvista.com | 3 | * source@mvista.com |
4 | * | 4 | * |
5 | * Copyright 2001-2002 MontaVista Software Inc. | 5 | * Copyright 2001-2006 MontaVista Software Inc. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
@@ -30,10 +30,10 @@ | |||
30 | #include <asm/tx4927/tx4927_mips.h> | 30 | #include <asm/tx4927/tx4927_mips.h> |
31 | 31 | ||
32 | /* | 32 | /* |
33 | This register naming came from the intergrate cpu/controoler name TX4927 | 33 | This register naming came from the integrated CPU/controller name TX4927 |
34 | followed by the device name from table 4.2.2 on page 4-3 and then followed | 34 | followed by the device name from table 4.2.2 on page 4-3 and then followed |
35 | by the register name from table 4.2.3 on pages 4-4 to 4-8. The manaul | 35 | by the register name from table 4.2.3 on pages 4-4 to 4-8. The manaul |
36 | used is "TMPR4927BT Preliminary Rev 0.1 20.Jul.2001". | 36 | used was "TMPR4927BT Preliminary Rev 0.1 20.Jul.2001". |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define TX4927_SIO_0_BASE | 39 | #define TX4927_SIO_0_BASE |
@@ -251,8 +251,8 @@ | |||
251 | 251 | ||
252 | /* TX4927 Timer 0 (32-bit registers) */ | 252 | /* TX4927 Timer 0 (32-bit registers) */ |
253 | #define TX4927_TMR0_BASE 0xf000 | 253 | #define TX4927_TMR0_BASE 0xf000 |
254 | #define TX4927_TMR0_TMTCR0 0xf004 | 254 | #define TX4927_TMR0_TMTCR0 0xf000 |
255 | #define TX4927_TMR0_TMTISR0 0xf008 | 255 | #define TX4927_TMR0_TMTISR0 0xf004 |
256 | #define TX4927_TMR0_TMCPRA0 0xf008 | 256 | #define TX4927_TMR0_TMCPRA0 0xf008 |
257 | #define TX4927_TMR0_TMCPRB0 0xf00c | 257 | #define TX4927_TMR0_TMCPRB0 0xf00c |
258 | #define TX4927_TMR0_TMITMR0 0xf010 | 258 | #define TX4927_TMR0_TMITMR0 0xf010 |
@@ -264,8 +264,8 @@ | |||
264 | 264 | ||
265 | /* TX4927 Timer 1 (32-bit registers) */ | 265 | /* TX4927 Timer 1 (32-bit registers) */ |
266 | #define TX4927_TMR1_BASE 0xf100 | 266 | #define TX4927_TMR1_BASE 0xf100 |
267 | #define TX4927_TMR1_TMTCR1 0xf104 | 267 | #define TX4927_TMR1_TMTCR1 0xf100 |
268 | #define TX4927_TMR1_TMTISR1 0xf108 | 268 | #define TX4927_TMR1_TMTISR1 0xf104 |
269 | #define TX4927_TMR1_TMCPRA1 0xf108 | 269 | #define TX4927_TMR1_TMCPRA1 0xf108 |
270 | #define TX4927_TMR1_TMCPRB1 0xf10c | 270 | #define TX4927_TMR1_TMCPRB1 0xf10c |
271 | #define TX4927_TMR1_TMITMR1 0xf110 | 271 | #define TX4927_TMR1_TMITMR1 0xf110 |
@@ -277,13 +277,12 @@ | |||
277 | 277 | ||
278 | /* TX4927 Timer 2 (32-bit registers) */ | 278 | /* TX4927 Timer 2 (32-bit registers) */ |
279 | #define TX4927_TMR2_BASE 0xf200 | 279 | #define TX4927_TMR2_BASE 0xf200 |
280 | #define TX4927_TMR2_TMTCR2 0xf104 | 280 | #define TX4927_TMR2_TMTCR2 0xf200 |
281 | #define TX4927_TMR2_TMTISR2 0xf208 | 281 | #define TX4927_TMR2_TMTISR2 0xf204 |
282 | #define TX4927_TMR2_TMCPRA2 0xf208 | 282 | #define TX4927_TMR2_TMCPRA2 0xf208 |
283 | #define TX4927_TMR2_TMCPRB2 0xf20c | ||
284 | #define TX4927_TMR2_TMITMR2 0xf210 | 283 | #define TX4927_TMR2_TMITMR2 0xf210 |
285 | #define TX4927_TMR2_TMCCDR2 0xf220 | 284 | #define TX4927_TMR2_TMCCDR2 0xf220 |
286 | #define TX4927_TMR2_TMPGMR2 0xf230 | 285 | #define TX4927_TMR2_TMWTMR2 0xf240 |
287 | #define TX4927_TMR2_TMTRR2 0xf2f0 | 286 | #define TX4927_TMR2_TMTRR2 0xf2f0 |
288 | #define TX4927_TMR2_LIMIT 0xf2ff | 287 | #define TX4927_TMR2_LIMIT 0xf2ff |
289 | 288 | ||
diff --git a/include/asm-mips/tx4927/tx4927_pci.h b/include/asm-mips/tx4927/tx4927_pci.h index 165f6b8b217f..66c064690f41 100644 --- a/include/asm-mips/tx4927/tx4927_pci.h +++ b/include/asm-mips/tx4927/tx4927_pci.h | |||
@@ -253,6 +253,16 @@ struct tx4927_pcic_reg { | |||
253 | #define TX4927_CCFG_PCIDIVMODE_5 0x00001000 | 253 | #define TX4927_CCFG_PCIDIVMODE_5 0x00001000 |
254 | #define TX4927_CCFG_PCIDIVMODE_6 0x00001800 | 254 | #define TX4927_CCFG_PCIDIVMODE_6 0x00001800 |
255 | 255 | ||
256 | #define TX4937_CCFG_PCIDIVMODE_MASK 0x00001c00 | ||
257 | #define TX4937_CCFG_PCIDIVMODE_8 0x00000000 | ||
258 | #define TX4937_CCFG_PCIDIVMODE_4 0x00000400 | ||
259 | #define TX4937_CCFG_PCIDIVMODE_9 0x00000800 | ||
260 | #define TX4937_CCFG_PCIDIVMODE_4_5 0x00000c00 | ||
261 | #define TX4937_CCFG_PCIDIVMODE_10 0x00001000 | ||
262 | #define TX4937_CCFG_PCIDIVMODE_5 0x00001400 | ||
263 | #define TX4937_CCFG_PCIDIVMODE_11 0x00001800 | ||
264 | #define TX4937_CCFG_PCIDIVMODE_5_5 0x00001c00 | ||
265 | |||
256 | /* PCFG : Pin Configuration */ | 266 | /* PCFG : Pin Configuration */ |
257 | #define TX4927_PCFG_PCICLKEN_ALL 0x003f0000 | 267 | #define TX4927_PCFG_PCICLKEN_ALL 0x003f0000 |
258 | #define TX4927_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) | 268 | #define TX4927_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 41bb96bb2120..91d813a37823 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -202,49 +202,49 @@ struct __large_struct { unsigned long buf[100]; }; | |||
202 | * Yuck. We need two variants, one for 64bit operation and one | 202 | * Yuck. We need two variants, one for 64bit operation and one |
203 | * for 32 bit mode and old iron. | 203 | * for 32 bit mode and old iron. |
204 | */ | 204 | */ |
205 | #ifdef __mips64 | 205 | #ifdef CONFIG_32BIT |
206 | #define __GET_USER_DW(ptr) __get_user_asm("ld", ptr) | 206 | #define __GET_USER_DW(val, ptr) __get_user_asm_ll32(val, ptr) |
207 | #else | 207 | #endif |
208 | #define __GET_USER_DW(ptr) __get_user_asm_ll32(ptr) | 208 | #ifdef CONFIG_64BIT |
209 | #define __GET_USER_DW(val, ptr) __get_user_asm(val, "ld", ptr) | ||
209 | #endif | 210 | #endif |
210 | 211 | ||
211 | #define __get_user_nocheck(x,ptr,size) \ | 212 | extern void __get_user_unknown(void); |
212 | ({ \ | 213 | |
213 | __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \ | 214 | #define __get_user_common(val, size, ptr) \ |
214 | long __gu_err = 0; \ | 215 | do { \ |
215 | \ | ||
216 | switch (size) { \ | 216 | switch (size) { \ |
217 | case 1: __get_user_asm("lb", ptr); break; \ | 217 | case 1: __get_user_asm(val, "lb", ptr); break; \ |
218 | case 2: __get_user_asm("lh", ptr); break; \ | 218 | case 2: __get_user_asm(val, "lh", ptr); break; \ |
219 | case 4: __get_user_asm("lw", ptr); break; \ | 219 | case 4: __get_user_asm(val, "lw", ptr); break; \ |
220 | case 8: __GET_USER_DW(ptr); break; \ | 220 | case 8: __GET_USER_DW(val, ptr); break; \ |
221 | default: __get_user_unknown(); break; \ | 221 | default: __get_user_unknown(); break; \ |
222 | } \ | 222 | } \ |
223 | (x) = (__typeof__(*(ptr))) __gu_val; \ | 223 | } while (0) |
224 | |||
225 | #define __get_user_nocheck(x,ptr,size) \ | ||
226 | ({ \ | ||
227 | long __gu_err; \ | ||
228 | \ | ||
229 | __get_user_common((x), size, ptr); \ | ||
224 | __gu_err; \ | 230 | __gu_err; \ |
225 | }) | 231 | }) |
226 | 232 | ||
227 | #define __get_user_check(x,ptr,size) \ | 233 | #define __get_user_check(x,ptr,size) \ |
228 | ({ \ | 234 | ({ \ |
229 | const __typeof__(*(ptr)) __user * __gu_addr = (ptr); \ | ||
230 | __typeof__(*(ptr)) __gu_val = 0; \ | ||
231 | long __gu_err = -EFAULT; \ | 235 | long __gu_err = -EFAULT; \ |
236 | const void __user * __gu_ptr = (ptr); \ | ||
237 | \ | ||
238 | if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \ | ||
239 | __get_user_common((x), size, __gu_ptr); \ | ||
232 | \ | 240 | \ |
233 | if (likely(access_ok(VERIFY_READ, __gu_addr, size))) { \ | ||
234 | switch (size) { \ | ||
235 | case 1: __get_user_asm("lb", __gu_addr); break; \ | ||
236 | case 2: __get_user_asm("lh", __gu_addr); break; \ | ||
237 | case 4: __get_user_asm("lw", __gu_addr); break; \ | ||
238 | case 8: __GET_USER_DW(__gu_addr); break; \ | ||
239 | default: __get_user_unknown(); break; \ | ||
240 | } \ | ||
241 | } \ | ||
242 | (x) = (__typeof__(*(ptr))) __gu_val; \ | ||
243 | __gu_err; \ | 241 | __gu_err; \ |
244 | }) | 242 | }) |
245 | 243 | ||
246 | #define __get_user_asm(insn, addr) \ | 244 | #define __get_user_asm(val, insn, addr) \ |
247 | { \ | 245 | { \ |
246 | long __gu_tmp; \ | ||
247 | \ | ||
248 | __asm__ __volatile__( \ | 248 | __asm__ __volatile__( \ |
249 | "1: " insn " %1, %3 \n" \ | 249 | "1: " insn " %1, %3 \n" \ |
250 | "2: \n" \ | 250 | "2: \n" \ |
@@ -255,14 +255,16 @@ struct __large_struct { unsigned long buf[100]; }; | |||
255 | " .section __ex_table,\"a\" \n" \ | 255 | " .section __ex_table,\"a\" \n" \ |
256 | " "__UA_ADDR "\t1b, 3b \n" \ | 256 | " "__UA_ADDR "\t1b, 3b \n" \ |
257 | " .previous \n" \ | 257 | " .previous \n" \ |
258 | : "=r" (__gu_err), "=r" (__gu_val) \ | 258 | : "=r" (__gu_err), "=r" (__gu_tmp) \ |
259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ | 259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ |
260 | \ | ||
261 | (val) = (__typeof__(val)) __gu_tmp; \ | ||
260 | } | 262 | } |
261 | 263 | ||
262 | /* | 264 | /* |
263 | * Get a long long 64 using 32 bit registers. | 265 | * Get a long long 64 using 32 bit registers. |
264 | */ | 266 | */ |
265 | #define __get_user_asm_ll32(addr) \ | 267 | #define __get_user_asm_ll32(val, addr) \ |
266 | { \ | 268 | { \ |
267 | __asm__ __volatile__( \ | 269 | __asm__ __volatile__( \ |
268 | "1: lw %1, (%3) \n" \ | 270 | "1: lw %1, (%3) \n" \ |
@@ -278,21 +280,20 @@ struct __large_struct { unsigned long buf[100]; }; | |||
278 | " " __UA_ADDR " 1b, 4b \n" \ | 280 | " " __UA_ADDR " 1b, 4b \n" \ |
279 | " " __UA_ADDR " 2b, 4b \n" \ | 281 | " " __UA_ADDR " 2b, 4b \n" \ |
280 | " .previous \n" \ | 282 | " .previous \n" \ |
281 | : "=r" (__gu_err), "=&r" (__gu_val) \ | 283 | : "=r" (__gu_err), "=&r" (val) \ |
282 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 284 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
283 | } | 285 | } |
284 | 286 | ||
285 | extern void __get_user_unknown(void); | ||
286 | |||
287 | /* | 287 | /* |
288 | * Yuck. We need two variants, one for 64bit operation and one | 288 | * Yuck. We need two variants, one for 64bit operation and one |
289 | * for 32 bit mode and old iron. | 289 | * for 32 bit mode and old iron. |
290 | */ | 290 | */ |
291 | #ifdef __mips64 | 291 | #ifdef CONFIG_32BIT |
292 | #define __PUT_USER_DW(ptr) __put_user_asm("sd", ptr) | ||
293 | #else | ||
294 | #define __PUT_USER_DW(ptr) __put_user_asm_ll32(ptr) | 292 | #define __PUT_USER_DW(ptr) __put_user_asm_ll32(ptr) |
295 | #endif | 293 | #endif |
294 | #ifdef CONFIG_64BIT | ||
295 | #define __PUT_USER_DW(ptr) __put_user_asm("sd", ptr) | ||
296 | #endif | ||
296 | 297 | ||
297 | #define __put_user_nocheck(x,ptr,size) \ | 298 | #define __put_user_nocheck(x,ptr,size) \ |
298 | ({ \ | 299 | ({ \ |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 89ea8b60e945..e7ff9b187783 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -307,17 +307,33 @@ | |||
307 | #define __NR_inotify_init (__NR_Linux + 284) | 307 | #define __NR_inotify_init (__NR_Linux + 284) |
308 | #define __NR_inotify_add_watch (__NR_Linux + 285) | 308 | #define __NR_inotify_add_watch (__NR_Linux + 285) |
309 | #define __NR_inotify_rm_watch (__NR_Linux + 286) | 309 | #define __NR_inotify_rm_watch (__NR_Linux + 286) |
310 | 310 | #define __NR_migrate_pages (__NR_Linux + 287) | |
311 | #define __NR_openat (__NR_Linux + 288) | ||
312 | #define __NR_mkdirat (__NR_Linux + 289) | ||
313 | #define __NR_mknodat (__NR_Linux + 290) | ||
314 | #define __NR_fchownat (__NR_Linux + 291) | ||
315 | #define __NR_futimesat (__NR_Linux + 292) | ||
316 | #define __NR_newfstatat (__NR_Linux + 293) | ||
317 | #define __NR_unlinkat (__NR_Linux + 294) | ||
318 | #define __NR_renameat (__NR_Linux + 295) | ||
319 | #define __NR_linkat (__NR_Linux + 296) | ||
320 | #define __NR_symlinkat (__NR_Linux + 297) | ||
321 | #define __NR_readlinkat (__NR_Linux + 298) | ||
322 | #define __NR_fchmodat (__NR_Linux + 299) | ||
323 | #define __NR_faccessat (__NR_Linux + 300) | ||
324 | #define __NR_pselect6 (__NR_Linux + 301) | ||
325 | #define __NR_ppoll (__NR_Linux + 302) | ||
326 | #define __NR_unshare (__NR_Linux + 303) | ||
311 | 327 | ||
312 | /* | 328 | /* |
313 | * Offset of the last Linux o32 flavoured syscall | 329 | * Offset of the last Linux o32 flavoured syscall |
314 | */ | 330 | */ |
315 | #define __NR_Linux_syscalls 286 | 331 | #define __NR_Linux_syscalls 303 |
316 | 332 | ||
317 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 333 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
318 | 334 | ||
319 | #define __NR_O32_Linux 4000 | 335 | #define __NR_O32_Linux 4000 |
320 | #define __NR_O32_Linux_syscalls 283 | 336 | #define __NR_O32_Linux_syscalls 303 |
321 | 337 | ||
322 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 338 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
323 | 339 | ||
@@ -571,16 +587,33 @@ | |||
571 | #define __NR_inotify_init (__NR_Linux + 243) | 587 | #define __NR_inotify_init (__NR_Linux + 243) |
572 | #define __NR_inotify_add_watch (__NR_Linux + 244) | 588 | #define __NR_inotify_add_watch (__NR_Linux + 244) |
573 | #define __NR_inotify_rm_watch (__NR_Linux + 245) | 589 | #define __NR_inotify_rm_watch (__NR_Linux + 245) |
590 | #define __NR_migrate_pages (__NR_Linux + 246) | ||
591 | #define __NR_openat (__NR_Linux + 247) | ||
592 | #define __NR_mkdirat (__NR_Linux + 248) | ||
593 | #define __NR_mknodat (__NR_Linux + 249) | ||
594 | #define __NR_fchownat (__NR_Linux + 250) | ||
595 | #define __NR_futimesat (__NR_Linux + 251) | ||
596 | #define __NR_newfstatat (__NR_Linux + 252) | ||
597 | #define __NR_unlinkat (__NR_Linux + 253) | ||
598 | #define __NR_renameat (__NR_Linux + 254) | ||
599 | #define __NR_linkat (__NR_Linux + 255) | ||
600 | #define __NR_symlinkat (__NR_Linux + 256) | ||
601 | #define __NR_readlinkat (__NR_Linux + 257) | ||
602 | #define __NR_fchmodat (__NR_Linux + 258) | ||
603 | #define __NR_faccessat (__NR_Linux + 259) | ||
604 | #define __NR_pselect6 (__NR_Linux + 260) | ||
605 | #define __NR_ppoll (__NR_Linux + 261) | ||
606 | #define __NR_unshare (__NR_Linux + 262) | ||
574 | 607 | ||
575 | /* | 608 | /* |
576 | * Offset of the last Linux 64-bit flavoured syscall | 609 | * Offset of the last Linux 64-bit flavoured syscall |
577 | */ | 610 | */ |
578 | #define __NR_Linux_syscalls 245 | 611 | #define __NR_Linux_syscalls 262 |
579 | 612 | ||
580 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 613 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
581 | 614 | ||
582 | #define __NR_64_Linux 5000 | 615 | #define __NR_64_Linux 5000 |
583 | #define __NR_64_Linux_syscalls 242 | 616 | #define __NR_64_Linux_syscalls 262 |
584 | 617 | ||
585 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 618 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
586 | 619 | ||
@@ -838,16 +871,33 @@ | |||
838 | #define __NR_inotify_init (__NR_Linux + 247) | 871 | #define __NR_inotify_init (__NR_Linux + 247) |
839 | #define __NR_inotify_add_watch (__NR_Linux + 248) | 872 | #define __NR_inotify_add_watch (__NR_Linux + 248) |
840 | #define __NR_inotify_rm_watch (__NR_Linux + 249) | 873 | #define __NR_inotify_rm_watch (__NR_Linux + 249) |
874 | #define __NR_migrate_pages (__NR_Linux + 250) | ||
875 | #define __NR_openat (__NR_Linux + 251) | ||
876 | #define __NR_mkdirat (__NR_Linux + 252) | ||
877 | #define __NR_mknodat (__NR_Linux + 253) | ||
878 | #define __NR_fchownat (__NR_Linux + 254) | ||
879 | #define __NR_futimesat (__NR_Linux + 255) | ||
880 | #define __NR_newfstatat (__NR_Linux + 256) | ||
881 | #define __NR_unlinkat (__NR_Linux + 257) | ||
882 | #define __NR_renameat (__NR_Linux + 258) | ||
883 | #define __NR_linkat (__NR_Linux + 259) | ||
884 | #define __NR_symlinkat (__NR_Linux + 260) | ||
885 | #define __NR_readlinkat (__NR_Linux + 261) | ||
886 | #define __NR_fchmodat (__NR_Linux + 262) | ||
887 | #define __NR_faccessat (__NR_Linux + 263) | ||
888 | #define __NR_pselect6 (__NR_Linux + 264) | ||
889 | #define __NR_ppoll (__NR_Linux + 265) | ||
890 | #define __NR_unshare (__NR_Linux + 266) | ||
841 | 891 | ||
842 | /* | 892 | /* |
843 | * Offset of the last N32 flavoured syscall | 893 | * Offset of the last N32 flavoured syscall |
844 | */ | 894 | */ |
845 | #define __NR_Linux_syscalls 249 | 895 | #define __NR_Linux_syscalls 266 |
846 | 896 | ||
847 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 897 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
848 | 898 | ||
849 | #define __NR_N32_Linux 6000 | 899 | #define __NR_N32_Linux 6000 |
850 | #define __NR_N32_Linux_syscalls 246 | 900 | #define __NR_N32_Linux_syscalls 266 |
851 | 901 | ||
852 | #ifndef __ASSEMBLY__ | 902 | #ifndef __ASSEMBLY__ |
853 | 903 | ||
diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h index 2ca56d34aaad..4dc7253ff5d0 100644 --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h | |||
@@ -1,9 +1,13 @@ | |||
1 | /* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> | ||
2 | * Copyright (C) 2006 Kyle McMartin <kyle@parisc-linux.org> | ||
3 | */ | ||
4 | |||
1 | #ifndef _ASM_PARISC_ATOMIC_H_ | 5 | #ifndef _ASM_PARISC_ATOMIC_H_ |
2 | #define _ASM_PARISC_ATOMIC_H_ | 6 | #define _ASM_PARISC_ATOMIC_H_ |
3 | 7 | ||
4 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <linux/types.h> | ||
5 | #include <asm/system.h> | 10 | #include <asm/system.h> |
6 | /* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>. */ | ||
7 | 11 | ||
8 | /* | 12 | /* |
9 | * Atomic operations that C can't guarantee us. Useful for | 13 | * Atomic operations that C can't guarantee us. Useful for |
@@ -46,15 +50,6 @@ extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned; | |||
46 | # define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0) | 50 | # define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0) |
47 | #endif | 51 | #endif |
48 | 52 | ||
49 | /* Note that we need not lock read accesses - aligned word writes/reads | ||
50 | * are atomic, so a reader never sees unconsistent values. | ||
51 | * | ||
52 | * Cache-line alignment would conflict with, for example, linux/module.h | ||
53 | */ | ||
54 | |||
55 | typedef struct { volatile int counter; } atomic_t; | ||
56 | |||
57 | |||
58 | /* This should get optimized out since it's never called. | 53 | /* This should get optimized out since it's never called. |
59 | ** Or get a link error if xchg is used "wrong". | 54 | ** Or get a link error if xchg is used "wrong". |
60 | */ | 55 | */ |
@@ -69,10 +64,9 @@ extern unsigned long __xchg64(unsigned long, unsigned long *); | |||
69 | #endif | 64 | #endif |
70 | 65 | ||
71 | /* optimizer better get rid of switch since size is a constant */ | 66 | /* optimizer better get rid of switch since size is a constant */ |
72 | static __inline__ unsigned long __xchg(unsigned long x, __volatile__ void * ptr, | 67 | static __inline__ unsigned long |
73 | int size) | 68 | __xchg(unsigned long x, __volatile__ void * ptr, int size) |
74 | { | 69 | { |
75 | |||
76 | switch(size) { | 70 | switch(size) { |
77 | #ifdef __LP64__ | 71 | #ifdef __LP64__ |
78 | case 8: return __xchg64(x,(unsigned long *) ptr); | 72 | case 8: return __xchg64(x,(unsigned long *) ptr); |
@@ -129,7 +123,13 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) | |||
129 | (unsigned long)_n_, sizeof(*(ptr))); \ | 123 | (unsigned long)_n_, sizeof(*(ptr))); \ |
130 | }) | 124 | }) |
131 | 125 | ||
126 | /* Note that we need not lock read accesses - aligned word writes/reads | ||
127 | * are atomic, so a reader never sees unconsistent values. | ||
128 | * | ||
129 | * Cache-line alignment would conflict with, for example, linux/module.h | ||
130 | */ | ||
132 | 131 | ||
132 | typedef struct { volatile int counter; } atomic_t; | ||
133 | 133 | ||
134 | /* It's possible to reduce all atomic operations to either | 134 | /* It's possible to reduce all atomic operations to either |
135 | * __atomic_add_return, atomic_set and atomic_read (the latter | 135 | * __atomic_add_return, atomic_set and atomic_read (the latter |
@@ -210,12 +210,66 @@ static __inline__ int atomic_read(const atomic_t *v) | |||
210 | 210 | ||
211 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) | 211 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) |
212 | 212 | ||
213 | #define ATOMIC_INIT(i) { (i) } | 213 | #define ATOMIC_INIT(i) ((atomic_t) { (i) }) |
214 | 214 | ||
215 | #define smp_mb__before_atomic_dec() smp_mb() | 215 | #define smp_mb__before_atomic_dec() smp_mb() |
216 | #define smp_mb__after_atomic_dec() smp_mb() | 216 | #define smp_mb__after_atomic_dec() smp_mb() |
217 | #define smp_mb__before_atomic_inc() smp_mb() | 217 | #define smp_mb__before_atomic_inc() smp_mb() |
218 | #define smp_mb__after_atomic_inc() smp_mb() | 218 | #define smp_mb__after_atomic_inc() smp_mb() |
219 | 219 | ||
220 | #ifdef __LP64__ | ||
221 | |||
222 | typedef struct { volatile s64 counter; } atomic64_t; | ||
223 | |||
224 | #define ATOMIC64_INIT(i) ((atomic64_t) { (i) }) | ||
225 | |||
226 | static __inline__ int | ||
227 | __atomic64_add_return(s64 i, atomic64_t *v) | ||
228 | { | ||
229 | int ret; | ||
230 | unsigned long flags; | ||
231 | _atomic_spin_lock_irqsave(v, flags); | ||
232 | |||
233 | ret = (v->counter += i); | ||
234 | |||
235 | _atomic_spin_unlock_irqrestore(v, flags); | ||
236 | return ret; | ||
237 | } | ||
238 | |||
239 | static __inline__ void | ||
240 | atomic64_set(atomic64_t *v, s64 i) | ||
241 | { | ||
242 | unsigned long flags; | ||
243 | _atomic_spin_lock_irqsave(v, flags); | ||
244 | |||
245 | v->counter = i; | ||
246 | |||
247 | _atomic_spin_unlock_irqrestore(v, flags); | ||
248 | } | ||
249 | |||
250 | static __inline__ s64 | ||
251 | atomic64_read(const atomic64_t *v) | ||
252 | { | ||
253 | return v->counter; | ||
254 | } | ||
255 | |||
256 | #define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)i),(v)))) | ||
257 | #define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)i),(v)))) | ||
258 | #define atomic64_inc(v) ((void)(__atomic64_add_return( 1,(v)))) | ||
259 | #define atomic64_dec(v) ((void)(__atomic64_add_return( -1,(v)))) | ||
260 | |||
261 | #define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)i),(v))) | ||
262 | #define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)i),(v))) | ||
263 | #define atomic64_inc_return(v) (__atomic64_add_return( 1,(v))) | ||
264 | #define atomic64_dec_return(v) (__atomic64_add_return( -1,(v))) | ||
265 | |||
266 | #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) | ||
267 | |||
268 | #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) | ||
269 | #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) | ||
270 | |||
271 | #endif /* __LP64__ */ | ||
272 | |||
220 | #include <asm-generic/atomic.h> | 273 | #include <asm-generic/atomic.h> |
221 | #endif | 274 | |
275 | #endif /* _ASM_PARISC_ATOMIC_H_ */ | ||
diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index 1bc3c83ee74b..c53af9ff41b5 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h | |||
@@ -183,4 +183,10 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long | |||
183 | __flush_cache_page(vma, vmaddr); | 183 | __flush_cache_page(vma, vmaddr); |
184 | 184 | ||
185 | } | 185 | } |
186 | |||
187 | #ifdef CONFIG_DEBUG_RODATA | ||
188 | void mark_rodata_ro(void); | ||
186 | #endif | 189 | #endif |
190 | |||
191 | #endif /* _PARISC_CACHEFLUSH_H */ | ||
192 | |||
diff --git a/include/asm-parisc/compat_ucontext.h b/include/asm-parisc/compat_ucontext.h index a1228a3d2071..2f7292afde3c 100644 --- a/include/asm-parisc/compat_ucontext.h +++ b/include/asm-parisc/compat_ucontext.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef _ASM_PARISC_COMPAT_UCONTEXT_H | 1 | #ifndef _ASM_PARISC_COMPAT_UCONTEXT_H |
2 | #define _ASM_PARISC_COMPAT_UCONTEXT_H | 2 | #define _ASM_PARISC_COMPAT_UCONTEXT_H |
3 | 3 | ||
4 | #include<linux/compat.h> | 4 | #include <linux/compat.h> |
5 | #include<asm/compat_signal.h> | ||
6 | 5 | ||
7 | /* 32-bit ucontext as seen from an 64-bit kernel */ | 6 | /* 32-bit ucontext as seen from an 64-bit kernel */ |
8 | struct compat_ucontext { | 7 | struct compat_ucontext { |
diff --git a/include/asm-parisc/grfioctl.h b/include/asm-parisc/grfioctl.h index 6a910311b56b..671e06042b40 100644 --- a/include/asm-parisc/grfioctl.h +++ b/include/asm-parisc/grfioctl.h | |||
@@ -58,7 +58,7 @@ | |||
58 | #define CRT_ID_ELK_1024DB 0x27849CA5 /* Elk 1024x768 double buffer */ | 58 | #define CRT_ID_ELK_1024DB 0x27849CA5 /* Elk 1024x768 double buffer */ |
59 | #define CRT_ID_ELK_GS S9000_ID_A1924A /* Elk 1280x1024 GreyScale */ | 59 | #define CRT_ID_ELK_GS S9000_ID_A1924A /* Elk 1280x1024 GreyScale */ |
60 | #define CRT_ID_CRX24 S9000_ID_A1439A /* Piranha */ | 60 | #define CRT_ID_CRX24 S9000_ID_A1439A /* Piranha */ |
61 | #define CRT_ID_VISUALIZE_EG 0x2D08C0A7 /* Graffiti (built-in B132+/B160L) */ | 61 | #define CRT_ID_VISUALIZE_EG 0x2D08C0A7 /* Graffiti, A4450A (built-in B132+/B160L) */ |
62 | #define CRT_ID_THUNDER 0x2F23E5FC /* Thunder 1 VISUALIZE 48*/ | 62 | #define CRT_ID_THUNDER 0x2F23E5FC /* Thunder 1 VISUALIZE 48*/ |
63 | #define CRT_ID_THUNDER2 0x2F8D570E /* Thunder 2 VISUALIZE 48 XP*/ | 63 | #define CRT_ID_THUNDER2 0x2F8D570E /* Thunder 2 VISUALIZE 48 XP*/ |
64 | #define CRT_ID_HCRX S9000_ID_HCRX /* Hyperdrive HCRX */ | 64 | #define CRT_ID_HCRX S9000_ID_HCRX /* Hyperdrive HCRX */ |
diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index f277254159b7..fe7f6a2f5aa7 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h | |||
@@ -18,6 +18,18 @@ | |||
18 | */ | 18 | */ |
19 | #define PCI_MAX_BUSSES 256 | 19 | #define PCI_MAX_BUSSES 256 |
20 | 20 | ||
21 | |||
22 | /* To be used as: mdelay(pci_post_reset_delay); | ||
23 | * | ||
24 | * post_reset is the time the kernel should stall to prevent anyone from | ||
25 | * accessing the PCI bus once #RESET is de-asserted. | ||
26 | * PCI spec somewhere says 1 second but with multi-PCI bus systems, | ||
27 | * this makes the boot time much longer than necessary. | ||
28 | * 20ms seems to work for all the HP PCI implementations to date. | ||
29 | */ | ||
30 | #define pci_post_reset_delay 50 | ||
31 | |||
32 | |||
21 | /* | 33 | /* |
22 | ** pci_hba_data (aka H2P_OBJECT in HP/UX) | 34 | ** pci_hba_data (aka H2P_OBJECT in HP/UX) |
23 | ** | 35 | ** |
@@ -83,7 +95,7 @@ static __inline__ int pci_is_lmmio(struct pci_hba_data *hba, unsigned long a) | |||
83 | 95 | ||
84 | /* | 96 | /* |
85 | ** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses. | 97 | ** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses. |
86 | ** See pcibios.c for more conversions used by Generic PCI code. | 98 | ** See pci.c for more conversions used by Generic PCI code. |
87 | ** | 99 | ** |
88 | ** Platform characteristics/firmware guarantee that | 100 | ** Platform characteristics/firmware guarantee that |
89 | ** (1) PA_VIEW - IO_VIEW = lmmio_offset for both LMMIO and ELMMIO | 101 | ** (1) PA_VIEW - IO_VIEW = lmmio_offset for both LMMIO and ELMMIO |
@@ -191,9 +203,6 @@ struct pci_bios_ops { | |||
191 | */ | 203 | */ |
192 | extern struct pci_port_ops *pci_port; | 204 | extern struct pci_port_ops *pci_port; |
193 | extern struct pci_bios_ops *pci_bios; | 205 | extern struct pci_bios_ops *pci_bios; |
194 | extern int pci_post_reset_delay; /* delay after de-asserting #RESET */ | ||
195 | extern int pci_hba_count; | ||
196 | extern struct pci_hba_data *parisc_pci_hba[]; | ||
197 | 206 | ||
198 | #ifdef CONFIG_PCI | 207 | #ifdef CONFIG_PCI |
199 | extern void pcibios_register_hba(struct pci_hba_data *); | 208 | extern void pcibios_register_hba(struct pci_hba_data *); |
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h index 6291d6692e5d..3122fad38a1b 100644 --- a/include/asm-parisc/pgalloc.h +++ b/include/asm-parisc/pgalloc.h | |||
@@ -137,7 +137,6 @@ static inline void pte_free_kernel(pte_t *pte) | |||
137 | 137 | ||
138 | #define pte_free(page) pte_free_kernel(page_address(page)) | 138 | #define pte_free(page) pte_free_kernel(page_address(page)) |
139 | 139 | ||
140 | extern int do_check_pgt_cache(int, int); | ||
141 | #define check_pgt_cache() do { } while (0) | 140 | #define check_pgt_cache() do { } while (0) |
142 | 141 | ||
143 | #endif | 142 | #endif |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index b4554711c3e7..4e34c6b44059 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -213,7 +213,7 @@ extern void *vmalloc_start; | |||
213 | #define PAGE_COPY PAGE_EXECREAD | 213 | #define PAGE_COPY PAGE_EXECREAD |
214 | #define PAGE_RWX __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_EXEC |_PAGE_ACCESSED) | 214 | #define PAGE_RWX __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_EXEC |_PAGE_ACCESSED) |
215 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL) | 215 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL) |
216 | #define PAGE_KERNEL_RO __pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_DIRTY | _PAGE_ACCESSED) | 216 | #define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE) |
217 | #define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) | 217 | #define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) |
218 | #define PAGE_GATEWAY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_GATEWAY| _PAGE_READ) | 218 | #define PAGE_GATEWAY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_GATEWAY| _PAGE_READ) |
219 | #define PAGE_FLUSH __pgprot(_PAGE_FLUSH) | 219 | #define PAGE_FLUSH __pgprot(_PAGE_FLUSH) |
diff --git a/include/asm-parisc/rt_sigframe.h b/include/asm-parisc/rt_sigframe.h index 5623c032b64c..f0dd3b30f6c4 100644 --- a/include/asm-parisc/rt_sigframe.h +++ b/include/asm-parisc/rt_sigframe.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_PARISC_RT_SIGFRAME_H | 1 | #ifndef _ASM_PARISC_RT_SIGFRAME_H |
2 | #define _ASM_PARISC_RT_SIGFRAME_H | 2 | #define _ASM_PARISC_RT_SIGFRAME_H |
3 | 3 | ||
4 | #ifdef CONFIG_COMPAT | ||
5 | #include <asm/compat_rt_sigframe.h> | ||
6 | #endif | ||
7 | |||
8 | #define SIGRETURN_TRAMP 4 | 4 | #define SIGRETURN_TRAMP 4 |
9 | #define SIGRESTARTBLOCK_TRAMP 5 | 5 | #define SIGRESTARTBLOCK_TRAMP 5 |
10 | #define TRAMP_SIZE (SIGRETURN_TRAMP + SIGRESTARTBLOCK_TRAMP) | 6 | #define TRAMP_SIZE (SIGRETURN_TRAMP + SIGRESTARTBLOCK_TRAMP) |
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index 80b7b98c70a1..c56fccbf34ad 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -761,8 +761,27 @@ | |||
761 | #define __NR_keyctl (__NR_Linux + 266) | 761 | #define __NR_keyctl (__NR_Linux + 266) |
762 | #define __NR_ioprio_set (__NR_Linux + 267) | 762 | #define __NR_ioprio_set (__NR_Linux + 267) |
763 | #define __NR_ioprio_get (__NR_Linux + 268) | 763 | #define __NR_ioprio_get (__NR_Linux + 268) |
764 | #define __NR_inotify_init (__NR_Linux + 269) | ||
765 | #define __NR_inotify_add_watch (__NR_Linux + 270) | ||
766 | #define __NR_inotify_rm_watch (__NR_Linux + 271) | ||
767 | #define __NR_migrate_pages (__NR_Linux + 272) | ||
768 | #define __NR_pselect6 (__NR_Linux + 273) | ||
769 | #define __NR_ppoll (__NR_Linux + 274) | ||
770 | #define __NR_openat (__NR_Linux + 275) | ||
771 | #define __NR_mkdirat (__NR_Linux + 276) | ||
772 | #define __NR_mknodat (__NR_Linux + 277) | ||
773 | #define __NR_fchownat (__NR_Linux + 278) | ||
774 | #define __NR_futimesat (__NR_Linux + 279) | ||
775 | #define __NR_newfstatat (__NR_Linux + 280) | ||
776 | #define __NR_unlinkat (__NR_Linux + 281) | ||
777 | #define __NR_renameat (__NR_Linux + 282) | ||
778 | #define __NR_linkat (__NR_Linux + 283) | ||
779 | #define __NR_symlinkat (__NR_Linux + 284) | ||
780 | #define __NR_readlinkat (__NR_Linux + 285) | ||
781 | #define __NR_fchmodat (__NR_Linux + 286) | ||
782 | #define __NR_faccessat (__NR_Linux + 287) | ||
764 | 783 | ||
765 | #define __NR_Linux_syscalls 269 | 784 | #define __NR_Linux_syscalls 288 |
766 | 785 | ||
767 | #define HPUX_GATEWAY_ADDR 0xC0000004 | 786 | #define HPUX_GATEWAY_ADDR 0xC0000004 |
768 | #define LINUX_GATEWAY_ADDR 0x100 | 787 | #define LINUX_GATEWAY_ADDR 0x100 |
diff --git a/include/asm-powerpc/compat.h b/include/asm-powerpc/compat.h index accb80c9a339..aacaabd28ac1 100644 --- a/include/asm-powerpc/compat.h +++ b/include/asm-powerpc/compat.h | |||
@@ -126,6 +126,11 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) | |||
126 | return (void __user *)(unsigned long)uptr; | 126 | return (void __user *)(unsigned long)uptr; |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline compat_uptr_t ptr_to_compat(void __user *uptr) | ||
130 | { | ||
131 | return (u32)(unsigned long)uptr; | ||
132 | } | ||
133 | |||
129 | static inline void __user *compat_alloc_user_space(long len) | 134 | static inline void __user *compat_alloc_user_space(long len) |
130 | { | 135 | { |
131 | struct pt_regs *regs = current->thread.regs; | 136 | struct pt_regs *regs = current->thread.regs; |
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 837756ab7dc7..2ac63f569592 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <asm/scatterlist.h> | 16 | #include <asm/scatterlist.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/bug.h> | ||
19 | 18 | ||
20 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) | 19 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) |
21 | 20 | ||
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 5b2bd4eefb01..cbd297f44cce 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -222,5 +222,7 @@ extern int of_address_to_resource(struct device_node *dev, int index, | |||
222 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | 222 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, |
223 | struct resource *r); | 223 | struct resource *r); |
224 | 224 | ||
225 | extern void kdump_move_device_tree(void); | ||
226 | |||
225 | #endif /* __KERNEL__ */ | 227 | #endif /* __KERNEL__ */ |
226 | #endif /* _POWERPC_PROM_H */ | 228 | #endif /* _POWERPC_PROM_H */ |
diff --git a/include/asm-powerpc/smu.h b/include/asm-powerpc/smu.h index 82ce47607774..2dc93632f210 100644 --- a/include/asm-powerpc/smu.h +++ b/include/asm-powerpc/smu.h | |||
@@ -521,6 +521,11 @@ struct smu_sdbp_cpupiddata { | |||
521 | extern struct smu_sdbp_header *smu_get_sdb_partition(int id, | 521 | extern struct smu_sdbp_header *smu_get_sdb_partition(int id, |
522 | unsigned int *size); | 522 | unsigned int *size); |
523 | 523 | ||
524 | /* Get "sdb" partition data from an SMU satellite */ | ||
525 | extern struct smu_sdbp_header *smu_sat_get_sdb_partition(unsigned int sat_id, | ||
526 | int id, unsigned int *size); | ||
527 | |||
528 | |||
524 | #endif /* __KERNEL__ */ | 529 | #endif /* __KERNEL__ */ |
525 | 530 | ||
526 | 531 | ||
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index 67cdaf3ae9fc..c044ec16a879 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h | |||
@@ -37,7 +37,7 @@ struct thread_info { | |||
37 | int preempt_count; /* 0 => preemptable, | 37 | int preempt_count; /* 0 => preemptable, |
38 | <0 => BUG */ | 38 | <0 => BUG */ |
39 | struct restart_block restart_block; | 39 | struct restart_block restart_block; |
40 | void *nvgprs_frame; | 40 | void __user *nvgprs_frame; |
41 | /* low level flags - has atomic operations done on it */ | 41 | /* low level flags - has atomic operations done on it */ |
42 | unsigned long flags ____cacheline_aligned_in_smp; | 42 | unsigned long flags ____cacheline_aligned_in_smp; |
43 | }; | 43 | }; |
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h index 1630c26e8f45..c744ff33b1df 100644 --- a/include/asm-s390/dasd.h +++ b/include/asm-s390/dasd.h | |||
@@ -204,7 +204,8 @@ typedef struct attrib_data_t { | |||
204 | * | 204 | * |
205 | * Here ist how the ioctl-nr should be used: | 205 | * Here ist how the ioctl-nr should be used: |
206 | * 0 - 31 DASD driver itself | 206 | * 0 - 31 DASD driver itself |
207 | * 32 - 239 still open | 207 | * 32 - 229 still open |
208 | * 230 - 239 DASD extended error reporting | ||
208 | * 240 - 255 reserved for EMC | 209 | * 240 - 255 reserved for EMC |
209 | *******************************************************************************/ | 210 | *******************************************************************************/ |
210 | 211 | ||
@@ -236,12 +237,22 @@ typedef struct attrib_data_t { | |||
236 | #define BIODASDPSRD _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t) | 237 | #define BIODASDPSRD _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t) |
237 | /* Get Attributes (cache operations) */ | 238 | /* Get Attributes (cache operations) */ |
238 | #define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t) | 239 | #define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t) |
240 | /* retrieve extended error-reporting value */ | ||
241 | #define BIODASDEERGET _IOR(DASD_IOCTL_LETTER,6,int) | ||
239 | 242 | ||
240 | 243 | ||
241 | /* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */ | 244 | /* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */ |
242 | #define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t) | 245 | #define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t) |
243 | /* Set Attributes (cache operations) */ | 246 | /* Set Attributes (cache operations) */ |
244 | #define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t) | 247 | #define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t) |
248 | /* retrieve extended error-reporting value */ | ||
249 | #define BIODASDEERSET _IOW(DASD_IOCTL_LETTER,3,int) | ||
250 | |||
251 | |||
252 | /* remove all records from the eer buffer */ | ||
253 | #define DASD_EER_PURGE _IO(DASD_IOCTL_LETTER,230) | ||
254 | /* set the number of pages that are used for the internal eer buffer */ | ||
255 | #define DASD_EER_SETBUFSIZE _IOW(DASD_IOCTL_LETTER,230,int) | ||
245 | 256 | ||
246 | 257 | ||
247 | #endif /* DASD_H */ | 258 | #endif /* DASD_H */ |
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index 71f55eb2350a..b05825dd16d7 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h | |||
@@ -90,10 +90,16 @@ extern void iounmap(void *addr); | |||
90 | #define readb_relaxed(addr) readb(addr) | 90 | #define readb_relaxed(addr) readb(addr) |
91 | #define readw_relaxed(addr) readw(addr) | 91 | #define readw_relaxed(addr) readw(addr) |
92 | #define readl_relaxed(addr) readl(addr) | 92 | #define readl_relaxed(addr) readl(addr) |
93 | #define __raw_readb readb | ||
94 | #define __raw_readw readw | ||
95 | #define __raw_readl readl | ||
93 | 96 | ||
94 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) | 97 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) |
95 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) | 98 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) |
96 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) | 99 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) |
100 | #define __raw_writeb writeb | ||
101 | #define __raw_writew writew | ||
102 | #define __raw_writel writel | ||
97 | 103 | ||
98 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) | 104 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) |
99 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) | 105 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) |
diff --git a/include/asm-s390/timer.h b/include/asm-s390/timer.h index ea0788967c51..fcd6c256a2d1 100644 --- a/include/asm-s390/timer.h +++ b/include/asm-s390/timer.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-s390/timer.h | 2 | * include/asm-s390/timer.h |
3 | * | 3 | * |
4 | * (C) Copyright IBM Corp. 2003 | 4 | * (C) Copyright IBM Corp. 2003,2006 |
5 | * Virtual CPU timer | 5 | * Virtual CPU timer |
6 | * | 6 | * |
7 | * Author: Jan Glauber (jang@de.ibm.com) | 7 | * Author: Jan Glauber (jang@de.ibm.com) |
@@ -10,6 +10,8 @@ | |||
10 | #ifndef _ASM_S390_TIMER_H | 10 | #ifndef _ASM_S390_TIMER_H |
11 | #define _ASM_S390_TIMER_H | 11 | #define _ASM_S390_TIMER_H |
12 | 12 | ||
13 | #ifdef __KERNEL__ | ||
14 | |||
13 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
14 | 16 | ||
15 | #define VTIMER_MAX_SLICE (0x7ffffffffffff000LL) | 17 | #define VTIMER_MAX_SLICE (0x7ffffffffffff000LL) |
@@ -43,4 +45,6 @@ extern void add_virt_timer_periodic(void *new); | |||
43 | extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); | 45 | extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); |
44 | extern int del_virt_timer(struct vtimer_list *timer); | 46 | extern int del_virt_timer(struct vtimer_list *timer); |
45 | 47 | ||
46 | #endif | 48 | #endif /* __KERNEL__ */ |
49 | |||
50 | #endif /* _ASM_S390_TIMER_H */ | ||
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h index be104f21c70a..0b7c0ca4c3d7 100644 --- a/include/asm-s390/uaccess.h +++ b/include/asm-s390/uaccess.h | |||
@@ -61,7 +61,7 @@ | |||
61 | #define segment_eq(a,b) ((a).ar4 == (b).ar4) | 61 | #define segment_eq(a,b) ((a).ar4 == (b).ar4) |
62 | 62 | ||
63 | 63 | ||
64 | static inline int __access_ok(const void *addr, unsigned long size) | 64 | static inline int __access_ok(const void __user *addr, unsigned long size) |
65 | { | 65 | { |
66 | return 1; | 66 | return 1; |
67 | } | 67 | } |
@@ -208,25 +208,25 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
208 | case 1: { \ | 208 | case 1: { \ |
209 | unsigned char __x; \ | 209 | unsigned char __x; \ |
210 | __get_user_asm(__x, ptr, __gu_err); \ | 210 | __get_user_asm(__x, ptr, __gu_err); \ |
211 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 211 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
212 | break; \ | 212 | break; \ |
213 | }; \ | 213 | }; \ |
214 | case 2: { \ | 214 | case 2: { \ |
215 | unsigned short __x; \ | 215 | unsigned short __x; \ |
216 | __get_user_asm(__x, ptr, __gu_err); \ | 216 | __get_user_asm(__x, ptr, __gu_err); \ |
217 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 217 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
218 | break; \ | 218 | break; \ |
219 | }; \ | 219 | }; \ |
220 | case 4: { \ | 220 | case 4: { \ |
221 | unsigned int __x; \ | 221 | unsigned int __x; \ |
222 | __get_user_asm(__x, ptr, __gu_err); \ | 222 | __get_user_asm(__x, ptr, __gu_err); \ |
223 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 223 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
224 | break; \ | 224 | break; \ |
225 | }; \ | 225 | }; \ |
226 | case 8: { \ | 226 | case 8: { \ |
227 | unsigned long long __x; \ | 227 | unsigned long long __x; \ |
228 | __get_user_asm(__x, ptr, __gu_err); \ | 228 | __get_user_asm(__x, ptr, __gu_err); \ |
229 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 229 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
230 | break; \ | 230 | break; \ |
231 | }; \ | 231 | }; \ |
232 | default: \ | 232 | default: \ |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 2ac64e65e336..0615d601a7c6 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -315,11 +315,12 @@ | |||
315 | #define __NR_faccessat 296 | 315 | #define __NR_faccessat 296 |
316 | #define __NR_pselect6 297 | 316 | #define __NR_pselect6 297 |
317 | #define __NR_ppoll 298 | 317 | #define __NR_ppoll 298 |
318 | #define __NR_unshare 299 | ||
318 | 319 | ||
319 | /* WARNING: You MAY NOT add syscall numbers larger than 298, since | 320 | /* WARNING: You MAY NOT add syscall numbers larger than 299, since |
320 | * all of the syscall tables in the Sparc kernel are | 321 | * all of the syscall tables in the Sparc kernel are |
321 | * sized to have 298 entries (starting at zero). Therefore | 322 | * sized to have 299 entries (starting at zero). Therefore |
322 | * find a free slot in the 0-298 range. | 323 | * find a free slot in the 0-299 range. |
323 | */ | 324 | */ |
324 | 325 | ||
325 | #define _syscall0(type,name) \ | 326 | #define _syscall0(type,name) \ |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 84ac2bdb0902..c58ba8a096cf 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -317,11 +317,12 @@ | |||
317 | #define __NR_faccessat 296 | 317 | #define __NR_faccessat 296 |
318 | #define __NR_pselect6 297 | 318 | #define __NR_pselect6 297 |
319 | #define __NR_ppoll 298 | 319 | #define __NR_ppoll 298 |
320 | #define __NR_unshare 299 | ||
320 | 321 | ||
321 | /* WARNING: You MAY NOT add syscall numbers larger than 298, since | 322 | /* WARNING: You MAY NOT add syscall numbers larger than 299, since |
322 | * all of the syscall tables in the Sparc kernel are | 323 | * all of the syscall tables in the Sparc kernel are |
323 | * sized to have 298 entries (starting at zero). Therefore | 324 | * sized to have 299 entries (starting at zero). Therefore |
324 | * find a free slot in the 0-298 range. | 325 | * find a free slot in the 0-299 range. |
325 | */ | 326 | */ |
326 | 327 | ||
327 | #define _syscall0(type,name) \ | 328 | #define _syscall0(type,name) \ |
diff --git a/include/asm-v850/bitops.h b/include/asm-v850/bitops.h index 8955d2376ac8..609b9e87222a 100644 --- a/include/asm-v850/bitops.h +++ b/include/asm-v850/bitops.h | |||
@@ -188,7 +188,7 @@ static inline int find_next_zero_bit(const void *addr, int size, int offset) | |||
188 | tmp = *p; | 188 | tmp = *p; |
189 | 189 | ||
190 | found_first: | 190 | found_first: |
191 | tmp |= ~0UL >> size; | 191 | tmp |= ~0UL << size; |
192 | found_middle: | 192 | found_middle: |
193 | return result + ffz (tmp); | 193 | return result + ffz (tmp); |
194 | } | 194 | } |
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index 4f6a4dc455bb..bdbd8935612a 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define APIC_DEBUG 2 | 17 | #define APIC_DEBUG 2 |
18 | 18 | ||
19 | extern int apic_verbosity; | 19 | extern int apic_verbosity; |
20 | extern int apic_runs_main_timer; | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * Define the default level of output to be very little | 23 | * Define the default level of output to be very little |
diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h index 41c0ac8559be..76bb6193ae91 100644 --- a/include/asm-x86_64/cpufeature.h +++ b/include/asm-x86_64/cpufeature.h | |||
@@ -61,7 +61,7 @@ | |||
61 | #define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ | 61 | #define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ |
62 | #define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ | 62 | #define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ |
63 | #define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ | 63 | #define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ |
64 | /* 4 free */ | 64 | #define X86_FEATURE_REP_GOOD (3*32+ 4) /* rep microcode works well on this CPU */ |
65 | #define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ | 65 | #define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ |
66 | #define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ | 66 | #define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ |
67 | 67 | ||
diff --git a/include/asm-x86_64/hardirq.h b/include/asm-x86_64/hardirq.h index 8661b476fb40..8689951e3503 100644 --- a/include/asm-x86_64/hardirq.h +++ b/include/asm-x86_64/hardirq.h | |||
@@ -16,23 +16,6 @@ | |||
16 | #define set_softirq_pending(x) write_pda(__softirq_pending, (x)) | 16 | #define set_softirq_pending(x) write_pda(__softirq_pending, (x)) |
17 | #define or_softirq_pending(x) or_pda(__softirq_pending, (x)) | 17 | #define or_softirq_pending(x) or_pda(__softirq_pending, (x)) |
18 | 18 | ||
19 | /* | 19 | extern void ack_bad_irq(unsigned int irq); |
20 | * 'what should we do if we get a hw irq event on an illegal vector'. | 20 | |
21 | * each architecture has to answer this themselves. | ||
22 | */ | ||
23 | static inline void ack_bad_irq(unsigned int irq) | ||
24 | { | ||
25 | printk("unexpected IRQ trap at vector %02x\n", irq); | ||
26 | #ifdef CONFIG_X86_LOCAL_APIC | ||
27 | /* | ||
28 | * Currently unexpected vectors happen only on SMP and APIC. | ||
29 | * We _must_ ack these because every local APIC has only N | ||
30 | * irq slots per priority level, and a 'hanging, unacked' IRQ | ||
31 | * holds up an irq slot - in excessive cases (when multiple | ||
32 | * unexpected vectors occur) that might lock up the APIC | ||
33 | * completely. | ||
34 | */ | ||
35 | ack_APIC_irq(); | ||
36 | #endif | ||
37 | } | ||
38 | #endif /* __ASM_HARDIRQ_H */ | 21 | #endif /* __ASM_HARDIRQ_H */ |
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index 9afc0c7d3661..20468983d453 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h | |||
@@ -313,7 +313,10 @@ | |||
313 | #define __NR_ia32_readlinkat 305 | 313 | #define __NR_ia32_readlinkat 305 |
314 | #define __NR_ia32_fchmodat 306 | 314 | #define __NR_ia32_fchmodat 306 |
315 | #define __NR_ia32_faccessat 307 | 315 | #define __NR_ia32_faccessat 307 |
316 | #define __NR_ia32_pselect6 308 | ||
317 | #define __NR_ia32_ppoll 309 | ||
318 | #define __NR_ia32_unshare 310 | ||
316 | 319 | ||
317 | #define IA32_NR_syscalls 308 /* must be > than biggest syscall! */ | 320 | #define IA32_NR_syscalls 315 /* must be > than biggest syscall! */ |
318 | 321 | ||
319 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ | 322 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ |
diff --git a/include/asm-x86_64/kexec.h b/include/asm-x86_64/kexec.h index ae28cd44bcd3..c564bae03433 100644 --- a/include/asm-x86_64/kexec.h +++ b/include/asm-x86_64/kexec.h | |||
@@ -1,8 +1,9 @@ | |||
1 | #ifndef _X86_64_KEXEC_H | 1 | #ifndef _X86_64_KEXEC_H |
2 | #define _X86_64_KEXEC_H | 2 | #define _X86_64_KEXEC_H |
3 | 3 | ||
4 | #include <linux/string.h> | ||
5 | |||
4 | #include <asm/page.h> | 6 | #include <asm/page.h> |
5 | #include <asm/proto.h> | ||
6 | #include <asm/ptrace.h> | 7 | #include <asm/ptrace.h> |
7 | 8 | ||
8 | /* | 9 | /* |
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h index 34e434ce3268..dffe276ca2df 100644 --- a/include/asm-x86_64/numa.h +++ b/include/asm-x86_64/numa.h | |||
@@ -22,8 +22,15 @@ extern void numa_set_node(int cpu, int node); | |||
22 | extern unsigned char apicid_to_node[256]; | 22 | extern unsigned char apicid_to_node[256]; |
23 | #ifdef CONFIG_NUMA | 23 | #ifdef CONFIG_NUMA |
24 | extern void __init init_cpu_to_node(void); | 24 | extern void __init init_cpu_to_node(void); |
25 | |||
26 | static inline void clear_node_cpumask(int cpu) | ||
27 | { | ||
28 | clear_bit(cpu, &node_to_cpumask[cpu_to_node(cpu)]); | ||
29 | } | ||
30 | |||
25 | #else | 31 | #else |
26 | #define init_cpu_to_node() do {} while (0) | 32 | #define init_cpu_to_node() do {} while (0) |
33 | #define clear_node_cpumask(cpu) do {} while (0) | ||
27 | #endif | 34 | #endif |
28 | 35 | ||
29 | #define NUMA_NO_NODE 0xff | 36 | #define NUMA_NO_NODE 0xff |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index 115e496c6139..c99832e7bf3f 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -41,10 +41,18 @@ extern void iommu_hole_init(void); | |||
41 | 41 | ||
42 | extern void time_init_gtod(void); | 42 | extern void time_init_gtod(void); |
43 | extern int pmtimer_mark_offset(void); | 43 | extern int pmtimer_mark_offset(void); |
44 | extern void pmtimer_resume(void); | ||
45 | extern void pmtimer_wait(unsigned); | ||
44 | extern unsigned int do_gettimeoffset_pm(void); | 46 | extern unsigned int do_gettimeoffset_pm(void); |
47 | #ifdef CONFIG_X86_PM_TIMER | ||
45 | extern u32 pmtmr_ioport; | 48 | extern u32 pmtmr_ioport; |
49 | #else | ||
50 | #define pmtmr_ioport 0 | ||
51 | #endif | ||
46 | extern unsigned long long monotonic_base; | 52 | extern unsigned long long monotonic_base; |
47 | extern int sysctl_vsyscall; | 53 | extern int sysctl_vsyscall; |
54 | extern int nohpet; | ||
55 | extern unsigned long vxtime_hz; | ||
48 | 56 | ||
49 | extern void do_softirq_thunk(void); | 57 | extern void do_softirq_thunk(void); |
50 | 58 | ||
@@ -65,6 +73,9 @@ extern void free_bootmem_generic(unsigned long phys, unsigned len); | |||
65 | 73 | ||
66 | extern void load_gs_index(unsigned gs); | 74 | extern void load_gs_index(unsigned gs); |
67 | 75 | ||
76 | extern void stop_timer_interrupt(void); | ||
77 | extern void main_timer_handler(struct pt_regs *regs); | ||
78 | |||
68 | extern unsigned long end_pfn_map; | 79 | extern unsigned long end_pfn_map; |
69 | 80 | ||
70 | extern void show_trace(unsigned long * rsp); | 81 | extern void show_trace(unsigned long * rsp); |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index a73f0c789d8b..b7f66034ae7a 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -327,7 +327,7 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
327 | #define wmb() asm volatile("" ::: "memory") | 327 | #define wmb() asm volatile("" ::: "memory") |
328 | #endif | 328 | #endif |
329 | #define read_barrier_depends() do {} while(0) | 329 | #define read_barrier_depends() do {} while(0) |
330 | #define set_mb(var, value) do { xchg(&var, value); } while (0) | 330 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) |
331 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) | 331 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) |
332 | 332 | ||
333 | #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0) | 333 | #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0) |
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index 2fa7f27381b4..c642f5d9882d 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -57,6 +57,15 @@ extern int __node_distance(int, int); | |||
57 | 57 | ||
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #ifdef CONFIG_SMP | ||
61 | #define topology_physical_package_id(cpu) \ | ||
62 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) | ||
63 | #define topology_core_id(cpu) \ | ||
64 | (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) | ||
65 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | ||
66 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | ||
67 | #endif | ||
68 | |||
60 | #include <asm-generic/topology.h> | 69 | #include <asm-generic/topology.h> |
61 | 70 | ||
62 | #endif | 71 | #endif |
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 436d099b5b6b..da0341c57949 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -599,8 +599,14 @@ __SYSCALL(__NR_readlinkat, sys_readlinkat) | |||
599 | __SYSCALL(__NR_fchmodat, sys_fchmodat) | 599 | __SYSCALL(__NR_fchmodat, sys_fchmodat) |
600 | #define __NR_faccessat 269 | 600 | #define __NR_faccessat 269 |
601 | __SYSCALL(__NR_faccessat, sys_faccessat) | 601 | __SYSCALL(__NR_faccessat, sys_faccessat) |
602 | 602 | #define __NR_pselect6 270 | |
603 | #define __NR_syscall_max __NR_faccessat | 603 | __SYSCALL(__NR_pselect6, sys_ni_syscall) /* for now */ |
604 | #define __NR_ppoll 271 | ||
605 | __SYSCALL(__NR_ppoll, sys_ni_syscall) /* for now */ | ||
606 | #define __NR_unshare 272 | ||
607 | __SYSCALL(__NR_unshare, sys_unshare) | ||
608 | |||
609 | #define __NR_syscall_max __NR_unshare | ||
604 | 610 | ||
605 | #ifndef __NO_STUBS | 611 | #ifndef __NO_STUBS |
606 | 612 | ||
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 6a2a19f14bb2..208650b1ad3a 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -81,7 +81,7 @@ static inline int generic_fls64(__u64 x) | |||
81 | { | 81 | { |
82 | __u32 h = x >> 32; | 82 | __u32 h = x >> 32; |
83 | if (h) | 83 | if (h) |
84 | return fls(x) + 32; | 84 | return fls(h) + 32; |
85 | return fls(x); | 85 | return fls(x); |
86 | } | 86 | } |
87 | 87 | ||
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index acffb8c9073a..a7f015027535 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -126,7 +126,7 @@ extern struct config_item *config_group_find_obj(struct config_group *, const ch | |||
126 | 126 | ||
127 | 127 | ||
128 | struct configfs_attribute { | 128 | struct configfs_attribute { |
129 | char *ca_name; | 129 | const char *ca_name; |
130 | struct module *ca_owner; | 130 | struct module *ca_owner; |
131 | mode_t ca_mode; | 131 | mode_t ca_mode; |
132 | }; | 132 | }; |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 13e9f4a3ab26..20b446f26ecd 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -84,7 +84,6 @@ | |||
84 | #include <linux/kernel.h> | 84 | #include <linux/kernel.h> |
85 | #include <linux/threads.h> | 85 | #include <linux/threads.h> |
86 | #include <linux/bitmap.h> | 86 | #include <linux/bitmap.h> |
87 | #include <asm/bug.h> | ||
88 | 87 | ||
89 | typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; | 88 | typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; |
90 | extern cpumask_t _unused_cpumask_arg_; | 89 | extern cpumask_t _unused_cpumask_arg_; |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index a3ed5e059d47..4361f3789975 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | #include <linux/cache.h> | 9 | #include <linux/cache.h> |
10 | #include <linux/rcupdate.h> | 10 | #include <linux/rcupdate.h> |
11 | #include <asm/bug.h> | ||
12 | 11 | ||
13 | struct nameidata; | 12 | struct nameidata; |
14 | struct vfsmount; | 13 | struct vfsmount; |
@@ -108,7 +107,9 @@ struct dentry { | |||
108 | struct dentry_operations *d_op; | 107 | struct dentry_operations *d_op; |
109 | struct super_block *d_sb; /* The root of the dentry tree */ | 108 | struct super_block *d_sb; /* The root of the dentry tree */ |
110 | void *d_fsdata; /* fs-specific data */ | 109 | void *d_fsdata; /* fs-specific data */ |
110 | #ifdef CONFIG_PROFILING | ||
111 | struct dcookie_struct *d_cookie; /* cookie, if any */ | 111 | struct dcookie_struct *d_cookie; /* cookie, if any */ |
112 | #endif | ||
112 | int d_mounted; | 113 | int d_mounted; |
113 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ | 114 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ |
114 | }; | 115 | }; |
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index b1999bfeaa56..b81e58b2ebf8 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h | |||
@@ -135,7 +135,7 @@ typedef struct video_spu { | |||
135 | 135 | ||
136 | typedef struct video_spu_palette { /* SPU Palette information */ | 136 | typedef struct video_spu_palette { /* SPU Palette information */ |
137 | int length; | 137 | int length; |
138 | uint8_t *palette; | 138 | uint8_t __user *palette; |
139 | } video_spu_palette_t; | 139 | } video_spu_palette_t; |
140 | 140 | ||
141 | 141 | ||
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 23fe746a1d51..18cf1f3e1184 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -82,6 +82,7 @@ struct elevator_queue | |||
82 | extern void elv_dispatch_sort(request_queue_t *, struct request *); | 82 | extern void elv_dispatch_sort(request_queue_t *, struct request *); |
83 | extern void elv_add_request(request_queue_t *, struct request *, int, int); | 83 | extern void elv_add_request(request_queue_t *, struct request *, int, int); |
84 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); | 84 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); |
85 | extern void elv_insert(request_queue_t *, struct request *, int); | ||
85 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); | 86 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); |
86 | extern void elv_merge_requests(request_queue_t *, struct request *, | 87 | extern void elv_merge_requests(request_queue_t *, struct request *, |
87 | struct request *); | 88 | struct request *); |
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index dbd7bb4a33b7..0cf0bea010fe 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/signal.h> | 5 | #include <linux/signal.h> |
6 | #include <linux/time.h> | 6 | #include <linux/time.h> |
7 | #include <linux/user.h> | 7 | #include <linux/user.h> |
8 | #include <linux/ptrace.h> | ||
8 | 9 | ||
9 | struct elf_siginfo | 10 | struct elf_siginfo |
10 | { | 11 | { |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 7863a59bd598..63f1d63cc1d8 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -100,6 +100,9 @@ extern s32 i2c_smbus_write_block_data(struct i2c_client * client, | |||
100 | /* Returns the number of read bytes */ | 100 | /* Returns the number of read bytes */ |
101 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, | 101 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, |
102 | u8 command, u8 *values); | 102 | u8 command, u8 *values); |
103 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, | ||
104 | u8 command, u8 length, | ||
105 | u8 *values); | ||
103 | 106 | ||
104 | /* | 107 | /* |
105 | * A driver is capable of handling one or more physical devices present on | 108 | * A driver is capable of handling one or more physical devices present on |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 9ba806796667..5a9d8c599171 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -1115,9 +1115,11 @@ static inline struct i2o_message *i2o_msg_get(struct i2o_controller *c) | |||
1115 | return ERR_PTR(-ENOMEM); | 1115 | return ERR_PTR(-ENOMEM); |
1116 | 1116 | ||
1117 | mmsg->mfa = readl(c->in_port); | 1117 | mmsg->mfa = readl(c->in_port); |
1118 | if (mmsg->mfa == I2O_QUEUE_EMPTY) { | 1118 | if (unlikely(mmsg->mfa >= c->in_queue.len)) { |
1119 | mempool_free(mmsg, c->in_msg.mempool); | 1119 | mempool_free(mmsg, c->in_msg.mempool); |
1120 | return ERR_PTR(-EBUSY); | 1120 | if(mmsg->mfa == I2O_QUEUE_EMPTY) |
1121 | return ERR_PTR(-EBUSY); | ||
1122 | return ERR_PTR(-EFAULT); | ||
1121 | } | 1123 | } |
1122 | 1124 | ||
1123 | return &mmsg->msg; | 1125 | return &mmsg->msg; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 110b3cfac021..a7fc4cc79b23 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -582,7 +582,6 @@ typedef struct ide_drive_s { | |||
582 | unsigned noprobe : 1; /* from: hdx=noprobe */ | 582 | unsigned noprobe : 1; /* from: hdx=noprobe */ |
583 | unsigned removable : 1; /* 1 if need to do check_media_change */ | 583 | unsigned removable : 1; /* 1 if need to do check_media_change */ |
584 | unsigned attach : 1; /* needed for removable devices */ | 584 | unsigned attach : 1; /* needed for removable devices */ |
585 | unsigned is_flash : 1; /* 1 if probed as flash */ | ||
586 | unsigned forced_geom : 1; /* 1 if hdx=c,h,s was given at boot */ | 585 | unsigned forced_geom : 1; /* 1 if hdx=c,h,s was given at boot */ |
587 | unsigned no_unmask : 1; /* disallow setting unmask bit */ | 586 | unsigned no_unmask : 1; /* disallow setting unmask bit */ |
588 | unsigned no_io_32bit : 1; /* disallow enabling 32bit I/O */ | 587 | unsigned no_io_32bit : 1; /* disallow enabling 32bit I/O */ |
@@ -1006,7 +1005,6 @@ extern ide_hwif_t ide_hwifs[]; /* master data repository */ | |||
1006 | extern int noautodma; | 1005 | extern int noautodma; |
1007 | 1006 | ||
1008 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 1007 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); |
1009 | extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); | ||
1010 | 1008 | ||
1011 | /* | 1009 | /* |
1012 | * This is used on exit from the driver to designate the next irq handler | 1010 | * This is used on exit from the driver to designate the next irq handler |
diff --git a/include/linux/ioc3.h b/include/linux/ioc3.h index e7906a72a4f1..da7c09e4ede6 100644 --- a/include/linux/ioc3.h +++ b/include/linux/ioc3.h | |||
@@ -27,7 +27,7 @@ struct ioc3_driver_data { | |||
27 | int id; /* IOC3 sequence number */ | 27 | int id; /* IOC3 sequence number */ |
28 | /* PCI mapping */ | 28 | /* PCI mapping */ |
29 | unsigned long pma; /* physical address */ | 29 | unsigned long pma; /* physical address */ |
30 | struct __iomem ioc3 *vma; /* pointer to registers */ | 30 | struct ioc3 __iomem *vma; /* pointer to registers */ |
31 | struct pci_dev *pdev; /* PCI device */ | 31 | struct pci_dev *pdev; /* PCI device */ |
32 | /* IRQ stuff */ | 32 | /* IRQ stuff */ |
33 | int dual_irq; /* set if separate IRQs are used */ | 33 | int dual_irq; /* set if separate IRQs are used */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 558cb4c26ec9..0fe4aa891ddc 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define jfs_debug jbd_debug | 23 | #define jfs_debug jbd_debug |
24 | #else | 24 | #else |
25 | 25 | ||
26 | #include <linux/types.h> | ||
26 | #include <linux/buffer_head.h> | 27 | #include <linux/buffer_head.h> |
27 | #include <linux/journal-head.h> | 28 | #include <linux/journal-head.h> |
28 | #include <linux/stddef.h> | 29 | #include <linux/stddef.h> |
@@ -238,7 +239,6 @@ typedef struct journal_superblock_s | |||
238 | 239 | ||
239 | #include <linux/fs.h> | 240 | #include <linux/fs.h> |
240 | #include <linux/sched.h> | 241 | #include <linux/sched.h> |
241 | #include <asm/bug.h> | ||
242 | 242 | ||
243 | #define JBD_ASSERTIONS | 243 | #define JBD_ASSERTIONS |
244 | #ifdef JBD_ASSERTIONS | 244 | #ifdef JBD_ASSERTIONS |
@@ -618,6 +618,7 @@ struct transaction_s | |||
618 | * @j_wbuf: array of buffer_heads for journal_commit_transaction | 618 | * @j_wbuf: array of buffer_heads for journal_commit_transaction |
619 | * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the | 619 | * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the |
620 | * number that will fit in j_blocksize | 620 | * number that will fit in j_blocksize |
621 | * @j_last_sync_writer: most recent pid which did a synchronous write | ||
621 | * @j_private: An opaque pointer to fs-private information. | 622 | * @j_private: An opaque pointer to fs-private information. |
622 | */ | 623 | */ |
623 | 624 | ||
@@ -807,6 +808,8 @@ struct journal_s | |||
807 | struct buffer_head **j_wbuf; | 808 | struct buffer_head **j_wbuf; |
808 | int j_wbufsize; | 809 | int j_wbufsize; |
809 | 810 | ||
811 | pid_t j_last_sync_writer; | ||
812 | |||
810 | /* | 813 | /* |
811 | * An opaque pointer to fs-private information. ext3 puts its | 814 | * An opaque pointer to fs-private information. ext3 puts its |
812 | * superblock pointer here | 815 | * superblock pointer here |
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index 45f625d7d0b2..3aed37314ab8 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -151,6 +151,11 @@ extern unsigned int keymap_count; | |||
151 | 151 | ||
152 | static inline void con_schedule_flip(struct tty_struct *t) | 152 | static inline void con_schedule_flip(struct tty_struct *t) |
153 | { | 153 | { |
154 | unsigned long flags; | ||
155 | spin_lock_irqsave(&t->buf.lock, flags); | ||
156 | if (t->buf.tail != NULL) | ||
157 | t->buf.tail->active = 0; | ||
158 | spin_unlock_irqrestore(&t->buf.lock, flags); | ||
154 | schedule_work(&t->buf.work); | 159 | schedule_work(&t->buf.work); |
155 | } | 160 | } |
156 | 161 | ||
diff --git a/include/linux/list.h b/include/linux/list.h index 945daa1f13dd..47208bd99f9e 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -34,9 +34,11 @@ struct list_head { | |||
34 | #define LIST_HEAD(name) \ | 34 | #define LIST_HEAD(name) \ |
35 | struct list_head name = LIST_HEAD_INIT(name) | 35 | struct list_head name = LIST_HEAD_INIT(name) |
36 | 36 | ||
37 | #define INIT_LIST_HEAD(ptr) do { \ | 37 | static inline void INIT_LIST_HEAD(struct list_head *list) |
38 | (ptr)->next = (ptr); (ptr)->prev = (ptr); \ | 38 | { |
39 | } while (0) | 39 | list->next = list; |
40 | list->prev = list; | ||
41 | } | ||
40 | 42 | ||
41 | /* | 43 | /* |
42 | * Insert a new entry between two known consecutive entries. | 44 | * Insert a new entry between two known consecutive entries. |
@@ -534,7 +536,11 @@ struct hlist_node { | |||
534 | #define HLIST_HEAD_INIT { .first = NULL } | 536 | #define HLIST_HEAD_INIT { .first = NULL } |
535 | #define HLIST_HEAD(name) struct hlist_head name = { .first = NULL } | 537 | #define HLIST_HEAD(name) struct hlist_head name = { .first = NULL } |
536 | #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) | 538 | #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) |
537 | #define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL) | 539 | static inline void INIT_HLIST_NODE(struct hlist_node *h) |
540 | { | ||
541 | h->next = NULL; | ||
542 | h->pprev = NULL; | ||
543 | } | ||
538 | 544 | ||
539 | static inline int hlist_unhashed(const struct hlist_node *h) | 545 | static inline int hlist_unhashed(const struct hlist_node *h) |
540 | { | 546 | { |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 95c8fea293ba..920766cea79c 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -84,6 +84,7 @@ struct nlm_rqst { | |||
84 | struct nlm_args a_args; /* arguments */ | 84 | struct nlm_args a_args; /* arguments */ |
85 | struct nlm_res a_res; /* result */ | 85 | struct nlm_res a_res; /* result */ |
86 | struct nlm_wait * a_block; | 86 | struct nlm_wait * a_block; |
87 | unsigned int a_retries; /* Retry count */ | ||
87 | char a_owner[NLMCLNT_OHSIZE]; | 88 | char a_owner[NLMCLNT_OHSIZE]; |
88 | }; | 89 | }; |
89 | 90 | ||
@@ -148,7 +149,6 @@ struct nlm_rqst * nlmclnt_alloc_call(void); | |||
148 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); | 149 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); |
149 | void nlmclnt_finish_block(struct nlm_rqst *req); | 150 | void nlmclnt_finish_block(struct nlm_rqst *req); |
150 | long nlmclnt_block(struct nlm_rqst *req, long timeout); | 151 | long nlmclnt_block(struct nlm_rqst *req, long timeout); |
151 | int nlmclnt_cancel(struct nlm_host *, struct file_lock *); | ||
152 | u32 nlmclnt_grant(struct nlm_lock *); | 152 | u32 nlmclnt_grant(struct nlm_lock *); |
153 | void nlmclnt_recovery(struct nlm_host *, u32); | 153 | void nlmclnt_recovery(struct nlm_host *, u32); |
154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); | 154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 85854b867463..75e9f0724997 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -303,7 +303,7 @@ struct page { | |||
303 | */ | 303 | */ |
304 | #define put_page_testzero(p) \ | 304 | #define put_page_testzero(p) \ |
305 | ({ \ | 305 | ({ \ |
306 | BUG_ON(page_count(p) == 0); \ | 306 | BUG_ON(atomic_read(&(p)->_count) == -1);\ |
307 | atomic_add_negative(-1, &(p)->_count); \ | 307 | atomic_add_negative(-1, &(p)->_count); \ |
308 | }) | 308 | }) |
309 | 309 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index ccd3e13de1e8..f38872abc126 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -21,24 +21,35 @@ struct mmc_command { | |||
21 | u32 arg; | 21 | u32 arg; |
22 | u32 resp[4]; | 22 | u32 resp[4]; |
23 | unsigned int flags; /* expected response type */ | 23 | unsigned int flags; /* expected response type */ |
24 | #define MMC_RSP_NONE (0 << 0) | 24 | #define MMC_RSP_PRESENT (1 << 0) |
25 | #define MMC_RSP_SHORT (1 << 0) | 25 | #define MMC_RSP_136 (1 << 1) /* 136 bit response */ |
26 | #define MMC_RSP_LONG (2 << 0) | 26 | #define MMC_RSP_CRC (1 << 2) /* expect valid crc */ |
27 | #define MMC_RSP_MASK (3 << 0) | 27 | #define MMC_RSP_BUSY (1 << 3) /* card may send busy */ |
28 | #define MMC_RSP_CRC (1 << 3) /* expect valid crc */ | 28 | #define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */ |
29 | #define MMC_RSP_BUSY (1 << 4) /* card may send busy */ | 29 | #define MMC_CMD_MASK (3 << 5) /* command type */ |
30 | #define MMC_RSP_OPCODE (1 << 5) /* response contains opcode */ | 30 | #define MMC_CMD_AC (0 << 5) |
31 | #define MMC_CMD_ADTC (1 << 5) | ||
32 | #define MMC_CMD_BC (2 << 5) | ||
33 | #define MMC_CMD_BCR (3 << 5) | ||
31 | 34 | ||
32 | /* | 35 | /* |
33 | * These are the response types, and correspond to valid bit | 36 | * These are the response types, and correspond to valid bit |
34 | * patterns of the above flags. One additional valid pattern | 37 | * patterns of the above flags. One additional valid pattern |
35 | * is all zeros, which means we don't expect a response. | 38 | * is all zeros, which means we don't expect a response. |
36 | */ | 39 | */ |
37 | #define MMC_RSP_R1 (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 40 | #define MMC_RSP_NONE (0) |
38 | #define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) | 41 | #define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
39 | #define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC) | 42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
40 | #define MMC_RSP_R3 (MMC_RSP_SHORT) | 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
41 | #define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC) | 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC) | ||
46 | |||
47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | ||
48 | |||
49 | /* | ||
50 | * These are the command types. | ||
51 | */ | ||
52 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_TYPE) | ||
42 | 53 | ||
43 | unsigned int retries; /* max number of retries */ | 54 | unsigned int retries; /* max number of retries */ |
44 | unsigned int error; /* command error */ | 55 | unsigned int error; /* command error */ |
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index a14dc306545b..81c3f77f652c 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -79,7 +79,7 @@ | |||
79 | /* SD commands type argument response */ | 79 | /* SD commands type argument response */ |
80 | /* class 8 */ | 80 | /* class 8 */ |
81 | /* This is basically the same command as for MMC with some quirks. */ | 81 | /* This is basically the same command as for MMC with some quirks. */ |
82 | #define SD_SEND_RELATIVE_ADDR 3 /* ac R6 */ | 82 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ |
83 | 83 | ||
84 | /* Application commands */ | 84 | /* Application commands */ |
85 | #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ | 85 | #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index fedfbc8a287f..7dfd6e1fcde7 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/unaligned.h> | 15 | #include <asm/unaligned.h> |
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/bug.h> | ||
19 | 18 | ||
20 | #ifdef CONFIG_MTD_MAP_BANK_WIDTH_1 | 19 | #ifdef CONFIG_MTD_MAP_BANK_WIDTH_1 |
21 | #define map_bankwidth(map) 1 | 20 | #define map_bankwidth(map) 1 |
diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 6731977c4c13..3abc8e3b4879 100644 --- a/include/linux/namespace.h +++ b/include/linux/namespace.h | |||
@@ -15,6 +15,7 @@ struct namespace { | |||
15 | 15 | ||
16 | extern int copy_namespace(int, struct task_struct *); | 16 | extern int copy_namespace(int, struct task_struct *); |
17 | extern void __put_namespace(struct namespace *namespace); | 17 | extern void __put_namespace(struct namespace *namespace); |
18 | extern struct namespace *dup_namespace(struct task_struct *, struct fs_struct *); | ||
18 | 19 | ||
19 | static inline void put_namespace(struct namespace *namespace) | 20 | static inline void put_namespace(struct namespace *namespace) |
20 | { | 21 | { |
diff --git a/include/linux/netfilter_ipv4/ipt_connbytes.h b/include/linux/netfilter_ipv4/ipt_connbytes.h index b04dfa3083c9..f63e6ee91113 100644 --- a/include/linux/netfilter_ipv4/ipt_connbytes.h +++ b/include/linux/netfilter_ipv4/ipt_connbytes.h | |||
@@ -1,10 +1,10 @@ | |||
1 | #ifndef _IPT_CONNBYTES_H | 1 | #ifndef _IPT_CONNBYTES_H |
2 | #define _IPT_CONNBYTES_H | 2 | #define _IPT_CONNBYTES_H |
3 | 3 | ||
4 | #include <net/netfilter/xt_connbytes.h> | 4 | #include <linux/netfilter/xt_connbytes.h> |
5 | #define ipt_connbytes_what xt_connbytes_what | 5 | #define ipt_connbytes_what xt_connbytes_what |
6 | 6 | ||
7 | #define IPT_CONNBYTES_PKTS XT_CONNBYTES_PACKETS | 7 | #define IPT_CONNBYTES_PKTS XT_CONNBYTES_PKTS |
8 | #define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES | 8 | #define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES |
9 | #define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT | 9 | #define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT |
10 | 10 | ||
diff --git a/include/linux/netfilter_ipv4/ipt_policy.h b/include/linux/netfilter_ipv4/ipt_policy.h index 7fd1bec453f1..a3f6eff39d33 100644 --- a/include/linux/netfilter_ipv4/ipt_policy.h +++ b/include/linux/netfilter_ipv4/ipt_policy.h | |||
@@ -27,16 +27,22 @@ struct ipt_policy_spec | |||
27 | reqid:1; | 27 | reqid:1; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | union ipt_policy_addr | ||
31 | { | ||
32 | struct in_addr a4; | ||
33 | struct in6_addr a6; | ||
34 | }; | ||
35 | |||
30 | struct ipt_policy_elem | 36 | struct ipt_policy_elem |
31 | { | 37 | { |
32 | u_int32_t saddr; | 38 | union ipt_policy_addr saddr; |
33 | u_int32_t smask; | 39 | union ipt_policy_addr smask; |
34 | u_int32_t daddr; | 40 | union ipt_policy_addr daddr; |
35 | u_int32_t dmask; | 41 | union ipt_policy_addr dmask; |
36 | u_int32_t spi; | 42 | u_int32_t spi; |
37 | u_int32_t reqid; | 43 | u_int32_t reqid; |
38 | u_int8_t proto; | 44 | u_int8_t proto; |
39 | u_int8_t mode; | 45 | u_int8_t mode; |
40 | 46 | ||
41 | struct ipt_policy_spec match; | 47 | struct ipt_policy_spec match; |
42 | struct ipt_policy_spec invert; | 48 | struct ipt_policy_spec invert; |
diff --git a/include/linux/netfilter_ipv6/ip6t_policy.h b/include/linux/netfilter_ipv6/ip6t_policy.h index 5a93afcd2ff1..671bd818300f 100644 --- a/include/linux/netfilter_ipv6/ip6t_policy.h +++ b/include/linux/netfilter_ipv6/ip6t_policy.h | |||
@@ -27,16 +27,22 @@ struct ip6t_policy_spec | |||
27 | reqid:1; | 27 | reqid:1; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | union ip6t_policy_addr | ||
31 | { | ||
32 | struct in_addr a4; | ||
33 | struct in6_addr a6; | ||
34 | }; | ||
35 | |||
30 | struct ip6t_policy_elem | 36 | struct ip6t_policy_elem |
31 | { | 37 | { |
32 | struct in6_addr saddr; | 38 | union ip6t_policy_addr saddr; |
33 | struct in6_addr smask; | 39 | union ip6t_policy_addr smask; |
34 | struct in6_addr daddr; | 40 | union ip6t_policy_addr daddr; |
35 | struct in6_addr dmask; | 41 | union ip6t_policy_addr dmask; |
36 | u_int32_t spi; | 42 | u_int32_t spi; |
37 | u_int32_t reqid; | 43 | u_int32_t reqid; |
38 | u_int8_t proto; | 44 | u_int8_t proto; |
39 | u_int8_t mode; | 45 | u_int8_t mode; |
40 | 46 | ||
41 | struct ip6t_policy_spec match; | 47 | struct ip6t_policy_spec match; |
42 | struct ip6t_policy_spec invert; | 48 | struct ip6t_policy_spec invert; |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 4726ef7ba8e8..b959a4525cbd 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -84,7 +84,6 @@ | |||
84 | #include <linux/threads.h> | 84 | #include <linux/threads.h> |
85 | #include <linux/bitmap.h> | 85 | #include <linux/bitmap.h> |
86 | #include <linux/numa.h> | 86 | #include <linux/numa.h> |
87 | #include <asm/bug.h> | ||
88 | 87 | ||
89 | typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; | 88 | typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; |
90 | extern nodemask_t _unused_nodemask_arg_; | 89 | extern nodemask_t _unused_nodemask_arg_; |
diff --git a/include/linux/parport.h b/include/linux/parport.h index f67f838a3a1f..008d736a6c9a 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h | |||
@@ -128,6 +128,11 @@ struct amiga_parport_state { | |||
128 | unsigned char statusdir;/* ciab.ddrb & 7 */ | 128 | unsigned char statusdir;/* ciab.ddrb & 7 */ |
129 | }; | 129 | }; |
130 | 130 | ||
131 | struct ip32_parport_state { | ||
132 | unsigned int dcr; | ||
133 | unsigned int ecr; | ||
134 | }; | ||
135 | |||
131 | struct parport_state { | 136 | struct parport_state { |
132 | union { | 137 | union { |
133 | struct pc_parport_state pc; | 138 | struct pc_parport_state pc; |
@@ -135,6 +140,7 @@ struct parport_state { | |||
135 | struct ax_parport_state ax; | 140 | struct ax_parport_state ax; |
136 | struct amiga_parport_state amiga; | 141 | struct amiga_parport_state amiga; |
137 | /* Atari has not state. */ | 142 | /* Atari has not state. */ |
143 | struct ip32_parport_state ip32; | ||
138 | void *misc; | 144 | void *misc; |
139 | } u; | 145 | } u; |
140 | }; | 146 | }; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b0b908f583c5..7a61ccdcbc4b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1670,6 +1670,9 @@ | |||
1670 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 | 1670 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 |
1671 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 | 1671 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 |
1672 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 | 1672 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 |
1673 | #define PCI_DEVICE_ID_SIIG_8S_20x_550 0x2080 | ||
1674 | #define PCI_DEVICE_ID_SIIG_8S_20x_650 0x2081 | ||
1675 | #define PCI_DEVICE_ID_SIIG_8S_20x_850 0x2082 | ||
1673 | #define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050 | 1676 | #define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050 |
1674 | 1677 | ||
1675 | #define PCI_VENDOR_ID_RADISYS 0x1331 | 1678 | #define PCI_VENDOR_ID_RADISYS 0x1331 |
@@ -1829,6 +1832,7 @@ | |||
1829 | #define PCI_VENDOR_ID_AFAVLAB 0x14db | 1832 | #define PCI_VENDOR_ID_AFAVLAB 0x14db |
1830 | #define PCI_DEVICE_ID_AFAVLAB_P028 0x2180 | 1833 | #define PCI_DEVICE_ID_AFAVLAB_P028 0x2180 |
1831 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 | 1834 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 |
1835 | #define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150 | ||
1832 | 1836 | ||
1833 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 | 1837 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 |
1834 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 | 1838 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 2c177e4c8f22..8a94c717c266 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -114,7 +114,7 @@ struct pkt_ctrl_command { | |||
114 | 114 | ||
115 | struct packet_settings | 115 | struct packet_settings |
116 | { | 116 | { |
117 | __u8 size; /* packet size in (512 byte) sectors */ | 117 | __u32 size; /* packet size in (512 byte) sectors */ |
118 | __u8 fp; /* fixed packets */ | 118 | __u8 fp; /* fixed packets */ |
119 | __u8 link_loss; /* the rest is specified | 119 | __u8 link_loss; /* the rest is specified |
120 | * as per Mt Fuji */ | 120 | * as per Mt Fuji */ |
@@ -169,8 +169,8 @@ struct packet_iosched | |||
169 | #if (PAGE_SIZE % CD_FRAMESIZE) != 0 | 169 | #if (PAGE_SIZE % CD_FRAMESIZE) != 0 |
170 | #error "PAGE_SIZE must be a multiple of CD_FRAMESIZE" | 170 | #error "PAGE_SIZE must be a multiple of CD_FRAMESIZE" |
171 | #endif | 171 | #endif |
172 | #define PACKET_MAX_SIZE 32 | 172 | #define PACKET_MAX_SIZE 128 |
173 | #define PAGES_PER_PACKET (PACKET_MAX_SIZE * CD_FRAMESIZE / PAGE_SIZE) | 173 | #define FRAMES_PER_PAGE (PAGE_SIZE / CD_FRAMESIZE) |
174 | #define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) | 174 | #define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) |
175 | 175 | ||
176 | enum packet_data_state { | 176 | enum packet_data_state { |
@@ -219,7 +219,7 @@ struct packet_data | |||
219 | atomic_t io_errors; /* Number of read/write errors during IO */ | 219 | atomic_t io_errors; /* Number of read/write errors during IO */ |
220 | 220 | ||
221 | struct bio *r_bios[PACKET_MAX_SIZE]; /* bios to use during data gathering */ | 221 | struct bio *r_bios[PACKET_MAX_SIZE]; /* bios to use during data gathering */ |
222 | struct page *pages[PAGES_PER_PACKET]; | 222 | struct page *pages[PACKET_MAX_SIZE / FRAMES_PER_PAGE]; |
223 | 223 | ||
224 | int cache_valid; /* If non-zero, the data for the zone defined */ | 224 | int cache_valid; /* If non-zero, the data for the zone defined */ |
225 | /* by the sector variable is completely cached */ | 225 | /* by the sector variable is completely cached */ |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 4f34d3d60f2e..21e5a9124856 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -190,7 +190,6 @@ static __inline__ int DQUOT_OFF(struct super_block *sb) | |||
190 | */ | 190 | */ |
191 | #define sb_dquot_ops (NULL) | 191 | #define sb_dquot_ops (NULL) |
192 | #define sb_quotactl_ops (NULL) | 192 | #define sb_quotactl_ops (NULL) |
193 | #define sync_dquots_dev(dev,type) (NULL) | ||
194 | #define DQUOT_INIT(inode) do { } while(0) | 193 | #define DQUOT_INIT(inode) do { } while(0) |
195 | #define DQUOT_DROP(inode) do { } while(0) | 194 | #define DQUOT_DROP(inode) do { } while(0) |
196 | #define DQUOT_ALLOC_INODE(inode) (0) | 195 | #define DQUOT_ALLOC_INODE(inode) (0) |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 981f9aa43353..b87aefa082e2 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -240,11 +240,14 @@ extern int rcu_pending(int cpu); | |||
240 | * This means that all preempt_disable code sequences, including NMI and | 240 | * This means that all preempt_disable code sequences, including NMI and |
241 | * hardware-interrupt handlers, in progress on entry will have completed | 241 | * hardware-interrupt handlers, in progress on entry will have completed |
242 | * before this primitive returns. However, this does not guarantee that | 242 | * before this primitive returns. However, this does not guarantee that |
243 | * softirq handlers will have completed, since in some kernels | 243 | * softirq handlers will have completed, since in some kernels, these |
244 | * handlers can run in process context, and can block. | ||
244 | * | 245 | * |
245 | * This primitive provides the guarantees made by the (deprecated) | 246 | * This primitive provides the guarantees made by the (deprecated) |
246 | * synchronize_kernel() API. In contrast, synchronize_rcu() only | 247 | * synchronize_kernel() API. In contrast, synchronize_rcu() only |
247 | * guarantees that rcu_read_lock() sections will have completed. | 248 | * guarantees that rcu_read_lock() sections will have completed. |
249 | * In "classic RCU", these two guarantees happen to be one and | ||
250 | * the same, but can differ in realtime RCU implementations. | ||
248 | */ | 251 | */ |
249 | #define synchronize_sched() synchronize_rcu() | 252 | #define synchronize_sched() synchronize_rcu() |
250 | 253 | ||
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h index 0a3605099c44..806ec5b06707 100644 --- a/include/linux/reiserfs_acl.h +++ b/include/linux/reiserfs_acl.h | |||
@@ -58,9 +58,13 @@ extern struct reiserfs_xattr_handler posix_acl_default_handler; | |||
58 | extern struct reiserfs_xattr_handler posix_acl_access_handler; | 58 | extern struct reiserfs_xattr_handler posix_acl_access_handler; |
59 | #else | 59 | #else |
60 | 60 | ||
61 | #define reiserfs_get_acl NULL | ||
62 | #define reiserfs_cache_default_acl(inode) 0 | 61 | #define reiserfs_cache_default_acl(inode) 0 |
63 | 62 | ||
63 | static inline struct posix_acl *reiserfs_get_acl(struct inode *inode, int type) | ||
64 | { | ||
65 | return NULL; | ||
66 | } | ||
67 | |||
64 | static inline int reiserfs_xattr_posix_acl_init(void) | 68 | static inline int reiserfs_xattr_posix_acl_init(void) |
65 | { | 69 | { |
66 | return 0; | 70 | return 0; |
diff --git a/include/linux/security.h b/include/linux/security.h index bb1da86747c7..7cbef482e13a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1499,15 +1499,11 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd, | |||
1499 | 1499 | ||
1500 | static inline int security_inode_alloc (struct inode *inode) | 1500 | static inline int security_inode_alloc (struct inode *inode) |
1501 | { | 1501 | { |
1502 | if (unlikely (IS_PRIVATE (inode))) | ||
1503 | return 0; | ||
1504 | return security_ops->inode_alloc_security (inode); | 1502 | return security_ops->inode_alloc_security (inode); |
1505 | } | 1503 | } |
1506 | 1504 | ||
1507 | static inline void security_inode_free (struct inode *inode) | 1505 | static inline void security_inode_free (struct inode *inode) |
1508 | { | 1506 | { |
1509 | if (unlikely (IS_PRIVATE (inode))) | ||
1510 | return; | ||
1511 | security_ops->inode_free_security (inode); | 1507 | security_ops->inode_free_security (inode); |
1512 | } | 1508 | } |
1513 | 1509 | ||
diff --git a/include/linux/smp.h b/include/linux/smp.h index 9dfa3ee769ae..44153fdf73fc 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -17,7 +17,6 @@ extern void cpu_idle(void); | |||
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | #include <linux/thread_info.h> | 18 | #include <linux/thread_info.h> |
19 | #include <asm/smp.h> | 19 | #include <asm/smp.h> |
20 | #include <asm/bug.h> | ||
21 | 20 | ||
22 | /* | 21 | /* |
23 | * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc. | 22 | * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc. |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index b68c11a2d6dd..be4772ed43c0 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -48,7 +48,7 @@ struct rpc_cred { | |||
48 | 48 | ||
49 | /* per-flavor data */ | 49 | /* per-flavor data */ |
50 | }; | 50 | }; |
51 | #define RPCAUTH_CRED_LOCKED 0x0001 | 51 | #define RPCAUTH_CRED_NEW 0x0001 |
52 | #define RPCAUTH_CRED_UPTODATE 0x0002 | 52 | #define RPCAUTH_CRED_UPTODATE 0x0002 |
53 | 53 | ||
54 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 | 54 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 |
@@ -83,9 +83,10 @@ struct rpc_auth { | |||
83 | struct rpc_cred_cache * au_credcache; | 83 | struct rpc_cred_cache * au_credcache; |
84 | /* per-flavor data */ | 84 | /* per-flavor data */ |
85 | }; | 85 | }; |
86 | #define RPC_AUTH_PROC_CREDS 0x0010 /* process creds (including | 86 | |
87 | * uid/gid, fs[ug]id, gids) | 87 | /* Flags for rpcauth_lookupcred() */ |
88 | */ | 88 | #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ |
89 | #define RPCAUTH_LOOKUP_ROOTCREDS 0x02 /* This really ought to go! */ | ||
89 | 90 | ||
90 | /* | 91 | /* |
91 | * Client authentication ops | 92 | * Client authentication ops |
@@ -105,6 +106,7 @@ struct rpc_authops { | |||
105 | 106 | ||
106 | struct rpc_credops { | 107 | struct rpc_credops { |
107 | const char * cr_name; /* Name of the auth flavour */ | 108 | const char * cr_name; /* Name of the auth flavour */ |
109 | int (*cr_init)(struct rpc_auth *, struct rpc_cred *); | ||
108 | void (*crdestroy)(struct rpc_cred *); | 110 | void (*crdestroy)(struct rpc_cred *); |
109 | 111 | ||
110 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); | 112 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5dc94e777fab..37c1c76fd547 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -43,16 +43,20 @@ extern void mark_free_pages(struct zone *zone); | |||
43 | /* kernel/power/swsusp.c */ | 43 | /* kernel/power/swsusp.c */ |
44 | extern int software_suspend(void); | 44 | extern int software_suspend(void); |
45 | 45 | ||
46 | #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) | ||
46 | extern int pm_prepare_console(void); | 47 | extern int pm_prepare_console(void); |
47 | extern void pm_restore_console(void); | 48 | extern void pm_restore_console(void); |
48 | 49 | #else | |
50 | static inline int pm_prepare_console(void) { return 0; } | ||
51 | static inline void pm_restore_console(void) {} | ||
52 | #endif /* defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) */ | ||
49 | #else | 53 | #else |
50 | static inline int software_suspend(void) | 54 | static inline int software_suspend(void) |
51 | { | 55 | { |
52 | printk("Warning: fake suspend called\n"); | 56 | printk("Warning: fake suspend called\n"); |
53 | return -EPERM; | 57 | return -EPERM; |
54 | } | 58 | } |
55 | #endif | 59 | #endif /* CONFIG_PM */ |
56 | 60 | ||
57 | #ifdef CONFIG_SUSPEND_SMP | 61 | #ifdef CONFIG_SUSPEND_SMP |
58 | extern void disable_nonboot_cpus(void); | 62 | extern void disable_nonboot_cpus(void); |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 3787102e4b12..a7bd3b4558d2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -57,6 +57,7 @@ struct tty_buffer { | |||
57 | unsigned char *flag_buf_ptr; | 57 | unsigned char *flag_buf_ptr; |
58 | int used; | 58 | int used; |
59 | int size; | 59 | int size; |
60 | int active; | ||
60 | /* Data points here */ | 61 | /* Data points here */ |
61 | unsigned long data[0]; | 62 | unsigned long data[0]; |
62 | }; | 63 | }; |
@@ -64,6 +65,7 @@ struct tty_buffer { | |||
64 | struct tty_bufhead { | 65 | struct tty_bufhead { |
65 | struct work_struct work; | 66 | struct work_struct work; |
66 | struct semaphore pty_sem; | 67 | struct semaphore pty_sem; |
68 | spinlock_t lock; | ||
67 | struct tty_buffer *head; /* Queue head */ | 69 | struct tty_buffer *head; /* Queue head */ |
68 | struct tty_buffer *tail; /* Active buffer */ | 70 | struct tty_buffer *tail; /* Active buffer */ |
69 | struct tty_buffer *free; /* Free queue head */ | 71 | struct tty_buffer *free; /* Free queue head */ |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index be1400e82482..82961eb19888 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -17,7 +17,7 @@ _INLINE_ int tty_insert_flip_char(struct tty_struct *tty, | |||
17 | unsigned char ch, char flag) | 17 | unsigned char ch, char flag) |
18 | { | 18 | { |
19 | struct tty_buffer *tb = tty->buf.tail; | 19 | struct tty_buffer *tb = tty->buf.tail; |
20 | if (tb && tb->used < tb->size) { | 20 | if (tb && tb->active && tb->used < tb->size) { |
21 | tb->flag_buf_ptr[tb->used] = flag; | 21 | tb->flag_buf_ptr[tb->used] = flag; |
22 | tb->char_buf_ptr[tb->used++] = ch; | 22 | tb->char_buf_ptr[tb->used++] = ch; |
23 | return 1; | 23 | return 1; |
@@ -27,6 +27,11 @@ _INLINE_ int tty_insert_flip_char(struct tty_struct *tty, | |||
27 | 27 | ||
28 | _INLINE_ void tty_schedule_flip(struct tty_struct *tty) | 28 | _INLINE_ void tty_schedule_flip(struct tty_struct *tty) |
29 | { | 29 | { |
30 | unsigned long flags; | ||
31 | spin_lock_irqsave(&tty->buf.lock, flags); | ||
32 | if (tty->buf.tail != NULL) | ||
33 | tty->buf.tail->active = 0; | ||
34 | spin_unlock_irqrestore(&tty->buf.lock, flags); | ||
30 | schedule_delayed_work(&tty->buf.work, 1); | 35 | schedule_delayed_work(&tty->buf.work, 1); |
31 | } | 36 | } |
32 | 37 | ||
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 7a6babeca256..b0ffe4356e5a 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -148,11 +148,11 @@ typedef __u16 __bitwise __fs16; | |||
148 | #define UFS_USEEFT ((__u16)65535) | 148 | #define UFS_USEEFT ((__u16)65535) |
149 | 149 | ||
150 | #define UFS_FSOK 0x7c269d38 | 150 | #define UFS_FSOK 0x7c269d38 |
151 | #define UFS_FSACTIVE ((char)0x00) | 151 | #define UFS_FSACTIVE ((__s8)0x00) |
152 | #define UFS_FSCLEAN ((char)0x01) | 152 | #define UFS_FSCLEAN ((__s8)0x01) |
153 | #define UFS_FSSTABLE ((char)0x02) | 153 | #define UFS_FSSTABLE ((__s8)0x02) |
154 | #define UFS_FSOSF1 ((char)0x03) /* is this correct for DEC OSF/1? */ | 154 | #define UFS_FSOSF1 ((__s8)0x03) /* is this correct for DEC OSF/1? */ |
155 | #define UFS_FSBAD ((char)0xff) | 155 | #define UFS_FSBAD ((__s8)0xff) |
156 | 156 | ||
157 | /* From here to next blank line, s_flags for ufs_sb_info */ | 157 | /* From here to next blank line, s_flags for ufs_sb_info */ |
158 | /* directory entry encoding */ | 158 | /* directory entry encoding */ |
@@ -502,8 +502,7 @@ struct ufs_super_block { | |||
502 | /* | 502 | /* |
503 | * Convert cylinder group to base address of its global summary info. | 503 | * Convert cylinder group to base address of its global summary info. |
504 | */ | 504 | */ |
505 | #define fs_cs(indx) \ | 505 | #define fs_cs(indx) s_csp[(indx)] |
506 | s_csp[(indx) >> uspi->s_csshift][(indx) & ~uspi->s_csmask] | ||
507 | 506 | ||
508 | /* | 507 | /* |
509 | * Cylinder group block for a file system. | 508 | * Cylinder group block for a file system. |
@@ -913,6 +912,7 @@ extern int ufs_sync_inode (struct inode *); | |||
913 | extern void ufs_delete_inode (struct inode *); | 912 | extern void ufs_delete_inode (struct inode *); |
914 | extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *); | 913 | extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *); |
915 | extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); | 914 | extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); |
915 | extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create); | ||
916 | 916 | ||
917 | /* namei.c */ | 917 | /* namei.c */ |
918 | extern struct file_operations ufs_dir_operations; | 918 | extern struct file_operations ufs_dir_operations; |
diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h index c1be4c226486..8ff13c160f3d 100644 --- a/include/linux/ufs_fs_sb.h +++ b/include/linux/ufs_fs_sb.h | |||
@@ -25,7 +25,7 @@ struct ufs_csum; | |||
25 | 25 | ||
26 | struct ufs_sb_info { | 26 | struct ufs_sb_info { |
27 | struct ufs_sb_private_info * s_uspi; | 27 | struct ufs_sb_private_info * s_uspi; |
28 | struct ufs_csum * s_csp[UFS_MAXCSBUFS]; | 28 | struct ufs_csum * s_csp; |
29 | unsigned s_bytesex; | 29 | unsigned s_bytesex; |
30 | unsigned s_flags; | 30 | unsigned s_flags; |
31 | struct buffer_head ** s_ucg; | 31 | struct buffer_head ** s_ucg; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 6f6c69777648..5208b12d5550 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -549,7 +549,7 @@ struct v4l2_framebuffer | |||
549 | struct v4l2_clip | 549 | struct v4l2_clip |
550 | { | 550 | { |
551 | struct v4l2_rect c; | 551 | struct v4l2_rect c; |
552 | struct v4l2_clip *next; | 552 | struct v4l2_clip __user *next; |
553 | }; | 553 | }; |
554 | 554 | ||
555 | struct v4l2_window | 555 | struct v4l2_window |
@@ -629,6 +629,7 @@ typedef __u64 v4l2_std_id; | |||
629 | #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) | 629 | #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) |
630 | #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) | 630 | #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) |
631 | #define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) | 631 | #define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) |
632 | #define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) | ||
632 | 633 | ||
633 | #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) | 634 | #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) |
634 | #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) | 635 | #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) |
@@ -661,7 +662,8 @@ typedef __u64 v4l2_std_id; | |||
661 | V4L2_STD_PAL_H |\ | 662 | V4L2_STD_PAL_H |\ |
662 | V4L2_STD_PAL_I) | 663 | V4L2_STD_PAL_I) |
663 | #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ | 664 | #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ |
664 | V4L2_STD_NTSC_M_JP) | 665 | V4L2_STD_NTSC_M_JP |\ |
666 | V4L2_STD_NTSC_M_KR) | ||
665 | #define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ | 667 | #define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ |
666 | V4L2_STD_SECAM_K |\ | 668 | V4L2_STD_SECAM_K |\ |
667 | V4L2_STD_SECAM_K1) | 669 | V4L2_STD_SECAM_K1) |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 67856eb93b43..dac43b15a5b0 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -88,12 +88,6 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX]; | |||
88 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); | 88 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); |
89 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); | 89 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); |
90 | 90 | ||
91 | static inline struct nf_conntrack_l3proto * | ||
92 | __nf_ct_l3proto_find(u_int16_t l3proto) | ||
93 | { | ||
94 | return nf_ct_l3protos[l3proto]; | ||
95 | } | ||
96 | |||
97 | extern struct nf_conntrack_l3proto * | 91 | extern struct nf_conntrack_l3proto * |
98 | nf_ct_l3proto_find_get(u_int16_t l3proto); | 92 | nf_ct_l3proto_find_get(u_int16_t l3proto); |
99 | 93 | ||
@@ -103,4 +97,13 @@ extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); | |||
103 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; | 97 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; |
104 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; | 98 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; |
105 | extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto; | 99 | extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto; |
100 | |||
101 | static inline struct nf_conntrack_l3proto * | ||
102 | __nf_ct_l3proto_find(u_int16_t l3proto) | ||
103 | { | ||
104 | if (unlikely(l3proto >= AF_MAX)) | ||
105 | return &nf_conntrack_generic_l3proto; | ||
106 | return nf_ct_l3protos[l3proto]; | ||
107 | } | ||
108 | |||
106 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ | 109 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 8c522ae031bb..072f407848a6 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -700,7 +700,7 @@ struct sctp_chunk { | |||
700 | __u8 ecn_ce_done; /* Have we processed the ECN CE bit? */ | 700 | __u8 ecn_ce_done; /* Have we processed the ECN CE bit? */ |
701 | __u8 pdiscard; /* Discard the whole packet now? */ | 701 | __u8 pdiscard; /* Discard the whole packet now? */ |
702 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ | 702 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ |
703 | __u8 fast_retransmit; /* Is this chunk fast retransmitted? */ | 703 | __s8 fast_retransmit; /* Is this chunk fast retransmitted? */ |
704 | __u8 tsn_missing_report; /* Data chunk missing counter. */ | 704 | __u8 tsn_missing_report; /* Data chunk missing counter. */ |
705 | }; | 705 | }; |
706 | 706 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 1806e5b61419..30758035d616 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1354,12 +1354,12 @@ extern int sock_get_timestamp(struct sock *, struct timeval __user *); | |||
1354 | * Enable debug/info messages | 1354 | * Enable debug/info messages |
1355 | */ | 1355 | */ |
1356 | 1356 | ||
1357 | #if 0 | 1357 | #ifdef CONFIG_NETDEBUG |
1358 | #define NETDEBUG(fmt, args...) do { } while (0) | ||
1359 | #define LIMIT_NETDEBUG(fmt, args...) do { } while(0) | ||
1360 | #else | ||
1361 | #define NETDEBUG(fmt, args...) printk(fmt,##args) | 1358 | #define NETDEBUG(fmt, args...) printk(fmt,##args) |
1362 | #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0) | 1359 | #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0) |
1360 | #else | ||
1361 | #define NETDEBUG(fmt, args...) do { } while (0) | ||
1362 | #define LIMIT_NETDEBUG(fmt, args...) do { } while(0) | ||
1363 | #endif | 1363 | #endif |
1364 | 1364 | ||
1365 | /* | 1365 | /* |