diff options
Diffstat (limited to 'include')
244 files changed, 2533 insertions, 1477 deletions
diff --git a/include/asm-arm/arch-aaec2000/entry-macro.S b/include/asm-arm/arch-aaec2000/entry-macro.S index 1eb3503bd16e..83fdf68f6b7c 100644 --- a/include/asm-arm/arch-aaec2000/entry-macro.S +++ b/include/asm-arm/arch-aaec2000/entry-macro.S | |||
@@ -15,6 +15,12 @@ | |||
15 | .macro disable_fiq | 15 | .macro disable_fiq |
16 | .endm | 16 | .endm |
17 | 17 | ||
18 | .macro get_irqnr_preamble, base, tmp | ||
19 | .endm | ||
20 | |||
21 | .macro arch_ret_to_user, tmp1, tmp2 | ||
22 | .endm | ||
23 | |||
18 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
19 | mov r4, #0xf8000000 | 25 | mov r4, #0xf8000000 |
20 | add r4, r4, #0x00000500 | 26 | add r4, r4, #0x00000500 |
diff --git a/include/asm-arm/arch-at91/entry-macro.S b/include/asm-arm/arch-at91/entry-macro.S index 76c8cccf73aa..cc1d850a0788 100644 --- a/include/asm-arm/arch-at91/entry-macro.S +++ b/include/asm-arm/arch-at91/entry-macro.S | |||
@@ -16,6 +16,12 @@ | |||
16 | .macro disable_fiq | 16 | .macro disable_fiq |
17 | .endm | 17 | .endm |
18 | 18 | ||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | .endm | ||
21 | |||
22 | .macro arch_ret_to_user, tmp1, tmp2 | ||
23 | .endm | ||
24 | |||
19 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
20 | ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral | 26 | ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral |
21 | ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt) | 27 | ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt) |
diff --git a/include/asm-arm/arch-at91/hardware.h b/include/asm-arm/arch-at91/hardware.h index eaaf1c12b753..28133e0154dd 100644 --- a/include/asm-arm/arch-at91/hardware.h +++ b/include/asm-arm/arch-at91/hardware.h | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF | 33 | * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF |
34 | * to 0xFEF78000 .. 0xFF000000. (5444Kb) | 34 | * to 0xFEF78000 .. 0xFF000000. (544Kb) |
35 | */ | 35 | */ |
36 | #define AT91_IO_PHYS_BASE 0xFFF78000 | 36 | #define AT91_IO_PHYS_BASE 0xFFF78000 |
37 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) | 37 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) |
diff --git a/include/asm-arm/arch-cl7500/entry-macro.S b/include/asm-arm/arch-cl7500/entry-macro.S index c9e5395e5106..0cfb89b229d1 100644 --- a/include/asm-arm/arch-cl7500/entry-macro.S +++ b/include/asm-arm/arch-cl7500/entry-macro.S | |||
@@ -1,3 +1,8 @@ | |||
1 | #include <asm/hardware.h> | 1 | #include <asm/hardware.h> |
2 | #include <asm/hardware/entry-macro-iomd.S> | 2 | #include <asm/hardware/entry-macro-iomd.S> |
3 | .macro get_irqnr_preamble, base, tmp | ||
4 | .endm | ||
5 | |||
6 | .macro arch_ret_to_user, tmp1, tmp2 | ||
7 | .endm | ||
3 | 8 | ||
diff --git a/include/asm-arm/arch-clps711x/entry-macro.S b/include/asm-arm/arch-clps711x/entry-macro.S index de4481dd8ba0..cd8c5a0bc7bc 100644 --- a/include/asm-arm/arch-clps711x/entry-macro.S +++ b/include/asm-arm/arch-clps711x/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) | 22 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) |
17 | #error INTSR stride != INTMR stride | 23 | #error INTSR stride != INTMR stride |
18 | #endif | 24 | #endif |
diff --git a/include/asm-arm/arch-ebsa110/entry-macro.S b/include/asm-arm/arch-ebsa110/entry-macro.S index b12ca04f998c..aa23c5d6c69e 100644 --- a/include/asm-arm/arch-ebsa110/entry-macro.S +++ b/include/asm-arm/arch-ebsa110/entry-macro.S | |||
@@ -15,6 +15,12 @@ | |||
15 | .macro disable_fiq | 15 | .macro disable_fiq |
16 | .endm | 16 | .endm |
17 | 17 | ||
18 | .macro get_irqnr_preamble, base, tmp | ||
19 | .endm | ||
20 | |||
21 | .macro arch_ret_to_user, tmp1, tmp2 | ||
22 | .endm | ||
23 | |||
18 | .macro get_irqnr_and_base, irqnr, stat, base, tmp | 24 | .macro get_irqnr_and_base, irqnr, stat, base, tmp |
19 | mov \base, #IRQ_STAT | 25 | mov \base, #IRQ_STAT |
20 | ldrb \stat, [\base] @ get interrupts | 26 | ldrb \stat, [\base] @ get interrupts |
diff --git a/include/asm-arm/arch-ebsa285/entry-macro.S b/include/asm-arm/arch-ebsa285/entry-macro.S index ce812d4f4a33..4203dbf10662 100644 --- a/include/asm-arm/arch-ebsa285/entry-macro.S +++ b/include/asm-arm/arch-ebsa285/entry-macro.S | |||
@@ -14,6 +14,12 @@ | |||
14 | .macro disable_fiq | 14 | .macro disable_fiq |
15 | .endm | 15 | .endm |
16 | 16 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
17 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 | 23 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 |
18 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff | 24 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff |
19 | 25 | ||
diff --git a/include/asm-arm/arch-ep93xx/entry-macro.S b/include/asm-arm/arch-ep93xx/entry-macro.S index 84140a28dfcf..241ec221a047 100644 --- a/include/asm-arm/arch-ep93xx/entry-macro.S +++ b/include/asm-arm/arch-ep93xx/entry-macro.S | |||
@@ -14,6 +14,12 @@ | |||
14 | .macro disable_fiq | 14 | .macro disable_fiq |
15 | .endm | 15 | .endm |
16 | 16 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
18 | ldr \base, =(EP93XX_AHB_VIRT_BASE) | 24 | ldr \base, =(EP93XX_AHB_VIRT_BASE) |
19 | orr \base, \base, #0x000b0000 | 25 | orr \base, \base, #0x000b0000 |
diff --git a/include/asm-arm/arch-h720x/entry-macro.S b/include/asm-arm/arch-h720x/entry-macro.S index 8f165648e2af..38dd63ae104e 100644 --- a/include/asm-arm/arch-h720x/entry-macro.S +++ b/include/asm-arm/arch-h720x/entry-macro.S | |||
@@ -11,6 +11,12 @@ | |||
11 | .macro disable_fiq | 11 | .macro disable_fiq |
12 | .endm | 12 | .endm |
13 | 13 | ||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
19 | |||
14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
15 | #if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202) | 21 | #if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202) |
16 | @ we could use the id register on H7202, but this is not | 22 | @ we could use the id register on H7202, but this is not |
diff --git a/include/asm-arm/arch-imx/entry-macro.S b/include/asm-arm/arch-imx/entry-macro.S index 61bb0bdc1b16..0b84e81031c3 100644 --- a/include/asm-arm/arch-imx/entry-macro.S +++ b/include/asm-arm/arch-imx/entry-macro.S | |||
@@ -11,6 +11,13 @@ | |||
11 | 11 | ||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
14 | #define AITC_NIVECSR 0x40 | 21 | #define AITC_NIVECSR 0x40 |
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
16 | ldr \base, =IO_ADDRESS(IMX_AITC_BASE) | 23 | ldr \base, =IO_ADDRESS(IMX_AITC_BASE) |
diff --git a/include/asm-arm/arch-integrator/entry-macro.S b/include/asm-arm/arch-integrator/entry-macro.S index 69838d04f90b..491af1a23de5 100644 --- a/include/asm-arm/arch-integrator/entry-macro.S +++ b/include/asm-arm/arch-integrator/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
17 | /* FIXME: should not be using soo many LDRs here */ | 23 | /* FIXME: should not be using soo many LDRs here */ |
18 | ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) | 24 | ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) |
diff --git a/include/asm-arm/arch-iop13xx/entry-macro.S b/include/asm-arm/arch-iop13xx/entry-macro.S index 94c50283dc56..a624a7870c64 100644 --- a/include/asm-arm/arch-iop13xx/entry-macro.S +++ b/include/asm-arm/arch-iop13xx/entry-macro.S | |||
@@ -19,21 +19,27 @@ | |||
19 | .macro disable_fiq | 19 | .macro disable_fiq |
20 | .endm | 20 | .endm |
21 | 21 | ||
22 | .macro get_irqnr_preamble, base, tmp | ||
23 | mrc p15, 0, \tmp, c15, c1, 0 | ||
24 | orr \tmp, \tmp, #(1 << 6) | ||
25 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access | ||
26 | .endm | ||
27 | |||
22 | /* | 28 | /* |
23 | * Note: a 1-cycle window exists where iintvec will return the value | 29 | * Note: a 1-cycle window exists where iintvec will return the value |
24 | * of iintbase, so we explicitly check for "bad zeros" | 30 | * of iintbase, so we explicitly check for "bad zeros" |
25 | */ | 31 | */ |
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 32 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
27 | mrc p15, 0, \tmp, c15, c1, 0 | ||
28 | orr \tmp, \tmp, #(1 << 6) | ||
29 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access | ||
30 | |||
31 | mrc p6, 0, \irqnr, c3, c2, 0 @ Read IINTVEC | 33 | mrc p6, 0, \irqnr, c3, c2, 0 @ Read IINTVEC |
32 | cmp \irqnr, #0 | 34 | cmp \irqnr, #0 |
33 | mrceq p6, 0, \irqnr, c3, c2, 0 @ Re-read on potentially bad zero | 35 | mrceq p6, 0, \irqnr, c3, c2, 0 @ Re-read on potentially bad zero |
34 | adds \irqstat, \irqnr, #1 @ Check for 0xffffffff | 36 | adds \irqstat, \irqnr, #1 @ Check for 0xffffffff |
35 | movne \irqnr, \irqnr, lsr #2 @ Convert to irqnr | 37 | movne \irqnr, \irqnr, lsr #2 @ Convert to irqnr |
38 | .endm | ||
36 | 39 | ||
37 | biceq \tmp, \tmp, #(1 << 6) | 40 | .macro arch_ret_to_user, tmp1, tmp2 |
38 | mcreq p15, 0, \tmp, c15, c1, 0 @ Disable cp6 access if no more interrupts | 41 | mrc p15, 0, \tmp1, c15, c1, 0 |
42 | ands \tmp2, \tmp1, #(1 << 6) | ||
43 | bicne \tmp1, \tmp1, #(1 << 6) | ||
44 | mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access | ||
39 | .endm | 45 | .endm |
diff --git a/include/asm-arm/arch-iop13xx/iop13xx.h b/include/asm-arm/arch-iop13xx/iop13xx.h index a88522a0ff8e..d26b755a9879 100644 --- a/include/asm-arm/arch-iop13xx/iop13xx.h +++ b/include/asm-arm/arch-iop13xx/iop13xx.h | |||
@@ -9,34 +9,6 @@ void iop13xx_init_irq(void); | |||
9 | void iop13xx_map_io(void); | 9 | void iop13xx_map_io(void); |
10 | void iop13xx_platform_init(void); | 10 | void iop13xx_platform_init(void); |
11 | void iop13xx_init_irq(void); | 11 | void iop13xx_init_irq(void); |
12 | void iop13xx_init_time(unsigned long tickrate); | ||
13 | unsigned long iop13xx_gettimeoffset(void); | ||
14 | |||
15 | /* handle cp6 access | ||
16 | * to do: handle access in entry-armv5.S and unify with | ||
17 | * the iop3xx implementation | ||
18 | * note: use iop13xx_cp6_enable_irq_save and iop13xx_cp6_irq_restore (irq.h) | ||
19 | * when interrupts are enabled | ||
20 | */ | ||
21 | static inline unsigned long iop13xx_cp6_save(void) | ||
22 | { | ||
23 | u32 temp, cp_flags; | ||
24 | |||
25 | asm volatile ( | ||
26 | "mrc p15, 0, %1, c15, c1, 0\n\t" | ||
27 | "orr %0, %1, #(1 << 6)\n\t" | ||
28 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
29 | : "=r" (temp), "=r"(cp_flags)); | ||
30 | |||
31 | return cp_flags; | ||
32 | } | ||
33 | |||
34 | static inline void iop13xx_cp6_restore(unsigned long cp_flags) | ||
35 | { | ||
36 | asm volatile ( | ||
37 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
38 | : : "r" (cp_flags) ); | ||
39 | } | ||
40 | 12 | ||
41 | /* CPUID CP6 R0 Page 0 */ | 13 | /* CPUID CP6 R0 Page 0 */ |
42 | static inline int iop13xx_cpu_id(void) | 14 | static inline int iop13xx_cpu_id(void) |
@@ -479,14 +451,4 @@ static inline int iop13xx_cpu_id(void) | |||
479 | #define IOP13XX_PBI_BAR1 IOP13XX_PBI_OFFSET(0x10) | 451 | #define IOP13XX_PBI_BAR1 IOP13XX_PBI_OFFSET(0x10) |
480 | #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) | 452 | #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) |
481 | 453 | ||
482 | #define IOP13XX_TMR_TC 0x01 | ||
483 | #define IOP13XX_TMR_EN 0x02 | ||
484 | #define IOP13XX_TMR_RELOAD 0x04 | ||
485 | #define IOP13XX_TMR_PRIVILEGED 0x08 | ||
486 | |||
487 | #define IOP13XX_TMR_RATIO_1_1 0x00 | ||
488 | #define IOP13XX_TMR_RATIO_4_1 0x10 | ||
489 | #define IOP13XX_TMR_RATIO_8_1 0x20 | ||
490 | #define IOP13XX_TMR_RATIO_16_1 0x30 | ||
491 | |||
492 | #endif /* _IOP13XX_HW_H_ */ | 454 | #endif /* _IOP13XX_HW_H_ */ |
diff --git a/include/asm-arm/arch-iop13xx/irqs.h b/include/asm-arm/arch-iop13xx/irqs.h index 442e35a40359..5c6fac2a4004 100644 --- a/include/asm-arm/arch-iop13xx/irqs.h +++ b/include/asm-arm/arch-iop13xx/irqs.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLER__ | 4 | #ifndef __ASSEMBLER__ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <asm/system.h> /* local_irq_save */ | ||
7 | #include <asm/arch/iop13xx.h> /* iop13xx_cp6_* */ | ||
8 | 6 | ||
9 | /* INTPND0 CP6 R0 Page 3 | 7 | /* INTPND0 CP6 R0 Page 3 |
10 | */ | 8 | */ |
@@ -41,21 +39,6 @@ static inline u32 read_intpnd_3(void) | |||
41 | asm volatile("mrc p6, 0, %0, c3, c3, 0":"=r" (val)); | 39 | asm volatile("mrc p6, 0, %0, c3, c3, 0":"=r" (val)); |
42 | return val; | 40 | return val; |
43 | } | 41 | } |
44 | |||
45 | static inline void | ||
46 | iop13xx_cp6_enable_irq_save(unsigned long *cp_flags, unsigned long *irq_flags) | ||
47 | { | ||
48 | local_irq_save(*irq_flags); | ||
49 | *cp_flags = iop13xx_cp6_save(); | ||
50 | } | ||
51 | |||
52 | static inline void | ||
53 | iop13xx_cp6_irq_restore(unsigned long *cp_flags, | ||
54 | unsigned long *irq_flags) | ||
55 | { | ||
56 | iop13xx_cp6_restore(*cp_flags); | ||
57 | local_irq_restore(*irq_flags); | ||
58 | } | ||
59 | #endif | 42 | #endif |
60 | 43 | ||
61 | #define INTBASE 0 | 44 | #define INTBASE 0 |
diff --git a/include/asm-arm/arch-iop13xx/system.h b/include/asm-arm/arch-iop13xx/system.h index ee3a62530af2..127827058e1f 100644 --- a/include/asm-arm/arch-iop13xx/system.h +++ b/include/asm-arm/arch-iop13xx/system.h | |||
@@ -48,12 +48,10 @@ static inline void arch_reset(char mode) | |||
48 | /* | 48 | /* |
49 | * Reset the internal bus (warning both cores are reset) | 49 | * Reset the internal bus (warning both cores are reset) |
50 | */ | 50 | */ |
51 | u32 cp_flags = iop13xx_cp6_save(); | ||
52 | write_wdtcr(IOP13XX_WDTCR_EN_ARM); | 51 | write_wdtcr(IOP13XX_WDTCR_EN_ARM); |
53 | write_wdtcr(IOP13XX_WDTCR_EN); | 52 | write_wdtcr(IOP13XX_WDTCR_EN); |
54 | write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); | 53 | write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); |
55 | write_wdtcr(0x1000); | 54 | write_wdtcr(0x1000); |
56 | iop13xx_cp6_restore(cp_flags); | ||
57 | 55 | ||
58 | for(;;); | 56 | for(;;); |
59 | } | 57 | } |
diff --git a/include/asm-arm/arch-iop13xx/time.h b/include/asm-arm/arch-iop13xx/time.h new file mode 100644 index 000000000000..77a837a02dec --- /dev/null +++ b/include/asm-arm/arch-iop13xx/time.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef _IOP13XX_TIME_H_ | ||
2 | #define _IOP13XX_TIME_H_ | ||
3 | #define IRQ_IOP_TIMER0 IRQ_IOP13XX_TIMER0 | ||
4 | |||
5 | #define IOP_TMR_EN 0x02 | ||
6 | #define IOP_TMR_RELOAD 0x04 | ||
7 | #define IOP_TMR_PRIVILEGED 0x08 | ||
8 | #define IOP_TMR_RATIO_1_1 0x00 | ||
9 | |||
10 | void iop_init_time(unsigned long tickrate); | ||
11 | unsigned long iop_gettimeoffset(void); | ||
12 | |||
13 | static inline void write_tmr0(u32 val) | ||
14 | { | ||
15 | asm volatile("mcr p6, 0, %0, c0, c9, 0" : : "r" (val)); | ||
16 | } | ||
17 | |||
18 | static inline void write_tmr1(u32 val) | ||
19 | { | ||
20 | asm volatile("mcr p6, 0, %0, c1, c9, 0" : : "r" (val)); | ||
21 | } | ||
22 | |||
23 | static inline u32 read_tcr0(void) | ||
24 | { | ||
25 | u32 val; | ||
26 | asm volatile("mrc p6, 0, %0, c2, c9, 0" : "=r" (val)); | ||
27 | return val; | ||
28 | } | ||
29 | |||
30 | static inline u32 read_tcr1(void) | ||
31 | { | ||
32 | u32 val; | ||
33 | asm volatile("mrc p6, 0, %0, c3, c9, 0" : "=r" (val)); | ||
34 | return val; | ||
35 | } | ||
36 | |||
37 | static inline void write_trr0(u32 val) | ||
38 | { | ||
39 | asm volatile("mcr p6, 0, %0, c4, c9, 0" : : "r" (val)); | ||
40 | } | ||
41 | |||
42 | static inline void write_trr1(u32 val) | ||
43 | { | ||
44 | asm volatile("mcr p6, 0, %0, c5, c9, 0" : : "r" (val)); | ||
45 | } | ||
46 | |||
47 | static inline void write_tisr(u32 val) | ||
48 | { | ||
49 | asm volatile("mcr p6, 0, %0, c6, c9, 0" : : "r" (val)); | ||
50 | } | ||
51 | #endif | ||
diff --git a/include/asm-arm/arch-iop32x/entry-macro.S b/include/asm-arm/arch-iop32x/entry-macro.S index 1500cbbd2295..207db99dfbd2 100644 --- a/include/asm-arm/arch-iop32x/entry-macro.S +++ b/include/asm-arm/arch-iop32x/entry-macro.S | |||
@@ -9,13 +9,28 @@ | |||
9 | */ | 9 | */ |
10 | #include <asm/arch/iop32x.h> | 10 | #include <asm/arch/iop32x.h> |
11 | 11 | ||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | 14 | ||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 15 | .macro get_irqnr_preamble, base, tmp |
16 | ldr \base, =IOP3XX_REG_ADDR(0x07D8) | 16 | mrc p15, 0, \tmp, c15, c1, 0 |
17 | ldr \irqstat, [\base] @ Read IINTSRC | 17 | orr \tmp, \tmp, #(1 << 6) |
18 | cmp \irqstat, #0 | 18 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access |
19 | clzne \irqnr, \irqstat | 19 | mrc p15, 0, \tmp, c15, c1, 0 |
20 | rsbne \irqnr, \irqnr, #31 | 20 | mov \tmp, \tmp |
21 | .endm | 21 | sub pc, pc, #4 @ cp_wait |
22 | .endm | ||
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
25 | mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC | ||
26 | cmp \irqstat, #0 | ||
27 | clzne \irqnr, \irqstat | ||
28 | rsbne \irqnr, \irqnr, #31 | ||
29 | .endm | ||
30 | |||
31 | .macro arch_ret_to_user, tmp1, tmp2 | ||
32 | mrc p15, 0, \tmp1, c15, c1, 0 | ||
33 | ands \tmp2, \tmp1, #(1 << 6) | ||
34 | bicne \tmp1, \tmp1, #(1 << 6) | ||
35 | mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access | ||
36 | .endm | ||
diff --git a/include/asm-arm/arch-iop32x/time.h b/include/asm-arm/arch-iop32x/time.h new file mode 100644 index 000000000000..0f28c9949623 --- /dev/null +++ b/include/asm-arm/arch-iop32x/time.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _IOP32X_TIME_H_ | ||
2 | #define _IOP32X_TIME_H_ | ||
3 | #define IRQ_IOP_TIMER0 IRQ_IOP32X_TIMER0 | ||
4 | #endif | ||
diff --git a/include/asm-arm/arch-iop33x/entry-macro.S b/include/asm-arm/arch-iop33x/entry-macro.S index 92b791702e34..b8e3d449e882 100644 --- a/include/asm-arm/arch-iop33x/entry-macro.S +++ b/include/asm-arm/arch-iop33x/entry-macro.S | |||
@@ -9,14 +9,29 @@ | |||
9 | */ | 9 | */ |
10 | #include <asm/arch/iop33x.h> | 10 | #include <asm/arch/iop33x.h> |
11 | 11 | ||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | 14 | ||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 15 | .macro get_irqnr_preamble, base, tmp |
16 | ldr \base, =IOP3XX_REG_ADDR(0x07C8) | 16 | mrc p15, 0, \tmp, c15, c1, 0 |
17 | ldr \irqstat, [\base] @ Read IINTVEC | 17 | orr \tmp, \tmp, #(1 << 6) |
18 | cmp \irqstat, #0 | 18 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access |
19 | ldreq \irqstat, [\base] @ erratum 63 workaround | 19 | mrc p15, 0, \tmp, c15, c1, 0 |
20 | adds \irqnr, \irqstat, #1 | 20 | mov \tmp, \tmp |
21 | movne \irqnr, \irqstat, lsr #2 | 21 | sub pc, pc, #4 @ cp_wait |
22 | .endm | 22 | .endm |
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
25 | mrc p6, 0, \irqstat, c14, c0, 0 @ Read IINTVEC | ||
26 | cmp \irqstat, #0 | ||
27 | mrceq p6, 0, \irqstat, c14, c0, 0 @ erratum 63 workaround | ||
28 | adds \irqnr, \irqstat, #1 | ||
29 | movne \irqnr, \irqstat, lsr #2 | ||
30 | .endm | ||
31 | |||
32 | .macro arch_ret_to_user, tmp1, tmp2 | ||
33 | mrc p15, 0, \tmp1, c15, c1, 0 | ||
34 | ands \tmp2, \tmp1, #(1 << 6) | ||
35 | bicne \tmp1, \tmp1, #(1 << 6) | ||
36 | mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access | ||
37 | .endm | ||
diff --git a/include/asm-arm/arch-iop33x/time.h b/include/asm-arm/arch-iop33x/time.h new file mode 100644 index 000000000000..4ac4d7664f85 --- /dev/null +++ b/include/asm-arm/arch-iop33x/time.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _IOP33X_TIME_H_ | ||
2 | #define _IOP33X_TIME_H_ | ||
3 | #define IRQ_IOP_TIMER0 IRQ_IOP33X_TIMER0 | ||
4 | #endif | ||
diff --git a/include/asm-arm/arch-ixp2000/entry-macro.S b/include/asm-arm/arch-ixp2000/entry-macro.S index 16e1e6124b31..11d512ad5945 100644 --- a/include/asm-arm/arch-ixp2000/entry-macro.S +++ b/include/asm-arm/arch-ixp2000/entry-macro.S | |||
@@ -12,6 +12,12 @@ | |||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | 14 | ||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
16 | 22 | ||
17 | mov \irqnr, #0x0 @clear out irqnr as default | 23 | mov \irqnr, #0x0 @clear out irqnr as default |
diff --git a/include/asm-arm/arch-ixp23xx/entry-macro.S b/include/asm-arm/arch-ixp23xx/entry-macro.S index 867761677b57..ec9dd6fc2d0f 100644 --- a/include/asm-arm/arch-ixp23xx/entry-macro.S +++ b/include/asm-arm/arch-ixp23xx/entry-macro.S | |||
@@ -5,6 +5,12 @@ | |||
5 | .macro disable_fiq | 5 | .macro disable_fiq |
6 | .endm | 6 | .endm |
7 | 7 | ||
8 | .macro get_irqnr_preamble, base, tmp | ||
9 | .endm | ||
10 | |||
11 | .macro arch_ret_to_user, tmp1, tmp2 | ||
12 | .endm | ||
13 | |||
8 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
9 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) | 15 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) |
10 | ldr \irqnr, [\irqnr] @ get interrupt number | 16 | ldr \irqnr, [\irqnr] @ get interrupt number |
diff --git a/include/asm-arm/arch-ixp23xx/ixdp2351.h b/include/asm-arm/arch-ixp23xx/ixdp2351.h index 4a24f8f15655..d5e8a43d7bbd 100644 --- a/include/asm-arm/arch-ixp23xx/ixdp2351.h +++ b/include/asm-arm/arch-ixp23xx/ixdp2351.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0) | 46 | #define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0) |
47 | #define IXDP2351_NVRAM_SIZE (0x20000) | 47 | #define IXDP2351_NVRAM_SIZE (0x20000) |
48 | 48 | ||
49 | #define IXDP2351_VIRT_MB_IXF1104_BASE IXDP3251_BB_AREA_BASE(0x00020000) | 49 | #define IXDP2351_VIRT_MB_IXF1104_BASE IXDP2351_BB_AREA_BASE(0x00020000) |
50 | #define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0) | 50 | #define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0) |
51 | #define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000) | 51 | #define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000) |
52 | #define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000) | 52 | #define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000) |
diff --git a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S index 27e124132e4c..dadb568b7ef0 100644 --- a/include/asm-arm/arch-ixp4xx/entry-macro.S +++ b/include/asm-arm/arch-ixp4xx/entry-macro.S | |||
@@ -12,6 +12,12 @@ | |||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | 14 | ||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
16 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) | 22 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) |
17 | ldr \irqstat, [\irqstat] @ get interrupts | 23 | ldr \irqstat, [\irqstat] @ get interrupts |
diff --git a/include/asm-arm/arch-l7200/entry-macro.S b/include/asm-arm/arch-l7200/entry-macro.S index 8b6342dc4be2..63411d3e9df4 100644 --- a/include/asm-arm/arch-l7200/entry-macro.S +++ b/include/asm-arm/arch-l7200/entry-macro.S | |||
@@ -14,6 +14,12 @@ | |||
14 | .macro disable_fiq | 14 | .macro disable_fiq |
15 | .endm | 15 | .endm |
16 | 16 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
18 | mov \irqstat, #irq_base_addr @ Virt addr IRQ regs | 24 | mov \irqstat, #irq_base_addr @ Virt addr IRQ regs |
19 | add \irqstat, \irqstat, #0x00001000 @ Status reg | 25 | add \irqstat, \irqstat, #0x00001000 @ Status reg |
diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S index 9fc7f4988124..502700604e00 100644 --- a/include/asm-arm/arch-lh7a40x/entry-macro.S +++ b/include/asm-arm/arch-lh7a40x/entry-macro.S | |||
@@ -26,6 +26,12 @@ | |||
26 | .macro disable_fiq | 26 | .macro disable_fiq |
27 | .endm | 27 | .endm |
28 | 28 | ||
29 | .macro get_irqnr_preamble, base, tmp | ||
30 | .endm | ||
31 | |||
32 | .macro arch_ret_to_user, tmp1, tmp2 | ||
33 | .endm | ||
34 | |||
29 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 35 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
30 | 36 | ||
31 | branch_irq_lh7a400: b 1000f | 37 | branch_irq_lh7a400: b 1000f |
diff --git a/include/asm-arm/arch-netx/entry-macro.S b/include/asm-arm/arch-netx/entry-macro.S index 658df4d60ff3..83ad188a0847 100644 --- a/include/asm-arm/arch-netx/entry-macro.S +++ b/include/asm-arm/arch-netx/entry-macro.S | |||
@@ -23,6 +23,12 @@ | |||
23 | .macro disable_fiq | 23 | .macro disable_fiq |
24 | .endm | 24 | .endm |
25 | 25 | ||
26 | .macro get_irqnr_preamble, base, tmp | ||
27 | .endm | ||
28 | |||
29 | .macro arch_ret_to_user, tmp1, tmp2 | ||
30 | .endm | ||
31 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 32 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
27 | mov \base, #io_p2v(0x00100000) | 33 | mov \base, #io_p2v(0x00100000) |
28 | add \base, \base, #0x000ff000 | 34 | add \base, \base, #0x000ff000 |
diff --git a/include/asm-arm/arch-ns9xxx/entry-macro.S b/include/asm-arm/arch-ns9xxx/entry-macro.S index 467a1986d259..86aec87303e4 100644 --- a/include/asm-arm/arch-ns9xxx/entry-macro.S +++ b/include/asm-arm/arch-ns9xxx/entry-macro.S | |||
@@ -11,6 +11,12 @@ | |||
11 | #include <asm/hardware.h> | 11 | #include <asm/hardware.h> |
12 | #include <asm/arch-ns9xxx/regs-sys.h> | 12 | #include <asm/arch-ns9xxx/regs-sys.h> |
13 | 13 | ||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
19 | |||
14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
15 | ldr \base, =SYS_ISRADDR | 21 | ldr \base, =SYS_ISRADDR |
16 | ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)] | 22 | ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)] |
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S index 0ffb1185f1ac..f6967c8df323 100644 --- a/include/asm-arm/arch-omap/entry-macro.S +++ b/include/asm-arm/arch-omap/entry-macro.S | |||
@@ -29,6 +29,12 @@ | |||
29 | .macro disable_fiq | 29 | .macro disable_fiq |
30 | .endm | 30 | .endm |
31 | 31 | ||
32 | .macro get_irqnr_preamble, base, tmp | ||
33 | .endm | ||
34 | |||
35 | .macro arch_ret_to_user, tmp1, tmp2 | ||
36 | .endm | ||
37 | |||
32 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 38 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
33 | ldr \base, =IO_ADDRESS(OMAP_IH1_BASE) | 39 | ldr \base, =IO_ADDRESS(OMAP_IH1_BASE) |
34 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] | 40 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] |
@@ -55,6 +61,12 @@ | |||
55 | .macro disable_fiq | 61 | .macro disable_fiq |
56 | .endm | 62 | .endm |
57 | 63 | ||
64 | .macro get_irqnr_preamble, base, tmp | ||
65 | .endm | ||
66 | |||
67 | .macro arch_ret_to_user, tmp1, tmp2 | ||
68 | .endm | ||
69 | |||
58 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 70 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
59 | ldr \base, =VA_IC_BASE | 71 | ldr \base, =VA_IC_BASE |
60 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | 72 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ |
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h index df50dd53e1dd..48fabc493163 100644 --- a/include/asm-arm/arch-omap/memory.h +++ b/include/asm-arm/arch-omap/memory.h | |||
@@ -70,7 +70,7 @@ | |||
70 | 70 | ||
71 | #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) | 71 | #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) |
72 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) | 72 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) |
73 | #define is_lbus_device(dev) (cpu_is_omap1510() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) | 73 | #define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) |
74 | 74 | ||
75 | #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ | 75 | #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ |
76 | (dma_addr_t)virt_to_lbus(page_address(page)) : \ | 76 | (dma_addr_t)virt_to_lbus(page_address(page)) : \ |
diff --git a/include/asm-arm/arch-omap/omap-alsa.h b/include/asm-arm/arch-omap/omap-alsa.h index df4695474e3d..fcaf44c14714 100644 --- a/include/asm-arm/arch-omap/omap-alsa.h +++ b/include/asm-arm/arch-omap/omap-alsa.h | |||
@@ -65,7 +65,7 @@ struct audio_stream { | |||
65 | int period; /* current transfer period */ | 65 | int period; /* current transfer period */ |
66 | int periods; /* current count of periods registerd in the DMA engine */ | 66 | int periods; /* current count of periods registerd in the DMA engine */ |
67 | spinlock_t dma_lock; /* for locking in DMA operations */ | 67 | spinlock_t dma_lock; /* for locking in DMA operations */ |
68 | snd_pcm_substream_t *stream; /* the pcm stream */ | 68 | struct snd_pcm_substream *stream; /* the pcm stream */ |
69 | unsigned linked:1; /* dma channels linked */ | 69 | unsigned linked:1; /* dma channels linked */ |
70 | int offset; /* store start position of the last period in the alsa buffer */ | 70 | int offset; /* store start position of the last period in the alsa buffer */ |
71 | int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */ | 71 | int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */ |
@@ -76,8 +76,8 @@ struct audio_stream { | |||
76 | * Alsa card structure for aic23 | 76 | * Alsa card structure for aic23 |
77 | */ | 77 | */ |
78 | struct snd_card_omap_codec { | 78 | struct snd_card_omap_codec { |
79 | snd_card_t *card; | 79 | struct snd_card *card; |
80 | snd_pcm_t *pcm; | 80 | struct snd_pcm *pcm; |
81 | long samplerate; | 81 | long samplerate; |
82 | struct audio_stream s[2]; /* playback & capture */ | 82 | struct audio_stream s[2]; /* playback & capture */ |
83 | }; | 83 | }; |
@@ -89,9 +89,9 @@ struct snd_card_omap_codec { | |||
89 | struct omap_alsa_codec_config { | 89 | struct omap_alsa_codec_config { |
90 | char *name; | 90 | char *name; |
91 | struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa; | 91 | struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa; |
92 | snd_pcm_hw_constraint_list_t *hw_constraints_rates; | 92 | struct snd_pcm_hw_constraint_list *hw_constraints_rates; |
93 | snd_pcm_hardware_t *snd_omap_alsa_playback; | 93 | struct snd_pcm_hardware *snd_omap_alsa_playback; |
94 | snd_pcm_hardware_t *snd_omap_alsa_capture; | 94 | struct snd_pcm_hardware *snd_omap_alsa_capture; |
95 | void (*codec_configure_dev)(void); | 95 | void (*codec_configure_dev)(void); |
96 | void (*codec_set_samplerate)(long); | 96 | void (*codec_set_samplerate)(long); |
97 | void (*codec_clock_setup)(void); | 97 | void (*codec_clock_setup)(void); |
diff --git a/include/asm-arm/arch-pnx4008/entry-macro.S b/include/asm-arm/arch-pnx4008/entry-macro.S index c1c198e3680b..f11731974e5d 100644 --- a/include/asm-arm/arch-pnx4008/entry-macro.S +++ b/include/asm-arm/arch-pnx4008/entry-macro.S | |||
@@ -28,6 +28,12 @@ | |||
28 | .macro disable_fiq | 28 | .macro disable_fiq |
29 | .endm | 29 | .endm |
30 | 30 | ||
31 | .macro get_irqnr_preamble, base, tmp | ||
32 | .endm | ||
33 | |||
34 | .macro arch_ret_to_user, tmp1, tmp2 | ||
35 | .endm | ||
36 | |||
31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 37 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
32 | /* decode the MIC interrupt numbers */ | 38 | /* decode the MIC interrupt numbers */ |
33 | ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) | 39 | ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) |
diff --git a/include/asm-arm/arch-pxa/entry-macro.S b/include/asm-arm/arch-pxa/entry-macro.S index 4985e33afc12..1d5fbb9b379a 100644 --- a/include/asm-arm/arch-pxa/entry-macro.S +++ b/include/asm-arm/arch-pxa/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
17 | #ifdef CONFIG_PXA27x | 23 | #ifdef CONFIG_PXA27x |
18 | mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP | 24 | mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP |
diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h index e67c23821017..3d348a351157 100644 --- a/include/asm-arm/arch-pxa/gpio.h +++ b/include/asm-arm/arch-pxa/gpio.h | |||
@@ -25,10 +25,8 @@ | |||
25 | #define __ASM_ARCH_PXA_GPIO_H | 25 | #define __ASM_ARCH_PXA_GPIO_H |
26 | 26 | ||
27 | #include <asm/arch/pxa-regs.h> | 27 | #include <asm/arch/pxa-regs.h> |
28 | #include <asm/arch/irqs.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/arch/hardware.h> | 29 | #include <asm/hardware.h> |
30 | |||
31 | #include <asm/errno.h> | ||
32 | 30 | ||
33 | static inline int gpio_request(unsigned gpio, const char *label) | 31 | static inline int gpio_request(unsigned gpio, const char *label) |
34 | { | 32 | { |
@@ -42,26 +40,36 @@ static inline void gpio_free(unsigned gpio) | |||
42 | 40 | ||
43 | static inline int gpio_direction_input(unsigned gpio) | 41 | static inline int gpio_direction_input(unsigned gpio) |
44 | { | 42 | { |
45 | if (gpio > PXA_LAST_GPIO) | 43 | return pxa_gpio_mode(gpio | GPIO_IN); |
46 | return -EINVAL; | ||
47 | pxa_gpio_mode(gpio | GPIO_IN); | ||
48 | } | 44 | } |
49 | 45 | ||
50 | static inline int gpio_direction_output(unsigned gpio) | 46 | static inline int gpio_direction_output(unsigned gpio) |
51 | { | 47 | { |
52 | if (gpio > PXA_LAST_GPIO) | 48 | return pxa_gpio_mode(gpio | GPIO_OUT); |
53 | return -EINVAL; | ||
54 | pxa_gpio_mode(gpio | GPIO_OUT); | ||
55 | } | 49 | } |
56 | 50 | ||
57 | /* REVISIT these macros are correct, but suffer code explosion | 51 | static inline int __gpio_get_value(unsigned gpio) |
58 | * for non-constant parameters. Provide out-line versions too. | 52 | { |
59 | */ | 53 | return GPLR(gpio) & GPIO_bit(gpio); |
60 | #define gpio_get_value(gpio) \ | 54 | } |
61 | (GPLR(gpio) & GPIO_bit(gpio)) | 55 | |
56 | #define gpio_get_value(gpio) \ | ||
57 | (__builtin_constant_p(gpio) ? \ | ||
58 | __gpio_get_value(gpio) : \ | ||
59 | pxa_gpio_get_value(gpio)) | ||
60 | |||
61 | static inline void __gpio_set_value(unsigned gpio, int value) | ||
62 | { | ||
63 | if (value) | ||
64 | GPSR(gpio) = GPIO_bit(gpio); | ||
65 | else | ||
66 | GPCR(gpio) = GPIO_bit(gpio); | ||
67 | } | ||
62 | 68 | ||
63 | #define gpio_set_value(gpio,value) \ | 69 | #define gpio_set_value(gpio,value) \ |
64 | ((value) ? (GPSR(gpio) = GPIO_bit(gpio)):(GPCR(gpio) = GPIO_bit(gpio))) | 70 | (__builtin_constant_p(gpio) ? \ |
71 | __gpio_set_value(gpio, value) : \ | ||
72 | pxa_gpio_set_value(gpio, value)) | ||
65 | 73 | ||
66 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 74 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
67 | 75 | ||
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index 3e70bd95472c..e2bdc2fbede1 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h | |||
@@ -65,7 +65,17 @@ | |||
65 | /* | 65 | /* |
66 | * Handy routine to set GPIO alternate functions | 66 | * Handy routine to set GPIO alternate functions |
67 | */ | 67 | */ |
68 | extern void pxa_gpio_mode( int gpio_mode ); | 68 | extern int pxa_gpio_mode( int gpio_mode ); |
69 | |||
70 | /* | ||
71 | * Return GPIO level, nonzero means high, zero is low | ||
72 | */ | ||
73 | extern int pxa_gpio_get_value(unsigned gpio); | ||
74 | |||
75 | /* | ||
76 | * Set output GPIO level | ||
77 | */ | ||
78 | extern void pxa_gpio_set_value(unsigned gpio, int value); | ||
69 | 79 | ||
70 | /* | 80 | /* |
71 | * Routine to enable or disable CKEN | 81 | * Routine to enable or disable CKEN |
diff --git a/include/asm-arm/arch-realview/entry-macro.S b/include/asm-arm/arch-realview/entry-macro.S index 1a6eec86bd47..138838d4ad75 100644 --- a/include/asm-arm/arch-realview/entry-macro.S +++ b/include/asm-arm/arch-realview/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | /* | 22 | /* |
17 | * The interrupt numbering scheme is defined in the | 23 | * The interrupt numbering scheme is defined in the |
18 | * interrupt controller spec. To wit: | 24 | * interrupt controller spec. To wit: |
diff --git a/include/asm-arm/arch-rpc/entry-macro.S b/include/asm-arm/arch-rpc/entry-macro.S index c9e5395e5106..0cfb89b229d1 100644 --- a/include/asm-arm/arch-rpc/entry-macro.S +++ b/include/asm-arm/arch-rpc/entry-macro.S | |||
@@ -1,3 +1,8 @@ | |||
1 | #include <asm/hardware.h> | 1 | #include <asm/hardware.h> |
2 | #include <asm/hardware/entry-macro-iomd.S> | 2 | #include <asm/hardware/entry-macro-iomd.S> |
3 | .macro get_irqnr_preamble, base, tmp | ||
4 | .endm | ||
5 | |||
6 | .macro arch_ret_to_user, tmp1, tmp2 | ||
7 | .endm | ||
3 | 8 | ||
diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 65e0acffa1ad..0a6977fb5770 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h | |||
@@ -31,9 +31,9 @@ struct s3c24xx_iis_ops { | |||
31 | int (*suspend)(struct s3c24xx_iis_ops *me); | 31 | int (*suspend)(struct s3c24xx_iis_ops *me); |
32 | int (*resume)(struct s3c24xx_iis_ops *me); | 32 | int (*resume)(struct s3c24xx_iis_ops *me); |
33 | 33 | ||
34 | int (*open)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm); | 34 | int (*open)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm); |
35 | int (*close)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm); | 35 | int (*close)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm); |
36 | int (*prepare)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm, snd_pcm_runtime_t *rt); | 36 | int (*prepare)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm, struct snd_pcm_runtime *rt); |
37 | }; | 37 | }; |
38 | 38 | ||
39 | struct s3c24xx_platdata_iis { | 39 | struct s3c24xx_platdata_iis { |
diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S index 1eb4e6b8d249..bbec0a8ff158 100644 --- a/include/asm-arm/arch-s3c2410/entry-macro.S +++ b/include/asm-arm/arch-s3c2410/entry-macro.S | |||
@@ -22,6 +22,12 @@ | |||
22 | #include <asm/hardware.h> | 22 | #include <asm/hardware.h> |
23 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
24 | 24 | ||
25 | .macro get_irqnr_preamble, base, tmp | ||
26 | .endm | ||
27 | |||
28 | .macro arch_ret_to_user, tmp1, tmp2 | ||
29 | .endm | ||
30 | |||
25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
26 | 32 | ||
27 | mov \base, #S3C24XX_VA_IRQ | 33 | mov \base, #S3C24XX_VA_IRQ |
diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h index 67b8b9ab22e9..d47ae453f8ca 100644 --- a/include/asm-arm/arch-s3c2410/gpio.h +++ b/include/asm-arm/arch-s3c2410/gpio.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-pxa/gpio.h | 2 | * linux/include/asm-arm/arch-s3c2410/gpio.h |
3 | * | 3 | * |
4 | * S3C2400 GPIO wrappers for arch-neutral GPIO calls | 4 | * S3C2410 GPIO wrappers for arch-neutral GPIO calls |
5 | * | 5 | * |
6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | 6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> |
7 | * | 7 | * |
@@ -21,14 +21,12 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef __ASM_ARCH_PXA_GPIO_H | 24 | #ifndef __ASM_ARCH_S3C2410_GPIO_H |
25 | #define __ASM_ARCH_PXA_GPIO_H | 25 | #define __ASM_ARCH_S3C2410_GPIO_H |
26 | 26 | ||
27 | #include <asm/arch/pxa-regs.h> | 27 | #include <asm/irq.h> |
28 | #include <asm/arch/irqs.h> | 28 | #include <asm/hardware.h> |
29 | #include <asm/arch/hardware.h> | 29 | #include <asm/arch/regs-gpio.h> |
30 | |||
31 | #include <asm/errno.h> | ||
32 | 30 | ||
33 | static inline int gpio_request(unsigned gpio, const char *label) | 31 | static inline int gpio_request(unsigned gpio, const char *label) |
34 | { | 32 | { |
@@ -57,8 +55,11 @@ static inline int gpio_direction_output(unsigned gpio) | |||
57 | 55 | ||
58 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 56 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
59 | 57 | ||
60 | /* FIXME or maybe s3c2400_gpio_getirq() ... */ | 58 | #ifdef CONFIG_CPU_S3C2400 |
59 | #define gpio_to_irq(gpio) s3c2400_gpio_getirq(gpio) | ||
60 | #else | ||
61 | #define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio) | 61 | #define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio) |
62 | #endif | ||
62 | 63 | ||
63 | /* FIXME implement irq_to_gpio() */ | 64 | /* FIXME implement irq_to_gpio() */ |
64 | 65 | ||
diff --git a/include/asm-arm/arch-sa1100/entry-macro.S b/include/asm-arm/arch-sa1100/entry-macro.S index 51fb50ce1169..028967629340 100644 --- a/include/asm-arm/arch-sa1100/entry-macro.S +++ b/include/asm-arm/arch-sa1100/entry-macro.S | |||
@@ -11,6 +11,12 @@ | |||
11 | .macro disable_fiq | 11 | .macro disable_fiq |
12 | .endm | 12 | .endm |
13 | 13 | ||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
19 | |||
14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
15 | mov r4, #0xfa000000 @ ICIP = 0xfa050000 | 21 | mov r4, #0xfa000000 @ ICIP = 0xfa050000 |
16 | add r4, r4, #0x00050000 | 22 | add r4, r4, #0x00050000 |
diff --git a/include/asm-arm/arch-sa1100/gpio.h b/include/asm-arm/arch-sa1100/gpio.h index a331fe3f6e48..da7575b0e5d0 100644 --- a/include/asm-arm/arch-sa1100/gpio.h +++ b/include/asm-arm/arch-sa1100/gpio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-pxa/gpio.h | 2 | * linux/include/asm-arm/arch-sa1100/gpio.h |
3 | * | 3 | * |
4 | * SA1100 GPIO wrappers for arch-neutral GPIO calls | 4 | * SA1100 GPIO wrappers for arch-neutral GPIO calls |
5 | * | 5 | * |
@@ -24,11 +24,8 @@ | |||
24 | #ifndef __ASM_ARCH_SA1100_GPIO_H | 24 | #ifndef __ASM_ARCH_SA1100_GPIO_H |
25 | #define __ASM_ARCH_SA1100_GPIO_H | 25 | #define __ASM_ARCH_SA1100_GPIO_H |
26 | 26 | ||
27 | #include <asm/arch/SA-1100.h> | 27 | #include <asm/hardware.h> |
28 | #include <asm/arch/irqs.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/arch/hardware.h> | ||
30 | |||
31 | #include <asm/errno.h> | ||
32 | 29 | ||
33 | static inline int gpio_request(unsigned gpio, const char *label) | 30 | static inline int gpio_request(unsigned gpio, const char *label) |
34 | { | 31 | { |
@@ -40,26 +37,23 @@ static inline void gpio_free(unsigned gpio) | |||
40 | return; | 37 | return; |
41 | } | 38 | } |
42 | 39 | ||
43 | static inline int gpio_direction_input(unsigned gpio) | 40 | extern int gpio_direction_input(unsigned gpio); |
41 | extern int gpio_direction_output(unsigned gpio); | ||
42 | |||
43 | |||
44 | static inline int gpio_get_value(unsigned gpio) | ||
44 | { | 45 | { |
45 | if (gpio > GPIO_MAX) | 46 | return GPLR & GPIO_GPIO(gpio); |
46 | return -EINVAL; | ||
47 | GPDR = (GPDR_In << gpio) 0 | ||
48 | } | 47 | } |
49 | 48 | ||
50 | static inline int gpio_direction_output(unsigned gpio) | 49 | static inline void gpio_set_value(unsigned gpio, int value) |
51 | { | 50 | { |
52 | if (gpio > GPIO_MAX) | 51 | if (value) |
53 | return -EINVAL; | 52 | GPSR = GPIO_GPIO(gpio); |
54 | GPDR = (GPDR_Out << gpio) 0 | 53 | else |
54 | GPCR = GPIO_GPIO(gpio); | ||
55 | } | 55 | } |
56 | 56 | ||
57 | #define gpio_get_value(gpio) \ | ||
58 | (GPLR & GPIO_GPIO(gpio)) | ||
59 | |||
60 | #define gpio_set_value(gpio,value) \ | ||
61 | ((value) ? (GPSR = GPIO_GPIO(gpio)) : (GPCR(gpio) = GPIO_GPIO(gpio))) | ||
62 | |||
63 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 57 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
64 | 58 | ||
65 | static inline unsigned gpio_to_irq(unsigned gpio) | 59 | static inline unsigned gpio_to_irq(unsigned gpio) |
diff --git a/include/asm-arm/arch-shark/entry-macro.S b/include/asm-arm/arch-shark/entry-macro.S index a924f27fb8d9..82463f30f3df 100644 --- a/include/asm-arm/arch-shark/entry-macro.S +++ b/include/asm-arm/arch-shark/entry-macro.S | |||
@@ -10,6 +10,12 @@ | |||
10 | .macro disable_fiq | 10 | .macro disable_fiq |
11 | .endm | 11 | .endm |
12 | 12 | ||
13 | .macro get_irqnr_preamble, base, tmp | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
13 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 19 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
14 | mov r4, #0xe0000000 | 20 | mov r4, #0xe0000000 |
15 | 21 | ||
diff --git a/include/asm-arm/arch-versatile/entry-macro.S b/include/asm-arm/arch-versatile/entry-macro.S index feff771c0a0a..0fae002637a0 100644 --- a/include/asm-arm/arch-versatile/entry-macro.S +++ b/include/asm-arm/arch-versatile/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
17 | ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE) | 23 | ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE) |
18 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | 24 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status |
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index c91b546e20ef..15141a9caca8 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h | |||
@@ -188,14 +188,10 @@ extern void gpio_line_set(int line, int value); | |||
188 | #define IOP3XX_TU_TRR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0014) | 188 | #define IOP3XX_TU_TRR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0014) |
189 | #define IOP3XX_TU_TISR (volatile u32 *)IOP3XX_TIMER_REG(0x0018) | 189 | #define IOP3XX_TU_TISR (volatile u32 *)IOP3XX_TIMER_REG(0x0018) |
190 | #define IOP3XX_TU_WDTCR (volatile u32 *)IOP3XX_TIMER_REG(0x001c) | 190 | #define IOP3XX_TU_WDTCR (volatile u32 *)IOP3XX_TIMER_REG(0x001c) |
191 | #define IOP3XX_TMR_TC 0x01 | 191 | #define IOP_TMR_EN 0x02 |
192 | #define IOP3XX_TMR_EN 0x02 | 192 | #define IOP_TMR_RELOAD 0x04 |
193 | #define IOP3XX_TMR_RELOAD 0x04 | 193 | #define IOP_TMR_PRIVILEGED 0x08 |
194 | #define IOP3XX_TMR_PRIVILEGED 0x09 | 194 | #define IOP_TMR_RATIO_1_1 0x00 |
195 | #define IOP3XX_TMR_RATIO_1_1 0x00 | ||
196 | #define IOP3XX_TMR_RATIO_4_1 0x10 | ||
197 | #define IOP3XX_TMR_RATIO_8_1 0x20 | ||
198 | #define IOP3XX_TMR_RATIO_16_1 0x30 | ||
199 | 195 | ||
200 | /* Application accelerator unit */ | 196 | /* Application accelerator unit */ |
201 | #define IOP3XX_AAU_ACR (volatile u32 *)IOP3XX_REG_ADDR(0x0800) | 197 | #define IOP3XX_AAU_ACR (volatile u32 *)IOP3XX_REG_ADDR(0x0800) |
@@ -276,40 +272,52 @@ extern void gpio_line_set(int line, int value); | |||
276 | 272 | ||
277 | #ifndef __ASSEMBLY__ | 273 | #ifndef __ASSEMBLY__ |
278 | void iop3xx_map_io(void); | 274 | void iop3xx_map_io(void); |
279 | void iop3xx_init_time(unsigned long); | ||
280 | unsigned long iop3xx_gettimeoffset(void); | ||
281 | void iop_init_cp6_handler(void); | 275 | void iop_init_cp6_handler(void); |
276 | void iop_init_time(unsigned long tickrate); | ||
277 | unsigned long iop_gettimeoffset(void); | ||
282 | 278 | ||
283 | extern struct platform_device iop3xx_i2c0_device; | 279 | static inline void write_tmr0(u32 val) |
284 | extern struct platform_device iop3xx_i2c1_device; | 280 | { |
281 | asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (val)); | ||
282 | } | ||
283 | |||
284 | static inline void write_tmr1(u32 val) | ||
285 | { | ||
286 | asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (val)); | ||
287 | } | ||
288 | |||
289 | static inline u32 read_tcr0(void) | ||
290 | { | ||
291 | u32 val; | ||
292 | asm volatile("mrc p6, 0, %0, c2, c1, 0" : "=r" (val)); | ||
293 | return val; | ||
294 | } | ||
285 | 295 | ||
286 | extern inline void iop3xx_cp6_enable(void) | 296 | static inline u32 read_tcr1(void) |
287 | { | 297 | { |
288 | u32 temp; | 298 | u32 val; |
299 | asm volatile("mrc p6, 0, %0, c3, c1, 0" : "=r" (val)); | ||
300 | return val; | ||
301 | } | ||
289 | 302 | ||
290 | asm volatile ( | 303 | static inline void write_trr0(u32 val) |
291 | "mrc p15, 0, %0, c15, c1, 0\n\t" | 304 | { |
292 | "orr %0, %0, #(1 << 6)\n\t" | 305 | asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (val)); |
293 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
294 | "mrc p15, 0, %0, c15, c1, 0\n\t" | ||
295 | "mov %0, %0\n\t" | ||
296 | "sub pc, pc, #4\n\t" | ||
297 | : "=r" (temp) ); | ||
298 | } | 306 | } |
299 | 307 | ||
300 | extern inline void iop3xx_cp6_disable(void) | 308 | static inline void write_trr1(u32 val) |
301 | { | 309 | { |
302 | u32 temp; | 310 | asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (val)); |
311 | } | ||
303 | 312 | ||
304 | asm volatile ( | 313 | static inline void write_tisr(u32 val) |
305 | "mrc p15, 0, %0, c15, c1, 0\n\t" | 314 | { |
306 | "bic %0, %0, #(1 << 6)\n\t" | 315 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); |
307 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
308 | "mrc p15, 0, %0, c15, c1, 0\n\t" | ||
309 | "mov %0, %0\n\t" | ||
310 | "sub pc, pc, #4\n\t" | ||
311 | : "=r" (temp) ); | ||
312 | } | 316 | } |
317 | |||
318 | extern struct platform_device iop3xx_i2c0_device; | ||
319 | extern struct platform_device iop3xx_i2c1_device; | ||
320 | |||
313 | #endif | 321 | #endif |
314 | 322 | ||
315 | 323 | ||
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index f4386906b200..f06d8a43fdee 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -167,11 +167,25 @@ extern unsigned int user_debug; | |||
167 | : : "r" (0) : "memory") | 167 | : : "r" (0) : "memory") |
168 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | 168 | #define dmb() __asm__ __volatile__ ("" : : : "memory") |
169 | #endif | 169 | #endif |
170 | #define mb() dmb() | 170 | |
171 | #define rmb() mb() | 171 | #define mb() barrier() |
172 | #define wmb() mb() | 172 | #define rmb() barrier() |
173 | #define read_barrier_depends() do { } while(0) | 173 | #define wmb() barrier() |
174 | #define set_mb(var, value) do { var = value; mb(); } while (0) | 174 | #define read_barrier_depends() do { } while(0) |
175 | |||
176 | #ifdef CONFIG_SMP | ||
177 | #define smp_mb() dmb() | ||
178 | #define smp_rmb() dmb() | ||
179 | #define smp_wmb() dmb() | ||
180 | #define smp_read_barrier_depends() read_barrier_depends() | ||
181 | #else | ||
182 | #define smp_mb() barrier() | ||
183 | #define smp_rmb() barrier() | ||
184 | #define smp_wmb() barrier() | ||
185 | #define smp_read_barrier_depends() read_barrier_depends() | ||
186 | #endif /* CONFIG_SMP */ | ||
187 | |||
188 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) | ||
175 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | 189 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); |
176 | 190 | ||
177 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ | 191 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ |
@@ -243,22 +257,6 @@ static inline void sched_cacheflush(void) | |||
243 | { | 257 | { |
244 | } | 258 | } |
245 | 259 | ||
246 | #ifdef CONFIG_SMP | ||
247 | |||
248 | #define smp_mb() mb() | ||
249 | #define smp_rmb() rmb() | ||
250 | #define smp_wmb() wmb() | ||
251 | #define smp_read_barrier_depends() read_barrier_depends() | ||
252 | |||
253 | #else | ||
254 | |||
255 | #define smp_mb() barrier() | ||
256 | #define smp_rmb() barrier() | ||
257 | #define smp_wmb() barrier() | ||
258 | #define smp_read_barrier_depends() do { } while(0) | ||
259 | |||
260 | #endif /* CONFIG_SMP */ | ||
261 | |||
262 | #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) | 260 | #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) |
263 | /* | 261 | /* |
264 | * On the StrongARM, "swp" is terminally broken since it bypasses the | 262 | * On the StrongARM, "swp" is terminally broken since it bypasses the |
diff --git a/include/asm-avr32/Kbuild b/include/asm-avr32/Kbuild index 8770e73ce938..3136628ba8d2 100644 --- a/include/asm-avr32/Kbuild +++ b/include/asm-avr32/Kbuild | |||
@@ -1,3 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | headers-y += cachectl.h | 3 | header-y += cachectl.h |
diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index 115813e48fe0..21bb60bbb9a1 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h | |||
@@ -274,6 +274,24 @@ dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, | |||
274 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, direction); | 274 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, direction); |
275 | } | 275 | } |
276 | 276 | ||
277 | static inline void | ||
278 | dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle, | ||
279 | unsigned long offset, size_t size, | ||
280 | enum dma_data_direction direction) | ||
281 | { | ||
282 | /* just sync everything, that's all the pci API can do */ | ||
283 | dma_sync_single_for_cpu(dev, dma_handle, offset+size, direction); | ||
284 | } | ||
285 | |||
286 | static inline void | ||
287 | dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, | ||
288 | unsigned long offset, size_t size, | ||
289 | enum dma_data_direction direction) | ||
290 | { | ||
291 | /* just sync everything, that's all the pci API can do */ | ||
292 | dma_sync_single_for_device(dev, dma_handle, offset+size, direction); | ||
293 | } | ||
294 | |||
277 | /** | 295 | /** |
278 | * dma_sync_sg_for_cpu | 296 | * dma_sync_sg_for_cpu |
279 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices | 297 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices |
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index ba1b37df69d5..8a05aa168616 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -70,7 +70,11 @@ static inline int pte_file(pte_t pte) { return 0; } | |||
70 | 70 | ||
71 | #define swapper_pg_dir ((pgd_t *) NULL) | 71 | #define swapper_pg_dir ((pgd_t *) NULL) |
72 | 72 | ||
73 | #define pgtable_cache_init() do {} while(0) | 73 | #define pgtable_cache_init() do {} while (0) |
74 | #define arch_enter_lazy_mmu_mode() do {} while (0) | ||
75 | #define arch_leave_lazy_mmu_mode() do {} while (0) | ||
76 | #define arch_enter_lazy_cpu_mode() do {} while (0) | ||
77 | #define arch_leave_lazy_cpu_mode() do {} while (0) | ||
74 | 78 | ||
75 | #else /* !CONFIG_MMU */ | 79 | #else /* !CONFIG_MMU */ |
76 | /*****************************************************************************/ | 80 | /*****************************************************************************/ |
diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h index b55052ce2330..a96b5d986b6e 100644 --- a/include/asm-generic/page.h +++ b/include/asm-generic/page.h | |||
@@ -4,51 +4,21 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
6 | 6 | ||
7 | #include <linux/log2.h> | 7 | #include <linux/compiler.h> |
8 | 8 | ||
9 | /* | 9 | /* Pure 2^n version of get_order */ |
10 | * non-const pure 2^n version of get_order | 10 | static __inline__ __attribute_const__ int get_order(unsigned long size) |
11 | * - the arch may override these in asm/bitops.h if they can be implemented | ||
12 | * more efficiently than using the arch log2 routines | ||
13 | * - we use the non-const log2() instead if the arch has defined one suitable | ||
14 | */ | ||
15 | #ifndef ARCH_HAS_GET_ORDER | ||
16 | static inline __attribute__((const)) | ||
17 | int __get_order(unsigned long size, int page_shift) | ||
18 | { | 11 | { |
19 | #if BITS_PER_LONG == 32 && defined(ARCH_HAS_ILOG2_U32) | ||
20 | int order = __ilog2_u32(size) - page_shift; | ||
21 | return order >= 0 ? order : 0; | ||
22 | #elif BITS_PER_LONG == 64 && defined(ARCH_HAS_ILOG2_U64) | ||
23 | int order = __ilog2_u64(size) - page_shift; | ||
24 | return order >= 0 ? order : 0; | ||
25 | #else | ||
26 | int order; | 12 | int order; |
27 | 13 | ||
28 | size = (size - 1) >> (page_shift - 1); | 14 | size = (size - 1) >> (PAGE_SHIFT - 1); |
29 | order = -1; | 15 | order = -1; |
30 | do { | 16 | do { |
31 | size >>= 1; | 17 | size >>= 1; |
32 | order++; | 18 | order++; |
33 | } while (size); | 19 | } while (size); |
34 | return order; | 20 | return order; |
35 | #endif | ||
36 | } | 21 | } |
37 | #endif | ||
38 | |||
39 | /** | ||
40 | * get_order - calculate log2(pages) to hold a block of the specified size | ||
41 | * @n - size | ||
42 | * | ||
43 | * calculate allocation order based on the current page size | ||
44 | * - this can be used to initialise global variables from constant data | ||
45 | */ | ||
46 | #define get_order(n) \ | ||
47 | ( \ | ||
48 | __builtin_constant_p(n) ? \ | ||
49 | ((n < (1UL << PAGE_SHIFT)) ? 0 : ilog2(n) - PAGE_SHIFT) : \ | ||
50 | __get_order(n, PAGE_SHIFT) \ | ||
51 | ) | ||
52 | 22 | ||
53 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
54 | #endif /* __KERNEL__ */ | 24 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-i386/delay.h b/include/asm-i386/delay.h index 32d6678d0bbf..9ae5e3782ed8 100644 --- a/include/asm-i386/delay.h +++ b/include/asm-i386/delay.h | |||
@@ -16,13 +16,6 @@ extern void __ndelay(unsigned long nsecs); | |||
16 | extern void __const_udelay(unsigned long usecs); | 16 | extern void __const_udelay(unsigned long usecs); |
17 | extern void __delay(unsigned long loops); | 17 | extern void __delay(unsigned long loops); |
18 | 18 | ||
19 | #if defined(CONFIG_PARAVIRT) && !defined(USE_REAL_TIME_DELAY) | ||
20 | #define udelay(n) paravirt_ops.const_udelay((n) * 0x10c7ul) | ||
21 | |||
22 | #define ndelay(n) paravirt_ops.const_udelay((n) * 5ul) | ||
23 | |||
24 | #else /* !PARAVIRT || USE_REAL_TIME_DELAY */ | ||
25 | |||
26 | /* 0x10c7 is 2**32 / 1000000 (rounded up) */ | 19 | /* 0x10c7 is 2**32 / 1000000 (rounded up) */ |
27 | #define udelay(n) (__builtin_constant_p(n) ? \ | 20 | #define udelay(n) (__builtin_constant_p(n) ? \ |
28 | ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \ | 21 | ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \ |
@@ -32,7 +25,6 @@ extern void __delay(unsigned long loops); | |||
32 | #define ndelay(n) (__builtin_constant_p(n) ? \ | 25 | #define ndelay(n) (__builtin_constant_p(n) ? \ |
33 | ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ | 26 | ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ |
34 | __ndelay(n)) | 27 | __ndelay(n)) |
35 | #endif | ||
36 | 28 | ||
37 | void use_tsc_delay(void); | 29 | void use_tsc_delay(void); |
38 | 30 | ||
diff --git a/include/asm-i386/idle.h b/include/asm-i386/idle.h deleted file mode 100644 index 87ab93911199..000000000000 --- a/include/asm-i386/idle.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef _ASM_I386_IDLE_H | ||
2 | #define _ASM_I386_IDLE_H 1 | ||
3 | |||
4 | #define IDLE_START 1 | ||
5 | #define IDLE_END 2 | ||
6 | |||
7 | struct notifier_block; | ||
8 | void idle_notifier_register(struct notifier_block *n); | ||
9 | void idle_notifier_unregister(struct notifier_block *n); | ||
10 | |||
11 | void exit_idle(void); | ||
12 | void enter_idle(void); | ||
13 | |||
14 | #endif | ||
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h index 059a9ff28b4d..340764076d5f 100644 --- a/include/asm-i386/io_apic.h +++ b/include/asm-i386/io_apic.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/mpspec.h> | 5 | #include <asm/mpspec.h> |
6 | #include <asm/apicdef.h> | ||
6 | 7 | ||
7 | /* | 8 | /* |
8 | * Intel IO-APIC support for SMP and UP systems. | 9 | * Intel IO-APIC support for SMP and UP systems. |
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index 6db40d0583f1..ec3b6803fd36 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h | |||
@@ -83,6 +83,20 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val) | |||
83 | : "c" (counter)) | 83 | : "c" (counter)) |
84 | #endif /* !CONFIG_PARAVIRT */ | 84 | #endif /* !CONFIG_PARAVIRT */ |
85 | 85 | ||
86 | #ifdef CONFIG_SMP | ||
87 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | ||
88 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | ||
89 | #else /* CONFIG_SMP */ | ||
90 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | ||
91 | { | ||
92 | rdmsr(msr_no, *l, *h); | ||
93 | } | ||
94 | static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | ||
95 | { | ||
96 | wrmsr(msr_no, l, h); | ||
97 | } | ||
98 | #endif /* CONFIG_SMP */ | ||
99 | |||
86 | /* symbolic names for some interesting MSRs */ | 100 | /* symbolic names for some interesting MSRs */ |
87 | /* Intel defined MSRs. */ | 101 | /* Intel defined MSRs. */ |
88 | #define MSR_IA32_P5_MC_ADDR 0 | 102 | #define MSR_IA32_P5_MC_ADDR 0 |
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index b04333ea6f31..64544cb85d6a 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -33,7 +33,7 @@ extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | |||
33 | 33 | ||
34 | extern atomic_t nmi_active; | 34 | extern atomic_t nmi_active; |
35 | extern unsigned int nmi_watchdog; | 35 | extern unsigned int nmi_watchdog; |
36 | #define NMI_DEFAULT -1 | 36 | #define NMI_DEFAULT 0 |
37 | #define NMI_NONE 0 | 37 | #define NMI_NONE 0 |
38 | #define NMI_IO_APIC 1 | 38 | #define NMI_IO_APIC 1 |
39 | #define NMI_LOCAL_APIC 2 | 39 | #define NMI_LOCAL_APIC 2 |
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index 6317e0a4d735..f8319cae2ac5 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -94,6 +94,8 @@ struct paravirt_ops | |||
94 | 94 | ||
95 | u64 (*read_tsc)(void); | 95 | u64 (*read_tsc)(void); |
96 | u64 (*read_pmc)(void); | 96 | u64 (*read_pmc)(void); |
97 | u64 (*get_scheduled_cycles)(void); | ||
98 | unsigned long (*get_cpu_khz)(void); | ||
97 | 99 | ||
98 | void (*load_tr_desc)(void); | 100 | void (*load_tr_desc)(void); |
99 | void (*load_gdt)(const struct Xgt_desc_struct *); | 101 | void (*load_gdt)(const struct Xgt_desc_struct *); |
@@ -115,7 +117,6 @@ struct paravirt_ops | |||
115 | void (*set_iopl_mask)(unsigned mask); | 117 | void (*set_iopl_mask)(unsigned mask); |
116 | 118 | ||
117 | void (*io_delay)(void); | 119 | void (*io_delay)(void); |
118 | void (*const_udelay)(unsigned long loops); | ||
119 | 120 | ||
120 | #ifdef CONFIG_X86_LOCAL_APIC | 121 | #ifdef CONFIG_X86_LOCAL_APIC |
121 | void (*apic_write)(unsigned long reg, unsigned long v); | 122 | void (*apic_write)(unsigned long reg, unsigned long v); |
@@ -129,6 +130,8 @@ struct paravirt_ops | |||
129 | void (*flush_tlb_kernel)(void); | 130 | void (*flush_tlb_kernel)(void); |
130 | void (*flush_tlb_single)(u32 addr); | 131 | void (*flush_tlb_single)(u32 addr); |
131 | 132 | ||
133 | void (fastcall *map_pt_hook)(int type, pte_t *va, u32 pfn); | ||
134 | |||
132 | void (*alloc_pt)(u32 pfn); | 135 | void (*alloc_pt)(u32 pfn); |
133 | void (*alloc_pd)(u32 pfn); | 136 | void (*alloc_pd)(u32 pfn); |
134 | void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); | 137 | void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); |
@@ -183,9 +186,9 @@ static inline int set_wallclock(unsigned long nowtime) | |||
183 | return paravirt_ops.set_wallclock(nowtime); | 186 | return paravirt_ops.set_wallclock(nowtime); |
184 | } | 187 | } |
185 | 188 | ||
186 | static inline void do_time_init(void) | 189 | static inline void (*choose_time_init(void))(void) |
187 | { | 190 | { |
188 | return paravirt_ops.time_init(); | 191 | return paravirt_ops.time_init; |
189 | } | 192 | } |
190 | 193 | ||
191 | /* The paravirtualized CPUID instruction. */ | 194 | /* The paravirtualized CPUID instruction. */ |
@@ -273,6 +276,9 @@ static inline void halt(void) | |||
273 | 276 | ||
274 | #define rdtscll(val) (val = paravirt_ops.read_tsc()) | 277 | #define rdtscll(val) (val = paravirt_ops.read_tsc()) |
275 | 278 | ||
279 | #define get_scheduled_cycles(val) (val = paravirt_ops.get_scheduled_cycles()) | ||
280 | #define calculate_cpu_khz() (paravirt_ops.get_cpu_khz()) | ||
281 | |||
276 | #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) | 282 | #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) |
277 | 283 | ||
278 | #define rdpmc(counter,low,high) do { \ | 284 | #define rdpmc(counter,low,high) do { \ |
@@ -349,6 +355,8 @@ static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, | |||
349 | #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel() | 355 | #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel() |
350 | #define __flush_tlb_single(addr) paravirt_ops.flush_tlb_single(addr) | 356 | #define __flush_tlb_single(addr) paravirt_ops.flush_tlb_single(addr) |
351 | 357 | ||
358 | #define paravirt_map_pt_hook(type, va, pfn) paravirt_ops.map_pt_hook(type, va, pfn) | ||
359 | |||
352 | #define paravirt_alloc_pt(pfn) paravirt_ops.alloc_pt(pfn) | 360 | #define paravirt_alloc_pt(pfn) paravirt_ops.alloc_pt(pfn) |
353 | #define paravirt_release_pt(pfn) paravirt_ops.release_pt(pfn) | 361 | #define paravirt_release_pt(pfn) paravirt_ops.release_pt(pfn) |
354 | 362 | ||
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index e6a4723f0eb1..c3b58d473a55 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -263,6 +263,7 @@ static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return p | |||
263 | */ | 263 | */ |
264 | #define pte_update(mm, addr, ptep) do { } while (0) | 264 | #define pte_update(mm, addr, ptep) do { } while (0) |
265 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | 265 | #define pte_update_defer(mm, addr, ptep) do { } while (0) |
266 | #define paravirt_map_pt_hook(slot, va, pfn) do { } while (0) | ||
266 | #endif | 267 | #endif |
267 | 268 | ||
268 | /* | 269 | /* |
@@ -469,10 +470,24 @@ extern pte_t *lookup_address(unsigned long address); | |||
469 | #endif | 470 | #endif |
470 | 471 | ||
471 | #if defined(CONFIG_HIGHPTE) | 472 | #if defined(CONFIG_HIGHPTE) |
472 | #define pte_offset_map(dir, address) \ | 473 | #define pte_offset_map(dir, address) \ |
473 | ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address)) | 474 | ({ \ |
474 | #define pte_offset_map_nested(dir, address) \ | 475 | pte_t *__ptep; \ |
475 | ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address)) | 476 | unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT; \ |
477 | __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE0);\ | ||
478 | paravirt_map_pt_hook(KM_PTE0,__ptep, pfn); \ | ||
479 | __ptep = __ptep + pte_index(address); \ | ||
480 | __ptep; \ | ||
481 | }) | ||
482 | #define pte_offset_map_nested(dir, address) \ | ||
483 | ({ \ | ||
484 | pte_t *__ptep; \ | ||
485 | unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT; \ | ||
486 | __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE1);\ | ||
487 | paravirt_map_pt_hook(KM_PTE1,__ptep, pfn); \ | ||
488 | __ptep = __ptep + pte_index(address); \ | ||
489 | __ptep; \ | ||
490 | }) | ||
476 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) | 491 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) |
477 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) | 492 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) |
478 | #else | 493 | #else |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index edfbe46a5e13..11bf899de8aa 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -257,14 +257,6 @@ static inline void __mwait(unsigned long eax, unsigned long ecx) | |||
257 | : :"a" (eax), "c" (ecx)); | 257 | : :"a" (eax), "c" (ecx)); |
258 | } | 258 | } |
259 | 259 | ||
260 | static inline void __sti_mwait(unsigned long eax, unsigned long ecx) | ||
261 | { | ||
262 | /* "mwait %eax,%ecx;" */ | ||
263 | asm volatile( | ||
264 | "sti; .byte 0x0f,0x01,0xc9;" | ||
265 | : :"a" (eax), "c" (ecx)); | ||
266 | } | ||
267 | |||
268 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); | 260 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); |
269 | 261 | ||
270 | /* from system description table in BIOS. Mostly for MCA use, but | 262 | /* from system description table in BIOS. Mostly for MCA use, but |
diff --git a/include/asm-i386/time.h b/include/asm-i386/time.h index 571b4294dc2e..eac011366dc2 100644 --- a/include/asm-i386/time.h +++ b/include/asm-i386/time.h | |||
@@ -28,14 +28,16 @@ static inline int native_set_wallclock(unsigned long nowtime) | |||
28 | return retval; | 28 | return retval; |
29 | } | 29 | } |
30 | 30 | ||
31 | extern void (*late_time_init)(void); | ||
32 | extern void hpet_time_init(void); | ||
33 | |||
31 | #ifdef CONFIG_PARAVIRT | 34 | #ifdef CONFIG_PARAVIRT |
32 | #include <asm/paravirt.h> | 35 | #include <asm/paravirt.h> |
33 | extern unsigned long long native_sched_clock(void); | ||
34 | #else /* !CONFIG_PARAVIRT */ | 36 | #else /* !CONFIG_PARAVIRT */ |
35 | 37 | ||
36 | #define get_wallclock() native_get_wallclock() | 38 | #define get_wallclock() native_get_wallclock() |
37 | #define set_wallclock(x) native_set_wallclock(x) | 39 | #define set_wallclock(x) native_set_wallclock(x) |
38 | #define do_time_init() time_init_hook() | 40 | #define choose_time_init() hpet_time_init |
39 | 41 | ||
40 | #endif /* CONFIG_PARAVIRT */ | 42 | #endif /* CONFIG_PARAVIRT */ |
41 | 43 | ||
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index 4752c3a6a708..12dd67bf760f 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h | |||
@@ -4,13 +4,21 @@ | |||
4 | #include <linux/pm.h> | 4 | #include <linux/pm.h> |
5 | 5 | ||
6 | #define TICK_SIZE (tick_nsec / 1000) | 6 | #define TICK_SIZE (tick_nsec / 1000) |
7 | |||
7 | void setup_pit_timer(void); | 8 | void setup_pit_timer(void); |
9 | unsigned long long native_sched_clock(void); | ||
10 | unsigned long native_calculate_cpu_khz(void); | ||
11 | |||
8 | /* Modifiers for buggy PIT handling */ | 12 | /* Modifiers for buggy PIT handling */ |
9 | extern int pit_latch_buggy; | 13 | extern int pit_latch_buggy; |
10 | extern int timer_ack; | 14 | extern int timer_ack; |
11 | extern int no_timer_check; | 15 | extern int no_timer_check; |
12 | extern unsigned long long (*custom_sched_clock)(void); | ||
13 | extern int no_sync_cmos_clock; | 16 | extern int no_sync_cmos_clock; |
14 | extern int recalibrate_cpu_khz(void); | 17 | extern int recalibrate_cpu_khz(void); |
15 | 18 | ||
19 | #ifndef CONFIG_PARAVIRT | ||
20 | #define get_scheduled_cycles(val) rdtscll(val) | ||
21 | #define calculate_cpu_khz() native_calculate_cpu_khz() | ||
22 | #endif | ||
23 | |||
16 | #endif | 24 | #endif |
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index ac58580ad664..7fc512d90ea8 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -85,7 +85,6 @@ static inline int node_to_first_cpu(int node) | |||
85 | .idle_idx = 1, \ | 85 | .idle_idx = 1, \ |
86 | .newidle_idx = 2, \ | 86 | .newidle_idx = 2, \ |
87 | .wake_idx = 1, \ | 87 | .wake_idx = 1, \ |
88 | .per_cpu_gain = 100, \ | ||
89 | .flags = SD_LOAD_BALANCE \ | 88 | .flags = SD_LOAD_BALANCE \ |
90 | | SD_BALANCE_EXEC \ | 89 | | SD_BALANCE_EXEC \ |
91 | | SD_BALANCE_FORK \ | 90 | | SD_BALANCE_FORK \ |
diff --git a/include/asm-i386/tsc.h b/include/asm-i386/tsc.h index e997891cc7cc..84016ff481b9 100644 --- a/include/asm-i386/tsc.h +++ b/include/asm-i386/tsc.h | |||
@@ -1 +1,67 @@ | |||
1 | #include <asm-x86_64/tsc.h> | 1 | /* |
2 | * linux/include/asm-i386/tsc.h | ||
3 | * | ||
4 | * i386 TSC related functions | ||
5 | */ | ||
6 | #ifndef _ASM_i386_TSC_H | ||
7 | #define _ASM_i386_TSC_H | ||
8 | |||
9 | #include <asm/processor.h> | ||
10 | |||
11 | /* | ||
12 | * Standard way to access the cycle counter. | ||
13 | */ | ||
14 | typedef unsigned long long cycles_t; | ||
15 | |||
16 | extern unsigned int cpu_khz; | ||
17 | extern unsigned int tsc_khz; | ||
18 | |||
19 | static inline cycles_t get_cycles(void) | ||
20 | { | ||
21 | unsigned long long ret = 0; | ||
22 | |||
23 | #ifndef CONFIG_X86_TSC | ||
24 | if (!cpu_has_tsc) | ||
25 | return 0; | ||
26 | #endif | ||
27 | |||
28 | #if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) | ||
29 | rdtscll(ret); | ||
30 | #endif | ||
31 | return ret; | ||
32 | } | ||
33 | |||
34 | /* Like get_cycles, but make sure the CPU is synchronized. */ | ||
35 | static __always_inline cycles_t get_cycles_sync(void) | ||
36 | { | ||
37 | unsigned long long ret; | ||
38 | #ifdef X86_FEATURE_SYNC_RDTSC | ||
39 | unsigned eax; | ||
40 | |||
41 | /* | ||
42 | * Don't do an additional sync on CPUs where we know | ||
43 | * RDTSC is already synchronous: | ||
44 | */ | ||
45 | alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC, | ||
46 | "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); | ||
47 | #else | ||
48 | sync_core(); | ||
49 | #endif | ||
50 | rdtscll(ret); | ||
51 | |||
52 | return ret; | ||
53 | } | ||
54 | |||
55 | extern void tsc_init(void); | ||
56 | extern void mark_tsc_unstable(void); | ||
57 | extern int unsynchronized_tsc(void); | ||
58 | extern void init_tsc_clocksource(void); | ||
59 | |||
60 | /* | ||
61 | * Boot-time check whether the TSCs are synchronized across | ||
62 | * all CPUs/cores: | ||
63 | */ | ||
64 | extern void check_tsc_sync_source(int cpu); | ||
65 | extern void check_tsc_sync_target(void); | ||
66 | |||
67 | #endif | ||
diff --git a/include/asm-i386/vmi.h b/include/asm-i386/vmi.h index 43c89333037e..eb8bd892c01e 100644 --- a/include/asm-i386/vmi.h +++ b/include/asm-i386/vmi.h | |||
@@ -97,6 +97,7 @@ | |||
97 | #define VMI_CALL_SetInitialAPState 62 | 97 | #define VMI_CALL_SetInitialAPState 62 |
98 | #define VMI_CALL_APICWrite 63 | 98 | #define VMI_CALL_APICWrite 63 |
99 | #define VMI_CALL_APICRead 64 | 99 | #define VMI_CALL_APICRead 64 |
100 | #define VMI_CALL_IODelay 65 | ||
100 | #define VMI_CALL_SetLazyMode 73 | 101 | #define VMI_CALL_SetLazyMode 73 |
101 | 102 | ||
102 | /* | 103 | /* |
diff --git a/include/asm-i386/vmi_time.h b/include/asm-i386/vmi_time.h index c12931211007..94d0a12a4114 100644 --- a/include/asm-i386/vmi_time.h +++ b/include/asm-i386/vmi_time.h | |||
@@ -49,7 +49,8 @@ extern struct vmi_timer_ops { | |||
49 | extern void __init vmi_time_init(void); | 49 | extern void __init vmi_time_init(void); |
50 | extern unsigned long vmi_get_wallclock(void); | 50 | extern unsigned long vmi_get_wallclock(void); |
51 | extern int vmi_set_wallclock(unsigned long now); | 51 | extern int vmi_set_wallclock(unsigned long now); |
52 | extern unsigned long long vmi_sched_clock(void); | 52 | extern unsigned long long vmi_get_sched_cycles(void); |
53 | extern unsigned long vmi_cpu_khz(void); | ||
53 | 54 | ||
54 | #ifdef CONFIG_X86_LOCAL_APIC | 55 | #ifdef CONFIG_X86_LOCAL_APIC |
55 | extern void __init vmi_timer_setup_boot_alarm(void); | 56 | extern void __init vmi_timer_setup_boot_alarm(void); |
@@ -60,6 +61,14 @@ extern void apic_vmi_timer_interrupt(void); | |||
60 | #ifdef CONFIG_NO_IDLE_HZ | 61 | #ifdef CONFIG_NO_IDLE_HZ |
61 | extern int vmi_stop_hz_timer(void); | 62 | extern int vmi_stop_hz_timer(void); |
62 | extern void vmi_account_time_restart_hz_timer(void); | 63 | extern void vmi_account_time_restart_hz_timer(void); |
64 | #else | ||
65 | static inline int vmi_stop_hz_timer(void) | ||
66 | { | ||
67 | return 0; | ||
68 | } | ||
69 | static inline void vmi_account_time_restart_hz_timer(void) | ||
70 | { | ||
71 | } | ||
63 | #endif | 72 | #endif |
64 | 73 | ||
65 | /* | 74 | /* |
diff --git a/include/asm-ia64/kexec.h b/include/asm-ia64/kexec.h index f2ad469a6ddf..41299ddfee30 100644 --- a/include/asm-ia64/kexec.h +++ b/include/asm-ia64/kexec.h | |||
@@ -22,7 +22,6 @@ | |||
22 | } while(0) | 22 | } while(0) |
23 | 23 | ||
24 | extern struct kimage *ia64_kimage; | 24 | extern struct kimage *ia64_kimage; |
25 | DECLARE_PER_CPU(u64, ia64_mca_pal_base); | ||
26 | extern const unsigned int relocate_new_kernel_size; | 25 | extern const unsigned int relocate_new_kernel_size; |
27 | extern void relocate_new_kernel(unsigned long, unsigned long, | 26 | extern void relocate_new_kernel(unsigned long, unsigned long, |
28 | struct ia64_boot_param *, unsigned long); | 27 | struct ia64_boot_param *, unsigned long); |
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index ee97f7c2d462..41098f459684 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h | |||
@@ -156,6 +156,8 @@ struct ia64_mca_notify_die { | |||
156 | int *monarch_cpu; | 156 | int *monarch_cpu; |
157 | }; | 157 | }; |
158 | 158 | ||
159 | DECLARE_PER_CPU(u64, ia64_mca_pal_base); | ||
160 | |||
159 | #else /* __ASSEMBLY__ */ | 161 | #else /* __ASSEMBLY__ */ |
160 | 162 | ||
161 | #define IA64_MCA_CORRECTED 0x0 /* Error has been corrected by OS_MCA */ | 163 | #define IA64_MCA_CORRECTED 0x0 /* Error has been corrected by OS_MCA */ |
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index 6dd476b652c6..21ec5f3d23de 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h | |||
@@ -17,10 +17,11 @@ | |||
17 | * - kernel code & data | 17 | * - kernel code & data |
18 | * - crash dumping code reserved region | 18 | * - crash dumping code reserved region |
19 | * - Kernel memory map built from EFI memory map | 19 | * - Kernel memory map built from EFI memory map |
20 | * - ELF core header | ||
20 | * | 21 | * |
21 | * More could be added if necessary | 22 | * More could be added if necessary |
22 | */ | 23 | */ |
23 | #define IA64_MAX_RSVD_REGIONS 7 | 24 | #define IA64_MAX_RSVD_REGIONS 8 |
24 | 25 | ||
25 | struct rsvd_region { | 26 | struct rsvd_region { |
26 | unsigned long start; /* virtual address of beginning of element */ | 27 | unsigned long start; /* virtual address of beginning of element */ |
@@ -36,6 +37,9 @@ extern void find_initrd (void); | |||
36 | extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); | 37 | extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); |
37 | extern void efi_memmap_init(unsigned long *, unsigned long *); | 38 | extern void efi_memmap_init(unsigned long *, unsigned long *); |
38 | 39 | ||
40 | extern unsigned long vmcore_find_descriptor_size(unsigned long address); | ||
41 | extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end); | ||
42 | |||
39 | /* | 43 | /* |
40 | * For rounding an address to the next IA64_GRANULE_SIZE or order | 44 | * For rounding an address to the next IA64_GRANULE_SIZE or order |
41 | */ | 45 | */ |
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index e43021a99a20..67656ce767c2 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -371,6 +371,7 @@ typedef u64 pal_mc_info_index_t; | |||
371 | * dependent | 371 | * dependent |
372 | */ | 372 | */ |
373 | 373 | ||
374 | #define PAL_TLB_CHECK_OP_PURGE 8 | ||
374 | 375 | ||
375 | typedef struct pal_process_state_info_s { | 376 | typedef struct pal_process_state_info_s { |
376 | u64 reserved1 : 2, | 377 | u64 reserved1 : 2, |
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h index 5160233bbfac..5a5d1c2ce39d 100644 --- a/include/asm-ia64/pci.h +++ b/include/asm-ia64/pci.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <asm/io.h> | 10 | #include <asm/io.h> |
11 | #include <asm/scatterlist.h> | 11 | #include <asm/scatterlist.h> |
12 | #include <asm/hw_irq.h> | ||
12 | 13 | ||
13 | /* | 14 | /* |
14 | * Can be used to override the logic in pci_scan_bus for skipping already-configured bus | 15 | * Can be used to override the logic in pci_scan_bus for skipping already-configured bus |
@@ -170,7 +171,7 @@ pcibios_select_root(struct pci_dev *pdev, struct resource *res) | |||
170 | #define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ | 171 | #define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ |
171 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 172 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
172 | { | 173 | { |
173 | return channel ? 15 : 14; | 174 | return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14); |
174 | } | 175 | } |
175 | 176 | ||
176 | #endif /* _ASM_IA64_PCI_H */ | 177 | #endif /* _ASM_IA64_PCI_H */ |
diff --git a/include/asm-ia64/resource.h b/include/asm-ia64/resource.h index 77b1eee01f30..ba2272a87fc7 100644 --- a/include/asm-ia64/resource.h +++ b/include/asm-ia64/resource.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_IA64_RESOURCE_H | 2 | #define _ASM_IA64_RESOURCE_H |
3 | 3 | ||
4 | #include <asm/ustack.h> | 4 | #include <asm/ustack.h> |
5 | #define _STK_LIM_MAX DEFAULT_USER_STACK_SIZE | ||
6 | #include <asm-generic/resource.h> | 5 | #include <asm-generic/resource.h> |
7 | 6 | ||
8 | #endif /* _ASM_IA64_RESOURCE_H */ | 7 | #endif /* _ASM_IA64_RESOURCE_H */ |
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h index d000689d9142..46cadf5aaac5 100644 --- a/include/asm-ia64/sal.h +++ b/include/asm-ia64/sal.h | |||
@@ -847,12 +847,13 @@ extern int ia64_sal_oemcall_reentrant(struct ia64_sal_retval *, u64, u64, u64, | |||
847 | */ | 847 | */ |
848 | struct sal_to_os_boot { | 848 | struct sal_to_os_boot { |
849 | u64 rr[8]; /* Region Registers */ | 849 | u64 rr[8]; /* Region Registers */ |
850 | u64 br[6]; /* br0: return addr into SAL boot rendez routine */ | 850 | u64 br[6]; /* br0: |
851 | * return addr into SAL boot rendez routine */ | ||
851 | u64 gr1; /* SAL:GP */ | 852 | u64 gr1; /* SAL:GP */ |
852 | u64 gr12; /* SAL:SP */ | 853 | u64 gr12; /* SAL:SP */ |
853 | u64 gr13; /* SAL: Task Pointer */ | 854 | u64 gr13; /* SAL: Task Pointer */ |
854 | u64 fpsr; | 855 | u64 fpsr; |
855 | u64 pfs; | 856 | u64 pfs; |
856 | u64 rnat; | 857 | u64 rnat; |
857 | u64 unat; | 858 | u64 unat; |
858 | u64 bspstore; | 859 | u64 bspstore; |
diff --git a/include/asm-ia64/swiotlb.h b/include/asm-ia64/swiotlb.h deleted file mode 100644 index 452c162dee4e..000000000000 --- a/include/asm-ia64/swiotlb.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _ASM_SWIOTLB_H | ||
2 | #define _ASM_SWIOTLB_H 1 | ||
3 | |||
4 | #include <asm/machvec.h> | ||
5 | |||
6 | #define SWIOTLB_ARCH_NEED_LATE_INIT | ||
7 | #define SWIOTLB_ARCH_NEED_ALLOC | ||
8 | |||
9 | #endif /* _ASM_SWIOTLB_H */ | ||
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 22ed6749557e..233f1caae048 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -65,7 +65,6 @@ void build_cpu_to_node_map(void); | |||
65 | .max_interval = 4, \ | 65 | .max_interval = 4, \ |
66 | .busy_factor = 64, \ | 66 | .busy_factor = 64, \ |
67 | .imbalance_pct = 125, \ | 67 | .imbalance_pct = 125, \ |
68 | .per_cpu_gain = 100, \ | ||
69 | .cache_nice_tries = 2, \ | 68 | .cache_nice_tries = 2, \ |
70 | .busy_idx = 2, \ | 69 | .busy_idx = 2, \ |
71 | .idle_idx = 1, \ | 70 | .idle_idx = 1, \ |
@@ -97,7 +96,6 @@ void build_cpu_to_node_map(void); | |||
97 | .newidle_idx = 0, /* unused */ \ | 96 | .newidle_idx = 0, /* unused */ \ |
98 | .wake_idx = 1, \ | 97 | .wake_idx = 1, \ |
99 | .forkexec_idx = 1, \ | 98 | .forkexec_idx = 1, \ |
100 | .per_cpu_gain = 100, \ | ||
101 | .flags = SD_LOAD_BALANCE \ | 99 | .flags = SD_LOAD_BALANCE \ |
102 | | SD_BALANCE_EXEC \ | 100 | | SD_BALANCE_EXEC \ |
103 | | SD_BALANCE_FORK \ | 101 | | SD_BALANCE_FORK \ |
diff --git a/include/asm-ia64/unwind.h b/include/asm-ia64/unwind.h index 5df0276b0493..1af3875f1a57 100644 --- a/include/asm-ia64/unwind.h +++ b/include/asm-ia64/unwind.h | |||
@@ -81,7 +81,7 @@ struct unw_frame_info { | |||
81 | struct unw_ireg { | 81 | struct unw_ireg { |
82 | unsigned long *loc; | 82 | unsigned long *loc; |
83 | struct unw_ireg_nat { | 83 | struct unw_ireg_nat { |
84 | long type : 3; /* enum unw_nat_type */ | 84 | unsigned long type : 3; /* enum unw_nat_type */ |
85 | signed long off : 61; /* NaT word is at loc+nat.off */ | 85 | signed long off : 61; /* NaT word is at loc+nat.off */ |
86 | } nat; | 86 | } nat; |
87 | } r4, r5, r6, r7; | 87 | } r4, r5, r6, r7; |
diff --git a/include/asm-m68knommu/m528xsim.h b/include/asm-m68knommu/m528xsim.h index 1a3b1ae06b1e..28bf783a5d6d 100644 --- a/include/asm-m68knommu/m528xsim.h +++ b/include/asm-m68knommu/m528xsim.h | |||
@@ -47,6 +47,9 @@ | |||
47 | /* set Port AS pin for I2C or UART */ | 47 | /* set Port AS pin for I2C or UART */ |
48 | #define MCF5282_GPIO_PASPAR (volatile u16 *) (MCF_IPSBAR + 0x00100056) | 48 | #define MCF5282_GPIO_PASPAR (volatile u16 *) (MCF_IPSBAR + 0x00100056) |
49 | 49 | ||
50 | /* Port UA Pin Assignment Register (8 Bit) */ | ||
51 | #define MCF5282_GPIO_PUAPAR 0x10005C | ||
52 | |||
50 | /* Interrupt Mask Register Register Low */ | 53 | /* Interrupt Mask Register Register Low */ |
51 | #define MCF5282_INTC0_IMRL (volatile u32 *) (MCF_IPSBAR + 0x0C0C) | 54 | #define MCF5282_INTC0_IMRL (volatile u32 *) (MCF_IPSBAR + 0x0C0C) |
52 | /* Interrupt Control Register 7 */ | 55 | /* Interrupt Control Register 7 */ |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 89436b96ad66..8959da245cfb 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -54,6 +54,7 @@ | |||
54 | static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | 54 | static inline void set_bit(unsigned long nr, volatile unsigned long *addr) |
55 | { | 55 | { |
56 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 56 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
57 | unsigned short bit = nr & SZLONG_MASK; | ||
57 | unsigned long temp; | 58 | unsigned long temp; |
58 | 59 | ||
59 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 60 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
@@ -65,9 +66,9 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
65 | " beqzl %0, 1b \n" | 66 | " beqzl %0, 1b \n" |
66 | " .set mips0 \n" | 67 | " .set mips0 \n" |
67 | : "=&r" (temp), "=m" (*m) | 68 | : "=&r" (temp), "=m" (*m) |
68 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); | 69 | : "ir" (1UL << bit), "m" (*m)); |
69 | #ifdef CONFIG_CPU_MIPSR2 | 70 | #ifdef CONFIG_CPU_MIPSR2 |
70 | } else if (__builtin_constant_p(nr)) { | 71 | } else if (__builtin_constant_p(bit)) { |
71 | __asm__ __volatile__( | 72 | __asm__ __volatile__( |
72 | "1: " __LL "%0, %1 # set_bit \n" | 73 | "1: " __LL "%0, %1 # set_bit \n" |
73 | " " __INS "%0, %4, %2, 1 \n" | 74 | " " __INS "%0, %4, %2, 1 \n" |
@@ -77,7 +78,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
77 | "2: b 1b \n" | 78 | "2: b 1b \n" |
78 | " .previous \n" | 79 | " .previous \n" |
79 | : "=&r" (temp), "=m" (*m) | 80 | : "=&r" (temp), "=m" (*m) |
80 | : "ir" (nr & SZLONG_MASK), "m" (*m), "r" (~0)); | 81 | : "ir" (bit), "m" (*m), "r" (~0)); |
81 | #endif /* CONFIG_CPU_MIPSR2 */ | 82 | #endif /* CONFIG_CPU_MIPSR2 */ |
82 | } else if (cpu_has_llsc) { | 83 | } else if (cpu_has_llsc) { |
83 | __asm__ __volatile__( | 84 | __asm__ __volatile__( |
@@ -91,14 +92,14 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
91 | " .previous \n" | 92 | " .previous \n" |
92 | " .set mips0 \n" | 93 | " .set mips0 \n" |
93 | : "=&r" (temp), "=m" (*m) | 94 | : "=&r" (temp), "=m" (*m) |
94 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); | 95 | : "ir" (1UL << bit), "m" (*m)); |
95 | } else { | 96 | } else { |
96 | volatile unsigned long *a = addr; | 97 | volatile unsigned long *a = addr; |
97 | unsigned long mask; | 98 | unsigned long mask; |
98 | unsigned long flags; | 99 | unsigned long flags; |
99 | 100 | ||
100 | a += nr >> SZLONG_LOG; | 101 | a += nr >> SZLONG_LOG; |
101 | mask = 1UL << (nr & SZLONG_MASK); | 102 | mask = 1UL << bit; |
102 | local_irq_save(flags); | 103 | local_irq_save(flags); |
103 | *a |= mask; | 104 | *a |= mask; |
104 | local_irq_restore(flags); | 105 | local_irq_restore(flags); |
@@ -118,6 +119,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
118 | static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | 119 | static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) |
119 | { | 120 | { |
120 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 121 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
122 | unsigned short bit = nr & SZLONG_MASK; | ||
121 | unsigned long temp; | 123 | unsigned long temp; |
122 | 124 | ||
123 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 125 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
@@ -129,9 +131,9 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
129 | " beqzl %0, 1b \n" | 131 | " beqzl %0, 1b \n" |
130 | " .set mips0 \n" | 132 | " .set mips0 \n" |
131 | : "=&r" (temp), "=m" (*m) | 133 | : "=&r" (temp), "=m" (*m) |
132 | : "ir" (~(1UL << (nr & SZLONG_MASK))), "m" (*m)); | 134 | : "ir" (~(1UL << bit)), "m" (*m)); |
133 | #ifdef CONFIG_CPU_MIPSR2 | 135 | #ifdef CONFIG_CPU_MIPSR2 |
134 | } else if (__builtin_constant_p(nr)) { | 136 | } else if (__builtin_constant_p(bit)) { |
135 | __asm__ __volatile__( | 137 | __asm__ __volatile__( |
136 | "1: " __LL "%0, %1 # clear_bit \n" | 138 | "1: " __LL "%0, %1 # clear_bit \n" |
137 | " " __INS "%0, $0, %2, 1 \n" | 139 | " " __INS "%0, $0, %2, 1 \n" |
@@ -141,7 +143,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
141 | "2: b 1b \n" | 143 | "2: b 1b \n" |
142 | " .previous \n" | 144 | " .previous \n" |
143 | : "=&r" (temp), "=m" (*m) | 145 | : "=&r" (temp), "=m" (*m) |
144 | : "ir" (nr & SZLONG_MASK), "m" (*m)); | 146 | : "ir" (bit), "m" (*m)); |
145 | #endif /* CONFIG_CPU_MIPSR2 */ | 147 | #endif /* CONFIG_CPU_MIPSR2 */ |
146 | } else if (cpu_has_llsc) { | 148 | } else if (cpu_has_llsc) { |
147 | __asm__ __volatile__( | 149 | __asm__ __volatile__( |
@@ -155,14 +157,14 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
155 | " .previous \n" | 157 | " .previous \n" |
156 | " .set mips0 \n" | 158 | " .set mips0 \n" |
157 | : "=&r" (temp), "=m" (*m) | 159 | : "=&r" (temp), "=m" (*m) |
158 | : "ir" (~(1UL << (nr & SZLONG_MASK))), "m" (*m)); | 160 | : "ir" (~(1UL << bit)), "m" (*m)); |
159 | } else { | 161 | } else { |
160 | volatile unsigned long *a = addr; | 162 | volatile unsigned long *a = addr; |
161 | unsigned long mask; | 163 | unsigned long mask; |
162 | unsigned long flags; | 164 | unsigned long flags; |
163 | 165 | ||
164 | a += nr >> SZLONG_LOG; | 166 | a += nr >> SZLONG_LOG; |
165 | mask = 1UL << (nr & SZLONG_MASK); | 167 | mask = 1UL << bit; |
166 | local_irq_save(flags); | 168 | local_irq_save(flags); |
167 | *a &= ~mask; | 169 | *a &= ~mask; |
168 | local_irq_restore(flags); | 170 | local_irq_restore(flags); |
@@ -180,6 +182,8 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
180 | */ | 182 | */ |
181 | static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | 183 | static inline void change_bit(unsigned long nr, volatile unsigned long *addr) |
182 | { | 184 | { |
185 | unsigned short bit = nr & SZLONG_MASK; | ||
186 | |||
183 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 187 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
184 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 188 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
185 | unsigned long temp; | 189 | unsigned long temp; |
@@ -192,7 +196,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | |||
192 | " beqzl %0, 1b \n" | 196 | " beqzl %0, 1b \n" |
193 | " .set mips0 \n" | 197 | " .set mips0 \n" |
194 | : "=&r" (temp), "=m" (*m) | 198 | : "=&r" (temp), "=m" (*m) |
195 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); | 199 | : "ir" (1UL << bit), "m" (*m)); |
196 | } else if (cpu_has_llsc) { | 200 | } else if (cpu_has_llsc) { |
197 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 201 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
198 | unsigned long temp; | 202 | unsigned long temp; |
@@ -208,14 +212,14 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | |||
208 | " .previous \n" | 212 | " .previous \n" |
209 | " .set mips0 \n" | 213 | " .set mips0 \n" |
210 | : "=&r" (temp), "=m" (*m) | 214 | : "=&r" (temp), "=m" (*m) |
211 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); | 215 | : "ir" (1UL << bit), "m" (*m)); |
212 | } else { | 216 | } else { |
213 | volatile unsigned long *a = addr; | 217 | volatile unsigned long *a = addr; |
214 | unsigned long mask; | 218 | unsigned long mask; |
215 | unsigned long flags; | 219 | unsigned long flags; |
216 | 220 | ||
217 | a += nr >> SZLONG_LOG; | 221 | a += nr >> SZLONG_LOG; |
218 | mask = 1UL << (nr & SZLONG_MASK); | 222 | mask = 1UL << bit; |
219 | local_irq_save(flags); | 223 | local_irq_save(flags); |
220 | *a ^= mask; | 224 | *a ^= mask; |
221 | local_irq_restore(flags); | 225 | local_irq_restore(flags); |
@@ -233,6 +237,8 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | |||
233 | static inline int test_and_set_bit(unsigned long nr, | 237 | static inline int test_and_set_bit(unsigned long nr, |
234 | volatile unsigned long *addr) | 238 | volatile unsigned long *addr) |
235 | { | 239 | { |
240 | unsigned short bit = nr & SZLONG_MASK; | ||
241 | |||
236 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 242 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
237 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 243 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
238 | unsigned long temp, res; | 244 | unsigned long temp, res; |
@@ -246,7 +252,7 @@ static inline int test_and_set_bit(unsigned long nr, | |||
246 | " and %2, %0, %3 \n" | 252 | " and %2, %0, %3 \n" |
247 | " .set mips0 \n" | 253 | " .set mips0 \n" |
248 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 254 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
249 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 255 | : "r" (1UL << bit), "m" (*m) |
250 | : "memory"); | 256 | : "memory"); |
251 | 257 | ||
252 | return res != 0; | 258 | return res != 0; |
@@ -269,7 +275,7 @@ static inline int test_and_set_bit(unsigned long nr, | |||
269 | " .previous \n" | 275 | " .previous \n" |
270 | " .set pop \n" | 276 | " .set pop \n" |
271 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 277 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
272 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 278 | : "r" (1UL << bit), "m" (*m) |
273 | : "memory"); | 279 | : "memory"); |
274 | 280 | ||
275 | return res != 0; | 281 | return res != 0; |
@@ -280,7 +286,7 @@ static inline int test_and_set_bit(unsigned long nr, | |||
280 | unsigned long flags; | 286 | unsigned long flags; |
281 | 287 | ||
282 | a += nr >> SZLONG_LOG; | 288 | a += nr >> SZLONG_LOG; |
283 | mask = 1UL << (nr & SZLONG_MASK); | 289 | mask = 1UL << bit; |
284 | local_irq_save(flags); | 290 | local_irq_save(flags); |
285 | retval = (mask & *a) != 0; | 291 | retval = (mask & *a) != 0; |
286 | *a |= mask; | 292 | *a |= mask; |
@@ -303,6 +309,8 @@ static inline int test_and_set_bit(unsigned long nr, | |||
303 | static inline int test_and_clear_bit(unsigned long nr, | 309 | static inline int test_and_clear_bit(unsigned long nr, |
304 | volatile unsigned long *addr) | 310 | volatile unsigned long *addr) |
305 | { | 311 | { |
312 | unsigned short bit = nr & SZLONG_MASK; | ||
313 | |||
306 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 314 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
307 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 315 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
308 | unsigned long temp, res; | 316 | unsigned long temp, res; |
@@ -317,7 +325,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
317 | " and %2, %0, %3 \n" | 325 | " and %2, %0, %3 \n" |
318 | " .set mips0 \n" | 326 | " .set mips0 \n" |
319 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 327 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
320 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 328 | : "r" (1UL << bit), "m" (*m) |
321 | : "memory"); | 329 | : "memory"); |
322 | 330 | ||
323 | return res != 0; | 331 | return res != 0; |
@@ -336,7 +344,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
336 | "2: b 1b \n" | 344 | "2: b 1b \n" |
337 | " .previous \n" | 345 | " .previous \n" |
338 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 346 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
339 | : "ri" (nr & SZLONG_MASK), "m" (*m) | 347 | : "ri" (bit), "m" (*m) |
340 | : "memory"); | 348 | : "memory"); |
341 | 349 | ||
342 | return res; | 350 | return res; |
@@ -361,7 +369,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
361 | " .previous \n" | 369 | " .previous \n" |
362 | " .set pop \n" | 370 | " .set pop \n" |
363 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 371 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
364 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 372 | : "r" (1UL << bit), "m" (*m) |
365 | : "memory"); | 373 | : "memory"); |
366 | 374 | ||
367 | return res != 0; | 375 | return res != 0; |
@@ -372,7 +380,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
372 | unsigned long flags; | 380 | unsigned long flags; |
373 | 381 | ||
374 | a += nr >> SZLONG_LOG; | 382 | a += nr >> SZLONG_LOG; |
375 | mask = 1UL << (nr & SZLONG_MASK); | 383 | mask = 1UL << bit; |
376 | local_irq_save(flags); | 384 | local_irq_save(flags); |
377 | retval = (mask & *a) != 0; | 385 | retval = (mask & *a) != 0; |
378 | *a &= ~mask; | 386 | *a &= ~mask; |
@@ -395,6 +403,8 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
395 | static inline int test_and_change_bit(unsigned long nr, | 403 | static inline int test_and_change_bit(unsigned long nr, |
396 | volatile unsigned long *addr) | 404 | volatile unsigned long *addr) |
397 | { | 405 | { |
406 | unsigned short bit = nr & SZLONG_MASK; | ||
407 | |||
398 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 408 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
399 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 409 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
400 | unsigned long temp, res; | 410 | unsigned long temp, res; |
@@ -408,7 +418,7 @@ static inline int test_and_change_bit(unsigned long nr, | |||
408 | " and %2, %0, %3 \n" | 418 | " and %2, %0, %3 \n" |
409 | " .set mips0 \n" | 419 | " .set mips0 \n" |
410 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 420 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
411 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 421 | : "r" (1UL << bit), "m" (*m) |
412 | : "memory"); | 422 | : "memory"); |
413 | 423 | ||
414 | return res != 0; | 424 | return res != 0; |
@@ -431,7 +441,7 @@ static inline int test_and_change_bit(unsigned long nr, | |||
431 | " .previous \n" | 441 | " .previous \n" |
432 | " .set pop \n" | 442 | " .set pop \n" |
433 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 443 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
434 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 444 | : "r" (1UL << bit), "m" (*m) |
435 | : "memory"); | 445 | : "memory"); |
436 | 446 | ||
437 | return res != 0; | 447 | return res != 0; |
@@ -441,7 +451,7 @@ static inline int test_and_change_bit(unsigned long nr, | |||
441 | unsigned long flags; | 451 | unsigned long flags; |
442 | 452 | ||
443 | a += nr >> SZLONG_LOG; | 453 | a += nr >> SZLONG_LOG; |
444 | mask = 1UL << (nr & SZLONG_MASK); | 454 | mask = 1UL << bit; |
445 | local_irq_save(flags); | 455 | local_irq_save(flags); |
446 | retval = (mask & *a) != 0; | 456 | retval = (mask & *a) != 0; |
447 | *a ^= mask; | 457 | *a ^= mask; |
diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h index e06ef0776d48..833437d31ef1 100644 --- a/include/asm-mips/dma.h +++ b/include/asm-mips/dma.h | |||
@@ -74,7 +74,7 @@ | |||
74 | * | 74 | * |
75 | */ | 75 | */ |
76 | 76 | ||
77 | #ifndef GENERIC_ISA_DMA_SUPPORT_BROKEN | 77 | #ifndef CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN |
78 | #define MAX_DMA_CHANNELS 8 | 78 | #define MAX_DMA_CHANNELS 8 |
79 | #endif | 79 | #endif |
80 | 80 | ||
diff --git a/include/asm-mips/ds1742.h b/include/asm-mips/ds1742.h deleted file mode 100644 index c2f2c32da637..000000000000 --- a/include/asm-mips/ds1742.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
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 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | ||
8 | #ifndef _ASM_DS1742_H | ||
9 | #define _ASM_DS1742_H | ||
10 | |||
11 | #include <ds1742.h> | ||
12 | |||
13 | #endif /* _ASM_DS1742_H */ | ||
diff --git a/include/asm-mips/ioctl.h b/include/asm-mips/ioctl.h index cba641a6ce09..2036fcb9f117 100644 --- a/include/asm-mips/ioctl.h +++ b/include/asm-mips/ioctl.h | |||
@@ -38,11 +38,6 @@ | |||
38 | #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) | 38 | #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * We to additionally limit parameters to a maximum 255 bytes. | ||
42 | */ | ||
43 | #define _IOC_SLMASK 0xff | ||
44 | |||
45 | /* | ||
46 | * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. | 41 | * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. |
47 | * And this turns out useful to catch old ioctl numbers in header | 42 | * And this turns out useful to catch old ioctl numbers in header |
48 | * files for us. | 43 | * files for us. |
diff --git a/include/asm-mips/jmr3927/jmr3927.h b/include/asm-mips/jmr3927/jmr3927.h index baf412967afa..c50e68ffa3af 100644 --- a/include/asm-mips/jmr3927/jmr3927.h +++ b/include/asm-mips/jmr3927/jmr3927.h | |||
@@ -179,12 +179,6 @@ static inline int jmr3927_have_isac(void) | |||
179 | #define jmr3927_have_nvram() \ | 179 | #define jmr3927_have_nvram() \ |
180 | ((jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR) & JMR3927_IDT_MASK) == JMR3927_IOC_IDT) | 180 | ((jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR) & JMR3927_IDT_MASK) == JMR3927_IOC_IDT) |
181 | 181 | ||
182 | /* NVRAM macro */ | ||
183 | #define jmr3927_nvram_in(ofs) \ | ||
184 | jmr3927_ioc_reg_in(JMR3927_IOC_NVRAMB_ADDR + ((ofs) << 1)) | ||
185 | #define jmr3927_nvram_out(d, ofs) \ | ||
186 | jmr3927_ioc_reg_out(d, JMR3927_IOC_NVRAMB_ADDR + ((ofs) << 1)) | ||
187 | |||
188 | /* LED macro */ | 182 | /* LED macro */ |
189 | #define jmr3927_led_set(n/*0-16*/) jmr3927_ioc_reg_out(~(n), JMR3927_IOC_LED_ADDR) | 183 | #define jmr3927_led_set(n/*0-16*/) jmr3927_ioc_reg_out(~(n), JMR3927_IOC_LED_ADDR) |
190 | #define jmr3927_io_led_set(n/*0-3*/) jmr3927_isac_reg_out((n), JMR3927_ISAC_LED_ADDR) | 184 | #define jmr3927_io_led_set(n/*0-3*/) jmr3927_isac_reg_out((n), JMR3927_ISAC_LED_ADDR) |
diff --git a/include/asm-mips/lasat/lasat.h b/include/asm-mips/lasat/lasat.h index 181afc5c0f1d..42077e367a5b 100644 --- a/include/asm-mips/lasat/lasat.h +++ b/include/asm-mips/lasat/lasat.h | |||
@@ -237,8 +237,6 @@ static inline void lasat_ndelay(unsigned int ns) | |||
237 | __delay(ns / lasat_ndelay_divider); | 237 | __delay(ns / lasat_ndelay_divider); |
238 | } | 238 | } |
239 | 239 | ||
240 | extern void (* prom_printf)(const char *fmt, ...); | ||
241 | |||
242 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ | 240 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ |
243 | 241 | ||
244 | #define LASAT_SERVICEMODE_MAGIC_1 0xdeadbeef | 242 | #define LASAT_SERVICEMODE_MAGIC_1 0xdeadbeef |
diff --git a/include/asm-mips/mach-atlas/mc146818rtc.h b/include/asm-mips/mach-atlas/mc146818rtc.h index a73a5698420c..51d337e1bbd1 100644 --- a/include/asm-mips/mach-atlas/mc146818rtc.h +++ b/include/asm-mips/mach-atlas/mc146818rtc.h | |||
@@ -55,6 +55,6 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
55 | 55 | ||
56 | #define RTC_ALWAYS_BCD 0 | 56 | #define RTC_ALWAYS_BCD 0 |
57 | 57 | ||
58 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | 58 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) |
59 | 59 | ||
60 | #endif /* __ASM_MACH_ATLAS_MC146818RTC_H */ | 60 | #endif /* __ASM_MACH_ATLAS_MC146818RTC_H */ |
diff --git a/include/asm-mips/mach-generic/dma-coherence.h b/include/asm-mips/mach-generic/dma-coherence.h index df71822fd27b..76e04e7feb84 100644 --- a/include/asm-mips/mach-generic/dma-coherence.h +++ b/include/asm-mips/mach-generic/dma-coherence.h | |||
@@ -11,22 +11,24 @@ | |||
11 | 11 | ||
12 | struct device; | 12 | struct device; |
13 | 13 | ||
14 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | 14 | static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, |
15 | size_t size) | ||
15 | { | 16 | { |
16 | return virt_to_phys(addr); | 17 | return virt_to_phys(addr); |
17 | } | 18 | } |
18 | 19 | ||
19 | static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) | 20 | static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, |
21 | struct page *page) | ||
20 | { | 22 | { |
21 | return page_to_phys(page); | 23 | return page_to_phys(page); |
22 | } | 24 | } |
23 | 25 | ||
24 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | 26 | static inline unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) |
25 | { | 27 | { |
26 | return dma_addr; | 28 | return dma_addr; |
27 | } | 29 | } |
28 | 30 | ||
29 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | 31 | static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) |
30 | { | 32 | { |
31 | } | 33 | } |
32 | 34 | ||
diff --git a/include/asm-mips/mach-generic/mc146818rtc.h b/include/asm-mips/mach-generic/mc146818rtc.h index 90c2e6f77faa..0b9a942f079d 100644 --- a/include/asm-mips/mach-generic/mc146818rtc.h +++ b/include/asm-mips/mach-generic/mc146818rtc.h | |||
@@ -30,7 +30,7 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
30 | #define RTC_ALWAYS_BCD 1 | 30 | #define RTC_ALWAYS_BCD 1 |
31 | 31 | ||
32 | #ifndef mc146818_decode_year | 32 | #ifndef mc146818_decode_year |
33 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | 33 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #endif /* __ASM_MACH_GENERIC_MC146818RTC_H */ | 36 | #endif /* __ASM_MACH_GENERIC_MC146818RTC_H */ |
diff --git a/include/asm-mips/mach-ip27/topology.h b/include/asm-mips/mach-ip27/topology.h index 44790fdc5d00..61d9be3f3175 100644 --- a/include/asm-mips/mach-ip27/topology.h +++ b/include/asm-mips/mach-ip27/topology.h | |||
@@ -28,7 +28,6 @@ extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; | |||
28 | .busy_factor = 32, \ | 28 | .busy_factor = 32, \ |
29 | .imbalance_pct = 125, \ | 29 | .imbalance_pct = 125, \ |
30 | .cache_nice_tries = 1, \ | 30 | .cache_nice_tries = 1, \ |
31 | .per_cpu_gain = 100, \ | ||
32 | .flags = SD_LOAD_BALANCE \ | 31 | .flags = SD_LOAD_BALANCE \ |
33 | | SD_BALANCE_EXEC \ | 32 | | SD_BALANCE_EXEC \ |
34 | | SD_WAKE_BALANCE, \ | 33 | | SD_WAKE_BALANCE, \ |
diff --git a/include/asm-mips/mach-jmr3927/ds1742.h b/include/asm-mips/mach-jmr3927/ds1742.h deleted file mode 100644 index 8a8fef6d07fa..000000000000 --- a/include/asm-mips/mach-jmr3927/ds1742.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
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) 2003, 06 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_JMR3927_DS1742_H | ||
9 | #define __ASM_MACH_JMR3927_DS1742_H | ||
10 | |||
11 | #include <asm/jmr3927/jmr3927.h> | ||
12 | |||
13 | #define rtc_read(reg) (jmr3927_nvram_in(reg)) | ||
14 | #define rtc_write(data, reg) (jmr3927_nvram_out((data),(reg))) | ||
15 | |||
16 | #endif /* __ASM_MACH_JMR3927_DS1742_H */ | ||
diff --git a/include/asm-mips/mach-jmr3927/mangle-port.h b/include/asm-mips/mach-jmr3927/mangle-port.h new file mode 100644 index 000000000000..501a202631b5 --- /dev/null +++ b/include/asm-mips/mach-jmr3927/mangle-port.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef __ASM_MACH_JMR3927_MANGLE_PORT_H | ||
2 | #define __ASM_MACH_JMR3927_MANGLE_PORT_H | ||
3 | |||
4 | extern unsigned long __swizzle_addr_b(unsigned long port); | ||
5 | #define __swizzle_addr_w(port) (port) | ||
6 | #define __swizzle_addr_l(port) (port) | ||
7 | #define __swizzle_addr_q(port) (port) | ||
8 | |||
9 | #define ioswabb(a,x) (x) | ||
10 | #define __mem_ioswabb(a,x) (x) | ||
11 | #define ioswabw(a,x) le16_to_cpu(x) | ||
12 | #define __mem_ioswabw(a,x) (x) | ||
13 | #define ioswabl(a,x) le32_to_cpu(x) | ||
14 | #define __mem_ioswabl(a,x) (x) | ||
15 | #define ioswabq(a,x) le64_to_cpu(x) | ||
16 | #define __mem_ioswabq(a,x) (x) | ||
17 | |||
18 | #endif /* __ASM_MACH_JMR3927_MANGLE_PORT_H */ | ||
diff --git a/include/asm-mips/mach-mips/mc146818rtc.h b/include/asm-mips/mach-mips/mc146818rtc.h index 6730ba066576..ea612f37f614 100644 --- a/include/asm-mips/mach-mips/mc146818rtc.h +++ b/include/asm-mips/mach-mips/mc146818rtc.h | |||
@@ -43,6 +43,6 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
43 | 43 | ||
44 | #define RTC_ALWAYS_BCD 0 | 44 | #define RTC_ALWAYS_BCD 0 |
45 | 45 | ||
46 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | 46 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) |
47 | 47 | ||
48 | #endif /* __ASM_MACH_MALTA_MC146818RTC_H */ | 48 | #endif /* __ASM_MACH_MALTA_MC146818RTC_H */ |
diff --git a/include/asm-mips/mach-rm/mc146818rtc.h b/include/asm-mips/mach-rm/mc146818rtc.h index d37ae68dc6a3..145bce096fe9 100644 --- a/include/asm-mips/mach-rm/mc146818rtc.h +++ b/include/asm-mips/mach-rm/mc146818rtc.h | |||
@@ -7,11 +7,15 @@ | |||
7 | * | 7 | * |
8 | * RTC routines for PC style attached Dallas chip with ARC epoch. | 8 | * RTC routines for PC style attached Dallas chip with ARC epoch. |
9 | */ | 9 | */ |
10 | #ifndef __ASM_MACH_RM200_MC146818RTC_H | 10 | #ifndef __ASM_MACH_RM_MC146818RTC_H |
11 | #define __ASM_MACH_RM200_MC146818RTC_H | 11 | #define __ASM_MACH_RM_MC146818RTC_H |
12 | 12 | ||
13 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
14 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) | ||
15 | #else | ||
13 | #define mc146818_decode_year(year) ((year) + 1980) | 16 | #define mc146818_decode_year(year) ((year) + 1980) |
17 | #endif | ||
14 | 18 | ||
15 | #include_next <mc146818rtc.h> | 19 | #include_next <mc146818rtc.h> |
16 | 20 | ||
17 | #endif /* __ASM_MACH_RM200_MC146818RTC_H */ | 21 | #endif /* __ASM_MACH_RM_MC146818RTC_H */ |
diff --git a/include/asm-mips/mips-boards/prom.h b/include/asm-mips/mips-boards/prom.h index 7bf6f5f6ab9c..daaf9f98fc63 100644 --- a/include/asm-mips/mips-boards/prom.h +++ b/include/asm-mips/mips-boards/prom.h | |||
@@ -28,8 +28,6 @@ | |||
28 | 28 | ||
29 | extern char *prom_getcmdline(void); | 29 | extern char *prom_getcmdline(void); |
30 | extern char *prom_getenv(char *name); | 30 | extern char *prom_getenv(char *name); |
31 | extern void setup_prom_printf(int tty_no); | ||
32 | extern void prom_printf(char *fmt, ...); | ||
33 | extern void prom_init_cmdline(void); | 31 | extern void prom_init_cmdline(void); |
34 | extern void prom_meminit(void); | 32 | extern void prom_meminit(void); |
35 | extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem); | 33 | extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem); |
diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h index fdfff0b8ce42..8045abc78d0f 100644 --- a/include/asm-mips/mips_mt.h +++ b/include/asm-mips/mips_mt.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef __ASM_MIPS_MT_H | 6 | #ifndef __ASM_MIPS_MT_H |
7 | #define __ASM_MIPS_MT_H | 7 | #define __ASM_MIPS_MT_H |
8 | 8 | ||
9 | #include <linux/cpumask.h> | ||
10 | |||
9 | extern cpumask_t mt_fpu_cpumask; | 11 | extern cpumask_t mt_fpu_cpumask; |
10 | extern unsigned long mt_fpemul_threshold; | 12 | extern unsigned long mt_fpemul_threshold; |
11 | 13 | ||
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h index 8a1f2b6f04ac..1906938285c0 100644 --- a/include/asm-mips/ptrace.h +++ b/include/asm-mips/ptrace.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #define FPC_EIR 70 | 21 | #define FPC_EIR 70 |
22 | #define DSP_BASE 71 /* 3 more hi / lo register pairs */ | 22 | #define DSP_BASE 71 /* 3 more hi / lo register pairs */ |
23 | #define DSP_CONTROL 77 | 23 | #define DSP_CONTROL 77 |
24 | #define ACX 78 | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * This struct defines the way the registers are stored on the stack during a | 27 | * This struct defines the way the registers are stored on the stack during a |
@@ -39,6 +40,9 @@ struct pt_regs { | |||
39 | unsigned long cp0_status; | 40 | unsigned long cp0_status; |
40 | unsigned long hi; | 41 | unsigned long hi; |
41 | unsigned long lo; | 42 | unsigned long lo; |
43 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
44 | unsigned long acx; | ||
45 | #endif | ||
42 | unsigned long cp0_badvaddr; | 46 | unsigned long cp0_badvaddr; |
43 | unsigned long cp0_cause; | 47 | unsigned long cp0_cause; |
44 | unsigned long cp0_epc; | 48 | unsigned long cp0_epc; |
diff --git a/include/asm-mips/sgialib.h b/include/asm-mips/sgialib.h index 73f097315502..bfce5c786f1c 100644 --- a/include/asm-mips/sgialib.h +++ b/include/asm-mips/sgialib.h | |||
@@ -33,9 +33,6 @@ extern int prom_flags; | |||
33 | extern void prom_putchar(char c); | 33 | extern void prom_putchar(char c); |
34 | extern char prom_getchar(void); | 34 | extern char prom_getchar(void); |
35 | 35 | ||
36 | /* Generic printf() using ARCS console I/O. */ | ||
37 | extern void prom_printf(char *fmt, ...); | ||
38 | |||
39 | /* Memory descriptor management. */ | 36 | /* Memory descriptor management. */ |
40 | #define PROM_MAX_PMEMBLOCKS 32 | 37 | #define PROM_MAX_PMEMBLOCKS 32 |
41 | struct prom_pmemblock { | 38 | struct prom_pmemblock { |
diff --git a/include/asm-mips/sibyte/sb1250.h b/include/asm-mips/sibyte/sb1250.h index 2ba6988ddc8e..dfb29e13bce0 100644 --- a/include/asm-mips/sibyte/sb1250.h +++ b/include/asm-mips/sibyte/sb1250.h | |||
@@ -57,8 +57,6 @@ extern void bcm1480_mask_irq(int cpu, int irq); | |||
57 | extern void bcm1480_unmask_irq(int cpu, int irq); | 57 | extern void bcm1480_unmask_irq(int cpu, int irq); |
58 | extern void bcm1480_smp_finish(void); | 58 | extern void bcm1480_smp_finish(void); |
59 | 59 | ||
60 | extern void prom_printf(char *fmt, ...); | ||
61 | |||
62 | #define AT_spin \ | 60 | #define AT_spin \ |
63 | __asm__ __volatile__ ( \ | 61 | __asm__ __volatile__ ( \ |
64 | ".set noat\n" \ | 62 | ".set noat\n" \ |
diff --git a/include/asm-mips/sibyte/trace_prof.h b/include/asm-mips/sibyte/trace_prof.h deleted file mode 100644 index 557792075e9a..000000000000 --- a/include/asm-mips/sibyte/trace_prof.h +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_SIBYTE_TRACE_PROF_H | ||
20 | #define __ASM_SIBYTE_TRACE_PROF_H | ||
21 | |||
22 | #undef DBG | ||
23 | #if SBPROF_TB_DEBUG | ||
24 | #define DBG(a) a | ||
25 | #else | ||
26 | #define DBG(a) | ||
27 | #endif | ||
28 | |||
29 | #define SBPROF_TB_MAJOR 240 | ||
30 | #define DEVNAME "bcm1250_tbprof" | ||
31 | |||
32 | typedef u_int64_t tb_sample_t[6*256]; | ||
33 | |||
34 | struct sbprof_tb { | ||
35 | int open; | ||
36 | tb_sample_t *sbprof_tbbuf; | ||
37 | int next_tb_sample; | ||
38 | |||
39 | volatile int tb_enable; | ||
40 | volatile int tb_armed; | ||
41 | |||
42 | wait_queue_head_t tb_sync; | ||
43 | wait_queue_head_t tb_read; | ||
44 | }; | ||
45 | |||
46 | #define MAX_SAMPLE_BYTES (24*1024*1024) | ||
47 | #define MAX_TBSAMPLE_BYTES (12*1024*1024) | ||
48 | |||
49 | #define MAX_SAMPLES (MAX_SAMPLE_BYTES/sizeof(u_int32_t)) | ||
50 | #define TB_SAMPLE_SIZE (sizeof(tb_sample_t)) | ||
51 | #define MAX_TB_SAMPLES (MAX_TBSAMPLE_BYTES/TB_SAMPLE_SIZE) | ||
52 | |||
53 | /* IOCTLs */ | ||
54 | #define SBPROF_ZBSTART _IOW('s', 0, int) | ||
55 | #define SBPROF_ZBSTOP _IOW('s', 1, int) | ||
56 | #define SBPROF_ZBWAITFULL _IOW('s', 2, int) | ||
57 | |||
58 | /*************************************************************************** | ||
59 | * Routines for gathering ZBbus profiles using trace buffer | ||
60 | ***************************************************************************/ | ||
61 | |||
62 | /* Requires: Already called zclk_timer_init with a value that won't | ||
63 | saturate 40 bits. No subsequent use of SCD performance counters | ||
64 | or trace buffer. | ||
65 | Effect: Starts gathering random ZBbus profiles using trace buffer. */ | ||
66 | extern int sbprof_zbprof_start(struct file *filp); | ||
67 | |||
68 | /* Effect: Stops collection of ZBbus profiles */ | ||
69 | extern int sbprof_zbprof_stop(void); | ||
70 | |||
71 | |||
72 | /*************************************************************************** | ||
73 | * Routines for using 40-bit SCD cycle counter | ||
74 | * | ||
75 | * Client responsible for either handling interrupts or making sure | ||
76 | * the cycles counter never saturates, e.g., by doing | ||
77 | * zclk_timer_init(0) at least every 2^40 - 1 ZCLKs. | ||
78 | ***************************************************************************/ | ||
79 | |||
80 | /* Configures SCD counter 0 to count ZCLKs starting from val; | ||
81 | Configures SCD counters1,2,3 to count nothing. | ||
82 | Must not be called while gathering ZBbus profiles. | ||
83 | |||
84 | unsigned long long val; */ | ||
85 | #define zclk_timer_init(val) \ | ||
86 | __asm__ __volatile__ (".set push;" \ | ||
87 | ".set mips64;" \ | ||
88 | "la $8, 0xb00204c0;" /* SCD perf_cnt_cfg */ \ | ||
89 | "sd %0, 0x10($8);" /* write val to counter0 */ \ | ||
90 | "sd %1, 0($8);" /* config counter0 for zclks*/ \ | ||
91 | ".set pop" \ | ||
92 | : /* no outputs */ \ | ||
93 | /* enable, counter0 */ \ | ||
94 | : /* inputs */ "r"(val), "r" ((1ULL << 33) | 1ULL) \ | ||
95 | : /* modifies */ "$8" ) | ||
96 | |||
97 | |||
98 | /* Reads SCD counter 0 and puts result in value | ||
99 | unsigned long long val; */ | ||
100 | #define zclk_get(val) \ | ||
101 | __asm__ __volatile__ (".set push;" \ | ||
102 | ".set mips64;" \ | ||
103 | "la $8, 0xb00204c0;" /* SCD perf_cnt_cfg */ \ | ||
104 | "ld %0, 0x10($8);" /* write val to counter0 */ \ | ||
105 | ".set pop" \ | ||
106 | : /* outputs */ "=r"(val) \ | ||
107 | : /* inputs */ \ | ||
108 | : /* modifies */ "$8" ) | ||
109 | |||
110 | #endif /* __ASM_SIBYTE_TRACE_PROF_H */ | ||
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index 972947474eb7..9ce0607d7a4e 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h | |||
@@ -23,7 +23,7 @@ struct sigcontext { | |||
23 | unsigned long long sc_pc; | 23 | unsigned long long sc_pc; |
24 | unsigned long long sc_regs[32]; | 24 | unsigned long long sc_regs[32]; |
25 | unsigned long long sc_fpregs[32]; | 25 | unsigned long long sc_fpregs[32]; |
26 | unsigned int sc_ownedfp; /* Unused */ | 26 | unsigned int sc_acx; /* Was sc_ownedfp */ |
27 | unsigned int sc_fpc_csr; | 27 | unsigned int sc_fpc_csr; |
28 | unsigned int sc_fpc_eir; /* Unused */ | 28 | unsigned int sc_fpc_eir; /* Unused */ |
29 | unsigned int sc_used_math; | 29 | unsigned int sc_used_math; |
@@ -79,7 +79,7 @@ struct sigcontext32 { | |||
79 | __u64 sc_pc; | 79 | __u64 sc_pc; |
80 | __u64 sc_regs[32]; | 80 | __u64 sc_regs[32]; |
81 | __u64 sc_fpregs[32]; | 81 | __u64 sc_fpregs[32]; |
82 | __u32 sc_ownedfp; /* Unused */ | 82 | __u32 sc_acx; /* Only MIPS32; was sc_ownedfp */ |
83 | __u32 sc_fpc_csr; | 83 | __u32 sc_fpc_csr; |
84 | __u32 sc_fpc_eir; /* Unused */ | 84 | __u32 sc_fpc_eir; /* Unused */ |
85 | __u32 sc_used_math; | 85 | __u32 sc_used_math; |
diff --git a/include/asm-mips/smtc.h b/include/asm-mips/smtc.h index e1941d1b8726..44dfa4adecf3 100644 --- a/include/asm-mips/smtc.h +++ b/include/asm-mips/smtc.h | |||
@@ -34,6 +34,9 @@ typedef long asiduse; | |||
34 | 34 | ||
35 | extern asiduse smtc_live_asid[MAX_SMTC_TLBS][MAX_SMTC_ASIDS]; | 35 | extern asiduse smtc_live_asid[MAX_SMTC_TLBS][MAX_SMTC_ASIDS]; |
36 | 36 | ||
37 | struct mm_struct; | ||
38 | struct task_struct; | ||
39 | |||
37 | void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu); | 40 | void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu); |
38 | 41 | ||
39 | void smtc_flush_tlb_asid(unsigned long asid); | 42 | void smtc_flush_tlb_asid(unsigned long asid); |
diff --git a/include/asm-mips/smtc_ipi.h b/include/asm-mips/smtc_ipi.h index 55f3419f6546..360ea6d250c7 100644 --- a/include/asm-mips/smtc_ipi.h +++ b/include/asm-mips/smtc_ipi.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #ifndef __ASM_SMTC_IPI_H | 4 | #ifndef __ASM_SMTC_IPI_H |
5 | #define __ASM_SMTC_IPI_H | 5 | #define __ASM_SMTC_IPI_H |
6 | 6 | ||
7 | #include <linux/spinlock.h> | ||
8 | |||
7 | //#define SMTC_IPI_DEBUG | 9 | //#define SMTC_IPI_DEBUG |
8 | 10 | ||
9 | #ifdef SMTC_IPI_DEBUG | 11 | #ifdef SMTC_IPI_DEBUG |
diff --git a/include/asm-mips/sni.h b/include/asm-mips/sni.h index 62f9be6f7320..f257509b914f 100644 --- a/include/asm-mips/sni.h +++ b/include/asm-mips/sni.h | |||
@@ -141,10 +141,9 @@ extern unsigned int sni_brd_type; | |||
141 | #define A20R_PT_TIM0_ACK 0xbc050000 | 141 | #define A20R_PT_TIM0_ACK 0xbc050000 |
142 | #define A20R_PT_TIM1_ACK 0xbc060000 | 142 | #define A20R_PT_TIM1_ACK 0xbc060000 |
143 | 143 | ||
144 | #define SNI_MIPS_IRQ_CPU_BASE 16 | 144 | #define SNI_MIPS_IRQ_CPU_TIMER (MIPS_CPU_IRQ_BASE+7) |
145 | #define SNI_MIPS_IRQ_CPU_TIMER (SNI_MIPS_IRQ_CPU_BASE+7) | ||
146 | 145 | ||
147 | #define SNI_A20R_IRQ_BASE SNI_MIPS_IRQ_CPU_BASE | 146 | #define SNI_A20R_IRQ_BASE MIPS_CPU_IRQ_BASE |
148 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) | 147 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) |
149 | 148 | ||
150 | #define SNI_DS1216_A20R_BASE 0xbc081ffc | 149 | #define SNI_DS1216_A20R_BASE 0xbc081ffc |
@@ -155,7 +154,7 @@ extern unsigned int sni_brd_type; | |||
155 | #define SNI_PCIT_INT_START 24 | 154 | #define SNI_PCIT_INT_START 24 |
156 | #define SNI_PCIT_INT_END 30 | 155 | #define SNI_PCIT_INT_END 30 |
157 | 156 | ||
158 | #define PCIT_IRQ_ETHERNET (SNI_MIPS_IRQ_CPU_BASE + 5) | 157 | #define PCIT_IRQ_ETHERNET (MIPS_CPU_IRQ_BASE + 5) |
159 | #define PCIT_IRQ_INTA (SNI_PCIT_INT_START + 0) | 158 | #define PCIT_IRQ_INTA (SNI_PCIT_INT_START + 0) |
160 | #define PCIT_IRQ_INTB (SNI_PCIT_INT_START + 1) | 159 | #define PCIT_IRQ_INTB (SNI_PCIT_INT_START + 1) |
161 | #define PCIT_IRQ_INTC (SNI_PCIT_INT_START + 2) | 160 | #define PCIT_IRQ_INTC (SNI_PCIT_INT_START + 2) |
@@ -180,7 +179,7 @@ extern unsigned int sni_brd_type; | |||
180 | #define PCIMT_IRQ_EISA 29 | 179 | #define PCIMT_IRQ_EISA 29 |
181 | #define PCIMT_IRQ_SCSI 30 | 180 | #define PCIMT_IRQ_SCSI 30 |
182 | 181 | ||
183 | #define PCIMT_IRQ_ETHERNET (SNI_MIPS_IRQ_CPU_BASE+6) | 182 | #define PCIMT_IRQ_ETHERNET (MIPS_CPU_IRQ_BASE+6) |
184 | 183 | ||
185 | #if 0 | 184 | #if 0 |
186 | #define PCIMT_IRQ_TEMPERATURE 24 | 185 | #define PCIMT_IRQ_TEMPERATURE 24 |
diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h index f1755d28a36a..35e431cd796b 100644 --- a/include/asm-mips/spinlock.h +++ b/include/asm-mips/spinlock.h | |||
@@ -287,7 +287,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw) | |||
287 | " .set noreorder # __raw_read_trylock \n" | 287 | " .set noreorder # __raw_read_trylock \n" |
288 | " li %2, 0 \n" | 288 | " li %2, 0 \n" |
289 | "1: ll %1, %3 \n" | 289 | "1: ll %1, %3 \n" |
290 | " bnez %1, 2f \n" | 290 | " bltz %1, 2f \n" |
291 | " addu %1, 1 \n" | 291 | " addu %1, 1 \n" |
292 | " sc %1, %0 \n" | 292 | " sc %1, %0 \n" |
293 | " .set reorder \n" | 293 | " .set reorder \n" |
@@ -304,7 +304,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw) | |||
304 | " .set noreorder # __raw_read_trylock \n" | 304 | " .set noreorder # __raw_read_trylock \n" |
305 | " li %2, 0 \n" | 305 | " li %2, 0 \n" |
306 | "1: ll %1, %3 \n" | 306 | "1: ll %1, %3 \n" |
307 | " bnez %1, 2f \n" | 307 | " bltz %1, 2f \n" |
308 | " addu %1, 1 \n" | 308 | " addu %1, 1 \n" |
309 | " sc %1, %0 \n" | 309 | " sc %1, %0 \n" |
310 | " beqz %1, 1b \n" | 310 | " beqz %1, 1b \n" |
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 1fae5dc58138..7afa1fdf70ca 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h | |||
@@ -29,16 +29,25 @@ | |||
29 | .endm | 29 | .endm |
30 | 30 | ||
31 | .macro SAVE_TEMP | 31 | .macro SAVE_TEMP |
32 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
33 | mflhxu v1 | ||
34 | LONG_S v1, PT_LO(sp) | ||
35 | mflhxu v1 | ||
36 | LONG_S v1, PT_HI(sp) | ||
37 | mflhxu v1 | ||
38 | LONG_S v1, PT_ACX(sp) | ||
39 | #else | ||
32 | mfhi v1 | 40 | mfhi v1 |
41 | LONG_S v1, PT_HI(sp) | ||
42 | mflo v1 | ||
43 | LONG_S v1, PT_LO(sp) | ||
44 | #endif | ||
33 | #ifdef CONFIG_32BIT | 45 | #ifdef CONFIG_32BIT |
34 | LONG_S $8, PT_R8(sp) | 46 | LONG_S $8, PT_R8(sp) |
35 | LONG_S $9, PT_R9(sp) | 47 | LONG_S $9, PT_R9(sp) |
36 | #endif | 48 | #endif |
37 | LONG_S v1, PT_HI(sp) | ||
38 | mflo v1 | ||
39 | LONG_S $10, PT_R10(sp) | 49 | LONG_S $10, PT_R10(sp) |
40 | LONG_S $11, PT_R11(sp) | 50 | LONG_S $11, PT_R11(sp) |
41 | LONG_S v1, PT_LO(sp) | ||
42 | LONG_S $12, PT_R12(sp) | 51 | LONG_S $12, PT_R12(sp) |
43 | LONG_S $13, PT_R13(sp) | 52 | LONG_S $13, PT_R13(sp) |
44 | LONG_S $14, PT_R14(sp) | 53 | LONG_S $14, PT_R14(sp) |
@@ -182,16 +191,25 @@ | |||
182 | .endm | 191 | .endm |
183 | 192 | ||
184 | .macro RESTORE_TEMP | 193 | .macro RESTORE_TEMP |
194 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
195 | LONG_L $24, PT_ACX(sp) | ||
196 | mtlhx $24 | ||
197 | LONG_L $24, PT_HI(sp) | ||
198 | mtlhx $24 | ||
185 | LONG_L $24, PT_LO(sp) | 199 | LONG_L $24, PT_LO(sp) |
200 | mtlhx $24 | ||
201 | #else | ||
202 | LONG_L $24, PT_LO(sp) | ||
203 | mtlo $24 | ||
204 | LONG_L $24, PT_HI(sp) | ||
205 | mthi $24 | ||
206 | #endif | ||
186 | #ifdef CONFIG_32BIT | 207 | #ifdef CONFIG_32BIT |
187 | LONG_L $8, PT_R8(sp) | 208 | LONG_L $8, PT_R8(sp) |
188 | LONG_L $9, PT_R9(sp) | 209 | LONG_L $9, PT_R9(sp) |
189 | #endif | 210 | #endif |
190 | mtlo $24 | ||
191 | LONG_L $24, PT_HI(sp) | ||
192 | LONG_L $10, PT_R10(sp) | 211 | LONG_L $10, PT_R10(sp) |
193 | LONG_L $11, PT_R11(sp) | 212 | LONG_L $11, PT_R11(sp) |
194 | mthi $24 | ||
195 | LONG_L $12, PT_R12(sp) | 213 | LONG_L $12, PT_R12(sp) |
196 | LONG_L $13, PT_R13(sp) | 214 | LONG_L $13, PT_R13(sp) |
197 | LONG_L $14, PT_R14(sp) | 215 | LONG_L $14, PT_R14(sp) |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index c62c20e7b5c6..b25511787ee0 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -435,6 +435,8 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); | |||
435 | __cu_len; \ | 435 | __cu_len; \ |
436 | }) | 436 | }) |
437 | 437 | ||
438 | extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | ||
439 | |||
438 | #define __copy_to_user_inatomic(to,from,n) \ | 440 | #define __copy_to_user_inatomic(to,from,n) \ |
439 | ({ \ | 441 | ({ \ |
440 | void __user *__cu_to; \ | 442 | void __user *__cu_to; \ |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 696cff39a1d3..2f1087b3a202 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -334,16 +334,18 @@ | |||
334 | #define __NR_kexec_load (__NR_Linux + 311) | 334 | #define __NR_kexec_load (__NR_Linux + 311) |
335 | #define __NR_getcpu (__NR_Linux + 312) | 335 | #define __NR_getcpu (__NR_Linux + 312) |
336 | #define __NR_epoll_pwait (__NR_Linux + 313) | 336 | #define __NR_epoll_pwait (__NR_Linux + 313) |
337 | #define __NR_ioprio_set (__NR_Linux + 314) | ||
338 | #define __NR_ioprio_get (__NR_Linux + 315) | ||
337 | 339 | ||
338 | /* | 340 | /* |
339 | * Offset of the last Linux o32 flavoured syscall | 341 | * Offset of the last Linux o32 flavoured syscall |
340 | */ | 342 | */ |
341 | #define __NR_Linux_syscalls 313 | 343 | #define __NR_Linux_syscalls 315 |
342 | 344 | ||
343 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 345 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
344 | 346 | ||
345 | #define __NR_O32_Linux 4000 | 347 | #define __NR_O32_Linux 4000 |
346 | #define __NR_O32_Linux_syscalls 313 | 348 | #define __NR_O32_Linux_syscalls 315 |
347 | 349 | ||
348 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 350 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
349 | 351 | ||
@@ -624,16 +626,18 @@ | |||
624 | #define __NR_kexec_load (__NR_Linux + 270) | 626 | #define __NR_kexec_load (__NR_Linux + 270) |
625 | #define __NR_getcpu (__NR_Linux + 271) | 627 | #define __NR_getcpu (__NR_Linux + 271) |
626 | #define __NR_epoll_pwait (__NR_Linux + 272) | 628 | #define __NR_epoll_pwait (__NR_Linux + 272) |
629 | #define __NR_ioprio_set (__NR_Linux + 273) | ||
630 | #define __NR_ioprio_get (__NR_Linux + 274) | ||
627 | 631 | ||
628 | /* | 632 | /* |
629 | * Offset of the last Linux 64-bit flavoured syscall | 633 | * Offset of the last Linux 64-bit flavoured syscall |
630 | */ | 634 | */ |
631 | #define __NR_Linux_syscalls 272 | 635 | #define __NR_Linux_syscalls 274 |
632 | 636 | ||
633 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 637 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
634 | 638 | ||
635 | #define __NR_64_Linux 5000 | 639 | #define __NR_64_Linux 5000 |
636 | #define __NR_64_Linux_syscalls 272 | 640 | #define __NR_64_Linux_syscalls 274 |
637 | 641 | ||
638 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 642 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
639 | 643 | ||
@@ -918,16 +922,18 @@ | |||
918 | #define __NR_kexec_load (__NR_Linux + 274) | 922 | #define __NR_kexec_load (__NR_Linux + 274) |
919 | #define __NR_getcpu (__NR_Linux + 275) | 923 | #define __NR_getcpu (__NR_Linux + 275) |
920 | #define __NR_epoll_pwait (__NR_Linux + 276) | 924 | #define __NR_epoll_pwait (__NR_Linux + 276) |
925 | #define __NR_ioprio_set (__NR_Linux + 277) | ||
926 | #define __NR_ioprio_get (__NR_Linux + 278) | ||
921 | 927 | ||
922 | /* | 928 | /* |
923 | * Offset of the last N32 flavoured syscall | 929 | * Offset of the last N32 flavoured syscall |
924 | */ | 930 | */ |
925 | #define __NR_Linux_syscalls 276 | 931 | #define __NR_Linux_syscalls 278 |
926 | 932 | ||
927 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 933 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
928 | 934 | ||
929 | #define __NR_N32_Linux 6000 | 935 | #define __NR_N32_Linux 6000 |
930 | #define __NR_N32_Linux_syscalls 276 | 936 | #define __NR_N32_Linux_syscalls 278 |
931 | 937 | ||
932 | #ifdef __KERNEL__ | 938 | #ifdef __KERNEL__ |
933 | 939 | ||
diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h index 5a1e0e8b1c32..5587f0023881 100644 --- a/include/asm-parisc/assembly.h +++ b/include/asm-parisc/assembly.h | |||
@@ -31,9 +31,13 @@ | |||
31 | #define STREGM std,ma | 31 | #define STREGM std,ma |
32 | #define SHRREG shrd | 32 | #define SHRREG shrd |
33 | #define SHLREG shld | 33 | #define SHLREG shld |
34 | #define ADDIB addib,* | ||
35 | #define CMPB cmpb,* | ||
36 | #define ANDCM andcm,* | ||
34 | #define RP_OFFSET 16 | 37 | #define RP_OFFSET 16 |
35 | #define FRAME_SIZE 128 | 38 | #define FRAME_SIZE 128 |
36 | #define CALLEE_REG_FRAME_SIZE 144 | 39 | #define CALLEE_REG_FRAME_SIZE 144 |
40 | #define ASM_ULONG_INSN .dword | ||
37 | #else /* CONFIG_64BIT */ | 41 | #else /* CONFIG_64BIT */ |
38 | #define LDREG ldw | 42 | #define LDREG ldw |
39 | #define STREG stw | 43 | #define STREG stw |
@@ -42,9 +46,13 @@ | |||
42 | #define STREGM stwm | 46 | #define STREGM stwm |
43 | #define SHRREG shr | 47 | #define SHRREG shr |
44 | #define SHLREG shlw | 48 | #define SHLREG shlw |
49 | #define ADDIB addib, | ||
50 | #define CMPB cmpb, | ||
51 | #define ANDCM andcm | ||
45 | #define RP_OFFSET 20 | 52 | #define RP_OFFSET 20 |
46 | #define FRAME_SIZE 64 | 53 | #define FRAME_SIZE 64 |
47 | #define CALLEE_REG_FRAME_SIZE 128 | 54 | #define CALLEE_REG_FRAME_SIZE 128 |
55 | #define ASM_ULONG_INSN .word | ||
48 | #endif | 56 | #endif |
49 | 57 | ||
50 | #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE) | 58 | #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE) |
@@ -65,7 +73,7 @@ | |||
65 | 73 | ||
66 | #ifdef __ASSEMBLY__ | 74 | #ifdef __ASSEMBLY__ |
67 | 75 | ||
68 | #ifdef __LP64__ | 76 | #ifdef CONFIG_64BIT |
69 | /* the 64-bit pa gnu assembler unfortunately defaults to .level 1.1 or 2.0 so | 77 | /* the 64-bit pa gnu assembler unfortunately defaults to .level 1.1 or 2.0 so |
70 | * work around that for now... */ | 78 | * work around that for now... */ |
71 | .level 2.0w | 79 | .level 2.0w |
@@ -156,7 +164,7 @@ | |||
156 | .endm | 164 | .endm |
157 | 165 | ||
158 | .macro loadgp | 166 | .macro loadgp |
159 | #ifdef __LP64__ | 167 | #ifdef CONFIG_64BIT |
160 | ldil L%__gp, %r27 | 168 | ldil L%__gp, %r27 |
161 | ldo R%__gp(%r27), %r27 | 169 | ldo R%__gp(%r27), %r27 |
162 | #else | 170 | #else |
@@ -334,7 +342,7 @@ | |||
334 | fldd,mb -8(%r30), %fr12 | 342 | fldd,mb -8(%r30), %fr12 |
335 | .endm | 343 | .endm |
336 | 344 | ||
337 | #ifdef __LP64__ | 345 | #ifdef CONFIG_64BIT |
338 | .macro callee_save | 346 | .macro callee_save |
339 | std,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) | 347 | std,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) |
340 | mfctl %cr27, %r3 | 348 | mfctl %cr27, %r3 |
@@ -377,7 +385,7 @@ | |||
377 | ldd,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 | 385 | ldd,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 |
378 | .endm | 386 | .endm |
379 | 387 | ||
380 | #else /* ! __LP64__ */ | 388 | #else /* ! CONFIG_64BIT */ |
381 | 389 | ||
382 | .macro callee_save | 390 | .macro callee_save |
383 | stw,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) | 391 | stw,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) |
@@ -420,7 +428,7 @@ | |||
420 | mtctl %r3, %cr27 | 428 | mtctl %r3, %cr27 |
421 | ldw,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 | 429 | ldw,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 |
422 | .endm | 430 | .endm |
423 | #endif /* ! __LP64__ */ | 431 | #endif /* ! CONFIG_64BIT */ |
424 | 432 | ||
425 | .macro save_specials regs | 433 | .macro save_specials regs |
426 | 434 | ||
@@ -441,7 +449,7 @@ | |||
441 | mtctl %r0, %cr18 | 449 | mtctl %r0, %cr18 |
442 | SAVE_CR (%cr18, PT_IAOQ1(\regs)) | 450 | SAVE_CR (%cr18, PT_IAOQ1(\regs)) |
443 | 451 | ||
444 | #ifdef __LP64__ | 452 | #ifdef CONFIG_64BIT |
445 | /* cr11 (sar) is a funny one. 5 bits on PA1.1 and 6 bit on PA2.0 | 453 | /* cr11 (sar) is a funny one. 5 bits on PA1.1 and 6 bit on PA2.0 |
446 | * For PA2.0 mtsar or mtctl always write 6 bits, but mfctl only | 454 | * For PA2.0 mtsar or mtctl always write 6 bits, but mfctl only |
447 | * reads 5 bits. Use mfctl,w to read all six bits. Otherwise | 455 | * reads 5 bits. Use mfctl,w to read all six bits. Otherwise |
diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h index 48bf9b8ab8ff..7d57d34fcca8 100644 --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h | |||
@@ -58,7 +58,7 @@ extern void __xchg_called_with_bad_pointer(void); | |||
58 | /* __xchg32/64 defined in arch/parisc/lib/bitops.c */ | 58 | /* __xchg32/64 defined in arch/parisc/lib/bitops.c */ |
59 | extern unsigned long __xchg8(char, char *); | 59 | extern unsigned long __xchg8(char, char *); |
60 | extern unsigned long __xchg32(int, int *); | 60 | extern unsigned long __xchg32(int, int *); |
61 | #ifdef __LP64__ | 61 | #ifdef CONFIG_64BIT |
62 | extern unsigned long __xchg64(unsigned long, unsigned long *); | 62 | extern unsigned long __xchg64(unsigned long, unsigned long *); |
63 | #endif | 63 | #endif |
64 | 64 | ||
@@ -67,7 +67,7 @@ static __inline__ unsigned long | |||
67 | __xchg(unsigned long x, __volatile__ void * ptr, int size) | 67 | __xchg(unsigned long x, __volatile__ void * ptr, int size) |
68 | { | 68 | { |
69 | switch(size) { | 69 | switch(size) { |
70 | #ifdef __LP64__ | 70 | #ifdef CONFIG_64BIT |
71 | case 8: return __xchg64(x,(unsigned long *) ptr); | 71 | case 8: return __xchg64(x,(unsigned long *) ptr); |
72 | #endif | 72 | #endif |
73 | case 4: return __xchg32((int) x, (int *) ptr); | 73 | case 4: return __xchg32((int) x, (int *) ptr); |
@@ -81,7 +81,7 @@ __xchg(unsigned long x, __volatile__ void * ptr, int size) | |||
81 | /* | 81 | /* |
82 | ** REVISIT - Abandoned use of LDCW in xchg() for now: | 82 | ** REVISIT - Abandoned use of LDCW in xchg() for now: |
83 | ** o need to test sizeof(*ptr) to avoid clearing adjacent bytes | 83 | ** o need to test sizeof(*ptr) to avoid clearing adjacent bytes |
84 | ** o and while we are at it, could __LP64__ code use LDCD too? | 84 | ** o and while we are at it, could CONFIG_64BIT code use LDCD too? |
85 | ** | 85 | ** |
86 | ** if (__builtin_constant_p(x) && (x == NULL)) | 86 | ** if (__builtin_constant_p(x) && (x == NULL)) |
87 | ** if (((unsigned long)p & 0xf) == 0) | 87 | ** if (((unsigned long)p & 0xf) == 0) |
@@ -105,7 +105,7 @@ static __inline__ unsigned long | |||
105 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) | 105 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) |
106 | { | 106 | { |
107 | switch(size) { | 107 | switch(size) { |
108 | #ifdef __LP64__ | 108 | #ifdef CONFIG_64BIT |
109 | case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_); | 109 | case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_); |
110 | #endif | 110 | #endif |
111 | case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_); | 111 | case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_); |
@@ -218,7 +218,7 @@ static __inline__ int atomic_read(const atomic_t *v) | |||
218 | #define smp_mb__before_atomic_inc() smp_mb() | 218 | #define smp_mb__before_atomic_inc() smp_mb() |
219 | #define smp_mb__after_atomic_inc() smp_mb() | 219 | #define smp_mb__after_atomic_inc() smp_mb() |
220 | 220 | ||
221 | #ifdef __LP64__ | 221 | #ifdef CONFIG_64BIT |
222 | 222 | ||
223 | typedef struct { volatile s64 counter; } atomic64_t; | 223 | typedef struct { volatile s64 counter; } atomic64_t; |
224 | 224 | ||
@@ -270,7 +270,7 @@ atomic64_read(const atomic64_t *v) | |||
270 | #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) | 270 | #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) |
271 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i),(v)) == 0) | 271 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i),(v)) == 0) |
272 | 272 | ||
273 | #endif /* __LP64__ */ | 273 | #endif /* CONFIG_64BIT */ |
274 | 274 | ||
275 | #include <asm-generic/atomic.h> | 275 | #include <asm-generic/atomic.h> |
276 | 276 | ||
diff --git a/include/asm-parisc/bitops.h b/include/asm-parisc/bitops.h index 900561922c4c..015cb0d379bd 100644 --- a/include/asm-parisc/bitops.h +++ b/include/asm-parisc/bitops.h | |||
@@ -60,31 +60,37 @@ static __inline__ void change_bit(int nr, volatile unsigned long * addr) | |||
60 | static __inline__ int test_and_set_bit(int nr, volatile unsigned long * addr) | 60 | static __inline__ int test_and_set_bit(int nr, volatile unsigned long * addr) |
61 | { | 61 | { |
62 | unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr); | 62 | unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr); |
63 | unsigned long oldbit; | 63 | unsigned long old; |
64 | unsigned long flags; | 64 | unsigned long flags; |
65 | int set; | ||
65 | 66 | ||
66 | addr += (nr >> SHIFT_PER_LONG); | 67 | addr += (nr >> SHIFT_PER_LONG); |
67 | _atomic_spin_lock_irqsave(addr, flags); | 68 | _atomic_spin_lock_irqsave(addr, flags); |
68 | oldbit = *addr; | 69 | old = *addr; |
69 | *addr = oldbit | mask; | 70 | set = (old & mask) ? 1 : 0; |
71 | if (!set) | ||
72 | *addr = old | mask; | ||
70 | _atomic_spin_unlock_irqrestore(addr, flags); | 73 | _atomic_spin_unlock_irqrestore(addr, flags); |
71 | 74 | ||
72 | return (oldbit & mask) ? 1 : 0; | 75 | return set; |
73 | } | 76 | } |
74 | 77 | ||
75 | static __inline__ int test_and_clear_bit(int nr, volatile unsigned long * addr) | 78 | static __inline__ int test_and_clear_bit(int nr, volatile unsigned long * addr) |
76 | { | 79 | { |
77 | unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr); | 80 | unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr); |
78 | unsigned long oldbit; | 81 | unsigned long old; |
79 | unsigned long flags; | 82 | unsigned long flags; |
83 | int set; | ||
80 | 84 | ||
81 | addr += (nr >> SHIFT_PER_LONG); | 85 | addr += (nr >> SHIFT_PER_LONG); |
82 | _atomic_spin_lock_irqsave(addr, flags); | 86 | _atomic_spin_lock_irqsave(addr, flags); |
83 | oldbit = *addr; | 87 | old = *addr; |
84 | *addr = oldbit & ~mask; | 88 | set = (old & mask) ? 1 : 0; |
89 | if (set) | ||
90 | *addr = old & ~mask; | ||
85 | _atomic_spin_unlock_irqrestore(addr, flags); | 91 | _atomic_spin_unlock_irqrestore(addr, flags); |
86 | 92 | ||
87 | return (oldbit & mask) ? 1 : 0; | 93 | return set; |
88 | } | 94 | } |
89 | 95 | ||
90 | static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr) | 96 | static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr) |
@@ -130,7 +136,7 @@ static __inline__ unsigned long __ffs(unsigned long x) | |||
130 | unsigned long ret; | 136 | unsigned long ret; |
131 | 137 | ||
132 | __asm__( | 138 | __asm__( |
133 | #ifdef __LP64__ | 139 | #ifdef CONFIG_64BIT |
134 | " ldi 63,%1\n" | 140 | " ldi 63,%1\n" |
135 | " extrd,u,*<> %0,63,32,%%r0\n" | 141 | " extrd,u,*<> %0,63,32,%%r0\n" |
136 | " extrd,u,*TR %0,31,32,%0\n" /* move top 32-bits down */ | 142 | " extrd,u,*TR %0,31,32,%0\n" /* move top 32-bits down */ |
diff --git a/include/asm-parisc/bug.h b/include/asm-parisc/bug.h index 695588da41f8..83ba510ed5d8 100644 --- a/include/asm-parisc/bug.h +++ b/include/asm-parisc/bug.h | |||
@@ -1,14 +1,92 @@ | |||
1 | #ifndef _PARISC_BUG_H | 1 | #ifndef _PARISC_BUG_H |
2 | #define _PARISC_BUG_H | 2 | #define _PARISC_BUG_H |
3 | 3 | ||
4 | /* | ||
5 | * Tell the user there is some problem. | ||
6 | * The offending file and line are encoded in the __bug_table section. | ||
7 | */ | ||
8 | |||
4 | #ifdef CONFIG_BUG | 9 | #ifdef CONFIG_BUG |
5 | #define HAVE_ARCH_BUG | 10 | #define HAVE_ARCH_BUG |
6 | #define BUG() do { \ | 11 | #define HAVE_ARCH_WARN_ON |
7 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 12 | |
8 | dump_stack(); \ | 13 | /* the break instruction is used as BUG() marker. */ |
9 | panic("BUG!"); \ | 14 | #define PARISC_BUG_BREAK_ASM "break 0x1f, 0x1fff" |
10 | } while (0) | 15 | #define PARISC_BUG_BREAK_INSN 0x03ffe01f /* PARISC_BUG_BREAK_ASM */ |
16 | |||
17 | #if defined(CONFIG_64BIT) | ||
18 | #define ASM_WORD_INSN ".dword\t" | ||
19 | #else | ||
20 | #define ASM_WORD_INSN ".word\t" | ||
21 | #endif | ||
22 | |||
23 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
24 | #define BUG() \ | ||
25 | do { \ | ||
26 | asm volatile("\n" \ | ||
27 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | ||
28 | "\t.pushsection __bug_table,\"a\"\n" \ | ||
29 | "2:\t" ASM_WORD_INSN "1b, %c0\n" \ | ||
30 | "\t.short %c1, %c2\n" \ | ||
31 | "\t.org 2b+%c3\n" \ | ||
32 | "\t.popsection" \ | ||
33 | : : "i" (__FILE__), "i" (__LINE__), \ | ||
34 | "i" (0), "i" (sizeof(struct bug_entry)) ); \ | ||
35 | for(;;) ; \ | ||
36 | } while(0) | ||
37 | |||
38 | #else | ||
39 | #define BUG() \ | ||
40 | do { \ | ||
41 | asm volatile(PARISC_BUG_BREAK_ASM : : ); \ | ||
42 | for(;;) ; \ | ||
43 | } while(0) | ||
44 | #endif | ||
45 | |||
46 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
47 | #define __WARN() \ | ||
48 | do { \ | ||
49 | asm volatile("\n" \ | ||
50 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | ||
51 | "\t.pushsection __bug_table,\"a\"\n" \ | ||
52 | "2:\t" ASM_WORD_INSN "1b, %c0\n" \ | ||
53 | "\t.short %c1, %c2\n" \ | ||
54 | "\t.org 2b+%c3\n" \ | ||
55 | "\t.popsection" \ | ||
56 | : : "i" (__FILE__), "i" (__LINE__), \ | ||
57 | "i" (BUGFLAG_WARNING), \ | ||
58 | "i" (sizeof(struct bug_entry)) ); \ | ||
59 | } while(0) | ||
60 | #else | ||
61 | #define __WARN() \ | ||
62 | do { \ | ||
63 | asm volatile("\n" \ | ||
64 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | ||
65 | "\t.pushsection __bug_table,\"a\"\n" \ | ||
66 | "2:\t" ASM_WORD_INSN "1b\n" \ | ||
67 | "\t.short %c0\n" \ | ||
68 | "\t.org 2b+%c1\n" \ | ||
69 | "\t.popsection" \ | ||
70 | : : "i" (BUGFLAG_WARNING), \ | ||
71 | "i" (sizeof(struct bug_entry)) ); \ | ||
72 | } while(0) | ||
73 | #endif | ||
74 | |||
75 | |||
76 | #define WARN_ON(x) ({ \ | ||
77 | typeof(x) __ret_warn_on = (x); \ | ||
78 | if (__builtin_constant_p(__ret_warn_on)) { \ | ||
79 | if (__ret_warn_on) \ | ||
80 | __WARN(); \ | ||
81 | } else { \ | ||
82 | if (unlikely(__ret_warn_on)) \ | ||
83 | __WARN(); \ | ||
84 | } \ | ||
85 | unlikely(__ret_warn_on); \ | ||
86 | }) | ||
87 | |||
11 | #endif | 88 | #endif |
12 | 89 | ||
13 | #include <asm-generic/bug.h> | 90 | #include <asm-generic/bug.h> |
14 | #endif | 91 | #endif |
92 | |||
diff --git a/include/asm-parisc/cache.h b/include/asm-parisc/cache.h index 7d22fa206fc4..32c2cca74345 100644 --- a/include/asm-parisc/cache.h +++ b/include/asm-parisc/cache.h | |||
@@ -30,31 +30,11 @@ | |||
30 | 30 | ||
31 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | 31 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) |
32 | 32 | ||
33 | extern void flush_data_cache_local(void *); /* flushes local data-cache only */ | 33 | void parisc_cache_init(void); /* initializes cache-flushing */ |
34 | extern void flush_instruction_cache_local(void *); /* flushes local code-cache only */ | 34 | void disable_sr_hashing_asm(int); /* low level support for above */ |
35 | #ifdef CONFIG_SMP | 35 | void disable_sr_hashing(void); /* turns off space register hashing */ |
36 | extern void flush_data_cache(void); /* flushes data-cache only (all processors) */ | 36 | void free_sid(unsigned long); |
37 | extern void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ | ||
38 | #else | ||
39 | #define flush_data_cache() flush_data_cache_local(NULL) | ||
40 | #define flush_instruction_cache() flush_instruction_cache_local(NULL) | ||
41 | #endif | ||
42 | |||
43 | extern void parisc_cache_init(void); /* initializes cache-flushing */ | ||
44 | extern void flush_all_caches(void); /* flush everything (tlb & cache) */ | ||
45 | extern int get_cache_info(char *); | ||
46 | extern void flush_user_icache_range_asm(unsigned long, unsigned long); | ||
47 | extern void flush_kernel_icache_range_asm(unsigned long, unsigned long); | ||
48 | extern void flush_user_dcache_range_asm(unsigned long, unsigned long); | ||
49 | extern void flush_kernel_dcache_range_asm(unsigned long, unsigned long); | ||
50 | extern void flush_kernel_dcache_page_asm(void *); | ||
51 | extern void flush_kernel_icache_page(void *); | ||
52 | extern void disable_sr_hashing(void); /* turns off space register hashing */ | ||
53 | extern void disable_sr_hashing_asm(int); /* low level support for above */ | ||
54 | extern void free_sid(unsigned long); | ||
55 | unsigned long alloc_sid(void); | 37 | unsigned long alloc_sid(void); |
56 | extern void flush_user_dcache_page(unsigned long); | ||
57 | extern void flush_user_icache_page(unsigned long); | ||
58 | 38 | ||
59 | struct seq_file; | 39 | struct seq_file; |
60 | extern void show_cache_info(struct seq_file *m); | 40 | extern void show_cache_info(struct seq_file *m); |
@@ -63,6 +43,7 @@ extern int split_tlb; | |||
63 | extern int dcache_stride; | 43 | extern int dcache_stride; |
64 | extern int icache_stride; | 44 | extern int icache_stride; |
65 | extern struct pdc_cache_info cache_info; | 45 | extern struct pdc_cache_info cache_info; |
46 | void parisc_setup_cache_timing(void); | ||
66 | 47 | ||
67 | #define pdtlb(addr) asm volatile("pdtlb 0(%%sr1,%0)" : : "r" (addr)); | 48 | #define pdtlb(addr) asm volatile("pdtlb 0(%%sr1,%0)" : : "r" (addr)); |
68 | #define pitlb(addr) asm volatile("pitlb 0(%%sr1,%0)" : : "r" (addr)); | 49 | #define pitlb(addr) asm volatile("pitlb 0(%%sr1,%0)" : : "r" (addr)); |
diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index a799dd8ef395..2f1e1b05440a 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h | |||
@@ -2,60 +2,46 @@ | |||
2 | #define _PARISC_CACHEFLUSH_H | 2 | #define _PARISC_CACHEFLUSH_H |
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <asm/cache.h> /* for flush_user_dcache_range_asm() proto */ | ||
6 | 5 | ||
7 | /* The usual comment is "Caches aren't brain-dead on the <architecture>". | 6 | /* The usual comment is "Caches aren't brain-dead on the <architecture>". |
8 | * Unfortunately, that doesn't apply to PA-RISC. */ | 7 | * Unfortunately, that doesn't apply to PA-RISC. */ |
9 | 8 | ||
10 | /* Cache flush operations */ | 9 | /* Internal implementation */ |
11 | 10 | void flush_data_cache_local(void *); /* flushes local data-cache only */ | |
11 | void flush_instruction_cache_local(void *); /* flushes local code-cache only */ | ||
12 | #ifdef CONFIG_SMP | 12 | #ifdef CONFIG_SMP |
13 | #define flush_cache_mm(mm) flush_cache_all() | 13 | void flush_data_cache(void); /* flushes data-cache only (all processors) */ |
14 | void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ | ||
14 | #else | 15 | #else |
15 | #define flush_cache_mm(mm) flush_cache_all_local() | 16 | #define flush_data_cache() flush_data_cache_local(NULL) |
17 | #define flush_instruction_cache() flush_instruction_cache_local(NULL) | ||
16 | #endif | 18 | #endif |
17 | 19 | ||
18 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | 20 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
19 | 21 | ||
20 | #define flush_kernel_dcache_range(start,size) \ | 22 | void flush_user_icache_range_asm(unsigned long, unsigned long); |
21 | flush_kernel_dcache_range_asm((start), (start)+(size)); | 23 | void flush_kernel_icache_range_asm(unsigned long, unsigned long); |
24 | void flush_user_dcache_range_asm(unsigned long, unsigned long); | ||
25 | void flush_kernel_dcache_range_asm(unsigned long, unsigned long); | ||
26 | void flush_kernel_dcache_page_asm(void *); | ||
27 | void flush_kernel_icache_page(void *); | ||
28 | void flush_user_dcache_page(unsigned long); | ||
29 | void flush_user_icache_page(unsigned long); | ||
30 | void flush_user_dcache_range(unsigned long, unsigned long); | ||
31 | void flush_user_icache_range(unsigned long, unsigned long); | ||
22 | 32 | ||
23 | extern void flush_cache_all_local(void); | 33 | /* Cache flush operations */ |
24 | 34 | ||
25 | static inline void cacheflush_h_tmp_function(void *dummy) | 35 | void flush_cache_all_local(void); |
26 | { | 36 | void flush_cache_all(void); |
27 | flush_cache_all_local(); | 37 | void flush_cache_mm(struct mm_struct *mm); |
28 | } | ||
29 | 38 | ||
30 | static inline void flush_cache_all(void) | 39 | #define flush_kernel_dcache_range(start,size) \ |
31 | { | 40 | flush_kernel_dcache_range_asm((start), (start)+(size)); |
32 | on_each_cpu(cacheflush_h_tmp_function, NULL, 1, 1); | ||
33 | } | ||
34 | 41 | ||
35 | #define flush_cache_vmap(start, end) flush_cache_all() | 42 | #define flush_cache_vmap(start, end) flush_cache_all() |
36 | #define flush_cache_vunmap(start, end) flush_cache_all() | 43 | #define flush_cache_vunmap(start, end) flush_cache_all() |
37 | 44 | ||
38 | extern int parisc_cache_flush_threshold; | ||
39 | void parisc_setup_cache_timing(void); | ||
40 | |||
41 | static inline void | ||
42 | flush_user_dcache_range(unsigned long start, unsigned long end) | ||
43 | { | ||
44 | if ((end - start) < parisc_cache_flush_threshold) | ||
45 | flush_user_dcache_range_asm(start,end); | ||
46 | else | ||
47 | flush_data_cache(); | ||
48 | } | ||
49 | |||
50 | static inline void | ||
51 | flush_user_icache_range(unsigned long start, unsigned long end) | ||
52 | { | ||
53 | if ((end - start) < parisc_cache_flush_threshold) | ||
54 | flush_user_icache_range_asm(start,end); | ||
55 | else | ||
56 | flush_instruction_cache(); | ||
57 | } | ||
58 | |||
59 | extern void flush_dcache_page(struct page *page); | 45 | extern void flush_dcache_page(struct page *page); |
60 | 46 | ||
61 | #define flush_dcache_mmap_lock(mapping) \ | 47 | #define flush_dcache_mmap_lock(mapping) \ |
@@ -63,9 +49,15 @@ extern void flush_dcache_page(struct page *page); | |||
63 | #define flush_dcache_mmap_unlock(mapping) \ | 49 | #define flush_dcache_mmap_unlock(mapping) \ |
64 | write_unlock_irq(&(mapping)->tree_lock) | 50 | write_unlock_irq(&(mapping)->tree_lock) |
65 | 51 | ||
66 | #define flush_icache_page(vma,page) do { flush_kernel_dcache_page(page); flush_kernel_icache_page(page_address(page)); } while (0) | 52 | #define flush_icache_page(vma,page) do { \ |
53 | flush_kernel_dcache_page(page); \ | ||
54 | flush_kernel_icache_page(page_address(page)); \ | ||
55 | } while (0) | ||
67 | 56 | ||
68 | #define flush_icache_range(s,e) do { flush_kernel_dcache_range_asm(s,e); flush_kernel_icache_range_asm(s,e); } while (0) | 57 | #define flush_icache_range(s,e) do { \ |
58 | flush_kernel_dcache_range_asm(s,e); \ | ||
59 | flush_kernel_icache_range_asm(s,e); \ | ||
60 | } while (0) | ||
69 | 61 | ||
70 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 62 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
71 | do { \ | 63 | do { \ |
@@ -80,118 +72,17 @@ do { \ | |||
80 | memcpy(dst, src, len); \ | 72 | memcpy(dst, src, len); \ |
81 | } while (0) | 73 | } while (0) |
82 | 74 | ||
83 | static inline void flush_cache_range(struct vm_area_struct *vma, | 75 | void flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn); |
84 | unsigned long start, unsigned long end) | 76 | void flush_cache_range(struct vm_area_struct *vma, |
85 | { | 77 | unsigned long start, unsigned long end); |
86 | int sr3; | ||
87 | |||
88 | if (!vma->vm_mm->context) { | ||
89 | BUG(); | ||
90 | return; | ||
91 | } | ||
92 | |||
93 | sr3 = mfsp(3); | ||
94 | if (vma->vm_mm->context == sr3) { | ||
95 | flush_user_dcache_range(start,end); | ||
96 | flush_user_icache_range(start,end); | ||
97 | } else { | ||
98 | flush_cache_all(); | ||
99 | } | ||
100 | } | ||
101 | |||
102 | /* Simple function to work out if we have an existing address translation | ||
103 | * for a user space vma. */ | ||
104 | static inline int translation_exists(struct vm_area_struct *vma, | ||
105 | unsigned long addr, unsigned long pfn) | ||
106 | { | ||
107 | pgd_t *pgd = pgd_offset(vma->vm_mm, addr); | ||
108 | pmd_t *pmd; | ||
109 | pte_t pte; | ||
110 | |||
111 | if(pgd_none(*pgd)) | ||
112 | return 0; | ||
113 | |||
114 | pmd = pmd_offset(pgd, addr); | ||
115 | if(pmd_none(*pmd) || pmd_bad(*pmd)) | ||
116 | return 0; | ||
117 | |||
118 | /* We cannot take the pte lock here: flush_cache_page is usually | ||
119 | * called with pte lock already held. Whereas flush_dcache_page | ||
120 | * takes flush_dcache_mmap_lock, which is lower in the hierarchy: | ||
121 | * the vma itself is secure, but the pte might come or go racily. | ||
122 | */ | ||
123 | pte = *pte_offset_map(pmd, addr); | ||
124 | /* But pte_unmap() does nothing on this architecture */ | ||
125 | |||
126 | /* Filter out coincidental file entries and swap entries */ | ||
127 | if (!(pte_val(pte) & (_PAGE_FLUSH|_PAGE_PRESENT))) | ||
128 | return 0; | ||
129 | |||
130 | return pte_pfn(pte) == pfn; | ||
131 | } | ||
132 | |||
133 | /* Private function to flush a page from the cache of a non-current | ||
134 | * process. cr25 contains the Page Directory of the current user | ||
135 | * process; we're going to hijack both it and the user space %sr3 to | ||
136 | * temporarily make the non-current process current. We have to do | ||
137 | * this because cache flushing may cause a non-access tlb miss which | ||
138 | * the handlers have to fill in from the pgd of the non-current | ||
139 | * process. */ | ||
140 | static inline void | ||
141 | flush_user_cache_page_non_current(struct vm_area_struct *vma, | ||
142 | unsigned long vmaddr) | ||
143 | { | ||
144 | /* save the current process space and pgd */ | ||
145 | unsigned long space = mfsp(3), pgd = mfctl(25); | ||
146 | |||
147 | /* we don't mind taking interrups since they may not | ||
148 | * do anything with user space, but we can't | ||
149 | * be preempted here */ | ||
150 | preempt_disable(); | ||
151 | |||
152 | /* make us current */ | ||
153 | mtctl(__pa(vma->vm_mm->pgd), 25); | ||
154 | mtsp(vma->vm_mm->context, 3); | ||
155 | |||
156 | flush_user_dcache_page(vmaddr); | ||
157 | if(vma->vm_flags & VM_EXEC) | ||
158 | flush_user_icache_page(vmaddr); | ||
159 | |||
160 | /* put the old current process back */ | ||
161 | mtsp(space, 3); | ||
162 | mtctl(pgd, 25); | ||
163 | preempt_enable(); | ||
164 | } | ||
165 | |||
166 | static inline void | ||
167 | __flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr) | ||
168 | { | ||
169 | if (likely(vma->vm_mm->context == mfsp(3))) { | ||
170 | flush_user_dcache_page(vmaddr); | ||
171 | if (vma->vm_flags & VM_EXEC) | ||
172 | flush_user_icache_page(vmaddr); | ||
173 | } else { | ||
174 | flush_user_cache_page_non_current(vma, vmaddr); | ||
175 | } | ||
176 | } | ||
177 | |||
178 | static inline void | ||
179 | flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn) | ||
180 | { | ||
181 | BUG_ON(!vma->vm_mm->context); | ||
182 | |||
183 | if (likely(translation_exists(vma, vmaddr, pfn))) | ||
184 | __flush_cache_page(vma, vmaddr); | ||
185 | |||
186 | } | ||
187 | 78 | ||
79 | #define ARCH_HAS_FLUSH_ANON_PAGE | ||
188 | static inline void | 80 | static inline void |
189 | flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) | 81 | flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) |
190 | { | 82 | { |
191 | if (PageAnon(page)) | 83 | if (PageAnon(page)) |
192 | flush_user_dcache_page(vmaddr); | 84 | flush_user_dcache_page(vmaddr); |
193 | } | 85 | } |
194 | #define ARCH_HAS_FLUSH_ANON_PAGE | ||
195 | 86 | ||
196 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE | 87 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE |
197 | void flush_kernel_dcache_page_addr(void *addr); | 88 | void flush_kernel_dcache_page_addr(void *addr); |
diff --git a/include/asm-parisc/dma-mapping.h b/include/asm-parisc/dma-mapping.h index 66f0b408c669..c6c0e9ff6bde 100644 --- a/include/asm-parisc/dma-mapping.h +++ b/include/asm-parisc/dma-mapping.h | |||
@@ -236,7 +236,7 @@ int ccio_allocate_resource(const struct parisc_device *dev, | |||
236 | unsigned long min, unsigned long max, unsigned long align); | 236 | unsigned long min, unsigned long max, unsigned long align); |
237 | #else /* !CONFIG_IOMMU_CCIO */ | 237 | #else /* !CONFIG_IOMMU_CCIO */ |
238 | #define ccio_get_iommu(dev) NULL | 238 | #define ccio_get_iommu(dev) NULL |
239 | #define ccio_request_resource(dev, res) request_resource(&iomem_resource, res) | 239 | #define ccio_request_resource(dev, res) insert_resource(&iomem_resource, res) |
240 | #define ccio_allocate_resource(dev, res, size, min, max, align) \ | 240 | #define ccio_allocate_resource(dev, res, size, min, max, align) \ |
241 | allocate_resource(&iomem_resource, res, size, min, max, \ | 241 | allocate_resource(&iomem_resource, res, size, min, max, \ |
242 | align, NULL, NULL) | 242 | align, NULL, NULL) |
diff --git a/include/asm-parisc/elf.h b/include/asm-parisc/elf.h index adea65fc43c9..f628ac7de83d 100644 --- a/include/asm-parisc/elf.h +++ b/include/asm-parisc/elf.h | |||
@@ -220,7 +220,7 @@ typedef struct elf64_fdesc { | |||
220 | * macros, and then it includes fs/binfmt_elf.c to provide an alternate | 220 | * macros, and then it includes fs/binfmt_elf.c to provide an alternate |
221 | * elf binary handler for 32 bit binaries (on the 64 bit kernel). | 221 | * elf binary handler for 32 bit binaries (on the 64 bit kernel). |
222 | */ | 222 | */ |
223 | #ifdef __LP64__ | 223 | #ifdef CONFIG_64BIT |
224 | #define ELF_CLASS ELFCLASS64 | 224 | #define ELF_CLASS ELFCLASS64 |
225 | #else | 225 | #else |
226 | #define ELF_CLASS ELFCLASS32 | 226 | #define ELF_CLASS ELFCLASS32 |
diff --git a/include/asm-parisc/hardware.h b/include/asm-parisc/hardware.h index 106d3f7cd882..76d880dc4bae 100644 --- a/include/asm-parisc/hardware.h +++ b/include/asm-parisc/hardware.h | |||
@@ -1,19 +1,13 @@ | |||
1 | #ifndef _PARISC_HARDWARE_H | 1 | #ifndef _PARISC_HARDWARE_H |
2 | #define _PARISC_HARDWARE_H | 2 | #define _PARISC_HARDWARE_H |
3 | 3 | ||
4 | #include <linux/mod_devicetable.h> | ||
4 | #include <asm/pdc.h> | 5 | #include <asm/pdc.h> |
5 | 6 | ||
6 | struct parisc_device_id { | 7 | #define HWTYPE_ANY_ID PA_HWTYPE_ANY_ID |
7 | unsigned char hw_type; /* 5 bits used */ | 8 | #define HVERSION_ANY_ID PA_HVERSION_ANY_ID |
8 | unsigned char hversion_rev; /* 4 bits */ | 9 | #define HVERSION_REV_ANY_ID PA_HVERSION_REV_ANY_ID |
9 | unsigned short hversion; /* 12 bits */ | 10 | #define SVERSION_ANY_ID PA_SVERSION_ANY_ID |
10 | unsigned int sversion; /* 20 bits */ | ||
11 | }; | ||
12 | |||
13 | #define HWTYPE_ANY_ID 0xff | ||
14 | #define HVERSION_REV_ANY_ID 0xff | ||
15 | #define HVERSION_ANY_ID 0xffff | ||
16 | #define SVERSION_ANY_ID 0xffffffffU | ||
17 | 11 | ||
18 | struct hp_hardware { | 12 | struct hp_hardware { |
19 | unsigned short hw_type:5; /* HPHW_xxx */ | 13 | unsigned short hw_type:5; /* HPHW_xxx */ |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index ca46e7cc0940..c0fed91da3a2 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -67,7 +67,7 @@ static inline unsigned long long gsc_readq(unsigned long addr) | |||
67 | { | 67 | { |
68 | unsigned long long ret; | 68 | unsigned long long ret; |
69 | 69 | ||
70 | #ifdef __LP64__ | 70 | #ifdef CONFIG_64BIT |
71 | __asm__ __volatile__( | 71 | __asm__ __volatile__( |
72 | " ldda 0(%1),%0\n" | 72 | " ldda 0(%1),%0\n" |
73 | : "=r" (ret) : "r" (addr) ); | 73 | : "=r" (ret) : "r" (addr) ); |
@@ -108,7 +108,7 @@ static inline void gsc_writel(unsigned int val, unsigned long addr) | |||
108 | 108 | ||
109 | static inline void gsc_writeq(unsigned long long val, unsigned long addr) | 109 | static inline void gsc_writeq(unsigned long long val, unsigned long addr) |
110 | { | 110 | { |
111 | #ifdef __LP64__ | 111 | #ifdef CONFIG_64BIT |
112 | __asm__ __volatile__( | 112 | __asm__ __volatile__( |
113 | " stda %0,0(%1)\n" | 113 | " stda %0,0(%1)\n" |
114 | : : "r" (val), "r" (addr) ); | 114 | : : "r" (val), "r" (addr) ); |
diff --git a/include/asm-parisc/led.h b/include/asm-parisc/led.h index efadfd543ec6..c3405ab9d60a 100644 --- a/include/asm-parisc/led.h +++ b/include/asm-parisc/led.h | |||
@@ -31,7 +31,7 @@ void __init register_led_regions(void); | |||
31 | 31 | ||
32 | #ifdef CONFIG_CHASSIS_LCD_LED | 32 | #ifdef CONFIG_CHASSIS_LCD_LED |
33 | /* writes a string to the LCD display (if possible on this h/w) */ | 33 | /* writes a string to the LCD display (if possible on this h/w) */ |
34 | int lcd_print(char *str); | 34 | int lcd_print(const char *str); |
35 | #else | 35 | #else |
36 | #define lcd_print(str) | 36 | #define lcd_print(str) |
37 | #endif | 37 | #endif |
diff --git a/include/asm-parisc/linkage.h b/include/asm-parisc/linkage.h index 291c2d01c44f..7a09d911b538 100644 --- a/include/asm-parisc/linkage.h +++ b/include/asm-parisc/linkage.h | |||
@@ -1,6 +1,28 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | 1 | #ifndef __ASM_PARISC_LINKAGE_H |
2 | #define __ASM_LINKAGE_H | 2 | #define __ASM_PARISC_LINKAGE_H |
3 | 3 | ||
4 | /* Nothing to see here... */ | 4 | #ifndef __ALIGN |
5 | #define __ALIGN .align 4 | ||
6 | #define __ALIGN_STR ".align 4" | ||
7 | #endif | ||
8 | |||
9 | /* | ||
10 | * In parisc assembly a semicolon marks a comment while a | ||
11 | * exclamation mark is used to seperate independend lines. | ||
12 | */ | ||
13 | #define ENTRY(name) \ | ||
14 | .export name !\ | ||
15 | ALIGN !\ | ||
16 | name: | ||
5 | 17 | ||
18 | #ifdef CONFIG_64BIT | ||
19 | #define ENDPROC(name) \ | ||
20 | END(name) | ||
21 | #else | ||
22 | #define ENDPROC(name) \ | ||
23 | .type name, @function !\ | ||
24 | END(name) | ||
6 | #endif | 25 | #endif |
26 | |||
27 | |||
28 | #endif /* __ASM_PARISC_LINKAGE_H */ | ||
diff --git a/include/asm-parisc/mmzone.h b/include/asm-parisc/mmzone.h index c87813662d4d..9608d2cf214a 100644 --- a/include/asm-parisc/mmzone.h +++ b/include/asm-parisc/mmzone.h | |||
@@ -35,7 +35,7 @@ extern struct node_map_data node_data[]; | |||
35 | #define PFNNID_MAP_MAX 512 /* support 512GB */ | 35 | #define PFNNID_MAP_MAX 512 /* support 512GB */ |
36 | extern unsigned char pfnnid_map[PFNNID_MAP_MAX]; | 36 | extern unsigned char pfnnid_map[PFNNID_MAP_MAX]; |
37 | 37 | ||
38 | #ifndef __LP64__ | 38 | #ifndef CONFIG_64BIT |
39 | #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) | 39 | #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) |
40 | #else | 40 | #else |
41 | /* io can be 0xf0f0f0f0f0xxxxxx or 0xfffffffff0000000 */ | 41 | /* io can be 0xf0f0f0f0f0xxxxxx or 0xfffffffff0000000 */ |
diff --git a/include/asm-parisc/module.h b/include/asm-parisc/module.h index 00f06885f843..c2cb49e934c1 100644 --- a/include/asm-parisc/module.h +++ b/include/asm-parisc/module.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * This file contains the parisc architecture specific module code. | 4 | * This file contains the parisc architecture specific module code. |
5 | */ | 5 | */ |
6 | #ifdef __LP64__ | 6 | #ifdef CONFIG_64BIT |
7 | #define Elf_Shdr Elf64_Shdr | 7 | #define Elf_Shdr Elf64_Shdr |
8 | #define Elf_Sym Elf64_Sym | 8 | #define Elf_Sym Elf64_Sym |
9 | #define Elf_Ehdr Elf64_Ehdr | 9 | #define Elf_Ehdr Elf64_Ehdr |
diff --git a/include/asm-parisc/msgbuf.h b/include/asm-parisc/msgbuf.h index 14ffc2782f1e..fe88f2649418 100644 --- a/include/asm-parisc/msgbuf.h +++ b/include/asm-parisc/msgbuf.h | |||
@@ -13,15 +13,15 @@ | |||
13 | 13 | ||
14 | struct msqid64_ds { | 14 | struct msqid64_ds { |
15 | struct ipc64_perm msg_perm; | 15 | struct ipc64_perm msg_perm; |
16 | #ifndef __LP64__ | 16 | #ifndef CONFIG_64BIT |
17 | unsigned int __pad1; | 17 | unsigned int __pad1; |
18 | #endif | 18 | #endif |
19 | __kernel_time_t msg_stime; /* last msgsnd time */ | 19 | __kernel_time_t msg_stime; /* last msgsnd time */ |
20 | #ifndef __LP64__ | 20 | #ifndef CONFIG_64BIT |
21 | unsigned int __pad2; | 21 | unsigned int __pad2; |
22 | #endif | 22 | #endif |
23 | __kernel_time_t msg_rtime; /* last msgrcv time */ | 23 | __kernel_time_t msg_rtime; /* last msgrcv time */ |
24 | #ifndef __LP64__ | 24 | #ifndef CONFIG_64BIT |
25 | unsigned int __pad3; | 25 | unsigned int __pad3; |
26 | #endif | 26 | #endif |
27 | __kernel_time_t msg_ctime; /* last change time */ | 27 | __kernel_time_t msg_ctime; /* last change time */ |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 3567208191e3..f6bba4c13664 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -105,7 +105,7 @@ extern int npmem_ranges; | |||
105 | /* WARNING: The definitions below must match exactly to sizeof(pte_t) | 105 | /* WARNING: The definitions below must match exactly to sizeof(pte_t) |
106 | * etc | 106 | * etc |
107 | */ | 107 | */ |
108 | #ifdef __LP64__ | 108 | #ifdef CONFIG_64BIT |
109 | #define BITS_PER_PTE_ENTRY 3 | 109 | #define BITS_PER_PTE_ENTRY 3 |
110 | #define BITS_PER_PMD_ENTRY 2 | 110 | #define BITS_PER_PMD_ENTRY 2 |
111 | #define BITS_PER_PGD_ENTRY 2 | 111 | #define BITS_PER_PGD_ENTRY 2 |
@@ -127,7 +127,11 @@ extern int npmem_ranges; | |||
127 | /* This governs the relationship between virtual and physical addresses. | 127 | /* This governs the relationship between virtual and physical addresses. |
128 | * If you alter it, make sure to take care of our various fixed mapping | 128 | * If you alter it, make sure to take care of our various fixed mapping |
129 | * segments in fixmap.h */ | 129 | * segments in fixmap.h */ |
130 | #define __PAGE_OFFSET (0x10000000) | 130 | #ifdef CONFIG_64BIT |
131 | #define __PAGE_OFFSET (0x40000000) /* 1GB */ | ||
132 | #else | ||
133 | #define __PAGE_OFFSET (0x10000000) /* 256MB */ | ||
134 | #endif | ||
131 | 135 | ||
132 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | 136 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) |
133 | 137 | ||
diff --git a/include/asm-parisc/parisc-device.h b/include/asm-parisc/parisc-device.h index e12624d8941d..7aa13f2add7a 100644 --- a/include/asm-parisc/parisc-device.h +++ b/include/asm-parisc/parisc-device.h | |||
@@ -15,7 +15,7 @@ struct parisc_device { | |||
15 | unsigned int num_addrs; /* some devices have additional address ranges. */ | 15 | unsigned int num_addrs; /* some devices have additional address ranges. */ |
16 | unsigned long *addr; /* which will be stored here */ | 16 | unsigned long *addr; /* which will be stored here */ |
17 | 17 | ||
18 | #ifdef __LP64__ | 18 | #ifdef CONFIG_64BIT |
19 | /* parms for pdc_pat_cell_module() call */ | 19 | /* parms for pdc_pat_cell_module() call */ |
20 | unsigned long pcell_loc; /* Physical Cell location */ | 20 | unsigned long pcell_loc; /* Physical Cell location */ |
21 | unsigned long mod_index; /* PAT specific - Misc Module info */ | 21 | unsigned long mod_index; /* PAT specific - Misc Module info */ |
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h index 423c2b84b4a0..876fd8116d4a 100644 --- a/include/asm-parisc/pdc.h +++ b/include/asm-parisc/pdc.h | |||
@@ -341,7 +341,7 @@ struct pdc_model { /* for PDC_MODEL */ | |||
341 | 341 | ||
342 | struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ | 342 | struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ |
343 | unsigned long | 343 | unsigned long |
344 | #ifdef __LP64__ | 344 | #ifdef CONFIG_64BIT |
345 | cc_padW:32, | 345 | cc_padW:32, |
346 | #endif | 346 | #endif |
347 | cc_alias: 4, /* alias boundaries for virtual addresses */ | 347 | cc_alias: 4, /* alias boundaries for virtual addresses */ |
@@ -357,7 +357,7 @@ struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ | |||
357 | 357 | ||
358 | struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ | 358 | struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ |
359 | unsigned long tc_pad0:12, /* reserved */ | 359 | unsigned long tc_pad0:12, /* reserved */ |
360 | #ifdef __LP64__ | 360 | #ifdef CONFIG_64BIT |
361 | tc_padW:32, | 361 | tc_padW:32, |
362 | #endif | 362 | #endif |
363 | tc_sh : 2, /* 0 = separate I/D-TLB, else shared I/D-TLB */ | 363 | tc_sh : 2, /* 0 = separate I/D-TLB, else shared I/D-TLB */ |
@@ -445,7 +445,7 @@ struct pdc_btlb_info { /* PDC_BLOCK_TLB, return of PDC_BTLB_INFO */ | |||
445 | 445 | ||
446 | #endif /* !CONFIG_PA20 */ | 446 | #endif /* !CONFIG_PA20 */ |
447 | 447 | ||
448 | #ifdef __LP64__ | 448 | #ifdef CONFIG_64BIT |
449 | struct pdc_memory_table_raddr { /* PDC_MEM/PDC_MEM_TABLE (return info) */ | 449 | struct pdc_memory_table_raddr { /* PDC_MEM/PDC_MEM_TABLE (return info) */ |
450 | unsigned long entries_returned; | 450 | unsigned long entries_returned; |
451 | unsigned long entries_total; | 451 | unsigned long entries_total; |
@@ -456,7 +456,7 @@ struct pdc_memory_table { /* PDC_MEM/PDC_MEM_TABLE (arguments) */ | |||
456 | unsigned int pages; | 456 | unsigned int pages; |
457 | unsigned int reserved; | 457 | unsigned int reserved; |
458 | }; | 458 | }; |
459 | #endif /* __LP64__ */ | 459 | #endif /* CONFIG_64BIT */ |
460 | 460 | ||
461 | struct pdc_system_map_mod_info { /* PDC_SYSTEM_MAP/FIND_MODULE */ | 461 | struct pdc_system_map_mod_info { /* PDC_SYSTEM_MAP/FIND_MODULE */ |
462 | unsigned long mod_addr; | 462 | unsigned long mod_addr; |
@@ -752,7 +752,7 @@ int pdc_get_initiator(struct hardware_path *, struct pdc_initiator *); | |||
752 | int pdc_tod_read(struct pdc_tod *tod); | 752 | int pdc_tod_read(struct pdc_tod *tod); |
753 | int pdc_tod_set(unsigned long sec, unsigned long usec); | 753 | int pdc_tod_set(unsigned long sec, unsigned long usec); |
754 | 754 | ||
755 | #ifdef __LP64__ | 755 | #ifdef CONFIG_64BIT |
756 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, | 756 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, |
757 | struct pdc_memory_table *tbl, unsigned long entries); | 757 | struct pdc_memory_table *tbl, unsigned long entries); |
758 | #endif | 758 | #endif |
diff --git a/include/asm-parisc/pdcpat.h b/include/asm-parisc/pdcpat.h index b4b34c0e8c1a..47539f117958 100644 --- a/include/asm-parisc/pdcpat.h +++ b/include/asm-parisc/pdcpat.h | |||
@@ -250,7 +250,7 @@ struct pdc_pat_pd_addr_map_entry { | |||
250 | #define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL) | 250 | #define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL) |
251 | #define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL) | 251 | #define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL) |
252 | #define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL) | 252 | #define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL) |
253 | #define PAT_GET_MOD_PAGES(value)(((value) & 0xffffffUL) | 253 | #define PAT_GET_MOD_PAGES(value) ((value) & 0xffffffUL) |
254 | 254 | ||
255 | 255 | ||
256 | /* | 256 | /* |
@@ -303,35 +303,6 @@ extern int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 va | |||
303 | */ | 303 | */ |
304 | extern int pdc_pat; /* arch/parisc/kernel/inventory.c */ | 304 | extern int pdc_pat; /* arch/parisc/kernel/inventory.c */ |
305 | 305 | ||
306 | /******************************************************************** | ||
307 | * PDC_PAT_CELL[Return Cell Module] memaddr[0] conf_base_addr | ||
308 | * ---------------------------------------------------------- | ||
309 | * Bit 0 to 51 - conf_base_addr | ||
310 | * Bit 52 to 62 - reserved | ||
311 | * Bit 63 - endianess bit | ||
312 | ********************************************************************/ | ||
313 | #define PAT_GET_CBA(value) ((value) & 0xfffffffffffff000UL) | ||
314 | |||
315 | /******************************************************************** | ||
316 | * PDC_PAT_CELL[Return Cell Module] memaddr[1] mod_info | ||
317 | * ---------------------------------------------------- | ||
318 | * Bit 0 to 7 - entity type | ||
319 | * 0 = central agent, 1 = processor, | ||
320 | * 2 = memory controller, 3 = system bus adapter, | ||
321 | * 4 = local bus adapter, 5 = processor bus converter, | ||
322 | * 6 = crossbar fabric connect, 7 = fabric interconnect, | ||
323 | * 8 to 254 reserved, 255 = unknown. | ||
324 | * Bit 8 to 15 - DVI | ||
325 | * Bit 16 to 23 - IOC functions | ||
326 | * Bit 24 to 39 - reserved | ||
327 | * Bit 40 to 63 - mod_pages | ||
328 | * number of 4K pages a module occupies starting at conf_base_addr | ||
329 | ********************************************************************/ | ||
330 | #define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL) | ||
331 | #define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL) | ||
332 | #define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL) | ||
333 | #define PAT_GET_MOD_PAGES(value)(((value) & 0xffffffUL) | ||
334 | |||
335 | #endif /* __ASSEMBLY__ */ | 306 | #endif /* __ASSEMBLY__ */ |
336 | 307 | ||
337 | #endif /* ! __PARISC_PATPDC_H */ | 308 | #endif /* ! __PARISC_PATPDC_H */ |
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h index 3122fad38a1b..1af1a41e0723 100644 --- a/include/asm-parisc/pgalloc.h +++ b/include/asm-parisc/pgalloc.h | |||
@@ -14,7 +14,7 @@ | |||
14 | * Here (for 64 bit kernels) we implement a Hybrid L2/L3 scheme: we | 14 | * Here (for 64 bit kernels) we implement a Hybrid L2/L3 scheme: we |
15 | * allocate the first pmd adjacent to the pgd. This means that we can | 15 | * allocate the first pmd adjacent to the pgd. This means that we can |
16 | * subtract a constant offset to get to it. The pmd and pgd sizes are | 16 | * subtract a constant offset to get to it. The pmd and pgd sizes are |
17 | * arranged so that a single pmd covers 4GB (giving a full LP64 | 17 | * arranged so that a single pmd covers 4GB (giving a full 64-bit |
18 | * process access to 8TB) so our lookups are effectively L2 for the | 18 | * process access to 8TB) so our lookups are effectively L2 for the |
19 | * first 4GB of the kernel (i.e. for all ILP32 processes and all the | 19 | * first 4GB of the kernel (i.e. for all ILP32 processes and all the |
20 | * kernel for machines with under 4GB of memory) */ | 20 | * kernel for machines with under 4GB of memory) */ |
@@ -26,7 +26,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) | |||
26 | 26 | ||
27 | if (likely(pgd != NULL)) { | 27 | if (likely(pgd != NULL)) { |
28 | memset(pgd, 0, PAGE_SIZE<<PGD_ALLOC_ORDER); | 28 | memset(pgd, 0, PAGE_SIZE<<PGD_ALLOC_ORDER); |
29 | #ifdef __LP64__ | 29 | #ifdef CONFIG_64BIT |
30 | actual_pgd += PTRS_PER_PGD; | 30 | actual_pgd += PTRS_PER_PGD; |
31 | /* Populate first pmd with allocated memory. We mark it | 31 | /* Populate first pmd with allocated memory. We mark it |
32 | * with PxD_FLAG_ATTACHED as a signal to the system that this | 32 | * with PxD_FLAG_ATTACHED as a signal to the system that this |
@@ -45,7 +45,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) | |||
45 | 45 | ||
46 | static inline void pgd_free(pgd_t *pgd) | 46 | static inline void pgd_free(pgd_t *pgd) |
47 | { | 47 | { |
48 | #ifdef __LP64__ | 48 | #ifdef CONFIG_64BIT |
49 | pgd -= PTRS_PER_PGD; | 49 | pgd -= PTRS_PER_PGD; |
50 | #endif | 50 | #endif |
51 | free_pages((unsigned long)pgd, PGD_ALLOC_ORDER); | 51 | free_pages((unsigned long)pgd, PGD_ALLOC_ORDER); |
@@ -72,7 +72,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | |||
72 | 72 | ||
73 | static inline void pmd_free(pmd_t *pmd) | 73 | static inline void pmd_free(pmd_t *pmd) |
74 | { | 74 | { |
75 | #ifdef __LP64__ | 75 | #ifdef CONFIG_64BIT |
76 | if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) | 76 | if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) |
77 | /* This is the permanent pmd attached to the pgd; | 77 | /* This is the permanent pmd attached to the pgd; |
78 | * cannot free it */ | 78 | * cannot free it */ |
@@ -99,7 +99,7 @@ static inline void pmd_free(pmd_t *pmd) | |||
99 | static inline void | 99 | static inline void |
100 | pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) | 100 | pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) |
101 | { | 101 | { |
102 | #ifdef __LP64__ | 102 | #ifdef CONFIG_64BIT |
103 | /* preserve the gateway marker if this is the beginning of | 103 | /* preserve the gateway marker if this is the beginning of |
104 | * the permanent pmd */ | 104 | * the permanent pmd */ |
105 | if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) | 105 | if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index c0b61e0d1497..d7e1b10da5c6 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * we simulate an x86-style page table for the linux mm code | 10 | * we simulate an x86-style page table for the linux mm code |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/spinlock.h> | ||
14 | #include <linux/mm.h> /* for vm_area_struct */ | 13 | #include <linux/mm.h> /* for vm_area_struct */ |
15 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
16 | #include <asm/cache.h> | 15 | #include <asm/cache.h> |
diff --git a/include/asm-parisc/posix_types.h b/include/asm-parisc/posix_types.h index 9b19970de619..b634e3c47fdc 100644 --- a/include/asm-parisc/posix_types.h +++ b/include/asm-parisc/posix_types.h | |||
@@ -20,7 +20,7 @@ typedef int __kernel_timer_t; | |||
20 | typedef int __kernel_clockid_t; | 20 | typedef int __kernel_clockid_t; |
21 | typedef int __kernel_daddr_t; | 21 | typedef int __kernel_daddr_t; |
22 | /* Note these change from narrow to wide kernels */ | 22 | /* Note these change from narrow to wide kernels */ |
23 | #ifdef __LP64__ | 23 | #ifdef CONFIG_64BIT |
24 | typedef unsigned long __kernel_size_t; | 24 | typedef unsigned long __kernel_size_t; |
25 | typedef long __kernel_ssize_t; | 25 | typedef long __kernel_ssize_t; |
26 | typedef long __kernel_ptrdiff_t; | 26 | typedef long __kernel_ptrdiff_t; |
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index fd7866dc8c83..d2f396721d3e 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h | |||
@@ -9,13 +9,10 @@ | |||
9 | #define __ASM_PARISC_PROCESSOR_H | 9 | #define __ASM_PARISC_PROCESSOR_H |
10 | 10 | ||
11 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
12 | #include <asm/prefetch.h> /* lockdep.h needs <linux/prefetch.h> */ | ||
13 | |||
14 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
15 | #include <linux/spinlock_types.h> | ||
16 | 13 | ||
14 | #include <asm/prefetch.h> | ||
17 | #include <asm/hardware.h> | 15 | #include <asm/hardware.h> |
18 | #include <asm/page.h> | ||
19 | #include <asm/pdc.h> | 16 | #include <asm/pdc.h> |
20 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
21 | #include <asm/types.h> | 18 | #include <asm/types.h> |
@@ -41,7 +38,7 @@ | |||
41 | #define DEFAULT_TASK_SIZE32 (0xFFF00000UL) | 38 | #define DEFAULT_TASK_SIZE32 (0xFFF00000UL) |
42 | #define DEFAULT_MAP_BASE32 (0x40000000UL) | 39 | #define DEFAULT_MAP_BASE32 (0x40000000UL) |
43 | 40 | ||
44 | #ifdef __LP64__ | 41 | #ifdef CONFIG_64BIT |
45 | #define DEFAULT_TASK_SIZE (MAX_ADDRESS-0xf000000) | 42 | #define DEFAULT_TASK_SIZE (MAX_ADDRESS-0xf000000) |
46 | #define DEFAULT_MAP_BASE (0x200000000UL) | 43 | #define DEFAULT_MAP_BASE (0x200000000UL) |
47 | #else | 44 | #else |
@@ -87,7 +84,6 @@ struct cpuinfo_parisc { | |||
87 | unsigned long hpa; /* Host Physical address */ | 84 | unsigned long hpa; /* Host Physical address */ |
88 | unsigned long txn_addr; /* MMIO addr of EIR or id_eid */ | 85 | unsigned long txn_addr; /* MMIO addr of EIR or id_eid */ |
89 | #ifdef CONFIG_SMP | 86 | #ifdef CONFIG_SMP |
90 | spinlock_t lock; /* synchronization for ipi's */ | ||
91 | unsigned long pending_ipi; /* bitmap of type ipi_message_type */ | 87 | unsigned long pending_ipi; /* bitmap of type ipi_message_type */ |
92 | unsigned long ipi_count; /* number ipi Interrupts */ | 88 | unsigned long ipi_count; /* number ipi Interrupts */ |
93 | #endif | 89 | #endif |
@@ -277,7 +273,7 @@ on downward growing arches, it looks like this: | |||
277 | * it in here from the current->personality | 273 | * it in here from the current->personality |
278 | */ | 274 | */ |
279 | 275 | ||
280 | #ifdef __LP64__ | 276 | #ifdef CONFIG_64BIT |
281 | #define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT)) | 277 | #define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT)) |
282 | #else | 278 | #else |
283 | #define USER_WIDE_MODE 0 | 279 | #define USER_WIDE_MODE 0 |
diff --git a/include/asm-parisc/sembuf.h b/include/asm-parisc/sembuf.h index 1083368ef8db..1e59ffd3bd1e 100644 --- a/include/asm-parisc/sembuf.h +++ b/include/asm-parisc/sembuf.h | |||
@@ -13,11 +13,11 @@ | |||
13 | 13 | ||
14 | struct semid64_ds { | 14 | struct semid64_ds { |
15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | 15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ |
16 | #ifndef __LP64__ | 16 | #ifndef CONFIG_64BIT |
17 | unsigned int __pad1; | 17 | unsigned int __pad1; |
18 | #endif | 18 | #endif |
19 | __kernel_time_t sem_otime; /* last semop time */ | 19 | __kernel_time_t sem_otime; /* last semop time */ |
20 | #ifndef __LP64__ | 20 | #ifndef CONFIG_64BIT |
21 | unsigned int __pad2; | 21 | unsigned int __pad2; |
22 | #endif | 22 | #endif |
23 | __kernel_time_t sem_ctime; /* last change time */ | 23 | __kernel_time_t sem_ctime; /* last change time */ |
diff --git a/include/asm-parisc/shmbuf.h b/include/asm-parisc/shmbuf.h index 623b6c0c49e6..0a3eada1863b 100644 --- a/include/asm-parisc/shmbuf.h +++ b/include/asm-parisc/shmbuf.h | |||
@@ -13,19 +13,19 @@ | |||
13 | 13 | ||
14 | struct shmid64_ds { | 14 | struct shmid64_ds { |
15 | struct ipc64_perm shm_perm; /* operation perms */ | 15 | struct ipc64_perm shm_perm; /* operation perms */ |
16 | #ifndef __LP64__ | 16 | #ifndef CONFIG_64BIT |
17 | unsigned int __pad1; | 17 | unsigned int __pad1; |
18 | #endif | 18 | #endif |
19 | __kernel_time_t shm_atime; /* last attach time */ | 19 | __kernel_time_t shm_atime; /* last attach time */ |
20 | #ifndef __LP64__ | 20 | #ifndef CONFIG_64BIT |
21 | unsigned int __pad2; | 21 | unsigned int __pad2; |
22 | #endif | 22 | #endif |
23 | __kernel_time_t shm_dtime; /* last detach time */ | 23 | __kernel_time_t shm_dtime; /* last detach time */ |
24 | #ifndef __LP64__ | 24 | #ifndef CONFIG_64BIT |
25 | unsigned int __pad3; | 25 | unsigned int __pad3; |
26 | #endif | 26 | #endif |
27 | __kernel_time_t shm_ctime; /* last change time */ | 27 | __kernel_time_t shm_ctime; /* last change time */ |
28 | #ifndef __LP64__ | 28 | #ifndef CONFIG_64BIT |
29 | unsigned int __pad4; | 29 | unsigned int __pad4; |
30 | #endif | 30 | #endif |
31 | size_t shm_segsz; /* size of segment (bytes) */ | 31 | size_t shm_segsz; /* size of segment (bytes) */ |
@@ -36,7 +36,7 @@ struct shmid64_ds { | |||
36 | unsigned int __unused2; | 36 | unsigned int __unused2; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | #ifdef __LP64__ | 39 | #ifdef CONFIG_64BIT |
40 | /* The 'unsigned int' (formerly 'unsigned long') data types below will | 40 | /* The 'unsigned int' (formerly 'unsigned long') data types below will |
41 | * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on | 41 | * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on |
42 | * a wide kernel, but if some of these values are meant to contain pointers | 42 | * a wide kernel, but if some of these values are meant to contain pointers |
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h index 98a82fa0cfdb..c20356375d1d 100644 --- a/include/asm-parisc/signal.h +++ b/include/asm-parisc/signal.h | |||
@@ -105,7 +105,7 @@ | |||
105 | struct siginfo; | 105 | struct siginfo; |
106 | 106 | ||
107 | /* Type of a signal handler. */ | 107 | /* Type of a signal handler. */ |
108 | #ifdef __LP64__ | 108 | #ifdef CONFIG_64BIT |
109 | /* function pointers on 64-bit parisc are pointers to little structs and the | 109 | /* function pointers on 64-bit parisc are pointers to little structs and the |
110 | * compiler doesn't support code which changes or tests the address of | 110 | * compiler doesn't support code which changes or tests the address of |
111 | * the function in the little struct. This is really ugly -PB | 111 | * the function in the little struct. This is really ugly -PB |
diff --git a/include/asm-parisc/smp.h b/include/asm-parisc/smp.h index d4c0e26afcd1..306f4950e32e 100644 --- a/include/asm-parisc/smp.h +++ b/include/asm-parisc/smp.h | |||
@@ -41,14 +41,6 @@ extern void smp_send_all_nop(void); | |||
41 | 41 | ||
42 | #define PROC_CHANGE_PENALTY 15 /* Schedule penalty */ | 42 | #define PROC_CHANGE_PENALTY 15 /* Schedule penalty */ |
43 | 43 | ||
44 | #undef ENTRY_SYS_CPUS | ||
45 | #ifdef ENTRY_SYS_CPUS | ||
46 | #define STATE_RENDEZVOUS 0 | ||
47 | #define STATE_STOPPED 1 | ||
48 | #define STATE_RUNNING 2 | ||
49 | #define STATE_HALTED 3 | ||
50 | #endif | ||
51 | |||
52 | extern unsigned long cpu_present_mask; | 44 | extern unsigned long cpu_present_mask; |
53 | 45 | ||
54 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 46 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
diff --git a/include/asm-parisc/spinlock_types.h b/include/asm-parisc/spinlock_types.h index d6b479bdb886..3f72f47cf4b2 100644 --- a/include/asm-parisc/spinlock_types.h +++ b/include/asm-parisc/spinlock_types.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef __ASM_SPINLOCK_TYPES_H | 1 | #ifndef __ASM_SPINLOCK_TYPES_H |
2 | #define __ASM_SPINLOCK_TYPES_H | 2 | #define __ASM_SPINLOCK_TYPES_H |
3 | 3 | ||
4 | #ifndef __LINUX_SPINLOCK_TYPES_H | ||
5 | # error "please don't include this file directly" | ||
6 | #endif | ||
7 | |||
8 | typedef struct { | 4 | typedef struct { |
9 | #ifdef CONFIG_PA20 | 5 | #ifdef CONFIG_PA20 |
10 | volatile unsigned int slock; | 6 | volatile unsigned int slock; |
diff --git a/include/asm-parisc/statfs.h b/include/asm-parisc/statfs.h index a52d8f93f05c..1d2b8130b23d 100644 --- a/include/asm-parisc/statfs.h +++ b/include/asm-parisc/statfs.h | |||
@@ -30,11 +30,11 @@ struct statfs { | |||
30 | struct statfs64 { | 30 | struct statfs64 { |
31 | long f_type; | 31 | long f_type; |
32 | long f_bsize; | 32 | long f_bsize; |
33 | u64 f_blocks; | 33 | __u64 f_blocks; |
34 | u64 f_bfree; | 34 | __u64 f_bfree; |
35 | u64 f_bavail; | 35 | __u64 f_bavail; |
36 | u64 f_files; | 36 | __u64 f_files; |
37 | u64 f_ffree; | 37 | __u64 f_ffree; |
38 | __kernel_fsid_t f_fsid; | 38 | __kernel_fsid_t f_fsid; |
39 | long f_namelen; | 39 | long f_namelen; |
40 | long f_frsize; | 40 | long f_frsize; |
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 74f037a39e6f..7e9afa720d43 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h | |||
@@ -34,7 +34,7 @@ struct pa_psw { | |||
34 | unsigned int i:1; | 34 | unsigned int i:1; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #ifdef __LP64__ | 37 | #ifdef CONFIG_64BIT |
38 | #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW + 4)) | 38 | #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW + 4)) |
39 | #else | 39 | #else |
40 | #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW)) | 40 | #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW)) |
diff --git a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h index f2f83b04cd8b..949314cf6188 100644 --- a/include/asm-parisc/thread_info.h +++ b/include/asm-parisc/thread_info.h | |||
@@ -62,6 +62,7 @@ struct thread_info { | |||
62 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 62 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
63 | #define TIF_32BIT 5 /* 32 bit binary */ | 63 | #define TIF_32BIT 5 /* 32 bit binary */ |
64 | #define TIF_MEMDIE 6 | 64 | #define TIF_MEMDIE 6 |
65 | #define TIF_RESTORE_SIGMASK 7 /* restore saved signal mask */ | ||
65 | 66 | ||
66 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 67 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
67 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 68 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
@@ -69,9 +70,10 @@ struct thread_info { | |||
69 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 70 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
70 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 71 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
71 | #define _TIF_32BIT (1 << TIF_32BIT) | 72 | #define _TIF_32BIT (1 << TIF_32BIT) |
73 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
72 | 74 | ||
73 | #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ | 75 | #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ |
74 | _TIF_NEED_RESCHED) | 76 | _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) |
75 | 77 | ||
76 | #endif /* __KERNEL__ */ | 78 | #endif /* __KERNEL__ */ |
77 | 79 | ||
diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index f662e837dea1..3313da9ea00f 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h | |||
@@ -73,33 +73,11 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, | |||
73 | purge_tlb_end(); | 73 | purge_tlb_end(); |
74 | } | 74 | } |
75 | 75 | ||
76 | static inline void flush_tlb_range(struct vm_area_struct *vma, | 76 | void __flush_tlb_range(unsigned long sid, |
77 | unsigned long start, unsigned long end) | 77 | unsigned long start, unsigned long end); |
78 | { | ||
79 | unsigned long npages; | ||
80 | 78 | ||
81 | npages = ((end - (start & PAGE_MASK)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT; | 79 | #define flush_tlb_range(vma,start,end) __flush_tlb_range((vma)->vm_mm->context,start,end) |
82 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ | ||
83 | flush_tlb_all(); | ||
84 | else { | ||
85 | mtsp(vma->vm_mm->context,1); | ||
86 | purge_tlb_start(); | ||
87 | if (split_tlb) { | ||
88 | while (npages--) { | ||
89 | pdtlb(start); | ||
90 | pitlb(start); | ||
91 | start += PAGE_SIZE; | ||
92 | } | ||
93 | } else { | ||
94 | while (npages--) { | ||
95 | pdtlb(start); | ||
96 | start += PAGE_SIZE; | ||
97 | } | ||
98 | } | ||
99 | purge_tlb_end(); | ||
100 | } | ||
101 | } | ||
102 | 80 | ||
103 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() | 81 | #define flush_tlb_kernel_range(start, end) __flush_tlb_range(0,start,end) |
104 | 82 | ||
105 | #endif | 83 | #endif |
diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h index 34fdce361a5a..d4aa33033d98 100644 --- a/include/asm-parisc/types.h +++ b/include/asm-parisc/types.h | |||
@@ -31,7 +31,7 @@ typedef unsigned long long __u64; | |||
31 | */ | 31 | */ |
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | 33 | ||
34 | #ifdef __LP64__ | 34 | #ifdef CONFIG_64BIT |
35 | #define BITS_PER_LONG 64 | 35 | #define BITS_PER_LONG 64 |
36 | #define SHIFT_PER_LONG 6 | 36 | #define SHIFT_PER_LONG 6 |
37 | #else | 37 | #else |
diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h index d973e8b3466c..4878b9501f24 100644 --- a/include/asm-parisc/uaccess.h +++ b/include/asm-parisc/uaccess.h | |||
@@ -4,7 +4,6 @@ | |||
4 | /* | 4 | /* |
5 | * User space memory access functions | 5 | * User space memory access functions |
6 | */ | 6 | */ |
7 | #include <linux/sched.h> | ||
8 | #include <asm/page.h> | 7 | #include <asm/page.h> |
9 | #include <asm/system.h> | 8 | #include <asm/system.h> |
10 | #include <asm/cache.h> | 9 | #include <asm/cache.h> |
@@ -43,16 +42,18 @@ static inline long access_ok(int type, const void __user * addr, | |||
43 | #define put_user __put_user | 42 | #define put_user __put_user |
44 | #define get_user __get_user | 43 | #define get_user __get_user |
45 | 44 | ||
46 | #if BITS_PER_LONG == 32 | 45 | #if !defined(CONFIG_64BIT) |
47 | #define LDD_KERNEL(ptr) __get_kernel_bad(); | 46 | #define LDD_KERNEL(ptr) __get_kernel_bad(); |
48 | #define LDD_USER(ptr) __get_user_bad(); | 47 | #define LDD_USER(ptr) __get_user_bad(); |
49 | #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr) | 48 | #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr) |
50 | #define STD_USER(x, ptr) __put_user_asm64(x,ptr) | 49 | #define STD_USER(x, ptr) __put_user_asm64(x,ptr) |
50 | #define ASM_WORD_INSN ".word\t" | ||
51 | #else | 51 | #else |
52 | #define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr) | 52 | #define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr) |
53 | #define LDD_USER(ptr) __get_user_asm("ldd",ptr) | 53 | #define LDD_USER(ptr) __get_user_asm("ldd",ptr) |
54 | #define STD_KERNEL(x, ptr) __put_kernel_asm("std",x,ptr) | 54 | #define STD_KERNEL(x, ptr) __put_kernel_asm("std",x,ptr) |
55 | #define STD_USER(x, ptr) __put_user_asm("std",x,ptr) | 55 | #define STD_USER(x, ptr) __put_user_asm("std",x,ptr) |
56 | #define ASM_WORD_INSN ".dword\t" | ||
56 | #endif | 57 | #endif |
57 | 58 | ||
58 | /* | 59 | /* |
@@ -66,6 +67,11 @@ struct exception_table_entry { | |||
66 | long fixup; /* fixup routine */ | 67 | long fixup; /* fixup routine */ |
67 | }; | 68 | }; |
68 | 69 | ||
70 | #define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr )\ | ||
71 | ".section __ex_table,\"aw\"\n" \ | ||
72 | ASM_WORD_INSN #fault_addr ", " #except_addr "\n\t" \ | ||
73 | ".previous\n" | ||
74 | |||
69 | /* | 75 | /* |
70 | * The page fault handler stores, in a per-cpu area, the following information | 76 | * The page fault handler stores, in a per-cpu area, the following information |
71 | * if a fixup routine is available. | 77 | * if a fixup routine is available. |
@@ -104,43 +110,19 @@ struct exception_data { | |||
104 | __gu_err; \ | 110 | __gu_err; \ |
105 | }) | 111 | }) |
106 | 112 | ||
107 | #ifdef __LP64__ | ||
108 | #define __get_kernel_asm(ldx,ptr) \ | ||
109 | __asm__("\n1:\t" ldx "\t0(%2),%0\n" \ | ||
110 | "\t.section __ex_table,\"aw\"\n" \ | ||
111 | "\t.dword\t1b,fixup_get_user_skip_1\n" \ | ||
112 | "\t.previous" \ | ||
113 | : "=r"(__gu_val), "=r"(__gu_err) \ | ||
114 | : "r"(ptr), "1"(__gu_err) \ | ||
115 | : "r1"); | ||
116 | |||
117 | #define __get_user_asm(ldx,ptr) \ | ||
118 | __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n" \ | ||
119 | "\t.section __ex_table,\"aw\"\n" \ | ||
120 | "\t.dword\t1b,fixup_get_user_skip_1\n" \ | ||
121 | "\t.previous" \ | ||
122 | : "=r"(__gu_val), "=r"(__gu_err) \ | ||
123 | : "r"(ptr), "1"(__gu_err) \ | ||
124 | : "r1"); | ||
125 | #else | ||
126 | #define __get_kernel_asm(ldx,ptr) \ | 113 | #define __get_kernel_asm(ldx,ptr) \ |
127 | __asm__("\n1:\t" ldx "\t0(%2),%0\n" \ | 114 | __asm__("\n1:\t" ldx "\t0(%2),%0\n\t" \ |
128 | "\t.section __ex_table,\"aw\"\n" \ | 115 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_get_user_skip_1)\ |
129 | "\t.word\t1b,fixup_get_user_skip_1\n" \ | ||
130 | "\t.previous" \ | ||
131 | : "=r"(__gu_val), "=r"(__gu_err) \ | 116 | : "=r"(__gu_val), "=r"(__gu_err) \ |
132 | : "r"(ptr), "1"(__gu_err) \ | 117 | : "r"(ptr), "1"(__gu_err) \ |
133 | : "r1"); | 118 | : "r1"); |
134 | 119 | ||
135 | #define __get_user_asm(ldx,ptr) \ | 120 | #define __get_user_asm(ldx,ptr) \ |
136 | __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n" \ | 121 | __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n\t" \ |
137 | "\t.section __ex_table,\"aw\"\n" \ | 122 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_get_user_skip_1)\ |
138 | "\t.word\t1b,fixup_get_user_skip_1\n" \ | ||
139 | "\t.previous" \ | ||
140 | : "=r"(__gu_val), "=r"(__gu_err) \ | 123 | : "=r"(__gu_val), "=r"(__gu_err) \ |
141 | : "r"(ptr), "1"(__gu_err) \ | 124 | : "r"(ptr), "1"(__gu_err) \ |
142 | : "r1"); | 125 | : "r1"); |
143 | #endif /* !__LP64__ */ | ||
144 | 126 | ||
145 | #define __put_user(x,ptr) \ | 127 | #define __put_user(x,ptr) \ |
146 | ({ \ | 128 | ({ \ |
@@ -179,80 +161,54 @@ struct exception_data { | |||
179 | * r8/r9 are already listed as err/val. | 161 | * r8/r9 are already listed as err/val. |
180 | */ | 162 | */ |
181 | 163 | ||
182 | #ifdef __LP64__ | ||
183 | #define __put_kernel_asm(stx,x,ptr) \ | 164 | #define __put_kernel_asm(stx,x,ptr) \ |
184 | __asm__ __volatile__ ( \ | 165 | __asm__ __volatile__ ( \ |
185 | "\n1:\t" stx "\t%2,0(%1)\n" \ | 166 | "\n1:\t" stx "\t%2,0(%1)\n\t" \ |
186 | "\t.section __ex_table,\"aw\"\n" \ | 167 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_1)\ |
187 | "\t.dword\t1b,fixup_put_user_skip_1\n" \ | ||
188 | "\t.previous" \ | ||
189 | : "=r"(__pu_err) \ | 168 | : "=r"(__pu_err) \ |
190 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | 169 | : "r"(ptr), "r"(x), "0"(__pu_err) \ |
191 | : "r1") | 170 | : "r1") |
192 | 171 | ||
193 | #define __put_user_asm(stx,x,ptr) \ | 172 | #define __put_user_asm(stx,x,ptr) \ |
194 | __asm__ __volatile__ ( \ | 173 | __asm__ __volatile__ ( \ |
195 | "\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \ | 174 | "\n1:\t" stx "\t%2,0(%%sr3,%1)\n\t" \ |
196 | "\t.section __ex_table,\"aw\"\n" \ | 175 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_1)\ |
197 | "\t.dword\t1b,fixup_put_user_skip_1\n" \ | ||
198 | "\t.previous" \ | ||
199 | : "=r"(__pu_err) \ | ||
200 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | ||
201 | : "r1") | ||
202 | #else | ||
203 | #define __put_kernel_asm(stx,x,ptr) \ | ||
204 | __asm__ __volatile__ ( \ | ||
205 | "\n1:\t" stx "\t%2,0(%1)\n" \ | ||
206 | "\t.section __ex_table,\"aw\"\n" \ | ||
207 | "\t.word\t1b,fixup_put_user_skip_1\n" \ | ||
208 | "\t.previous" \ | ||
209 | : "=r"(__pu_err) \ | 176 | : "=r"(__pu_err) \ |
210 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | 177 | : "r"(ptr), "r"(x), "0"(__pu_err) \ |
211 | : "r1") | 178 | : "r1") |
212 | 179 | ||
213 | #define __put_user_asm(stx,x,ptr) \ | ||
214 | __asm__ __volatile__ ( \ | ||
215 | "\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \ | ||
216 | "\t.section __ex_table,\"aw\"\n" \ | ||
217 | "\t.word\t1b,fixup_put_user_skip_1\n" \ | ||
218 | "\t.previous" \ | ||
219 | : "=r"(__pu_err) \ | ||
220 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | ||
221 | : "r1") | ||
222 | 180 | ||
223 | #define __put_kernel_asm64(__val,ptr) do { \ | 181 | #if !defined(CONFIG_64BIT) |
224 | u64 __val64 = (u64)(__val); \ | 182 | |
225 | u32 hi = (__val64) >> 32; \ | 183 | #define __put_kernel_asm64(__val,ptr) do { \ |
226 | u32 lo = (__val64) & 0xffffffff; \ | 184 | u64 __val64 = (u64)(__val); \ |
185 | u32 hi = (__val64) >> 32; \ | ||
186 | u32 lo = (__val64) & 0xffffffff; \ | ||
227 | __asm__ __volatile__ ( \ | 187 | __asm__ __volatile__ ( \ |
228 | "\n1:\tstw %2,0(%1)\n" \ | 188 | "\n1:\tstw %2,0(%1)" \ |
229 | "\n2:\tstw %3,4(%1)\n" \ | 189 | "\n2:\tstw %3,4(%1)\n\t" \ |
230 | "\t.section __ex_table,\"aw\"\n" \ | 190 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\ |
231 | "\t.word\t1b,fixup_put_user_skip_2\n" \ | 191 | ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\ |
232 | "\t.word\t2b,fixup_put_user_skip_1\n" \ | ||
233 | "\t.previous" \ | ||
234 | : "=r"(__pu_err) \ | 192 | : "=r"(__pu_err) \ |
235 | : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ | 193 | : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ |
236 | : "r1"); \ | 194 | : "r1"); \ |
237 | } while (0) | 195 | } while (0) |
238 | 196 | ||
239 | #define __put_user_asm64(__val,ptr) do { \ | 197 | #define __put_user_asm64(__val,ptr) do { \ |
240 | u64 __val64 = (u64)__val; \ | 198 | u64 __val64 = (u64)(__val); \ |
241 | u32 hi = (__val64) >> 32; \ | 199 | u32 hi = (__val64) >> 32; \ |
242 | u32 lo = (__val64) & 0xffffffff; \ | 200 | u32 lo = (__val64) & 0xffffffff; \ |
243 | __asm__ __volatile__ ( \ | 201 | __asm__ __volatile__ ( \ |
244 | "\n1:\tstw %2,0(%%sr3,%1)\n" \ | 202 | "\n1:\tstw %2,0(%%sr3,%1)" \ |
245 | "\n2:\tstw %3,4(%%sr3,%1)\n" \ | 203 | "\n2:\tstw %3,4(%%sr3,%1)\n\t" \ |
246 | "\t.section __ex_table,\"aw\"\n" \ | 204 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\ |
247 | "\t.word\t1b,fixup_get_user_skip_2\n" \ | 205 | ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\ |
248 | "\t.word\t2b,fixup_get_user_skip_1\n" \ | ||
249 | "\t.previous" \ | ||
250 | : "=r"(__pu_err) \ | 206 | : "=r"(__pu_err) \ |
251 | : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ | 207 | : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ |
252 | : "r1"); \ | 208 | : "r1"); \ |
253 | } while (0) | 209 | } while (0) |
254 | 210 | ||
255 | #endif /* !__LP64__ */ | 211 | #endif /* !defined(CONFIG_64BIT) */ |
256 | 212 | ||
257 | 213 | ||
258 | /* | 214 | /* |
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index 53b0f5d290e4..2f7c40861c91 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -772,7 +772,7 @@ | |||
772 | #define __NR_mknodat (__NR_Linux + 277) | 772 | #define __NR_mknodat (__NR_Linux + 277) |
773 | #define __NR_fchownat (__NR_Linux + 278) | 773 | #define __NR_fchownat (__NR_Linux + 278) |
774 | #define __NR_futimesat (__NR_Linux + 279) | 774 | #define __NR_futimesat (__NR_Linux + 279) |
775 | #define __NR_newfstatat (__NR_Linux + 280) | 775 | #define __NR_fstatat64 (__NR_Linux + 280) |
776 | #define __NR_unlinkat (__NR_Linux + 281) | 776 | #define __NR_unlinkat (__NR_Linux + 281) |
777 | #define __NR_renameat (__NR_Linux + 282) | 777 | #define __NR_renameat (__NR_Linux + 282) |
778 | #define __NR_linkat (__NR_Linux + 283) | 778 | #define __NR_linkat (__NR_Linux + 283) |
@@ -786,8 +786,14 @@ | |||
786 | #define __NR_splice (__NR_Linux + 291) | 786 | #define __NR_splice (__NR_Linux + 291) |
787 | #define __NR_sync_file_range (__NR_Linux + 292) | 787 | #define __NR_sync_file_range (__NR_Linux + 292) |
788 | #define __NR_tee (__NR_Linux + 293) | 788 | #define __NR_tee (__NR_Linux + 293) |
789 | #define __NR_vmsplice (__NR_Linux + 294) | ||
790 | #define __NR_move_pages (__NR_Linux + 295) | ||
791 | #define __NR_getcpu (__NR_Linux + 296) | ||
792 | #define __NR_epoll_pwait (__NR_Linux + 297) | ||
793 | #define __NR_statfs64 (__NR_Linux + 298) | ||
794 | #define __NR_fstatfs64 (__NR_Linux + 299) | ||
789 | 795 | ||
790 | #define __NR_Linux_syscalls 294 | 796 | #define __NR_Linux_syscalls (__NR_fstatfs64 + 1) |
791 | 797 | ||
792 | #define HPUX_GATEWAY_ADDR 0xC0000004 | 798 | #define HPUX_GATEWAY_ADDR 0xC0000004 |
793 | #define LINUX_GATEWAY_ADDR 0x100 | 799 | #define LINUX_GATEWAY_ADDR 0x100 |
@@ -951,6 +957,8 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ | |||
951 | #define __ARCH_WANT_SYS_SIGPENDING | 957 | #define __ARCH_WANT_SYS_SIGPENDING |
952 | #define __ARCH_WANT_SYS_SIGPROCMASK | 958 | #define __ARCH_WANT_SYS_SIGPROCMASK |
953 | #define __ARCH_WANT_SYS_RT_SIGACTION | 959 | #define __ARCH_WANT_SYS_RT_SIGACTION |
960 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
961 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | ||
954 | 962 | ||
955 | #endif /* __ASSEMBLY__ */ | 963 | #endif /* __ASSEMBLY__ */ |
956 | 964 | ||
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 6610495f5f16..0ad21a849b5f 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
@@ -57,7 +57,6 @@ static inline int pcibus_to_node(struct pci_bus *bus) | |||
57 | .busy_factor = 32, \ | 57 | .busy_factor = 32, \ |
58 | .imbalance_pct = 125, \ | 58 | .imbalance_pct = 125, \ |
59 | .cache_nice_tries = 1, \ | 59 | .cache_nice_tries = 1, \ |
60 | .per_cpu_gain = 100, \ | ||
61 | .busy_idx = 3, \ | 60 | .busy_idx = 3, \ |
62 | .idle_idx = 1, \ | 61 | .idle_idx = 1, \ |
63 | .newidle_idx = 2, \ | 62 | .newidle_idx = 2, \ |
diff --git a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h index af20c7462485..c17bdbf22067 100644 --- a/include/asm-s390/atomic.h +++ b/include/asm-s390/atomic.h | |||
@@ -215,6 +215,8 @@ static __inline__ void atomic64_set_mask(unsigned long mask, atomic64_t * v) | |||
215 | __CSG_LOOP(v, mask, "ogr"); | 215 | __CSG_LOOP(v, mask, "ogr"); |
216 | } | 216 | } |
217 | 217 | ||
218 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) | ||
219 | |||
218 | static __inline__ long long atomic64_cmpxchg(atomic64_t *v, | 220 | static __inline__ long long atomic64_cmpxchg(atomic64_t *v, |
219 | long long old, long long new) | 221 | long long old, long long new) |
220 | { | 222 | { |
diff --git a/include/asm-s390/bugs.h b/include/asm-s390/bugs.h index 2c3659621314..011f1e6a2a6c 100644 --- a/include/asm-s390/bugs.h +++ b/include/asm-s390/bugs.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * void check_bugs(void); | 16 | * void check_bugs(void); |
17 | */ | 17 | */ |
18 | 18 | ||
19 | static void __init check_bugs(void) | 19 | static inline void check_bugs(void) |
20 | { | 20 | { |
21 | /* s390 has no bugs ... */ | 21 | /* s390 has no bugs ... */ |
22 | } | 22 | } |
diff --git a/include/asm-s390/ipl.h b/include/asm-s390/ipl.h new file mode 100644 index 000000000000..660f78271a93 --- /dev/null +++ b/include/asm-s390/ipl.h | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | * s390 (re)ipl support | ||
3 | * | ||
4 | * Copyright IBM Corp. 2007 | ||
5 | */ | ||
6 | |||
7 | #ifndef _ASM_S390_IPL_H | ||
8 | #define _ASM_S390_IPL_H | ||
9 | |||
10 | #include <asm/types.h> | ||
11 | |||
12 | #define IPL_PARMBLOCK_ORIGIN 0x2000 | ||
13 | |||
14 | #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \ | ||
15 | sizeof(struct ipl_block_fcp)) | ||
16 | |||
17 | #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \ | ||
18 | sizeof(struct ipl_block_ccw)) | ||
19 | |||
20 | #define IPL_MAX_SUPPORTED_VERSION (0) | ||
21 | |||
22 | #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ | ||
23 | IPL_PARMBLOCK_ORIGIN) | ||
24 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len) | ||
25 | |||
26 | struct ipl_list_hdr { | ||
27 | u32 len; | ||
28 | u8 reserved1[3]; | ||
29 | u8 version; | ||
30 | u32 blk0_len; | ||
31 | u8 pbt; | ||
32 | u8 flags; | ||
33 | u16 reserved2; | ||
34 | } __attribute__((packed)); | ||
35 | |||
36 | struct ipl_block_fcp { | ||
37 | u8 reserved1[313-1]; | ||
38 | u8 opt; | ||
39 | u8 reserved2[3]; | ||
40 | u16 reserved3; | ||
41 | u16 devno; | ||
42 | u8 reserved4[4]; | ||
43 | u64 wwpn; | ||
44 | u64 lun; | ||
45 | u32 bootprog; | ||
46 | u8 reserved5[12]; | ||
47 | u64 br_lba; | ||
48 | u32 scp_data_len; | ||
49 | u8 reserved6[260]; | ||
50 | u8 scp_data[]; | ||
51 | } __attribute__((packed)); | ||
52 | |||
53 | struct ipl_block_ccw { | ||
54 | u8 load_param[8]; | ||
55 | u8 reserved1[84]; | ||
56 | u8 reserved2[2]; | ||
57 | u16 devno; | ||
58 | u8 vm_flags; | ||
59 | u8 reserved3[3]; | ||
60 | u32 vm_parm_len; | ||
61 | } __attribute__((packed)); | ||
62 | |||
63 | struct ipl_parameter_block { | ||
64 | struct ipl_list_hdr hdr; | ||
65 | union { | ||
66 | struct ipl_block_fcp fcp; | ||
67 | struct ipl_block_ccw ccw; | ||
68 | } ipl_info; | ||
69 | } __attribute__((packed)); | ||
70 | |||
71 | /* | ||
72 | * IPL validity flags and parameters as detected in head.S | ||
73 | */ | ||
74 | extern u32 ipl_flags; | ||
75 | extern u16 ipl_devno; | ||
76 | |||
77 | extern u32 dump_prefix_page; | ||
78 | extern void do_reipl(void); | ||
79 | extern void ipl_save_parameters(void); | ||
80 | |||
81 | enum { | ||
82 | IPL_DEVNO_VALID = 1, | ||
83 | IPL_PARMBLOCK_VALID = 2, | ||
84 | IPL_NSS_VALID = 4, | ||
85 | }; | ||
86 | |||
87 | /* | ||
88 | * DIAG 308 support | ||
89 | */ | ||
90 | enum diag308_subcode { | ||
91 | DIAG308_REL_HSA = 2, | ||
92 | DIAG308_IPL = 3, | ||
93 | DIAG308_DUMP = 4, | ||
94 | DIAG308_SET = 5, | ||
95 | DIAG308_STORE = 6, | ||
96 | }; | ||
97 | |||
98 | enum diag308_ipl_type { | ||
99 | DIAG308_IPL_TYPE_FCP = 0, | ||
100 | DIAG308_IPL_TYPE_CCW = 2, | ||
101 | }; | ||
102 | |||
103 | enum diag308_opt { | ||
104 | DIAG308_IPL_OPT_IPL = 0x10, | ||
105 | DIAG308_IPL_OPT_DUMP = 0x20, | ||
106 | }; | ||
107 | |||
108 | enum diag308_rc { | ||
109 | DIAG308_RC_OK = 1, | ||
110 | }; | ||
111 | |||
112 | extern int diag308(unsigned long subcode, void *addr); | ||
113 | |||
114 | #endif /* _ASM_S390_IPL_H */ | ||
diff --git a/include/asm-s390/local.h b/include/asm-s390/local.h index 86745a1b29bb..c11c530f74d0 100644 --- a/include/asm-s390/local.h +++ b/include/asm-s390/local.h | |||
@@ -1,58 +1 @@ | |||
1 | #ifndef _ASM_LOCAL_H | #include <asm-generic/local.h> | |
2 | #define _ASM_LOCAL_H | ||
3 | |||
4 | #include <linux/percpu.h> | ||
5 | #include <asm/atomic.h> | ||
6 | |||
7 | #ifndef __s390x__ | ||
8 | |||
9 | typedef atomic_t local_t; | ||
10 | |||
11 | #define LOCAL_INIT(i) ATOMIC_INIT(i) | ||
12 | #define local_read(v) atomic_read(v) | ||
13 | #define local_set(v,i) atomic_set(v,i) | ||
14 | |||
15 | #define local_inc(v) atomic_inc(v) | ||
16 | #define local_dec(v) atomic_dec(v) | ||
17 | #define local_add(i, v) atomic_add(i, v) | ||
18 | #define local_sub(i, v) atomic_sub(i, v) | ||
19 | |||
20 | #else | ||
21 | |||
22 | typedef atomic64_t local_t; | ||
23 | |||
24 | #define LOCAL_INIT(i) ATOMIC64_INIT(i) | ||
25 | #define local_read(v) atomic64_read(v) | ||
26 | #define local_set(v,i) atomic64_set(v,i) | ||
27 | |||
28 | #define local_inc(v) atomic64_inc(v) | ||
29 | #define local_dec(v) atomic64_dec(v) | ||
30 | #define local_add(i, v) atomic64_add(i, v) | ||
31 | #define local_sub(i, v) atomic64_sub(i, v) | ||
32 | |||
33 | #endif | ||
34 | |||
35 | #define __local_inc(v) ((v)->counter++) | ||
36 | #define __local_dec(v) ((v)->counter--) | ||
37 | #define __local_add(i,v) ((v)->counter+=(i)) | ||
38 | #define __local_sub(i,v) ((v)->counter-=(i)) | ||
39 | |||
40 | /* | ||
41 | * Use these for per-cpu local_t variables: on some archs they are | ||
42 | * much more efficient than these naive implementations. Note they take | ||
43 | * a variable, not an address. | ||
44 | */ | ||
45 | #define cpu_local_read(v) local_read(&__get_cpu_var(v)) | ||
46 | #define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i)) | ||
47 | |||
48 | #define cpu_local_inc(v) local_inc(&__get_cpu_var(v)) | ||
49 | #define cpu_local_dec(v) local_dec(&__get_cpu_var(v)) | ||
50 | #define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v)) | ||
51 | #define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v)) | ||
52 | |||
53 | #define __cpu_local_inc(v) __local_inc(&__get_cpu_var(v)) | ||
54 | #define __cpu_local_dec(v) __local_dec(&__get_cpu_var(v)) | ||
55 | #define __cpu_local_add(i, v) __local_add((i), &__get_cpu_var(v)) | ||
56 | #define __cpu_local_sub(i, v) __local_sub((i), &__get_cpu_var(v)) | ||
57 | |||
58 | #endif /* _ASM_LOCAL_H */ | ||
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 4c1b73940351..33b80ced4bc1 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -36,6 +36,11 @@ typedef struct | |||
36 | unsigned int unused : 16; | 36 | unsigned int unused : 16; |
37 | } __attribute__ ((packed)) cpuid_t; | 37 | } __attribute__ ((packed)) cpuid_t; |
38 | 38 | ||
39 | static inline void get_cpu_id(cpuid_t *ptr) | ||
40 | { | ||
41 | asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr)); | ||
42 | } | ||
43 | |||
39 | struct cpuinfo_S390 | 44 | struct cpuinfo_S390 |
40 | { | 45 | { |
41 | cpuid_t cpu_id; | 46 | cpuid_t cpu_id; |
diff --git a/include/asm-s390/sections.h b/include/asm-s390/sections.h index 1c5a2c4ccdad..fbd9116eb17b 100644 --- a/include/asm-s390/sections.h +++ b/include/asm-s390/sections.h | |||
@@ -3,6 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/sections.h> | 4 | #include <asm-generic/sections.h> |
5 | 5 | ||
6 | extern char _eshared[]; | 6 | extern char _eshared[], _ehead[]; |
7 | 7 | ||
8 | #endif | 8 | #endif |
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index 3388bb52597c..44c7aee2bd34 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #define PARMAREA 0x10400 | 17 | #define PARMAREA 0x10400 |
18 | #define MEMORY_CHUNKS 16 /* max 0x7fff */ | 18 | #define MEMORY_CHUNKS 16 /* max 0x7fff */ |
19 | #define IPL_PARMBLOCK_ORIGIN 0x2000 | ||
20 | 19 | ||
21 | #ifndef __ASSEMBLY__ | 20 | #ifndef __ASSEMBLY__ |
22 | 21 | ||
@@ -97,82 +96,9 @@ extern char vmpoff_cmd[]; | |||
97 | #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) | 96 | #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) |
98 | #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) | 97 | #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) |
99 | 98 | ||
100 | struct ipl_list_hdr { | ||
101 | u32 len; | ||
102 | u8 reserved1[3]; | ||
103 | u8 version; | ||
104 | u32 blk0_len; | ||
105 | u8 pbt; | ||
106 | u8 flags; | ||
107 | u16 reserved2; | ||
108 | } __attribute__((packed)); | ||
109 | |||
110 | struct ipl_block_fcp { | ||
111 | u8 reserved1[313-1]; | ||
112 | u8 opt; | ||
113 | u8 reserved2[3]; | ||
114 | u16 reserved3; | ||
115 | u16 devno; | ||
116 | u8 reserved4[4]; | ||
117 | u64 wwpn; | ||
118 | u64 lun; | ||
119 | u32 bootprog; | ||
120 | u8 reserved5[12]; | ||
121 | u64 br_lba; | ||
122 | u32 scp_data_len; | ||
123 | u8 reserved6[260]; | ||
124 | u8 scp_data[]; | ||
125 | } __attribute__((packed)); | ||
126 | |||
127 | struct ipl_block_ccw { | ||
128 | u8 load_param[8]; | ||
129 | u8 reserved1[84]; | ||
130 | u8 reserved2[2]; | ||
131 | u16 devno; | ||
132 | u8 vm_flags; | ||
133 | u8 reserved3[3]; | ||
134 | u32 vm_parm_len; | ||
135 | } __attribute__((packed)); | ||
136 | |||
137 | struct ipl_parameter_block { | ||
138 | struct ipl_list_hdr hdr; | ||
139 | union { | ||
140 | struct ipl_block_fcp fcp; | ||
141 | struct ipl_block_ccw ccw; | ||
142 | } ipl_info; | ||
143 | } __attribute__((packed)); | ||
144 | |||
145 | #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \ | ||
146 | sizeof(struct ipl_block_fcp)) | ||
147 | |||
148 | #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \ | ||
149 | sizeof(struct ipl_block_ccw)) | ||
150 | |||
151 | #define IPL_MAX_SUPPORTED_VERSION (0) | ||
152 | |||
153 | /* | ||
154 | * IPL validity flags and parameters as detected in head.S | ||
155 | */ | ||
156 | extern u32 ipl_flags; | ||
157 | extern u16 ipl_devno; | ||
158 | |||
159 | extern void do_reipl(void); | ||
160 | extern void ipl_save_parameters(void); | ||
161 | |||
162 | enum { | ||
163 | IPL_DEVNO_VALID = 1, | ||
164 | IPL_PARMBLOCK_VALID = 2, | ||
165 | IPL_NSS_VALID = 4, | ||
166 | }; | ||
167 | |||
168 | #define NSS_NAME_SIZE 8 | 99 | #define NSS_NAME_SIZE 8 |
169 | |||
170 | extern char kernel_nss_name[]; | 100 | extern char kernel_nss_name[]; |
171 | 101 | ||
172 | #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ | ||
173 | IPL_PARMBLOCK_ORIGIN) | ||
174 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len) | ||
175 | |||
176 | #else /* __ASSEMBLY__ */ | 102 | #else /* __ASSEMBLY__ */ |
177 | 103 | ||
178 | #ifndef __s390x__ | 104 | #ifndef __s390x__ |
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h index e3a180cf5062..9a3cb6ba9d15 100644 --- a/include/asm-sh/cache.h +++ b/include/asm-sh/cache.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 22 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) |
23 | 23 | ||
24 | #ifndef __ASSEMBLY__ | ||
24 | struct cache_info { | 25 | struct cache_info { |
25 | unsigned int ways; /* Number of cache ways */ | 26 | unsigned int ways; /* Number of cache ways */ |
26 | unsigned int sets; /* Number of cache sets */ | 27 | unsigned int sets; /* Number of cache sets */ |
@@ -47,6 +48,6 @@ struct cache_info { | |||
47 | 48 | ||
48 | unsigned long flags; | 49 | unsigned long flags; |
49 | }; | 50 | }; |
50 | 51 | #endif /* __ASSEMBLY__ */ | |
51 | #endif /* __KERNEL__ */ | 52 | #endif /* __KERNEL__ */ |
52 | #endif /* __ASM_SH_CACHE_H */ | 53 | #endif /* __ASM_SH_CACHE_H */ |
diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h index 22f12634975b..07f62ec9ff0c 100644 --- a/include/asm-sh/cacheflush.h +++ b/include/asm-sh/cacheflush.h | |||
@@ -30,8 +30,5 @@ extern void __flush_invalidate_region(void *start, int size); | |||
30 | 30 | ||
31 | #define HAVE_ARCH_UNMAPPED_AREA | 31 | #define HAVE_ARCH_UNMAPPED_AREA |
32 | 32 | ||
33 | /* Page flag for lazy dcache write-back for the aliasing UP caches */ | ||
34 | #define PG_dcache_dirty PG_arch_1 | ||
35 | |||
36 | #endif /* __KERNEL__ */ | 33 | #endif /* __KERNEL__ */ |
37 | #endif /* __ASM_SH_CACHEFLUSH_H */ | 34 | #endif /* __ASM_SH_CACHEFLUSH_H */ |
diff --git a/include/asm-sh/cpu-sh3/cacheflush.h b/include/asm-sh/cpu-sh3/cacheflush.h index 6fabbba228de..f70d8ef76a15 100644 --- a/include/asm-sh/cpu-sh3/cacheflush.h +++ b/include/asm-sh/cpu-sh3/cacheflush.h | |||
@@ -36,6 +36,8 @@ | |||
36 | /* 32KB cache, 4kb PAGE sizes need to check bit 12 */ | 36 | /* 32KB cache, 4kb PAGE sizes need to check bit 12 */ |
37 | #define CACHE_ALIAS 0x00001000 | 37 | #define CACHE_ALIAS 0x00001000 |
38 | 38 | ||
39 | #define PG_mapped PG_arch_1 | ||
40 | |||
39 | void flush_cache_all(void); | 41 | void flush_cache_all(void); |
40 | void flush_cache_mm(struct mm_struct *mm); | 42 | void flush_cache_mm(struct mm_struct *mm); |
41 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | 43 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
diff --git a/include/asm-sh/cpu-sh4/cacheflush.h b/include/asm-sh/cpu-sh4/cacheflush.h index b3746a936a09..5fd5c89ef86a 100644 --- a/include/asm-sh/cpu-sh4/cacheflush.h +++ b/include/asm-sh/cpu-sh4/cacheflush.h | |||
@@ -39,4 +39,6 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | |||
39 | /* Initialization of P3 area for copy_user_page */ | 39 | /* Initialization of P3 area for copy_user_page */ |
40 | void p3_cache_init(void); | 40 | void p3_cache_init(void); |
41 | 41 | ||
42 | #define PG_mapped PG_arch_1 | ||
43 | |||
42 | #endif /* __ASM_CPU_SH4_CACHEFLUSH_H */ | 44 | #endif /* __ASM_CPU_SH4_CACHEFLUSH_H */ |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 9214c015fe14..184d7fcaaf10 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -583,6 +583,11 @@ struct mm_struct; | |||
583 | extern unsigned int kobjsize(const void *objp); | 583 | extern unsigned int kobjsize(const void *objp); |
584 | #endif /* !CONFIG_MMU */ | 584 | #endif /* !CONFIG_MMU */ |
585 | 585 | ||
586 | #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) | ||
587 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | ||
588 | extern pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | ||
589 | #endif | ||
590 | |||
586 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 591 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
587 | extern void paging_init(void); | 592 | extern void paging_init(void); |
588 | 593 | ||
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index 279e70a77c75..31d55e3782d5 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h | |||
@@ -111,6 +111,7 @@ static inline struct thread_info *current_thread_info(void) | |||
111 | #define TIF_SIGPENDING 2 /* signal pending */ | 111 | #define TIF_SIGPENDING 2 /* signal pending */ |
112 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 112 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
113 | #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ | 113 | #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ |
114 | #define TIF_SINGLESTEP 5 /* singlestepping active */ | ||
114 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 115 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
115 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 116 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
116 | #define TIF_MEMDIE 18 | 117 | #define TIF_MEMDIE 18 |
@@ -121,6 +122,7 @@ static inline struct thread_info *current_thread_info(void) | |||
121 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 122 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
122 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 123 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
123 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 124 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
125 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | ||
124 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 126 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
125 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 127 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
126 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 128 | #define _TIF_FREEZE (1<<TIF_FREEZE) |
diff --git a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h index 38644742f011..a750c688408b 100644 --- a/include/asm-sparc/pci.h +++ b/include/asm-sparc/pci.h | |||
@@ -165,6 +165,9 @@ static inline int pci_dma_mapping_error(dma_addr_t dma_addr) | |||
165 | return (dma_addr == PCI_DMA_ERROR_CODE); | 165 | return (dma_addr == PCI_DMA_ERROR_CODE); |
166 | } | 166 | } |
167 | 167 | ||
168 | struct device_node; | ||
169 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | ||
170 | |||
168 | #endif /* __KERNEL__ */ | 171 | #endif /* __KERNEL__ */ |
169 | 172 | ||
170 | /* generic pci stuff */ | 173 | /* generic pci stuff */ |
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index 86c13dccea3d..274868d8598d 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -91,6 +91,7 @@ extern struct property *of_find_property(struct device_node *np, | |||
91 | extern int of_device_is_compatible(struct device_node *device, const char *); | 91 | extern int of_device_is_compatible(struct device_node *device, const char *); |
92 | extern void *of_get_property(struct device_node *node, const char *name, | 92 | extern void *of_get_property(struct device_node *node, const char *name, |
93 | int *lenp); | 93 | int *lenp); |
94 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) | ||
94 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 95 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
95 | extern int of_getintprop_default(struct device_node *np, | 96 | extern int of_getintprop_default(struct device_node *np, |
96 | const char *name, | 97 | const char *name, |
diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h index 93e5a062df88..a9fd06183972 100644 --- a/include/asm-sparc64/dma.h +++ b/include/asm-sparc64/dma.h | |||
@@ -15,17 +15,6 @@ | |||
15 | #include <asm/delay.h> | 15 | #include <asm/delay.h> |
16 | #include <asm/oplib.h> | 16 | #include <asm/oplib.h> |
17 | 17 | ||
18 | extern spinlock_t dma_spin_lock; | ||
19 | |||
20 | #define claim_dma_lock() \ | ||
21 | ({ unsigned long flags; \ | ||
22 | spin_lock_irqsave(&dma_spin_lock, flags); \ | ||
23 | flags; \ | ||
24 | }) | ||
25 | |||
26 | #define release_dma_lock(__flags) \ | ||
27 | spin_unlock_irqrestore(&dma_spin_lock, __flags); | ||
28 | |||
29 | /* These are irrelevant for Sparc DMA, but we leave it in so that | 18 | /* These are irrelevant for Sparc DMA, but we leave it in so that |
30 | * things can compile. | 19 | * things can compile. |
31 | */ | 20 | */ |
@@ -205,10 +194,6 @@ do { u32 tmp = sbus_readl((__regs) + DMA_CSR); \ | |||
205 | #define for_each_dvma(dma) \ | 194 | #define for_each_dvma(dma) \ |
206 | for((dma) = dma_chain; (dma); (dma) = (dma)->next) | 195 | for((dma) = dma_chain; (dma); (dma) = (dma)->next) |
207 | 196 | ||
208 | extern int get_dma_list(char *); | ||
209 | extern int request_dma(unsigned int, __const__ char *); | ||
210 | extern void free_dma(unsigned int); | ||
211 | |||
212 | /* From PCI */ | 197 | /* From PCI */ |
213 | 198 | ||
214 | #ifdef CONFIG_PCI | 199 | #ifdef CONFIG_PCI |
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index dbe033e494db..331013a0053e 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h | |||
@@ -854,4 +854,15 @@ static unsigned long __init sun_floppy_init(void) | |||
854 | 854 | ||
855 | #define EXTRA_FLOPPY_PARAMS | 855 | #define EXTRA_FLOPPY_PARAMS |
856 | 856 | ||
857 | static DEFINE_SPINLOCK(dma_spin_lock); | ||
858 | |||
859 | #define claim_dma_lock() \ | ||
860 | ({ unsigned long flags; \ | ||
861 | spin_lock_irqsave(&dma_spin_lock, flags); \ | ||
862 | flags; \ | ||
863 | }) | ||
864 | |||
865 | #define release_dma_lock(__flags) \ | ||
866 | spin_unlock_irqrestore(&dma_spin_lock, __flags); | ||
867 | |||
857 | #endif /* !(__ASM_SPARC64_FLOPPY_H) */ | 868 | #endif /* !(__ASM_SPARC64_FLOPPY_H) */ |
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index d3895873e4c7..284dfd01a33d 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
@@ -19,12 +19,45 @@ | |||
19 | */ | 19 | */ |
20 | #define HAS_DMA | 20 | #define HAS_DMA |
21 | 21 | ||
22 | static DEFINE_SPINLOCK(dma_spin_lock); | ||
23 | |||
24 | #define claim_dma_lock() \ | ||
25 | ({ unsigned long flags; \ | ||
26 | spin_lock_irqsave(&dma_spin_lock, flags); \ | ||
27 | flags; \ | ||
28 | }) | ||
29 | |||
30 | #define release_dma_lock(__flags) \ | ||
31 | spin_unlock_irqrestore(&dma_spin_lock, __flags); | ||
32 | |||
22 | static struct sparc_ebus_info { | 33 | static struct sparc_ebus_info { |
23 | struct ebus_dma_info info; | 34 | struct ebus_dma_info info; |
24 | unsigned int addr; | 35 | unsigned int addr; |
25 | unsigned int count; | 36 | unsigned int count; |
37 | int lock; | ||
26 | } sparc_ebus_dmas[PARPORT_PC_MAX_PORTS]; | 38 | } sparc_ebus_dmas[PARPORT_PC_MAX_PORTS]; |
27 | 39 | ||
40 | static __inline__ int request_dma(unsigned int dmanr, const char *device_id) | ||
41 | { | ||
42 | if (dmanr >= PARPORT_PC_MAX_PORTS) | ||
43 | return -EINVAL; | ||
44 | if (xchg(&sparc_ebus_dmas[dmanr].lock, 1) != 0) | ||
45 | return -EBUSY; | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | static __inline__ void free_dma(unsigned int dmanr) | ||
50 | { | ||
51 | if (dmanr >= PARPORT_PC_MAX_PORTS) { | ||
52 | printk(KERN_WARNING "Trying to free DMA%d\n", dmanr); | ||
53 | return; | ||
54 | } | ||
55 | if (xchg(&sparc_ebus_dmas[dmanr].lock, 0) == 0) { | ||
56 | printk(KERN_WARNING "Trying to free free DMA%d\n", dmanr); | ||
57 | return; | ||
58 | } | ||
59 | } | ||
60 | |||
28 | static __inline__ void enable_dma(unsigned int dmanr) | 61 | static __inline__ void enable_dma(unsigned int dmanr) |
29 | { | 62 | { |
30 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); | 63 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); |
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h index ca6560288ae8..b14a725b430d 100644 --- a/include/asm-sparc64/pci.h +++ b/include/asm-sparc64/pci.h | |||
@@ -312,6 +312,9 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
312 | return PCI_IRQ_NONE; | 312 | return PCI_IRQ_NONE; |
313 | } | 313 | } |
314 | 314 | ||
315 | struct device_node; | ||
316 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | ||
317 | |||
315 | #endif /* __KERNEL__ */ | 318 | #endif /* __KERNEL__ */ |
316 | 319 | ||
317 | #endif /* __SPARC64_PCI_H */ | 320 | #endif /* __SPARC64_PCI_H */ |
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h index 99671ed6625d..0eca2d98627f 100644 --- a/include/asm-sparc64/prom.h +++ b/include/asm-sparc64/prom.h | |||
@@ -99,6 +99,7 @@ extern struct property *of_find_property(struct device_node *np, | |||
99 | extern int of_device_is_compatible(struct device_node *device, const char *); | 99 | extern int of_device_is_compatible(struct device_node *device, const char *); |
100 | extern void *of_get_property(struct device_node *node, const char *name, | 100 | extern void *of_get_property(struct device_node *node, const char *name, |
101 | int *lenp); | 101 | int *lenp); |
102 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) | ||
102 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 103 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
103 | extern int of_getintprop_default(struct device_node *np, | 104 | extern int of_getintprop_default(struct device_node *np, |
104 | const char *name, | 105 | const char *name, |
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index e57ff136ee51..1b1090a91a58 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -270,7 +270,7 @@ static inline pte_t pte_wrprotect(pte_t pte) | |||
270 | 270 | ||
271 | static inline pte_t pte_mkread(pte_t pte) | 271 | static inline pte_t pte_mkread(pte_t pte) |
272 | { | 272 | { |
273 | pte_set_bits(pte, _PAGE_RW); | 273 | pte_set_bits(pte, _PAGE_USER); |
274 | return(pte_mknewprot(pte)); | 274 | return(pte_mknewprot(pte)); |
275 | } | 275 | } |
276 | 276 | ||
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 552df5f10a6d..2e4b7a5ed1c4 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h | |||
@@ -32,9 +32,30 @@ | |||
32 | #define IA32_SYSCALL_VECTOR 0x80 | 32 | #define IA32_SYSCALL_VECTOR 0x80 |
33 | 33 | ||
34 | 34 | ||
35 | /* Reserve the lowest usable priority level 0x20 - 0x2f for triggering | ||
36 | * cleanup after irq migration. | ||
37 | */ | ||
38 | #define IRQ_MOVE_CLEANUP_VECTOR FIRST_EXTERNAL_VECTOR | ||
39 | |||
35 | /* | 40 | /* |
36 | * Vectors 0x20-0x2f are used for ISA interrupts. | 41 | * Vectors 0x20-0x2f are used for ISA interrupts. |
37 | */ | 42 | */ |
43 | #define IRQ0_VECTOR FIRST_EXTERNAL_VECTOR + 0x10 | ||
44 | #define IRQ1_VECTOR IRQ0_VECTOR + 1 | ||
45 | #define IRQ2_VECTOR IRQ0_VECTOR + 2 | ||
46 | #define IRQ3_VECTOR IRQ0_VECTOR + 3 | ||
47 | #define IRQ4_VECTOR IRQ0_VECTOR + 4 | ||
48 | #define IRQ5_VECTOR IRQ0_VECTOR + 5 | ||
49 | #define IRQ6_VECTOR IRQ0_VECTOR + 6 | ||
50 | #define IRQ7_VECTOR IRQ0_VECTOR + 7 | ||
51 | #define IRQ8_VECTOR IRQ0_VECTOR + 8 | ||
52 | #define IRQ9_VECTOR IRQ0_VECTOR + 9 | ||
53 | #define IRQ10_VECTOR IRQ0_VECTOR + 10 | ||
54 | #define IRQ11_VECTOR IRQ0_VECTOR + 11 | ||
55 | #define IRQ12_VECTOR IRQ0_VECTOR + 12 | ||
56 | #define IRQ13_VECTOR IRQ0_VECTOR + 13 | ||
57 | #define IRQ14_VECTOR IRQ0_VECTOR + 14 | ||
58 | #define IRQ15_VECTOR IRQ0_VECTOR + 15 | ||
38 | 59 | ||
39 | /* | 60 | /* |
40 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff | 61 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff |
@@ -66,10 +87,10 @@ | |||
66 | 87 | ||
67 | /* | 88 | /* |
68 | * First APIC vector available to drivers: (vectors 0x30-0xee) | 89 | * First APIC vector available to drivers: (vectors 0x30-0xee) |
69 | * we start at 0x31 to spread out vectors evenly between priority | 90 | * we start at 0x41 to spread out vectors evenly between priority |
70 | * levels. (0x80 is the syscall vector) | 91 | * levels. (0x80 is the syscall vector) |
71 | */ | 92 | */ |
72 | #define FIRST_DEVICE_VECTOR 0x31 | 93 | #define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2) |
73 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in irq.h */ | 94 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in irq.h */ |
74 | 95 | ||
75 | 96 | ||
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index f4fb238c89f1..969d225a9350 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/mpspec.h> | 5 | #include <asm/mpspec.h> |
6 | #include <asm/apicdef.h> | ||
6 | 7 | ||
7 | /* | 8 | /* |
8 | * Intel IO-APIC support for SMP and UP systems. | 9 | * Intel IO-APIC support for SMP and UP systems. |
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index 3227bc93d69b..902f9a58617e 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
@@ -160,6 +160,19 @@ static inline unsigned int cpuid_edx(unsigned int op) | |||
160 | #define MSR_IA32_UCODE_WRITE 0x79 | 160 | #define MSR_IA32_UCODE_WRITE 0x79 |
161 | #define MSR_IA32_UCODE_REV 0x8b | 161 | #define MSR_IA32_UCODE_REV 0x8b |
162 | 162 | ||
163 | #ifdef CONFIG_SMP | ||
164 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | ||
165 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | ||
166 | #else /* CONFIG_SMP */ | ||
167 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | ||
168 | { | ||
169 | rdmsr(msr_no, *l, *h); | ||
170 | } | ||
171 | static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | ||
172 | { | ||
173 | wrmsr(msr_no, l, h); | ||
174 | } | ||
175 | #endif /* CONFIG_SMP */ | ||
163 | 176 | ||
164 | #endif | 177 | #endif |
165 | 178 | ||
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index 72375e7d32a8..ceb3d8dac33d 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -64,7 +64,7 @@ extern int setup_nmi_watchdog(char *); | |||
64 | 64 | ||
65 | extern atomic_t nmi_active; | 65 | extern atomic_t nmi_active; |
66 | extern unsigned int nmi_watchdog; | 66 | extern unsigned int nmi_watchdog; |
67 | #define NMI_DEFAULT -1 | 67 | #define NMI_DEFAULT 0 |
68 | #define NMI_NONE 0 | 68 | #define NMI_NONE 0 |
69 | #define NMI_IO_APIC 1 | 69 | #define NMI_IO_APIC 1 |
70 | #define NMI_LOCAL_APIC 2 | 70 | #define NMI_LOCAL_APIC 2 |
diff --git a/include/asm-x86_64/swiotlb.h b/include/asm-x86_64/swiotlb.h index ab913ffcad56..f9c589539a82 100644 --- a/include/asm-x86_64/swiotlb.h +++ b/include/asm-x86_64/swiotlb.h | |||
@@ -44,7 +44,6 @@ extern void swiotlb_init(void); | |||
44 | extern int swiotlb_force; | 44 | extern int swiotlb_force; |
45 | 45 | ||
46 | #ifdef CONFIG_SWIOTLB | 46 | #ifdef CONFIG_SWIOTLB |
47 | #define SWIOTLB_ARCH_NEED_ALLOC | ||
48 | extern int swiotlb; | 47 | extern int swiotlb; |
49 | #else | 48 | #else |
50 | #define swiotlb 0 | 49 | #define swiotlb 0 |
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index 2facec5914d2..4fd6fb23953e 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -43,7 +43,6 @@ extern int __node_distance(int, int); | |||
43 | .newidle_idx = 0, \ | 43 | .newidle_idx = 0, \ |
44 | .wake_idx = 1, \ | 44 | .wake_idx = 1, \ |
45 | .forkexec_idx = 1, \ | 45 | .forkexec_idx = 1, \ |
46 | .per_cpu_gain = 100, \ | ||
47 | .flags = SD_LOAD_BALANCE \ | 46 | .flags = SD_LOAD_BALANCE \ |
48 | | SD_BALANCE_FORK \ | 47 | | SD_BALANCE_FORK \ |
49 | | SD_BALANCE_EXEC \ | 48 | | SD_BALANCE_EXEC \ |
diff --git a/include/asm-x86_64/tsc.h b/include/asm-x86_64/tsc.h index 9a0a368852c7..d66ba6ef25f6 100644 --- a/include/asm-x86_64/tsc.h +++ b/include/asm-x86_64/tsc.h | |||
@@ -1,66 +1 @@ | |||
1 | /* | #include <asm-i386/tsc.h> | |
2 | * linux/include/asm-x86_64/tsc.h | ||
3 | * | ||
4 | * x86_64 TSC related functions | ||
5 | */ | ||
6 | #ifndef _ASM_x86_64_TSC_H | ||
7 | #define _ASM_x86_64_TSC_H | ||
8 | |||
9 | #include <asm/processor.h> | ||
10 | |||
11 | /* | ||
12 | * Standard way to access the cycle counter. | ||
13 | */ | ||
14 | typedef unsigned long long cycles_t; | ||
15 | |||
16 | extern unsigned int cpu_khz; | ||
17 | extern unsigned int tsc_khz; | ||
18 | |||
19 | static inline cycles_t get_cycles(void) | ||
20 | { | ||
21 | unsigned long long ret = 0; | ||
22 | |||
23 | #ifndef CONFIG_X86_TSC | ||
24 | if (!cpu_has_tsc) | ||
25 | return 0; | ||
26 | #endif | ||
27 | |||
28 | #if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) | ||
29 | rdtscll(ret); | ||
30 | #endif | ||
31 | return ret; | ||
32 | } | ||
33 | |||
34 | /* Like get_cycles, but make sure the CPU is synchronized. */ | ||
35 | static __always_inline cycles_t get_cycles_sync(void) | ||
36 | { | ||
37 | unsigned long long ret; | ||
38 | #ifdef X86_FEATURE_SYNC_RDTSC | ||
39 | unsigned eax; | ||
40 | |||
41 | /* | ||
42 | * Don't do an additional sync on CPUs where we know | ||
43 | * RDTSC is already synchronous: | ||
44 | */ | ||
45 | alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC, | ||
46 | "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); | ||
47 | #else | ||
48 | sync_core(); | ||
49 | #endif | ||
50 | rdtscll(ret); | ||
51 | |||
52 | return ret; | ||
53 | } | ||
54 | |||
55 | extern void tsc_init(void); | ||
56 | extern void mark_tsc_unstable(void); | ||
57 | extern int unsynchronized_tsc(void); | ||
58 | |||
59 | /* | ||
60 | * Boot-time check whether the TSCs are synchronized across | ||
61 | * all CPUs/cores: | ||
62 | */ | ||
63 | extern void check_tsc_sync_source(int cpu); | ||
64 | extern void check_tsc_sync_target(void); | ||
65 | |||
66 | #endif | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 272736e37990..c331da2da5f7 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -282,7 +282,6 @@ struct ata_taskfile { | |||
282 | }; | 282 | }; |
283 | 283 | ||
284 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) | 284 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) |
285 | #define ata_id_is_sata(id) ((id)[93] == 0) | ||
286 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) | 285 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) |
287 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) | 286 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) |
288 | #define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10)) | 287 | #define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10)) |
@@ -324,6 +323,11 @@ static inline unsigned int ata_id_major_version(const u16 *id) | |||
324 | return mver; | 323 | return mver; |
325 | } | 324 | } |
326 | 325 | ||
326 | static inline int ata_id_is_sata(const u16 *id) | ||
327 | { | ||
328 | return ata_id_major_version(id) >= 5 && id[93] == 0; | ||
329 | } | ||
330 | |||
327 | static inline int ata_id_current_chs_valid(const u16 *id) | 331 | static inline int ata_id_current_chs_valid(const u16 *id) |
328 | { | 332 | { |
329 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 333 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
@@ -350,7 +354,7 @@ static inline int ata_id_is_cfa(const u16 *id) | |||
350 | 354 | ||
351 | static inline int ata_drive_40wire(const u16 *dev_id) | 355 | static inline int ata_drive_40wire(const u16 *dev_id) |
352 | { | 356 | { |
353 | if (ata_id_major_version(dev_id) >= 5 && ata_id_is_sata(dev_id)) | 357 | if (ata_id_is_sata(dev_id)) |
354 | return 0; /* SATA */ | 358 | return 0; /* SATA */ |
355 | if ((dev_id[93] & 0xE000) == 0x6000) | 359 | if ((dev_id[93] & 0xE000) == 0x6000) |
356 | return 0; /* 80 wire */ | 360 | return 0; /* 80 wire */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 229fa012c893..773e30df11ee 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #ifndef _LINUX_AUDIT_H_ | 24 | #ifndef _LINUX_AUDIT_H_ |
25 | #define _LINUX_AUDIT_H_ | 25 | #define _LINUX_AUDIT_H_ |
26 | 26 | ||
27 | #include <linux/types.h> | ||
27 | #include <linux/elf-em.h> | 28 | #include <linux/elf-em.h> |
28 | 29 | ||
29 | /* The netlink messages for the audit system is divided into blocks: | 30 | /* The netlink messages for the audit system is divided into blocks: |
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index 0a6bc52ffe88..31a29541b504 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
@@ -59,6 +59,13 @@ struct autofs_packet_expire_multi { | |||
59 | char name[NAME_MAX+1]; | 59 | char name[NAME_MAX+1]; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | union autofs_packet_union { | ||
63 | struct autofs_packet_hdr hdr; | ||
64 | struct autofs_packet_missing missing; | ||
65 | struct autofs_packet_expire expire; | ||
66 | struct autofs_packet_expire_multi expire_multi; | ||
67 | }; | ||
68 | |||
62 | /* autofs v5 common packet struct */ | 69 | /* autofs v5 common packet struct */ |
63 | struct autofs_v5_packet { | 70 | struct autofs_v5_packet { |
64 | struct autofs_packet_hdr hdr; | 71 | struct autofs_packet_hdr hdr; |
@@ -78,12 +85,13 @@ typedef struct autofs_v5_packet autofs_packet_expire_indirect_t; | |||
78 | typedef struct autofs_v5_packet autofs_packet_missing_direct_t; | 85 | typedef struct autofs_v5_packet autofs_packet_missing_direct_t; |
79 | typedef struct autofs_v5_packet autofs_packet_expire_direct_t; | 86 | typedef struct autofs_v5_packet autofs_packet_expire_direct_t; |
80 | 87 | ||
81 | union autofs_packet_union { | 88 | union autofs_v5_packet_union { |
82 | struct autofs_packet_hdr hdr; | 89 | struct autofs_packet_hdr hdr; |
83 | struct autofs_packet_missing missing; | ||
84 | struct autofs_packet_expire expire; | ||
85 | struct autofs_packet_expire_multi expire_multi; | ||
86 | struct autofs_v5_packet v5_packet; | 90 | struct autofs_v5_packet v5_packet; |
91 | autofs_packet_missing_indirect_t missing_indirect; | ||
92 | autofs_packet_expire_indirect_t expire_indirect; | ||
93 | autofs_packet_missing_direct_t missing_direct; | ||
94 | autofs_packet_expire_direct_t expire_direct; | ||
87 | }; | 95 | }; |
88 | 96 | ||
89 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int) | 97 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int) |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index a5cf1beacb44..1023ba0d6e55 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -9,17 +9,28 @@ | |||
9 | #define _LINUX_BACKLIGHT_H | 9 | #define _LINUX_BACKLIGHT_H |
10 | 10 | ||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/mutex.h> | ||
12 | #include <linux/notifier.h> | 13 | #include <linux/notifier.h> |
13 | 14 | ||
15 | /* Notes on locking: | ||
16 | * | ||
17 | * backlight_device->ops_lock is an internal backlight lock protecting the | ||
18 | * ops pointer and no code outside the core should need to touch it. | ||
19 | * | ||
20 | * Access to update_status() is serialised by the update_lock mutex since | ||
21 | * most drivers seem to need this and historically get it wrong. | ||
22 | * | ||
23 | * Most drivers don't need locking on their get_brightness() method. | ||
24 | * If yours does, you need to implement it in the driver. You can use the | ||
25 | * update_lock mutex if appropriate. | ||
26 | * | ||
27 | * Any other use of the locks below is probably wrong. | ||
28 | */ | ||
29 | |||
14 | struct backlight_device; | 30 | struct backlight_device; |
15 | struct fb_info; | 31 | struct fb_info; |
16 | 32 | ||
17 | /* This structure defines all the properties of a backlight | 33 | struct backlight_ops { |
18 | (usually attached to a LCD). */ | ||
19 | struct backlight_properties { | ||
20 | /* Owner module */ | ||
21 | struct module *owner; | ||
22 | |||
23 | /* Notify the backlight driver some property has changed */ | 34 | /* Notify the backlight driver some property has changed */ |
24 | int (*update_status)(struct backlight_device *); | 35 | int (*update_status)(struct backlight_device *); |
25 | /* Return the current backlight brightness (accounting for power, | 36 | /* Return the current backlight brightness (accounting for power, |
@@ -28,7 +39,10 @@ struct backlight_properties { | |||
28 | /* Check if given framebuffer device is the one bound to this backlight; | 39 | /* Check if given framebuffer device is the one bound to this backlight; |
29 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ | 40 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ |
30 | int (*check_fb)(struct fb_info *); | 41 | int (*check_fb)(struct fb_info *); |
42 | }; | ||
31 | 43 | ||
44 | /* This structure defines all the properties of a backlight */ | ||
45 | struct backlight_properties { | ||
32 | /* Current User requested brightness (0 - max_brightness) */ | 46 | /* Current User requested brightness (0 - max_brightness) */ |
33 | int brightness; | 47 | int brightness; |
34 | /* Maximal value for brightness (read-only) */ | 48 | /* Maximal value for brightness (read-only) */ |
@@ -41,20 +55,34 @@ struct backlight_properties { | |||
41 | }; | 55 | }; |
42 | 56 | ||
43 | struct backlight_device { | 57 | struct backlight_device { |
44 | /* This protects the 'props' field. If 'props' is NULL, the driver that | 58 | /* Backlight properties */ |
59 | struct backlight_properties props; | ||
60 | |||
61 | /* Serialise access to update_status method */ | ||
62 | struct mutex update_lock; | ||
63 | |||
64 | /* This protects the 'ops' field. If 'ops' is NULL, the driver that | ||
45 | registered this device has been unloaded, and if class_get_devdata() | 65 | registered this device has been unloaded, and if class_get_devdata() |
46 | points to something in the body of that driver, it is also invalid. */ | 66 | points to something in the body of that driver, it is also invalid. */ |
47 | struct semaphore sem; | 67 | struct mutex ops_lock; |
48 | /* If this is NULL, the backing module is unloaded */ | 68 | struct backlight_ops *ops; |
49 | struct backlight_properties *props; | 69 | |
50 | /* The framebuffer notifier block */ | 70 | /* The framebuffer notifier block */ |
51 | struct notifier_block fb_notif; | 71 | struct notifier_block fb_notif; |
52 | /* The class device structure */ | 72 | /* The class device structure */ |
53 | struct class_device class_dev; | 73 | struct class_device class_dev; |
54 | }; | 74 | }; |
55 | 75 | ||
76 | static inline void backlight_update_status(struct backlight_device *bd) | ||
77 | { | ||
78 | mutex_lock(&bd->update_lock); | ||
79 | if (bd->ops && bd->ops->update_status) | ||
80 | bd->ops->update_status(bd); | ||
81 | mutex_unlock(&bd->update_lock); | ||
82 | } | ||
83 | |||
56 | extern struct backlight_device *backlight_device_register(const char *name, | 84 | extern struct backlight_device *backlight_device_register(const char *name, |
57 | struct device *dev,void *devdata,struct backlight_properties *bp); | 85 | struct device *dev, void *devdata, struct backlight_ops *ops); |
58 | extern void backlight_device_unregister(struct backlight_device *bd); | 86 | extern void backlight_device_unregister(struct backlight_device *bd); |
59 | 87 | ||
60 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) | 88 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index bbbe7b4da0bb..f50f04bdbc16 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
@@ -939,7 +939,7 @@ struct cdrom_device_info { | |||
939 | int speed; /* maximum speed for reading data */ | 939 | int speed; /* maximum speed for reading data */ |
940 | int capacity; /* number of discs in jukebox */ | 940 | int capacity; /* number of discs in jukebox */ |
941 | /* device-related storage */ | 941 | /* device-related storage */ |
942 | int options : 30; /* options flags */ | 942 | unsigned int options : 30; /* options flags */ |
943 | unsigned mc_flags : 2; /* media change buffer flags */ | 943 | unsigned mc_flags : 2; /* media change buffer flags */ |
944 | int use_count; /* number of times device opened */ | 944 | int use_count; /* number of times device opened */ |
945 | char name[20]; /* name of the device type */ | 945 | char name[20]; /* name of the device type */ |
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h index 0bc45e69da5a..1605dd8aa646 100644 --- a/include/linux/cfag12864b.h +++ b/include/linux/cfag12864b.h | |||
@@ -73,5 +73,10 @@ extern void cfag12864b_disable(void); | |||
73 | */ | 73 | */ |
74 | extern unsigned char cfag12864b_isenabled(void); | 74 | extern unsigned char cfag12864b_isenabled(void); |
75 | 75 | ||
76 | /* | ||
77 | * Is the module inited? | ||
78 | */ | ||
79 | extern unsigned char cfag12864b_isinited(void); | ||
80 | |||
76 | #endif /* _CFAG12864B_H_ */ | 81 | #endif /* _CFAG12864B_H_ */ |
77 | 82 | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index 80b17f440ec1..ccd863dd77fa 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -234,5 +234,24 @@ asmlinkage long compat_sys_migrate_pages(compat_pid_t pid, | |||
234 | compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes, | 234 | compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes, |
235 | const compat_ulong_t __user *new_nodes); | 235 | const compat_ulong_t __user *new_nodes); |
236 | 236 | ||
237 | /* | ||
238 | * epoll (fs/eventpoll.c) compat bits follow ... | ||
239 | */ | ||
240 | #ifndef CONFIG_HAS_COMPAT_EPOLL_EVENT | ||
241 | struct epoll_event; | ||
242 | #define compat_epoll_event epoll_event | ||
243 | #else | ||
244 | asmlinkage long compat_sys_epoll_ctl(int epfd, int op, int fd, | ||
245 | struct compat_epoll_event __user *event); | ||
246 | asmlinkage long compat_sys_epoll_wait(int epfd, | ||
247 | struct compat_epoll_event __user *events, | ||
248 | int maxevents, int timeout); | ||
249 | #endif | ||
250 | asmlinkage long compat_sys_epoll_pwait(int epfd, | ||
251 | struct compat_epoll_event __user *events, | ||
252 | int maxevents, int timeout, | ||
253 | const compat_sigset_t __user *sigmask, | ||
254 | compat_size_t sigsetsize); | ||
255 | |||
237 | #endif /* CONFIG_COMPAT */ | 256 | #endif /* CONFIG_COMPAT */ |
238 | #endif /* _LINUX_COMPAT_H */ | 257 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index d0e8c8b0e34d..23f55140ccd5 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -398,11 +398,11 @@ extern cpumask_t cpu_present_map; | |||
398 | #endif | 398 | #endif |
399 | 399 | ||
400 | #ifdef CONFIG_SMP | 400 | #ifdef CONFIG_SMP |
401 | int highest_possible_processor_id(void); | 401 | extern int nr_cpu_ids; |
402 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) | 402 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) |
403 | int __any_online_cpu(const cpumask_t *mask); | 403 | int __any_online_cpu(const cpumask_t *mask); |
404 | #else | 404 | #else |
405 | #define highest_possible_processor_id() 0 | 405 | #define nr_cpu_ids 1 |
406 | #define any_online_cpu(mask) 0 | 406 | #define any_online_cpu(mask) 0 |
407 | #endif | 407 | #endif |
408 | 408 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index d1a3a27c3988..39a3199a826d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -294,8 +294,6 @@ extern void class_device_initialize(struct class_device *); | |||
294 | extern int __must_check class_device_add(struct class_device *); | 294 | extern int __must_check class_device_add(struct class_device *); |
295 | extern void class_device_del(struct class_device *); | 295 | extern void class_device_del(struct class_device *); |
296 | 296 | ||
297 | extern int class_device_rename(struct class_device *, char *); | ||
298 | |||
299 | extern struct class_device * class_device_get(struct class_device *); | 297 | extern struct class_device * class_device_get(struct class_device *); |
300 | extern void class_device_put(struct class_device *); | 298 | extern void class_device_put(struct class_device *); |
301 | 299 | ||
diff --git a/include/linux/ds1742rtc.h b/include/linux/ds1742rtc.h deleted file mode 100644 index a83cdd1cafc9..000000000000 --- a/include/linux/ds1742rtc.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * ds1742rtc.h - register definitions for the Real-Time-Clock / CMOS RAM | ||
3 | * | ||
4 | * Copyright (C) 1999-2001 Toshiba Corporation | ||
5 | * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org) | ||
6 | * | ||
7 | * Permission is hereby granted to copy, modify and redistribute this code | ||
8 | * in terms of the GNU Library General Public License, Version 2 or later, | ||
9 | * at your option. | ||
10 | */ | ||
11 | #ifndef __LINUX_DS1742RTC_H | ||
12 | #define __LINUX_DS1742RTC_H | ||
13 | |||
14 | #include <asm/ds1742.h> | ||
15 | |||
16 | #define RTC_BRAM_SIZE 0x800 | ||
17 | #define RTC_OFFSET 0x7f8 | ||
18 | |||
19 | /* | ||
20 | * Register summary | ||
21 | */ | ||
22 | #define RTC_CONTROL (RTC_OFFSET + 0) | ||
23 | #define RTC_CENTURY (RTC_OFFSET + 0) | ||
24 | #define RTC_SECONDS (RTC_OFFSET + 1) | ||
25 | #define RTC_MINUTES (RTC_OFFSET + 2) | ||
26 | #define RTC_HOURS (RTC_OFFSET + 3) | ||
27 | #define RTC_DAY (RTC_OFFSET + 4) | ||
28 | #define RTC_DATE (RTC_OFFSET + 5) | ||
29 | #define RTC_MONTH (RTC_OFFSET + 6) | ||
30 | #define RTC_YEAR (RTC_OFFSET + 7) | ||
31 | |||
32 | #define RTC_CENTURY_MASK 0x3f | ||
33 | #define RTC_SECONDS_MASK 0x7f | ||
34 | #define RTC_DAY_MASK 0x07 | ||
35 | |||
36 | /* | ||
37 | * Bits in the Control/Century register | ||
38 | */ | ||
39 | #define RTC_WRITE 0x80 | ||
40 | #define RTC_READ 0x40 | ||
41 | |||
42 | /* | ||
43 | * Bits in the Seconds register | ||
44 | */ | ||
45 | #define RTC_STOP 0x80 | ||
46 | |||
47 | /* | ||
48 | * Bits in the Day register | ||
49 | */ | ||
50 | #define RTC_BATT_FLAG 0x80 | ||
51 | #define RTC_FREQ_TEST 0x40 | ||
52 | |||
53 | #endif /* __LINUX_DS1742RTC_H */ | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index a78e25683f82..be913ec87169 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -516,13 +516,15 @@ struct fb_cursor_user { | |||
516 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 | 516 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 |
517 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ | 517 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ |
518 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 | 518 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 |
519 | /* A display blank is requested */ | 519 | /* A hardware display blank change occured */ |
520 | #define FB_EVENT_BLANK 0x09 | 520 | #define FB_EVENT_BLANK 0x09 |
521 | /* Private modelist is to be replaced */ | 521 | /* Private modelist is to be replaced */ |
522 | #define FB_EVENT_NEW_MODELIST 0x0A | 522 | #define FB_EVENT_NEW_MODELIST 0x0A |
523 | /* The resolution of the passed in fb_info about to change and | 523 | /* The resolution of the passed in fb_info about to change and |
524 | all vc's should be changed */ | 524 | all vc's should be changed */ |
525 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B | 525 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B |
526 | /* A software display blank change occured */ | ||
527 | #define FB_EVENT_CONBLANK 0x0C | ||
526 | 528 | ||
527 | struct fb_event { | 529 | struct fb_event { |
528 | struct fb_info *info; | 530 | struct fb_info *info; |
@@ -767,16 +769,13 @@ struct fb_info { | |||
767 | struct fb_videomode *mode; /* current mode */ | 769 | struct fb_videomode *mode; /* current mode */ |
768 | 770 | ||
769 | #ifdef CONFIG_FB_BACKLIGHT | 771 | #ifdef CONFIG_FB_BACKLIGHT |
770 | /* Lock ordering: | ||
771 | * bl_mutex (protects bl_dev and bl_curve) | ||
772 | * bl_dev->sem (backlight class) | ||
773 | */ | ||
774 | struct mutex bl_mutex; | ||
775 | |||
776 | /* assigned backlight device */ | 772 | /* assigned backlight device */ |
773 | /* set before framebuffer registration, | ||
774 | remove after unregister */ | ||
777 | struct backlight_device *bl_dev; | 775 | struct backlight_device *bl_dev; |
778 | 776 | ||
779 | /* Backlight level curve */ | 777 | /* Backlight level curve */ |
778 | struct mutex bl_curve_mutex; | ||
780 | u8 bl_curve[FB_BACKLIGHT_LEVELS]; | 779 | u8 bl_curve[FB_BACKLIGHT_LEVELS]; |
781 | #endif | 780 | #endif |
782 | 781 | ||
diff --git a/include/asm-arm/hardware/gpio_keys.h b/include/linux/gpio_keys.h index 2b217c7b9312..2b217c7b9312 100644 --- a/include/asm-arm/hardware/gpio_keys.h +++ b/include/linux/gpio_keys.h | |||
diff --git a/include/linux/hid.h b/include/linux/hid.h index d26b08f461f2..8c97d4d3fdb0 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Copyright (c) 1999 Andreas Gal | 7 | * Copyright (c) 1999 Andreas Gal |
8 | * Copyright (c) 2000-2001 Vojtech Pavlik | 8 | * Copyright (c) 2000-2001 Vojtech Pavlik |
9 | * Copyright (c) 2006 Jiri Kosina | 9 | * Copyright (c) 2006-2007 Jiri Kosina |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* | 12 | /* |
@@ -267,6 +267,8 @@ struct hid_item { | |||
267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | 267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 |
268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | 268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 |
269 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | 269 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 |
270 | #define HID_QUIRK_LOGITECH_S510_DESCRIPTOR 0x00100000 | ||
271 | #define HID_QUIRK_DUPLICATE_USAGES 0x00200000 | ||
270 | 272 | ||
271 | /* | 273 | /* |
272 | * This is the global environment of the parser. This information is | 274 | * This is the global environment of the parser. This information is |
@@ -292,7 +294,7 @@ struct hid_global { | |||
292 | */ | 294 | */ |
293 | 295 | ||
294 | #define HID_MAX_DESCRIPTOR_SIZE 4096 | 296 | #define HID_MAX_DESCRIPTOR_SIZE 4096 |
295 | #define HID_MAX_USAGES 1024 | 297 | #define HID_MAX_USAGES 8192 |
296 | #define HID_DEFAULT_NUM_COLLECTIONS 16 | 298 | #define HID_DEFAULT_NUM_COLLECTIONS 16 |
297 | 299 | ||
298 | struct hid_local { | 300 | struct hid_local { |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 37f9279192a9..5bdbc744e773 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -47,7 +47,7 @@ enum hrtimer_restart { | |||
47 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context | 47 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context |
48 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and | 48 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and |
49 | * does not restart the timer | 49 | * does not restart the timer |
50 | * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ: Callback must run in softirq context | 50 | * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ: Callback must run in hardirq context |
51 | * Special mode for tick emultation | 51 | * Special mode for tick emultation |
52 | */ | 52 | */ |
53 | enum hrtimer_cb_mode { | 53 | enum hrtimer_cb_mode { |
@@ -139,7 +139,8 @@ struct hrtimer_sleeper { | |||
139 | }; | 139 | }; |
140 | 140 | ||
141 | /** | 141 | /** |
142 | * struct hrtimer_base - the timer base for a specific clock | 142 | * struct hrtimer_clock_base - the timer base for a specific clock |
143 | * @cpu_base: per cpu clock base | ||
143 | * @index: clock type index for per_cpu support when moving a | 144 | * @index: clock type index for per_cpu support when moving a |
144 | * timer to a base on another cpu. | 145 | * timer to a base on another cpu. |
145 | * @active: red black tree root node for the active timers | 146 | * @active: red black tree root node for the active timers |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index a60995afe334..3f3e7a648da3 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #ifdef CONFIG_HUGETLB_PAGE | 4 | #ifdef CONFIG_HUGETLB_PAGE |
5 | 5 | ||
6 | #include <linux/mempolicy.h> | 6 | #include <linux/mempolicy.h> |
7 | #include <linux/shm.h> | ||
7 | #include <asm/tlbflush.h> | 8 | #include <asm/tlbflush.h> |
8 | 9 | ||
9 | struct ctl_table; | 10 | struct ctl_table; |
@@ -168,7 +169,12 @@ void hugetlb_put_quota(struct address_space *mapping); | |||
168 | 169 | ||
169 | static inline int is_file_hugepages(struct file *file) | 170 | static inline int is_file_hugepages(struct file *file) |
170 | { | 171 | { |
171 | return file->f_op == &hugetlbfs_file_operations; | 172 | if (file->f_op == &hugetlbfs_file_operations) |
173 | return 1; | ||
174 | if (is_file_shm_hugepages(file)) | ||
175 | return 1; | ||
176 | |||
177 | return 0; | ||
172 | } | 178 | } |
173 | 179 | ||
174 | static inline void set_file_hugepages(struct file *file) | 180 | static inline void set_file_hugepages(struct file *file) |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 79c028251c70..34f2676b3c62 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1359,7 +1359,8 @@ u8 ide_dump_status(ide_drive_t *, const char *, u8); | |||
1359 | typedef struct ide_pio_timings_s { | 1359 | typedef struct ide_pio_timings_s { |
1360 | int setup_time; /* Address setup (ns) minimum */ | 1360 | int setup_time; /* Address setup (ns) minimum */ |
1361 | int active_time; /* Active pulse (ns) minimum */ | 1361 | int active_time; /* Active pulse (ns) minimum */ |
1362 | int cycle_time; /* Cycle time (ns) minimum = (setup + active + recovery) */ | 1362 | int cycle_time; /* Cycle time (ns) minimum = */ |
1363 | /* active + recovery (+ setup for some chips) */ | ||
1363 | } ide_pio_timings_t; | 1364 | } ide_pio_timings_t; |
1364 | 1365 | ||
1365 | typedef struct ide_pio_data_s { | 1366 | typedef struct ide_pio_data_s { |
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 4fab3d0a4bce..e33ee763c052 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
@@ -114,6 +114,7 @@ struct pppoe_hdr { | |||
114 | #ifdef __KERNEL__ | 114 | #ifdef __KERNEL__ |
115 | struct pppoe_opt { | 115 | struct pppoe_opt { |
116 | struct net_device *dev; /* device associated with socket*/ | 116 | struct net_device *dev; /* device associated with socket*/ |
117 | int ifindex; /* ifindex of device associated with socket */ | ||
117 | struct pppoe_addr pa; /* what this socket is bound to*/ | 118 | struct pppoe_addr pa; /* what this socket is bound to*/ |
118 | struct sockaddr_pppox relay; /* what socket data will be | 119 | struct sockaddr_pppox relay; /* what socket data will be |
119 | relayed to (PPPoE relaying) */ | 120 | relayed to (PPPoE relaying) */ |
@@ -132,6 +133,7 @@ struct pppox_sock { | |||
132 | unsigned short num; | 133 | unsigned short num; |
133 | }; | 134 | }; |
134 | #define pppoe_dev proto.pppoe.dev | 135 | #define pppoe_dev proto.pppoe.dev |
136 | #define pppoe_ifindex proto.pppoe.ifindex | ||
135 | #define pppoe_pa proto.pppoe.pa | 137 | #define pppoe_pa proto.pppoe.pa |
136 | #define pppoe_relay proto.pppoe.relay | 138 | #define pppoe_relay proto.pppoe.relay |
137 | 139 | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 35cb38573583..d103580c72d2 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -70,15 +70,34 @@ extern void vlan_ioctl_set(int (*hook)(void __user *)); | |||
70 | * depends on completely exhausting the VLAN identifier space. Thus | 70 | * depends on completely exhausting the VLAN identifier space. Thus |
71 | * it gives constant time look-up, but in many cases it wastes memory. | 71 | * it gives constant time look-up, but in many cases it wastes memory. |
72 | */ | 72 | */ |
73 | #define VLAN_GROUP_ARRAY_LEN 4096 | 73 | #define VLAN_GROUP_ARRAY_LEN 4096 |
74 | #define VLAN_GROUP_ARRAY_SPLIT_PARTS 8 | ||
75 | #define VLAN_GROUP_ARRAY_PART_LEN (VLAN_GROUP_ARRAY_LEN/VLAN_GROUP_ARRAY_SPLIT_PARTS) | ||
74 | 76 | ||
75 | struct vlan_group { | 77 | struct vlan_group { |
76 | int real_dev_ifindex; /* The ifindex of the ethernet(like) device the vlan is attached to. */ | 78 | int real_dev_ifindex; /* The ifindex of the ethernet(like) device the vlan is attached to. */ |
77 | struct hlist_node hlist; /* linked list */ | 79 | struct hlist_node hlist; /* linked list */ |
78 | struct net_device *vlan_devices[VLAN_GROUP_ARRAY_LEN]; | 80 | struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; |
79 | struct rcu_head rcu; | 81 | struct rcu_head rcu; |
80 | }; | 82 | }; |
81 | 83 | ||
84 | static inline struct net_device *vlan_group_get_device(struct vlan_group *vg, int vlan_id) | ||
85 | { | ||
86 | struct net_device **array; | ||
87 | array = vg->vlan_devices_arrays[vlan_id / VLAN_GROUP_ARRAY_PART_LEN]; | ||
88 | return array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN]; | ||
89 | } | ||
90 | |||
91 | static inline void vlan_group_set_device(struct vlan_group *vg, int vlan_id, | ||
92 | struct net_device *dev) | ||
93 | { | ||
94 | struct net_device **array; | ||
95 | if (!vg) | ||
96 | return; | ||
97 | array = vg->vlan_devices_arrays[vlan_id / VLAN_GROUP_ARRAY_PART_LEN]; | ||
98 | array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev; | ||
99 | } | ||
100 | |||
82 | struct vlan_priority_tci_mapping { | 101 | struct vlan_priority_tci_mapping { |
83 | unsigned long priority; | 102 | unsigned long priority; |
84 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it | 103 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it |
@@ -160,7 +179,7 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, | |||
160 | return NET_RX_DROP; | 179 | return NET_RX_DROP; |
161 | } | 180 | } |
162 | 181 | ||
163 | skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; | 182 | skb->dev = vlan_group_get_device(grp, vlan_tag & VLAN_VID_MASK); |
164 | if (skb->dev == NULL) { | 183 | if (skb->dev == NULL) { |
165 | dev_kfree_skb_any(skb); | 184 | dev_kfree_skb_any(skb); |
166 | 185 | ||
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 9dbb525c5178..a113fe68d8a1 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -218,5 +218,7 @@ extern void ip_mc_up(struct in_device *); | |||
218 | extern void ip_mc_down(struct in_device *); | 218 | extern void ip_mc_down(struct in_device *); |
219 | extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); | 219 | extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); |
220 | extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); | 220 | extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); |
221 | extern void ip_mc_rejoin_group(struct ip_mc_list *im); | ||
222 | |||
221 | #endif | 223 | #endif |
222 | #endif | 224 | #endif |
diff --git a/include/linux/irq.h b/include/linux/irq.h index aa5b3e6178a0..a6899402b522 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
20 | #include <linux/irqreturn.h> | 20 | #include <linux/irqreturn.h> |
21 | #include <linux/errno.h> | ||
21 | 22 | ||
22 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
23 | #include <asm/ptrace.h> | 24 | #include <asm/ptrace.h> |
@@ -200,17 +201,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new); | |||
200 | #endif | 201 | #endif |
201 | 202 | ||
202 | #ifdef CONFIG_SMP | 203 | #ifdef CONFIG_SMP |
203 | static inline void set_native_irq_info(int irq, cpumask_t mask) | ||
204 | { | ||
205 | irq_desc[irq].affinity = mask; | ||
206 | } | ||
207 | #else | ||
208 | static inline void set_native_irq_info(int irq, cpumask_t mask) | ||
209 | { | ||
210 | } | ||
211 | #endif | ||
212 | |||
213 | #ifdef CONFIG_SMP | ||
214 | 204 | ||
215 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) | 205 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) |
216 | 206 | ||
diff --git a/include/linux/isdn/capiutil.h b/include/linux/isdn/capiutil.h index 2e79f816703b..63bd9cf821a7 100644 --- a/include/linux/isdn/capiutil.h +++ b/include/linux/isdn/capiutil.h | |||
@@ -174,9 +174,26 @@ char *capi_info2str(__u16 reason); | |||
174 | /* | 174 | /* |
175 | * Debugging / Tracing functions | 175 | * Debugging / Tracing functions |
176 | */ | 176 | */ |
177 | |||
177 | char *capi_cmd2str(__u8 cmd, __u8 subcmd); | 178 | char *capi_cmd2str(__u8 cmd, __u8 subcmd); |
178 | char *capi_cmsg2str(_cmsg * cmsg); | 179 | |
179 | char *capi_message2str(__u8 * msg); | 180 | typedef struct { |
181 | u_char *buf; | ||
182 | u_char *p; | ||
183 | size_t size; | ||
184 | size_t pos; | ||
185 | } _cdebbuf; | ||
186 | |||
187 | #define CDEBUG_SIZE 1024 | ||
188 | #define CDEBUG_GSIZE 4096 | ||
189 | |||
190 | _cdebbuf *cdebbuf_alloc(void); | ||
191 | void cdebbuf_free(_cdebbuf *cdb); | ||
192 | int cdebug_init(void); | ||
193 | void cdebug_exit(void); | ||
194 | |||
195 | _cdebbuf *capi_cmsg2str(_cmsg *cmsg); | ||
196 | _cdebbuf *capi_message2str(__u8 *msg); | ||
180 | 197 | ||
181 | /*-----------------------------------------------------------------------*/ | 198 | /*-----------------------------------------------------------------------*/ |
182 | 199 | ||
diff --git a/include/linux/kdev_t.h b/include/linux/kdev_t.h index bceea527dd37..4c2c3737e415 100644 --- a/include/linux/kdev_t.h +++ b/include/linux/kdev_t.h | |||
@@ -87,6 +87,7 @@ static inline unsigned sysv_minor(u32 dev) | |||
87 | return dev & 0x3ffff; | 87 | return dev & 0x3ffff; |
88 | } | 88 | } |
89 | 89 | ||
90 | bool is_lanana_major(unsigned int major); | ||
90 | 91 | ||
91 | #else /* __KERNEL__ */ | 92 | #else /* __KERNEL__ */ |
92 | 93 | ||
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index cc8e674ae27a..10f505c8431d 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -28,10 +28,8 @@ | |||
28 | #ifdef CONFIG_KMOD | 28 | #ifdef CONFIG_KMOD |
29 | /* modprobe exit status on success, -ve on error. Return value | 29 | /* modprobe exit status on success, -ve on error. Return value |
30 | * usually useless though. */ | 30 | * usually useless though. */ |
31 | extern void kmod_sysfs_init(void); | ||
32 | extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); | 31 | extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); |
33 | #else | 32 | #else |
34 | static inline void kmod_sysfs_init(void) {}; | ||
35 | static inline int request_module(const char * name, ...) { return -ENOSYS; } | 33 | static inline int request_module(const char * name, ...) { return -ENOSYS; } |
36 | #endif | 34 | #endif |
37 | 35 | ||
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h index 8047d4b17bf1..a2c54acceb4e 100644 --- a/include/linux/ks0108.h +++ b/include/linux/ks0108.h | |||
@@ -43,4 +43,7 @@ extern void ks0108_address(unsigned char address); | |||
43 | /* Set the controller's current page (0..7) */ | 43 | /* Set the controller's current page (0..7) */ |
44 | extern void ks0108_page(unsigned char page); | 44 | extern void ks0108_page(unsigned char page); |
45 | 45 | ||
46 | /* Is the module inited? */ | ||
47 | extern unsigned char ks0108_isinited(void); | ||
48 | |||
46 | #endif /* _KS0108_H_ */ | 49 | #endif /* _KS0108_H_ */ |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index f3604593fb76..275354ffa1cb 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/types.h> | 11 | #include <asm/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | 13 | ||
14 | #define KVM_API_VERSION 3 | 14 | #define KVM_API_VERSION 4 |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Architectural interrupt line count, and the size of the bitmap needed | 17 | * Architectural interrupt line count, and the size of the bitmap needed |
@@ -52,11 +52,10 @@ enum kvm_exit_reason { | |||
52 | /* for KVM_RUN */ | 52 | /* for KVM_RUN */ |
53 | struct kvm_run { | 53 | struct kvm_run { |
54 | /* in */ | 54 | /* in */ |
55 | __u32 vcpu; | ||
56 | __u32 emulated; /* skip current instruction */ | 55 | __u32 emulated; /* skip current instruction */ |
57 | __u32 mmio_completed; /* mmio request completed */ | 56 | __u32 mmio_completed; /* mmio request completed */ |
58 | __u8 request_interrupt_window; | 57 | __u8 request_interrupt_window; |
59 | __u8 padding1[3]; | 58 | __u8 padding1[7]; |
60 | 59 | ||
61 | /* out */ | 60 | /* out */ |
62 | __u32 exit_type; | 61 | __u32 exit_type; |
@@ -111,10 +110,6 @@ struct kvm_run { | |||
111 | 110 | ||
112 | /* for KVM_GET_REGS and KVM_SET_REGS */ | 111 | /* for KVM_GET_REGS and KVM_SET_REGS */ |
113 | struct kvm_regs { | 112 | struct kvm_regs { |
114 | /* in */ | ||
115 | __u32 vcpu; | ||
116 | __u32 padding; | ||
117 | |||
118 | /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ | 113 | /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ |
119 | __u64 rax, rbx, rcx, rdx; | 114 | __u64 rax, rbx, rcx, rdx; |
120 | __u64 rsi, rdi, rsp, rbp; | 115 | __u64 rsi, rdi, rsp, rbp; |
@@ -141,10 +136,6 @@ struct kvm_dtable { | |||
141 | 136 | ||
142 | /* for KVM_GET_SREGS and KVM_SET_SREGS */ | 137 | /* for KVM_GET_SREGS and KVM_SET_SREGS */ |
143 | struct kvm_sregs { | 138 | struct kvm_sregs { |
144 | /* in */ | ||
145 | __u32 vcpu; | ||
146 | __u32 padding; | ||
147 | |||
148 | /* out (KVM_GET_SREGS) / in (KVM_SET_SREGS) */ | 139 | /* out (KVM_GET_SREGS) / in (KVM_SET_SREGS) */ |
149 | struct kvm_segment cs, ds, es, fs, gs, ss; | 140 | struct kvm_segment cs, ds, es, fs, gs, ss; |
150 | struct kvm_segment tr, ldt; | 141 | struct kvm_segment tr, ldt; |
@@ -163,8 +154,8 @@ struct kvm_msr_entry { | |||
163 | 154 | ||
164 | /* for KVM_GET_MSRS and KVM_SET_MSRS */ | 155 | /* for KVM_GET_MSRS and KVM_SET_MSRS */ |
165 | struct kvm_msrs { | 156 | struct kvm_msrs { |
166 | __u32 vcpu; | ||
167 | __u32 nmsrs; /* number of msrs in entries */ | 157 | __u32 nmsrs; /* number of msrs in entries */ |
158 | __u32 pad; | ||
168 | 159 | ||
169 | struct kvm_msr_entry entries[0]; | 160 | struct kvm_msr_entry entries[0]; |
170 | }; | 161 | }; |
@@ -179,8 +170,6 @@ struct kvm_msr_list { | |||
179 | struct kvm_translation { | 170 | struct kvm_translation { |
180 | /* in */ | 171 | /* in */ |
181 | __u64 linear_address; | 172 | __u64 linear_address; |
182 | __u32 vcpu; | ||
183 | __u32 padding; | ||
184 | 173 | ||
185 | /* out */ | 174 | /* out */ |
186 | __u64 physical_address; | 175 | __u64 physical_address; |
@@ -193,7 +182,6 @@ struct kvm_translation { | |||
193 | /* for KVM_INTERRUPT */ | 182 | /* for KVM_INTERRUPT */ |
194 | struct kvm_interrupt { | 183 | struct kvm_interrupt { |
195 | /* in */ | 184 | /* in */ |
196 | __u32 vcpu; | ||
197 | __u32 irq; | 185 | __u32 irq; |
198 | }; | 186 | }; |
199 | 187 | ||
@@ -206,8 +194,8 @@ struct kvm_breakpoint { | |||
206 | /* for KVM_DEBUG_GUEST */ | 194 | /* for KVM_DEBUG_GUEST */ |
207 | struct kvm_debug_guest { | 195 | struct kvm_debug_guest { |
208 | /* int */ | 196 | /* int */ |
209 | __u32 vcpu; | ||
210 | __u32 enabled; | 197 | __u32 enabled; |
198 | __u32 pad; | ||
211 | struct kvm_breakpoint breakpoints[4]; | 199 | struct kvm_breakpoint breakpoints[4]; |
212 | __u32 singlestep; | 200 | __u32 singlestep; |
213 | }; | 201 | }; |
@@ -224,20 +212,36 @@ struct kvm_dirty_log { | |||
224 | 212 | ||
225 | #define KVMIO 0xAE | 213 | #define KVMIO 0xAE |
226 | 214 | ||
215 | /* | ||
216 | * ioctls for /dev/kvm fds: | ||
217 | */ | ||
227 | #define KVM_GET_API_VERSION _IO(KVMIO, 1) | 218 | #define KVM_GET_API_VERSION _IO(KVMIO, 1) |
219 | #define KVM_CREATE_VM _IO(KVMIO, 2) /* returns a VM fd */ | ||
220 | #define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 15, struct kvm_msr_list) | ||
221 | |||
222 | /* | ||
223 | * ioctls for VM fds | ||
224 | */ | ||
225 | #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 10, struct kvm_memory_region) | ||
226 | /* | ||
227 | * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns | ||
228 | * a vcpu fd. | ||
229 | */ | ||
230 | #define KVM_CREATE_VCPU _IOW(KVMIO, 11, int) | ||
231 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 12, struct kvm_dirty_log) | ||
232 | |||
233 | /* | ||
234 | * ioctls for vcpu fds | ||
235 | */ | ||
228 | #define KVM_RUN _IOWR(KVMIO, 2, struct kvm_run) | 236 | #define KVM_RUN _IOWR(KVMIO, 2, struct kvm_run) |
229 | #define KVM_GET_REGS _IOWR(KVMIO, 3, struct kvm_regs) | 237 | #define KVM_GET_REGS _IOR(KVMIO, 3, struct kvm_regs) |
230 | #define KVM_SET_REGS _IOW(KVMIO, 4, struct kvm_regs) | 238 | #define KVM_SET_REGS _IOW(KVMIO, 4, struct kvm_regs) |
231 | #define KVM_GET_SREGS _IOWR(KVMIO, 5, struct kvm_sregs) | 239 | #define KVM_GET_SREGS _IOR(KVMIO, 5, struct kvm_sregs) |
232 | #define KVM_SET_SREGS _IOW(KVMIO, 6, struct kvm_sregs) | 240 | #define KVM_SET_SREGS _IOW(KVMIO, 6, struct kvm_sregs) |
233 | #define KVM_TRANSLATE _IOWR(KVMIO, 7, struct kvm_translation) | 241 | #define KVM_TRANSLATE _IOWR(KVMIO, 7, struct kvm_translation) |
234 | #define KVM_INTERRUPT _IOW(KVMIO, 8, struct kvm_interrupt) | 242 | #define KVM_INTERRUPT _IOW(KVMIO, 8, struct kvm_interrupt) |
235 | #define KVM_DEBUG_GUEST _IOW(KVMIO, 9, struct kvm_debug_guest) | 243 | #define KVM_DEBUG_GUEST _IOW(KVMIO, 9, struct kvm_debug_guest) |
236 | #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 10, struct kvm_memory_region) | ||
237 | #define KVM_CREATE_VCPU _IOW(KVMIO, 11, int /* vcpu_slot */) | ||
238 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 12, struct kvm_dirty_log) | ||
239 | #define KVM_GET_MSRS _IOWR(KVMIO, 13, struct kvm_msrs) | 244 | #define KVM_GET_MSRS _IOWR(KVMIO, 13, struct kvm_msrs) |
240 | #define KVM_SET_MSRS _IOWR(KVMIO, 14, struct kvm_msrs) | 245 | #define KVM_SET_MSRS _IOW(KVMIO, 14, struct kvm_msrs) |
241 | #define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 15, struct kvm_msr_list) | ||
242 | 246 | ||
243 | #endif | 247 | #endif |
diff --git a/include/linux/kvm_para.h b/include/linux/kvm_para.h new file mode 100644 index 000000000000..3b292565a693 --- /dev/null +++ b/include/linux/kvm_para.h | |||
@@ -0,0 +1,73 @@ | |||
1 | #ifndef __LINUX_KVM_PARA_H | ||
2 | #define __LINUX_KVM_PARA_H | ||
3 | |||
4 | /* | ||
5 | * Guest OS interface for KVM paravirtualization | ||
6 | * | ||
7 | * Note: this interface is totally experimental, and is certain to change | ||
8 | * as we make progress. | ||
9 | */ | ||
10 | |||
11 | /* | ||
12 | * Per-VCPU descriptor area shared between guest and host. Writable to | ||
13 | * both guest and host. Registered with the host by the guest when | ||
14 | * a guest acknowledges paravirtual mode. | ||
15 | * | ||
16 | * NOTE: all addresses are guest-physical addresses (gpa), to make it | ||
17 | * easier for the hypervisor to map between the various addresses. | ||
18 | */ | ||
19 | struct kvm_vcpu_para_state { | ||
20 | /* | ||
21 | * API version information for compatibility. If there's any support | ||
22 | * mismatch (too old host trying to execute too new guest) then | ||
23 | * the host will deny entry into paravirtual mode. Any other | ||
24 | * combination (new host + old guest and new host + new guest) | ||
25 | * is supposed to work - new host versions will support all old | ||
26 | * guest API versions. | ||
27 | */ | ||
28 | u32 guest_version; | ||
29 | u32 host_version; | ||
30 | u32 size; | ||
31 | u32 ret; | ||
32 | |||
33 | /* | ||
34 | * The address of the vm exit instruction (VMCALL or VMMCALL), | ||
35 | * which the host will patch according to the CPU model the | ||
36 | * VM runs on: | ||
37 | */ | ||
38 | u64 hypercall_gpa; | ||
39 | |||
40 | } __attribute__ ((aligned(PAGE_SIZE))); | ||
41 | |||
42 | #define KVM_PARA_API_VERSION 1 | ||
43 | |||
44 | /* | ||
45 | * This is used for an RDMSR's ECX parameter to probe for a KVM host. | ||
46 | * Hopefully no CPU vendor will use up this number. This is placed well | ||
47 | * out of way of the typical space occupied by CPU vendors' MSR indices, | ||
48 | * and we think (or at least hope) it wont be occupied in the future | ||
49 | * either. | ||
50 | */ | ||
51 | #define MSR_KVM_API_MAGIC 0x87655678 | ||
52 | |||
53 | #define KVM_EINVAL 1 | ||
54 | |||
55 | /* | ||
56 | * Hypercall calling convention: | ||
57 | * | ||
58 | * Each hypercall may have 0-6 parameters. | ||
59 | * | ||
60 | * 64-bit hypercall index is in RAX, goes from 0 to __NR_hypercalls-1 | ||
61 | * | ||
62 | * 64-bit parameters 1-6 are in the standard gcc x86_64 calling convention | ||
63 | * order: RDI, RSI, RDX, RCX, R8, R9. | ||
64 | * | ||
65 | * 32-bit index is EBX, parameters are: EAX, ECX, EDX, ESI, EDI, EBP. | ||
66 | * (the first 3 are according to the gcc regparm calling convention) | ||
67 | * | ||
68 | * No registers are clobbered by the hypercall, except that the | ||
69 | * return value is in RAX. | ||
70 | */ | ||
71 | #define __NR_hypercalls 0 | ||
72 | |||
73 | #endif | ||
diff --git a/include/linux/lcd.h b/include/linux/lcd.h index d739b2e7eac2..598793c0745b 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h | |||
@@ -9,22 +9,38 @@ | |||
9 | #define _LINUX_LCD_H | 9 | #define _LINUX_LCD_H |
10 | 10 | ||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/mutex.h> | ||
12 | #include <linux/notifier.h> | 13 | #include <linux/notifier.h> |
13 | 14 | ||
15 | /* Notes on locking: | ||
16 | * | ||
17 | * lcd_device->ops_lock is an internal backlight lock protecting the ops | ||
18 | * field and no code outside the core should need to touch it. | ||
19 | * | ||
20 | * Access to set_power() is serialised by the update_lock mutex since | ||
21 | * most drivers seem to need this and historically get it wrong. | ||
22 | * | ||
23 | * Most drivers don't need locking on their get_power() method. | ||
24 | * If yours does, you need to implement it in the driver. You can use the | ||
25 | * update_lock mutex if appropriate. | ||
26 | * | ||
27 | * Any other use of the locks below is probably wrong. | ||
28 | */ | ||
29 | |||
14 | struct lcd_device; | 30 | struct lcd_device; |
15 | struct fb_info; | 31 | struct fb_info; |
16 | 32 | ||
17 | /* This structure defines all the properties of a LCD flat panel. */ | ||
18 | struct lcd_properties { | 33 | struct lcd_properties { |
19 | /* Owner module */ | 34 | /* The maximum value for contrast (read-only) */ |
20 | struct module *owner; | 35 | int max_contrast; |
36 | }; | ||
37 | |||
38 | struct lcd_ops { | ||
21 | /* Get the LCD panel power status (0: full on, 1..3: controller | 39 | /* Get the LCD panel power status (0: full on, 1..3: controller |
22 | power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ | 40 | power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ |
23 | int (*get_power)(struct lcd_device *); | 41 | int (*get_power)(struct lcd_device *); |
24 | /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ | 42 | /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ |
25 | int (*set_power)(struct lcd_device *, int power); | 43 | int (*set_power)(struct lcd_device *, int power); |
26 | /* The maximum value for contrast (read-only) */ | ||
27 | int max_contrast; | ||
28 | /* Get the current contrast setting (0-max_contrast) */ | 44 | /* Get the current contrast setting (0-max_contrast) */ |
29 | int (*get_contrast)(struct lcd_device *); | 45 | int (*get_contrast)(struct lcd_device *); |
30 | /* Set LCD panel contrast */ | 46 | /* Set LCD panel contrast */ |
@@ -35,20 +51,31 @@ struct lcd_properties { | |||
35 | }; | 51 | }; |
36 | 52 | ||
37 | struct lcd_device { | 53 | struct lcd_device { |
38 | /* This protects the 'props' field. If 'props' is NULL, the driver that | 54 | struct lcd_properties props; |
55 | /* This protects the 'ops' field. If 'ops' is NULL, the driver that | ||
39 | registered this device has been unloaded, and if class_get_devdata() | 56 | registered this device has been unloaded, and if class_get_devdata() |
40 | points to something in the body of that driver, it is also invalid. */ | 57 | points to something in the body of that driver, it is also invalid. */ |
41 | struct semaphore sem; | 58 | struct mutex ops_lock; |
42 | /* If this is NULL, the backing module is unloaded */ | 59 | /* If this is NULL, the backing module is unloaded */ |
43 | struct lcd_properties *props; | 60 | struct lcd_ops *ops; |
61 | /* Serialise access to set_power method */ | ||
62 | struct mutex update_lock; | ||
44 | /* The framebuffer notifier block */ | 63 | /* The framebuffer notifier block */ |
45 | struct notifier_block fb_notif; | 64 | struct notifier_block fb_notif; |
46 | /* The class device structure */ | 65 | /* The class device structure */ |
47 | struct class_device class_dev; | 66 | struct class_device class_dev; |
48 | }; | 67 | }; |
49 | 68 | ||
69 | static inline void lcd_set_power(struct lcd_device *ld, int power) | ||
70 | { | ||
71 | mutex_lock(&ld->update_lock); | ||
72 | if (ld->ops && ld->ops->set_power) | ||
73 | ld->ops->set_power(ld, power); | ||
74 | mutex_unlock(&ld->update_lock); | ||
75 | } | ||
76 | |||
50 | extern struct lcd_device *lcd_device_register(const char *name, | 77 | extern struct lcd_device *lcd_device_register(const char *name, |
51 | void *devdata, struct lcd_properties *lp); | 78 | void *devdata, struct lcd_ops *ops); |
52 | extern void lcd_device_unregister(struct lcd_device *ld); | 79 | extern void lcd_device_unregister(struct lcd_device *ld); |
53 | 80 | ||
54 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, class_dev) | 81 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, class_dev) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 86762a9f52ba..e3f32f3189b2 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -403,8 +403,7 @@ struct ata_host { | |||
403 | void *private_data; | 403 | void *private_data; |
404 | const struct ata_port_operations *ops; | 404 | const struct ata_port_operations *ops; |
405 | unsigned long flags; | 405 | unsigned long flags; |
406 | int simplex_claimed; /* Keep seperate in case we | 406 | struct ata_port *simplex_claimed; /* channel owning the DMA */ |
407 | ever need to do this locked */ | ||
408 | struct ata_port *ports[0]; | 407 | struct ata_port *ports[0]; |
409 | }; | 408 | }; |
410 | 409 | ||
@@ -495,6 +494,7 @@ struct ata_device { | |||
495 | 494 | ||
496 | /* error history */ | 495 | /* error history */ |
497 | struct ata_ering ering; | 496 | struct ata_ering ering; |
497 | int spdn_cnt; | ||
498 | unsigned int horkage; /* List of broken features */ | 498 | unsigned int horkage; /* List of broken features */ |
499 | #ifdef CONFIG_SATA_ACPI | 499 | #ifdef CONFIG_SATA_ACPI |
500 | /* ACPI objects info */ | 500 | /* ACPI objects info */ |
@@ -535,8 +535,8 @@ struct ata_port { | |||
535 | spinlock_t *lock; | 535 | spinlock_t *lock; |
536 | unsigned long flags; /* ATA_FLAG_xxx */ | 536 | unsigned long flags; /* ATA_FLAG_xxx */ |
537 | unsigned int pflags; /* ATA_PFLAG_xxx */ | 537 | unsigned int pflags; /* ATA_PFLAG_xxx */ |
538 | unsigned int id; /* unique id req'd by scsi midlyr */ | 538 | unsigned int print_id; /* user visible unique port ID */ |
539 | unsigned int port_no; /* unique port #; from zero */ | 539 | unsigned int port_no; /* 0 based port no. inside the host */ |
540 | 540 | ||
541 | struct ata_prd *prd; /* our SG list */ | 541 | struct ata_prd *prd; /* our SG list */ |
542 | dma_addr_t prd_dma; /* and its DMA mapping */ | 542 | dma_addr_t prd_dma; /* and its DMA mapping */ |
@@ -718,10 +718,12 @@ extern void ata_std_ports(struct ata_ioports *ioaddr); | |||
718 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | 718 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, |
719 | unsigned int n_ports); | 719 | unsigned int n_ports); |
720 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 720 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
721 | #ifdef CONFIG_PM | ||
721 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); | 722 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); |
722 | extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev); | 723 | extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev); |
723 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); | 724 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
724 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 725 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
726 | #endif | ||
725 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 727 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
726 | #endif /* CONFIG_PCI */ | 728 | #endif /* CONFIG_PCI */ |
727 | extern int ata_device_add(const struct ata_probe_ent *ent); | 729 | extern int ata_device_add(const struct ata_probe_ent *ent); |
@@ -747,10 +749,12 @@ extern int sata_scr_write(struct ata_port *ap, int reg, u32 val); | |||
747 | extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val); | 749 | extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val); |
748 | extern int ata_port_online(struct ata_port *ap); | 750 | extern int ata_port_online(struct ata_port *ap); |
749 | extern int ata_port_offline(struct ata_port *ap); | 751 | extern int ata_port_offline(struct ata_port *ap); |
752 | #ifdef CONFIG_PM | ||
750 | extern int ata_scsi_device_resume(struct scsi_device *); | 753 | extern int ata_scsi_device_resume(struct scsi_device *); |
751 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg); | 754 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg); |
752 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); | 755 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); |
753 | extern void ata_host_resume(struct ata_host *host); | 756 | extern void ata_host_resume(struct ata_host *host); |
757 | #endif | ||
754 | extern int ata_ratelimit(void); | 758 | extern int ata_ratelimit(void); |
755 | extern int ata_busy_sleep(struct ata_port *ap, | 759 | extern int ata_busy_sleep(struct ata_port *ap, |
756 | unsigned long timeout_pat, unsigned long timeout); | 760 | unsigned long timeout_pat, unsigned long timeout); |
@@ -759,6 +763,7 @@ extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, | |||
759 | extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, | 763 | extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, |
760 | unsigned long interval_msec, | 764 | unsigned long interval_msec, |
761 | unsigned long timeout_msec); | 765 | unsigned long timeout_msec); |
766 | extern unsigned int ata_dev_try_classify(struct ata_port *, unsigned int, u8 *); | ||
762 | 767 | ||
763 | /* | 768 | /* |
764 | * Default driver ops implementations | 769 | * Default driver ops implementations |
@@ -786,10 +791,12 @@ extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, | |||
786 | extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, | 791 | extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, |
787 | unsigned int n_elem); | 792 | unsigned int n_elem); |
788 | extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); | 793 | extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); |
794 | extern void ata_dev_disable(struct ata_device *adev); | ||
789 | extern void ata_id_string(const u16 *id, unsigned char *s, | 795 | extern void ata_id_string(const u16 *id, unsigned char *s, |
790 | unsigned int ofs, unsigned int len); | 796 | unsigned int ofs, unsigned int len); |
791 | extern void ata_id_c_string(const u16 *id, unsigned char *s, | 797 | extern void ata_id_c_string(const u16 *id, unsigned char *s, |
792 | unsigned int ofs, unsigned int len); | 798 | unsigned int ofs, unsigned int len); |
799 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); | ||
793 | extern unsigned long ata_device_blacklisted(const struct ata_device *dev); | 800 | extern unsigned long ata_device_blacklisted(const struct ata_device *dev); |
794 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 801 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
795 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 802 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
@@ -890,10 +897,10 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
890 | * printk helpers | 897 | * printk helpers |
891 | */ | 898 | */ |
892 | #define ata_port_printk(ap, lv, fmt, args...) \ | 899 | #define ata_port_printk(ap, lv, fmt, args...) \ |
893 | printk(lv"ata%u: "fmt, (ap)->id , ##args) | 900 | printk(lv"ata%u: "fmt, (ap)->print_id , ##args) |
894 | 901 | ||
895 | #define ata_dev_printk(dev, lv, fmt, args...) \ | 902 | #define ata_dev_printk(dev, lv, fmt, args...) \ |
896 | printk(lv"ata%u.%02u: "fmt, (dev)->ap->id, (dev)->devno , ##args) | 903 | printk(lv"ata%u.%02u: "fmt, (dev)->ap->print_id, (dev)->devno , ##args) |
897 | 904 | ||
898 | /* | 905 | /* |
899 | * ata_eh_info helpers | 906 | * ata_eh_info helpers |
@@ -1031,6 +1038,21 @@ static inline u8 ata_chk_status(struct ata_port *ap) | |||
1031 | return ap->ops->check_status(ap); | 1038 | return ap->ops->check_status(ap); |
1032 | } | 1039 | } |
1033 | 1040 | ||
1041 | /** | ||
1042 | * ata_ncq_enabled - Test whether NCQ is enabled | ||
1043 | * @dev: ATA device to test for | ||
1044 | * | ||
1045 | * LOCKING: | ||
1046 | * spin_lock_irqsave(host lock) | ||
1047 | * | ||
1048 | * RETURNS: | ||
1049 | * 1 if NCQ is enabled for @dev, 0 otherwise. | ||
1050 | */ | ||
1051 | static inline int ata_ncq_enabled(struct ata_device *dev) | ||
1052 | { | ||
1053 | return (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF | | ||
1054 | ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ; | ||
1055 | } | ||
1034 | 1056 | ||
1035 | /** | 1057 | /** |
1036 | * ata_pause - Flush writes and pause 400 nanoseconds. | 1058 | * ata_pause - Flush writes and pause 400 nanoseconds. |
diff --git a/include/linux/magic.h b/include/linux/magic.h index b32c8a97fcec..a9c6567fe70c 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define HPFS_SUPER_MAGIC 0xf995e849 | 13 | #define HPFS_SUPER_MAGIC 0xf995e849 |
14 | #define ISOFS_SUPER_MAGIC 0x9660 | 14 | #define ISOFS_SUPER_MAGIC 0x9660 |
15 | #define JFFS2_SUPER_MAGIC 0x72b6 | 15 | #define JFFS2_SUPER_MAGIC 0x72b6 |
16 | #define KVMFS_SUPER_MAGIC 0x19700426 | ||
16 | 17 | ||
17 | #define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ | 18 | #define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ |
18 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ | 19 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 48148e0cdbd1..75e55dcdeb18 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -5,6 +5,14 @@ | |||
5 | 5 | ||
6 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); | 6 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); |
7 | 7 | ||
8 | /* Check if a vma is migratable */ | ||
9 | static inline int vma_migratable(struct vm_area_struct *vma) | ||
10 | { | ||
11 | if (vma->vm_flags & (VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED)) | ||
12 | return 0; | ||
13 | return 1; | ||
14 | } | ||
15 | |||
8 | #ifdef CONFIG_MIGRATION | 16 | #ifdef CONFIG_MIGRATION |
9 | extern int isolate_lru_page(struct page *p, struct list_head *pagelist); | 17 | extern int isolate_lru_page(struct page *p, struct list_head *pagelist); |
10 | extern int putback_lru_pages(struct list_head *l); | 18 | extern int putback_lru_pages(struct list_head *l); |
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 9850d513ff60..0e39745f5111 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h | |||
@@ -78,8 +78,7 @@ struct minix_super_block { | |||
78 | * V3 minix super-block data on disk | 78 | * V3 minix super-block data on disk |
79 | */ | 79 | */ |
80 | struct minix3_super_block { | 80 | struct minix3_super_block { |
81 | __u16 s_ninodes; | 81 | __u32 s_ninodes; |
82 | __u16 s_nzones; | ||
83 | __u16 s_pad0; | 82 | __u16 s_pad0; |
84 | __u16 s_imap_blocks; | 83 | __u16 s_imap_blocks; |
85 | __u16 s_zmap_blocks; | 84 | __u16 s_zmap_blocks; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a0eec16eb0bd..60e0e4a592d2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -660,15 +660,11 @@ static inline int page_mapped(struct page *page) | |||
660 | extern void show_free_areas(void); | 660 | extern void show_free_areas(void); |
661 | 661 | ||
662 | #ifdef CONFIG_SHMEM | 662 | #ifdef CONFIG_SHMEM |
663 | struct page *shmem_nopage(struct vm_area_struct *vma, | ||
664 | unsigned long address, int *type); | ||
665 | int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new); | 663 | int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new); |
666 | struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, | 664 | struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, |
667 | unsigned long addr); | 665 | unsigned long addr); |
668 | int shmem_lock(struct file *file, int lock, struct user_struct *user); | 666 | int shmem_lock(struct file *file, int lock, struct user_struct *user); |
669 | #else | 667 | #else |
670 | #define shmem_nopage filemap_nopage | ||
671 | |||
672 | static inline int shmem_lock(struct file *file, int lock, | 668 | static inline int shmem_lock(struct file *file, int lock, |
673 | struct user_struct *user) | 669 | struct user_struct *user) |
674 | { | 670 | { |
@@ -688,7 +684,6 @@ static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, | |||
688 | } | 684 | } |
689 | #endif | 685 | #endif |
690 | struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); | 686 | struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); |
691 | extern int shmem_mmap(struct file *file, struct vm_area_struct *vma); | ||
692 | 687 | ||
693 | int shmem_zero_setup(struct vm_area_struct *); | 688 | int shmem_zero_setup(struct vm_area_struct *); |
694 | 689 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 913e5752569f..bfcef8a1ad8b 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -62,6 +62,12 @@ struct mmc_ios { | |||
62 | 62 | ||
63 | #define MMC_BUS_WIDTH_1 0 | 63 | #define MMC_BUS_WIDTH_1 0 |
64 | #define MMC_BUS_WIDTH_4 2 | 64 | #define MMC_BUS_WIDTH_4 2 |
65 | |||
66 | unsigned char timing; /* timing specification used */ | ||
67 | |||
68 | #define MMC_TIMING_LEGACY 0 | ||
69 | #define MMC_TIMING_MMC_HS 1 | ||
70 | #define MMC_TIMING_SD_HS 2 | ||
65 | }; | 71 | }; |
66 | 72 | ||
67 | struct mmc_host_ops { | 73 | struct mmc_host_ops { |
@@ -87,6 +93,8 @@ struct mmc_host { | |||
87 | #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ | 93 | #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ |
88 | #define MMC_CAP_MULTIWRITE (1 << 1) /* Can accurately report bytes sent to card on error */ | 94 | #define MMC_CAP_MULTIWRITE (1 << 1) /* Can accurately report bytes sent to card on error */ |
89 | #define MMC_CAP_BYTEBLOCK (1 << 2) /* Can do non-log2 block sizes */ | 95 | #define MMC_CAP_BYTEBLOCK (1 << 2) /* Can do non-log2 block sizes */ |
96 | #define MMC_CAP_MMC_HIGHSPEED (1 << 3) /* Can do MMC high-speed timing */ | ||
97 | #define MMC_CAP_SD_HIGHSPEED (1 << 4) /* Can do SD high-speed timing */ | ||
90 | 98 | ||
91 | /* host specific block data */ | 99 | /* host specific block data */ |
92 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 100 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index e0c393cc7240..e96b2dee10bb 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -320,4 +320,16 @@ struct eisa_device_id { | |||
320 | 320 | ||
321 | #define EISA_DEVICE_MODALIAS_FMT "eisa:s%s" | 321 | #define EISA_DEVICE_MODALIAS_FMT "eisa:s%s" |
322 | 322 | ||
323 | struct parisc_device_id { | ||
324 | __u8 hw_type; /* 5 bits used */ | ||
325 | __u8 hversion_rev; /* 4 bits */ | ||
326 | __u16 hversion; /* 12 bits */ | ||
327 | __u32 sversion; /* 20 bits */ | ||
328 | }; | ||
329 | |||
330 | #define PA_HWTYPE_ANY_ID 0xff | ||
331 | #define PA_HVERSION_REV_ANY_ID 0xff | ||
332 | #define PA_HVERSION_ANY_ID 0xffff | ||
333 | #define PA_SVERSION_ANY_ID 0xffffffff | ||
334 | |||
323 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 335 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/mtd/iflash.h b/include/linux/mtd/iflash.h deleted file mode 100644 index 9aa5b4f02666..000000000000 --- a/include/linux/mtd/iflash.h +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | /* $Id: iflash.h,v 1.2 2000/11/13 18:01:54 dwmw2 Exp $ */ | ||
2 | |||
3 | #ifndef __MTD_IFLASH_H__ | ||
4 | #define __MTD_IFLASH_H__ | ||
5 | |||
6 | /* Extended CIS registers for Series 2 and 2+ cards */ | ||
7 | /* The registers are all offsets from 0x4000 */ | ||
8 | #define CISREG_CSR 0x0100 | ||
9 | #define CISREG_WP 0x0104 | ||
10 | #define CISREG_RDYBSY 0x0140 | ||
11 | |||
12 | /* Extended CIS registers for Series 2 cards */ | ||
13 | #define CISREG_SLEEP 0x0118 | ||
14 | #define CISREG_RDY_MASK 0x0120 | ||
15 | #define CISREG_RDY_STATUS 0x0130 | ||
16 | |||
17 | /* Extended CIS registers for Series 2+ cards */ | ||
18 | #define CISREG_VCR 0x010c | ||
19 | |||
20 | /* Card Status Register */ | ||
21 | #define CSR_SRESET 0x20 /* Soft reset */ | ||
22 | #define CSR_CMWP 0x10 /* Common memory write protect */ | ||
23 | #define CSR_PWRDOWN 0x08 /* Power down status */ | ||
24 | #define CSR_CISWP 0x04 /* Common memory CIS WP */ | ||
25 | #define CSR_WP 0x02 /* Mechanical write protect */ | ||
26 | #define CSR_READY 0x01 /* Ready/busy status */ | ||
27 | |||
28 | /* Write Protection Register */ | ||
29 | #define WP_BLKEN 0x04 /* Enable block locking */ | ||
30 | #define WP_CMWP 0x02 /* Common memory write protect */ | ||
31 | #define WP_CISWP 0x01 /* Common memory CIS WP */ | ||
32 | |||
33 | /* Voltage Control Register */ | ||
34 | #define VCR_VCC_LEVEL 0x80 /* 0 = 5V, 1 = 3.3V */ | ||
35 | #define VCR_VPP_VALID 0x02 /* Vpp Valid */ | ||
36 | #define VCR_VPP_GEN 0x01 /* Integrated Vpp generator */ | ||
37 | |||
38 | /* Ready/Busy Mode Register */ | ||
39 | #define RDYBSY_RACK 0x02 /* Ready acknowledge */ | ||
40 | #define RDYBSY_MODE 0x01 /* 1 = high performance */ | ||
41 | |||
42 | #define LOW(x) ((x) & 0xff) | ||
43 | |||
44 | /* 28F008SA-Compatible Command Set */ | ||
45 | #define IF_READ_ARRAY 0xffff | ||
46 | #define IF_INTEL_ID 0x9090 | ||
47 | #define IF_READ_CSR 0x7070 | ||
48 | #define IF_CLEAR_CSR 0x5050 | ||
49 | #define IF_WRITE 0x4040 | ||
50 | #define IF_BLOCK_ERASE 0x2020 | ||
51 | #define IF_ERASE_SUSPEND 0xb0b0 | ||
52 | #define IF_CONFIRM 0xd0d0 | ||
53 | |||
54 | /* 28F016SA Performance Enhancement Commands */ | ||
55 | #define IF_READ_PAGE 0x7575 | ||
56 | #define IF_PAGE_SWAP 0x7272 | ||
57 | #define IF_SINGLE_LOAD 0x7474 | ||
58 | #define IF_SEQ_LOAD 0xe0e0 | ||
59 | #define IF_PAGE_WRITE 0x0c0c | ||
60 | #define IF_RDY_MODE 0x9696 | ||
61 | #define IF_RDY_LEVEL 0x0101 | ||
62 | #define IF_RDY_PULSE_WRITE 0x0202 | ||
63 | #define IF_RDY_PULSE_ERASE 0x0303 | ||
64 | #define IF_RDY_DISABLE 0x0404 | ||
65 | #define IF_LOCK_BLOCK 0x7777 | ||
66 | #define IF_UPLOAD_STATUS 0x9797 | ||
67 | #define IF_READ_ESR 0x7171 | ||
68 | #define IF_ERASE_UNLOCKED 0xa7a7 | ||
69 | #define IF_SLEEP 0xf0f0 | ||
70 | #define IF_ABORT 0x8080 | ||
71 | #define IF_UPLOAD_DEVINFO 0x9999 | ||
72 | |||
73 | /* Definitions for Compatible Status Register */ | ||
74 | #define CSR_WR_READY 0x8080 /* Write state machine status */ | ||
75 | #define CSR_ERA_SUSPEND 0x4040 /* Erase suspend status */ | ||
76 | #define CSR_ERA_ERR 0x2020 /* Erase status */ | ||
77 | #define CSR_WR_ERR 0x1010 /* Data write status */ | ||
78 | #define CSR_VPP_LOW 0x0808 /* Vpp status */ | ||
79 | |||
80 | /* Definitions for Global Status Register */ | ||
81 | #define GSR_WR_READY 0x8080 /* Write state machine status */ | ||
82 | #define GSR_OP_SUSPEND 0x4040 /* Operation suspend status */ | ||
83 | #define GSR_OP_ERR 0x2020 /* Device operation status */ | ||
84 | #define GSR_SLEEP 0x1010 /* Device sleep status */ | ||
85 | #define GSR_QUEUE_FULL 0x0808 /* Queue status */ | ||
86 | #define GSR_PAGE_AVAIL 0x0404 /* Page buffer available status */ | ||
87 | #define GSR_PAGE_READY 0x0202 /* Page buffer status */ | ||
88 | #define GSR_PAGE_SELECT 0x0101 /* Page buffer select status */ | ||
89 | |||
90 | /* Definitions for Block Status Register */ | ||
91 | #define BSR_READY 0x8080 /* Block status */ | ||
92 | #define BSR_UNLOCK 0x4040 /* Block lock status */ | ||
93 | #define BSR_FAILED 0x2020 /* Block operation status */ | ||
94 | #define BSR_ABORTED 0x1010 /* Operation abort status */ | ||
95 | #define BSR_QUEUE_FULL 0x0808 /* Queue status */ | ||
96 | #define BSR_VPP_LOW 0x0404 /* Vpp status */ | ||
97 | |||
98 | #endif /* __MTD_IFLASH_H__ */ | ||
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 6a8570be331b..3d956c3abb31 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -121,6 +121,7 @@ struct mtd_info { | |||
121 | u_int32_t writesize; | 121 | u_int32_t writesize; |
122 | 122 | ||
123 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) | 123 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) |
124 | u_int32_t oobavail; // Available OOB bytes per block | ||
124 | 125 | ||
125 | // Kernel-only stuff starts here. | 126 | // Kernel-only stuff starts here. |
126 | char *name; | 127 | char *name; |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index d8af8a95e58d..a56d24ada505 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -82,7 +82,8 @@ struct onenand_bufferram { | |||
82 | * @wq: [INTERN] wait queue to sleep on if a OneNAND | 82 | * @wq: [INTERN] wait queue to sleep on if a OneNAND |
83 | * operation is in progress | 83 | * operation is in progress |
84 | * @state: [INTERN] the current state of the OneNAND device | 84 | * @state: [INTERN] the current state of the OneNAND device |
85 | * @page_buf: data buffer | 85 | * @page_buf: [INTERN] page main data buffer |
86 | * @oob_buf: [INTERN] page oob data buffer | ||
86 | * @subpagesize: [INTERN] holds the subpagesize | 87 | * @subpagesize: [INTERN] holds the subpagesize |
87 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme | 88 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme |
88 | * @bbm: [REPLACEABLE] pointer to Bad Block Management | 89 | * @bbm: [REPLACEABLE] pointer to Bad Block Management |
@@ -122,6 +123,7 @@ struct onenand_chip { | |||
122 | wait_queue_head_t wq; | 123 | wait_queue_head_t wq; |
123 | onenand_state_t state; | 124 | onenand_state_t state; |
124 | unsigned char *page_buf; | 125 | unsigned char *page_buf; |
126 | unsigned char *oob_buf; | ||
125 | 127 | ||
126 | int subpagesize; | 128 | int subpagesize; |
127 | struct nand_ecclayout *ecclayout; | 129 | struct nand_ecclayout *ecclayout; |
@@ -156,6 +158,7 @@ struct onenand_chip { | |||
156 | #define ONENAND_HAS_CONT_LOCK (0x0001) | 158 | #define ONENAND_HAS_CONT_LOCK (0x0001) |
157 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) | 159 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) |
158 | #define ONENAND_PAGEBUF_ALLOC (0x1000) | 160 | #define ONENAND_PAGEBUF_ALLOC (0x1000) |
161 | #define ONENAND_OOBBUF_ALLOC (0x2000) | ||
159 | 162 | ||
160 | /* | 163 | /* |
161 | * OneNAND Flash Manufacturer ID Codes | 164 | * OneNAND Flash Manufacturer ID Codes |
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index aff25c000abf..c6d4ab86b83c 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -1288,7 +1288,7 @@ struct mv64xxx_i2c_pdata { | |||
1288 | #define MV643XX_ETH_NAME "mv643xx_eth" | 1288 | #define MV643XX_ETH_NAME "mv643xx_eth" |
1289 | 1289 | ||
1290 | struct mv643xx_eth_platform_data { | 1290 | struct mv643xx_eth_platform_data { |
1291 | char *mac_addr; /* pointer to mac address */ | 1291 | int port_number; |
1292 | u16 force_phy_addr; /* force override if phy_addr == 0 */ | 1292 | u16 force_phy_addr; /* force override if phy_addr == 0 */ |
1293 | u16 phy_addr; | 1293 | u16 phy_addr; |
1294 | 1294 | ||
@@ -1303,6 +1303,7 @@ struct mv643xx_eth_platform_data { | |||
1303 | u32 tx_sram_size; | 1303 | u32 tx_sram_size; |
1304 | u32 rx_sram_addr; | 1304 | u32 rx_sram_addr; |
1305 | u32 rx_sram_size; | 1305 | u32 rx_sram_size; |
1306 | u8 mac_addr[6]; /* mac address if non-zero*/ | ||
1306 | }; | 1307 | }; |
1307 | 1308 | ||
1308 | #endif /* __ASM_MV643XX_H */ | 1309 | #endif /* __ASM_MV643XX_H */ |
diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h index a503052138bd..6330fc76b00f 100644 --- a/include/linux/ncp_fs_sb.h +++ b/include/linux/ncp_fs_sb.h | |||
@@ -50,6 +50,8 @@ struct ncp_server { | |||
50 | int packet_size; | 50 | int packet_size; |
51 | unsigned char *packet; /* Here we prepare requests and | 51 | unsigned char *packet; /* Here we prepare requests and |
52 | receive replies */ | 52 | receive replies */ |
53 | unsigned char *txbuf; /* Storage for current request */ | ||
54 | unsigned char *rxbuf; /* Storage for reply to current request */ | ||
53 | 55 | ||
54 | int lock; /* To prevent mismatch in protocols. */ | 56 | int lock; /* To prevent mismatch in protocols. */ |
55 | struct mutex mutex; | 57 | struct mutex mutex; |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_core.h b/include/linux/netfilter_ipv4/ip_conntrack_core.h index 907d4f5ca5dc..e3a6df07aa4b 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_core.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_core.h | |||
@@ -45,7 +45,7 @@ static inline int ip_conntrack_confirm(struct sk_buff **pskb) | |||
45 | int ret = NF_ACCEPT; | 45 | int ret = NF_ACCEPT; |
46 | 46 | ||
47 | if (ct) { | 47 | if (ct) { |
48 | if (!is_confirmed(ct)) | 48 | if (!is_confirmed(ct) && !is_dying(ct)) |
49 | ret = __ip_conntrack_confirm(pskb); | 49 | ret = __ip_conntrack_confirm(pskb); |
50 | ip_ct_deliver_cached_events(ct); | 50 | ip_ct_deliver_cached_events(ct); |
51 | } | 51 | } |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index b1063e9cdb1b..52c54a5720f3 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -352,7 +352,7 @@ extern nodemask_t node_possible_map; | |||
352 | #define node_possible(node) node_isset((node), node_possible_map) | 352 | #define node_possible(node) node_isset((node), node_possible_map) |
353 | #define first_online_node first_node(node_online_map) | 353 | #define first_online_node first_node(node_online_map) |
354 | #define next_online_node(nid) next_node((nid), node_online_map) | 354 | #define next_online_node(nid) next_node((nid), node_online_map) |
355 | int highest_possible_node_id(void); | 355 | extern int nr_node_ids; |
356 | #else | 356 | #else |
357 | #define num_online_nodes() 1 | 357 | #define num_online_nodes() 1 |
358 | #define num_possible_nodes() 1 | 358 | #define num_possible_nodes() 1 |
@@ -360,7 +360,7 @@ int highest_possible_node_id(void); | |||
360 | #define node_possible(node) ((node) == 0) | 360 | #define node_possible(node) ((node) == 0) |
361 | #define first_online_node 0 | 361 | #define first_online_node 0 |
362 | #define next_online_node(nid) (MAX_NUMNODES) | 362 | #define next_online_node(nid) (MAX_NUMNODES) |
363 | #define highest_possible_node_id() 0 | 363 | #define nr_node_ids 1 |
364 | #endif | 364 | #endif |
365 | 365 | ||
366 | #define any_online_node(mask) \ | 366 | #define any_online_node(mask) \ |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 350878a2d848..9cd0d0eaf523 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -76,7 +76,7 @@ | |||
76 | #define PG_active 6 | 76 | #define PG_active 6 |
77 | #define PG_slab 7 /* slab debug (Suparna wants this) */ | 77 | #define PG_slab 7 /* slab debug (Suparna wants this) */ |
78 | 78 | ||
79 | #define PG_checked 8 /* kill me in 2.5.<early>. */ | 79 | #define PG_owner_priv_1 8 /* Owner use. If pagecache, fs may use*/ |
80 | #define PG_arch_1 9 | 80 | #define PG_arch_1 9 |
81 | #define PG_reserved 10 | 81 | #define PG_reserved 10 |
82 | #define PG_private 11 /* If pagecache, has fs-private data */ | 82 | #define PG_private 11 /* If pagecache, has fs-private data */ |
@@ -91,6 +91,8 @@ | |||
91 | #define PG_nosave_free 18 /* Used for system suspend/resume */ | 91 | #define PG_nosave_free 18 /* Used for system suspend/resume */ |
92 | #define PG_buddy 19 /* Page is free, on buddy lists */ | 92 | #define PG_buddy 19 /* Page is free, on buddy lists */ |
93 | 93 | ||
94 | /* PG_owner_priv_1 users should have descriptive aliases */ | ||
95 | #define PG_checked PG_owner_priv_1 /* Used by some filesystems */ | ||
94 | 96 | ||
95 | #if (BITS_PER_LONG > 32) | 97 | #if (BITS_PER_LONG > 32) |
96 | /* | 98 | /* |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 2c4b6842dfb9..78417e421b4c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -543,6 +543,7 @@ void pci_set_master(struct pci_dev *dev); | |||
543 | int __must_check pci_set_mwi(struct pci_dev *dev); | 543 | int __must_check pci_set_mwi(struct pci_dev *dev); |
544 | void pci_clear_mwi(struct pci_dev *dev); | 544 | void pci_clear_mwi(struct pci_dev *dev); |
545 | void pci_intx(struct pci_dev *dev, int enable); | 545 | void pci_intx(struct pci_dev *dev, int enable); |
546 | void pci_msi_off(struct pci_dev *dev); | ||
546 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | 547 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); |
547 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | 548 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); |
548 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 549 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 7a6d34ee5ab1..f09cce2357ff 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -292,9 +292,10 @@ | |||
292 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ | 292 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ |
293 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ | 293 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ |
294 | 294 | ||
295 | /* MSI-X registers (these are at offset PCI_MSI_FLAGS) */ | 295 | /* MSI-X registers (these are at offset PCI_MSIX_FLAGS) */ |
296 | #define PCI_MSIX_FLAGS_QSIZE 0x7FF | 296 | #define PCI_MSIX_FLAGS 2 |
297 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | 297 | #define PCI_MSIX_FLAGS_QSIZE 0x7FF |
298 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | ||
298 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | 299 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) |
299 | #define PCI_MSIX_FLAGS_BITMASK (1 << 0) | 300 | #define PCI_MSIX_FLAGS_BITMASK (1 << 0) |
300 | 301 | ||
diff --git a/include/linux/pm.h b/include/linux/pm.h index 070394e846d0..21db05ac7c0b 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -120,15 +120,48 @@ typedef int __bitwise suspend_disk_method_t; | |||
120 | #define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 6) | 120 | #define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 6) |
121 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 7) | 121 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 7) |
122 | 122 | ||
123 | /** | ||
124 | * struct pm_ops - Callbacks for managing platform dependent suspend states. | ||
125 | * @valid: Callback to determine whether the given state can be entered. | ||
126 | * If %CONFIG_SOFTWARE_SUSPEND is set then %PM_SUSPEND_DISK is | ||
127 | * always valid and never passed to this call. | ||
128 | * If not assigned, all suspend states are advertised as valid | ||
129 | * in /sys/power/state (but can still be rejected by prepare or enter.) | ||
130 | * | ||
131 | * @prepare: Prepare the platform for the given suspend state. Can return a | ||
132 | * negative error code if necessary. | ||
133 | * | ||
134 | * @enter: Enter the given suspend state, must be assigned. Can return a | ||
135 | * negative error code if necessary. | ||
136 | * | ||
137 | * @finish: Called when the system has left the given state and all devices | ||
138 | * are resumed. The return value is ignored. | ||
139 | * | ||
140 | * @pm_disk_mode: Set to the disk method that the user should be able to | ||
141 | * configure for suspend-to-disk. Since %PM_DISK_SHUTDOWN, | ||
142 | * %PM_DISK_REBOOT, %PM_DISK_TEST and %PM_DISK_TESTPROC | ||
143 | * are always allowed, currently only %PM_DISK_PLATFORM | ||
144 | * makes sense. If the user then choses %PM_DISK_PLATFORM, | ||
145 | * the @prepare call will be called before suspending to disk | ||
146 | * (if present), the @enter call should be present and will | ||
147 | * be called after all state has been saved and the machine | ||
148 | * is ready to be shut down/suspended/..., and the @finish | ||
149 | * callback is called after state has been restored. All | ||
150 | * these calls are called with %PM_SUSPEND_DISK as the state. | ||
151 | */ | ||
123 | struct pm_ops { | 152 | struct pm_ops { |
124 | suspend_disk_method_t pm_disk_mode; | ||
125 | int (*valid)(suspend_state_t state); | 153 | int (*valid)(suspend_state_t state); |
126 | int (*prepare)(suspend_state_t state); | 154 | int (*prepare)(suspend_state_t state); |
127 | int (*enter)(suspend_state_t state); | 155 | int (*enter)(suspend_state_t state); |
128 | int (*finish)(suspend_state_t state); | 156 | int (*finish)(suspend_state_t state); |
157 | suspend_disk_method_t pm_disk_mode; | ||
129 | }; | 158 | }; |
130 | 159 | ||
131 | extern void pm_set_ops(struct pm_ops *); | 160 | /** |
161 | * pm_set_ops - set platform dependent power management ops | ||
162 | * @pm_ops: The new power management operations to set. | ||
163 | */ | ||
164 | extern void pm_set_ops(struct pm_ops *pm_ops); | ||
132 | extern struct pm_ops *pm_ops; | 165 | extern struct pm_ops *pm_ops; |
133 | extern int pm_suspend(suspend_state_t state); | 166 | extern int pm_suspend(suspend_state_t state); |
134 | 167 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5053dc01fad4..49fe2997a016 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -684,7 +684,6 @@ struct sched_domain { | |||
684 | unsigned int imbalance_pct; /* No balance until over watermark */ | 684 | unsigned int imbalance_pct; /* No balance until over watermark */ |
685 | unsigned long long cache_hot_time; /* Task considered cache hot (ns) */ | 685 | unsigned long long cache_hot_time; /* Task considered cache hot (ns) */ |
686 | unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */ | 686 | unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */ |
687 | unsigned int per_cpu_gain; /* CPU % gained by adding domain cpus */ | ||
688 | unsigned int busy_idx; | 687 | unsigned int busy_idx; |
689 | unsigned int idle_idx; | 688 | unsigned int idle_idx; |
690 | unsigned int newidle_idx; | 689 | unsigned int newidle_idx; |
@@ -1329,6 +1328,7 @@ extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | |||
1329 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); | 1328 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); |
1330 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | 1329 | extern int kill_pgrp(struct pid *pid, int sig, int priv); |
1331 | extern int kill_pid(struct pid *pid, int sig, int priv); | 1330 | extern int kill_pid(struct pid *pid, int sig, int priv); |
1331 | extern int kill_proc_info(int, struct siginfo *, pid_t); | ||
1332 | extern void do_notify_parent(struct task_struct *, int); | 1332 | extern void do_notify_parent(struct task_struct *, int); |
1333 | extern void force_sig(int, struct task_struct *); | 1333 | extern void force_sig(int, struct task_struct *); |
1334 | extern void force_sig_specific(int, struct task_struct *); | 1334 | extern void force_sig_specific(int, struct task_struct *); |
diff --git a/include/linux/shm.h b/include/linux/shm.h index a2c896ad0bef..ad2e3af65997 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h | |||
@@ -96,12 +96,17 @@ struct shmid_kernel /* private to the kernel */ | |||
96 | 96 | ||
97 | #ifdef CONFIG_SYSVIPC | 97 | #ifdef CONFIG_SYSVIPC |
98 | long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr); | 98 | long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr); |
99 | extern int is_file_shm_hugepages(struct file *file); | ||
99 | #else | 100 | #else |
100 | static inline long do_shmat(int shmid, char __user *shmaddr, | 101 | static inline long do_shmat(int shmid, char __user *shmaddr, |
101 | int shmflg, unsigned long *addr) | 102 | int shmflg, unsigned long *addr) |
102 | { | 103 | { |
103 | return -ENOSYS; | 104 | return -ENOSYS; |
104 | } | 105 | } |
106 | static inline int is_file_shm_hugepages(struct file *file) | ||
107 | { | ||
108 | return 0; | ||
109 | } | ||
105 | #endif | 110 | #endif |
106 | 111 | ||
107 | #endif /* __KERNEL__ */ | 112 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/sm501-regs.h b/include/linux/sm501-regs.h new file mode 100644 index 000000000000..cc9be4a11861 --- /dev/null +++ b/include/linux/sm501-regs.h | |||
@@ -0,0 +1,357 @@ | |||
1 | /* sm501-regs.h | ||
2 | * | ||
3 | * Copyright 2006 Simtec Electronics | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * Silicon Motion SM501 register definitions | ||
10 | */ | ||
11 | |||
12 | /* System Configuration area */ | ||
13 | /* System config base */ | ||
14 | #define SM501_SYS_CONFIG (0x000000) | ||
15 | |||
16 | /* config 1 */ | ||
17 | #define SM501_SYSTEM_CONTROL (0x000000) | ||
18 | #define SM501_MISC_CONTROL (0x000004) | ||
19 | |||
20 | #define SM501_MISC_BUS_SH (0x0) | ||
21 | #define SM501_MISC_BUS_PCI (0x1) | ||
22 | #define SM501_MISC_BUS_XSCALE (0x2) | ||
23 | #define SM501_MISC_BUS_NEC (0x6) | ||
24 | #define SM501_MISC_BUS_MASK (0x7) | ||
25 | |||
26 | #define SM501_MISC_VR_62MB (1<<3) | ||
27 | #define SM501_MISC_CDR_RESET (1<<7) | ||
28 | #define SM501_MISC_USB_LB (1<<8) | ||
29 | #define SM501_MISC_USB_SLAVE (1<<9) | ||
30 | #define SM501_MISC_BL_1 (1<<10) | ||
31 | #define SM501_MISC_MC (1<<11) | ||
32 | #define SM501_MISC_DAC_POWER (1<<12) | ||
33 | #define SM501_MISC_IRQ_INVERT (1<<16) | ||
34 | #define SM501_MISC_SH (1<<17) | ||
35 | |||
36 | #define SM501_MISC_HOLD_EMPTY (0<<18) | ||
37 | #define SM501_MISC_HOLD_8 (1<<18) | ||
38 | #define SM501_MISC_HOLD_16 (2<<18) | ||
39 | #define SM501_MISC_HOLD_24 (3<<18) | ||
40 | #define SM501_MISC_HOLD_32 (4<<18) | ||
41 | #define SM501_MISC_HOLD_MASK (7<<18) | ||
42 | |||
43 | #define SM501_MISC_FREQ_12 (1<<24) | ||
44 | #define SM501_MISC_PNL_24BIT (1<<25) | ||
45 | #define SM501_MISC_8051_LE (1<<26) | ||
46 | |||
47 | |||
48 | |||
49 | #define SM501_GPIO31_0_CONTROL (0x000008) | ||
50 | #define SM501_GPIO63_32_CONTROL (0x00000C) | ||
51 | #define SM501_DRAM_CONTROL (0x000010) | ||
52 | |||
53 | /* command list */ | ||
54 | #define SM501_ARBTRTN_CONTROL (0x000014) | ||
55 | |||
56 | /* command list */ | ||
57 | #define SM501_COMMAND_LIST_STATUS (0x000024) | ||
58 | |||
59 | /* interrupt debug */ | ||
60 | #define SM501_RAW_IRQ_STATUS (0x000028) | ||
61 | #define SM501_RAW_IRQ_CLEAR (0x000028) | ||
62 | #define SM501_IRQ_STATUS (0x00002C) | ||
63 | #define SM501_IRQ_MASK (0x000030) | ||
64 | #define SM501_DEBUG_CONTROL (0x000034) | ||
65 | |||
66 | /* power management */ | ||
67 | #define SM501_CURRENT_GATE (0x000038) | ||
68 | #define SM501_CURRENT_CLOCK (0x00003C) | ||
69 | #define SM501_POWER_MODE_0_GATE (0x000040) | ||
70 | #define SM501_POWER_MODE_0_CLOCK (0x000044) | ||
71 | #define SM501_POWER_MODE_1_GATE (0x000048) | ||
72 | #define SM501_POWER_MODE_1_CLOCK (0x00004C) | ||
73 | #define SM501_SLEEP_MODE_GATE (0x000050) | ||
74 | #define SM501_POWER_MODE_CONTROL (0x000054) | ||
75 | |||
76 | /* power gates for units within the 501 */ | ||
77 | #define SM501_GATE_HOST (0) | ||
78 | #define SM501_GATE_MEMORY (1) | ||
79 | #define SM501_GATE_DISPLAY (2) | ||
80 | #define SM501_GATE_2D_ENGINE (3) | ||
81 | #define SM501_GATE_CSC (4) | ||
82 | #define SM501_GATE_ZVPORT (5) | ||
83 | #define SM501_GATE_GPIO (6) | ||
84 | #define SM501_GATE_UART0 (7) | ||
85 | #define SM501_GATE_UART1 (8) | ||
86 | #define SM501_GATE_SSP (10) | ||
87 | #define SM501_GATE_USB_HOST (11) | ||
88 | #define SM501_GATE_USB_GADGET (12) | ||
89 | #define SM501_GATE_UCONTROLLER (17) | ||
90 | #define SM501_GATE_AC97 (18) | ||
91 | |||
92 | /* panel clock */ | ||
93 | #define SM501_CLOCK_P2XCLK (24) | ||
94 | /* crt clock */ | ||
95 | #define SM501_CLOCK_V2XCLK (16) | ||
96 | /* main clock */ | ||
97 | #define SM501_CLOCK_MCLK (8) | ||
98 | /* SDRAM controller clock */ | ||
99 | #define SM501_CLOCK_M1XCLK (0) | ||
100 | |||
101 | /* config 2 */ | ||
102 | #define SM501_PCI_MASTER_BASE (0x000058) | ||
103 | #define SM501_ENDIAN_CONTROL (0x00005C) | ||
104 | #define SM501_DEVICEID (0x000060) | ||
105 | /* 0x050100A0 */ | ||
106 | |||
107 | #define SM501_PLLCLOCK_COUNT (0x000064) | ||
108 | #define SM501_MISC_TIMING (0x000068) | ||
109 | #define SM501_CURRENT_SDRAM_CLOCK (0x00006C) | ||
110 | |||
111 | /* GPIO base */ | ||
112 | #define SM501_GPIO (0x010000) | ||
113 | #define SM501_GPIO_DATA_LOW (0x00) | ||
114 | #define SM501_GPIO_DATA_HIGH (0x04) | ||
115 | #define SM501_GPIO_DDR_LOW (0x08) | ||
116 | #define SM501_GPIO_DDR_HIGH (0x0C) | ||
117 | #define SM501_GPIO_IRQ_SETUP (0x10) | ||
118 | #define SM501_GPIO_IRQ_STATUS (0x14) | ||
119 | #define SM501_GPIO_IRQ_RESET (0x14) | ||
120 | |||
121 | /* I2C controller base */ | ||
122 | #define SM501_I2C (0x010040) | ||
123 | #define SM501_I2C_BYTE_COUNT (0x00) | ||
124 | #define SM501_I2C_CONTROL (0x01) | ||
125 | #define SM501_I2C_STATUS (0x02) | ||
126 | #define SM501_I2C_RESET (0x02) | ||
127 | #define SM501_I2C_SLAVE_ADDRESS (0x03) | ||
128 | #define SM501_I2C_DATA (0x04) | ||
129 | |||
130 | /* SSP base */ | ||
131 | #define SM501_SSP (0x020000) | ||
132 | |||
133 | /* Uart 0 base */ | ||
134 | #define SM501_UART0 (0x030000) | ||
135 | |||
136 | /* Uart 1 base */ | ||
137 | #define SM501_UART1 (0x030020) | ||
138 | |||
139 | /* USB host port base */ | ||
140 | #define SM501_USB_HOST (0x040000) | ||
141 | |||
142 | /* USB slave/gadget base */ | ||
143 | #define SM501_USB_GADGET (0x060000) | ||
144 | |||
145 | /* USB slave/gadget data port base */ | ||
146 | #define SM501_USB_GADGET_DATA (0x070000) | ||
147 | |||
148 | /* Display contoller/video engine base */ | ||
149 | #define SM501_DC (0x080000) | ||
150 | |||
151 | /* common defines for the SM501 address registers */ | ||
152 | #define SM501_ADDR_FLIP (1<<31) | ||
153 | #define SM501_ADDR_EXT (1<<27) | ||
154 | #define SM501_ADDR_CS1 (1<<26) | ||
155 | #define SM501_ADDR_MASK (0x3f << 26) | ||
156 | |||
157 | #define SM501_FIFO_MASK (0x3 << 16) | ||
158 | #define SM501_FIFO_1 (0x0 << 16) | ||
159 | #define SM501_FIFO_3 (0x1 << 16) | ||
160 | #define SM501_FIFO_7 (0x2 << 16) | ||
161 | #define SM501_FIFO_11 (0x3 << 16) | ||
162 | |||
163 | /* common registers for panel and the crt */ | ||
164 | #define SM501_OFF_DC_H_TOT (0x000) | ||
165 | #define SM501_OFF_DC_V_TOT (0x008) | ||
166 | #define SM501_OFF_DC_H_SYNC (0x004) | ||
167 | #define SM501_OFF_DC_V_SYNC (0x00C) | ||
168 | |||
169 | #define SM501_DC_PANEL_CONTROL (0x000) | ||
170 | |||
171 | #define SM501_DC_PANEL_CONTROL_FPEN (1<<27) | ||
172 | #define SM501_DC_PANEL_CONTROL_BIAS (1<<26) | ||
173 | #define SM501_DC_PANEL_CONTROL_DATA (1<<25) | ||
174 | #define SM501_DC_PANEL_CONTROL_VDD (1<<24) | ||
175 | #define SM501_DC_PANEL_CONTROL_DP (1<<23) | ||
176 | |||
177 | #define SM501_DC_PANEL_CONTROL_TFT_888 (0<<21) | ||
178 | #define SM501_DC_PANEL_CONTROL_TFT_333 (1<<21) | ||
179 | #define SM501_DC_PANEL_CONTROL_TFT_444 (2<<21) | ||
180 | |||
181 | #define SM501_DC_PANEL_CONTROL_DE (1<<20) | ||
182 | |||
183 | #define SM501_DC_PANEL_CONTROL_LCD_TFT (0<<18) | ||
184 | #define SM501_DC_PANEL_CONTROL_LCD_STN8 (1<<18) | ||
185 | #define SM501_DC_PANEL_CONTROL_LCD_STN12 (2<<18) | ||
186 | |||
187 | #define SM501_DC_PANEL_CONTROL_CP (1<<14) | ||
188 | #define SM501_DC_PANEL_CONTROL_VSP (1<<13) | ||
189 | #define SM501_DC_PANEL_CONTROL_HSP (1<<12) | ||
190 | #define SM501_DC_PANEL_CONTROL_CK (1<<9) | ||
191 | #define SM501_DC_PANEL_CONTROL_TE (1<<8) | ||
192 | #define SM501_DC_PANEL_CONTROL_VPD (1<<7) | ||
193 | #define SM501_DC_PANEL_CONTROL_VP (1<<6) | ||
194 | #define SM501_DC_PANEL_CONTROL_HPD (1<<5) | ||
195 | #define SM501_DC_PANEL_CONTROL_HP (1<<4) | ||
196 | #define SM501_DC_PANEL_CONTROL_GAMMA (1<<3) | ||
197 | #define SM501_DC_PANEL_CONTROL_EN (1<<2) | ||
198 | |||
199 | #define SM501_DC_PANEL_CONTROL_8BPP (0<<0) | ||
200 | #define SM501_DC_PANEL_CONTROL_16BPP (1<<0) | ||
201 | #define SM501_DC_PANEL_CONTROL_32BPP (2<<0) | ||
202 | |||
203 | |||
204 | #define SM501_DC_PANEL_PANNING_CONTROL (0x004) | ||
205 | #define SM501_DC_PANEL_COLOR_KEY (0x008) | ||
206 | #define SM501_DC_PANEL_FB_ADDR (0x00C) | ||
207 | #define SM501_DC_PANEL_FB_OFFSET (0x010) | ||
208 | #define SM501_DC_PANEL_FB_WIDTH (0x014) | ||
209 | #define SM501_DC_PANEL_FB_HEIGHT (0x018) | ||
210 | #define SM501_DC_PANEL_TL_LOC (0x01C) | ||
211 | #define SM501_DC_PANEL_BR_LOC (0x020) | ||
212 | #define SM501_DC_PANEL_H_TOT (0x024) | ||
213 | #define SM501_DC_PANEL_H_SYNC (0x028) | ||
214 | #define SM501_DC_PANEL_V_TOT (0x02C) | ||
215 | #define SM501_DC_PANEL_V_SYNC (0x030) | ||
216 | #define SM501_DC_PANEL_CUR_LINE (0x034) | ||
217 | |||
218 | #define SM501_DC_VIDEO_CONTROL (0x040) | ||
219 | #define SM501_DC_VIDEO_FB0_ADDR (0x044) | ||
220 | #define SM501_DC_VIDEO_FB_WIDTH (0x048) | ||
221 | #define SM501_DC_VIDEO_FB0_LAST_ADDR (0x04C) | ||
222 | #define SM501_DC_VIDEO_TL_LOC (0x050) | ||
223 | #define SM501_DC_VIDEO_BR_LOC (0x054) | ||
224 | #define SM501_DC_VIDEO_SCALE (0x058) | ||
225 | #define SM501_DC_VIDEO_INIT_SCALE (0x05C) | ||
226 | #define SM501_DC_VIDEO_YUV_CONSTANTS (0x060) | ||
227 | #define SM501_DC_VIDEO_FB1_ADDR (0x064) | ||
228 | #define SM501_DC_VIDEO_FB1_LAST_ADDR (0x068) | ||
229 | |||
230 | #define SM501_DC_VIDEO_ALPHA_CONTROL (0x080) | ||
231 | #define SM501_DC_VIDEO_ALPHA_FB_ADDR (0x084) | ||
232 | #define SM501_DC_VIDEO_ALPHA_FB_OFFSET (0x088) | ||
233 | #define SM501_DC_VIDEO_ALPHA_FB_LAST_ADDR (0x08C) | ||
234 | #define SM501_DC_VIDEO_ALPHA_TL_LOC (0x090) | ||
235 | #define SM501_DC_VIDEO_ALPHA_BR_LOC (0x094) | ||
236 | #define SM501_DC_VIDEO_ALPHA_SCALE (0x098) | ||
237 | #define SM501_DC_VIDEO_ALPHA_INIT_SCALE (0x09C) | ||
238 | #define SM501_DC_VIDEO_ALPHA_CHROMA_KEY (0x0A0) | ||
239 | #define SM501_DC_VIDEO_ALPHA_COLOR_LOOKUP (0x0A4) | ||
240 | |||
241 | #define SM501_DC_PANEL_HWC_BASE (0x0F0) | ||
242 | #define SM501_DC_PANEL_HWC_ADDR (0x0F0) | ||
243 | #define SM501_DC_PANEL_HWC_LOC (0x0F4) | ||
244 | #define SM501_DC_PANEL_HWC_COLOR_1_2 (0x0F8) | ||
245 | #define SM501_DC_PANEL_HWC_COLOR_3 (0x0FC) | ||
246 | |||
247 | #define SM501_HWC_EN (1<<31) | ||
248 | |||
249 | #define SM501_OFF_HWC_ADDR (0x00) | ||
250 | #define SM501_OFF_HWC_LOC (0x04) | ||
251 | #define SM501_OFF_HWC_COLOR_1_2 (0x08) | ||
252 | #define SM501_OFF_HWC_COLOR_3 (0x0C) | ||
253 | |||
254 | #define SM501_DC_ALPHA_CONTROL (0x100) | ||
255 | #define SM501_DC_ALPHA_FB_ADDR (0x104) | ||
256 | #define SM501_DC_ALPHA_FB_OFFSET (0x108) | ||
257 | #define SM501_DC_ALPHA_TL_LOC (0x10C) | ||
258 | #define SM501_DC_ALPHA_BR_LOC (0x110) | ||
259 | #define SM501_DC_ALPHA_CHROMA_KEY (0x114) | ||
260 | #define SM501_DC_ALPHA_COLOR_LOOKUP (0x118) | ||
261 | |||
262 | #define SM501_DC_CRT_CONTROL (0x200) | ||
263 | |||
264 | #define SM501_DC_CRT_CONTROL_TVP (1<<15) | ||
265 | #define SM501_DC_CRT_CONTROL_CP (1<<14) | ||
266 | #define SM501_DC_CRT_CONTROL_VSP (1<<13) | ||
267 | #define SM501_DC_CRT_CONTROL_HSP (1<<12) | ||
268 | #define SM501_DC_CRT_CONTROL_VS (1<<11) | ||
269 | #define SM501_DC_CRT_CONTROL_BLANK (1<<10) | ||
270 | #define SM501_DC_CRT_CONTROL_SEL (1<<9) | ||
271 | #define SM501_DC_CRT_CONTROL_TE (1<<8) | ||
272 | #define SM501_DC_CRT_CONTROL_PIXEL_MASK (0xF << 4) | ||
273 | #define SM501_DC_CRT_CONTROL_GAMMA (1<<3) | ||
274 | #define SM501_DC_CRT_CONTROL_ENABLE (1<<2) | ||
275 | |||
276 | #define SM501_DC_CRT_CONTROL_8BPP (0<<0) | ||
277 | #define SM501_DC_CRT_CONTROL_16BPP (1<<0) | ||
278 | #define SM501_DC_CRT_CONTROL_32BPP (2<<0) | ||
279 | |||
280 | #define SM501_DC_CRT_FB_ADDR (0x204) | ||
281 | #define SM501_DC_CRT_FB_OFFSET (0x208) | ||
282 | #define SM501_DC_CRT_H_TOT (0x20C) | ||
283 | #define SM501_DC_CRT_H_SYNC (0x210) | ||
284 | #define SM501_DC_CRT_V_TOT (0x214) | ||
285 | #define SM501_DC_CRT_V_SYNC (0x218) | ||
286 | #define SM501_DC_CRT_SIGNATURE_ANALYZER (0x21C) | ||
287 | #define SM501_DC_CRT_CUR_LINE (0x220) | ||
288 | #define SM501_DC_CRT_MONITOR_DETECT (0x224) | ||
289 | |||
290 | #define SM501_DC_CRT_HWC_BASE (0x230) | ||
291 | #define SM501_DC_CRT_HWC_ADDR (0x230) | ||
292 | #define SM501_DC_CRT_HWC_LOC (0x234) | ||
293 | #define SM501_DC_CRT_HWC_COLOR_1_2 (0x238) | ||
294 | #define SM501_DC_CRT_HWC_COLOR_3 (0x23C) | ||
295 | |||
296 | #define SM501_DC_PANEL_PALETTE (0x400) | ||
297 | |||
298 | #define SM501_DC_VIDEO_PALETTE (0x800) | ||
299 | |||
300 | #define SM501_DC_CRT_PALETTE (0xC00) | ||
301 | |||
302 | /* Zoom Video port base */ | ||
303 | #define SM501_ZVPORT (0x090000) | ||
304 | |||
305 | /* AC97/I2S base */ | ||
306 | #define SM501_AC97 (0x0A0000) | ||
307 | |||
308 | /* 8051 micro controller base */ | ||
309 | #define SM501_UCONTROLLER (0x0B0000) | ||
310 | |||
311 | /* 8051 micro controller SRAM base */ | ||
312 | #define SM501_UCONTROLLER_SRAM (0x0C0000) | ||
313 | |||
314 | /* DMA base */ | ||
315 | #define SM501_DMA (0x0D0000) | ||
316 | |||
317 | /* 2d engine base */ | ||
318 | #define SM501_2D_ENGINE (0x100000) | ||
319 | #define SM501_2D_SOURCE (0x00) | ||
320 | #define SM501_2D_DESTINATION (0x04) | ||
321 | #define SM501_2D_DIMENSION (0x08) | ||
322 | #define SM501_2D_CONTROL (0x0C) | ||
323 | #define SM501_2D_PITCH (0x10) | ||
324 | #define SM501_2D_FOREGROUND (0x14) | ||
325 | #define SM501_2D_BACKGROUND (0x18) | ||
326 | #define SM501_2D_STRETCH (0x1C) | ||
327 | #define SM501_2D_COLOR_COMPARE (0x20) | ||
328 | #define SM501_2D_COLOR_COMPARE_MASK (0x24) | ||
329 | #define SM501_2D_MASK (0x28) | ||
330 | #define SM501_2D_CLIP_TL (0x2C) | ||
331 | #define SM501_2D_CLIP_BR (0x30) | ||
332 | #define SM501_2D_MONO_PATTERN_LOW (0x34) | ||
333 | #define SM501_2D_MONO_PATTERN_HIGH (0x38) | ||
334 | #define SM501_2D_WINDOW_WIDTH (0x3C) | ||
335 | #define SM501_2D_SOURCE_BASE (0x40) | ||
336 | #define SM501_2D_DESTINATION_BASE (0x44) | ||
337 | #define SM501_2D_ALPHA (0x48) | ||
338 | #define SM501_2D_WRAP (0x4C) | ||
339 | #define SM501_2D_STATUS (0x50) | ||
340 | |||
341 | #define SM501_CSC_Y_SOURCE_BASE (0xC8) | ||
342 | #define SM501_CSC_CONSTANTS (0xCC) | ||
343 | #define SM501_CSC_Y_SOURCE_X (0xD0) | ||
344 | #define SM501_CSC_Y_SOURCE_Y (0xD4) | ||
345 | #define SM501_CSC_U_SOURCE_BASE (0xD8) | ||
346 | #define SM501_CSC_V_SOURCE_BASE (0xDC) | ||
347 | #define SM501_CSC_SOURCE_DIMENSION (0xE0) | ||
348 | #define SM501_CSC_SOURCE_PITCH (0xE4) | ||
349 | #define SM501_CSC_DESTINATION (0xE8) | ||
350 | #define SM501_CSC_DESTINATION_DIMENSION (0xEC) | ||
351 | #define SM501_CSC_DESTINATION_PITCH (0xF0) | ||
352 | #define SM501_CSC_SCALE_FACTOR (0xF4) | ||
353 | #define SM501_CSC_DESTINATION_BASE (0xF8) | ||
354 | #define SM501_CSC_CONTROL (0xFC) | ||
355 | |||
356 | /* 2d engine data port base */ | ||
357 | #define SM501_2D_ENGINE_DATA (0x110000) | ||
diff --git a/include/linux/sm501.h b/include/linux/sm501.h new file mode 100644 index 000000000000..9e3aaad6fe4d --- /dev/null +++ b/include/linux/sm501.h | |||
@@ -0,0 +1,170 @@ | |||
1 | /* include/linux/sm501.h | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * Vincent Sanders <vince@simtec.co.uk> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | extern int sm501_unit_power(struct device *dev, | ||
22 | unsigned int unit, unsigned int to); | ||
23 | |||
24 | extern unsigned long sm501_set_clock(struct device *dev, | ||
25 | int clksrc, unsigned long freq); | ||
26 | |||
27 | extern unsigned long sm501_find_clock(int clksrc, unsigned long req_freq); | ||
28 | |||
29 | /* sm501_misc_control | ||
30 | * | ||
31 | * Modify the SM501's MISC_CONTROL register | ||
32 | */ | ||
33 | |||
34 | extern int sm501_misc_control(struct device *dev, | ||
35 | unsigned long set, unsigned long clear); | ||
36 | |||
37 | /* sm501_modify_reg | ||
38 | * | ||
39 | * Modify a register in the SM501 which may be shared with other | ||
40 | * drivers. | ||
41 | */ | ||
42 | |||
43 | extern unsigned long sm501_modify_reg(struct device *dev, | ||
44 | unsigned long reg, | ||
45 | unsigned long set, | ||
46 | unsigned long clear); | ||
47 | |||
48 | /* sm501_gpio_set | ||
49 | * | ||
50 | * set the state of the given GPIO line | ||
51 | */ | ||
52 | |||
53 | extern void sm501_gpio_set(struct device *dev, | ||
54 | unsigned long gpio, | ||
55 | unsigned int to, | ||
56 | unsigned int dir); | ||
57 | |||
58 | /* sm501_gpio_get | ||
59 | * | ||
60 | * get the state of the given GPIO line | ||
61 | */ | ||
62 | |||
63 | extern unsigned long sm501_gpio_get(struct device *dev, | ||
64 | unsigned long gpio); | ||
65 | |||
66 | |||
67 | /* Platform data definitions */ | ||
68 | |||
69 | #define SM501FB_FLAG_USE_INIT_MODE (1<<0) | ||
70 | #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) | ||
71 | #define SM501FB_FLAG_USE_HWCURSOR (1<<2) | ||
72 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) | ||
73 | |||
74 | struct sm501_platdata_fbsub { | ||
75 | struct fb_videomode *def_mode; | ||
76 | unsigned int def_bpp; | ||
77 | unsigned long max_mem; | ||
78 | unsigned int flags; | ||
79 | }; | ||
80 | |||
81 | enum sm501_fb_routing { | ||
82 | SM501_FB_OWN = 0, /* CRT=>CRT, Panel=>Panel */ | ||
83 | SM501_FB_CRT_PANEL = 1, /* Panel=>CRT, Panel=>Panel */ | ||
84 | }; | ||
85 | |||
86 | /* sm501_platdata_fb flag field bit definitions */ | ||
87 | |||
88 | #define SM501_FBPD_SWAP_FB_ENDIAN (1<<0) /* need to endian swap */ | ||
89 | |||
90 | /* sm501_platdata_fb | ||
91 | * | ||
92 | * configuration data for the framebuffer driver | ||
93 | */ | ||
94 | |||
95 | struct sm501_platdata_fb { | ||
96 | enum sm501_fb_routing fb_route; | ||
97 | unsigned int flags; | ||
98 | struct sm501_platdata_fbsub *fb_crt; | ||
99 | struct sm501_platdata_fbsub *fb_pnl; | ||
100 | }; | ||
101 | |||
102 | /* gpio i2c */ | ||
103 | |||
104 | struct sm501_platdata_gpio_i2c { | ||
105 | unsigned int pin_sda; | ||
106 | unsigned int pin_scl; | ||
107 | }; | ||
108 | |||
109 | /* sm501_initdata | ||
110 | * | ||
111 | * use for initialising values that may not have been setup | ||
112 | * before the driver is loaded. | ||
113 | */ | ||
114 | |||
115 | struct sm501_reg_init { | ||
116 | unsigned long set; | ||
117 | unsigned long mask; | ||
118 | }; | ||
119 | |||
120 | #define SM501_USE_USB_HOST (1<<0) | ||
121 | #define SM501_USE_USB_SLAVE (1<<1) | ||
122 | #define SM501_USE_SSP0 (1<<2) | ||
123 | #define SM501_USE_SSP1 (1<<3) | ||
124 | #define SM501_USE_UART0 (1<<4) | ||
125 | #define SM501_USE_UART1 (1<<5) | ||
126 | #define SM501_USE_FBACCEL (1<<6) | ||
127 | #define SM501_USE_AC97 (1<<7) | ||
128 | #define SM501_USE_I2S (1<<8) | ||
129 | |||
130 | #define SM501_USE_ALL (0xffffffff) | ||
131 | |||
132 | struct sm501_initdata { | ||
133 | struct sm501_reg_init gpio_low; | ||
134 | struct sm501_reg_init gpio_high; | ||
135 | struct sm501_reg_init misc_timing; | ||
136 | struct sm501_reg_init misc_control; | ||
137 | |||
138 | unsigned long devices; | ||
139 | unsigned long mclk; /* non-zero to modify */ | ||
140 | unsigned long m1xclk; /* non-zero to modify */ | ||
141 | }; | ||
142 | |||
143 | /* sm501_init_gpio | ||
144 | * | ||
145 | * default gpio settings | ||
146 | */ | ||
147 | |||
148 | struct sm501_init_gpio { | ||
149 | struct sm501_reg_init gpio_data_low; | ||
150 | struct sm501_reg_init gpio_data_high; | ||
151 | struct sm501_reg_init gpio_ddr_low; | ||
152 | struct sm501_reg_init gpio_ddr_high; | ||
153 | }; | ||
154 | |||
155 | /* sm501_platdata | ||
156 | * | ||
157 | * This is passed with the platform device to allow the board | ||
158 | * to control the behaviour of the SM501 driver(s) which attach | ||
159 | * to the device. | ||
160 | * | ||
161 | */ | ||
162 | |||
163 | struct sm501_platdata { | ||
164 | struct sm501_initdata *init; | ||
165 | struct sm501_init_gpio *init_gpiop; | ||
166 | struct sm501_platdata_fb *fb; | ||
167 | |||
168 | struct sm501_platdata_gpio_i2c *gpio_i2c; | ||
169 | unsigned int gpio_i2c_nr; | ||
170 | }; | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 28157a36e6cc..fcd35a210e7f 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { | |||
16 | /* _SS_MAXSIZE value minus size of ss_family */ | 16 | /* _SS_MAXSIZE value minus size of ss_family */ |
17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ |
18 | 18 | ||
19 | #ifdef __KERNEL__ | 19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) |
20 | 20 | ||
21 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 61fef376ed2e..a946176db638 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -283,6 +283,43 @@ do { \ | |||
283 | }) | 283 | }) |
284 | 284 | ||
285 | /* | 285 | /* |
286 | * Locks two spinlocks l1 and l2. | ||
287 | * l1_first indicates if spinlock l1 should be taken first. | ||
288 | */ | ||
289 | static inline void double_spin_lock(spinlock_t *l1, spinlock_t *l2, | ||
290 | bool l1_first) | ||
291 | __acquires(l1) | ||
292 | __acquires(l2) | ||
293 | { | ||
294 | if (l1_first) { | ||
295 | spin_lock(l1); | ||
296 | spin_lock(l2); | ||
297 | } else { | ||
298 | spin_lock(l2); | ||
299 | spin_lock(l1); | ||
300 | } | ||
301 | } | ||
302 | |||
303 | /* | ||
304 | * Unlocks two spinlocks l1 and l2. | ||
305 | * l1_taken_first indicates if spinlock l1 was taken first and therefore | ||
306 | * should be released after spinlock l2. | ||
307 | */ | ||
308 | static inline void double_spin_unlock(spinlock_t *l1, spinlock_t *l2, | ||
309 | bool l1_taken_first) | ||
310 | __releases(l1) | ||
311 | __releases(l2) | ||
312 | { | ||
313 | if (l1_taken_first) { | ||
314 | spin_unlock(l2); | ||
315 | spin_unlock(l1); | ||
316 | } else { | ||
317 | spin_unlock(l1); | ||
318 | spin_unlock(l2); | ||
319 | } | ||
320 | } | ||
321 | |||
322 | /* | ||
286 | * Pull the atomic_t declaration: | 323 | * Pull the atomic_t declaration: |
287 | * (asm-mips/atomic.h needs above definitions) | 324 | * (asm-mips/atomic.h needs above definitions) |
288 | */ | 325 | */ |
diff --git a/include/linux/stat.h b/include/linux/stat.h index 4f8539ccff6c..679ef0d70b6b 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) |
11 | 11 | ||
12 | #define S_IFMT 00170000 | 12 | #define S_IFMT 00170000 |
13 | #define S_IFSOCK 0140000 | 13 | #define S_IFSOCK 0140000 |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index de9fc576fa1c..3069ecca0129 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -150,10 +150,10 @@ struct rpc_call_ops { | |||
150 | #define RPC_TASK_HAS_TIMER 3 | 150 | #define RPC_TASK_HAS_TIMER 3 |
151 | #define RPC_TASK_ACTIVE 4 | 151 | #define RPC_TASK_ACTIVE 4 |
152 | 152 | ||
153 | #define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) | 153 | #define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
154 | #define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) | 154 | #define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
155 | #define rpc_test_and_set_running(t) \ | 155 | #define rpc_test_and_set_running(t) \ |
156 | (test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) | 156 | test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
157 | #define rpc_clear_running(t) \ | 157 | #define rpc_clear_running(t) \ |
158 | do { \ | 158 | do { \ |
159 | smp_mb__before_clear_bit(); \ | 159 | smp_mb__before_clear_bit(); \ |
@@ -161,8 +161,8 @@ struct rpc_call_ops { | |||
161 | smp_mb__after_clear_bit(); \ | 161 | smp_mb__after_clear_bit(); \ |
162 | } while (0) | 162 | } while (0) |
163 | 163 | ||
164 | #define RPC_IS_QUEUED(t) (test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate)) | 164 | #define RPC_IS_QUEUED(t) test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) |
165 | #define rpc_set_queued(t) (set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate)) | 165 | #define rpc_set_queued(t) set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) |
166 | #define rpc_clear_queued(t) \ | 166 | #define rpc_clear_queued(t) \ |
167 | do { \ | 167 | do { \ |
168 | smp_mb__before_clear_bit(); \ | 168 | smp_mb__before_clear_bit(); \ |
@@ -179,7 +179,7 @@ struct rpc_call_ops { | |||
179 | smp_mb__after_clear_bit(); \ | 179 | smp_mb__after_clear_bit(); \ |
180 | } while (0) | 180 | } while (0) |
181 | 181 | ||
182 | #define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)) | 182 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) |
183 | 183 | ||
184 | /* | 184 | /* |
185 | * Task priorities. | 185 | * Task priorities. |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 83b3c7b433aa..35fa4d5aadd0 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -194,9 +194,7 @@ static inline void svc_putu32(struct kvec *iov, __be32 val) | |||
194 | 194 | ||
195 | union svc_addr_u { | 195 | union svc_addr_u { |
196 | struct in_addr addr; | 196 | struct in_addr addr; |
197 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
198 | struct in6_addr addr6; | 197 | struct in6_addr addr6; |
199 | #endif | ||
200 | }; | 198 | }; |
201 | 199 | ||
202 | /* | 200 | /* |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index cccea0a0feb4..7909687557bf 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -66,7 +66,7 @@ struct svc_sock { | |||
66 | * Function prototypes. | 66 | * Function prototypes. |
67 | */ | 67 | */ |
68 | int svc_makesock(struct svc_serv *, int, unsigned short, int flags); | 68 | int svc_makesock(struct svc_serv *, int, unsigned short, int flags); |
69 | void svc_close_socket(struct svc_sock *); | 69 | void svc_force_close_socket(struct svc_sock *); |
70 | int svc_recv(struct svc_rqst *, long); | 70 | int svc_recv(struct svc_rqst *, long); |
71 | int svc_send(struct svc_rqst *); | 71 | int svc_send(struct svc_rqst *); |
72 | void svc_drop(struct svc_rqst *); | 72 | void svc_drop(struct svc_rqst *); |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index ec639aa3a1d3..ceb6cc5ceebb 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -108,7 +108,10 @@ extern void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, | |||
108 | #else | 108 | #else |
109 | 109 | ||
110 | #define make_migration_entry(page, write) swp_entry(0, 0) | 110 | #define make_migration_entry(page, write) swp_entry(0, 0) |
111 | #define is_migration_entry(swp) 0 | 111 | static inline int is_migration_entry(swp_entry_t swp) |
112 | { | ||
113 | return 0; | ||
114 | } | ||
112 | #define migration_entry_to_page(swp) NULL | 115 | #define migration_entry_to_page(swp) NULL |
113 | static inline void make_migration_entry_read(swp_entry_t *entryp) { } | 116 | static inline void make_migration_entry_read(swp_entry_t *entryp) { } |
114 | static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, | 117 | static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 192de3afa96b..523405e1e1f6 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -17,6 +17,7 @@ | |||
17 | struct kobject; | 17 | struct kobject; |
18 | struct module; | 18 | struct module; |
19 | struct nameidata; | 19 | struct nameidata; |
20 | struct dentry; | ||
20 | 21 | ||
21 | struct attribute { | 22 | struct attribute { |
22 | const char * name; | 23 | const char * name; |
@@ -68,18 +69,6 @@ struct sysfs_ops { | |||
68 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 69 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
69 | }; | 70 | }; |
70 | 71 | ||
71 | struct sysfs_dirent { | ||
72 | atomic_t s_count; | ||
73 | struct list_head s_sibling; | ||
74 | struct list_head s_children; | ||
75 | void * s_element; | ||
76 | int s_type; | ||
77 | umode_t s_mode; | ||
78 | struct dentry * s_dentry; | ||
79 | struct iattr * s_iattr; | ||
80 | atomic_t s_event; | ||
81 | }; | ||
82 | |||
83 | #define SYSFS_ROOT 0x0001 | 72 | #define SYSFS_ROOT 0x0001 |
84 | #define SYSFS_DIR 0x0002 | 73 | #define SYSFS_DIR 0x0002 |
85 | #define SYSFS_KOBJ_ATTR 0x0004 | 74 | #define SYSFS_KOBJ_ATTR 0x0004 |
@@ -126,6 +115,11 @@ void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); | |||
126 | int __must_check sysfs_create_group(struct kobject *, | 115 | int __must_check sysfs_create_group(struct kobject *, |
127 | const struct attribute_group *); | 116 | const struct attribute_group *); |
128 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 117 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
118 | int sysfs_add_file_to_group(struct kobject *kobj, | ||
119 | const struct attribute *attr, const char *group); | ||
120 | void sysfs_remove_file_from_group(struct kobject *kobj, | ||
121 | const struct attribute *attr, const char *group); | ||
122 | |||
129 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 123 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
130 | 124 | ||
131 | 125 | ||
@@ -210,6 +204,17 @@ static inline void sysfs_remove_group(struct kobject * k, const struct attribute | |||
210 | ; | 204 | ; |
211 | } | 205 | } |
212 | 206 | ||
207 | static inline int sysfs_add_file_to_group(struct kobject *kobj, | ||
208 | const struct attribute *attr, const char *group) | ||
209 | { | ||
210 | return 0; | ||
211 | } | ||
212 | |||
213 | static inline void sysfs_remove_file_from_group(struct kobject *kobj, | ||
214 | const struct attribute *attr, const char *group) | ||
215 | { | ||
216 | } | ||
217 | |||
213 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | 218 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) |
214 | { | 219 | { |
215 | } | 220 | } |
diff --git a/include/linux/topology.h b/include/linux/topology.h index 6c5a6e6e813b..a9d1f049cc15 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -96,7 +96,6 @@ | |||
96 | .busy_factor = 64, \ | 96 | .busy_factor = 64, \ |
97 | .imbalance_pct = 110, \ | 97 | .imbalance_pct = 110, \ |
98 | .cache_nice_tries = 0, \ | 98 | .cache_nice_tries = 0, \ |
99 | .per_cpu_gain = 25, \ | ||
100 | .busy_idx = 0, \ | 99 | .busy_idx = 0, \ |
101 | .idle_idx = 0, \ | 100 | .idle_idx = 0, \ |
102 | .newidle_idx = 1, \ | 101 | .newidle_idx = 1, \ |
@@ -128,7 +127,6 @@ | |||
128 | .busy_factor = 64, \ | 127 | .busy_factor = 64, \ |
129 | .imbalance_pct = 125, \ | 128 | .imbalance_pct = 125, \ |
130 | .cache_nice_tries = 1, \ | 129 | .cache_nice_tries = 1, \ |
131 | .per_cpu_gain = 100, \ | ||
132 | .busy_idx = 2, \ | 130 | .busy_idx = 2, \ |
133 | .idle_idx = 1, \ | 131 | .idle_idx = 1, \ |
134 | .newidle_idx = 2, \ | 132 | .newidle_idx = 2, \ |
@@ -159,7 +157,6 @@ | |||
159 | .busy_factor = 64, \ | 157 | .busy_factor = 64, \ |
160 | .imbalance_pct = 125, \ | 158 | .imbalance_pct = 125, \ |
161 | .cache_nice_tries = 1, \ | 159 | .cache_nice_tries = 1, \ |
162 | .per_cpu_gain = 100, \ | ||
163 | .busy_idx = 2, \ | 160 | .busy_idx = 2, \ |
164 | .idle_idx = 1, \ | 161 | .idle_idx = 1, \ |
165 | .newidle_idx = 2, \ | 162 | .newidle_idx = 2, \ |
@@ -193,7 +190,6 @@ | |||
193 | .newidle_idx = 0, /* unused */ \ | 190 | .newidle_idx = 0, /* unused */ \ |
194 | .wake_idx = 0, /* unused */ \ | 191 | .wake_idx = 0, /* unused */ \ |
195 | .forkexec_idx = 0, /* unused */ \ | 192 | .forkexec_idx = 0, /* unused */ \ |
196 | .per_cpu_gain = 100, \ | ||
197 | .flags = SD_LOAD_BALANCE \ | 193 | .flags = SD_LOAD_BALANCE \ |
198 | | SD_SERIALIZE, \ | 194 | | SD_SERIALIZE, \ |
199 | .last_balance = jiffies, \ | 195 | .last_balance = jiffies, \ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index a8e8d1ecebb1..87dc75a6cee1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -388,10 +388,14 @@ struct usb_device { | |||
388 | struct usb_device *children[USB_MAXCHILDREN]; | 388 | struct usb_device *children[USB_MAXCHILDREN]; |
389 | 389 | ||
390 | int pm_usage_cnt; /* usage counter for autosuspend */ | 390 | int pm_usage_cnt; /* usage counter for autosuspend */ |
391 | u32 quirks; /* quirks of the whole device */ | ||
392 | |||
391 | #ifdef CONFIG_PM | 393 | #ifdef CONFIG_PM |
392 | struct delayed_work autosuspend; /* for delayed autosuspends */ | 394 | struct delayed_work autosuspend; /* for delayed autosuspends */ |
393 | struct mutex pm_mutex; /* protects PM operations */ | 395 | struct mutex pm_mutex; /* protects PM operations */ |
394 | 396 | ||
397 | unsigned autosuspend_delay; /* in jiffies */ | ||
398 | |||
395 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 399 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
396 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 400 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
397 | #endif | 401 | #endif |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 245c72531228..1122a6c2c1a3 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -1,8 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * This file holds USB constants and structures that are needed for USB | 2 | * This file holds USB constants and structures that are needed for |
3 | * device APIs. These are used by the USB device model, which is defined | 3 | * USB device APIs. These are used by the USB device model, which is |
4 | * in chapter 9 of the USB 2.0 specification. Linux has several APIs in C | 4 | * defined in chapter 9 of the USB 2.0 specification and in the |
5 | * that need these: | 5 | * Wireless USB 1.0 (spread around). Linux has several APIs in C that |
6 | * need these: | ||
6 | * | 7 | * |
7 | * - the master/host side Linux-USB kernel driver API; | 8 | * - the master/host side Linux-USB kernel driver API; |
8 | * - the "usbfs" user space API; and | 9 | * - the "usbfs" user space API; and |
@@ -14,6 +15,19 @@ | |||
14 | * | 15 | * |
15 | * There's also "Wireless USB", using low power short range radios for | 16 | * There's also "Wireless USB", using low power short range radios for |
16 | * peripheral interconnection but otherwise building on the USB framework. | 17 | * peripheral interconnection but otherwise building on the USB framework. |
18 | * | ||
19 | * Note all descriptors are declared '__attribute__((packed))' so that: | ||
20 | * | ||
21 | * [a] they never get padded, either internally (USB spec writers | ||
22 | * probably handled that) or externally; | ||
23 | * | ||
24 | * [b] so that accessing bigger-than-a-bytes fields will never | ||
25 | * generate bus errors on any platform, even when the location of | ||
26 | * its descriptor inside a bundle isn't "naturally aligned", and | ||
27 | * | ||
28 | * [c] for consistency, removing all doubt even when it appears to | ||
29 | * someone that the two other points are non-issues for that | ||
30 | * particular descriptor type. | ||
17 | */ | 31 | */ |
18 | 32 | ||
19 | #ifndef __LINUX_USB_CH9_H | 33 | #ifndef __LINUX_USB_CH9_H |
diff --git a/include/linux/usb/iowarrior.h b/include/linux/usb/iowarrior.h new file mode 100644 index 000000000000..cbbe020a4f5c --- /dev/null +++ b/include/linux/usb/iowarrior.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _IOWARRIOR_H_ | ||
2 | #define _IOWARRIOR_H_ | ||
3 | |||
4 | #define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */ | ||
5 | |||
6 | /* Define the ioctl commands for reading and writing data */ | ||
7 | #define IOW_WRITE _IOW(CODEMERCS_MAGIC_NUMBER, 1, __u8 *) | ||
8 | #define IOW_READ _IOW(CODEMERCS_MAGIC_NUMBER, 2, __u8 *) | ||
9 | |||
10 | /* | ||
11 | A struct for available device info which is read | ||
12 | with the ioctl IOW_GETINFO. | ||
13 | To be compatible with 2.4 userspace which didn't have an easy way to get | ||
14 | this information. | ||
15 | */ | ||
16 | struct iowarrior_info { | ||
17 | __u32 vendor; /* vendor id : supposed to be USB_VENDOR_ID_CODEMERCS in all cases */ | ||
18 | __u32 product; /* product id : depends on type of chip (USB_DEVICE_ID_CODEMERCS_XXXXX) */ | ||
19 | __u8 serial[9]; /* the serial number of our chip (if a serial-number is not available this is empty string) */ | ||
20 | __u32 revision; /* revision number of the chip */ | ||
21 | __u32 speed; /* USB-speed of the device (0=UNKNOWN, 1=LOW, 2=FULL 3=HIGH) */ | ||
22 | __u32 power; /* power consumption of the device in mA */ | ||
23 | __u32 if_num; /* the number of the endpoint */ | ||
24 | __u32 report_size; /* size of the data-packets on this interface */ | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | Get some device-information (product-id , serial-number etc.) | ||
29 | in order to identify a chip. | ||
30 | */ | ||
31 | #define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info) | ||
32 | |||
33 | #endif /* _IOWARRIOR_H_ */ | ||
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h new file mode 100644 index 000000000000..6bac8faacbc6 --- /dev/null +++ b/include/linux/usb/quirks.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * This file holds the definitions of quirks found in USB devices. | ||
3 | * Only quirks that affect the whole device, not an interface, | ||
4 | * belong here. | ||
5 | */ | ||
6 | |||
7 | /* device must not be autosuspended */ | ||
8 | #define USB_QUIRK_NO_AUTOSUSPEND 0x00000001 | ||
9 | |||
10 | /* string descriptors must not be fetched using a 255-byte read */ | ||
11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index d94e2683be52..441b877bf150 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1,5 +1,45 @@ | |||
1 | /* | 1 | /* |
2 | * Video for Linux Two | 2 | * Video for Linux Two header file |
3 | * | ||
4 | * Copyright (C) 1999-2007 the contributors | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * Alternatively you can redistribute this file under the terms of the | ||
17 | * BSD license as stated below: | ||
18 | * | ||
19 | * Redistribution and use in source and binary forms, with or without | ||
20 | * modification, are permitted provided that the following conditions | ||
21 | * are met: | ||
22 | * 1. Redistributions of source code must retain the above copyright | ||
23 | * notice, this list of conditions and the following disclaimer. | ||
24 | * 2. Redistributions in binary form must reproduce the above copyright | ||
25 | * notice, this list of conditions and the following disclaimer in | ||
26 | * the documentation and/or other materials provided with the | ||
27 | * distribution. | ||
28 | * 3. The names of its contributors may not be used to endorse or promote | ||
29 | * products derived from this software without specific prior written | ||
30 | * permission. | ||
31 | * | ||
32 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
33 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
34 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
35 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
36 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
37 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
38 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
39 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
40 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
3 | * | 43 | * |
4 | * Header file for v4l or V4L2 drivers and applications | 44 | * Header file for v4l or V4L2 drivers and applications |
5 | * with public API. | 45 | * with public API. |
@@ -8,8 +48,9 @@ | |||
8 | * | 48 | * |
9 | * See http://linuxtv.org for more info | 49 | * See http://linuxtv.org for more info |
10 | * | 50 | * |
11 | * Author: Bill Dirks <bdirks@pacbell.net> | 51 | * Author: Bill Dirks <bill@thedirks.org> |
12 | * Justin Schoeman | 52 | * Justin Schoeman |
53 | * Hans Verkuil <hverkuil@xs4all.nl> | ||
13 | * et al. | 54 | * et al. |
14 | */ | 55 | */ |
15 | #ifndef __LINUX_VIDEODEV2_H | 56 | #ifndef __LINUX_VIDEODEV2_H |
@@ -90,11 +131,8 @@ enum v4l2_buf_type { | |||
90 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, | 131 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, |
91 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, | 132 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, |
92 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, | 133 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, |
93 | #if 1 | ||
94 | /* Experimental Sliced VBI */ | ||
95 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, | 134 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, |
96 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, | 135 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, |
97 | #endif | ||
98 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 136 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
99 | }; | 137 | }; |
100 | 138 | ||
@@ -186,10 +224,8 @@ struct v4l2_capability | |||
186 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ | 224 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ |
187 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ | 225 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ |
188 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ | 226 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ |
189 | #if 1 | ||
190 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ | 227 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ |
191 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ | 228 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ |
192 | #endif | ||
193 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | 229 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ |
194 | 230 | ||
195 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 231 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
@@ -1157,6 +1193,55 @@ struct v4l2_audioout | |||
1157 | }; | 1193 | }; |
1158 | 1194 | ||
1159 | /* | 1195 | /* |
1196 | * M P E G S E R V I C E S | ||
1197 | * | ||
1198 | * NOTE: EXPERIMENTAL API | ||
1199 | */ | ||
1200 | #if 1 | ||
1201 | #define V4L2_ENC_IDX_FRAME_I (0) | ||
1202 | #define V4L2_ENC_IDX_FRAME_P (1) | ||
1203 | #define V4L2_ENC_IDX_FRAME_B (2) | ||
1204 | #define V4L2_ENC_IDX_FRAME_MASK (0xf) | ||
1205 | |||
1206 | struct v4l2_enc_idx_entry { | ||
1207 | __u64 offset; | ||
1208 | __u64 pts; | ||
1209 | __u32 length; | ||
1210 | __u32 flags; | ||
1211 | __u32 reserved[2]; | ||
1212 | }; | ||
1213 | |||
1214 | #define V4L2_ENC_IDX_ENTRIES (64) | ||
1215 | struct v4l2_enc_idx { | ||
1216 | __u32 entries; | ||
1217 | __u32 entries_cap; | ||
1218 | __u32 reserved[4]; | ||
1219 | struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES]; | ||
1220 | }; | ||
1221 | |||
1222 | |||
1223 | #define V4L2_ENC_CMD_START (0) | ||
1224 | #define V4L2_ENC_CMD_STOP (1) | ||
1225 | #define V4L2_ENC_CMD_PAUSE (2) | ||
1226 | #define V4L2_ENC_CMD_RESUME (3) | ||
1227 | |||
1228 | /* Flags for V4L2_ENC_CMD_STOP */ | ||
1229 | #define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0) | ||
1230 | |||
1231 | struct v4l2_encoder_cmd { | ||
1232 | __u32 cmd; | ||
1233 | __u32 flags; | ||
1234 | union { | ||
1235 | struct { | ||
1236 | __u32 data[8]; | ||
1237 | } raw; | ||
1238 | }; | ||
1239 | }; | ||
1240 | |||
1241 | #endif | ||
1242 | |||
1243 | |||
1244 | /* | ||
1160 | * D A T A S E R V I C E S ( V B I ) | 1245 | * D A T A S E R V I C E S ( V B I ) |
1161 | * | 1246 | * |
1162 | * Data services API by Michael Schimek | 1247 | * Data services API by Michael Schimek |
@@ -1179,7 +1264,6 @@ struct v4l2_vbi_format | |||
1179 | #define V4L2_VBI_UNSYNC (1<< 0) | 1264 | #define V4L2_VBI_UNSYNC (1<< 0) |
1180 | #define V4L2_VBI_INTERLACED (1<< 1) | 1265 | #define V4L2_VBI_INTERLACED (1<< 1) |
1181 | 1266 | ||
1182 | #if 1 | ||
1183 | /* Sliced VBI | 1267 | /* Sliced VBI |
1184 | * | 1268 | * |
1185 | * This implements is a proposal V4L2 API to allow SLICED VBI | 1269 | * This implements is a proposal V4L2 API to allow SLICED VBI |
@@ -1212,7 +1296,6 @@ struct v4l2_sliced_vbi_format | |||
1212 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) | 1296 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) |
1213 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) | 1297 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) |
1214 | 1298 | ||
1215 | |||
1216 | struct v4l2_sliced_vbi_cap | 1299 | struct v4l2_sliced_vbi_cap |
1217 | { | 1300 | { |
1218 | __u16 service_set; | 1301 | __u16 service_set; |
@@ -1233,7 +1316,6 @@ struct v4l2_sliced_vbi_data | |||
1233 | __u32 reserved; /* must be 0 */ | 1316 | __u32 reserved; /* must be 0 */ |
1234 | __u8 data[48]; | 1317 | __u8 data[48]; |
1235 | }; | 1318 | }; |
1236 | #endif | ||
1237 | 1319 | ||
1238 | /* | 1320 | /* |
1239 | * A G G R E G A T E S T R U C T U R E S | 1321 | * A G G R E G A T E S T R U C T U R E S |
@@ -1249,9 +1331,7 @@ struct v4l2_format | |||
1249 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE | 1331 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE |
1250 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY | 1332 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY |
1251 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE | 1333 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE |
1252 | #if 1 | ||
1253 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE | 1334 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE |
1254 | #endif | ||
1255 | __u8 raw_data[200]; // user-defined | 1335 | __u8 raw_data[200]; // user-defined |
1256 | } fmt; | 1336 | } fmt; |
1257 | }; | 1337 | }; |
@@ -1271,6 +1351,25 @@ struct v4l2_streamparm | |||
1271 | }; | 1351 | }; |
1272 | 1352 | ||
1273 | /* | 1353 | /* |
1354 | * A D V A N C E D D E B U G G I N G | ||
1355 | * | ||
1356 | * NOTE: EXPERIMENTAL API | ||
1357 | */ | ||
1358 | |||
1359 | /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ | ||
1360 | |||
1361 | #define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */ | ||
1362 | #define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver ID */ | ||
1363 | #define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */ | ||
1364 | |||
1365 | struct v4l2_register { | ||
1366 | __u32 match_type; /* Match type */ | ||
1367 | __u32 match_chip; /* Match this chip, meaning determined by match_type */ | ||
1368 | __u64 reg; | ||
1369 | __u64 val; | ||
1370 | }; | ||
1371 | |||
1372 | /* | ||
1274 | * I O C T L C O D E S F O R V I D E O D E V I C E S | 1373 | * I O C T L C O D E S F O R V I D E O D E V I C E S |
1275 | * | 1374 | * |
1276 | */ | 1375 | */ |
@@ -1328,9 +1427,7 @@ struct v4l2_streamparm | |||
1328 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) | 1427 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) |
1329 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) | 1428 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) |
1330 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) | 1429 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) |
1331 | #if 1 | ||
1332 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR ('V', 69, struct v4l2_sliced_vbi_cap) | 1430 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR ('V', 69, struct v4l2_sliced_vbi_cap) |
1333 | #endif | ||
1334 | #define VIDIOC_LOG_STATUS _IO ('V', 70) | 1431 | #define VIDIOC_LOG_STATUS _IO ('V', 70) |
1335 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) | 1432 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) |
1336 | #define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) | 1433 | #define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) |
@@ -1338,6 +1435,13 @@ struct v4l2_streamparm | |||
1338 | #if 1 | 1435 | #if 1 |
1339 | #define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) | 1436 | #define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) |
1340 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) | 1437 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) |
1438 | #define VIDIOC_G_ENC_INDEX _IOR ('V', 76, struct v4l2_enc_idx) | ||
1439 | #define VIDIOC_ENCODER_CMD _IOWR ('V', 77, struct v4l2_encoder_cmd) | ||
1440 | #define VIDIOC_TRY_ENCODER_CMD _IOWR ('V', 78, struct v4l2_encoder_cmd) | ||
1441 | |||
1442 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | ||
1443 | #define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register) | ||
1444 | #define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register) | ||
1341 | #endif | 1445 | #endif |
1342 | 1446 | ||
1343 | #ifdef __OLD_VIDIOC_ | 1447 | #ifdef __OLD_VIDIOC_ |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index 7c269f4992eb..447c52beb691 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -334,7 +334,7 @@ | |||
334 | * separate range because of collisions with other tools such as | 334 | * separate range because of collisions with other tools such as |
335 | * 'mii-tool'. | 335 | * 'mii-tool'. |
336 | * We now have 32 commands, so a bit more space ;-). | 336 | * We now have 32 commands, so a bit more space ;-). |
337 | * Also, all 'odd' commands are only usable by root and don't return the | 337 | * Also, all 'even' commands are only usable by root and don't return the |
338 | * content of ifr/iwr to user (but you are not obliged to use the set/get | 338 | * content of ifr/iwr to user (but you are not obliged to use the set/get |
339 | * convention, just use every other two command). More details in iwpriv.c. | 339 | * convention, just use every other two command). More details in iwpriv.c. |
340 | * And I repeat : you are not forced to use them with iwpriv, but you | 340 | * And I repeat : you are not forced to use them with iwpriv, but you |
@@ -348,7 +348,7 @@ | |||
348 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ | 348 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ |
349 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) | 349 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) |
350 | 350 | ||
351 | /* Even : get (world access), odd : set (root access) */ | 351 | /* Odd : get (world access), even : set (root access) */ |
352 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) | 352 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) |
353 | #define IW_IS_GET(cmd) ((cmd) & 0x1) | 353 | #define IW_IS_GET(cmd) ((cmd) & 0x1) |
354 | 354 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index fc35e6bdfb93..0c78f7f4a976 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -84,7 +84,7 @@ static inline void wait_on_inode(struct inode *inode) | |||
84 | int wakeup_pdflush(long nr_pages); | 84 | int wakeup_pdflush(long nr_pages); |
85 | void laptop_io_completion(void); | 85 | void laptop_io_completion(void); |
86 | void laptop_sync_completion(void); | 86 | void laptop_sync_completion(void); |
87 | void throttle_vm_writeout(void); | 87 | void throttle_vm_writeout(gfp_t gfp_mask); |
88 | 88 | ||
89 | /* These are exported to sysctl. */ | 89 | /* These are exported to sysctl. */ |
90 | extern int dirty_background_ratio; | 90 | extern int dirty_background_ratio; |
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h index ecad55bf0162..d758a52cf556 100644 --- a/include/media/cx2341x.h +++ b/include/media/cx2341x.h | |||
@@ -57,7 +57,6 @@ struct cx2341x_mpeg_params { | |||
57 | u16 video_b_frames; | 57 | u16 video_b_frames; |
58 | u16 video_gop_size; | 58 | u16 video_gop_size; |
59 | u16 video_gop_closure; | 59 | u16 video_gop_closure; |
60 | u16 video_pulldown; | ||
61 | enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; | 60 | enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; |
62 | u32 video_bitrate; | 61 | u32 video_bitrate; |
63 | u32 video_bitrate_peak; | 62 | u32 video_bitrate_peak; |
@@ -121,8 +120,6 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); | |||
121 | #define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 | 120 | #define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 |
122 | #define CX2341X_DEC_EXTRACT_VBI 0x19 | 121 | #define CX2341X_DEC_EXTRACT_VBI 0x19 |
123 | #define CX2341X_DEC_SET_DECODER_SOURCE 0x1a | 122 | #define CX2341X_DEC_SET_DECODER_SOURCE 0x1a |
124 | #define CX2341X_DEC_SET_AUDIO_OUTPUT 0x1b | ||
125 | #define CX2341X_DEC_SET_AV_DELAY 0x1c | ||
126 | #define CX2341X_DEC_SET_PREBUFFERING 0x1e | 123 | #define CX2341X_DEC_SET_PREBUFFERING 0x1e |
127 | 124 | ||
128 | /* MPEG encoder API */ | 125 | /* MPEG encoder API */ |
@@ -141,7 +138,6 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); | |||
141 | #define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d | 138 | #define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d |
142 | #define CX2341X_ENC_SET_CORING_LEVELS 0x9f | 139 | #define CX2341X_ENC_SET_CORING_LEVELS 0x9f |
143 | #define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1 | 140 | #define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1 |
144 | #define CX2341X_ENC_SET_3_2_PULLDOWN 0xb1 | ||
145 | #define CX2341X_ENC_SET_VBI_LINE 0xb7 | 141 | #define CX2341X_ENC_SET_VBI_LINE 0xb7 |
146 | #define CX2341X_ENC_SET_STREAM_TYPE 0xb9 | 142 | #define CX2341X_ENC_SET_STREAM_TYPE 0xb9 |
147 | #define CX2341X_ENC_SET_OUTPUT_PORT 0xbb | 143 | #define CX2341X_ENC_SET_OUTPUT_PORT 0xbb |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 4bb0ad810179..9807a7c15830 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -36,6 +36,11 @@ | |||
36 | #define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \ | 36 | #define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \ |
37 | ? tab[code] : KEY_RESERVED) | 37 | ? tab[code] : KEY_RESERVED) |
38 | 38 | ||
39 | #define RC5_START(x) (((x)>>12)&3) | ||
40 | #define RC5_TOGGLE(x) (((x)>>11)&1) | ||
41 | #define RC5_ADDR(x) (((x)>>6)&31) | ||
42 | #define RC5_INSTR(x) ((x)&63) | ||
43 | |||
39 | struct ir_input_state { | 44 | struct ir_input_state { |
40 | /* configuration */ | 45 | /* configuration */ |
41 | int ir_type; | 46 | int ir_type; |
@@ -48,6 +53,40 @@ struct ir_input_state { | |||
48 | int keypressed; /* current state */ | 53 | int keypressed; /* current state */ |
49 | }; | 54 | }; |
50 | 55 | ||
56 | /* this was saa7134_ir and bttv_ir, moved here for | ||
57 | * rc5 decoding. */ | ||
58 | struct card_ir { | ||
59 | struct input_dev *dev; | ||
60 | struct ir_input_state ir; | ||
61 | char name[32]; | ||
62 | char phys[32]; | ||
63 | |||
64 | /* Usual gpio signalling */ | ||
65 | |||
66 | u32 mask_keycode; | ||
67 | u32 mask_keydown; | ||
68 | u32 mask_keyup; | ||
69 | u32 polling; | ||
70 | u32 last_gpio; | ||
71 | int shift_by; | ||
72 | int start; // What should RC5_START() be | ||
73 | int addr; // What RC5_ADDR() should be. | ||
74 | int rc5_key_timeout; | ||
75 | int rc5_remote_gap; | ||
76 | struct work_struct work; | ||
77 | struct timer_list timer; | ||
78 | |||
79 | /* RC5 gpio */ | ||
80 | u32 rc5_gpio; | ||
81 | struct timer_list timer_end; /* timer_end for code completion */ | ||
82 | struct timer_list timer_keyup; /* timer_end for key release */ | ||
83 | u32 last_rc5; /* last good rc5 code */ | ||
84 | u32 last_bit; /* last raw bit seen */ | ||
85 | u32 code; /* raw code under construction */ | ||
86 | struct timeval base_time; /* time of last seen code */ | ||
87 | int active; /* building raw code */ | ||
88 | }; | ||
89 | |||
51 | void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, | 90 | void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, |
52 | int ir_type, IR_KEYTAB_TYPE *ir_codes); | 91 | int ir_type, IR_KEYTAB_TYPE *ir_codes); |
53 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); | 92 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); |
@@ -58,6 +97,10 @@ int ir_dump_samples(u32 *samples, int count); | |||
58 | int ir_decode_biphase(u32 *samples, int count, int low, int high); | 97 | int ir_decode_biphase(u32 *samples, int count, int low, int high); |
59 | int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); | 98 | int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); |
60 | 99 | ||
100 | u32 ir_rc5_decode(unsigned int code); | ||
101 | void ir_rc5_timer_end(unsigned long data); | ||
102 | void ir_rc5_timer_keyup(unsigned long data); | ||
103 | |||
61 | /* Keymaps to be used by other modules */ | 104 | /* Keymaps to be used by other modules */ |
62 | 105 | ||
63 | extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; | 106 | extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; |
@@ -94,6 +137,9 @@ extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE]; | |||
94 | extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE]; | 137 | extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE]; |
95 | extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE]; | 138 | extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE]; |
96 | extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; | 139 | extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; |
140 | extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE]; | ||
141 | extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; | ||
142 | extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; | ||
97 | 143 | ||
98 | #endif | 144 | #endif |
99 | 145 | ||
diff --git a/include/media/saa7115.h b/include/media/saa7115.h index 9f0e2285a099..f677dfb9d373 100644 --- a/include/media/saa7115.h +++ b/include/media/saa7115.h | |||
@@ -42,5 +42,8 @@ | |||
42 | #define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */ | 42 | #define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */ |
43 | #define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */ | 43 | #define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */ |
44 | 44 | ||
45 | #define SAA7115_IPORT_ON 1 | ||
46 | #define SAA7115_IPORT_OFF 0 | ||
47 | |||
45 | #endif | 48 | #endif |
46 | 49 | ||
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 91b19921f958..6eaeec98ed89 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -64,9 +64,6 @@ | |||
64 | /* Prints the ioctl in a human-readable format */ | 64 | /* Prints the ioctl in a human-readable format */ |
65 | extern void v4l_printk_ioctl(unsigned int cmd); | 65 | extern void v4l_printk_ioctl(unsigned int cmd); |
66 | 66 | ||
67 | /* Prints the ioctl and arg in a human-readable format */ | ||
68 | extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg); | ||
69 | |||
70 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ | 67 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ |
71 | #define v4l_print_ioctl(name, cmd) \ | 68 | #define v4l_print_ioctl(name, cmd) \ |
72 | do { \ | 69 | do { \ |
@@ -97,14 +94,15 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); | |||
97 | 94 | ||
98 | /* ------------------------------------------------------------------------- */ | 95 | /* ------------------------------------------------------------------------- */ |
99 | 96 | ||
100 | /* Internal ioctls */ | 97 | /* Register/chip ident helper function */ |
101 | 98 | ||
102 | /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ | 99 | struct i2c_client; /* forward reference */ |
103 | struct v4l2_register { | 100 | int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id); |
104 | u32 i2c_id; /* I2C driver ID of the I2C chip. 0 for the I2C adapter. */ | 101 | int v4l2_chip_match_host(u32 id_type, u32 chip_id); |
105 | unsigned long reg; | 102 | |
106 | u32 val; | 103 | /* ------------------------------------------------------------------------- */ |
107 | }; | 104 | |
105 | /* Internal ioctls */ | ||
108 | 106 | ||
109 | /* VIDIOC_INT_DECODE_VBI_LINE */ | 107 | /* VIDIOC_INT_DECODE_VBI_LINE */ |
110 | struct v4l2_decode_vbi_line { | 108 | struct v4l2_decode_vbi_line { |
@@ -175,9 +173,7 @@ enum v4l2_chip_ident { | |||
175 | Replacement of TUNER_SET_STANDBY. */ | 173 | Replacement of TUNER_SET_STANDBY. */ |
176 | #define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) | 174 | #define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) |
177 | 175 | ||
178 | /* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | 176 | /* 100, 101 used by VIDIOC_DBG_[SG]_REGISTER */ |
179 | #define VIDIOC_INT_S_REGISTER _IOW ('d', 100, struct v4l2_register) | ||
180 | #define VIDIOC_INT_G_REGISTER _IOWR('d', 101, struct v4l2_register) | ||
181 | 177 | ||
182 | /* Generic reset command. The argument selects which subsystems to reset. | 178 | /* Generic reset command. The argument selects which subsystems to reset. |
183 | Passing 0 will always reset the whole chip. */ | 179 | Passing 0 will always reset the whole chip. */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index fb96472a1bd3..1dd3d3239ecf 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -271,6 +271,12 @@ struct video_device | |||
271 | struct v4l2_jpegcompression *a); | 271 | struct v4l2_jpegcompression *a); |
272 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, | 272 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, |
273 | struct v4l2_jpegcompression *a); | 273 | struct v4l2_jpegcompression *a); |
274 | int (*vidioc_g_enc_index) (struct file *file, void *fh, | ||
275 | struct v4l2_enc_idx *a); | ||
276 | int (*vidioc_encoder_cmd) (struct file *file, void *fh, | ||
277 | struct v4l2_encoder_cmd *a); | ||
278 | int (*vidioc_try_encoder_cmd) (struct file *file, void *fh, | ||
279 | struct v4l2_encoder_cmd *a); | ||
274 | 280 | ||
275 | /* Stream type-dependent parameter ioctls */ | 281 | /* Stream type-dependent parameter ioctls */ |
276 | int (*vidioc_g_parm) (struct file *file, void *fh, | 282 | int (*vidioc_g_parm) (struct file *file, void *fh, |
@@ -296,6 +302,15 @@ struct video_device | |||
296 | int (*vidioc_log_status) (struct file *file, void *fh); | 302 | int (*vidioc_log_status) (struct file *file, void *fh); |
297 | 303 | ||
298 | 304 | ||
305 | /* Debugging ioctls */ | ||
306 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
307 | int (*vidioc_g_register) (struct file *file, void *fh, | ||
308 | struct v4l2_register *reg); | ||
309 | int (*vidioc_s_register) (struct file *file, void *fh, | ||
310 | struct v4l2_register *reg); | ||
311 | #endif | ||
312 | |||
313 | |||
299 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | 314 | #ifdef OBSOLETE_OWNER /* to be removed soon */ |
300 | /* obsolete -- fops->owner is used instead */ | 315 | /* obsolete -- fops->owner is used instead */ |
301 | struct module *owner; | 316 | struct module *owner; |
diff --git a/include/media/video-buf.h b/include/media/video-buf.h index 1115a256969f..d6f079476db3 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h | |||
@@ -78,6 +78,9 @@ struct videobuf_dmabuf { | |||
78 | /* for kernel buffers */ | 78 | /* for kernel buffers */ |
79 | void *vmalloc; | 79 | void *vmalloc; |
80 | 80 | ||
81 | /* Stores the userspace pointer to vmalloc area */ | ||
82 | void *varea; | ||
83 | |||
81 | /* for overlay buffers (pci-pci dma) */ | 84 | /* for overlay buffers (pci-pci dma) */ |
82 | dma_addr_t bus_addr; | 85 | dma_addr_t bus_addr; |
83 | 86 | ||
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index f7be1ac73601..09a2532699b2 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -66,7 +66,7 @@ struct inet_hashinfo; | |||
66 | struct inet_timewait_death_row { | 66 | struct inet_timewait_death_row { |
67 | /* Short-time timewait calendar */ | 67 | /* Short-time timewait calendar */ |
68 | int twcal_hand; | 68 | int twcal_hand; |
69 | int twcal_jiffie; | 69 | unsigned long twcal_jiffie; |
70 | struct timer_list twcal_timer; | 70 | struct timer_list twcal_timer; |
71 | struct hlist_head twcal_row[INET_TWDR_RECYCLE_SLOTS]; | 71 | struct hlist_head twcal_row[INET_TWDR_RECYCLE_SLOTS]; |
72 | 72 | ||
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 1cb0607fcbb9..89fe534045f1 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -113,4 +113,20 @@ do { if(!(expr)) { \ | |||
113 | #define IAS_IRCOMM_ID 0x2343 | 113 | #define IAS_IRCOMM_ID 0x2343 |
114 | #define IAS_IRLPT_ID 0x9876 | 114 | #define IAS_IRLPT_ID 0x9876 |
115 | 115 | ||
116 | struct net_device; | ||
117 | struct packet_type; | ||
118 | |||
119 | extern void irda_proc_register(void); | ||
120 | extern void irda_proc_unregister(void); | ||
121 | |||
122 | extern int irda_sysctl_register(void); | ||
123 | extern void irda_sysctl_unregister(void); | ||
124 | |||
125 | extern int irsock_init(void); | ||
126 | extern void irsock_cleanup(void); | ||
127 | |||
128 | extern int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, | ||
129 | struct packet_type *ptype, | ||
130 | struct net_device *orig_dev); | ||
131 | |||
116 | #endif /* NET_IRDA_H */ | 132 | #endif /* NET_IRDA_H */ |
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h index 7fdc72c01356..85634e1865c3 100644 --- a/include/net/netfilter/nf_conntrack_core.h +++ b/include/net/netfilter/nf_conntrack_core.h | |||
@@ -64,7 +64,7 @@ static inline int nf_conntrack_confirm(struct sk_buff **pskb) | |||
64 | int ret = NF_ACCEPT; | 64 | int ret = NF_ACCEPT; |
65 | 65 | ||
66 | if (ct) { | 66 | if (ct) { |
67 | if (!nf_ct_is_confirmed(ct)) | 67 | if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) |
68 | ret = __nf_conntrack_confirm(pskb); | 68 | ret = __nf_conntrack_confirm(pskb); |
69 | nf_ct_deliver_cached_events(ct); | 69 | nf_ct_deliver_cached_events(ct); |
70 | } | 70 | } |
diff --git a/include/net/sock.h b/include/net/sock.h index 03684e702d13..2c7d60ca3548 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1278,7 +1278,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1278 | 1278 | ||
1279 | static inline gfp_t gfp_any(void) | 1279 | static inline gfp_t gfp_any(void) |
1280 | { | 1280 | { |
1281 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; | 1281 | return in_atomic() ? GFP_ATOMIC : GFP_KERNEL; |
1282 | } | 1282 | } |
1283 | 1283 | ||
1284 | static inline long sock_rcvtimeo(const struct sock *sk, int noblock) | 1284 | static inline long sock_rcvtimeo(const struct sock *sk, int noblock) |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 92a1fc46ea59..5a00aa85b756 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -988,8 +988,9 @@ extern int xfrm_policy_walk(u8 type, int (*func)(struct xfrm_policy *, int, int, | |||
988 | int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); | 988 | int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); |
989 | struct xfrm_policy *xfrm_policy_bysel_ctx(u8 type, int dir, | 989 | struct xfrm_policy *xfrm_policy_bysel_ctx(u8 type, int dir, |
990 | struct xfrm_selector *sel, | 990 | struct xfrm_selector *sel, |
991 | struct xfrm_sec_ctx *ctx, int delete); | 991 | struct xfrm_sec_ctx *ctx, int delete, |
992 | struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete); | 992 | int *err); |
993 | struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete, int *err); | ||
993 | void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); | 994 | void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); |
994 | u32 xfrm_get_acqseq(void); | 995 | u32 xfrm_get_acqseq(void); |
995 | void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi); | 996 | void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi); |
diff --git a/include/sound/version.h b/include/sound/version.h index a9ba7ee69939..5f7275000102 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h. Generated by alsa/ksync script. */ |
2 | #define CONFIG_SND_VERSION "1.0.14rc2" | 2 | #define CONFIG_SND_VERSION "1.0.14rc3" |
3 | #define CONFIG_SND_DATE " (Wed Feb 14 07:42:13 2007 UTC)" | 3 | #define CONFIG_SND_DATE " (Tue Mar 06 13:10:00 2007 UTC)" |