diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-09 19:06:04 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-09 19:06:04 -0500 |
commit | 31e7f1ff3c5d39a70da85f7d81a1ab1f4e64fa97 (patch) | |
tree | a6cb8f14b1182e5dce55d13e52c1182a8c7e0402 /include | |
parent | fca5dcd4835ed09bb1a48a355344aff7a25c76e0 (diff) | |
parent | 6730c3c14421b7c924d06e31bb66e0adad225547 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'include')
83 files changed, 815 insertions, 1235 deletions
diff --git a/include/asm-arm/arch-realview/entry-macro.S b/include/asm-arm/arch-realview/entry-macro.S index 2712ba77bb3a..6288fad0dc41 100644 --- a/include/asm-arm/arch-realview/entry-macro.S +++ b/include/asm-arm/arch-realview/entry-macro.S | |||
@@ -47,3 +47,28 @@ | |||
47 | cmpcs \irqnr, \irqnr | 47 | cmpcs \irqnr, \irqnr |
48 | 48 | ||
49 | .endm | 49 | .endm |
50 | |||
51 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
52 | * register) is preserved from the macro above. | ||
53 | * If there is an IPI, we immediately signal end of interrupt on the | ||
54 | * controller, since this requires the original irqstat value which | ||
55 | * we won't easily be able to recreate later. | ||
56 | */ | ||
57 | |||
58 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
59 | bic \irqnr, \irqstat, #0x1c00 | ||
60 | cmp \irqnr, #16 | ||
61 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
62 | cmpcs \irqnr, \irqnr | ||
63 | .endm | ||
64 | |||
65 | /* As above, this assumes that irqstat and base are preserved.. */ | ||
66 | |||
67 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
68 | bic \irqnr, \irqstat, #0x1c00 | ||
69 | mov \tmp, #0 | ||
70 | cmp \irqnr, #29 | ||
71 | moveq \tmp, #1 | ||
72 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
73 | cmp \tmp, #0 | ||
74 | .endm | ||
diff --git a/include/asm-arm/arch-realview/irqs.h b/include/asm-arm/arch-realview/irqs.h index ff376494e5b1..c16223c9588d 100644 --- a/include/asm-arm/arch-realview/irqs.h +++ b/include/asm-arm/arch-realview/irqs.h | |||
@@ -21,6 +21,9 @@ | |||
21 | 21 | ||
22 | #include <asm/arch/platform.h> | 22 | #include <asm/arch/platform.h> |
23 | 23 | ||
24 | #define IRQ_LOCALTIMER 29 | ||
25 | #define IRQ_LOCALWDOG 30 | ||
26 | |||
24 | /* | 27 | /* |
25 | * IRQ interrupts definitions are the same the INT definitions | 28 | * IRQ interrupts definitions are the same the INT definitions |
26 | * held within platform.h | 29 | * held within platform.h |
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h index 4b6de13a6b9a..18d7c18b738c 100644 --- a/include/asm-arm/arch-realview/platform.h +++ b/include/asm-arm/arch-realview/platform.h | |||
@@ -203,8 +203,16 @@ | |||
203 | /* Reserved 0x1001A000 - 0x1001FFFF */ | 203 | /* Reserved 0x1001A000 - 0x1001FFFF */ |
204 | #define REALVIEW_CLCD_BASE 0x10020000 /* CLCD */ | 204 | #define REALVIEW_CLCD_BASE 0x10020000 /* CLCD */ |
205 | #define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */ | 205 | #define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */ |
206 | #ifndef CONFIG_REALVIEW_MPCORE | ||
206 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | 207 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ |
207 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | 208 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ |
209 | #else | ||
210 | #define REALVIEW_MPCORE_SCU_BASE 0x10100000 /* SCU registers */ | ||
211 | #define REALVIEW_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ | ||
212 | #define REALVIEW_TWD_BASE 0x10100700 | ||
213 | #define REALVIEW_TWD_SIZE 0x00000100 | ||
214 | #define REALVIEW_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */ | ||
215 | #endif | ||
208 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ | 216 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ |
209 | /* Reserved 0x10090000 - 0x100EFFFF */ | 217 | /* Reserved 0x10090000 - 0x100EFFFF */ |
210 | 218 | ||
@@ -265,6 +273,7 @@ | |||
265 | * Interrupts - bit assignment (primary) | 273 | * Interrupts - bit assignment (primary) |
266 | * ------------------------------------------------------------------------ | 274 | * ------------------------------------------------------------------------ |
267 | */ | 275 | */ |
276 | #ifndef CONFIG_REALVIEW_MPCORE | ||
268 | #define INT_WDOGINT 0 /* Watchdog timer */ | 277 | #define INT_WDOGINT 0 /* Watchdog timer */ |
269 | #define INT_SOFTINT 1 /* Software interrupt */ | 278 | #define INT_SOFTINT 1 /* Software interrupt */ |
270 | #define INT_COMMRx 2 /* Debug Comm Rx interrupt */ | 279 | #define INT_COMMRx 2 /* Debug Comm Rx interrupt */ |
@@ -297,6 +306,52 @@ | |||
297 | #define INT_USB 29 /* USB controller */ | 306 | #define INT_USB 29 /* USB controller */ |
298 | #define INT_TSPENINT 30 /* Touchscreen pen */ | 307 | #define INT_TSPENINT 30 /* Touchscreen pen */ |
299 | #define INT_TSKPADINT 31 /* Touchscreen keypad */ | 308 | #define INT_TSKPADINT 31 /* Touchscreen keypad */ |
309 | #else | ||
310 | #define INT_AACI 0 | ||
311 | #define INT_TIMERINT0_1 1 | ||
312 | #define INT_TIMERINT2_3 2 | ||
313 | #define INT_USB 3 | ||
314 | #define INT_UARTINT0 4 | ||
315 | #define INT_UARTINT1 5 | ||
316 | #define INT_RTCINT 6 | ||
317 | #define INT_KMI0 7 | ||
318 | #define INT_KMI1 8 | ||
319 | #define INT_ETH 9 | ||
320 | #define INT_EB_IRQ1 10 /* main GIC */ | ||
321 | #define INT_EB_IRQ2 11 /* tile GIC */ | ||
322 | #define INT_EB_FIQ1 12 /* main GIC */ | ||
323 | #define INT_EB_FIQ2 13 /* tile GIC */ | ||
324 | #define INT_MMCI0A 14 | ||
325 | #define INT_MMCI0B 15 | ||
326 | |||
327 | #define INT_PMU_CPU0 17 | ||
328 | #define INT_PMU_CPU1 18 | ||
329 | #define INT_PMU_CPU2 19 | ||
330 | #define INT_PMU_CPU3 20 | ||
331 | #define INT_PMU_SCU0 21 | ||
332 | #define INT_PMU_SCU1 22 | ||
333 | #define INT_PMU_SCU2 23 | ||
334 | #define INT_PMU_SCU3 24 | ||
335 | #define INT_PMU_SCU4 25 | ||
336 | #define INT_PMU_SCU5 26 | ||
337 | #define INT_PMU_SCU6 27 | ||
338 | #define INT_PMU_SCU7 28 | ||
339 | |||
340 | #define INT_L220_EVENT 29 | ||
341 | #define INT_L220_SLAVE 30 | ||
342 | #define INT_L220_DECODE 31 | ||
343 | |||
344 | #define INT_UARTINT2 -1 | ||
345 | #define INT_UARTINT3 -1 | ||
346 | #define INT_CLCDINT -1 | ||
347 | #define INT_DMAINT -1 | ||
348 | #define INT_WDOGINT -1 | ||
349 | #define INT_GPIOINT0 -1 | ||
350 | #define INT_GPIOINT1 -1 | ||
351 | #define INT_GPIOINT2 -1 | ||
352 | #define INT_SCIINT -1 | ||
353 | #define INT_SSPINT -1 | ||
354 | #endif | ||
300 | 355 | ||
301 | /* | 356 | /* |
302 | * Interrupt bit positions | 357 | * Interrupt bit positions |
diff --git a/include/asm-arm/arch-realview/smp.h b/include/asm-arm/arch-realview/smp.h new file mode 100644 index 000000000000..fc87783e8e8b --- /dev/null +++ b/include/asm-arm/arch-realview/smp.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef ASMARM_ARCH_SMP_H | ||
2 | #define ASMARM_ARCH_SMP_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #include <asm/hardware/gic.h> | ||
7 | |||
8 | #define hard_smp_processor_id() \ | ||
9 | ({ \ | ||
10 | unsigned int cpunum; \ | ||
11 | __asm__("mrc p15, 0, %0, c0, c0, 5" \ | ||
12 | : "=r" (cpunum)); \ | ||
13 | cpunum &= 0x0F; \ | ||
14 | }) | ||
15 | |||
16 | /* | ||
17 | * We use IRQ1 as the IPI | ||
18 | */ | ||
19 | static inline void smp_cross_call(cpumask_t callmap) | ||
20 | { | ||
21 | gic_raise_softirq(callmap, 1); | ||
22 | } | ||
23 | |||
24 | /* | ||
25 | * Do nothing on MPcore. | ||
26 | */ | ||
27 | static inline void smp_cross_call_done(cpumask_t callmap) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | #endif | ||
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index d7a4a8354fa9..ddd1578a7ee0 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -116,6 +116,8 @@ putstr(const char *ptr) | |||
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | #define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) | ||
120 | |||
119 | /* CONFIG_S3C2410_BOOT_WATCHDOG | 121 | /* CONFIG_S3C2410_BOOT_WATCHDOG |
120 | * | 122 | * |
121 | * Simple boot-time watchdog setup, to reboot the system if there is | 123 | * Simple boot-time watchdog setup, to reboot the system if there is |
@@ -126,8 +128,6 @@ putstr(const char *ptr) | |||
126 | 128 | ||
127 | #define WDOG_COUNT (0xff00) | 129 | #define WDOG_COUNT (0xff00) |
128 | 130 | ||
129 | #define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) | ||
130 | |||
131 | static inline void arch_decomp_wdog(void) | 131 | static inline void arch_decomp_wdog(void) |
132 | { | 132 | { |
133 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); | 133 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); |
@@ -145,6 +145,24 @@ static void arch_decomp_wdog_start(void) | |||
145 | #define arch_decomp_wdog() | 145 | #define arch_decomp_wdog() |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | #ifdef CONFIG_S3C2410_BOOT_ERROR_RESET | ||
149 | |||
150 | static void arch_decomp_error(const char *x) | ||
151 | { | ||
152 | putstr("\n\n"); | ||
153 | putstr(x); | ||
154 | putstr("\n\n -- System resetting\n"); | ||
155 | |||
156 | __raw_writel(0x4000, S3C2410_WTDAT); | ||
157 | __raw_writel(0x4000, S3C2410_WTCNT); | ||
158 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); | ||
159 | |||
160 | while(1); | ||
161 | } | ||
162 | |||
163 | #define arch_error arch_decomp_error | ||
164 | #endif | ||
165 | |||
148 | static void error(char *err); | 166 | static void error(char *err); |
149 | 167 | ||
150 | static void | 168 | static void |
diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h index 69a28f96bee2..f31ac92b6c7f 100644 --- a/include/asm-arm/assembler.h +++ b/include/asm-arm/assembler.h | |||
@@ -83,10 +83,13 @@ | |||
83 | * Save the current IRQ state and disable IRQs. Note that this macro | 83 | * Save the current IRQ state and disable IRQs. Note that this macro |
84 | * assumes FIQs are enabled, and that the processor is in SVC mode. | 84 | * assumes FIQs are enabled, and that the processor is in SVC mode. |
85 | */ | 85 | */ |
86 | .macro save_and_disable_irqs, oldcpsr, temp | 86 | .macro save_and_disable_irqs, oldcpsr |
87 | mrs \oldcpsr, cpsr | 87 | mrs \oldcpsr, cpsr |
88 | mov \temp, #PSR_I_BIT | MODE_SVC | 88 | #if __LINUX_ARM_ARCH__ >= 6 |
89 | msr cpsr_c, \temp | 89 | cpsid i |
90 | #else | ||
91 | msr cpsr_c, #PSR_I_BIT | MODE_SVC | ||
92 | #endif | ||
90 | .endm | 93 | .endm |
91 | 94 | ||
92 | /* | 95 | /* |
diff --git a/include/asm-arm/hardirq.h b/include/asm-arm/hardirq.h index e5ccb6b8ff83..1cbb173bf5b1 100644 --- a/include/asm-arm/hardirq.h +++ b/include/asm-arm/hardirq.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | typedef struct { | 9 | typedef struct { |
10 | unsigned int __softirq_pending; | 10 | unsigned int __softirq_pending; |
11 | unsigned int local_timer_irqs; | ||
11 | } ____cacheline_aligned irq_cpustat_t; | 12 | } ____cacheline_aligned irq_cpustat_t; |
12 | 13 | ||
13 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 14 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ |
diff --git a/include/asm-arm/hardware/arm_scu.h b/include/asm-arm/hardware/arm_scu.h new file mode 100644 index 000000000000..9903f60c84b7 --- /dev/null +++ b/include/asm-arm/hardware/arm_scu.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef ASMARM_HARDWARE_ARM_SCU_H | ||
2 | #define ASMARM_HARDWARE_ARM_SCU_H | ||
3 | |||
4 | /* | ||
5 | * SCU registers | ||
6 | */ | ||
7 | #define SCU_CTRL 0x00 | ||
8 | #define SCU_CONFIG 0x04 | ||
9 | #define SCU_CPU_STATUS 0x08 | ||
10 | #define SCU_INVALIDATE 0x0c | ||
11 | #define SCU_FPGA_REVISION 0x10 | ||
12 | |||
13 | #endif | ||
diff --git a/include/asm-arm/hardware/scoop.h b/include/asm-arm/hardware/scoop.h index a8f1013930e3..d37bf7443264 100644 --- a/include/asm-arm/hardware/scoop.h +++ b/include/asm-arm/hardware/scoop.h | |||
@@ -52,8 +52,14 @@ struct scoop_pcmcia_dev { | |||
52 | unsigned char keep_rd; | 52 | unsigned char keep_rd; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | extern int scoop_num; | 55 | struct scoop_pcmcia_config { |
56 | extern struct scoop_pcmcia_dev *scoop_devs; | 56 | struct scoop_pcmcia_dev *devs; |
57 | int num_devs; | ||
58 | void (*pcmcia_init)(void); | ||
59 | void (*power_ctrl)(struct device *scoop, unsigned short cpr, int nr); | ||
60 | }; | ||
61 | |||
62 | extern struct scoop_pcmcia_config *platform_scoop_config; | ||
57 | 63 | ||
58 | void reset_scoop(struct device *dev); | 64 | void reset_scoop(struct device *dev); |
59 | unsigned short set_scoop_gpio(struct device *dev, unsigned short bit); | 65 | unsigned short set_scoop_gpio(struct device *dev, unsigned short bit); |
diff --git a/include/asm-arm/mach/flash.h b/include/asm-arm/mach/flash.h index cd57436d9874..05b029ef6371 100644 --- a/include/asm-arm/mach/flash.h +++ b/include/asm-arm/mach/flash.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define ASMARM_MACH_FLASH_H | 11 | #define ASMARM_MACH_FLASH_H |
12 | 12 | ||
13 | struct mtd_partition; | 13 | struct mtd_partition; |
14 | struct mtd_info; | ||
14 | 15 | ||
15 | /* | 16 | /* |
16 | * map_name: the map probe function name | 17 | * map_name: the map probe function name |
@@ -19,6 +20,7 @@ struct mtd_partition; | |||
19 | * init: method called at driver/device initialisation | 20 | * init: method called at driver/device initialisation |
20 | * exit: method called at driver/device removal | 21 | * exit: method called at driver/device removal |
21 | * set_vpp: method called to enable or disable VPP | 22 | * set_vpp: method called to enable or disable VPP |
23 | * mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND | ||
22 | * parts: optional array of mtd_partitions for static partitioning | 24 | * parts: optional array of mtd_partitions for static partitioning |
23 | * nr_parts: number of mtd_partitions for static partitoning | 25 | * nr_parts: number of mtd_partitions for static partitoning |
24 | */ | 26 | */ |
@@ -29,6 +31,7 @@ struct flash_platform_data { | |||
29 | int (*init)(void); | 31 | int (*init)(void); |
30 | void (*exit)(void); | 32 | void (*exit)(void); |
31 | void (*set_vpp)(int on); | 33 | void (*set_vpp)(int on); |
34 | void (*mmcontrol)(struct mtd_info *mtd, int sync_read); | ||
32 | struct mtd_partition *parts; | 35 | struct mtd_partition *parts; |
33 | unsigned int nr_parts; | 36 | unsigned int nr_parts; |
34 | }; | 37 | }; |
diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index 551cd3c3093c..5a72e50ca9fc 100644 --- a/include/asm-arm/smp.h +++ b/include/asm-arm/smp.h | |||
@@ -37,6 +37,11 @@ struct seq_file; | |||
37 | extern void show_ipi_list(struct seq_file *p); | 37 | extern void show_ipi_list(struct seq_file *p); |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * Called from assembly code, this handles an IPI. | ||
41 | */ | ||
42 | asmlinkage void do_IPI(struct pt_regs *regs); | ||
43 | |||
44 | /* | ||
40 | * Move global data into per-processor storage. | 45 | * Move global data into per-processor storage. |
41 | */ | 46 | */ |
42 | extern void smp_store_cpu_info(unsigned int cpuid); | 47 | extern void smp_store_cpu_info(unsigned int cpuid); |
@@ -47,12 +52,23 @@ extern void smp_store_cpu_info(unsigned int cpuid); | |||
47 | extern void smp_cross_call(cpumask_t callmap); | 52 | extern void smp_cross_call(cpumask_t callmap); |
48 | 53 | ||
49 | /* | 54 | /* |
55 | * Broadcast a timer interrupt to the other CPUs. | ||
56 | */ | ||
57 | extern void smp_send_timer(void); | ||
58 | |||
59 | /* | ||
50 | * Boot a secondary CPU, and assign it the specified idle task. | 60 | * Boot a secondary CPU, and assign it the specified idle task. |
51 | * This also gives us the initial stack to use for this CPU. | 61 | * This also gives us the initial stack to use for this CPU. |
52 | */ | 62 | */ |
53 | extern int boot_secondary(unsigned int cpu, struct task_struct *); | 63 | extern int boot_secondary(unsigned int cpu, struct task_struct *); |
54 | 64 | ||
55 | /* | 65 | /* |
66 | * Called from platform specific assembly code, this is the | ||
67 | * secondary CPU entry point. | ||
68 | */ | ||
69 | asmlinkage void secondary_start_kernel(void); | ||
70 | |||
71 | /* | ||
56 | * Perform platform specific initialisation of the specified CPU. | 72 | * Perform platform specific initialisation of the specified CPU. |
57 | */ | 73 | */ |
58 | extern void platform_secondary_init(unsigned int cpu); | 74 | extern void platform_secondary_init(unsigned int cpu); |
@@ -76,4 +92,42 @@ extern void platform_cpu_die(unsigned int cpu); | |||
76 | extern int platform_cpu_kill(unsigned int cpu); | 92 | extern int platform_cpu_kill(unsigned int cpu); |
77 | extern void platform_cpu_enable(unsigned int cpu); | 93 | extern void platform_cpu_enable(unsigned int cpu); |
78 | 94 | ||
95 | #ifdef CONFIG_LOCAL_TIMERS | ||
96 | /* | ||
97 | * Setup a local timer interrupt for a CPU. | ||
98 | */ | ||
99 | extern void local_timer_setup(unsigned int cpu); | ||
100 | |||
101 | /* | ||
102 | * Stop a local timer interrupt. | ||
103 | */ | ||
104 | extern void local_timer_stop(unsigned int cpu); | ||
105 | |||
106 | /* | ||
107 | * Platform provides this to acknowledge a local timer IRQ | ||
108 | */ | ||
109 | extern int local_timer_ack(void); | ||
110 | |||
111 | #else | ||
112 | |||
113 | static inline void local_timer_setup(unsigned int cpu) | ||
114 | { | ||
115 | } | ||
116 | |||
117 | static inline void local_timer_stop(unsigned int cpu) | ||
118 | { | ||
119 | } | ||
120 | |||
121 | #endif | ||
122 | |||
123 | /* | ||
124 | * show local interrupt info | ||
125 | */ | ||
126 | extern void show_local_irqs(struct seq_file *); | ||
127 | |||
128 | /* | ||
129 | * Called from assembly, this is the local timer IRQ handler | ||
130 | */ | ||
131 | asmlinkage void do_local_timer(struct pt_regs *); | ||
132 | |||
79 | #endif /* ifndef __ASM_ARM_SMP_H */ | 133 | #endif /* ifndef __ASM_ARM_SMP_H */ |
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index ef436b9d06ad..9d41548b7fef 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h | |||
@@ -120,6 +120,7 @@ extern unsigned long max_low_pfn; | |||
120 | 120 | ||
121 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 121 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
122 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 122 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
123 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | ||
123 | 124 | ||
124 | typedef union ia64_va { | 125 | typedef union ia64_va { |
125 | struct { | 126 | struct { |
diff --git a/include/asm-m68k/kbio.h b/include/asm-m68k/kbio.h deleted file mode 100644 index e1fbf8fba3e8..000000000000 --- a/include/asm-m68k/kbio.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-sparc/kbio.h> | ||
diff --git a/include/asm-m68k/vuid_event.h b/include/asm-m68k/vuid_event.h deleted file mode 100644 index 52ecb521a395..000000000000 --- a/include/asm-m68k/vuid_event.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _M68K_VUID_EVENT_H | ||
2 | #define _M68K_VUID_EVENT_H | ||
3 | #include <asm-sparc/vuid_event.h> | ||
4 | #endif | ||
diff --git a/include/asm-powerpc/pmc.h b/include/asm-powerpc/pmc.h index 2f3c3fc2b796..5f41f3a2b293 100644 --- a/include/asm-powerpc/pmc.h +++ b/include/asm-powerpc/pmc.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/ptrace.h> | 22 | #include <asm/ptrace.h> |
23 | 23 | ||
24 | typedef void (*perf_irq_t)(struct pt_regs *); | 24 | typedef void (*perf_irq_t)(struct pt_regs *); |
25 | extern perf_irq_t perf_irq; | ||
25 | 26 | ||
26 | int reserve_pmc_hardware(perf_irq_t new_perf_irq); | 27 | int reserve_pmc_hardware(perf_irq_t new_perf_irq); |
27 | void release_pmc_hardware(void); | 28 | void release_pmc_hardware(void); |
diff --git a/include/asm-ppc/mpc83xx.h b/include/asm-ppc/mpc83xx.h index bb1b0576c947..ce212201db2a 100644 --- a/include/asm-ppc/mpc83xx.h +++ b/include/asm-ppc/mpc83xx.h | |||
@@ -107,6 +107,7 @@ enum ppc_sys_devices { | |||
107 | MPC83xx_SEC2, | 107 | MPC83xx_SEC2, |
108 | MPC83xx_USB2_DR, | 108 | MPC83xx_USB2_DR, |
109 | MPC83xx_USB2_MPH, | 109 | MPC83xx_USB2_MPH, |
110 | MPC83xx_MDIO, | ||
110 | }; | 111 | }; |
111 | 112 | ||
112 | #endif /* CONFIG_83xx */ | 113 | #endif /* CONFIG_83xx */ |
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 7127030ae162..23450ed4b571 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h | |||
@@ -129,7 +129,7 @@ void debug_set_level(debug_info_t* id, int new_level); | |||
129 | 129 | ||
130 | void debug_stop_all(void); | 130 | void debug_stop_all(void); |
131 | 131 | ||
132 | extern inline debug_entry_t* | 132 | static inline debug_entry_t* |
133 | debug_event(debug_info_t* id, int level, void* data, int length) | 133 | debug_event(debug_info_t* id, int level, void* data, int length) |
134 | { | 134 | { |
135 | if ((!id) || (level > id->level) || (id->pages_per_area == 0)) | 135 | if ((!id) || (level > id->level) || (id->pages_per_area == 0)) |
@@ -137,7 +137,7 @@ debug_event(debug_info_t* id, int level, void* data, int length) | |||
137 | return debug_event_common(id,level,data,length); | 137 | return debug_event_common(id,level,data,length); |
138 | } | 138 | } |
139 | 139 | ||
140 | extern inline debug_entry_t* | 140 | static inline debug_entry_t* |
141 | debug_int_event(debug_info_t* id, int level, unsigned int tag) | 141 | debug_int_event(debug_info_t* id, int level, unsigned int tag) |
142 | { | 142 | { |
143 | unsigned int t=tag; | 143 | unsigned int t=tag; |
@@ -146,7 +146,7 @@ debug_int_event(debug_info_t* id, int level, unsigned int tag) | |||
146 | return debug_event_common(id,level,&t,sizeof(unsigned int)); | 146 | return debug_event_common(id,level,&t,sizeof(unsigned int)); |
147 | } | 147 | } |
148 | 148 | ||
149 | extern inline debug_entry_t * | 149 | static inline debug_entry_t * |
150 | debug_long_event (debug_info_t* id, int level, unsigned long tag) | 150 | debug_long_event (debug_info_t* id, int level, unsigned long tag) |
151 | { | 151 | { |
152 | unsigned long t=tag; | 152 | unsigned long t=tag; |
@@ -155,7 +155,7 @@ debug_long_event (debug_info_t* id, int level, unsigned long tag) | |||
155 | return debug_event_common(id,level,&t,sizeof(unsigned long)); | 155 | return debug_event_common(id,level,&t,sizeof(unsigned long)); |
156 | } | 156 | } |
157 | 157 | ||
158 | extern inline debug_entry_t* | 158 | static inline debug_entry_t* |
159 | debug_text_event(debug_info_t* id, int level, const char* txt) | 159 | debug_text_event(debug_info_t* id, int level, const char* txt) |
160 | { | 160 | { |
161 | if ((!id) || (level > id->level) || (id->pages_per_area == 0)) | 161 | if ((!id) || (level > id->level) || (id->pages_per_area == 0)) |
@@ -168,7 +168,7 @@ debug_sprintf_event(debug_info_t* id,int level,char *string,...) | |||
168 | __attribute__ ((format(printf, 3, 4))); | 168 | __attribute__ ((format(printf, 3, 4))); |
169 | 169 | ||
170 | 170 | ||
171 | extern inline debug_entry_t* | 171 | static inline debug_entry_t* |
172 | debug_exception(debug_info_t* id, int level, void* data, int length) | 172 | debug_exception(debug_info_t* id, int level, void* data, int length) |
173 | { | 173 | { |
174 | if ((!id) || (level > id->level) || (id->pages_per_area == 0)) | 174 | if ((!id) || (level > id->level) || (id->pages_per_area == 0)) |
@@ -176,7 +176,7 @@ debug_exception(debug_info_t* id, int level, void* data, int length) | |||
176 | return debug_exception_common(id,level,data,length); | 176 | return debug_exception_common(id,level,data,length); |
177 | } | 177 | } |
178 | 178 | ||
179 | extern inline debug_entry_t* | 179 | static inline debug_entry_t* |
180 | debug_int_exception(debug_info_t* id, int level, unsigned int tag) | 180 | debug_int_exception(debug_info_t* id, int level, unsigned int tag) |
181 | { | 181 | { |
182 | unsigned int t=tag; | 182 | unsigned int t=tag; |
@@ -185,7 +185,7 @@ debug_int_exception(debug_info_t* id, int level, unsigned int tag) | |||
185 | return debug_exception_common(id,level,&t,sizeof(unsigned int)); | 185 | return debug_exception_common(id,level,&t,sizeof(unsigned int)); |
186 | } | 186 | } |
187 | 187 | ||
188 | extern inline debug_entry_t * | 188 | static inline debug_entry_t * |
189 | debug_long_exception (debug_info_t* id, int level, unsigned long tag) | 189 | debug_long_exception (debug_info_t* id, int level, unsigned long tag) |
190 | { | 190 | { |
191 | unsigned long t=tag; | 191 | unsigned long t=tag; |
@@ -194,7 +194,7 @@ debug_long_exception (debug_info_t* id, int level, unsigned long tag) | |||
194 | return debug_exception_common(id,level,&t,sizeof(unsigned long)); | 194 | return debug_exception_common(id,level,&t,sizeof(unsigned long)); |
195 | } | 195 | } |
196 | 196 | ||
197 | extern inline debug_entry_t* | 197 | static inline debug_entry_t* |
198 | debug_text_exception(debug_info_t* id, int level, const char* txt) | 198 | debug_text_exception(debug_info_t* id, int level, const char* txt) |
199 | { | 199 | { |
200 | if ((!id) || (level > id->level) || (id->pages_per_area == 0)) | 200 | if ((!id) || (level > id->level) || (id->pages_per_area == 0)) |
diff --git a/include/asm-s390/ebcdic.h b/include/asm-s390/ebcdic.h index 20e81e885821..4cbc336e4d60 100644 --- a/include/asm-s390/ebcdic.h +++ b/include/asm-s390/ebcdic.h | |||
@@ -21,7 +21,7 @@ extern __u8 _ebcasc[]; /* EBCDIC -> ASCII conversion table */ | |||
21 | extern __u8 _ebc_tolower[]; /* EBCDIC -> lowercase */ | 21 | extern __u8 _ebc_tolower[]; /* EBCDIC -> lowercase */ |
22 | extern __u8 _ebc_toupper[]; /* EBCDIC -> uppercase */ | 22 | extern __u8 _ebc_toupper[]; /* EBCDIC -> uppercase */ |
23 | 23 | ||
24 | extern __inline__ void | 24 | static inline void |
25 | codepage_convert(const __u8 *codepage, volatile __u8 * addr, unsigned long nr) | 25 | codepage_convert(const __u8 *codepage, volatile __u8 * addr, unsigned long nr) |
26 | { | 26 | { |
27 | if (nr-- <= 0) | 27 | if (nr-- <= 0) |
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index 8188fdc9884f..71f55eb2350a 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * Change virtual addresses to physical addresses and vv. | 24 | * Change virtual addresses to physical addresses and vv. |
25 | * These are pretty trivial | 25 | * These are pretty trivial |
26 | */ | 26 | */ |
27 | extern inline unsigned long virt_to_phys(volatile void * address) | 27 | static inline unsigned long virt_to_phys(volatile void * address) |
28 | { | 28 | { |
29 | unsigned long real_address; | 29 | unsigned long real_address; |
30 | __asm__ ( | 30 | __asm__ ( |
@@ -42,7 +42,7 @@ extern inline unsigned long virt_to_phys(volatile void * address) | |||
42 | return real_address; | 42 | return real_address; |
43 | } | 43 | } |
44 | 44 | ||
45 | extern inline void * phys_to_virt(unsigned long address) | 45 | static inline void * phys_to_virt(unsigned long address) |
46 | { | 46 | { |
47 | return __io_virt(address); | 47 | return __io_virt(address); |
48 | } | 48 | } |
@@ -54,7 +54,7 @@ extern inline void * phys_to_virt(unsigned long address) | |||
54 | 54 | ||
55 | extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); | 55 | extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); |
56 | 56 | ||
57 | extern inline void * ioremap (unsigned long offset, unsigned long size) | 57 | static inline void * ioremap (unsigned long offset, unsigned long size) |
58 | { | 58 | { |
59 | return __ioremap(offset, size, 0); | 59 | return __ioremap(offset, size, 0); |
60 | } | 60 | } |
@@ -64,7 +64,7 @@ extern inline void * ioremap (unsigned long offset, unsigned long size) | |||
64 | * it's useful if some control registers are in such an area and write combining | 64 | * it's useful if some control registers are in such an area and write combining |
65 | * or read caching is not desirable: | 65 | * or read caching is not desirable: |
66 | */ | 66 | */ |
67 | extern inline void * ioremap_nocache (unsigned long offset, unsigned long size) | 67 | static inline void * ioremap_nocache (unsigned long offset, unsigned long size) |
68 | { | 68 | { |
69 | return __ioremap(offset, size, 0); | 69 | return __ioremap(offset, size, 0); |
70 | } | 70 | } |
diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h index c6f51c9ce3ff..db0606c1abd4 100644 --- a/include/asm-s390/lowcore.h +++ b/include/asm-s390/lowcore.h | |||
@@ -346,7 +346,7 @@ struct _lowcore | |||
346 | #define S390_lowcore (*((struct _lowcore *) 0)) | 346 | #define S390_lowcore (*((struct _lowcore *) 0)) |
347 | extern struct _lowcore *lowcore_ptr[]; | 347 | extern struct _lowcore *lowcore_ptr[]; |
348 | 348 | ||
349 | extern __inline__ void set_prefix(__u32 address) | 349 | static inline void set_prefix(__u32 address) |
350 | { | 350 | { |
351 | __asm__ __volatile__ ("spx %0" : : "m" (address) : "memory" ); | 351 | __asm__ __volatile__ ("spx %0" : : "m" (address) : "memory" ); |
352 | } | 352 | } |
diff --git a/include/asm-s390/mmu_context.h b/include/asm-s390/mmu_context.h index 3a3bb3f2dad5..bcf24a873874 100644 --- a/include/asm-s390/mmu_context.h +++ b/include/asm-s390/mmu_context.h | |||
@@ -44,7 +44,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
44 | 44 | ||
45 | #define deactivate_mm(tsk,mm) do { } while (0) | 45 | #define deactivate_mm(tsk,mm) do { } while (0) |
46 | 46 | ||
47 | extern inline void activate_mm(struct mm_struct *prev, | 47 | static inline void activate_mm(struct mm_struct *prev, |
48 | struct mm_struct *next) | 48 | struct mm_struct *next) |
49 | { | 49 | { |
50 | switch_mm(prev, next, current); | 50 | switch_mm(prev, next, current); |
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 9be741bb1496..859b5e969826 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -319,7 +319,7 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
319 | * within a page table are directly modified. Thus, the following | 319 | * within a page table are directly modified. Thus, the following |
320 | * hook is made available. | 320 | * hook is made available. |
321 | */ | 321 | */ |
322 | extern inline void set_pte(pte_t *pteptr, pte_t pteval) | 322 | static inline void set_pte(pte_t *pteptr, pte_t pteval) |
323 | { | 323 | { |
324 | *pteptr = pteval; | 324 | *pteptr = pteval; |
325 | } | 325 | } |
@@ -330,63 +330,63 @@ extern inline void set_pte(pte_t *pteptr, pte_t pteval) | |||
330 | */ | 330 | */ |
331 | #ifndef __s390x__ | 331 | #ifndef __s390x__ |
332 | 332 | ||
333 | extern inline int pgd_present(pgd_t pgd) { return 1; } | 333 | static inline int pgd_present(pgd_t pgd) { return 1; } |
334 | extern inline int pgd_none(pgd_t pgd) { return 0; } | 334 | static inline int pgd_none(pgd_t pgd) { return 0; } |
335 | extern inline int pgd_bad(pgd_t pgd) { return 0; } | 335 | static inline int pgd_bad(pgd_t pgd) { return 0; } |
336 | 336 | ||
337 | extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _SEG_PRESENT; } | 337 | static inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _SEG_PRESENT; } |
338 | extern inline int pmd_none(pmd_t pmd) { return pmd_val(pmd) & _PAGE_TABLE_INV; } | 338 | static inline int pmd_none(pmd_t pmd) { return pmd_val(pmd) & _PAGE_TABLE_INV; } |
339 | extern inline int pmd_bad(pmd_t pmd) | 339 | static inline int pmd_bad(pmd_t pmd) |
340 | { | 340 | { |
341 | return (pmd_val(pmd) & (~PAGE_MASK & ~_PAGE_TABLE_INV)) != _PAGE_TABLE; | 341 | return (pmd_val(pmd) & (~PAGE_MASK & ~_PAGE_TABLE_INV)) != _PAGE_TABLE; |
342 | } | 342 | } |
343 | 343 | ||
344 | #else /* __s390x__ */ | 344 | #else /* __s390x__ */ |
345 | 345 | ||
346 | extern inline int pgd_present(pgd_t pgd) | 346 | static inline int pgd_present(pgd_t pgd) |
347 | { | 347 | { |
348 | return (pgd_val(pgd) & ~PAGE_MASK) == _PGD_ENTRY; | 348 | return (pgd_val(pgd) & ~PAGE_MASK) == _PGD_ENTRY; |
349 | } | 349 | } |
350 | 350 | ||
351 | extern inline int pgd_none(pgd_t pgd) | 351 | static inline int pgd_none(pgd_t pgd) |
352 | { | 352 | { |
353 | return pgd_val(pgd) & _PGD_ENTRY_INV; | 353 | return pgd_val(pgd) & _PGD_ENTRY_INV; |
354 | } | 354 | } |
355 | 355 | ||
356 | extern inline int pgd_bad(pgd_t pgd) | 356 | static inline int pgd_bad(pgd_t pgd) |
357 | { | 357 | { |
358 | return (pgd_val(pgd) & (~PAGE_MASK & ~_PGD_ENTRY_INV)) != _PGD_ENTRY; | 358 | return (pgd_val(pgd) & (~PAGE_MASK & ~_PGD_ENTRY_INV)) != _PGD_ENTRY; |
359 | } | 359 | } |
360 | 360 | ||
361 | extern inline int pmd_present(pmd_t pmd) | 361 | static inline int pmd_present(pmd_t pmd) |
362 | { | 362 | { |
363 | return (pmd_val(pmd) & ~PAGE_MASK) == _PMD_ENTRY; | 363 | return (pmd_val(pmd) & ~PAGE_MASK) == _PMD_ENTRY; |
364 | } | 364 | } |
365 | 365 | ||
366 | extern inline int pmd_none(pmd_t pmd) | 366 | static inline int pmd_none(pmd_t pmd) |
367 | { | 367 | { |
368 | return pmd_val(pmd) & _PMD_ENTRY_INV; | 368 | return pmd_val(pmd) & _PMD_ENTRY_INV; |
369 | } | 369 | } |
370 | 370 | ||
371 | extern inline int pmd_bad(pmd_t pmd) | 371 | static inline int pmd_bad(pmd_t pmd) |
372 | { | 372 | { |
373 | return (pmd_val(pmd) & (~PAGE_MASK & ~_PMD_ENTRY_INV)) != _PMD_ENTRY; | 373 | return (pmd_val(pmd) & (~PAGE_MASK & ~_PMD_ENTRY_INV)) != _PMD_ENTRY; |
374 | } | 374 | } |
375 | 375 | ||
376 | #endif /* __s390x__ */ | 376 | #endif /* __s390x__ */ |
377 | 377 | ||
378 | extern inline int pte_none(pte_t pte) | 378 | static inline int pte_none(pte_t pte) |
379 | { | 379 | { |
380 | return (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_EMPTY; | 380 | return (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_EMPTY; |
381 | } | 381 | } |
382 | 382 | ||
383 | extern inline int pte_present(pte_t pte) | 383 | static inline int pte_present(pte_t pte) |
384 | { | 384 | { |
385 | return !(pte_val(pte) & _PAGE_INVALID) || | 385 | return !(pte_val(pte) & _PAGE_INVALID) || |
386 | (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_NONE; | 386 | (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_NONE; |
387 | } | 387 | } |
388 | 388 | ||
389 | extern inline int pte_file(pte_t pte) | 389 | static inline int pte_file(pte_t pte) |
390 | { | 390 | { |
391 | return (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_FILE; | 391 | return (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_FILE; |
392 | } | 392 | } |
@@ -397,12 +397,12 @@ extern inline int pte_file(pte_t pte) | |||
397 | * query functions pte_write/pte_dirty/pte_young only work if | 397 | * query functions pte_write/pte_dirty/pte_young only work if |
398 | * pte_present() is true. Undefined behaviour if not.. | 398 | * pte_present() is true. Undefined behaviour if not.. |
399 | */ | 399 | */ |
400 | extern inline int pte_write(pte_t pte) | 400 | static inline int pte_write(pte_t pte) |
401 | { | 401 | { |
402 | return (pte_val(pte) & _PAGE_RO) == 0; | 402 | return (pte_val(pte) & _PAGE_RO) == 0; |
403 | } | 403 | } |
404 | 404 | ||
405 | extern inline int pte_dirty(pte_t pte) | 405 | static inline int pte_dirty(pte_t pte) |
406 | { | 406 | { |
407 | /* A pte is neither clean nor dirty on s/390. The dirty bit | 407 | /* A pte is neither clean nor dirty on s/390. The dirty bit |
408 | * is in the storage key. See page_test_and_clear_dirty for | 408 | * is in the storage key. See page_test_and_clear_dirty for |
@@ -411,7 +411,7 @@ extern inline int pte_dirty(pte_t pte) | |||
411 | return 0; | 411 | return 0; |
412 | } | 412 | } |
413 | 413 | ||
414 | extern inline int pte_young(pte_t pte) | 414 | static inline int pte_young(pte_t pte) |
415 | { | 415 | { |
416 | /* A pte is neither young nor old on s/390. The young bit | 416 | /* A pte is neither young nor old on s/390. The young bit |
417 | * is in the storage key. See page_test_and_clear_young for | 417 | * is in the storage key. See page_test_and_clear_young for |
@@ -420,7 +420,7 @@ extern inline int pte_young(pte_t pte) | |||
420 | return 0; | 420 | return 0; |
421 | } | 421 | } |
422 | 422 | ||
423 | extern inline int pte_read(pte_t pte) | 423 | static inline int pte_read(pte_t pte) |
424 | { | 424 | { |
425 | /* All pages are readable since we don't use the fetch | 425 | /* All pages are readable since we don't use the fetch |
426 | * protection bit in the storage key. | 426 | * protection bit in the storage key. |
@@ -434,9 +434,9 @@ extern inline int pte_read(pte_t pte) | |||
434 | 434 | ||
435 | #ifndef __s390x__ | 435 | #ifndef __s390x__ |
436 | 436 | ||
437 | extern inline void pgd_clear(pgd_t * pgdp) { } | 437 | static inline void pgd_clear(pgd_t * pgdp) { } |
438 | 438 | ||
439 | extern inline void pmd_clear(pmd_t * pmdp) | 439 | static inline void pmd_clear(pmd_t * pmdp) |
440 | { | 440 | { |
441 | pmd_val(pmdp[0]) = _PAGE_TABLE_INV; | 441 | pmd_val(pmdp[0]) = _PAGE_TABLE_INV; |
442 | pmd_val(pmdp[1]) = _PAGE_TABLE_INV; | 442 | pmd_val(pmdp[1]) = _PAGE_TABLE_INV; |
@@ -446,12 +446,12 @@ extern inline void pmd_clear(pmd_t * pmdp) | |||
446 | 446 | ||
447 | #else /* __s390x__ */ | 447 | #else /* __s390x__ */ |
448 | 448 | ||
449 | extern inline void pgd_clear(pgd_t * pgdp) | 449 | static inline void pgd_clear(pgd_t * pgdp) |
450 | { | 450 | { |
451 | pgd_val(*pgdp) = _PGD_ENTRY_INV | _PGD_ENTRY; | 451 | pgd_val(*pgdp) = _PGD_ENTRY_INV | _PGD_ENTRY; |
452 | } | 452 | } |
453 | 453 | ||
454 | extern inline void pmd_clear(pmd_t * pmdp) | 454 | static inline void pmd_clear(pmd_t * pmdp) |
455 | { | 455 | { |
456 | pmd_val(*pmdp) = _PMD_ENTRY_INV | _PMD_ENTRY; | 456 | pmd_val(*pmdp) = _PMD_ENTRY_INV | _PMD_ENTRY; |
457 | pmd_val1(*pmdp) = _PMD_ENTRY_INV | _PMD_ENTRY; | 457 | pmd_val1(*pmdp) = _PMD_ENTRY_INV | _PMD_ENTRY; |
@@ -459,7 +459,7 @@ extern inline void pmd_clear(pmd_t * pmdp) | |||
459 | 459 | ||
460 | #endif /* __s390x__ */ | 460 | #endif /* __s390x__ */ |
461 | 461 | ||
462 | extern inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 462 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
463 | { | 463 | { |
464 | pte_val(*ptep) = _PAGE_INVALID_EMPTY; | 464 | pte_val(*ptep) = _PAGE_INVALID_EMPTY; |
465 | } | 465 | } |
@@ -468,14 +468,14 @@ extern inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt | |||
468 | * The following pte modification functions only work if | 468 | * The following pte modification functions only work if |
469 | * pte_present() is true. Undefined behaviour if not.. | 469 | * pte_present() is true. Undefined behaviour if not.. |
470 | */ | 470 | */ |
471 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 471 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
472 | { | 472 | { |
473 | pte_val(pte) &= PAGE_MASK; | 473 | pte_val(pte) &= PAGE_MASK; |
474 | pte_val(pte) |= pgprot_val(newprot); | 474 | pte_val(pte) |= pgprot_val(newprot); |
475 | return pte; | 475 | return pte; |
476 | } | 476 | } |
477 | 477 | ||
478 | extern inline pte_t pte_wrprotect(pte_t pte) | 478 | static inline pte_t pte_wrprotect(pte_t pte) |
479 | { | 479 | { |
480 | /* Do not clobber _PAGE_INVALID_NONE pages! */ | 480 | /* Do not clobber _PAGE_INVALID_NONE pages! */ |
481 | if (!(pte_val(pte) & _PAGE_INVALID)) | 481 | if (!(pte_val(pte) & _PAGE_INVALID)) |
@@ -483,13 +483,13 @@ extern inline pte_t pte_wrprotect(pte_t pte) | |||
483 | return pte; | 483 | return pte; |
484 | } | 484 | } |
485 | 485 | ||
486 | extern inline pte_t pte_mkwrite(pte_t pte) | 486 | static inline pte_t pte_mkwrite(pte_t pte) |
487 | { | 487 | { |
488 | pte_val(pte) &= ~_PAGE_RO; | 488 | pte_val(pte) &= ~_PAGE_RO; |
489 | return pte; | 489 | return pte; |
490 | } | 490 | } |
491 | 491 | ||
492 | extern inline pte_t pte_mkclean(pte_t pte) | 492 | static inline pte_t pte_mkclean(pte_t pte) |
493 | { | 493 | { |
494 | /* The only user of pte_mkclean is the fork() code. | 494 | /* The only user of pte_mkclean is the fork() code. |
495 | We must *not* clear the *physical* page dirty bit | 495 | We must *not* clear the *physical* page dirty bit |
@@ -498,7 +498,7 @@ extern inline pte_t pte_mkclean(pte_t pte) | |||
498 | return pte; | 498 | return pte; |
499 | } | 499 | } |
500 | 500 | ||
501 | extern inline pte_t pte_mkdirty(pte_t pte) | 501 | static inline pte_t pte_mkdirty(pte_t pte) |
502 | { | 502 | { |
503 | /* We do not explicitly set the dirty bit because the | 503 | /* We do not explicitly set the dirty bit because the |
504 | * sske instruction is slow. It is faster to let the | 504 | * sske instruction is slow. It is faster to let the |
@@ -507,7 +507,7 @@ extern inline pte_t pte_mkdirty(pte_t pte) | |||
507 | return pte; | 507 | return pte; |
508 | } | 508 | } |
509 | 509 | ||
510 | extern inline pte_t pte_mkold(pte_t pte) | 510 | static inline pte_t pte_mkold(pte_t pte) |
511 | { | 511 | { |
512 | /* S/390 doesn't keep its dirty/referenced bit in the pte. | 512 | /* S/390 doesn't keep its dirty/referenced bit in the pte. |
513 | * There is no point in clearing the real referenced bit. | 513 | * There is no point in clearing the real referenced bit. |
@@ -515,7 +515,7 @@ extern inline pte_t pte_mkold(pte_t pte) | |||
515 | return pte; | 515 | return pte; |
516 | } | 516 | } |
517 | 517 | ||
518 | extern inline pte_t pte_mkyoung(pte_t pte) | 518 | static inline pte_t pte_mkyoung(pte_t pte) |
519 | { | 519 | { |
520 | /* S/390 doesn't keep its dirty/referenced bit in the pte. | 520 | /* S/390 doesn't keep its dirty/referenced bit in the pte. |
521 | * There is no point in setting the real referenced bit. | 521 | * There is no point in setting the real referenced bit. |
@@ -695,7 +695,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
695 | #ifndef __s390x__ | 695 | #ifndef __s390x__ |
696 | 696 | ||
697 | /* Find an entry in the second-level page table.. */ | 697 | /* Find an entry in the second-level page table.. */ |
698 | extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | 698 | static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) |
699 | { | 699 | { |
700 | return (pmd_t *) dir; | 700 | return (pmd_t *) dir; |
701 | } | 701 | } |
@@ -758,7 +758,7 @@ extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | |||
758 | #else | 758 | #else |
759 | #define __SWP_OFFSET_MASK (~0UL >> 11) | 759 | #define __SWP_OFFSET_MASK (~0UL >> 11) |
760 | #endif | 760 | #endif |
761 | extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | 761 | static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) |
762 | { | 762 | { |
763 | pte_t pte; | 763 | pte_t pte; |
764 | offset &= __SWP_OFFSET_MASK; | 764 | offset &= __SWP_OFFSET_MASK; |
diff --git a/include/asm-s390/sigp.h b/include/asm-s390/sigp.h index 3979bc3858e2..fc56458aff66 100644 --- a/include/asm-s390/sigp.h +++ b/include/asm-s390/sigp.h | |||
@@ -67,7 +67,7 @@ typedef enum | |||
67 | /* | 67 | /* |
68 | * Signal processor | 68 | * Signal processor |
69 | */ | 69 | */ |
70 | extern __inline__ sigp_ccode | 70 | static inline sigp_ccode |
71 | signal_processor(__u16 cpu_addr, sigp_order_code order_code) | 71 | signal_processor(__u16 cpu_addr, sigp_order_code order_code) |
72 | { | 72 | { |
73 | sigp_ccode ccode; | 73 | sigp_ccode ccode; |
@@ -86,7 +86,7 @@ signal_processor(__u16 cpu_addr, sigp_order_code order_code) | |||
86 | /* | 86 | /* |
87 | * Signal processor with parameter | 87 | * Signal processor with parameter |
88 | */ | 88 | */ |
89 | extern __inline__ sigp_ccode | 89 | static inline sigp_ccode |
90 | signal_processor_p(__u32 parameter, __u16 cpu_addr, | 90 | signal_processor_p(__u32 parameter, __u16 cpu_addr, |
91 | sigp_order_code order_code) | 91 | sigp_order_code order_code) |
92 | { | 92 | { |
@@ -107,7 +107,7 @@ signal_processor_p(__u32 parameter, __u16 cpu_addr, | |||
107 | /* | 107 | /* |
108 | * Signal processor with parameter and return status | 108 | * Signal processor with parameter and return status |
109 | */ | 109 | */ |
110 | extern __inline__ sigp_ccode | 110 | static inline sigp_ccode |
111 | signal_processor_ps(__u32 *statusptr, __u32 parameter, | 111 | signal_processor_ps(__u32 *statusptr, __u32 parameter, |
112 | __u16 cpu_addr, sigp_order_code order_code) | 112 | __u16 cpu_addr, sigp_order_code order_code) |
113 | { | 113 | { |
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index dd50e57a928f..a2ae7628bbaa 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h | |||
@@ -52,7 +52,7 @@ extern int smp_call_function_on(void (*func) (void *info), void *info, | |||
52 | extern int smp_get_cpu(cpumask_t cpu_map); | 52 | extern int smp_get_cpu(cpumask_t cpu_map); |
53 | extern void smp_put_cpu(int cpu); | 53 | extern void smp_put_cpu(int cpu); |
54 | 54 | ||
55 | extern __inline__ __u16 hard_smp_processor_id(void) | 55 | static inline __u16 hard_smp_processor_id(void) |
56 | { | 56 | { |
57 | __u16 cpu_address; | 57 | __u16 cpu_address; |
58 | 58 | ||
diff --git a/include/asm-sparc/audioio.h b/include/asm-sparc/audioio.h deleted file mode 100644 index cf16173f521b..000000000000 --- a/include/asm-sparc/audioio.h +++ /dev/null | |||
@@ -1,234 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sparc/audioio.h | ||
3 | * | ||
4 | * Sparc Audio Midlayer | ||
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #ifndef _AUDIOIO_H_ | ||
9 | #define _AUDIOIO_H_ | ||
10 | |||
11 | /* | ||
12 | * SunOS/Solaris /dev/audio interface | ||
13 | */ | ||
14 | |||
15 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/time.h> | ||
18 | #include <linux/ioctl.h> | ||
19 | #endif | ||
20 | |||
21 | /* | ||
22 | * This structure contains state information for audio device IO streams. | ||
23 | */ | ||
24 | typedef struct audio_prinfo { | ||
25 | /* | ||
26 | * The following values describe the audio data encoding. | ||
27 | */ | ||
28 | unsigned int sample_rate; /* samples per second */ | ||
29 | unsigned int channels; /* number of interleaved channels */ | ||
30 | unsigned int precision; /* bit-width of each sample */ | ||
31 | unsigned int encoding; /* data encoding method */ | ||
32 | |||
33 | /* | ||
34 | * The following values control audio device configuration | ||
35 | */ | ||
36 | unsigned int gain; /* gain level: 0 - 255 */ | ||
37 | unsigned int port; /* selected I/O port (see below) */ | ||
38 | unsigned int avail_ports; /* available I/O ports (see below) */ | ||
39 | unsigned int _xxx[2]; /* Reserved for future use */ | ||
40 | |||
41 | unsigned int buffer_size; /* I/O buffer size */ | ||
42 | |||
43 | /* | ||
44 | * The following values describe driver state | ||
45 | */ | ||
46 | unsigned int samples; /* number of samples converted */ | ||
47 | unsigned int eof; /* End Of File counter (play only) */ | ||
48 | |||
49 | unsigned char pause; /* non-zero for pause, zero to resume */ | ||
50 | unsigned char error; /* non-zero if overflow/underflow */ | ||
51 | unsigned char waiting; /* non-zero if a process wants access */ | ||
52 | unsigned char balance; /* stereo channel balance */ | ||
53 | |||
54 | unsigned short minordev; | ||
55 | |||
56 | /* | ||
57 | * The following values are read-only state flags | ||
58 | */ | ||
59 | unsigned char open; /* non-zero if open access permitted */ | ||
60 | unsigned char active; /* non-zero if I/O is active */ | ||
61 | } audio_prinfo_t; | ||
62 | |||
63 | |||
64 | /* | ||
65 | * This structure describes the current state of the audio device. | ||
66 | */ | ||
67 | typedef struct audio_info { | ||
68 | /* | ||
69 | * Per-stream information | ||
70 | */ | ||
71 | audio_prinfo_t play; /* output status information */ | ||
72 | audio_prinfo_t record; /* input status information */ | ||
73 | |||
74 | /* | ||
75 | * Per-unit/channel information | ||
76 | */ | ||
77 | unsigned int monitor_gain; /* input to output mix: 0 - 255 */ | ||
78 | unsigned char output_muted; /* non-zero if output is muted */ | ||
79 | unsigned char _xxx[3]; /* Reserved for future use */ | ||
80 | unsigned int _yyy[3]; /* Reserved for future use */ | ||
81 | } audio_info_t; | ||
82 | |||
83 | |||
84 | /* | ||
85 | * Audio encoding types | ||
86 | */ | ||
87 | #define AUDIO_ENCODING_NONE (0) /* no encoding assigned */ | ||
88 | #define AUDIO_ENCODING_ULAW (1) /* u-law encoding */ | ||
89 | #define AUDIO_ENCODING_ALAW (2) /* A-law encoding */ | ||
90 | #define AUDIO_ENCODING_LINEAR (3) /* Linear PCM encoding */ | ||
91 | #define AUDIO_ENCODING_FLOAT (4) /* IEEE float (-1. <-> +1.) */ | ||
92 | #define AUDIO_ENCODING_DVI (104) /* DVI ADPCM */ | ||
93 | #define AUDIO_ENCODING_LINEAR8 (105) /* 8 bit UNSIGNED */ | ||
94 | #define AUDIO_ENCODING_LINEARLE (106) /* Linear PCM LE encoding */ | ||
95 | |||
96 | /* | ||
97 | * These ranges apply to record, play, and monitor gain values | ||
98 | */ | ||
99 | #define AUDIO_MIN_GAIN (0) /* minimum gain value */ | ||
100 | #define AUDIO_MAX_GAIN (255) /* maximum gain value */ | ||
101 | |||
102 | /* | ||
103 | * These values apply to the balance field to adjust channel gain values | ||
104 | */ | ||
105 | #define AUDIO_LEFT_BALANCE (0) /* left channel only */ | ||
106 | #define AUDIO_MID_BALANCE (32) /* equal left/right channel */ | ||
107 | #define AUDIO_RIGHT_BALANCE (64) /* right channel only */ | ||
108 | #define AUDIO_BALANCE_SHIFT (3) | ||
109 | |||
110 | /* | ||
111 | * Generic minimum/maximum limits for number of channels, both modes | ||
112 | */ | ||
113 | #define AUDIO_MIN_PLAY_CHANNELS (1) | ||
114 | #define AUDIO_MAX_PLAY_CHANNELS (4) | ||
115 | #define AUDIO_MIN_REC_CHANNELS (1) | ||
116 | #define AUDIO_MAX_REC_CHANNELS (4) | ||
117 | |||
118 | /* | ||
119 | * Generic minimum/maximum limits for sample precision | ||
120 | */ | ||
121 | #define AUDIO_MIN_PLAY_PRECISION (8) | ||
122 | #define AUDIO_MAX_PLAY_PRECISION (32) | ||
123 | #define AUDIO_MIN_REC_PRECISION (8) | ||
124 | #define AUDIO_MAX_REC_PRECISION (32) | ||
125 | |||
126 | /* | ||
127 | * Define some convenient names for typical audio ports | ||
128 | */ | ||
129 | /* | ||
130 | * output ports (several may be enabled simultaneously) | ||
131 | */ | ||
132 | #define AUDIO_SPEAKER 0x01 /* output to built-in speaker */ | ||
133 | #define AUDIO_HEADPHONE 0x02 /* output to headphone jack */ | ||
134 | #define AUDIO_LINE_OUT 0x04 /* output to line out */ | ||
135 | |||
136 | /* | ||
137 | * input ports (usually only one at a time) | ||
138 | */ | ||
139 | #define AUDIO_MICROPHONE 0x01 /* input from microphone */ | ||
140 | #define AUDIO_LINE_IN 0x02 /* input from line in */ | ||
141 | #define AUDIO_CD 0x04 /* input from on-board CD inputs */ | ||
142 | #define AUDIO_INTERNAL_CD_IN AUDIO_CD /* input from internal CDROM */ | ||
143 | #define AUDIO_ANALOG_LOOPBACK 0x40 /* input from output */ | ||
144 | |||
145 | |||
146 | /* | ||
147 | * This macro initializes an audio_info structure to 'harmless' values. | ||
148 | * Note that (~0) might not be a harmless value for a flag that was | ||
149 | * a signed int. | ||
150 | */ | ||
151 | #define AUDIO_INITINFO(i) { \ | ||
152 | unsigned int *__x__; \ | ||
153 | for (__x__ = (unsigned int *)(i); \ | ||
154 | (char *) __x__ < (((char *)(i)) + sizeof (audio_info_t)); \ | ||
155 | *__x__++ = ~0); \ | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * These allow testing for what the user wants to set | ||
160 | */ | ||
161 | #define AUD_INITVALUE (~0) | ||
162 | #define Modify(X) ((unsigned int)(X) != AUD_INITVALUE) | ||
163 | #define Modifys(X) ((X) != (unsigned short)AUD_INITVALUE) | ||
164 | #define Modifyc(X) ((X) != (unsigned char)AUD_INITVALUE) | ||
165 | |||
166 | /* | ||
167 | * Parameter for the AUDIO_GETDEV ioctl to determine current | ||
168 | * audio devices. | ||
169 | */ | ||
170 | #define MAX_AUDIO_DEV_LEN (16) | ||
171 | typedef struct audio_device { | ||
172 | char name[MAX_AUDIO_DEV_LEN]; | ||
173 | char version[MAX_AUDIO_DEV_LEN]; | ||
174 | char config[MAX_AUDIO_DEV_LEN]; | ||
175 | } audio_device_t; | ||
176 | |||
177 | |||
178 | /* | ||
179 | * Ioctl calls for the audio device. | ||
180 | */ | ||
181 | |||
182 | /* | ||
183 | * AUDIO_GETINFO retrieves the current state of the audio device. | ||
184 | * | ||
185 | * AUDIO_SETINFO copies all fields of the audio_info structure whose | ||
186 | * values are not set to the initialized value (-1) to the device state. | ||
187 | * It performs an implicit AUDIO_GETINFO to return the new state of the | ||
188 | * device. Note that the record.samples and play.samples fields are set | ||
189 | * to the last value before the AUDIO_SETINFO took effect. This allows | ||
190 | * an application to reset the counters while atomically retrieving the | ||
191 | * last value. | ||
192 | * | ||
193 | * AUDIO_DRAIN suspends the calling process until the write buffers are | ||
194 | * empty. | ||
195 | * | ||
196 | * AUDIO_GETDEV returns a structure of type audio_device_t which contains | ||
197 | * three strings. The string "name" is a short identifying string (for | ||
198 | * example, the SBus Fcode name string), the string "version" identifies | ||
199 | * the current version of the device, and the "config" string identifies | ||
200 | * the specific configuration of the audio stream. All fields are | ||
201 | * device-dependent -- see the device specific manual pages for details. | ||
202 | * | ||
203 | * AUDIO_GETDEV_SUNOS returns a number which is an audio device defined | ||
204 | * herein (making it not too portable) | ||
205 | * | ||
206 | * AUDIO_FLUSH stops all playback and recording, clears all queued buffers, | ||
207 | * resets error counters, and restarts recording and playback as appropriate | ||
208 | * for the current sampling mode. | ||
209 | */ | ||
210 | #define AUDIO_GETINFO _IOR('A', 1, audio_info_t) | ||
211 | #define AUDIO_SETINFO _IOWR('A', 2, audio_info_t) | ||
212 | #define AUDIO_DRAIN _IO('A', 3) | ||
213 | #define AUDIO_GETDEV _IOR('A', 4, audio_device_t) | ||
214 | #define AUDIO_GETDEV_SUNOS _IOR('A', 4, int) | ||
215 | #define AUDIO_FLUSH _IO('A', 5) | ||
216 | |||
217 | /* Define possible audio hardware configurations for | ||
218 | * old SunOS-style AUDIO_GETDEV ioctl */ | ||
219 | #define AUDIO_DEV_UNKNOWN (0) /* not defined */ | ||
220 | #define AUDIO_DEV_AMD (1) /* audioamd device */ | ||
221 | #define AUDIO_DEV_SPEAKERBOX (2) /* dbri device with speakerbox */ | ||
222 | #define AUDIO_DEV_CODEC (3) /* dbri device (internal speaker) */ | ||
223 | #define AUDIO_DEV_CS4231 (5) /* cs4231 device */ | ||
224 | |||
225 | /* | ||
226 | * The following ioctl sets the audio device into an internal loopback mode, | ||
227 | * if the hardware supports this. The argument is TRUE to set loopback, | ||
228 | * FALSE to reset to normal operation. If the hardware does not support | ||
229 | * internal loopback, the ioctl should fail with EINVAL. | ||
230 | * Causes ADC data to be digitally mixed in and sent to the DAC. | ||
231 | */ | ||
232 | #define AUDIO_DIAG_LOOPBACK _IOW('A', 101, int) | ||
233 | |||
234 | #endif /* _AUDIOIO_H_ */ | ||
diff --git a/include/asm-sparc/kbio.h b/include/asm-sparc/kbio.h deleted file mode 100644 index 3cf496bdf399..000000000000 --- a/include/asm-sparc/kbio.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #ifndef __LINUX_KBIO_H | ||
2 | #define __LINUX_KBIO_H | ||
3 | |||
4 | /* Return keyboard type */ | ||
5 | #define KIOCTYPE _IOR('k', 9, int) | ||
6 | /* Return Keyboard layout */ | ||
7 | #define KIOCLAYOUT _IOR('k', 20, int) | ||
8 | |||
9 | enum { | ||
10 | TR_NONE, | ||
11 | TR_ASCII, /* keyboard is in regular state */ | ||
12 | TR_EVENT, /* keystrokes sent as firm events */ | ||
13 | TR_UNTRANS_EVENT /* EVENT+up and down+no translation */ | ||
14 | }; | ||
15 | |||
16 | /* Return the current keyboard translation */ | ||
17 | #define KIOCGTRANS _IOR('k', 5, int) | ||
18 | /* Set the keyboard translation */ | ||
19 | #define KIOCTRANS _IOW('k', 0, int) | ||
20 | |||
21 | /* Send a keyboard command */ | ||
22 | #define KIOCCMD _IOW('k', 8, int) | ||
23 | |||
24 | /* Return if keystrokes are being sent to /dev/kbd */ | ||
25 | |||
26 | /* Set routing of keystrokes to /dev/kbd */ | ||
27 | #define KIOCSDIRECT _IOW('k', 10, int) | ||
28 | |||
29 | /* Set keyboard leds */ | ||
30 | #define KIOCSLED _IOW('k', 14, unsigned char) | ||
31 | |||
32 | /* Get keyboard leds */ | ||
33 | #define KIOCGLED _IOR('k', 15, unsigned char) | ||
34 | |||
35 | /* Used by KIOC[GS]RATE */ | ||
36 | struct kbd_rate { | ||
37 | unsigned char delay; /* Delay in Hz before first repeat. */ | ||
38 | unsigned char rate; /* In characters per second (0..50). */ | ||
39 | }; | ||
40 | |||
41 | /* Set keyboard rate */ | ||
42 | #define KIOCSRATE _IOW('k', 40, struct kbd_rate) | ||
43 | |||
44 | /* Get keyboard rate */ | ||
45 | #define KIOCGRATE _IOW('k', 41, struct kbd_rate) | ||
46 | |||
47 | /* Top bit records if the key is up or down */ | ||
48 | #define KBD_UP 0x80 | ||
49 | |||
50 | /* Usable information */ | ||
51 | #define KBD_KEYMASK 0x7f | ||
52 | |||
53 | /* All keys up */ | ||
54 | #define KBD_IDLE 0x75 | ||
55 | |||
56 | #endif /* __LINUX_KBIO_H */ | ||
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index 0a8ad4cac125..d05f83c80989 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h | |||
@@ -38,15 +38,6 @@ struct sunos_ttysize { | |||
38 | int st_columns; /* Columns on the terminal */ | 38 | int st_columns; /* Columns on the terminal */ |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* Used for packet mode */ | ||
42 | #define TIOCPKT_DATA 0 | ||
43 | #define TIOCPKT_FLUSHREAD 1 | ||
44 | #define TIOCPKT_FLUSHWRITE 2 | ||
45 | #define TIOCPKT_STOP 4 | ||
46 | #define TIOCPKT_START 8 | ||
47 | #define TIOCPKT_NOSTOP 16 | ||
48 | #define TIOCPKT_DOSTOP 32 | ||
49 | |||
50 | struct winsize { | 41 | struct winsize { |
51 | unsigned short ws_row; | 42 | unsigned short ws_row; |
52 | unsigned short ws_col; | 43 | unsigned short ws_col; |
diff --git a/include/asm-sparc/vuid_event.h b/include/asm-sparc/vuid_event.h deleted file mode 100644 index 7781e9f2fdd3..000000000000 --- a/include/asm-sparc/vuid_event.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* SunOS Virtual User Input Device (VUID) compatibility */ | ||
2 | |||
3 | |||
4 | typedef struct firm_event { | ||
5 | unsigned short id; /* tag for this event */ | ||
6 | unsigned char pair_type; /* unused by X11 */ | ||
7 | unsigned char pair; /* unused by X11 */ | ||
8 | int value; /* VKEY_UP, VKEY_DOWN or delta */ | ||
9 | struct timeval time; | ||
10 | } Firm_event; | ||
11 | |||
12 | enum { | ||
13 | FE_PAIR_NONE, | ||
14 | FE_PAIR_SET, | ||
15 | FE_PAIR_DELTA, | ||
16 | FE_PAIR_ABSOLUTE | ||
17 | }; | ||
18 | |||
19 | /* VUID stream formats */ | ||
20 | #define VUID_NATIVE 0 /* Native byte stream format */ | ||
21 | #define VUID_FIRM_EVENT 1 /* send firm_event structures */ | ||
22 | |||
23 | /* ioctls */ | ||
24 | /* Set input device byte stream format (any of VUID_{NATIVE,FIRM_EVENT}) */ | ||
25 | #define VUIDSFORMAT _IOW('v', 1, int) | ||
26 | /* Retrieve input device byte stream format */ | ||
27 | #define VUIDGFORMAT _IOR('v', 2, int) | ||
28 | |||
29 | /* Possible tag values */ | ||
30 | /* mouse buttons: */ | ||
31 | #define MS_LEFT 0x7f20 | ||
32 | #define MS_MIDDLE 0x7f21 | ||
33 | #define MS_RIGHT 0x7f22 | ||
34 | /* motion: */ | ||
35 | #define LOC_X_DELTA 0x7f80 | ||
36 | #define LOC_Y_DELTA 0x7f81 | ||
37 | #define LOC_X_ABSOLUTE 0x7f82 /* X compat, unsupported */ | ||
38 | #define LOC_Y_ABSOLUTE 0x7f83 /* X compat, unsupported */ | ||
39 | |||
40 | #define VKEY_UP 0 | ||
41 | #define VKEY_DOWN 1 | ||
diff --git a/include/asm-sparc64/audioio.h b/include/asm-sparc64/audioio.h deleted file mode 100644 index cf16173f521b..000000000000 --- a/include/asm-sparc64/audioio.h +++ /dev/null | |||
@@ -1,234 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sparc/audioio.h | ||
3 | * | ||
4 | * Sparc Audio Midlayer | ||
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #ifndef _AUDIOIO_H_ | ||
9 | #define _AUDIOIO_H_ | ||
10 | |||
11 | /* | ||
12 | * SunOS/Solaris /dev/audio interface | ||
13 | */ | ||
14 | |||
15 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/time.h> | ||
18 | #include <linux/ioctl.h> | ||
19 | #endif | ||
20 | |||
21 | /* | ||
22 | * This structure contains state information for audio device IO streams. | ||
23 | */ | ||
24 | typedef struct audio_prinfo { | ||
25 | /* | ||
26 | * The following values describe the audio data encoding. | ||
27 | */ | ||
28 | unsigned int sample_rate; /* samples per second */ | ||
29 | unsigned int channels; /* number of interleaved channels */ | ||
30 | unsigned int precision; /* bit-width of each sample */ | ||
31 | unsigned int encoding; /* data encoding method */ | ||
32 | |||
33 | /* | ||
34 | * The following values control audio device configuration | ||
35 | */ | ||
36 | unsigned int gain; /* gain level: 0 - 255 */ | ||
37 | unsigned int port; /* selected I/O port (see below) */ | ||
38 | unsigned int avail_ports; /* available I/O ports (see below) */ | ||
39 | unsigned int _xxx[2]; /* Reserved for future use */ | ||
40 | |||
41 | unsigned int buffer_size; /* I/O buffer size */ | ||
42 | |||
43 | /* | ||
44 | * The following values describe driver state | ||
45 | */ | ||
46 | unsigned int samples; /* number of samples converted */ | ||
47 | unsigned int eof; /* End Of File counter (play only) */ | ||
48 | |||
49 | unsigned char pause; /* non-zero for pause, zero to resume */ | ||
50 | unsigned char error; /* non-zero if overflow/underflow */ | ||
51 | unsigned char waiting; /* non-zero if a process wants access */ | ||
52 | unsigned char balance; /* stereo channel balance */ | ||
53 | |||
54 | unsigned short minordev; | ||
55 | |||
56 | /* | ||
57 | * The following values are read-only state flags | ||
58 | */ | ||
59 | unsigned char open; /* non-zero if open access permitted */ | ||
60 | unsigned char active; /* non-zero if I/O is active */ | ||
61 | } audio_prinfo_t; | ||
62 | |||
63 | |||
64 | /* | ||
65 | * This structure describes the current state of the audio device. | ||
66 | */ | ||
67 | typedef struct audio_info { | ||
68 | /* | ||
69 | * Per-stream information | ||
70 | */ | ||
71 | audio_prinfo_t play; /* output status information */ | ||
72 | audio_prinfo_t record; /* input status information */ | ||
73 | |||
74 | /* | ||
75 | * Per-unit/channel information | ||
76 | */ | ||
77 | unsigned int monitor_gain; /* input to output mix: 0 - 255 */ | ||
78 | unsigned char output_muted; /* non-zero if output is muted */ | ||
79 | unsigned char _xxx[3]; /* Reserved for future use */ | ||
80 | unsigned int _yyy[3]; /* Reserved for future use */ | ||
81 | } audio_info_t; | ||
82 | |||
83 | |||
84 | /* | ||
85 | * Audio encoding types | ||
86 | */ | ||
87 | #define AUDIO_ENCODING_NONE (0) /* no encoding assigned */ | ||
88 | #define AUDIO_ENCODING_ULAW (1) /* u-law encoding */ | ||
89 | #define AUDIO_ENCODING_ALAW (2) /* A-law encoding */ | ||
90 | #define AUDIO_ENCODING_LINEAR (3) /* Linear PCM encoding */ | ||
91 | #define AUDIO_ENCODING_FLOAT (4) /* IEEE float (-1. <-> +1.) */ | ||
92 | #define AUDIO_ENCODING_DVI (104) /* DVI ADPCM */ | ||
93 | #define AUDIO_ENCODING_LINEAR8 (105) /* 8 bit UNSIGNED */ | ||
94 | #define AUDIO_ENCODING_LINEARLE (106) /* Linear PCM LE encoding */ | ||
95 | |||
96 | /* | ||
97 | * These ranges apply to record, play, and monitor gain values | ||
98 | */ | ||
99 | #define AUDIO_MIN_GAIN (0) /* minimum gain value */ | ||
100 | #define AUDIO_MAX_GAIN (255) /* maximum gain value */ | ||
101 | |||
102 | /* | ||
103 | * These values apply to the balance field to adjust channel gain values | ||
104 | */ | ||
105 | #define AUDIO_LEFT_BALANCE (0) /* left channel only */ | ||
106 | #define AUDIO_MID_BALANCE (32) /* equal left/right channel */ | ||
107 | #define AUDIO_RIGHT_BALANCE (64) /* right channel only */ | ||
108 | #define AUDIO_BALANCE_SHIFT (3) | ||
109 | |||
110 | /* | ||
111 | * Generic minimum/maximum limits for number of channels, both modes | ||
112 | */ | ||
113 | #define AUDIO_MIN_PLAY_CHANNELS (1) | ||
114 | #define AUDIO_MAX_PLAY_CHANNELS (4) | ||
115 | #define AUDIO_MIN_REC_CHANNELS (1) | ||
116 | #define AUDIO_MAX_REC_CHANNELS (4) | ||
117 | |||
118 | /* | ||
119 | * Generic minimum/maximum limits for sample precision | ||
120 | */ | ||
121 | #define AUDIO_MIN_PLAY_PRECISION (8) | ||
122 | #define AUDIO_MAX_PLAY_PRECISION (32) | ||
123 | #define AUDIO_MIN_REC_PRECISION (8) | ||
124 | #define AUDIO_MAX_REC_PRECISION (32) | ||
125 | |||
126 | /* | ||
127 | * Define some convenient names for typical audio ports | ||
128 | */ | ||
129 | /* | ||
130 | * output ports (several may be enabled simultaneously) | ||
131 | */ | ||
132 | #define AUDIO_SPEAKER 0x01 /* output to built-in speaker */ | ||
133 | #define AUDIO_HEADPHONE 0x02 /* output to headphone jack */ | ||
134 | #define AUDIO_LINE_OUT 0x04 /* output to line out */ | ||
135 | |||
136 | /* | ||
137 | * input ports (usually only one at a time) | ||
138 | */ | ||
139 | #define AUDIO_MICROPHONE 0x01 /* input from microphone */ | ||
140 | #define AUDIO_LINE_IN 0x02 /* input from line in */ | ||
141 | #define AUDIO_CD 0x04 /* input from on-board CD inputs */ | ||
142 | #define AUDIO_INTERNAL_CD_IN AUDIO_CD /* input from internal CDROM */ | ||
143 | #define AUDIO_ANALOG_LOOPBACK 0x40 /* input from output */ | ||
144 | |||
145 | |||
146 | /* | ||
147 | * This macro initializes an audio_info structure to 'harmless' values. | ||
148 | * Note that (~0) might not be a harmless value for a flag that was | ||
149 | * a signed int. | ||
150 | */ | ||
151 | #define AUDIO_INITINFO(i) { \ | ||
152 | unsigned int *__x__; \ | ||
153 | for (__x__ = (unsigned int *)(i); \ | ||
154 | (char *) __x__ < (((char *)(i)) + sizeof (audio_info_t)); \ | ||
155 | *__x__++ = ~0); \ | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * These allow testing for what the user wants to set | ||
160 | */ | ||
161 | #define AUD_INITVALUE (~0) | ||
162 | #define Modify(X) ((unsigned int)(X) != AUD_INITVALUE) | ||
163 | #define Modifys(X) ((X) != (unsigned short)AUD_INITVALUE) | ||
164 | #define Modifyc(X) ((X) != (unsigned char)AUD_INITVALUE) | ||
165 | |||
166 | /* | ||
167 | * Parameter for the AUDIO_GETDEV ioctl to determine current | ||
168 | * audio devices. | ||
169 | */ | ||
170 | #define MAX_AUDIO_DEV_LEN (16) | ||
171 | typedef struct audio_device { | ||
172 | char name[MAX_AUDIO_DEV_LEN]; | ||
173 | char version[MAX_AUDIO_DEV_LEN]; | ||
174 | char config[MAX_AUDIO_DEV_LEN]; | ||
175 | } audio_device_t; | ||
176 | |||
177 | |||
178 | /* | ||
179 | * Ioctl calls for the audio device. | ||
180 | */ | ||
181 | |||
182 | /* | ||
183 | * AUDIO_GETINFO retrieves the current state of the audio device. | ||
184 | * | ||
185 | * AUDIO_SETINFO copies all fields of the audio_info structure whose | ||
186 | * values are not set to the initialized value (-1) to the device state. | ||
187 | * It performs an implicit AUDIO_GETINFO to return the new state of the | ||
188 | * device. Note that the record.samples and play.samples fields are set | ||
189 | * to the last value before the AUDIO_SETINFO took effect. This allows | ||
190 | * an application to reset the counters while atomically retrieving the | ||
191 | * last value. | ||
192 | * | ||
193 | * AUDIO_DRAIN suspends the calling process until the write buffers are | ||
194 | * empty. | ||
195 | * | ||
196 | * AUDIO_GETDEV returns a structure of type audio_device_t which contains | ||
197 | * three strings. The string "name" is a short identifying string (for | ||
198 | * example, the SBus Fcode name string), the string "version" identifies | ||
199 | * the current version of the device, and the "config" string identifies | ||
200 | * the specific configuration of the audio stream. All fields are | ||
201 | * device-dependent -- see the device specific manual pages for details. | ||
202 | * | ||
203 | * AUDIO_GETDEV_SUNOS returns a number which is an audio device defined | ||
204 | * herein (making it not too portable) | ||
205 | * | ||
206 | * AUDIO_FLUSH stops all playback and recording, clears all queued buffers, | ||
207 | * resets error counters, and restarts recording and playback as appropriate | ||
208 | * for the current sampling mode. | ||
209 | */ | ||
210 | #define AUDIO_GETINFO _IOR('A', 1, audio_info_t) | ||
211 | #define AUDIO_SETINFO _IOWR('A', 2, audio_info_t) | ||
212 | #define AUDIO_DRAIN _IO('A', 3) | ||
213 | #define AUDIO_GETDEV _IOR('A', 4, audio_device_t) | ||
214 | #define AUDIO_GETDEV_SUNOS _IOR('A', 4, int) | ||
215 | #define AUDIO_FLUSH _IO('A', 5) | ||
216 | |||
217 | /* Define possible audio hardware configurations for | ||
218 | * old SunOS-style AUDIO_GETDEV ioctl */ | ||
219 | #define AUDIO_DEV_UNKNOWN (0) /* not defined */ | ||
220 | #define AUDIO_DEV_AMD (1) /* audioamd device */ | ||
221 | #define AUDIO_DEV_SPEAKERBOX (2) /* dbri device with speakerbox */ | ||
222 | #define AUDIO_DEV_CODEC (3) /* dbri device (internal speaker) */ | ||
223 | #define AUDIO_DEV_CS4231 (5) /* cs4231 device */ | ||
224 | |||
225 | /* | ||
226 | * The following ioctl sets the audio device into an internal loopback mode, | ||
227 | * if the hardware supports this. The argument is TRUE to set loopback, | ||
228 | * FALSE to reset to normal operation. If the hardware does not support | ||
229 | * internal loopback, the ioctl should fail with EINVAL. | ||
230 | * Causes ADC data to be digitally mixed in and sent to the DAC. | ||
231 | */ | ||
232 | #define AUDIO_DIAG_LOOPBACK _IOW('A', 101, int) | ||
233 | |||
234 | #endif /* _AUDIOIO_H_ */ | ||
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index 543e4e500a72..7a408a030f52 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h | |||
@@ -79,6 +79,7 @@ extern int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr, | |||
79 | size_t len); | 79 | size_t len); |
80 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); | 80 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); |
81 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); | 81 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); |
82 | extern unsigned int ebus_dma_addr(struct ebus_dma_info *p); | ||
82 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); | 83 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); |
83 | 84 | ||
84 | extern struct linux_ebus *ebus_chain; | 85 | extern struct linux_ebus *ebus_chain; |
diff --git a/include/asm-sparc64/kbio.h b/include/asm-sparc64/kbio.h deleted file mode 100644 index 3cf496bdf399..000000000000 --- a/include/asm-sparc64/kbio.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #ifndef __LINUX_KBIO_H | ||
2 | #define __LINUX_KBIO_H | ||
3 | |||
4 | /* Return keyboard type */ | ||
5 | #define KIOCTYPE _IOR('k', 9, int) | ||
6 | /* Return Keyboard layout */ | ||
7 | #define KIOCLAYOUT _IOR('k', 20, int) | ||
8 | |||
9 | enum { | ||
10 | TR_NONE, | ||
11 | TR_ASCII, /* keyboard is in regular state */ | ||
12 | TR_EVENT, /* keystrokes sent as firm events */ | ||
13 | TR_UNTRANS_EVENT /* EVENT+up and down+no translation */ | ||
14 | }; | ||
15 | |||
16 | /* Return the current keyboard translation */ | ||
17 | #define KIOCGTRANS _IOR('k', 5, int) | ||
18 | /* Set the keyboard translation */ | ||
19 | #define KIOCTRANS _IOW('k', 0, int) | ||
20 | |||
21 | /* Send a keyboard command */ | ||
22 | #define KIOCCMD _IOW('k', 8, int) | ||
23 | |||
24 | /* Return if keystrokes are being sent to /dev/kbd */ | ||
25 | |||
26 | /* Set routing of keystrokes to /dev/kbd */ | ||
27 | #define KIOCSDIRECT _IOW('k', 10, int) | ||
28 | |||
29 | /* Set keyboard leds */ | ||
30 | #define KIOCSLED _IOW('k', 14, unsigned char) | ||
31 | |||
32 | /* Get keyboard leds */ | ||
33 | #define KIOCGLED _IOR('k', 15, unsigned char) | ||
34 | |||
35 | /* Used by KIOC[GS]RATE */ | ||
36 | struct kbd_rate { | ||
37 | unsigned char delay; /* Delay in Hz before first repeat. */ | ||
38 | unsigned char rate; /* In characters per second (0..50). */ | ||
39 | }; | ||
40 | |||
41 | /* Set keyboard rate */ | ||
42 | #define KIOCSRATE _IOW('k', 40, struct kbd_rate) | ||
43 | |||
44 | /* Get keyboard rate */ | ||
45 | #define KIOCGRATE _IOW('k', 41, struct kbd_rate) | ||
46 | |||
47 | /* Top bit records if the key is up or down */ | ||
48 | #define KBD_UP 0x80 | ||
49 | |||
50 | /* Usable information */ | ||
51 | #define KBD_KEYMASK 0x7f | ||
52 | |||
53 | /* All keys up */ | ||
54 | #define KBD_IDLE 0x75 | ||
55 | |||
56 | #endif /* __LINUX_KBIO_H */ | ||
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 87c43c67866e..08ba72d7722c 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -87,37 +87,35 @@ extern void __flush_tlb_mm(unsigned long, unsigned long); | |||
87 | static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) | 87 | static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) |
88 | { | 88 | { |
89 | unsigned long ctx_valid; | 89 | unsigned long ctx_valid; |
90 | int cpu; | ||
90 | 91 | ||
92 | /* Note: page_table_lock is used here to serialize switch_mm | ||
93 | * and activate_mm, and their calls to get_new_mmu_context. | ||
94 | * This use of page_table_lock is unrelated to its other uses. | ||
95 | */ | ||
91 | spin_lock(&mm->page_table_lock); | 96 | spin_lock(&mm->page_table_lock); |
92 | if (CTX_VALID(mm->context)) | 97 | ctx_valid = CTX_VALID(mm->context); |
93 | ctx_valid = 1; | 98 | if (!ctx_valid) |
94 | else | 99 | get_new_mmu_context(mm); |
95 | ctx_valid = 0; | 100 | spin_unlock(&mm->page_table_lock); |
96 | 101 | ||
97 | if (!ctx_valid || (old_mm != mm)) { | 102 | if (!ctx_valid || (old_mm != mm)) { |
98 | if (!ctx_valid) | ||
99 | get_new_mmu_context(mm); | ||
100 | |||
101 | load_secondary_context(mm); | 103 | load_secondary_context(mm); |
102 | reload_tlbmiss_state(tsk, mm); | 104 | reload_tlbmiss_state(tsk, mm); |
103 | } | 105 | } |
104 | 106 | ||
105 | { | 107 | /* Even if (mm == old_mm) we _must_ check |
106 | int cpu = smp_processor_id(); | 108 | * the cpu_vm_mask. If we do not we could |
107 | 109 | * corrupt the TLB state because of how | |
108 | /* Even if (mm == old_mm) we _must_ check | 110 | * smp_flush_tlb_{page,range,mm} on sparc64 |
109 | * the cpu_vm_mask. If we do not we could | 111 | * and lazy tlb switches work. -DaveM |
110 | * corrupt the TLB state because of how | 112 | */ |
111 | * smp_flush_tlb_{page,range,mm} on sparc64 | 113 | cpu = smp_processor_id(); |
112 | * and lazy tlb switches work. -DaveM | 114 | if (!ctx_valid || !cpu_isset(cpu, mm->cpu_vm_mask)) { |
113 | */ | 115 | cpu_set(cpu, mm->cpu_vm_mask); |
114 | if (!ctx_valid || !cpu_isset(cpu, mm->cpu_vm_mask)) { | 116 | __flush_tlb_mm(CTX_HWBITS(mm->context), |
115 | cpu_set(cpu, mm->cpu_vm_mask); | 117 | SECONDARY_CONTEXT); |
116 | __flush_tlb_mm(CTX_HWBITS(mm->context), | ||
117 | SECONDARY_CONTEXT); | ||
118 | } | ||
119 | } | 118 | } |
120 | spin_unlock(&mm->page_table_lock); | ||
121 | } | 119 | } |
122 | 120 | ||
123 | #define deactivate_mm(tsk,mm) do { } while (0) | 121 | #define deactivate_mm(tsk,mm) do { } while (0) |
@@ -127,6 +125,10 @@ static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm | |||
127 | { | 125 | { |
128 | int cpu; | 126 | int cpu; |
129 | 127 | ||
128 | /* Note: page_table_lock is used here to serialize switch_mm | ||
129 | * and activate_mm, and their calls to get_new_mmu_context. | ||
130 | * This use of page_table_lock is unrelated to its other uses. | ||
131 | */ | ||
130 | spin_lock(&mm->page_table_lock); | 132 | spin_lock(&mm->page_table_lock); |
131 | if (!CTX_VALID(mm->context)) | 133 | if (!CTX_VALID(mm->context)) |
132 | get_new_mmu_context(mm); | 134 | get_new_mmu_context(mm); |
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index 9777a9cca88a..ee26a071c677 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h | |||
@@ -38,15 +38,6 @@ struct sunos_ttysize { | |||
38 | int st_columns; /* Columns on the terminal */ | 38 | int st_columns; /* Columns on the terminal */ |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* Used for packet mode */ | ||
42 | #define TIOCPKT_DATA 0 | ||
43 | #define TIOCPKT_FLUSHREAD 1 | ||
44 | #define TIOCPKT_FLUSHWRITE 2 | ||
45 | #define TIOCPKT_STOP 4 | ||
46 | #define TIOCPKT_START 8 | ||
47 | #define TIOCPKT_NOSTOP 16 | ||
48 | #define TIOCPKT_DOSTOP 32 | ||
49 | |||
50 | struct winsize { | 41 | struct winsize { |
51 | unsigned short ws_row; | 42 | unsigned short ws_row; |
52 | unsigned short ws_col; | 43 | unsigned short ws_col; |
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h index 66138d959df5..61c01882b562 100644 --- a/include/asm-sparc64/tlb.h +++ b/include/asm-sparc64/tlb.h | |||
@@ -58,11 +58,9 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, unsigned i | |||
58 | static inline void tlb_flush_mmu(struct mmu_gather *mp) | 58 | static inline void tlb_flush_mmu(struct mmu_gather *mp) |
59 | { | 59 | { |
60 | if (mp->need_flush) { | 60 | if (mp->need_flush) { |
61 | free_pages_and_swap_cache(mp->pages, mp->pages_nr); | ||
62 | mp->pages_nr = 0; | ||
61 | mp->need_flush = 0; | 63 | mp->need_flush = 0; |
62 | if (!tlb_fast_mode(mp)) { | ||
63 | free_pages_and_swap_cache(mp->pages, mp->pages_nr); | ||
64 | mp->pages_nr = 0; | ||
65 | } | ||
66 | } | 64 | } |
67 | 65 | ||
68 | } | 66 | } |
@@ -78,11 +76,9 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un | |||
78 | { | 76 | { |
79 | tlb_flush_mmu(mp); | 77 | tlb_flush_mmu(mp); |
80 | 78 | ||
81 | if (mp->fullmm) { | 79 | if (mp->fullmm) |
82 | if (CTX_VALID(mp->mm->context)) | ||
83 | do_flush_tlb_mm(mp->mm); | ||
84 | mp->fullmm = 0; | 80 | mp->fullmm = 0; |
85 | } else | 81 | else |
86 | flush_tlb_pending(); | 82 | flush_tlb_pending(); |
87 | 83 | ||
88 | /* keep the page table cache within bounds */ | 84 | /* keep the page table cache within bounds */ |
@@ -93,11 +89,11 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un | |||
93 | 89 | ||
94 | static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) | 90 | static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) |
95 | { | 91 | { |
96 | mp->need_flush = 1; | ||
97 | if (tlb_fast_mode(mp)) { | 92 | if (tlb_fast_mode(mp)) { |
98 | free_page_and_swap_cache(page); | 93 | free_page_and_swap_cache(page); |
99 | return; | 94 | return; |
100 | } | 95 | } |
96 | mp->need_flush = 1; | ||
101 | mp->pages[mp->pages_nr++] = page; | 97 | mp->pages[mp->pages_nr++] = page; |
102 | if (mp->pages_nr >= FREE_PTE_NR) | 98 | if (mp->pages_nr >= FREE_PTE_NR) |
103 | tlb_flush_mmu(mp); | 99 | tlb_flush_mmu(mp); |
diff --git a/include/asm-sparc64/vuid_event.h b/include/asm-sparc64/vuid_event.h deleted file mode 100644 index 9ef4d17ad08f..000000000000 --- a/include/asm-sparc64/vuid_event.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* SunOS Virtual User Input Device (VUID) compatibility */ | ||
2 | |||
3 | typedef struct firm_event { | ||
4 | unsigned short id; /* tag for this event */ | ||
5 | unsigned char pair_type; /* unused by X11 */ | ||
6 | unsigned char pair; /* unused by X11 */ | ||
7 | int value; /* VKEY_UP, VKEY_DOWN or delta */ | ||
8 | struct timeval time; | ||
9 | } Firm_event; | ||
10 | |||
11 | enum { | ||
12 | FE_PAIR_NONE, | ||
13 | FE_PAIR_SET, | ||
14 | FE_PAIR_DELTA, | ||
15 | FE_PAIR_ABSOLUTE | ||
16 | }; | ||
17 | |||
18 | /* VUID stream formats */ | ||
19 | #define VUID_NATIVE 0 /* Native byte stream format */ | ||
20 | #define VUID_FIRM_EVENT 1 /* send firm_event structures */ | ||
21 | |||
22 | /* ioctls */ | ||
23 | /* Set input device byte stream format (any of VUID_{NATIVE,FIRM_EVENT}) */ | ||
24 | #define VUIDSFORMAT _IOW('v', 1, int) | ||
25 | /* Retrieve input device byte stream format */ | ||
26 | #define VUIDGFORMAT _IOR('v', 2, int) | ||
27 | |||
28 | /* Possible tag values */ | ||
29 | /* mouse buttons: */ | ||
30 | #define MS_LEFT 0x7f20 | ||
31 | #define MS_MIDDLE 0x7f21 | ||
32 | #define MS_RIGHT 0x7f22 | ||
33 | /* motion: */ | ||
34 | #define LOC_X_DELTA 0x7f80 | ||
35 | #define LOC_Y_DELTA 0x7f81 | ||
36 | #define LOC_X_ABSOLUTE 0x7f82 /* X compat, unsupported */ | ||
37 | #define LOC_Y_ABSOLUTE 0x7f83 /* X compat, unsupported */ | ||
38 | |||
39 | #define VKEY_UP 0 | ||
40 | #define VKEY_DOWN 1 | ||
diff --git a/include/linux/acct.h b/include/linux/acct.h index 19f70462b3be..93c5b3cdf951 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -117,12 +117,15 @@ struct acct_v3 | |||
117 | #include <linux/config.h> | 117 | #include <linux/config.h> |
118 | 118 | ||
119 | #ifdef CONFIG_BSD_PROCESS_ACCT | 119 | #ifdef CONFIG_BSD_PROCESS_ACCT |
120 | struct vfsmount; | ||
120 | struct super_block; | 121 | struct super_block; |
122 | extern void acct_auto_close_mnt(struct vfsmount *m); | ||
121 | extern void acct_auto_close(struct super_block *sb); | 123 | extern void acct_auto_close(struct super_block *sb); |
122 | extern void acct_process(long exitcode); | 124 | extern void acct_process(long exitcode); |
123 | extern void acct_update_integrals(struct task_struct *tsk); | 125 | extern void acct_update_integrals(struct task_struct *tsk); |
124 | extern void acct_clear_integrals(struct task_struct *tsk); | 126 | extern void acct_clear_integrals(struct task_struct *tsk); |
125 | #else | 127 | #else |
128 | #define acct_auto_close_mnt(x) do { } while (0) | ||
126 | #define acct_auto_close(x) do { } while (0) | 129 | #define acct_auto_close(x) do { } while (0) |
127 | #define acct_process(x) do { } while (0) | 130 | #define acct_process(x) do { } while (0) |
128 | #define acct_update_integrals(x) do { } while (0) | 131 | #define acct_update_integrals(x) do { } while (0) |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index ecb0d39c0798..2209ad3499a3 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -10,6 +10,10 @@ | |||
10 | #define ULONG_IOCTL(cmd) HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)sys_ioctl) | 10 | #define ULONG_IOCTL(cmd) HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)sys_ioctl) |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | |||
14 | COMPATIBLE_IOCTL(0x4B50) /* KDGHWCLK - not in the kernel, but don't complain */ | ||
15 | COMPATIBLE_IOCTL(0x4B51) /* KDSHWCLK - not in the kernel, but don't complain */ | ||
16 | |||
13 | /* Big T */ | 17 | /* Big T */ |
14 | COMPATIBLE_IOCTL(TCGETA) | 18 | COMPATIBLE_IOCTL(TCGETA) |
15 | COMPATIBLE_IOCTL(TCSETA) | 19 | COMPATIBLE_IOCTL(TCSETA) |
@@ -52,13 +56,6 @@ ULONG_IOCTL(TIOCSCTTY) | |||
52 | COMPATIBLE_IOCTL(TIOCGPTN) | 56 | COMPATIBLE_IOCTL(TIOCGPTN) |
53 | COMPATIBLE_IOCTL(TIOCSPTLCK) | 57 | COMPATIBLE_IOCTL(TIOCSPTLCK) |
54 | COMPATIBLE_IOCTL(TIOCSERGETLSR) | 58 | COMPATIBLE_IOCTL(TIOCSERGETLSR) |
55 | /* Big F */ | ||
56 | COMPATIBLE_IOCTL(FBIOBLANK) | ||
57 | COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO) | ||
58 | COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO) | ||
59 | COMPATIBLE_IOCTL(FBIOPAN_DISPLAY) | ||
60 | COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP) | ||
61 | COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP) | ||
62 | /* Little f */ | 59 | /* Little f */ |
63 | COMPATIBLE_IOCTL(FIOCLEX) | 60 | COMPATIBLE_IOCTL(FIOCLEX) |
64 | COMPATIBLE_IOCTL(FIONCLEX) | 61 | COMPATIBLE_IOCTL(FIONCLEX) |
@@ -81,6 +78,8 @@ COMPATIBLE_IOCTL(HDIO_DRIVE_CMD) | |||
81 | COMPATIBLE_IOCTL(HDIO_DRIVE_TASK) | 78 | COMPATIBLE_IOCTL(HDIO_DRIVE_TASK) |
82 | COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE) | 79 | COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE) |
83 | COMPATIBLE_IOCTL(HDIO_SET_NICE) | 80 | COMPATIBLE_IOCTL(HDIO_SET_NICE) |
81 | COMPATIBLE_IOCTL(HDIO_SET_KEEPSETTINGS) | ||
82 | COMPATIBLE_IOCTL(HDIO_SCAN_HWIF) | ||
84 | /* 0x02 -- Floppy ioctls */ | 83 | /* 0x02 -- Floppy ioctls */ |
85 | COMPATIBLE_IOCTL(FDMSGON) | 84 | COMPATIBLE_IOCTL(FDMSGON) |
86 | COMPATIBLE_IOCTL(FDMSGOFF) | 85 | COMPATIBLE_IOCTL(FDMSGOFF) |
@@ -99,6 +98,7 @@ COMPATIBLE_IOCTL(FDTWADDLE) | |||
99 | COMPATIBLE_IOCTL(FDFMTTRK) | 98 | COMPATIBLE_IOCTL(FDFMTTRK) |
100 | COMPATIBLE_IOCTL(FDRAWCMD) | 99 | COMPATIBLE_IOCTL(FDRAWCMD) |
101 | /* 0x12 */ | 100 | /* 0x12 */ |
101 | COMPATIBLE_IOCTL(BLKRASET) | ||
102 | COMPATIBLE_IOCTL(BLKROSET) | 102 | COMPATIBLE_IOCTL(BLKROSET) |
103 | COMPATIBLE_IOCTL(BLKROGET) | 103 | COMPATIBLE_IOCTL(BLKROGET) |
104 | COMPATIBLE_IOCTL(BLKRRPART) | 104 | COMPATIBLE_IOCTL(BLKRRPART) |
@@ -262,6 +262,7 @@ COMPATIBLE_IOCTL(RTC_WKALM_RD) | |||
262 | /* Little m */ | 262 | /* Little m */ |
263 | COMPATIBLE_IOCTL(MTIOCTOP) | 263 | COMPATIBLE_IOCTL(MTIOCTOP) |
264 | /* Socket level stuff */ | 264 | /* Socket level stuff */ |
265 | COMPATIBLE_IOCTL(FIOQSIZE) | ||
265 | COMPATIBLE_IOCTL(FIOSETOWN) | 266 | COMPATIBLE_IOCTL(FIOSETOWN) |
266 | COMPATIBLE_IOCTL(SIOCSPGRP) | 267 | COMPATIBLE_IOCTL(SIOCSPGRP) |
267 | COMPATIBLE_IOCTL(FIOGETOWN) | 268 | COMPATIBLE_IOCTL(FIOGETOWN) |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 1f7b2c097503..43c44530ef9d 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -42,6 +42,7 @@ struct notifier_block; | |||
42 | /* Need to know about CPUs going up/down? */ | 42 | /* Need to know about CPUs going up/down? */ |
43 | extern int register_cpu_notifier(struct notifier_block *nb); | 43 | extern int register_cpu_notifier(struct notifier_block *nb); |
44 | extern void unregister_cpu_notifier(struct notifier_block *nb); | 44 | extern void unregister_cpu_notifier(struct notifier_block *nb); |
45 | extern int current_in_cpu_hotplug(void); | ||
45 | 46 | ||
46 | int cpu_up(unsigned int cpu); | 47 | int cpu_up(unsigned int cpu); |
47 | 48 | ||
@@ -54,6 +55,10 @@ static inline int register_cpu_notifier(struct notifier_block *nb) | |||
54 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | 55 | static inline void unregister_cpu_notifier(struct notifier_block *nb) |
55 | { | 56 | { |
56 | } | 57 | } |
58 | static inline int current_in_cpu_hotplug(void) | ||
59 | { | ||
60 | return 0; | ||
61 | } | ||
57 | 62 | ||
58 | #endif /* CONFIG_SMP */ | 63 | #endif /* CONFIG_SMP */ |
59 | extern struct sysdev_class cpu_sysdev_class; | 64 | extern struct sysdev_class cpu_sysdev_class; |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index ab04b4f9b0db..46a2ba617595 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -329,6 +329,7 @@ static inline int d_mountpoint(struct dentry *dentry) | |||
329 | } | 329 | } |
330 | 330 | ||
331 | extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *); | 331 | extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *); |
332 | extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int); | ||
332 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); | 333 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); |
333 | 334 | ||
334 | extern int sysctl_vfs_cache_pressure; | 335 | extern int sysctl_vfs_cache_pressure; |
diff --git a/include/linux/eeprom.h b/include/linux/eeprom.h deleted file mode 100644 index 38afd9da1dfe..000000000000 --- a/include/linux/eeprom.h +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | /* credit winbond-840.c | ||
2 | */ | ||
3 | #include <asm/io.h> | ||
4 | struct eeprom_ops { | ||
5 | void (*set_cs)(void *ee); | ||
6 | void (*clear_cs)(void *ee); | ||
7 | }; | ||
8 | |||
9 | #define EEPOL_EEDI 0x01 | ||
10 | #define EEPOL_EEDO 0x02 | ||
11 | #define EEPOL_EECLK 0x04 | ||
12 | #define EEPOL_EESEL 0x08 | ||
13 | |||
14 | struct eeprom { | ||
15 | void *dev; | ||
16 | struct eeprom_ops *ops; | ||
17 | |||
18 | void __iomem * addr; | ||
19 | |||
20 | unsigned ee_addr_bits; | ||
21 | |||
22 | unsigned eesel; | ||
23 | unsigned eeclk; | ||
24 | unsigned eedo; | ||
25 | unsigned eedi; | ||
26 | unsigned polarity; | ||
27 | unsigned ee_state; | ||
28 | |||
29 | spinlock_t *lock; | ||
30 | u32 *cache; | ||
31 | }; | ||
32 | |||
33 | |||
34 | u8 eeprom_readb(struct eeprom *ee, unsigned address); | ||
35 | void eeprom_read(struct eeprom *ee, unsigned address, u8 *bytes, | ||
36 | unsigned count); | ||
37 | void eeprom_writeb(struct eeprom *ee, unsigned address, u8 data); | ||
38 | void eeprom_write(struct eeprom *ee, unsigned address, u8 *bytes, | ||
39 | unsigned count); | ||
40 | |||
41 | /* The EEPROM commands include the alway-set leading bit. */ | ||
42 | enum EEPROM_Cmds { | ||
43 | EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6), | ||
44 | }; | ||
45 | |||
46 | void setup_ee_mem_bitbanger(struct eeprom *ee, void __iomem *memaddr, int eesel_bit, int eeclk_bit, int eedo_bit, int eedi_bit, unsigned polarity) | ||
47 | { | ||
48 | ee->addr = memaddr; | ||
49 | ee->eesel = 1 << eesel_bit; | ||
50 | ee->eeclk = 1 << eeclk_bit; | ||
51 | ee->eedo = 1 << eedo_bit; | ||
52 | ee->eedi = 1 << eedi_bit; | ||
53 | |||
54 | ee->polarity = polarity; | ||
55 | |||
56 | *ee->cache = readl(ee->addr); | ||
57 | } | ||
58 | |||
59 | /* foo. put this in a .c file */ | ||
60 | static inline void eeprom_update(struct eeprom *ee, u32 mask, int pol) | ||
61 | { | ||
62 | unsigned long flags; | ||
63 | u32 data; | ||
64 | |||
65 | spin_lock_irqsave(ee->lock, flags); | ||
66 | data = *ee->cache; | ||
67 | |||
68 | data &= ~mask; | ||
69 | if (pol) | ||
70 | data |= mask; | ||
71 | |||
72 | *ee->cache = data; | ||
73 | //printk("update: %08x\n", data); | ||
74 | writel(data, ee->addr); | ||
75 | spin_unlock_irqrestore(ee->lock, flags); | ||
76 | } | ||
77 | |||
78 | void eeprom_clk_lo(struct eeprom *ee) | ||
79 | { | ||
80 | int pol = !!(ee->polarity & EEPOL_EECLK); | ||
81 | |||
82 | eeprom_update(ee, ee->eeclk, pol); | ||
83 | udelay(2); | ||
84 | } | ||
85 | |||
86 | void eeprom_clk_hi(struct eeprom *ee) | ||
87 | { | ||
88 | int pol = !!(ee->polarity & EEPOL_EECLK); | ||
89 | |||
90 | eeprom_update(ee, ee->eeclk, !pol); | ||
91 | udelay(2); | ||
92 | } | ||
93 | |||
94 | void eeprom_send_addr(struct eeprom *ee, unsigned address) | ||
95 | { | ||
96 | int pol = !!(ee->polarity & EEPOL_EEDI); | ||
97 | unsigned i; | ||
98 | address |= 6 << 6; | ||
99 | |||
100 | /* Shift the read command bits out. */ | ||
101 | for (i=0; i<11; i++) { | ||
102 | eeprom_update(ee, ee->eedi, ((address >> 10) & 1) ^ pol); | ||
103 | address <<= 1; | ||
104 | eeprom_clk_hi(ee); | ||
105 | eeprom_clk_lo(ee); | ||
106 | } | ||
107 | eeprom_update(ee, ee->eedi, pol); | ||
108 | } | ||
109 | |||
110 | u16 eeprom_readw(struct eeprom *ee, unsigned address) | ||
111 | { | ||
112 | unsigned i; | ||
113 | u16 res = 0; | ||
114 | |||
115 | eeprom_clk_lo(ee); | ||
116 | eeprom_update(ee, ee->eesel, 1 ^ !!(ee->polarity & EEPOL_EESEL)); | ||
117 | eeprom_send_addr(ee, address); | ||
118 | |||
119 | for (i=0; i<16; i++) { | ||
120 | u32 data; | ||
121 | eeprom_clk_hi(ee); | ||
122 | res <<= 1; | ||
123 | data = readl(ee->addr); | ||
124 | //printk("eeprom_readw: %08x\n", data); | ||
125 | res |= !!(data & ee->eedo) ^ !!(ee->polarity & EEPOL_EEDO); | ||
126 | eeprom_clk_lo(ee); | ||
127 | } | ||
128 | eeprom_update(ee, ee->eesel, 0 ^ !!(ee->polarity & EEPOL_EESEL)); | ||
129 | |||
130 | return res; | ||
131 | } | ||
132 | |||
133 | |||
134 | void eeprom_writeb(struct eeprom *ee, unsigned address, u8 data) | ||
135 | { | ||
136 | } | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index e7ff98e395f6..04a58f33ec53 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -201,6 +201,14 @@ struct fb_bitfield { | |||
201 | #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ | 201 | #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ |
202 | #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ | 202 | #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ |
203 | 203 | ||
204 | /* | ||
205 | * Display rotation support | ||
206 | */ | ||
207 | #define FB_ROTATE_UR 0 | ||
208 | #define FB_ROTATE_CW 1 | ||
209 | #define FB_ROTATE_UD 2 | ||
210 | #define FB_ROTATE_CCW 3 | ||
211 | |||
204 | #define PICOS2KHZ(a) (1000000000UL/(a)) | 212 | #define PICOS2KHZ(a) (1000000000UL/(a)) |
205 | #define KHZ2PICOS(a) (1000000000UL/(a)) | 213 | #define KHZ2PICOS(a) (1000000000UL/(a)) |
206 | 214 | ||
@@ -489,9 +497,9 @@ struct fb_cursor_user { | |||
489 | #define FB_EVENT_MODE_DELETE 0x04 | 497 | #define FB_EVENT_MODE_DELETE 0x04 |
490 | /* A driver registered itself */ | 498 | /* A driver registered itself */ |
491 | #define FB_EVENT_FB_REGISTERED 0x05 | 499 | #define FB_EVENT_FB_REGISTERED 0x05 |
492 | /* get console to framebuffer mapping */ | 500 | /* CONSOLE-SPECIFIC: get console to framebuffer mapping */ |
493 | #define FB_EVENT_GET_CONSOLE_MAP 0x06 | 501 | #define FB_EVENT_GET_CONSOLE_MAP 0x06 |
494 | /* set console to framebuffer mapping */ | 502 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ |
495 | #define FB_EVENT_SET_CONSOLE_MAP 0x07 | 503 | #define FB_EVENT_SET_CONSOLE_MAP 0x07 |
496 | /* A display blank is requested */ | 504 | /* A display blank is requested */ |
497 | #define FB_EVENT_BLANK 0x08 | 505 | #define FB_EVENT_BLANK 0x08 |
@@ -500,6 +508,12 @@ struct fb_cursor_user { | |||
500 | /* The resolution of the passed in fb_info about to change and | 508 | /* The resolution of the passed in fb_info about to change and |
501 | all vc's should be changed */ | 509 | all vc's should be changed */ |
502 | #define FB_EVENT_MODE_CHANGE_ALL 0x0A | 510 | #define FB_EVENT_MODE_CHANGE_ALL 0x0A |
511 | /* CONSOLE-SPECIFIC: set console rotation */ | ||
512 | #define FB_EVENT_SET_CON_ROTATE 0x0B | ||
513 | /* CONSOLE-SPECIFIC: get console rotation */ | ||
514 | #define FB_EVENT_GET_CON_ROTATE 0x0C | ||
515 | /* CONSOLE-SPECIFIC: rotate all consoles */ | ||
516 | #define FB_EVENT_SET_CON_ROTATE_ALL 0x0D | ||
503 | 517 | ||
504 | struct fb_event { | 518 | struct fb_event { |
505 | struct fb_info *info; | 519 | struct fb_info *info; |
@@ -817,8 +831,8 @@ extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image); | |||
817 | /* drivers/video/fbmem.c */ | 831 | /* drivers/video/fbmem.c */ |
818 | extern int register_framebuffer(struct fb_info *fb_info); | 832 | extern int register_framebuffer(struct fb_info *fb_info); |
819 | extern int unregister_framebuffer(struct fb_info *fb_info); | 833 | extern int unregister_framebuffer(struct fb_info *fb_info); |
820 | extern int fb_prepare_logo(struct fb_info *fb_info); | 834 | extern int fb_prepare_logo(struct fb_info *fb_info, int rotate); |
821 | extern int fb_show_logo(struct fb_info *fb_info); | 835 | extern int fb_show_logo(struct fb_info *fb_info, int rotate); |
822 | extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size); | 836 | extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size); |
823 | extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx, | 837 | extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx, |
824 | u32 height, u32 shift_high, u32 shift_low, u32 mod); | 838 | u32 height, u32 shift_high, u32 shift_low, u32 mod); |
@@ -828,6 +842,7 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, | |||
828 | struct fb_fix_screeninfo *fix); | 842 | struct fb_fix_screeninfo *fix); |
829 | extern int fb_get_options(char *name, char **option); | 843 | extern int fb_get_options(char *name, char **option); |
830 | extern int fb_new_modelist(struct fb_info *info); | 844 | extern int fb_new_modelist(struct fb_info *info); |
845 | extern int fb_con_duit(struct fb_info *info, int event, void *data); | ||
831 | 846 | ||
832 | extern struct fb_info *registered_fb[FB_MAX]; | 847 | extern struct fb_info *registered_fb[FB_MAX]; |
833 | extern int num_registered_fb; | 848 | extern int num_registered_fb; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9a593ef262ef..cc35b6ac778d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -104,6 +104,10 @@ extern int dir_notify_enable; | |||
104 | #define MS_MOVE 8192 | 104 | #define MS_MOVE 8192 |
105 | #define MS_REC 16384 | 105 | #define MS_REC 16384 |
106 | #define MS_VERBOSE 32768 | 106 | #define MS_VERBOSE 32768 |
107 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ | ||
108 | #define MS_PRIVATE (1<<18) /* change to private */ | ||
109 | #define MS_SLAVE (1<<19) /* change to slave */ | ||
110 | #define MS_SHARED (1<<20) /* change to shared */ | ||
107 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ | 111 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ |
108 | #define MS_ACTIVE (1<<30) | 112 | #define MS_ACTIVE (1<<30) |
109 | #define MS_NOUSER (1<<31) | 113 | #define MS_NOUSER (1<<31) |
@@ -870,6 +874,7 @@ static inline void unlock_super(struct super_block * sb) | |||
870 | /* | 874 | /* |
871 | * VFS helper functions.. | 875 | * VFS helper functions.. |
872 | */ | 876 | */ |
877 | extern int vfs_permission(struct nameidata *, int); | ||
873 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); | 878 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); |
874 | extern int vfs_mkdir(struct inode *, struct dentry *, int); | 879 | extern int vfs_mkdir(struct inode *, struct dentry *, int); |
875 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); | 880 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); |
@@ -885,6 +890,11 @@ extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct de | |||
885 | extern void dentry_unhash(struct dentry *dentry); | 890 | extern void dentry_unhash(struct dentry *dentry); |
886 | 891 | ||
887 | /* | 892 | /* |
893 | * VFS file helper functions. | ||
894 | */ | ||
895 | extern int file_permission(struct file *, int); | ||
896 | |||
897 | /* | ||
888 | * File types | 898 | * File types |
889 | * | 899 | * |
890 | * NOTE! These match bits 12..15 of stat.st_mode | 900 | * NOTE! These match bits 12..15 of stat.st_mode |
@@ -1249,7 +1259,12 @@ extern int unregister_filesystem(struct file_system_type *); | |||
1249 | extern struct vfsmount *kern_mount(struct file_system_type *); | 1259 | extern struct vfsmount *kern_mount(struct file_system_type *); |
1250 | extern int may_umount_tree(struct vfsmount *); | 1260 | extern int may_umount_tree(struct vfsmount *); |
1251 | extern int may_umount(struct vfsmount *); | 1261 | extern int may_umount(struct vfsmount *); |
1262 | extern void umount_tree(struct vfsmount *, int, struct list_head *); | ||
1263 | extern void release_mounts(struct list_head *); | ||
1252 | extern long do_mount(char *, char *, char *, unsigned long, void *); | 1264 | extern long do_mount(char *, char *, char *, unsigned long, void *); |
1265 | extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); | ||
1266 | extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, | ||
1267 | struct vfsmount *); | ||
1253 | 1268 | ||
1254 | extern int vfs_statfs(struct super_block *, struct kstatfs *); | 1269 | extern int vfs_statfs(struct super_block *, struct kstatfs *); |
1255 | 1270 | ||
diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h index bef23bbf8690..783c476b8674 100644 --- a/include/linux/fs_enet_pd.h +++ b/include/linux/fs_enet_pd.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #ifndef FS_ENET_PD_H | 16 | #ifndef FS_ENET_PD_H |
17 | #define FS_ENET_PD_H | 17 | #define FS_ENET_PD_H |
18 | 18 | ||
19 | #include <linux/version.h> | ||
20 | #include <asm/types.h> | 19 | #include <asm/types.h> |
21 | 20 | ||
22 | #define FS_ENET_NAME "fs_enet" | 21 | #define FS_ENET_NAME "fs_enet" |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 1ce4b54caa21..74abaecdb572 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -27,10 +27,10 @@ | |||
27 | * ---- Driver types ----------------------------------------------------- | 27 | * ---- Driver types ----------------------------------------------------- |
28 | * device id name + number function description, i2c address(es) | 28 | * device id name + number function description, i2c address(es) |
29 | * | 29 | * |
30 | * Range 1000-1999 range is defined in sensors/sensors.h | 30 | * Range 1000-1999 range is defined in sensors/sensors.h |
31 | * Range 0x100 - 0x1ff is for V4L2 Common Components | 31 | * Range 0x100 - 0x1ff is for V4L2 Common Components |
32 | * Range 0xf000 - 0xffff is reserved for local experimentation, and should | 32 | * Range 0xf000 - 0xffff is reserved for local experimentation, and should |
33 | * never be used in official drivers | 33 | * never be used in official drivers |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #define I2C_DRIVERID_MSP3400 1 | 36 | #define I2C_DRIVERID_MSP3400 1 |
@@ -99,7 +99,14 @@ | |||
99 | #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ | 99 | #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ |
100 | #define I2C_DRIVERID_SAA7114H 64 /* video decoder */ | 100 | #define I2C_DRIVERID_SAA7114H 64 /* video decoder */ |
101 | #define I2C_DRIVERID_DS1374 65 /* DS1374 real time clock */ | 101 | #define I2C_DRIVERID_DS1374 65 /* DS1374 real time clock */ |
102 | 102 | #define I2C_DRIVERID_TDA9874 66 /* TV sound decoder */ | |
103 | #define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ | ||
104 | #define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ | ||
105 | #define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ | ||
106 | #define I2C_DRIVERID_CS53L32A 70 /* cs53l32a audio processor */ | ||
107 | #define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ | ||
108 | #define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */ | ||
109 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ | ||
103 | 110 | ||
104 | #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ | 111 | #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ |
105 | #define I2C_DRIVERID_EXP1 0xF1 | 112 | #define I2C_DRIVERID_EXP1 0xF1 |
@@ -111,7 +118,7 @@ | |||
111 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 118 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
112 | #define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */ | 119 | #define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */ |
113 | 120 | ||
114 | /* IDs -- Use DRIVERIDs 1000-1999 for sensors. | 121 | /* IDs -- Use DRIVERIDs 1000-1999 for sensors. |
115 | These were originally in sensors.h in the lm_sensors package */ | 122 | These were originally in sensors.h in the lm_sensors package */ |
116 | #define I2C_DRIVERID_LM78 1002 | 123 | #define I2C_DRIVERID_LM78 1002 |
117 | #define I2C_DRIVERID_LM75 1003 | 124 | #define I2C_DRIVERID_LM75 1003 |
@@ -190,6 +197,7 @@ | |||
190 | #define I2C_HW_B_NVIDIA 0x01001c /* nvidia framebuffer driver */ | 197 | #define I2C_HW_B_NVIDIA 0x01001c /* nvidia framebuffer driver */ |
191 | #define I2C_HW_B_SAVAGE 0x01001d /* savage framebuffer driver */ | 198 | #define I2C_HW_B_SAVAGE 0x01001d /* savage framebuffer driver */ |
192 | #define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */ | 199 | #define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */ |
200 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ | ||
193 | 201 | ||
194 | /* --- PCF 8584 based algorithms */ | 202 | /* --- PCF 8584 based algorithms */ |
195 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ | 203 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ |
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index 572aff7daa21..768372f07caa 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
@@ -21,7 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * ==FILEVERSION 20000724== | 24 | * ==FILEVERSION 20050812== |
25 | * | 25 | * |
26 | * NOTE TO MAINTAINERS: | 26 | * NOTE TO MAINTAINERS: |
27 | * If you modify this file at all, please set the above date. | 27 | * If you modify this file at all, please set the above date. |
@@ -35,6 +35,8 @@ | |||
35 | #ifndef _IF_PPP_H_ | 35 | #ifndef _IF_PPP_H_ |
36 | #define _IF_PPP_H_ | 36 | #define _IF_PPP_H_ |
37 | 37 | ||
38 | #include <linux/compiler.h> | ||
39 | |||
38 | /* | 40 | /* |
39 | * Packet sizes | 41 | * Packet sizes |
40 | */ | 42 | */ |
@@ -70,7 +72,8 @@ | |||
70 | #define SC_LOG_RAWIN 0x00080000 /* log all chars received */ | 72 | #define SC_LOG_RAWIN 0x00080000 /* log all chars received */ |
71 | #define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */ | 73 | #define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */ |
72 | #define SC_SYNC 0x00200000 /* synchronous serial mode */ | 74 | #define SC_SYNC 0x00200000 /* synchronous serial mode */ |
73 | #define SC_MASK 0x0f200fff /* bits that user can change */ | 75 | #define SC_MUST_COMP 0x00400000 /* no uncompressed packets may be sent or received */ |
76 | #define SC_MASK 0x0f600fff /* bits that user can change */ | ||
74 | 77 | ||
75 | /* state bits */ | 78 | /* state bits */ |
76 | #define SC_XMIT_BUSY 0x10000000 /* (used by isdn_ppp?) */ | 79 | #define SC_XMIT_BUSY 0x10000000 /* (used by isdn_ppp?) */ |
diff --git a/include/linux/if_wanpipe_common.h b/include/linux/if_wanpipe_common.h index f25fec8ee2ca..6e5461d69fdd 100644 --- a/include/linux/if_wanpipe_common.h +++ b/include/linux/if_wanpipe_common.h | |||
@@ -17,8 +17,6 @@ | |||
17 | #ifndef _WANPIPE_SOCK_DRIVER_COMMON_H | 17 | #ifndef _WANPIPE_SOCK_DRIVER_COMMON_H |
18 | #define _WANPIPE_SOCK_DRIVER_COMMON_H | 18 | #define _WANPIPE_SOCK_DRIVER_COMMON_H |
19 | 19 | ||
20 | #include <linux/version.h> | ||
21 | |||
22 | typedef struct { | 20 | typedef struct { |
23 | struct net_device *slave; | 21 | struct net_device *slave; |
24 | atomic_t packet_sent; | 22 | atomic_t packet_sent; |
diff --git a/include/linux/istallion.h b/include/linux/istallion.h index 5f4ee646c119..1f996621bc9c 100644 --- a/include/linux/istallion.h +++ b/include/linux/istallion.h | |||
@@ -21,8 +21,6 @@ | |||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/version.h> | ||
25 | |||
26 | /*****************************************************************************/ | 24 | /*****************************************************************************/ |
27 | #ifndef _ISTALLION_H | 25 | #ifndef _ISTALLION_H |
28 | #define _ISTALLION_H | 26 | #define _ISTALLION_H |
diff --git a/include/linux/libata.h b/include/linux/libata.h index dcd17e7458ab..6f0752219f64 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -214,7 +214,7 @@ struct ata_probe_ent { | |||
214 | struct list_head node; | 214 | struct list_head node; |
215 | struct device *dev; | 215 | struct device *dev; |
216 | const struct ata_port_operations *port_ops; | 216 | const struct ata_port_operations *port_ops; |
217 | Scsi_Host_Template *sht; | 217 | struct scsi_host_template *sht; |
218 | struct ata_ioports port[ATA_MAX_PORTS]; | 218 | struct ata_ioports port[ATA_MAX_PORTS]; |
219 | unsigned int n_ports; | 219 | unsigned int n_ports; |
220 | unsigned int hard_port_no; | 220 | unsigned int hard_port_no; |
@@ -398,7 +398,7 @@ struct ata_port_operations { | |||
398 | }; | 398 | }; |
399 | 399 | ||
400 | struct ata_port_info { | 400 | struct ata_port_info { |
401 | Scsi_Host_Template *sht; | 401 | struct scsi_host_template *sht; |
402 | unsigned long host_flags; | 402 | unsigned long host_flags; |
403 | unsigned long pio_mask; | 403 | unsigned long pio_mask; |
404 | unsigned long mwdma_mask; | 404 | unsigned long mwdma_mask; |
@@ -433,7 +433,7 @@ extern void ata_pci_remove_one (struct pci_dev *pdev); | |||
433 | #endif /* CONFIG_PCI */ | 433 | #endif /* CONFIG_PCI */ |
434 | extern int ata_device_add(const struct ata_probe_ent *ent); | 434 | extern int ata_device_add(const struct ata_probe_ent *ent); |
435 | extern void ata_host_set_remove(struct ata_host_set *host_set); | 435 | extern void ata_host_set_remove(struct ata_host_set *host_set); |
436 | extern int ata_scsi_detect(Scsi_Host_Template *sht); | 436 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
437 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 437 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
438 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 438 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
439 | extern int ata_scsi_error(struct Scsi_Host *host); | 439 | extern int ata_scsi_error(struct Scsi_Host *host); |
diff --git a/include/linux/mount.h b/include/linux/mount.h index f8f39937e301..dd4e83eba933 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -17,12 +17,14 @@ | |||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
19 | 19 | ||
20 | #define MNT_NOSUID 1 | 20 | #define MNT_NOSUID 0x01 |
21 | #define MNT_NODEV 2 | 21 | #define MNT_NODEV 0x02 |
22 | #define MNT_NOEXEC 4 | 22 | #define MNT_NOEXEC 0x04 |
23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ | ||
24 | #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ | ||
25 | #define MNT_PNODE_MASK 0x30 /* propogation flag mask */ | ||
23 | 26 | ||
24 | struct vfsmount | 27 | struct vfsmount { |
25 | { | ||
26 | struct list_head mnt_hash; | 28 | struct list_head mnt_hash; |
27 | struct vfsmount *mnt_parent; /* fs we are mounted on */ | 29 | struct vfsmount *mnt_parent; /* fs we are mounted on */ |
28 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ | 30 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ |
@@ -36,7 +38,12 @@ struct vfsmount | |||
36 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 38 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
37 | struct list_head mnt_list; | 39 | struct list_head mnt_list; |
38 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 40 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
41 | struct list_head mnt_share; /* circular list of shared mounts */ | ||
42 | struct list_head mnt_slave_list;/* list of slave mounts */ | ||
43 | struct list_head mnt_slave; /* slave list entry */ | ||
44 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | ||
39 | struct namespace *mnt_namespace; /* containing namespace */ | 45 | struct namespace *mnt_namespace; /* containing namespace */ |
46 | int mnt_pinned; | ||
40 | }; | 47 | }; |
41 | 48 | ||
42 | static inline struct vfsmount *mntget(struct vfsmount *mnt) | 49 | static inline struct vfsmount *mntget(struct vfsmount *mnt) |
@@ -46,15 +53,9 @@ static inline struct vfsmount *mntget(struct vfsmount *mnt) | |||
46 | return mnt; | 53 | return mnt; |
47 | } | 54 | } |
48 | 55 | ||
49 | extern void __mntput(struct vfsmount *mnt); | 56 | extern void mntput_no_expire(struct vfsmount *mnt); |
50 | 57 | extern void mnt_pin(struct vfsmount *mnt); | |
51 | static inline void mntput_no_expire(struct vfsmount *mnt) | 58 | extern void mnt_unpin(struct vfsmount *mnt); |
52 | { | ||
53 | if (mnt) { | ||
54 | if (atomic_dec_and_test(&mnt->mnt_count)) | ||
55 | __mntput(mnt); | ||
56 | } | ||
57 | } | ||
58 | 59 | ||
59 | static inline void mntput(struct vfsmount *mnt) | 60 | static inline void mntput(struct vfsmount *mnt) |
60 | { | 61 | { |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 39f1430bd6d5..3c9ea4b7adda 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #define __MTD_CFI_H__ | 8 | #define __MTD_CFI_H__ |
9 | 9 | ||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <linux/version.h> | ||
12 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index e95d0463a3e5..b6f2fdae65c6 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <linux/version.h> | ||
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/uio.h> | 19 | #include <linux/uio.h> |
diff --git a/include/linux/namei.h b/include/linux/namei.h index 1c975d0d9e94..455660eafba9 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -74,7 +74,7 @@ extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); | |||
74 | extern void release_open_intent(struct nameidata *); | 74 | extern void release_open_intent(struct nameidata *); |
75 | 75 | ||
76 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); | 76 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); |
77 | extern struct dentry * lookup_hash(struct qstr *, struct dentry *); | 77 | extern struct dentry * lookup_hash(struct nameidata *); |
78 | 78 | ||
79 | extern int follow_down(struct vfsmount **, struct dentry **); | 79 | extern int follow_down(struct vfsmount **, struct dentry **); |
80 | extern int follow_up(struct vfsmount **, struct dentry **); | 80 | extern int follow_up(struct vfsmount **, struct dentry **); |
diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 0e5a86f13b2f..6731977c4c13 100644 --- a/include/linux/namespace.h +++ b/include/linux/namespace.h | |||
@@ -9,7 +9,8 @@ struct namespace { | |||
9 | atomic_t count; | 9 | atomic_t count; |
10 | struct vfsmount * root; | 10 | struct vfsmount * root; |
11 | struct list_head list; | 11 | struct list_head list; |
12 | struct rw_semaphore sem; | 12 | wait_queue_head_t poll; |
13 | int event; | ||
13 | }; | 14 | }; |
14 | 15 | ||
15 | extern int copy_namespace(int, struct task_struct *); | 16 | extern int copy_namespace(int, struct task_struct *); |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index f08e870100f4..72975fa8795d 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -146,7 +146,7 @@ extern void nfnl_unlock(void); | |||
146 | extern int nfnetlink_subsys_register(struct nfnetlink_subsystem *n); | 146 | extern int nfnetlink_subsys_register(struct nfnetlink_subsystem *n); |
147 | extern int nfnetlink_subsys_unregister(struct nfnetlink_subsystem *n); | 147 | extern int nfnetlink_subsys_unregister(struct nfnetlink_subsystem *n); |
148 | 148 | ||
149 | extern int nfattr_parse(struct nfattr *tb[], int maxattr, | 149 | extern void nfattr_parse(struct nfattr *tb[], int maxattr, |
150 | struct nfattr *nfa, int len); | 150 | struct nfattr *nfa, int len); |
151 | 151 | ||
152 | #define nfattr_parse_nested(tb, max, nfa) \ | 152 | #define nfattr_parse_nested(tb, max, nfa) \ |
diff --git a/include/linux/phonedev.h b/include/linux/phonedev.h index d54049eed0c3..a0e31adf3abe 100644 --- a/include/linux/phonedev.h +++ b/include/linux/phonedev.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __LINUX_PHONEDEV_H | 2 | #define __LINUX_PHONEDEV_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/version.h> | ||
6 | 5 | ||
7 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
8 | 7 | ||
diff --git a/include/linux/ppp-comp.h b/include/linux/ppp-comp.h index 7227e653b3be..e86a7a5cf355 100644 --- a/include/linux/ppp-comp.h +++ b/include/linux/ppp-comp.h | |||
@@ -111,6 +111,8 @@ struct compressor { | |||
111 | 111 | ||
112 | /* Used in locking compressor modules */ | 112 | /* Used in locking compressor modules */ |
113 | struct module *owner; | 113 | struct module *owner; |
114 | /* Extra skb space needed by the compressor algorithm */ | ||
115 | unsigned int comp_extra; | ||
114 | }; | 116 | }; |
115 | 117 | ||
116 | /* | 118 | /* |
@@ -191,6 +193,13 @@ struct compressor { | |||
191 | #define DEFLATE_CHK_SEQUENCE 0 | 193 | #define DEFLATE_CHK_SEQUENCE 0 |
192 | 194 | ||
193 | /* | 195 | /* |
196 | * Definitions for MPPE. | ||
197 | */ | ||
198 | |||
199 | #define CI_MPPE 18 /* config option for MPPE */ | ||
200 | #define CILEN_MPPE 6 /* length of config option */ | ||
201 | |||
202 | /* | ||
194 | * Definitions for other, as yet unsupported, compression methods. | 203 | * Definitions for other, as yet unsupported, compression methods. |
195 | */ | 204 | */ |
196 | 205 | ||
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 65ceeaa30652..74488e49166d 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -66,6 +66,7 @@ struct proc_dir_entry { | |||
66 | write_proc_t *write_proc; | 66 | write_proc_t *write_proc; |
67 | atomic_t count; /* use count */ | 67 | atomic_t count; /* use count */ |
68 | int deleted; /* delete flag */ | 68 | int deleted; /* delete flag */ |
69 | void *set; | ||
69 | }; | 70 | }; |
70 | 71 | ||
71 | struct kcore_list { | 72 | struct kcore_list { |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 700ead45084f..f33aeb22c26a 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -289,7 +289,6 @@ struct quota_info { | |||
289 | struct semaphore dqonoff_sem; /* Serialize quotaon & quotaoff */ | 289 | struct semaphore dqonoff_sem; /* Serialize quotaon & quotaoff */ |
290 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ | 290 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ |
291 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ | 291 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ |
292 | struct vfsmount *mnt[MAXQUOTAS]; /* mountpoint entries of filesystems with quota files */ | ||
293 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ | 292 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ |
294 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ | 293 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ |
295 | }; | 294 | }; |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 9de99198caf1..899437802aea 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -6,7 +6,13 @@ | |||
6 | #ifndef BITMAP_H | 6 | #ifndef BITMAP_H |
7 | #define BITMAP_H 1 | 7 | #define BITMAP_H 1 |
8 | 8 | ||
9 | #define BITMAP_MAJOR 3 | 9 | #define BITMAP_MAJOR_LO 3 |
10 | /* version 4 insists the bitmap is in little-endian order | ||
11 | * with version 3, it is host-endian which is non-portable | ||
12 | */ | ||
13 | #define BITMAP_MAJOR_HI 4 | ||
14 | #define BITMAP_MAJOR_HOSTENDIAN 3 | ||
15 | |||
10 | #define BITMAP_MINOR 39 | 16 | #define BITMAP_MINOR 39 |
11 | 17 | ||
12 | /* | 18 | /* |
@@ -133,7 +139,8 @@ typedef __u16 bitmap_counter_t; | |||
133 | /* use these for bitmap->flags and bitmap->sb->state bit-fields */ | 139 | /* use these for bitmap->flags and bitmap->sb->state bit-fields */ |
134 | enum bitmap_state { | 140 | enum bitmap_state { |
135 | BITMAP_ACTIVE = 0x001, /* the bitmap is in use */ | 141 | BITMAP_ACTIVE = 0x001, /* the bitmap is in use */ |
136 | BITMAP_STALE = 0x002 /* the bitmap file is out of date or had -EIO */ | 142 | BITMAP_STALE = 0x002, /* the bitmap file is out of date or had -EIO */ |
143 | BITMAP_HOSTENDIAN = 0x8000, | ||
137 | }; | 144 | }; |
138 | 145 | ||
139 | /* the superblock at the front of the bitmap file -- little endian */ | 146 | /* the superblock at the front of the bitmap file -- little endian */ |
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index ffa316ce4dc8..13e7c4b62367 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
@@ -66,8 +66,10 @@ | |||
66 | * and major_version/minor_version accordingly | 66 | * and major_version/minor_version accordingly |
67 | * >=2 means that Internal bitmaps are supported by setting MD_SB_BITMAP_PRESENT | 67 | * >=2 means that Internal bitmaps are supported by setting MD_SB_BITMAP_PRESENT |
68 | * in the super status byte | 68 | * in the super status byte |
69 | * >=3 means that bitmap superblock version 4 is supported, which uses | ||
70 | * little-ending representation rather than host-endian | ||
69 | */ | 71 | */ |
70 | #define MD_PATCHLEVEL_VERSION 2 | 72 | #define MD_PATCHLEVEL_VERSION 3 |
71 | 73 | ||
72 | extern int register_md_personality (int p_num, mdk_personality_t *p); | 74 | extern int register_md_personality (int p_num, mdk_personality_t *p); |
73 | extern int unregister_md_personality (int p_num); | 75 | extern int unregister_md_personality (int p_num); |
@@ -87,6 +89,7 @@ extern void md_print_devices (void); | |||
87 | 89 | ||
88 | extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | 90 | extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, |
89 | sector_t sector, int size, struct page *page); | 91 | sector_t sector, int size, struct page *page); |
92 | extern void md_super_wait(mddev_t *mddev); | ||
90 | extern int sync_page_io(struct block_device *bdev, sector_t sector, int size, | 93 | extern int sync_page_io(struct block_device *bdev, sector_t sector, int size, |
91 | struct page *page, int rw); | 94 | struct page *page, int rw); |
92 | 95 | ||
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index ebce949b1443..46629a275ba9 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -105,6 +105,8 @@ struct mdk_rdev_s | |||
105 | int sb_size; /* bytes in the superblock */ | 105 | int sb_size; /* bytes in the superblock */ |
106 | int preferred_minor; /* autorun support */ | 106 | int preferred_minor; /* autorun support */ |
107 | 107 | ||
108 | struct kobject kobj; | ||
109 | |||
108 | /* A device can be in one of three states based on two flags: | 110 | /* A device can be in one of three states based on two flags: |
109 | * Not working: faulty==1 in_sync==0 | 111 | * Not working: faulty==1 in_sync==0 |
110 | * Fully working: faulty==0 in_sync==1 | 112 | * Fully working: faulty==0 in_sync==1 |
@@ -115,11 +117,12 @@ struct mdk_rdev_s | |||
115 | * It can never have faulty==1, in_sync==1 | 117 | * It can never have faulty==1, in_sync==1 |
116 | * This reduces the burden of testing multiple flags in many cases | 118 | * This reduces the burden of testing multiple flags in many cases |
117 | */ | 119 | */ |
118 | int faulty; /* if faulty do not issue IO requests */ | ||
119 | int in_sync; /* device is a full member of the array */ | ||
120 | 120 | ||
121 | unsigned long flags; /* Should include faulty and in_sync here. */ | 121 | unsigned long flags; |
122 | #define Faulty 1 /* device is known to have a fault */ | ||
123 | #define In_sync 2 /* device is in_sync with rest of array */ | ||
122 | #define WriteMostly 4 /* Avoid reading if at all possible */ | 124 | #define WriteMostly 4 /* Avoid reading if at all possible */ |
125 | #define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */ | ||
123 | 126 | ||
124 | int desc_nr; /* descriptor index in the superblock */ | 127 | int desc_nr; /* descriptor index in the superblock */ |
125 | int raid_disk; /* role of device in array */ | 128 | int raid_disk; /* role of device in array */ |
@@ -132,6 +135,9 @@ struct mdk_rdev_s | |||
132 | * only maintained for arrays that | 135 | * only maintained for arrays that |
133 | * support hot removal | 136 | * support hot removal |
134 | */ | 137 | */ |
138 | atomic_t read_errors; /* number of consecutive read errors that | ||
139 | * we have tried to ignore. | ||
140 | */ | ||
135 | }; | 141 | }; |
136 | 142 | ||
137 | typedef struct mdk_personality_s mdk_personality_t; | 143 | typedef struct mdk_personality_s mdk_personality_t; |
@@ -148,6 +154,8 @@ struct mddev_s | |||
148 | 154 | ||
149 | struct gendisk *gendisk; | 155 | struct gendisk *gendisk; |
150 | 156 | ||
157 | struct kobject kobj; | ||
158 | |||
151 | /* Superblock information */ | 159 | /* Superblock information */ |
152 | int major_version, | 160 | int major_version, |
153 | minor_version, | 161 | minor_version, |
@@ -171,6 +179,10 @@ struct mddev_s | |||
171 | sector_t resync_mark_cnt;/* blocks written at resync_mark */ | 179 | sector_t resync_mark_cnt;/* blocks written at resync_mark */ |
172 | 180 | ||
173 | sector_t resync_max_sectors; /* may be set by personality */ | 181 | sector_t resync_max_sectors; /* may be set by personality */ |
182 | |||
183 | sector_t resync_mismatches; /* count of sectors where | ||
184 | * parity/replica mismatch found | ||
185 | */ | ||
174 | /* recovery/resync flags | 186 | /* recovery/resync flags |
175 | * NEEDED: we might need to start a resync/recover | 187 | * NEEDED: we might need to start a resync/recover |
176 | * RUNNING: a thread is running, or about to be started | 188 | * RUNNING: a thread is running, or about to be started |
@@ -178,6 +190,8 @@ struct mddev_s | |||
178 | * ERR: and IO error was detected - abort the resync/recovery | 190 | * ERR: and IO error was detected - abort the resync/recovery |
179 | * INTR: someone requested a (clean) early abort. | 191 | * INTR: someone requested a (clean) early abort. |
180 | * DONE: thread is done and is waiting to be reaped | 192 | * DONE: thread is done and is waiting to be reaped |
193 | * REQUEST: user-space has requested a sync (used with SYNC) | ||
194 | * CHECK: user-space request for for check-only, no repair | ||
181 | */ | 195 | */ |
182 | #define MD_RECOVERY_RUNNING 0 | 196 | #define MD_RECOVERY_RUNNING 0 |
183 | #define MD_RECOVERY_SYNC 1 | 197 | #define MD_RECOVERY_SYNC 1 |
@@ -185,6 +199,8 @@ struct mddev_s | |||
185 | #define MD_RECOVERY_INTR 3 | 199 | #define MD_RECOVERY_INTR 3 |
186 | #define MD_RECOVERY_DONE 4 | 200 | #define MD_RECOVERY_DONE 4 |
187 | #define MD_RECOVERY_NEEDED 5 | 201 | #define MD_RECOVERY_NEEDED 5 |
202 | #define MD_RECOVERY_REQUESTED 6 | ||
203 | #define MD_RECOVERY_CHECK 7 | ||
188 | unsigned long recovery; | 204 | unsigned long recovery; |
189 | 205 | ||
190 | int in_sync; /* know to not need resync */ | 206 | int in_sync; /* know to not need resync */ |
@@ -195,6 +211,13 @@ struct mddev_s | |||
195 | int degraded; /* whether md should consider | 211 | int degraded; /* whether md should consider |
196 | * adding a spare | 212 | * adding a spare |
197 | */ | 213 | */ |
214 | int barriers_work; /* initialised to true, cleared as soon | ||
215 | * as a barrier request to slave | ||
216 | * fails. Only supported | ||
217 | */ | ||
218 | struct bio *biolist; /* bios that need to be retried | ||
219 | * because BIO_RW_BARRIER is not supported | ||
220 | */ | ||
198 | 221 | ||
199 | atomic_t recovery_active; /* blocks scheduled, but not written */ | 222 | atomic_t recovery_active; /* blocks scheduled, but not written */ |
200 | wait_queue_head_t recovery_wait; | 223 | wait_queue_head_t recovery_wait; |
@@ -232,7 +255,7 @@ struct mddev_s | |||
232 | 255 | ||
233 | static inline void rdev_dec_pending(mdk_rdev_t *rdev, mddev_t *mddev) | 256 | static inline void rdev_dec_pending(mdk_rdev_t *rdev, mddev_t *mddev) |
234 | { | 257 | { |
235 | int faulty = rdev->faulty; | 258 | int faulty = test_bit(Faulty, &rdev->flags); |
236 | if (atomic_dec_and_test(&rdev->nr_pending) && faulty) | 259 | if (atomic_dec_and_test(&rdev->nr_pending) && faulty) |
237 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 260 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
238 | } | 261 | } |
@@ -270,6 +293,13 @@ struct mdk_personality_s | |||
270 | }; | 293 | }; |
271 | 294 | ||
272 | 295 | ||
296 | struct md_sysfs_entry { | ||
297 | struct attribute attr; | ||
298 | ssize_t (*show)(mddev_t *, char *); | ||
299 | ssize_t (*store)(mddev_t *, const char *, size_t); | ||
300 | }; | ||
301 | |||
302 | |||
273 | static inline char * mdname (mddev_t * mddev) | 303 | static inline char * mdname (mddev_t * mddev) |
274 | { | 304 | { |
275 | return mddev->gendisk ? mddev->gendisk->disk_name : "mdX"; | 305 | return mddev->gendisk ? mddev->gendisk->disk_name : "mdX"; |
@@ -304,10 +334,8 @@ typedef struct mdk_thread_s { | |||
304 | mddev_t *mddev; | 334 | mddev_t *mddev; |
305 | wait_queue_head_t wqueue; | 335 | wait_queue_head_t wqueue; |
306 | unsigned long flags; | 336 | unsigned long flags; |
307 | struct completion *event; | ||
308 | struct task_struct *tsk; | 337 | struct task_struct *tsk; |
309 | unsigned long timeout; | 338 | unsigned long timeout; |
310 | const char *name; | ||
311 | } mdk_thread_t; | 339 | } mdk_thread_t; |
312 | 340 | ||
313 | #define THREAD_WAKEUP 0 | 341 | #define THREAD_WAKEUP 0 |
diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h index 60e19b667548..292b98f2b408 100644 --- a/include/linux/raid/raid1.h +++ b/include/linux/raid/raid1.h | |||
@@ -110,7 +110,9 @@ struct r1bio_s { | |||
110 | #define R1BIO_Uptodate 0 | 110 | #define R1BIO_Uptodate 0 |
111 | #define R1BIO_IsSync 1 | 111 | #define R1BIO_IsSync 1 |
112 | #define R1BIO_Degraded 2 | 112 | #define R1BIO_Degraded 2 |
113 | #define R1BIO_BehindIO 3 | 113 | #define R1BIO_BehindIO 3 |
114 | #define R1BIO_Barrier 4 | ||
115 | #define R1BIO_BarrierRetry 5 | ||
114 | /* For write-behind requests, we call bi_end_io when | 116 | /* For write-behind requests, we call bi_end_io when |
115 | * the last non-write-behind device completes, providing | 117 | * the last non-write-behind device completes, providing |
116 | * any write was successful. Otherwise we call when | 118 | * any write was successful. Otherwise we call when |
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index 176fc653c284..f025ba6fb14c 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
@@ -154,6 +154,8 @@ struct stripe_head { | |||
154 | #define R5_Wantwrite 5 | 154 | #define R5_Wantwrite 5 |
155 | #define R5_Syncio 6 /* this io need to be accounted as resync io */ | 155 | #define R5_Syncio 6 /* this io need to be accounted as resync io */ |
156 | #define R5_Overlap 7 /* There is a pending overlapping request on this block */ | 156 | #define R5_Overlap 7 /* There is a pending overlapping request on this block */ |
157 | #define R5_ReadError 8 /* seen a read error here recently */ | ||
158 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ | ||
157 | 159 | ||
158 | /* | 160 | /* |
159 | * Write method | 161 | * Write method |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 03b68a7b4b82..2bbf968b23d9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -909,6 +909,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) | |||
909 | #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ | 909 | #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ |
910 | #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ | 910 | #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ |
911 | #define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ | 911 | #define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ |
912 | #define PF_HOTPLUG_CPU 0x01000000 /* Currently performing CPU hotplug */ | ||
912 | 913 | ||
913 | /* | 914 | /* |
914 | * Only the _current_ task can read/write to tsk->flags, but other | 915 | * Only the _current_ task can read/write to tsk->flags, but other |
diff --git a/include/linux/stallion.h b/include/linux/stallion.h index e89b77b6505a..13a37f137ea2 100644 --- a/include/linux/stallion.h +++ b/include/linux/stallion.h | |||
@@ -21,8 +21,6 @@ | |||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/version.h> | ||
25 | |||
26 | /*****************************************************************************/ | 24 | /*****************************************************************************/ |
27 | #ifndef _STALLION_H | 25 | #ifndef _STALLION_H |
28 | #define _STALLION_H | 26 | #define _STALLION_H |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index fc8e367f671e..fc131d6602b9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
25 | 25 | ||
26 | struct file; | 26 | struct file; |
27 | struct completion; | ||
27 | 28 | ||
28 | #define CTL_MAXNAME 10 /* how many path components do we allow in a | 29 | #define CTL_MAXNAME 10 /* how many path components do we allow in a |
29 | call to sysctl? In other words, what is | 30 | call to sysctl? In other words, what is |
@@ -925,6 +926,8 @@ struct ctl_table_header | |||
925 | { | 926 | { |
926 | ctl_table *ctl_table; | 927 | ctl_table *ctl_table; |
927 | struct list_head ctl_entry; | 928 | struct list_head ctl_entry; |
929 | int used; | ||
930 | struct completion *unregistering; | ||
928 | }; | 931 | }; |
929 | 932 | ||
930 | struct ctl_table_header * register_sysctl_table(ctl_table * table, | 933 | struct ctl_table_header * register_sysctl_table(ctl_table * table, |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 1cc8c31b7988..91140091ced2 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -1,57 +1,16 @@ | |||
1 | #ifndef __LINUX_VIDEODEV_H | 1 | #ifndef __LINUX_VIDEODEV_H |
2 | #define __LINUX_VIDEODEV_H | 2 | #define __LINUX_VIDEODEV_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | ||
5 | #include <linux/types.h> | 4 | #include <linux/types.h> |
6 | 5 | ||
7 | #define HAVE_V4L2 1 | 6 | #define HAVE_V4L1 1 |
7 | |||
8 | #include <linux/videodev2.h> | 8 | #include <linux/videodev2.h> |
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | #include <linux/poll.h> | ||
13 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
14 | #include <linux/device.h> | ||
15 | |||
16 | struct video_device | ||
17 | { | ||
18 | /* device info */ | ||
19 | struct device *dev; | ||
20 | char name[32]; | ||
21 | int type; /* v4l1 */ | ||
22 | int type2; /* v4l2 */ | ||
23 | int hardware; | ||
24 | int minor; | ||
25 | |||
26 | /* device ops + callbacks */ | ||
27 | struct file_operations *fops; | ||
28 | void (*release)(struct video_device *vfd); | ||
29 | |||
30 | |||
31 | /* obsolete -- fops->owner is used instead */ | ||
32 | struct module *owner; | ||
33 | /* dev->driver_data will be used instead some day. | ||
34 | * Use the video_{get|set}_drvdata() helper functions, | ||
35 | * so the switch over will be transparent for you. | ||
36 | * Or use {pci|usb}_{get|set}_drvdata() directly. */ | ||
37 | void *priv; | ||
38 | |||
39 | /* for videodev.c intenal usage -- please don't touch */ | ||
40 | int users; /* video_exclusive_{open|close} ... */ | ||
41 | struct semaphore lock; /* ... helper function uses these */ | ||
42 | char devfs_name[64]; /* devfs */ | ||
43 | struct class_device class_dev; /* sysfs */ | ||
44 | }; | ||
45 | |||
46 | #define VIDEO_MAJOR 81 | ||
47 | |||
48 | #define VFL_TYPE_GRABBER 0 | ||
49 | #define VFL_TYPE_VBI 1 | ||
50 | #define VFL_TYPE_RADIO 2 | ||
51 | #define VFL_TYPE_VTX 3 | ||
52 | 13 | ||
53 | extern int video_register_device(struct video_device *, int type, int nr); | ||
54 | extern void video_unregister_device(struct video_device *); | ||
55 | extern struct video_device* video_devdata(struct file*); | 14 | extern struct video_device* video_devdata(struct file*); |
56 | 15 | ||
57 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | 16 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) |
@@ -68,11 +27,7 @@ video_device_remove_file(struct video_device *vfd, | |||
68 | class_device_remove_file(&vfd->class_dev, attr); | 27 | class_device_remove_file(&vfd->class_dev, attr); |
69 | } | 28 | } |
70 | 29 | ||
71 | /* helper functions to alloc / release struct video_device, the | 30 | #if OBSOLETE_OWNER /* to be removed in 2.6.15 */ |
72 | later can be used for video_device->release() */ | ||
73 | struct video_device *video_device_alloc(void); | ||
74 | void video_device_release(struct video_device *vfd); | ||
75 | |||
76 | /* helper functions to access driver private data. */ | 31 | /* helper functions to access driver private data. */ |
77 | static inline void *video_get_drvdata(struct video_device *dev) | 32 | static inline void *video_get_drvdata(struct video_device *dev) |
78 | { | 33 | { |
@@ -83,30 +38,12 @@ static inline void video_set_drvdata(struct video_device *dev, void *data) | |||
83 | { | 38 | { |
84 | dev->priv = data; | 39 | dev->priv = data; |
85 | } | 40 | } |
41 | #endif | ||
86 | 42 | ||
87 | extern int video_exclusive_open(struct inode *inode, struct file *file); | 43 | extern int video_exclusive_open(struct inode *inode, struct file *file); |
88 | extern int video_exclusive_release(struct inode *inode, struct file *file); | 44 | extern int video_exclusive_release(struct inode *inode, struct file *file); |
89 | extern int video_usercopy(struct inode *inode, struct file *file, | ||
90 | unsigned int cmd, unsigned long arg, | ||
91 | int (*func)(struct inode *inode, struct file *file, | ||
92 | unsigned int cmd, void *arg)); | ||
93 | #endif /* __KERNEL__ */ | 45 | #endif /* __KERNEL__ */ |
94 | 46 | ||
95 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | ||
96 | #define VID_TYPE_TUNER 2 /* Can tune */ | ||
97 | #define VID_TYPE_TELETEXT 4 /* Does teletext */ | ||
98 | #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ | ||
99 | #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ | ||
100 | #define VID_TYPE_CLIPPING 32 /* Can clip */ | ||
101 | #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ | ||
102 | #define VID_TYPE_SCALES 128 /* Scalable */ | ||
103 | #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ | ||
104 | #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ | ||
105 | #define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ | ||
106 | #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ | ||
107 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ | ||
108 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ | ||
109 | |||
110 | struct video_capability | 47 | struct video_capability |
111 | { | 48 | { |
112 | char name[32]; | 49 | char name[32]; |
@@ -202,9 +139,9 @@ struct video_audio | |||
202 | #define VIDEO_SOUND_STEREO 2 | 139 | #define VIDEO_SOUND_STEREO 2 |
203 | #define VIDEO_SOUND_LANG1 4 | 140 | #define VIDEO_SOUND_LANG1 4 |
204 | #define VIDEO_SOUND_LANG2 8 | 141 | #define VIDEO_SOUND_LANG2 8 |
205 | __u16 mode; | 142 | __u16 mode; |
206 | __u16 balance; /* Stereo balance */ | 143 | __u16 balance; /* Stereo balance */ |
207 | __u16 step; /* Step actual volume uses */ | 144 | __u16 step; /* Step actual volume uses */ |
208 | }; | 145 | }; |
209 | 146 | ||
210 | struct video_clip | 147 | struct video_clip |
@@ -260,9 +197,6 @@ struct video_key | |||
260 | __u32 flags; | 197 | __u32 flags; |
261 | }; | 198 | }; |
262 | 199 | ||
263 | |||
264 | #define VIDEO_MAX_FRAME 32 | ||
265 | |||
266 | struct video_mbuf | 200 | struct video_mbuf |
267 | { | 201 | { |
268 | int size; /* Total memory to map */ | 202 | int size; /* Total memory to map */ |
@@ -270,10 +204,8 @@ struct video_mbuf | |||
270 | int offsets[VIDEO_MAX_FRAME]; | 204 | int offsets[VIDEO_MAX_FRAME]; |
271 | }; | 205 | }; |
272 | 206 | ||
273 | |||
274 | #define VIDEO_NO_UNIT (-1) | 207 | #define VIDEO_NO_UNIT (-1) |
275 | 208 | ||
276 | |||
277 | struct video_unit | 209 | struct video_unit |
278 | { | 210 | { |
279 | int video; /* Video minor */ | 211 | int video; /* Video minor */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 89a055761bed..a114fff6568b 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -15,16 +15,99 @@ | |||
15 | */ | 15 | */ |
16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
17 | #include <linux/time.h> /* need struct timeval */ | 17 | #include <linux/time.h> /* need struct timeval */ |
18 | #include <linux/poll.h> | ||
19 | #include <linux/device.h> | ||
18 | #endif | 20 | #endif |
19 | #include <linux/compiler.h> /* need __user */ | 21 | #include <linux/compiler.h> /* need __user */ |
20 | 22 | ||
23 | |||
24 | #define OBSOLETE_OWNER 1 /* It will be removed for 2.6.15 */ | ||
25 | #define HAVE_V4L2 1 | ||
26 | |||
27 | /* | ||
28 | * Common stuff for both V4L1 and V4L2 | ||
29 | * Moved from videodev.h | ||
30 | */ | ||
31 | |||
32 | #define VIDEO_MAX_FRAME 32 | ||
33 | |||
34 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | ||
35 | #define VID_TYPE_TUNER 2 /* Can tune */ | ||
36 | #define VID_TYPE_TELETEXT 4 /* Does teletext */ | ||
37 | #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ | ||
38 | #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ | ||
39 | #define VID_TYPE_CLIPPING 32 /* Can clip */ | ||
40 | #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ | ||
41 | #define VID_TYPE_SCALES 128 /* Scalable */ | ||
42 | #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ | ||
43 | #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ | ||
44 | #define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ | ||
45 | #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ | ||
46 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ | ||
47 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ | ||
48 | |||
49 | #ifdef __KERNEL__ | ||
50 | |||
51 | #define VFL_TYPE_GRABBER 0 | ||
52 | #define VFL_TYPE_VBI 1 | ||
53 | #define VFL_TYPE_RADIO 2 | ||
54 | #define VFL_TYPE_VTX 3 | ||
55 | |||
56 | struct video_device | ||
57 | { | ||
58 | /* device info */ | ||
59 | struct device *dev; | ||
60 | char name[32]; | ||
61 | int type; /* v4l1 */ | ||
62 | int type2; /* v4l2 */ | ||
63 | int hardware; | ||
64 | int minor; | ||
65 | |||
66 | /* device ops + callbacks */ | ||
67 | struct file_operations *fops; | ||
68 | void (*release)(struct video_device *vfd); | ||
69 | |||
70 | |||
71 | #if OBSOLETE_OWNER /* to be removed in 2.6.15 */ | ||
72 | /* obsolete -- fops->owner is used instead */ | ||
73 | struct module *owner; | ||
74 | /* dev->driver_data will be used instead some day. | ||
75 | * Use the video_{get|set}_drvdata() helper functions, | ||
76 | * so the switch over will be transparent for you. | ||
77 | * Or use {pci|usb}_{get|set}_drvdata() directly. */ | ||
78 | void *priv; | ||
79 | #endif | ||
80 | |||
81 | /* for videodev.c intenal usage -- please don't touch */ | ||
82 | int users; /* video_exclusive_{open|close} ... */ | ||
83 | struct semaphore lock; /* ... helper function uses these */ | ||
84 | char devfs_name[64]; /* devfs */ | ||
85 | struct class_device class_dev; /* sysfs */ | ||
86 | }; | ||
87 | |||
88 | #define VIDEO_MAJOR 81 | ||
89 | |||
90 | extern int video_register_device(struct video_device *, int type, int nr); | ||
91 | extern void video_unregister_device(struct video_device *); | ||
92 | extern int video_usercopy(struct inode *inode, struct file *file, | ||
93 | unsigned int cmd, unsigned long arg, | ||
94 | int (*func)(struct inode *inode, struct file *file, | ||
95 | unsigned int cmd, void *arg)); | ||
96 | |||
97 | /* helper functions to alloc / release struct video_device, the | ||
98 | later can be used for video_device->release() */ | ||
99 | struct video_device *video_device_alloc(void); | ||
100 | void video_device_release(struct video_device *vfd); | ||
101 | |||
102 | #endif | ||
103 | |||
21 | /* | 104 | /* |
22 | * M I S C E L L A N E O U S | 105 | * M I S C E L L A N E O U S |
23 | */ | 106 | */ |
24 | 107 | ||
25 | /* Four-character-code (FOURCC) */ | 108 | /* Four-character-code (FOURCC) */ |
26 | #define v4l2_fourcc(a,b,c,d)\ | 109 | #define v4l2_fourcc(a,b,c,d)\ |
27 | (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) | 110 | (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) |
28 | 111 | ||
29 | /* | 112 | /* |
30 | * E N U M S | 113 | * E N U M S |
@@ -154,20 +237,20 @@ struct v4l2_capability | |||
154 | }; | 237 | }; |
155 | 238 | ||
156 | /* Values for 'capabilities' field */ | 239 | /* Values for 'capabilities' field */ |
157 | #define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ | 240 | #define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ |
158 | #define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ | 241 | #define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ |
159 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ | 242 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ |
160 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ | 243 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ |
161 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ | 244 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ |
162 | #if 1 | 245 | #if 1 |
163 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ | 246 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ |
164 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ | 247 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ |
165 | #endif | 248 | #endif |
166 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | 249 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ |
167 | 250 | ||
168 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 251 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
169 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ | 252 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ |
170 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ | 253 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ |
171 | 254 | ||
172 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ | 255 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ |
173 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ | 256 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ |
@@ -179,13 +262,13 @@ struct v4l2_capability | |||
179 | 262 | ||
180 | struct v4l2_pix_format | 263 | struct v4l2_pix_format |
181 | { | 264 | { |
182 | __u32 width; | 265 | __u32 width; |
183 | __u32 height; | 266 | __u32 height; |
184 | __u32 pixelformat; | 267 | __u32 pixelformat; |
185 | enum v4l2_field field; | 268 | enum v4l2_field field; |
186 | __u32 bytesperline; /* for padding, zero if unused */ | 269 | __u32 bytesperline; /* for padding, zero if unused */ |
187 | __u32 sizeimage; | 270 | __u32 sizeimage; |
188 | enum v4l2_colorspace colorspace; | 271 | enum v4l2_colorspace colorspace; |
189 | __u32 priv; /* private data, depends on pixelformat */ | 272 | __u32 priv; /* private data, depends on pixelformat */ |
190 | }; | 273 | }; |
191 | 274 | ||
@@ -238,12 +321,12 @@ struct v4l2_pix_format | |||
238 | */ | 321 | */ |
239 | struct v4l2_fmtdesc | 322 | struct v4l2_fmtdesc |
240 | { | 323 | { |
241 | __u32 index; /* Format number */ | 324 | __u32 index; /* Format number */ |
242 | enum v4l2_buf_type type; /* buffer type */ | 325 | enum v4l2_buf_type type; /* buffer type */ |
243 | __u32 flags; | 326 | __u32 flags; |
244 | __u8 description[32]; /* Description string */ | 327 | __u8 description[32]; /* Description string */ |
245 | __u32 pixelformat; /* Format fourcc */ | 328 | __u32 pixelformat; /* Format fourcc */ |
246 | __u32 reserved[4]; | 329 | __u32 reserved[4]; |
247 | }; | 330 | }; |
248 | 331 | ||
249 | #define V4L2_FMT_FLAG_COMPRESSED 0x0001 | 332 | #define V4L2_FMT_FLAG_COMPRESSED 0x0001 |
@@ -393,7 +476,7 @@ struct v4l2_jpegcompression | |||
393 | #define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ | 476 | #define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ |
394 | #define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */ | 477 | #define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */ |
395 | #define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will | 478 | #define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will |
396 | * allways use APP0 */ | 479 | * allways use APP0 */ |
397 | }; | 480 | }; |
398 | 481 | ||
399 | 482 | ||
@@ -402,10 +485,10 @@ struct v4l2_jpegcompression | |||
402 | */ | 485 | */ |
403 | struct v4l2_requestbuffers | 486 | struct v4l2_requestbuffers |
404 | { | 487 | { |
405 | __u32 count; | 488 | __u32 count; |
406 | enum v4l2_buf_type type; | 489 | enum v4l2_buf_type type; |
407 | enum v4l2_memory memory; | 490 | enum v4l2_memory memory; |
408 | __u32 reserved[2]; | 491 | __u32 reserved[2]; |
409 | }; | 492 | }; |
410 | 493 | ||
411 | struct v4l2_buffer | 494 | struct v4l2_buffer |
@@ -511,9 +594,9 @@ struct v4l2_outputparm | |||
511 | 594 | ||
512 | struct v4l2_cropcap { | 595 | struct v4l2_cropcap { |
513 | enum v4l2_buf_type type; | 596 | enum v4l2_buf_type type; |
514 | struct v4l2_rect bounds; | 597 | struct v4l2_rect bounds; |
515 | struct v4l2_rect defrect; | 598 | struct v4l2_rect defrect; |
516 | struct v4l2_fract pixelaspect; | 599 | struct v4l2_fract pixelaspect; |
517 | }; | 600 | }; |
518 | 601 | ||
519 | struct v4l2_crop { | 602 | struct v4l2_crop { |
@@ -544,6 +627,7 @@ typedef __u64 v4l2_std_id; | |||
544 | 627 | ||
545 | #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) | 628 | #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) |
546 | #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) | 629 | #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) |
630 | #define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) | ||
547 | 631 | ||
548 | #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) | 632 | #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) |
549 | #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) | 633 | #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) |
@@ -581,13 +665,14 @@ typedef __u64 v4l2_std_id; | |||
581 | 665 | ||
582 | #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ | 666 | #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ |
583 | V4L2_STD_PAL_60 |\ | 667 | V4L2_STD_PAL_60 |\ |
584 | V4L2_STD_NTSC) | 668 | V4L2_STD_NTSC |\ |
669 | V4L2_STD_NTSC_443) | ||
585 | #define V4L2_STD_625_50 (V4L2_STD_PAL |\ | 670 | #define V4L2_STD_625_50 (V4L2_STD_PAL |\ |
586 | V4L2_STD_PAL_N |\ | 671 | V4L2_STD_PAL_N |\ |
587 | V4L2_STD_PAL_Nc |\ | 672 | V4L2_STD_PAL_Nc |\ |
588 | V4L2_STD_SECAM) | 673 | V4L2_STD_SECAM) |
589 | #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ | 674 | #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ |
590 | V4L2_STD_ATSC_16_VSB) | 675 | V4L2_STD_ATSC_16_VSB) |
591 | 676 | ||
592 | #define V4L2_STD_UNKNOWN 0 | 677 | #define V4L2_STD_UNKNOWN 0 |
593 | #define V4L2_STD_ALL (V4L2_STD_525_60 |\ | 678 | #define V4L2_STD_ALL (V4L2_STD_525_60 |\ |
@@ -595,7 +680,7 @@ typedef __u64 v4l2_std_id; | |||
595 | 680 | ||
596 | struct v4l2_standard | 681 | struct v4l2_standard |
597 | { | 682 | { |
598 | __u32 index; | 683 | __u32 index; |
599 | v4l2_std_id id; | 684 | v4l2_std_id id; |
600 | __u8 name[24]; | 685 | __u8 name[24]; |
601 | struct v4l2_fract frameperiod; /* Frames, not fields */ | 686 | struct v4l2_fract frameperiod; /* Frames, not fields */ |
@@ -610,9 +695,9 @@ struct v4l2_standard | |||
610 | struct v4l2_input | 695 | struct v4l2_input |
611 | { | 696 | { |
612 | __u32 index; /* Which input */ | 697 | __u32 index; /* Which input */ |
613 | __u8 name[32]; /* Label */ | 698 | __u8 name[32]; /* Label */ |
614 | __u32 type; /* Type of input */ | 699 | __u32 type; /* Type of input */ |
615 | __u32 audioset; /* Associated audios (bitfield) */ | 700 | __u32 audioset; /* Associated audios (bitfield) */ |
616 | __u32 tuner; /* Associated tuner */ | 701 | __u32 tuner; /* Associated tuner */ |
617 | v4l2_std_id std; | 702 | v4l2_std_id std; |
618 | __u32 status; | 703 | __u32 status; |
@@ -647,9 +732,9 @@ struct v4l2_input | |||
647 | struct v4l2_output | 732 | struct v4l2_output |
648 | { | 733 | { |
649 | __u32 index; /* Which output */ | 734 | __u32 index; /* Which output */ |
650 | __u8 name[32]; /* Label */ | 735 | __u8 name[32]; /* Label */ |
651 | __u32 type; /* Type of output */ | 736 | __u32 type; /* Type of output */ |
652 | __u32 audioset; /* Associated audios (bitfield) */ | 737 | __u32 audioset; /* Associated audios (bitfield) */ |
653 | __u32 modulator; /* Associated modulator */ | 738 | __u32 modulator; /* Associated modulator */ |
654 | v4l2_std_id std; | 739 | v4l2_std_id std; |
655 | __u32 reserved[4]; | 740 | __u32 reserved[4]; |
@@ -671,12 +756,12 @@ struct v4l2_control | |||
671 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ | 756 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ |
672 | struct v4l2_queryctrl | 757 | struct v4l2_queryctrl |
673 | { | 758 | { |
674 | __u32 id; | 759 | __u32 id; |
675 | enum v4l2_ctrl_type type; | 760 | enum v4l2_ctrl_type type; |
676 | __u8 name[32]; /* Whatever */ | 761 | __u8 name[32]; /* Whatever */ |
677 | __s32 minimum; /* Note signedness */ | 762 | __s32 minimum; /* Note signedness */ |
678 | __s32 maximum; | 763 | __s32 maximum; |
679 | __s32 step; | 764 | __s32 step; |
680 | __s32 default_value; | 765 | __s32 default_value; |
681 | __u32 flags; | 766 | __u32 flags; |
682 | __u32 reserved[2]; | 767 | __u32 reserved[2]; |
@@ -779,10 +864,10 @@ struct v4l2_modulator | |||
779 | 864 | ||
780 | struct v4l2_frequency | 865 | struct v4l2_frequency |
781 | { | 866 | { |
782 | __u32 tuner; | 867 | __u32 tuner; |
783 | enum v4l2_tuner_type type; | 868 | enum v4l2_tuner_type type; |
784 | __u32 frequency; | 869 | __u32 frequency; |
785 | __u32 reserved[8]; | 870 | __u32 reserved[8]; |
786 | }; | 871 | }; |
787 | 872 | ||
788 | /* | 873 | /* |
@@ -802,6 +887,7 @@ struct v4l2_audio | |||
802 | 887 | ||
803 | /* Flags for the 'mode' field */ | 888 | /* Flags for the 'mode' field */ |
804 | #define V4L2_AUDMODE_AVL 0x00001 | 889 | #define V4L2_AUDMODE_AVL 0x00001 |
890 | #define V4L2_AUDMODE_32BITS 0x00002 | ||
805 | 891 | ||
806 | struct v4l2_audioout | 892 | struct v4l2_audioout |
807 | { | 893 | { |
@@ -846,14 +932,14 @@ struct v4l2_vbi_format | |||
846 | 932 | ||
847 | struct v4l2_sliced_vbi_format | 933 | struct v4l2_sliced_vbi_format |
848 | { | 934 | { |
849 | __u16 service_set; | 935 | __u16 service_set; |
850 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | 936 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field |
851 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | 937 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field |
852 | (equals frame lines 313-336 for 625 line video | 938 | (equals frame lines 313-336 for 625 line video |
853 | standards, 263-286 for 525 line standards) */ | 939 | standards, 263-286 for 525 line standards) */ |
854 | __u16 service_lines[2][24]; | 940 | __u16 service_lines[2][24]; |
855 | __u32 io_size; | 941 | __u32 io_size; |
856 | __u32 reserved[2]; /* must be zero */ | 942 | __u32 reserved[2]; /* must be zero */ |
857 | }; | 943 | }; |
858 | 944 | ||
859 | #define V4L2_SLICED_TELETEXT_B (0x0001) | 945 | #define V4L2_SLICED_TELETEXT_B (0x0001) |
@@ -866,22 +952,22 @@ struct v4l2_sliced_vbi_format | |||
866 | 952 | ||
867 | struct v4l2_sliced_vbi_cap | 953 | struct v4l2_sliced_vbi_cap |
868 | { | 954 | { |
869 | __u16 service_set; | 955 | __u16 service_set; |
870 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | 956 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field |
871 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | 957 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field |
872 | (equals frame lines 313-336 for 625 line video | 958 | (equals frame lines 313-336 for 625 line video |
873 | standards, 263-286 for 525 line standards) */ | 959 | standards, 263-286 for 525 line standards) */ |
874 | __u16 service_lines[2][24]; | 960 | __u16 service_lines[2][24]; |
875 | __u32 reserved[4]; /* must be 0 */ | 961 | __u32 reserved[4]; /* must be 0 */ |
876 | }; | 962 | }; |
877 | 963 | ||
878 | struct v4l2_sliced_vbi_data | 964 | struct v4l2_sliced_vbi_data |
879 | { | 965 | { |
880 | __u32 id; | 966 | __u32 id; |
881 | __u32 field; /* 0: first field, 1: second field */ | 967 | __u32 field; /* 0: first field, 1: second field */ |
882 | __u32 line; /* 1-23 */ | 968 | __u32 line; /* 1-23 */ |
883 | __u32 reserved; /* must be 0 */ | 969 | __u32 reserved; /* must be 0 */ |
884 | __u8 data[48]; | 970 | __u8 data[48]; |
885 | }; | 971 | }; |
886 | #endif | 972 | #endif |
887 | 973 | ||
@@ -896,9 +982,9 @@ struct v4l2_format | |||
896 | enum v4l2_buf_type type; | 982 | enum v4l2_buf_type type; |
897 | union | 983 | union |
898 | { | 984 | { |
899 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE | 985 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE |
900 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY | 986 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY |
901 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE | 987 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE |
902 | #if 1 | 988 | #if 1 |
903 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE | 989 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE |
904 | #endif | 990 | #endif |
@@ -981,6 +1067,7 @@ struct v4l2_streamparm | |||
981 | #if 1 | 1067 | #if 1 |
982 | #define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap) | 1068 | #define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap) |
983 | #endif | 1069 | #endif |
1070 | #define VIDIOC_LOG_STATUS _IO ('V', 70) | ||
984 | 1071 | ||
985 | /* for compatibility, will go away some day */ | 1072 | /* for compatibility, will go away some day */ |
986 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) | 1073 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) |
diff --git a/include/media/audiochip.h b/include/media/audiochip.h index a7ceee9fc5e9..b7d4b0930408 100644 --- a/include/media/audiochip.h +++ b/include/media/audiochip.h | |||
@@ -4,6 +4,23 @@ | |||
4 | #ifndef AUDIOCHIP_H | 4 | #ifndef AUDIOCHIP_H |
5 | #define AUDIOCHIP_H | 5 | #define AUDIOCHIP_H |
6 | 6 | ||
7 | enum audiochip { | ||
8 | AUDIO_CHIP_NONE, | ||
9 | AUDIO_CHIP_UNKNOWN, | ||
10 | /* Provided by video chip */ | ||
11 | AUDIO_CHIP_INTERNAL, | ||
12 | /* Provided by tvaudio.c */ | ||
13 | AUDIO_CHIP_TDA8425, | ||
14 | AUDIO_CHIP_TEA6300, | ||
15 | AUDIO_CHIP_TEA6420, | ||
16 | AUDIO_CHIP_TDA9840, | ||
17 | AUDIO_CHIP_TDA985X, | ||
18 | AUDIO_CHIP_TDA9874, | ||
19 | AUDIO_CHIP_PIC16C54, | ||
20 | /* Provided by msp3400.c */ | ||
21 | AUDIO_CHIP_MSP34XX | ||
22 | }; | ||
23 | |||
7 | /* ---------------------------------------------------------------------- */ | 24 | /* ---------------------------------------------------------------------- */ |
8 | 25 | ||
9 | /* v4l device was opened in Radio mode */ | 26 | /* v4l device was opened in Radio mode */ |
diff --git a/include/media/id.h b/include/media/id.h deleted file mode 100644 index 6d02c94cdc0d..000000000000 --- a/include/media/id.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | */ | ||
3 | |||
4 | /* FIXME: this temporarely, until these are included in linux/i2c-id.h */ | ||
5 | |||
6 | /* drivers */ | ||
7 | #ifndef I2C_DRIVERID_TVMIXER | ||
8 | # define I2C_DRIVERID_TVMIXER I2C_DRIVERID_EXP0 | ||
9 | #endif | ||
10 | #ifndef I2C_DRIVERID_TVAUDIO | ||
11 | # define I2C_DRIVERID_TVAUDIO I2C_DRIVERID_EXP1 | ||
12 | #endif | ||
13 | |||
14 | /* chips */ | ||
15 | #ifndef I2C_DRIVERID_DPL3518 | ||
16 | # define I2C_DRIVERID_DPL3518 I2C_DRIVERID_EXP2 | ||
17 | #endif | ||
18 | #ifndef I2C_DRIVERID_TDA9873 | ||
19 | # define I2C_DRIVERID_TDA9873 I2C_DRIVERID_EXP3 | ||
20 | #endif | ||
21 | #ifndef I2C_DRIVERID_TDA9875 | ||
22 | # define I2C_DRIVERID_TDA9875 I2C_DRIVERID_EXP0+4 | ||
23 | #endif | ||
24 | #ifndef I2C_DRIVERID_PIC16C54_PV951 | ||
25 | # define I2C_DRIVERID_PIC16C54_PV951 I2C_DRIVERID_EXP0+5 | ||
26 | #endif | ||
27 | #ifndef I2C_DRIVERID_TDA7432 | ||
28 | # define I2C_DRIVERID_TDA7432 I2C_DRIVERID_EXP0+6 | ||
29 | #endif | ||
30 | #ifndef I2C_DRIVERID_TDA9874 | ||
31 | # define I2C_DRIVERID_TDA9874 I2C_DRIVERID_EXP0+7 | ||
32 | #endif | ||
33 | #ifndef I2C_DRIVERID_SAA6752HS | ||
34 | # define I2C_DRIVERID_SAA6752HS I2C_DRIVERID_EXP0+8 | ||
35 | #endif | ||
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 01b56822df4d..0f1ba95ec8d6 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -20,8 +20,10 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/input.h> | 23 | #ifndef _IR_COMMON |
24 | #define _IR_COMMON | ||
24 | 25 | ||
26 | #include <linux/input.h> | ||
25 | 27 | ||
26 | #define IR_TYPE_RC5 1 | 28 | #define IR_TYPE_RC5 1 |
27 | #define IR_TYPE_PD 2 /* Pulse distance encoded IR */ | 29 | #define IR_TYPE_PD 2 /* Pulse distance encoded IR */ |
@@ -61,6 +63,8 @@ int ir_dump_samples(u32 *samples, int count); | |||
61 | int ir_decode_biphase(u32 *samples, int count, int low, int high); | 63 | int ir_decode_biphase(u32 *samples, int count, int low, int high); |
62 | int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); | 64 | int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); |
63 | 65 | ||
66 | #endif | ||
67 | |||
64 | /* | 68 | /* |
65 | * Local variables: | 69 | * Local variables: |
66 | * c-basic-offset: 8 | 70 | * c-basic-offset: 8 |
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h new file mode 100644 index 000000000000..00fa57eb9fde --- /dev/null +++ b/include/media/ir-kbd-i2c.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef _IR_I2C | ||
2 | #define _IR_I2C | ||
3 | |||
4 | #include <media/ir-common.h> | ||
5 | |||
6 | struct IR_i2c; | ||
7 | |||
8 | struct IR_i2c { | ||
9 | IR_KEYTAB_TYPE *ir_codes; | ||
10 | struct i2c_client c; | ||
11 | struct input_dev *input; | ||
12 | struct ir_input_state ir; | ||
13 | |||
14 | /* Used to avoid fast repeating */ | ||
15 | unsigned char old; | ||
16 | |||
17 | struct work_struct work; | ||
18 | struct timer_list timer; | ||
19 | char phys[32]; | ||
20 | int (*get_key)(struct IR_i2c*, u32*, u32*); | ||
21 | }; | ||
22 | #endif | ||
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index f3aa24f8131c..64691753721e 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __SAA7146_VV__ | 1 | #ifndef __SAA7146_VV__ |
2 | #define __SAA7146_VV__ | 2 | #define __SAA7146_VV__ |
3 | 3 | ||
4 | #include <linux/videodev2.h> | 4 | #include <linux/videodev.h> |
5 | 5 | ||
6 | #include <media/saa7146.h> | 6 | #include <media/saa7146.h> |
7 | #include <media/video-buf.h> | 7 | #include <media/video-buf.h> |
diff --git a/include/media/tuner.h b/include/media/tuner.h index 4ad08e24a1aa..9184e534b7ef 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -95,7 +95,7 @@ | |||
95 | #define TUNER_THOMSON_DTT7610 52 | 95 | #define TUNER_THOMSON_DTT7610 52 |
96 | #define TUNER_PHILIPS_FQ1286 53 | 96 | #define TUNER_PHILIPS_FQ1286 53 |
97 | #define TUNER_PHILIPS_TDA8290 54 | 97 | #define TUNER_PHILIPS_TDA8290 54 |
98 | #define TUNER_LG_PAL_TAPE 55 /* Hauppauge PVR-150 PAL */ | 98 | #define TUNER_TCL_2002MB 55 /* Hauppauge PVR-150 PAL */ |
99 | 99 | ||
100 | #define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */ | 100 | #define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */ |
101 | #define TUNER_PHILIPS_FQ1236A_MK4 57 /* Hauppauge PVR-500MCE NTSC */ | 101 | #define TUNER_PHILIPS_FQ1236A_MK4 57 /* Hauppauge PVR-500MCE NTSC */ |
@@ -110,6 +110,9 @@ | |||
110 | #define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ | 110 | #define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ |
111 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ | 111 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ |
112 | #define TUNER_LG_NTSC_TALN_MINI 66 | 112 | #define TUNER_LG_NTSC_TALN_MINI 66 |
113 | #define TUNER_PHILIPS_TD1316 67 | ||
114 | |||
115 | #define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */ | ||
113 | 116 | ||
114 | #define NOTUNER 0 | 117 | #define NOTUNER 0 |
115 | #define PAL 1 /* PAL_BG */ | 118 | #define PAL 1 /* PAL_BG */ |
@@ -145,6 +148,7 @@ | |||
145 | # define TDA9887_INTERCARRIER (1<<4) | 148 | # define TDA9887_INTERCARRIER (1<<4) |
146 | # define TDA9887_PORT1_ACTIVE (1<<5) | 149 | # define TDA9887_PORT1_ACTIVE (1<<5) |
147 | # define TDA9887_PORT2_ACTIVE (1<<6) | 150 | # define TDA9887_PORT2_ACTIVE (1<<6) |
151 | # define TDA9887_INTERCARRIER_NTSC (1<<7) | ||
148 | /* config options */ | 152 | /* config options */ |
149 | # define TDA9887_DEEMPHASIS_MASK (3<<16) | 153 | # define TDA9887_DEEMPHASIS_MASK (3<<16) |
150 | # define TDA9887_DEEMPHASIS_NONE (1<<16) | 154 | # define TDA9887_DEEMPHASIS_NONE (1<<16) |
@@ -188,8 +192,11 @@ struct tuner { | |||
188 | unsigned int radio_if2; | 192 | unsigned int radio_if2; |
189 | 193 | ||
190 | /* used by tda8290 */ | 194 | /* used by tda8290 */ |
191 | unsigned char i2c_easy_mode[2]; | 195 | unsigned char tda8290_easy_mode; |
192 | unsigned char i2c_set_freq[8]; | 196 | unsigned char tda827x_lpsel; |
197 | unsigned char tda827x_addr; | ||
198 | unsigned char tda827x_ver; | ||
199 | unsigned int sgIF; | ||
193 | 200 | ||
194 | /* function ptrs */ | 201 | /* function ptrs */ |
195 | void (*tv_freq)(struct i2c_client *c, unsigned int freq); | 202 | void (*tv_freq)(struct i2c_client *c, unsigned int freq); |
@@ -204,20 +211,21 @@ extern unsigned const int tuner_count; | |||
204 | 211 | ||
205 | extern int microtune_init(struct i2c_client *c); | 212 | extern int microtune_init(struct i2c_client *c); |
206 | extern int tda8290_init(struct i2c_client *c); | 213 | extern int tda8290_init(struct i2c_client *c); |
214 | extern int tda8290_probe(struct i2c_client *c); | ||
207 | extern int tea5767_tuner_init(struct i2c_client *c); | 215 | extern int tea5767_tuner_init(struct i2c_client *c); |
208 | extern int default_tuner_init(struct i2c_client *c); | 216 | extern int default_tuner_init(struct i2c_client *c); |
209 | extern int tea5767_autodetection(struct i2c_client *c); | 217 | extern int tea5767_autodetection(struct i2c_client *c); |
210 | 218 | ||
211 | #define tuner_warn(fmt, arg...) do {\ | 219 | #define tuner_warn(fmt, arg...) do {\ |
212 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->name, \ | 220 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->name, \ |
213 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) | 221 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) |
214 | #define tuner_info(fmt, arg...) do {\ | 222 | #define tuner_info(fmt, arg...) do {\ |
215 | printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->name, \ | 223 | printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->name, \ |
216 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) | 224 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) |
217 | #define tuner_dbg(fmt, arg...) do {\ | 225 | #define tuner_dbg(fmt, arg...) do {\ |
218 | if (tuner_debug) \ | 226 | if (tuner_debug) \ |
219 | printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \ | 227 | printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \ |
220 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) | 228 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) |
221 | 229 | ||
222 | #endif /* __KERNEL__ */ | 230 | #endif /* __KERNEL__ */ |
223 | 231 | ||
diff --git a/include/media/video-buf.h b/include/media/video-buf.h index ae8d7a000440..8ecfd78e0027 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * (at your option) any later version. | 17 | * (at your option) any later version. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/videodev.h> | 20 | #include <linux/videodev2.h> |
21 | 21 | ||
22 | #define UNSET (-1U) | 22 | #define UNSET (-1U) |
23 | 23 | ||
@@ -177,7 +177,7 @@ struct videobuf_queue_ops { | |||
177 | }; | 177 | }; |
178 | 178 | ||
179 | struct videobuf_queue { | 179 | struct videobuf_queue { |
180 | struct semaphore lock; | 180 | struct semaphore lock; |
181 | spinlock_t *irqlock; | 181 | spinlock_t *irqlock; |
182 | struct pci_dev *pci; | 182 | struct pci_dev *pci; |
183 | 183 | ||
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index e42d728b1620..911ceb5cd263 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -57,8 +57,6 @@ | |||
57 | #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg) | 57 | #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg) |
58 | #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg) | 58 | #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg) |
59 | 59 | ||
60 | extern struct proc_dir_entry *proc_bt; | ||
61 | |||
62 | /* Connection and socket states */ | 60 | /* Connection and socket states */ |
63 | enum { | 61 | enum { |
64 | BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */ | 62 | BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */ |
@@ -177,4 +175,6 @@ extern int hci_sock_cleanup(void); | |||
177 | extern int bt_sysfs_init(void); | 175 | extern int bt_sysfs_init(void); |
178 | extern void bt_sysfs_cleanup(void); | 176 | extern void bt_sysfs_cleanup(void); |
179 | 177 | ||
178 | extern struct class bt_class; | ||
179 | |||
180 | #endif /* __BLUETOOTH_H */ | 180 | #endif /* __BLUETOOTH_H */ |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index fa2d12b0579b..b06a2d2f63d2 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -184,10 +184,10 @@ enum { | |||
184 | struct hci_rp_read_loc_version { | 184 | struct hci_rp_read_loc_version { |
185 | __u8 status; | 185 | __u8 status; |
186 | __u8 hci_ver; | 186 | __u8 hci_ver; |
187 | __u16 hci_rev; | 187 | __le16 hci_rev; |
188 | __u8 lmp_ver; | 188 | __u8 lmp_ver; |
189 | __u16 manufacturer; | 189 | __le16 manufacturer; |
190 | __u16 lmp_subver; | 190 | __le16 lmp_subver; |
191 | } __attribute__ ((packed)); | 191 | } __attribute__ ((packed)); |
192 | 192 | ||
193 | #define OCF_READ_LOCAL_FEATURES 0x0003 | 193 | #define OCF_READ_LOCAL_FEATURES 0x0003 |
@@ -199,10 +199,10 @@ struct hci_rp_read_loc_features { | |||
199 | #define OCF_READ_BUFFER_SIZE 0x0005 | 199 | #define OCF_READ_BUFFER_SIZE 0x0005 |
200 | struct hci_rp_read_buffer_size { | 200 | struct hci_rp_read_buffer_size { |
201 | __u8 status; | 201 | __u8 status; |
202 | __u16 acl_mtu; | 202 | __le16 acl_mtu; |
203 | __u8 sco_mtu; | 203 | __u8 sco_mtu; |
204 | __u16 acl_max_pkt; | 204 | __le16 acl_max_pkt; |
205 | __u16 sco_max_pkt; | 205 | __le16 sco_max_pkt; |
206 | } __attribute__ ((packed)); | 206 | } __attribute__ ((packed)); |
207 | 207 | ||
208 | #define OCF_READ_BD_ADDR 0x0009 | 208 | #define OCF_READ_BD_ADDR 0x0009 |
@@ -267,21 +267,21 @@ struct hci_cp_write_dev_class { | |||
267 | 267 | ||
268 | #define OCF_READ_VOICE_SETTING 0x0025 | 268 | #define OCF_READ_VOICE_SETTING 0x0025 |
269 | struct hci_rp_read_voice_setting { | 269 | struct hci_rp_read_voice_setting { |
270 | __u8 status; | 270 | __u8 status; |
271 | __u16 voice_setting; | 271 | __le16 voice_setting; |
272 | } __attribute__ ((packed)); | 272 | } __attribute__ ((packed)); |
273 | 273 | ||
274 | #define OCF_WRITE_VOICE_SETTING 0x0026 | 274 | #define OCF_WRITE_VOICE_SETTING 0x0026 |
275 | struct hci_cp_write_voice_setting { | 275 | struct hci_cp_write_voice_setting { |
276 | __u16 voice_setting; | 276 | __le16 voice_setting; |
277 | } __attribute__ ((packed)); | 277 | } __attribute__ ((packed)); |
278 | 278 | ||
279 | #define OCF_HOST_BUFFER_SIZE 0x0033 | 279 | #define OCF_HOST_BUFFER_SIZE 0x0033 |
280 | struct hci_cp_host_buffer_size { | 280 | struct hci_cp_host_buffer_size { |
281 | __u16 acl_mtu; | 281 | __le16 acl_mtu; |
282 | __u8 sco_mtu; | 282 | __u8 sco_mtu; |
283 | __u16 acl_max_pkt; | 283 | __le16 acl_max_pkt; |
284 | __u16 sco_max_pkt; | 284 | __le16 sco_max_pkt; |
285 | } __attribute__ ((packed)); | 285 | } __attribute__ ((packed)); |
286 | 286 | ||
287 | /* Link Control */ | 287 | /* Link Control */ |
@@ -289,10 +289,10 @@ struct hci_cp_host_buffer_size { | |||
289 | #define OCF_CREATE_CONN 0x0005 | 289 | #define OCF_CREATE_CONN 0x0005 |
290 | struct hci_cp_create_conn { | 290 | struct hci_cp_create_conn { |
291 | bdaddr_t bdaddr; | 291 | bdaddr_t bdaddr; |
292 | __u16 pkt_type; | 292 | __le16 pkt_type; |
293 | __u8 pscan_rep_mode; | 293 | __u8 pscan_rep_mode; |
294 | __u8 pscan_mode; | 294 | __u8 pscan_mode; |
295 | __u16 clock_offset; | 295 | __le16 clock_offset; |
296 | __u8 role_switch; | 296 | __u8 role_switch; |
297 | } __attribute__ ((packed)); | 297 | } __attribute__ ((packed)); |
298 | 298 | ||
@@ -310,14 +310,14 @@ struct hci_cp_reject_conn_req { | |||
310 | 310 | ||
311 | #define OCF_DISCONNECT 0x0006 | 311 | #define OCF_DISCONNECT 0x0006 |
312 | struct hci_cp_disconnect { | 312 | struct hci_cp_disconnect { |
313 | __u16 handle; | 313 | __le16 handle; |
314 | __u8 reason; | 314 | __u8 reason; |
315 | } __attribute__ ((packed)); | 315 | } __attribute__ ((packed)); |
316 | 316 | ||
317 | #define OCF_ADD_SCO 0x0007 | 317 | #define OCF_ADD_SCO 0x0007 |
318 | struct hci_cp_add_sco { | 318 | struct hci_cp_add_sco { |
319 | __u16 handle; | 319 | __le16 handle; |
320 | __u16 pkt_type; | 320 | __le16 pkt_type; |
321 | } __attribute__ ((packed)); | 321 | } __attribute__ ((packed)); |
322 | 322 | ||
323 | #define OCF_INQUIRY 0x0001 | 323 | #define OCF_INQUIRY 0x0001 |
@@ -354,56 +354,56 @@ struct hci_cp_pin_code_neg_reply { | |||
354 | 354 | ||
355 | #define OCF_CHANGE_CONN_PTYPE 0x000F | 355 | #define OCF_CHANGE_CONN_PTYPE 0x000F |
356 | struct hci_cp_change_conn_ptype { | 356 | struct hci_cp_change_conn_ptype { |
357 | __u16 handle; | 357 | __le16 handle; |
358 | __u16 pkt_type; | 358 | __le16 pkt_type; |
359 | } __attribute__ ((packed)); | 359 | } __attribute__ ((packed)); |
360 | 360 | ||
361 | #define OCF_AUTH_REQUESTED 0x0011 | 361 | #define OCF_AUTH_REQUESTED 0x0011 |
362 | struct hci_cp_auth_requested { | 362 | struct hci_cp_auth_requested { |
363 | __u16 handle; | 363 | __le16 handle; |
364 | } __attribute__ ((packed)); | 364 | } __attribute__ ((packed)); |
365 | 365 | ||
366 | #define OCF_SET_CONN_ENCRYPT 0x0013 | 366 | #define OCF_SET_CONN_ENCRYPT 0x0013 |
367 | struct hci_cp_set_conn_encrypt { | 367 | struct hci_cp_set_conn_encrypt { |
368 | __u16 handle; | 368 | __le16 handle; |
369 | __u8 encrypt; | 369 | __u8 encrypt; |
370 | } __attribute__ ((packed)); | 370 | } __attribute__ ((packed)); |
371 | 371 | ||
372 | #define OCF_CHANGE_CONN_LINK_KEY 0x0015 | 372 | #define OCF_CHANGE_CONN_LINK_KEY 0x0015 |
373 | struct hci_cp_change_conn_link_key { | 373 | struct hci_cp_change_conn_link_key { |
374 | __u16 handle; | 374 | __le16 handle; |
375 | } __attribute__ ((packed)); | 375 | } __attribute__ ((packed)); |
376 | 376 | ||
377 | #define OCF_READ_REMOTE_FEATURES 0x001B | 377 | #define OCF_READ_REMOTE_FEATURES 0x001B |
378 | struct hci_cp_read_rmt_features { | 378 | struct hci_cp_read_rmt_features { |
379 | __u16 handle; | 379 | __le16 handle; |
380 | } __attribute__ ((packed)); | 380 | } __attribute__ ((packed)); |
381 | 381 | ||
382 | #define OCF_READ_REMOTE_VERSION 0x001D | 382 | #define OCF_READ_REMOTE_VERSION 0x001D |
383 | struct hci_cp_read_rmt_version { | 383 | struct hci_cp_read_rmt_version { |
384 | __u16 handle; | 384 | __le16 handle; |
385 | } __attribute__ ((packed)); | 385 | } __attribute__ ((packed)); |
386 | 386 | ||
387 | /* Link Policy */ | 387 | /* Link Policy */ |
388 | #define OGF_LINK_POLICY 0x02 | 388 | #define OGF_LINK_POLICY 0x02 |
389 | #define OCF_ROLE_DISCOVERY 0x0009 | 389 | #define OCF_ROLE_DISCOVERY 0x0009 |
390 | struct hci_cp_role_discovery { | 390 | struct hci_cp_role_discovery { |
391 | __u16 handle; | 391 | __le16 handle; |
392 | } __attribute__ ((packed)); | 392 | } __attribute__ ((packed)); |
393 | struct hci_rp_role_discovery { | 393 | struct hci_rp_role_discovery { |
394 | __u8 status; | 394 | __u8 status; |
395 | __u16 handle; | 395 | __le16 handle; |
396 | __u8 role; | 396 | __u8 role; |
397 | } __attribute__ ((packed)); | 397 | } __attribute__ ((packed)); |
398 | 398 | ||
399 | #define OCF_READ_LINK_POLICY 0x000C | 399 | #define OCF_READ_LINK_POLICY 0x000C |
400 | struct hci_cp_read_link_policy { | 400 | struct hci_cp_read_link_policy { |
401 | __u16 handle; | 401 | __le16 handle; |
402 | } __attribute__ ((packed)); | 402 | } __attribute__ ((packed)); |
403 | struct hci_rp_read_link_policy { | 403 | struct hci_rp_read_link_policy { |
404 | __u8 status; | 404 | __u8 status; |
405 | __u16 handle; | 405 | __le16 handle; |
406 | __u16 policy; | 406 | __le16 policy; |
407 | } __attribute__ ((packed)); | 407 | } __attribute__ ((packed)); |
408 | 408 | ||
409 | #define OCF_SWITCH_ROLE 0x000B | 409 | #define OCF_SWITCH_ROLE 0x000B |
@@ -414,12 +414,12 @@ struct hci_cp_switch_role { | |||
414 | 414 | ||
415 | #define OCF_WRITE_LINK_POLICY 0x000D | 415 | #define OCF_WRITE_LINK_POLICY 0x000D |
416 | struct hci_cp_write_link_policy { | 416 | struct hci_cp_write_link_policy { |
417 | __u16 handle; | 417 | __le16 handle; |
418 | __u16 policy; | 418 | __le16 policy; |
419 | } __attribute__ ((packed)); | 419 | } __attribute__ ((packed)); |
420 | struct hci_rp_write_link_policy { | 420 | struct hci_rp_write_link_policy { |
421 | __u8 status; | 421 | __u8 status; |
422 | __u16 handle; | 422 | __le16 handle; |
423 | } __attribute__ ((packed)); | 423 | } __attribute__ ((packed)); |
424 | 424 | ||
425 | /* Status params */ | 425 | /* Status params */ |
@@ -441,7 +441,7 @@ struct inquiry_info { | |||
441 | __u8 pscan_period_mode; | 441 | __u8 pscan_period_mode; |
442 | __u8 pscan_mode; | 442 | __u8 pscan_mode; |
443 | __u8 dev_class[3]; | 443 | __u8 dev_class[3]; |
444 | __u16 clock_offset; | 444 | __le16 clock_offset; |
445 | } __attribute__ ((packed)); | 445 | } __attribute__ ((packed)); |
446 | 446 | ||
447 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 | 447 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 |
@@ -450,7 +450,7 @@ struct inquiry_info_with_rssi { | |||
450 | __u8 pscan_rep_mode; | 450 | __u8 pscan_rep_mode; |
451 | __u8 pscan_period_mode; | 451 | __u8 pscan_period_mode; |
452 | __u8 dev_class[3]; | 452 | __u8 dev_class[3]; |
453 | __u16 clock_offset; | 453 | __le16 clock_offset; |
454 | __s8 rssi; | 454 | __s8 rssi; |
455 | } __attribute__ ((packed)); | 455 | } __attribute__ ((packed)); |
456 | struct inquiry_info_with_rssi_and_pscan_mode { | 456 | struct inquiry_info_with_rssi_and_pscan_mode { |
@@ -459,7 +459,7 @@ struct inquiry_info_with_rssi_and_pscan_mode { | |||
459 | __u8 pscan_period_mode; | 459 | __u8 pscan_period_mode; |
460 | __u8 pscan_mode; | 460 | __u8 pscan_mode; |
461 | __u8 dev_class[3]; | 461 | __u8 dev_class[3]; |
462 | __u16 clock_offset; | 462 | __le16 clock_offset; |
463 | __s8 rssi; | 463 | __s8 rssi; |
464 | } __attribute__ ((packed)); | 464 | } __attribute__ ((packed)); |
465 | 465 | ||
@@ -469,7 +469,7 @@ struct extended_inquiry_info { | |||
469 | __u8 pscan_rep_mode; | 469 | __u8 pscan_rep_mode; |
470 | __u8 pscan_period_mode; | 470 | __u8 pscan_period_mode; |
471 | __u8 dev_class[3]; | 471 | __u8 dev_class[3]; |
472 | __u16 clock_offset; | 472 | __le16 clock_offset; |
473 | __s8 rssi; | 473 | __s8 rssi; |
474 | __u8 data[240]; | 474 | __u8 data[240]; |
475 | } __attribute__ ((packed)); | 475 | } __attribute__ ((packed)); |
@@ -477,7 +477,7 @@ struct extended_inquiry_info { | |||
477 | #define HCI_EV_CONN_COMPLETE 0x03 | 477 | #define HCI_EV_CONN_COMPLETE 0x03 |
478 | struct hci_ev_conn_complete { | 478 | struct hci_ev_conn_complete { |
479 | __u8 status; | 479 | __u8 status; |
480 | __u16 handle; | 480 | __le16 handle; |
481 | bdaddr_t bdaddr; | 481 | bdaddr_t bdaddr; |
482 | __u8 link_type; | 482 | __u8 link_type; |
483 | __u8 encr_mode; | 483 | __u8 encr_mode; |
@@ -493,27 +493,27 @@ struct hci_ev_conn_request { | |||
493 | #define HCI_EV_DISCONN_COMPLETE 0x05 | 493 | #define HCI_EV_DISCONN_COMPLETE 0x05 |
494 | struct hci_ev_disconn_complete { | 494 | struct hci_ev_disconn_complete { |
495 | __u8 status; | 495 | __u8 status; |
496 | __u16 handle; | 496 | __le16 handle; |
497 | __u8 reason; | 497 | __u8 reason; |
498 | } __attribute__ ((packed)); | 498 | } __attribute__ ((packed)); |
499 | 499 | ||
500 | #define HCI_EV_AUTH_COMPLETE 0x06 | 500 | #define HCI_EV_AUTH_COMPLETE 0x06 |
501 | struct hci_ev_auth_complete { | 501 | struct hci_ev_auth_complete { |
502 | __u8 status; | 502 | __u8 status; |
503 | __u16 handle; | 503 | __le16 handle; |
504 | } __attribute__ ((packed)); | 504 | } __attribute__ ((packed)); |
505 | 505 | ||
506 | #define HCI_EV_ENCRYPT_CHANGE 0x08 | 506 | #define HCI_EV_ENCRYPT_CHANGE 0x08 |
507 | struct hci_ev_encrypt_change { | 507 | struct hci_ev_encrypt_change { |
508 | __u8 status; | 508 | __u8 status; |
509 | __u16 handle; | 509 | __le16 handle; |
510 | __u8 encrypt; | 510 | __u8 encrypt; |
511 | } __attribute__ ((packed)); | 511 | } __attribute__ ((packed)); |
512 | 512 | ||
513 | #define HCI_EV_CHANGE_CONN_LINK_KEY_COMPLETE 0x09 | 513 | #define HCI_EV_CHANGE_CONN_LINK_KEY_COMPLETE 0x09 |
514 | struct hci_ev_change_conn_link_key_complete { | 514 | struct hci_ev_change_conn_link_key_complete { |
515 | __u8 status; | 515 | __u8 status; |
516 | __u16 handle; | 516 | __le16 handle; |
517 | } __attribute__ ((packed)); | 517 | } __attribute__ ((packed)); |
518 | 518 | ||
519 | #define HCI_EV_QOS_SETUP_COMPLETE 0x0D | 519 | #define HCI_EV_QOS_SETUP_COMPLETE 0x0D |
@@ -526,21 +526,21 @@ struct hci_qos { | |||
526 | } __attribute__ ((packed)); | 526 | } __attribute__ ((packed)); |
527 | struct hci_ev_qos_setup_complete { | 527 | struct hci_ev_qos_setup_complete { |
528 | __u8 status; | 528 | __u8 status; |
529 | __u16 handle; | 529 | __le16 handle; |
530 | struct hci_qos qos; | 530 | struct hci_qos qos; |
531 | } __attribute__ ((packed)); | 531 | } __attribute__ ((packed)); |
532 | 532 | ||
533 | #define HCI_EV_CMD_COMPLETE 0x0E | 533 | #define HCI_EV_CMD_COMPLETE 0x0E |
534 | struct hci_ev_cmd_complete { | 534 | struct hci_ev_cmd_complete { |
535 | __u8 ncmd; | 535 | __u8 ncmd; |
536 | __u16 opcode; | 536 | __le16 opcode; |
537 | } __attribute__ ((packed)); | 537 | } __attribute__ ((packed)); |
538 | 538 | ||
539 | #define HCI_EV_CMD_STATUS 0x0F | 539 | #define HCI_EV_CMD_STATUS 0x0F |
540 | struct hci_ev_cmd_status { | 540 | struct hci_ev_cmd_status { |
541 | __u8 status; | 541 | __u8 status; |
542 | __u8 ncmd; | 542 | __u8 ncmd; |
543 | __u16 opcode; | 543 | __le16 opcode; |
544 | } __attribute__ ((packed)); | 544 | } __attribute__ ((packed)); |
545 | 545 | ||
546 | #define HCI_EV_NUM_COMP_PKTS 0x13 | 546 | #define HCI_EV_NUM_COMP_PKTS 0x13 |
@@ -559,9 +559,9 @@ struct hci_ev_role_change { | |||
559 | #define HCI_EV_MODE_CHANGE 0x14 | 559 | #define HCI_EV_MODE_CHANGE 0x14 |
560 | struct hci_ev_mode_change { | 560 | struct hci_ev_mode_change { |
561 | __u8 status; | 561 | __u8 status; |
562 | __u16 handle; | 562 | __le16 handle; |
563 | __u8 mode; | 563 | __u8 mode; |
564 | __u16 interval; | 564 | __le16 interval; |
565 | } __attribute__ ((packed)); | 565 | } __attribute__ ((packed)); |
566 | 566 | ||
567 | #define HCI_EV_PIN_CODE_REQ 0x16 | 567 | #define HCI_EV_PIN_CODE_REQ 0x16 |
@@ -584,24 +584,24 @@ struct hci_ev_link_key_notify { | |||
584 | #define HCI_EV_RMT_FEATURES 0x0B | 584 | #define HCI_EV_RMT_FEATURES 0x0B |
585 | struct hci_ev_rmt_features { | 585 | struct hci_ev_rmt_features { |
586 | __u8 status; | 586 | __u8 status; |
587 | __u16 handle; | 587 | __le16 handle; |
588 | __u8 features[8]; | 588 | __u8 features[8]; |
589 | } __attribute__ ((packed)); | 589 | } __attribute__ ((packed)); |
590 | 590 | ||
591 | #define HCI_EV_RMT_VERSION 0x0C | 591 | #define HCI_EV_RMT_VERSION 0x0C |
592 | struct hci_ev_rmt_version { | 592 | struct hci_ev_rmt_version { |
593 | __u8 status; | 593 | __u8 status; |
594 | __u16 handle; | 594 | __le16 handle; |
595 | __u8 lmp_ver; | 595 | __u8 lmp_ver; |
596 | __u16 manufacturer; | 596 | __le16 manufacturer; |
597 | __u16 lmp_subver; | 597 | __le16 lmp_subver; |
598 | } __attribute__ ((packed)); | 598 | } __attribute__ ((packed)); |
599 | 599 | ||
600 | #define HCI_EV_CLOCK_OFFSET 0x01C | 600 | #define HCI_EV_CLOCK_OFFSET 0x01C |
601 | struct hci_ev_clock_offset { | 601 | struct hci_ev_clock_offset { |
602 | __u8 status; | 602 | __u8 status; |
603 | __u16 handle; | 603 | __le16 handle; |
604 | __u16 clock_offset; | 604 | __le16 clock_offset; |
605 | } __attribute__ ((packed)); | 605 | } __attribute__ ((packed)); |
606 | 606 | ||
607 | #define HCI_EV_PSCAN_REP_MODE 0x20 | 607 | #define HCI_EV_PSCAN_REP_MODE 0x20 |
@@ -638,7 +638,7 @@ struct hci_ev_si_security { | |||
638 | #define HCI_SCO_HDR_SIZE 3 | 638 | #define HCI_SCO_HDR_SIZE 3 |
639 | 639 | ||
640 | struct hci_command_hdr { | 640 | struct hci_command_hdr { |
641 | __u16 opcode; /* OCF & OGF */ | 641 | __le16 opcode; /* OCF & OGF */ |
642 | __u8 plen; | 642 | __u8 plen; |
643 | } __attribute__ ((packed)); | 643 | } __attribute__ ((packed)); |
644 | 644 | ||
@@ -648,22 +648,22 @@ struct hci_event_hdr { | |||
648 | } __attribute__ ((packed)); | 648 | } __attribute__ ((packed)); |
649 | 649 | ||
650 | struct hci_acl_hdr { | 650 | struct hci_acl_hdr { |
651 | __u16 handle; /* Handle & Flags(PB, BC) */ | 651 | __le16 handle; /* Handle & Flags(PB, BC) */ |
652 | __u16 dlen; | 652 | __le16 dlen; |
653 | } __attribute__ ((packed)); | 653 | } __attribute__ ((packed)); |
654 | 654 | ||
655 | struct hci_sco_hdr { | 655 | struct hci_sco_hdr { |
656 | __u16 handle; | 656 | __le16 handle; |
657 | __u8 dlen; | 657 | __u8 dlen; |
658 | } __attribute__ ((packed)); | 658 | } __attribute__ ((packed)); |
659 | 659 | ||
660 | /* Command opcode pack/unpack */ | 660 | /* Command opcode pack/unpack */ |
661 | #define hci_opcode_pack(ogf, ocf) (__u16)((ocf & 0x03ff)|(ogf << 10)) | 661 | #define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10)) |
662 | #define hci_opcode_ogf(op) (op >> 10) | 662 | #define hci_opcode_ogf(op) (op >> 10) |
663 | #define hci_opcode_ocf(op) (op & 0x03ff) | 663 | #define hci_opcode_ocf(op) (op & 0x03ff) |
664 | 664 | ||
665 | /* ACL handle and flags pack/unpack */ | 665 | /* ACL handle and flags pack/unpack */ |
666 | #define hci_handle_pack(h, f) (__u16)((h & 0x0fff)|(f << 12)) | 666 | #define hci_handle_pack(h, f) (__u16) ((h & 0x0fff)|(f << 12)) |
667 | #define hci_handle(h) (h & 0x0fff) | 667 | #define hci_handle(h) (h & 0x0fff) |
668 | #define hci_flags(h) (h >> 12) | 668 | #define hci_flags(h) (h >> 12) |
669 | 669 | ||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 7f933f302078..bb9f81dc8723 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #ifndef __HCI_CORE_H | 25 | #ifndef __HCI_CORE_H |
26 | #define __HCI_CORE_H | 26 | #define __HCI_CORE_H |
27 | 27 | ||
28 | #include <linux/proc_fs.h> | ||
29 | #include <net/bluetooth/hci.h> | 28 | #include <net/bluetooth/hci.h> |
30 | 29 | ||
31 | /* HCI upper protocols */ | 30 | /* HCI upper protocols */ |
@@ -34,8 +33,6 @@ | |||
34 | 33 | ||
35 | #define HCI_INIT_TIMEOUT (HZ * 10) | 34 | #define HCI_INIT_TIMEOUT (HZ * 10) |
36 | 35 | ||
37 | extern struct proc_dir_entry *proc_bt_hci; | ||
38 | |||
39 | /* HCI Core structures */ | 36 | /* HCI Core structures */ |
40 | 37 | ||
41 | struct inquiry_data { | 38 | struct inquiry_data { |
@@ -44,7 +41,7 @@ struct inquiry_data { | |||
44 | __u8 pscan_period_mode; | 41 | __u8 pscan_period_mode; |
45 | __u8 pscan_mode; | 42 | __u8 pscan_mode; |
46 | __u8 dev_class[3]; | 43 | __u8 dev_class[3]; |
47 | __u16 clock_offset; | 44 | __le16 clock_offset; |
48 | __s8 rssi; | 45 | __s8 rssi; |
49 | }; | 46 | }; |
50 | 47 | ||
@@ -126,10 +123,6 @@ struct hci_dev { | |||
126 | 123 | ||
127 | atomic_t promisc; | 124 | atomic_t promisc; |
128 | 125 | ||
129 | #ifdef CONFIG_PROC_FS | ||
130 | struct proc_dir_entry *proc; | ||
131 | #endif | ||
132 | |||
133 | struct class_device class_dev; | 126 | struct class_device class_dev; |
134 | 127 | ||
135 | struct module *owner; | 128 | struct module *owner; |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index e656be7c001a..bbfac86734ec 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -351,6 +351,4 @@ int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | |||
351 | int rfcomm_init_ttys(void); | 351 | int rfcomm_init_ttys(void); |
352 | void rfcomm_cleanup_ttys(void); | 352 | void rfcomm_cleanup_ttys(void); |
353 | 353 | ||
354 | extern struct proc_dir_entry *proc_bt_rfcomm; | ||
355 | |||
356 | #endif /* __RFCOMM_H */ | 354 | #endif /* __RFCOMM_H */ |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 5e38dca1d082..b93fd8c1d884 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/kernel.h> /* ARRAY_SIZE */ | 29 | #include <linux/kernel.h> /* ARRAY_SIZE */ |
30 | #include <linux/wireless.h> | 30 | #include <linux/wireless.h> |
31 | 31 | ||
32 | #define IEEE80211_VERSION "git-1.1.6" | 32 | #define IEEE80211_VERSION "git-1.1.7" |
33 | 33 | ||
34 | #define IEEE80211_DATA_LEN 2304 | 34 | #define IEEE80211_DATA_LEN 2304 |
35 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section | 35 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section |
diff --git a/include/net/ieee80211_crypt.h b/include/net/ieee80211_crypt.h index 0a1c2d82ca4b..225fc751d464 100644 --- a/include/net/ieee80211_crypt.h +++ b/include/net/ieee80211_crypt.h | |||
@@ -31,6 +31,7 @@ enum { | |||
31 | 31 | ||
32 | struct ieee80211_crypto_ops { | 32 | struct ieee80211_crypto_ops { |
33 | const char *name; | 33 | const char *name; |
34 | struct list_head list; | ||
34 | 35 | ||
35 | /* init new crypto context (e.g., allocate private data space, | 36 | /* init new crypto context (e.g., allocate private data space, |
36 | * select IV, etc.); returns NULL on failure or pointer to allocated | 37 | * select IV, etc.); returns NULL on failure or pointer to allocated |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 65ec86678a08..6addb4d464d6 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -252,12 +252,25 @@ typedef int (*inet_getfrag_t) (const void *data, | |||
252 | char *, | 252 | char *, |
253 | unsigned int, unsigned int); | 253 | unsigned int, unsigned int); |
254 | 254 | ||
255 | 255 | extern int __ipv6_addr_type(const struct in6_addr *addr); | |
256 | extern int ipv6_addr_type(const struct in6_addr *addr); | 256 | static inline int ipv6_addr_type(const struct in6_addr *addr) |
257 | { | ||
258 | return __ipv6_addr_type(addr) & 0xffff; | ||
259 | } | ||
257 | 260 | ||
258 | static inline int ipv6_addr_scope(const struct in6_addr *addr) | 261 | static inline int ipv6_addr_scope(const struct in6_addr *addr) |
259 | { | 262 | { |
260 | return ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK; | 263 | return __ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK; |
264 | } | ||
265 | |||
266 | static inline int __ipv6_addr_src_scope(int type) | ||
267 | { | ||
268 | return (type == IPV6_ADDR_ANY ? __IPV6_ADDR_SCOPE_INVALID : (type >> 16)); | ||
269 | } | ||
270 | |||
271 | static inline int ipv6_addr_src_scope(const struct in6_addr *addr) | ||
272 | { | ||
273 | return __ipv6_addr_src_scope(__ipv6_addr_type(addr)); | ||
261 | } | 274 | } |
262 | 275 | ||
263 | static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2) | 276 | static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2) |
@@ -341,6 +354,54 @@ static inline int ipv6_addr_any(const struct in6_addr *a) | |||
341 | } | 354 | } |
342 | 355 | ||
343 | /* | 356 | /* |
357 | * find the first different bit between two addresses | ||
358 | * length of address must be a multiple of 32bits | ||
359 | */ | ||
360 | static inline int __ipv6_addr_diff(const void *token1, const void *token2, int addrlen) | ||
361 | { | ||
362 | const __u32 *a1 = token1, *a2 = token2; | ||
363 | int i; | ||
364 | |||
365 | addrlen >>= 2; | ||
366 | |||
367 | for (i = 0; i < addrlen; i++) { | ||
368 | __u32 xb = a1[i] ^ a2[i]; | ||
369 | if (xb) { | ||
370 | int j = 31; | ||
371 | |||
372 | xb = ntohl(xb); | ||
373 | while ((xb & (1 << j)) == 0) | ||
374 | j--; | ||
375 | |||
376 | return (i * 32 + 31 - j); | ||
377 | } | ||
378 | } | ||
379 | |||
380 | /* | ||
381 | * we should *never* get to this point since that | ||
382 | * would mean the addrs are equal | ||
383 | * | ||
384 | * However, we do get to it 8) And exacly, when | ||
385 | * addresses are equal 8) | ||
386 | * | ||
387 | * ip route add 1111::/128 via ... | ||
388 | * ip route add 1111::/64 via ... | ||
389 | * and we are here. | ||
390 | * | ||
391 | * Ideally, this function should stop comparison | ||
392 | * at prefix length. It does not, but it is still OK, | ||
393 | * if returned value is greater than prefix length. | ||
394 | * --ANK (980803) | ||
395 | */ | ||
396 | return (addrlen << 5); | ||
397 | } | ||
398 | |||
399 | static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2) | ||
400 | { | ||
401 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); | ||
402 | } | ||
403 | |||
404 | /* | ||
344 | * Prototypes exported by ipv6 | 405 | * Prototypes exported by ipv6 |
345 | */ | 406 | */ |
346 | 407 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index e0498bd36004..ff13c4cc287a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -461,16 +461,16 @@ static inline void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb) | |||
461 | } | 461 | } |
462 | 462 | ||
463 | /* The per-socket spinlock must be held here. */ | 463 | /* The per-socket spinlock must be held here. */ |
464 | #define sk_add_backlog(__sk, __skb) \ | 464 | static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) |
465 | do { if (!(__sk)->sk_backlog.tail) { \ | 465 | { |
466 | (__sk)->sk_backlog.head = \ | 466 | if (!sk->sk_backlog.tail) { |
467 | (__sk)->sk_backlog.tail = (__skb); \ | 467 | sk->sk_backlog.head = sk->sk_backlog.tail = skb; |
468 | } else { \ | 468 | } else { |
469 | ((__sk)->sk_backlog.tail)->next = (__skb); \ | 469 | sk->sk_backlog.tail->next = skb; |
470 | (__sk)->sk_backlog.tail = (__skb); \ | 470 | sk->sk_backlog.tail = skb; |
471 | } \ | 471 | } |
472 | (__skb)->next = NULL; \ | 472 | skb->next = NULL; |
473 | } while(0) | 473 | } |
474 | 474 | ||
475 | #define sk_wait_event(__sk, __timeo, __condition) \ | 475 | #define sk_wait_event(__sk, __timeo, __condition) \ |
476 | ({ int rc; \ | 476 | ({ int rc; \ |