diff options
Diffstat (limited to 'include')
63 files changed, 301 insertions, 193 deletions
diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h index 76fe5f693426..bd854845697f 100644 --- a/include/asm-arm/arch-s3c2410/regs-lcd.h +++ b/include/asm-arm/arch-s3c2410/regs-lcd.h | |||
@@ -147,7 +147,16 @@ | |||
147 | 147 | ||
148 | #define S3C2412_FRCPAT(x) S3C2410_LCDREG(0xB4 + ((x)*4)) | 148 | #define S3C2412_FRCPAT(x) S3C2410_LCDREG(0xB4 + ((x)*4)) |
149 | 149 | ||
150 | #endif /* ___ASM_ARCH_REGS_LCD_H */ | 150 | /* general registers */ |
151 | |||
152 | /* base of the LCD registers, where INTPND, INTSRC and then INTMSK | ||
153 | * are available. */ | ||
151 | 154 | ||
155 | #define S3C2410_LCDINTBASE S3C2410_LCDREG(0x54) | ||
156 | #define S3C2412_LCDINTBASE S3C2410_LCDREG(0x24) | ||
152 | 157 | ||
158 | #define S3C24XX_LCDINTPND (0x00) | ||
159 | #define S3C24XX_LCDSRCPND (0x04) | ||
160 | #define S3C24XX_LCDINTMSK (0x08) | ||
153 | 161 | ||
162 | #endif /* ___ASM_ARCH_REGS_LCD_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/spi-gpio.h b/include/asm-arm/arch-s3c2410/spi-gpio.h index ba1dca88d480..73803731142a 100644 --- a/include/asm-arm/arch-s3c2410/spi-gpio.h +++ b/include/asm-arm/arch-s3c2410/spi-gpio.h | |||
@@ -13,9 +13,6 @@ | |||
13 | #ifndef __ASM_ARCH_SPIGPIO_H | 13 | #ifndef __ASM_ARCH_SPIGPIO_H |
14 | #define __ASM_ARCH_SPIGPIO_H __FILE__ | 14 | #define __ASM_ARCH_SPIGPIO_H __FILE__ |
15 | 15 | ||
16 | struct s3c2410_spigpio_info; | ||
17 | struct spi_board_info; | ||
18 | |||
19 | struct s3c2410_spigpio_info { | 16 | struct s3c2410_spigpio_info { |
20 | unsigned long pin_clk; | 17 | unsigned long pin_clk; |
21 | unsigned long pin_mosi; | 18 | unsigned long pin_mosi; |
@@ -23,9 +20,6 @@ struct s3c2410_spigpio_info { | |||
23 | 20 | ||
24 | int bus_num; | 21 | int bus_num; |
25 | 22 | ||
26 | unsigned long board_size; | ||
27 | struct spi_board_info *board_info; | ||
28 | |||
29 | void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs); | 23 | void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs); |
30 | }; | 24 | }; |
31 | 25 | ||
diff --git a/include/asm-arm/arch-s3c2410/spi.h b/include/asm-arm/arch-s3c2410/spi.h index 4029a1a1ab40..7ca0ed97a6d0 100644 --- a/include/asm-arm/arch-s3c2410/spi.h +++ b/include/asm-arm/arch-s3c2410/spi.h | |||
@@ -13,15 +13,9 @@ | |||
13 | #ifndef __ASM_ARCH_SPI_H | 13 | #ifndef __ASM_ARCH_SPI_H |
14 | #define __ASM_ARCH_SPI_H __FILE__ | 14 | #define __ASM_ARCH_SPI_H __FILE__ |
15 | 15 | ||
16 | struct s3c2410_spi_info; | ||
17 | struct spi_board_info; | ||
18 | |||
19 | struct s3c2410_spi_info { | 16 | struct s3c2410_spi_info { |
20 | unsigned long pin_cs; /* simple gpio cs */ | 17 | unsigned long pin_cs; /* simple gpio cs */ |
21 | 18 | ||
22 | unsigned long board_size; | ||
23 | struct spi_board_info *board_info; | ||
24 | |||
25 | void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol); | 19 | void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol); |
26 | }; | 20 | }; |
27 | 21 | ||
diff --git a/include/asm-avr32/delay.h b/include/asm-avr32/delay.h index cc3b2e3343b3..a0ed9a9839a5 100644 --- a/include/asm-avr32/delay.h +++ b/include/asm-avr32/delay.h | |||
@@ -12,7 +12,7 @@ extern void __bad_ndelay(void); | |||
12 | 12 | ||
13 | extern void __udelay(unsigned long usecs); | 13 | extern void __udelay(unsigned long usecs); |
14 | extern void __ndelay(unsigned long nsecs); | 14 | extern void __ndelay(unsigned long nsecs); |
15 | extern void __const_udelay(unsigned long usecs); | 15 | extern void __const_udelay(unsigned long xloops); |
16 | extern void __delay(unsigned long loops); | 16 | extern void __delay(unsigned long loops); |
17 | 17 | ||
18 | #define udelay(n) (__builtin_constant_p(n) ? \ | 18 | #define udelay(n) (__builtin_constant_p(n) ? \ |
diff --git a/include/asm-avr32/timex.h b/include/asm-avr32/timex.h index 5e44ecb3ce0c..187dcf38b210 100644 --- a/include/asm-avr32/timex.h +++ b/include/asm-avr32/timex.h | |||
@@ -34,7 +34,6 @@ static inline cycles_t get_cycles (void) | |||
34 | return 0; | 34 | return 0; |
35 | } | 35 | } |
36 | 36 | ||
37 | extern int read_current_timer(unsigned long *timer_value); | 37 | #define ARCH_HAS_READ_CURRENT_TIMER |
38 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | ||
39 | 38 | ||
40 | #endif /* __ASM_AVR32_TIMEX_H */ | 39 | #endif /* __ASM_AVR32_TIMEX_H */ |
diff --git a/include/asm-avr32/unistd.h b/include/asm-avr32/unistd.h index de09009593f8..89861a27543e 100644 --- a/include/asm-avr32/unistd.h +++ b/include/asm-avr32/unistd.h | |||
@@ -297,7 +297,7 @@ | |||
297 | 297 | ||
298 | #define __NR_utimensat 278 | 298 | #define __NR_utimensat 278 |
299 | #define __NR_signalfd 279 | 299 | #define __NR_signalfd 279 |
300 | #define __NR_timerfd 280 | 300 | /* 280 was __NR_timerfd */ |
301 | #define __NR_eventfd 281 | 301 | #define __NR_eventfd 281 |
302 | 302 | ||
303 | #ifdef __KERNEL__ | 303 | #ifdef __KERNEL__ |
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index 1601d62f39a5..574fe56989d1 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h | |||
@@ -188,8 +188,6 @@ extern void blkfin_inv_cache_all(void); | |||
188 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) | 188 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) |
189 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) | 189 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) |
190 | 190 | ||
191 | #define mm_ptov(vaddr) ((void *) (vaddr)) | ||
192 | #define mm_vtop(vaddr) ((unsigned long) (vaddr)) | ||
193 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | 191 | #define phys_to_virt(vaddr) ((void *) (vaddr)) |
194 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) | 192 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) |
195 | 193 | ||
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index cd84f1771e34..e8c986667532 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -328,7 +328,7 @@ | |||
328 | #define __NR_epoll_pwait 319 | 328 | #define __NR_epoll_pwait 319 |
329 | #define __NR_utimensat 320 | 329 | #define __NR_utimensat 320 |
330 | #define __NR_signalfd 321 | 330 | #define __NR_signalfd 321 |
331 | #define __NR_timerfd 322 | 331 | /* #define __NR_timerfd 322 removed */ |
332 | #define __NR_eventfd 323 | 332 | #define __NR_eventfd 323 |
333 | #define __NR_fallocate 324 | 333 | #define __NR_fallocate 324 |
334 | 334 | ||
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 09204e40d663..1c1fa422d18a 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h | |||
@@ -18,6 +18,7 @@ typedef unsigned long cputime_t; | |||
18 | #define cputime_lt(__a, __b) ((__a) < (__b)) | 18 | #define cputime_lt(__a, __b) ((__a) < (__b)) |
19 | #define cputime_le(__a, __b) ((__a) <= (__b)) | 19 | #define cputime_le(__a, __b) ((__a) <= (__b)) |
20 | #define cputime_to_jiffies(__ct) (__ct) | 20 | #define cputime_to_jiffies(__ct) (__ct) |
21 | #define cputime_to_scaled(__ct) (__ct) | ||
21 | #define jiffies_to_cputime(__hz) (__hz) | 22 | #define jiffies_to_cputime(__hz) (__hz) |
22 | 23 | ||
23 | typedef u64 cputime64_t; | 24 | typedef u64 cputime64_t; |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 962cad7cfbbd..8feeae1f2369 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -8,8 +8,6 @@ extern char _data[], _sdata[], _edata[]; | |||
8 | extern char __bss_start[], __bss_stop[]; | 8 | extern char __bss_start[], __bss_stop[]; |
9 | extern char __init_begin[], __init_end[]; | 9 | extern char __init_begin[], __init_end[]; |
10 | extern char _sinittext[], _einittext[]; | 10 | extern char _sinittext[], _einittext[]; |
11 | extern char _sextratext[] __attribute__((weak)); | ||
12 | extern char _eextratext[] __attribute__((weak)); | ||
13 | extern char _end[]; | 11 | extern char _end[]; |
14 | extern char __per_cpu_start[], __per_cpu_end[]; | 12 | extern char __per_cpu_start[], __per_cpu_end[]; |
15 | extern char __kprobes_text_start[], __kprobes_text_end[]; | 13 | extern char __kprobes_text_start[], __kprobes_text_end[]; |
diff --git a/include/asm-h8300/io.h b/include/asm-h8300/io.h index 7543a57b4ea1..26dc6ccd9441 100644 --- a/include/asm-h8300/io.h +++ b/include/asm-h8300/io.h | |||
@@ -302,8 +302,6 @@ static __inline__ void ctrl_outl(unsigned long b, unsigned long addr) | |||
302 | /* | 302 | /* |
303 | * Macros used for converting between virtual and physical mappings. | 303 | * Macros used for converting between virtual and physical mappings. |
304 | */ | 304 | */ |
305 | #define mm_ptov(vaddr) ((void *) (vaddr)) | ||
306 | #define mm_vtop(vaddr) ((unsigned long) (vaddr)) | ||
307 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | 305 | #define phys_to_virt(vaddr) ((void *) (vaddr)) |
308 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) | 306 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) |
309 | 307 | ||
diff --git a/include/asm-h8300/virtconvert.h b/include/asm-h8300/virtconvert.h index ee7d5ea10065..19cfd62b11c3 100644 --- a/include/asm-h8300/virtconvert.h +++ b/include/asm-h8300/virtconvert.h | |||
@@ -10,8 +10,6 @@ | |||
10 | #include <asm/setup.h> | 10 | #include <asm/setup.h> |
11 | #include <asm/page.h> | 11 | #include <asm/page.h> |
12 | 12 | ||
13 | #define mm_ptov(vaddr) ((void *) (vaddr)) | ||
14 | #define mm_vtop(vaddr) ((unsigned long) (vaddr)) | ||
15 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | 13 | #define phys_to_virt(vaddr) ((void *) (vaddr)) |
16 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) | 14 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) |
17 | 15 | ||
diff --git a/include/asm-m32r/delay.h b/include/asm-m32r/delay.h index 164448d23850..9dd9e999ea69 100644 --- a/include/asm-m32r/delay.h +++ b/include/asm-m32r/delay.h | |||
@@ -12,7 +12,7 @@ extern void __bad_ndelay(void); | |||
12 | 12 | ||
13 | extern void __udelay(unsigned long usecs); | 13 | extern void __udelay(unsigned long usecs); |
14 | extern void __ndelay(unsigned long nsecs); | 14 | extern void __ndelay(unsigned long nsecs); |
15 | extern void __const_udelay(unsigned long usecs); | 15 | extern void __const_udelay(unsigned long xloops); |
16 | extern void __delay(unsigned long loops); | 16 | extern void __delay(unsigned long loops); |
17 | 17 | ||
18 | #define udelay(n) (__builtin_constant_p(n) ? \ | 18 | #define udelay(n) (__builtin_constant_p(n) ? \ |
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index f467eac9ba70..cf701c933249 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h | |||
@@ -327,7 +327,7 @@ | |||
327 | #define __NR_epoll_pwait 319 | 327 | #define __NR_epoll_pwait 319 |
328 | #define __NR_utimensat 320 | 328 | #define __NR_utimensat 320 |
329 | #define __NR_signalfd 321 | 329 | #define __NR_signalfd 321 |
330 | #define __NR_timerfd 322 | 330 | /* #define __NR_timerfd 322 removed */ |
331 | #define __NR_eventfd 323 | 331 | #define __NR_eventfd 323 |
332 | #define __NR_fallocate 324 | 332 | #define __NR_fallocate 324 |
333 | 333 | ||
diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h index 778a4c538eb2..0b604f0f192d 100644 --- a/include/asm-m68k/pgtable.h +++ b/include/asm-m68k/pgtable.h | |||
@@ -107,8 +107,6 @@ extern void *empty_zero_page; | |||
107 | /* 64-bit machines, beware! SRB. */ | 107 | /* 64-bit machines, beware! SRB. */ |
108 | #define SIZEOF_PTR_LOG2 2 | 108 | #define SIZEOF_PTR_LOG2 2 |
109 | 109 | ||
110 | #define mm_end_of_chunk(addr, len) 0 | ||
111 | |||
112 | extern void kernel_set_cachemode(void *addr, unsigned long size, int cmode); | 110 | extern void kernel_set_cachemode(void *addr, unsigned long size, int cmode); |
113 | 111 | ||
114 | /* | 112 | /* |
diff --git a/include/asm-m68knommu/io.h b/include/asm-m68knommu/io.h index 653d9b2d7ddf..6adef1ee2082 100644 --- a/include/asm-m68knommu/io.h +++ b/include/asm-m68knommu/io.h | |||
@@ -172,8 +172,6 @@ extern void iounmap(void *addr); | |||
172 | /* | 172 | /* |
173 | * Macros used for converting between virtual and physical mappings. | 173 | * Macros used for converting between virtual and physical mappings. |
174 | */ | 174 | */ |
175 | #define mm_ptov(vaddr) ((void *) (vaddr)) | ||
176 | #define mm_vtop(vaddr) ((unsigned long) (vaddr)) | ||
177 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | 175 | #define phys_to_virt(vaddr) ((void *) (vaddr)) |
178 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) | 176 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) |
179 | 177 | ||
diff --git a/include/asm-powerpc/cputime.h b/include/asm-powerpc/cputime.h index 310804485208..f42e623030ee 100644 --- a/include/asm-powerpc/cputime.h +++ b/include/asm-powerpc/cputime.h | |||
@@ -52,12 +52,26 @@ typedef u64 cputime64_t; | |||
52 | * Convert cputime <-> jiffies | 52 | * Convert cputime <-> jiffies |
53 | */ | 53 | */ |
54 | extern u64 __cputime_jiffies_factor; | 54 | extern u64 __cputime_jiffies_factor; |
55 | DECLARE_PER_CPU(unsigned long, cputime_last_delta); | ||
56 | DECLARE_PER_CPU(unsigned long, cputime_scaled_last_delta); | ||
55 | 57 | ||
56 | static inline unsigned long cputime_to_jiffies(const cputime_t ct) | 58 | static inline unsigned long cputime_to_jiffies(const cputime_t ct) |
57 | { | 59 | { |
58 | return mulhdu(ct, __cputime_jiffies_factor); | 60 | return mulhdu(ct, __cputime_jiffies_factor); |
59 | } | 61 | } |
60 | 62 | ||
63 | /* Estimate the scaled cputime by scaling the real cputime based on | ||
64 | * the last scaled to real ratio */ | ||
65 | static inline cputime_t cputime_to_scaled(const cputime_t ct) | ||
66 | { | ||
67 | if (cpu_has_feature(CPU_FTR_SPURR) && | ||
68 | per_cpu(cputime_last_delta, smp_processor_id())) | ||
69 | return ct * | ||
70 | per_cpu(cputime_scaled_last_delta, smp_processor_id())/ | ||
71 | per_cpu(cputime_last_delta, smp_processor_id()); | ||
72 | return ct; | ||
73 | } | ||
74 | |||
61 | static inline cputime_t jiffies_to_cputime(const unsigned long jif) | 75 | static inline cputime_t jiffies_to_cputime(const unsigned long jif) |
62 | { | 76 | { |
63 | cputime_t ct; | 77 | cputime_t ct; |
diff --git a/include/asm-powerpc/dma.h b/include/asm-powerpc/dma.h index 7a4374bdbef4..a7e06e25c708 100644 --- a/include/asm-powerpc/dma.h +++ b/include/asm-powerpc/dma.h | |||
@@ -93,16 +93,6 @@ | |||
93 | * | 93 | * |
94 | */ | 94 | */ |
95 | 95 | ||
96 | /* see prep_setup_arch() for detailed informations */ | ||
97 | #if defined(CONFIG_SOUND_CS4232) && defined(CONFIG_PPC_PREP) | ||
98 | extern long ppc_cs4232_dma, ppc_cs4232_dma2; | ||
99 | #define SND_DMA1 ppc_cs4232_dma | ||
100 | #define SND_DMA2 ppc_cs4232_dma2 | ||
101 | #else | ||
102 | #define SND_DMA1 -1 | ||
103 | #define SND_DMA2 -1 | ||
104 | #endif | ||
105 | |||
106 | /* 8237 DMA controllers */ | 96 | /* 8237 DMA controllers */ |
107 | #define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ | 97 | #define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ |
108 | #define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */ | 98 | #define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */ |
@@ -269,24 +259,15 @@ static __inline__ void set_dma_page(unsigned int dmanr, int pagenr) | |||
269 | dma_outb(pagenr >> 8, DMA_HI_PAGE_3); | 259 | dma_outb(pagenr >> 8, DMA_HI_PAGE_3); |
270 | break; | 260 | break; |
271 | case 5: | 261 | case 5: |
272 | if (SND_DMA1 == 5 || SND_DMA2 == 5) | 262 | dma_outb(pagenr & 0xfe, DMA_LO_PAGE_5); |
273 | dma_outb(pagenr, DMA_LO_PAGE_5); | ||
274 | else | ||
275 | dma_outb(pagenr & 0xfe, DMA_LO_PAGE_5); | ||
276 | dma_outb(pagenr >> 8, DMA_HI_PAGE_5); | 263 | dma_outb(pagenr >> 8, DMA_HI_PAGE_5); |
277 | break; | 264 | break; |
278 | case 6: | 265 | case 6: |
279 | if (SND_DMA1 == 6 || SND_DMA2 == 6) | 266 | dma_outb(pagenr & 0xfe, DMA_LO_PAGE_6); |
280 | dma_outb(pagenr, DMA_LO_PAGE_6); | ||
281 | else | ||
282 | dma_outb(pagenr & 0xfe, DMA_LO_PAGE_6); | ||
283 | dma_outb(pagenr >> 8, DMA_HI_PAGE_6); | 267 | dma_outb(pagenr >> 8, DMA_HI_PAGE_6); |
284 | break; | 268 | break; |
285 | case 7: | 269 | case 7: |
286 | if (SND_DMA1 == 7 || SND_DMA2 == 7) | 270 | dma_outb(pagenr & 0xfe, DMA_LO_PAGE_7); |
287 | dma_outb(pagenr, DMA_LO_PAGE_7); | ||
288 | else | ||
289 | dma_outb(pagenr & 0xfe, DMA_LO_PAGE_7); | ||
290 | dma_outb(pagenr >> 8, DMA_HI_PAGE_7); | 271 | dma_outb(pagenr >> 8, DMA_HI_PAGE_7); |
291 | break; | 272 | break; |
292 | } | 273 | } |
@@ -302,12 +283,6 @@ static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int phys) | |||
302 | ((dmanr & 3) << 1) + IO_DMA1_BASE); | 283 | ((dmanr & 3) << 1) + IO_DMA1_BASE); |
303 | dma_outb((phys >> 8) & 0xff, | 284 | dma_outb((phys >> 8) & 0xff, |
304 | ((dmanr & 3) << 1) + IO_DMA1_BASE); | 285 | ((dmanr & 3) << 1) + IO_DMA1_BASE); |
305 | } else if (dmanr == SND_DMA1 || dmanr == SND_DMA2) { | ||
306 | dma_outb(phys & 0xff, | ||
307 | ((dmanr & 3) << 2) + IO_DMA2_BASE); | ||
308 | dma_outb((phys >> 8) & 0xff, | ||
309 | ((dmanr & 3) << 2) + IO_DMA2_BASE); | ||
310 | dma_outb((dmanr & 3), DMA2_EXT_REG); | ||
311 | } else { | 286 | } else { |
312 | dma_outb((phys >> 1) & 0xff, | 287 | dma_outb((phys >> 1) & 0xff, |
313 | ((dmanr & 3) << 2) + IO_DMA2_BASE); | 288 | ((dmanr & 3) << 2) + IO_DMA2_BASE); |
@@ -334,11 +309,6 @@ static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) | |||
334 | ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); | 309 | ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); |
335 | dma_outb((count >> 8) & 0xff, | 310 | dma_outb((count >> 8) & 0xff, |
336 | ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); | 311 | ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); |
337 | } else if (dmanr == SND_DMA1 || dmanr == SND_DMA2) { | ||
338 | dma_outb(count & 0xff, | ||
339 | ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); | ||
340 | dma_outb((count >> 8) & 0xff, | ||
341 | ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); | ||
342 | } else { | 312 | } else { |
343 | dma_outb((count >> 1) & 0xff, | 313 | dma_outb((count >> 1) & 0xff, |
344 | ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); | 314 | ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); |
@@ -368,8 +338,7 @@ static __inline__ int get_dma_residue(unsigned int dmanr) | |||
368 | count = 1 + dma_inb(io_port); | 338 | count = 1 + dma_inb(io_port); |
369 | count += dma_inb(io_port) << 8; | 339 | count += dma_inb(io_port) << 8; |
370 | 340 | ||
371 | return (dmanr <= 3 || dmanr == SND_DMA1 || dmanr == SND_DMA2) | 341 | return (dmanr <= 3) ? count : (count << 1); |
372 | ? count : (count << 1); | ||
373 | } | 342 | } |
374 | 343 | ||
375 | /* These are in kernel/dma.c: */ | 344 | /* These are in kernel/dma.c: */ |
diff --git a/include/asm-powerpc/mediabay.h b/include/asm-powerpc/mediabay.h index 9daa3252d7b6..de83fe196309 100644 --- a/include/asm-powerpc/mediabay.h +++ b/include/asm-powerpc/mediabay.h | |||
@@ -18,14 +18,14 @@ | |||
18 | #define MB_NO 7 /* media bay contains nothing */ | 18 | #define MB_NO 7 /* media bay contains nothing */ |
19 | 19 | ||
20 | int check_media_bay(struct device_node *which_bay, int what); | 20 | int check_media_bay(struct device_node *which_bay, int what); |
21 | int check_media_bay_by_base(unsigned long base, int what); | ||
22 | 21 | ||
23 | /* Number of bays in the machine or 0 */ | 22 | /* Number of bays in the machine or 0 */ |
24 | extern int media_bay_count; | 23 | extern int media_bay_count; |
25 | 24 | ||
26 | /* called by pmac-ide.c to register IDE controller for media bay */ | 25 | int check_media_bay_by_base(unsigned long base, int what); |
27 | extern int media_bay_set_ide_infos(struct device_node* which_bay, | 26 | /* called by IDE PMAC host driver to register IDE controller for media bay */ |
28 | unsigned long base, int irq, int index); | 27 | int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, |
28 | int irq, int index); | ||
29 | 29 | ||
30 | #endif /* __KERNEL__ */ | 30 | #endif /* __KERNEL__ */ |
31 | #endif /* _PPC_MEDIABAY_H */ | 31 | #endif /* _PPC_MEDIABAY_H */ |
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index f6dfce025adf..748b35ab37b5 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -115,8 +115,6 @@ struct paca_struct { | |||
115 | u64 system_time; /* accumulated system TB ticks */ | 115 | u64 system_time; /* accumulated system TB ticks */ |
116 | u64 startpurr; /* PURR/TB value snapshot */ | 116 | u64 startpurr; /* PURR/TB value snapshot */ |
117 | u64 startspurr; /* SPURR value snapshot */ | 117 | u64 startspurr; /* SPURR value snapshot */ |
118 | u64 purrdelta; /* FIXME: document */ | ||
119 | u64 spurrdelta; /* FIXME: document */ | ||
120 | }; | 118 | }; |
121 | 119 | ||
122 | extern struct paca_struct paca[]; | 120 | extern struct paca_struct paca[]; |
diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h index 967930b82ed3..fda98715cd35 100644 --- a/include/asm-powerpc/ps3av.h +++ b/include/asm-powerpc/ps3av.h | |||
@@ -310,19 +310,25 @@ | |||
310 | #define PS3AV_MONITOR_TYPE_HDMI 1 /* HDMI */ | 310 | #define PS3AV_MONITOR_TYPE_HDMI 1 /* HDMI */ |
311 | #define PS3AV_MONITOR_TYPE_DVI 2 /* DVI */ | 311 | #define PS3AV_MONITOR_TYPE_DVI 2 /* DVI */ |
312 | 312 | ||
313 | #define PS3AV_DEFAULT_HDMI_MODE_ID_REG_60 2 /* 480p */ | ||
314 | #define PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_60 1 /* 480i */ | ||
315 | #define PS3AV_DEFAULT_HDMI_MODE_ID_REG_50 7 /* 576p */ | ||
316 | #define PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_50 6 /* 576i */ | ||
317 | |||
318 | #define PS3AV_REGION_60 0x01 | ||
319 | #define PS3AV_REGION_50 0x02 | ||
320 | #define PS3AV_REGION_RGB 0x10 | ||
321 | |||
322 | #define get_status(buf) (((__u32 *)buf)[2]) | ||
323 | #define PS3AV_HDR_SIZE 4 /* version + size */ | ||
324 | 313 | ||
325 | /* for video mode */ | 314 | /* for video mode */ |
315 | enum ps3av_mode_num { | ||
316 | PS3AV_MODE_AUTO = 0, | ||
317 | PS3AV_MODE_480I = 1, | ||
318 | PS3AV_MODE_480P = 2, | ||
319 | PS3AV_MODE_720P60 = 3, | ||
320 | PS3AV_MODE_1080I60 = 4, | ||
321 | PS3AV_MODE_1080P60 = 5, | ||
322 | PS3AV_MODE_576I = 6, | ||
323 | PS3AV_MODE_576P = 7, | ||
324 | PS3AV_MODE_720P50 = 8, | ||
325 | PS3AV_MODE_1080I50 = 9, | ||
326 | PS3AV_MODE_1080P50 = 10, | ||
327 | PS3AV_MODE_WXGA = 11, | ||
328 | PS3AV_MODE_SXGA = 12, | ||
329 | PS3AV_MODE_WUXGA = 13, | ||
330 | }; | ||
331 | |||
326 | #define PS3AV_MODE_MASK 0x000F | 332 | #define PS3AV_MODE_MASK 0x000F |
327 | #define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 product doesn't support this */ | 333 | #define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 product doesn't support this */ |
328 | #define PS3AV_MODE_DITHER 0x0800 | 334 | #define PS3AV_MODE_DITHER 0x0800 |
@@ -333,6 +339,19 @@ | |||
333 | #define PS3AV_MODE_RGB 0x0020 | 339 | #define PS3AV_MODE_RGB 0x0020 |
334 | 340 | ||
335 | 341 | ||
342 | #define PS3AV_DEFAULT_HDMI_MODE_ID_REG_60 PS3AV_MODE_480P | ||
343 | #define PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_60 PS3AV_MODE_480I | ||
344 | #define PS3AV_DEFAULT_HDMI_MODE_ID_REG_50 PS3AV_MODE_576P | ||
345 | #define PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_50 PS3AV_MODE_576I | ||
346 | |||
347 | #define PS3AV_REGION_60 0x01 | ||
348 | #define PS3AV_REGION_50 0x02 | ||
349 | #define PS3AV_REGION_RGB 0x10 | ||
350 | |||
351 | #define get_status(buf) (((__u32 *)buf)[2]) | ||
352 | #define PS3AV_HDR_SIZE 4 /* version + size */ | ||
353 | |||
354 | |||
336 | /** command packet structure **/ | 355 | /** command packet structure **/ |
337 | struct ps3av_send_hdr { | 356 | struct ps3av_send_hdr { |
338 | u16 version; | 357 | u16 version; |
@@ -713,8 +732,6 @@ extern int ps3av_set_video_mode(u32); | |||
713 | extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); | 732 | extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); |
714 | extern int ps3av_get_auto_mode(void); | 733 | extern int ps3av_get_auto_mode(void); |
715 | extern int ps3av_get_mode(void); | 734 | extern int ps3av_get_mode(void); |
716 | extern int ps3av_get_scanmode(int); | ||
717 | extern int ps3av_get_refresh_rate(int); | ||
718 | extern int ps3av_video_mode2res(u32, u32 *, u32 *); | 735 | extern int ps3av_video_mode2res(u32, u32 *, u32 *); |
719 | extern int ps3av_video_mute(int); | 736 | extern int ps3av_video_mute(int); |
720 | extern int ps3av_audio_mute(int); | 737 | extern int ps3av_audio_mute(int); |
diff --git a/include/asm-s390/cputime.h b/include/asm-s390/cputime.h index 4b3ef7cad115..133ce054fc89 100644 --- a/include/asm-s390/cputime.h +++ b/include/asm-s390/cputime.h | |||
@@ -54,6 +54,7 @@ __div(unsigned long long n, unsigned int base) | |||
54 | #define cputime_lt(__a, __b) ((__a) < (__b)) | 54 | #define cputime_lt(__a, __b) ((__a) < (__b)) |
55 | #define cputime_le(__a, __b) ((__a) <= (__b)) | 55 | #define cputime_le(__a, __b) ((__a) <= (__b)) |
56 | #define cputime_to_jiffies(__ct) (__div((__ct), 1000000 / HZ)) | 56 | #define cputime_to_jiffies(__ct) (__div((__ct), 1000000 / HZ)) |
57 | #define cputime_to_scaled(__ct) (__ct) | ||
57 | #define jiffies_to_cputime(__hz) ((cputime_t)(__hz) * (1000000 / HZ)) | 58 | #define jiffies_to_cputime(__hz) ((cputime_t)(__hz) * (1000000 / HZ)) |
58 | 59 | ||
59 | #define cputime64_zero (0ULL) | 60 | #define cputime64_zero (0ULL) |
diff --git a/include/asm-sh/delay.h b/include/asm-sh/delay.h index 031db84f2aa1..d5d464041003 100644 --- a/include/asm-sh/delay.h +++ b/include/asm-sh/delay.h | |||
@@ -12,7 +12,7 @@ extern void __bad_ndelay(void); | |||
12 | 12 | ||
13 | extern void __udelay(unsigned long usecs); | 13 | extern void __udelay(unsigned long usecs); |
14 | extern void __ndelay(unsigned long nsecs); | 14 | extern void __ndelay(unsigned long nsecs); |
15 | extern void __const_udelay(unsigned long usecs); | 15 | extern void __const_udelay(unsigned long xloops); |
16 | extern void __delay(unsigned long loops); | 16 | extern void __delay(unsigned long loops); |
17 | 17 | ||
18 | #ifdef CONFIG_SUPERH32 | 18 | #ifdef CONFIG_SUPERH32 |
diff --git a/include/asm-sh/unistd_32.h b/include/asm-sh/unistd_32.h index b182b1cb05fd..433fd1b48fa2 100644 --- a/include/asm-sh/unistd_32.h +++ b/include/asm-sh/unistd_32.h | |||
@@ -330,7 +330,7 @@ | |||
330 | #define __NR_epoll_pwait 319 | 330 | #define __NR_epoll_pwait 319 |
331 | #define __NR_utimensat 320 | 331 | #define __NR_utimensat 320 |
332 | #define __NR_signalfd 321 | 332 | #define __NR_signalfd 321 |
333 | #define __NR_timerfd 322 | 333 | /* #define __NR_timerfd 322 removed */ |
334 | #define __NR_eventfd 323 | 334 | #define __NR_eventfd 323 |
335 | #define __NR_fallocate 324 | 335 | #define __NR_fallocate 324 |
336 | 336 | ||
diff --git a/include/asm-sh/unistd_64.h b/include/asm-sh/unistd_64.h index 944511882cac..108d2ba897fe 100644 --- a/include/asm-sh/unistd_64.h +++ b/include/asm-sh/unistd_64.h | |||
@@ -370,7 +370,7 @@ | |||
370 | #define __NR_epoll_pwait 347 | 370 | #define __NR_epoll_pwait 347 |
371 | #define __NR_utimensat 348 | 371 | #define __NR_utimensat 348 |
372 | #define __NR_signalfd 349 | 372 | #define __NR_signalfd 349 |
373 | #define __NR_timerfd 350 | 373 | /* #define __NR_timerfd 350 removed */ |
374 | #define __NR_eventfd 351 | 374 | #define __NR_eventfd 351 |
375 | #define __NR_fallocate 352 | 375 | #define __NR_fallocate 352 |
376 | 376 | ||
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 0decdf763716..2338a0276377 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -327,11 +327,13 @@ | |||
327 | #define __NR_epoll_pwait 309 | 327 | #define __NR_epoll_pwait 309 |
328 | #define __NR_utimensat 310 | 328 | #define __NR_utimensat 310 |
329 | #define __NR_signalfd 311 | 329 | #define __NR_signalfd 311 |
330 | #define __NR_timerfd 312 | 330 | #define __NR_timerfd_create 312 |
331 | #define __NR_eventfd 313 | 331 | #define __NR_eventfd 313 |
332 | #define __NR_fallocate 314 | 332 | #define __NR_fallocate 314 |
333 | #define __NR_timerfd_settime 315 | ||
334 | #define __NR_timerfd_gettime 316 | ||
333 | 335 | ||
334 | #define NR_SYSCALLS 315 | 336 | #define NR_SYSCALLS 317 |
335 | 337 | ||
336 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | 338 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, |
337 | * it never had the plain ones and there is no value to adding those | 339 | * it never had the plain ones and there is no value to adding those |
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index c299b853b5ba..b6ece223562d 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -16,7 +16,7 @@ | |||
16 | /* BIO layer definitions. */ | 16 | /* BIO layer definitions. */ |
17 | extern unsigned long kern_base, kern_size; | 17 | extern unsigned long kern_base, kern_size; |
18 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 18 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
19 | #define BIO_VMERGE_BOUNDARY 8192 | 19 | #define BIO_VMERGE_BOUNDARY 0 |
20 | 20 | ||
21 | static inline u8 _inb(unsigned long addr) | 21 | static inline u8 _inb(unsigned long addr) |
22 | { | 22 | { |
diff --git a/include/asm-sparc64/timex.h b/include/asm-sparc64/timex.h index 2a5e4ebaad80..c622535c4560 100644 --- a/include/asm-sparc64/timex.h +++ b/include/asm-sparc64/timex.h | |||
@@ -14,10 +14,6 @@ | |||
14 | typedef unsigned long cycles_t; | 14 | typedef unsigned long cycles_t; |
15 | #define get_cycles() tick_ops->get_tick() | 15 | #define get_cycles() tick_ops->get_tick() |
16 | 16 | ||
17 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | 17 | #define ARCH_HAS_READ_CURRENT_TIMER |
18 | #define read_current_timer(timer_val_p) \ | ||
19 | ({ *timer_val_p = tick_ops->get_tick(); \ | ||
20 | 0; \ | ||
21 | }) | ||
22 | 18 | ||
23 | #endif | 19 | #endif |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index cb751b4d0f56..77559da0ea3f 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -329,11 +329,13 @@ | |||
329 | #define __NR_epoll_pwait 309 | 329 | #define __NR_epoll_pwait 309 |
330 | #define __NR_utimensat 310 | 330 | #define __NR_utimensat 310 |
331 | #define __NR_signalfd 311 | 331 | #define __NR_signalfd 311 |
332 | #define __NR_timerfd 312 | 332 | #define __NR_timerfd_create 312 |
333 | #define __NR_eventfd 313 | 333 | #define __NR_eventfd 313 |
334 | #define __NR_fallocate 314 | 334 | #define __NR_fallocate 314 |
335 | #define __NR_timerfd_settime 315 | ||
336 | #define __NR_timerfd_gettime 316 | ||
335 | 337 | ||
336 | #define NR_SYSCALLS 315 | 338 | #define NR_SYSCALLS 317 |
337 | 339 | ||
338 | #ifdef __KERNEL__ | 340 | #ifdef __KERNEL__ |
339 | /* sysconf options, for SunOS compatibility */ | 341 | /* sysconf options, for SunOS compatibility */ |
diff --git a/include/asm-v850/io.h b/include/asm-v850/io.h index cc364fcbec10..cdad251fba9f 100644 --- a/include/asm-v850/io.h +++ b/include/asm-v850/io.h | |||
@@ -122,8 +122,6 @@ outsl (unsigned long port, const void *src, unsigned long count) | |||
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | /* Conversion between virtual and physical mappings. */ | 124 | /* Conversion between virtual and physical mappings. */ |
125 | #define mm_ptov(addr) ((void *)__phys_to_virt (addr)) | ||
126 | #define mm_vtop(addr) ((unsigned long)__virt_to_phys (addr)) | ||
127 | #define phys_to_virt(addr) ((void *)__phys_to_virt (addr)) | 125 | #define phys_to_virt(addr) ((void *)__phys_to_virt (addr)) |
128 | #define virt_to_phys(addr) ((unsigned long)__virt_to_phys (addr)) | 126 | #define virt_to_phys(addr) ((unsigned long)__virt_to_phys (addr)) |
129 | 127 | ||
diff --git a/include/asm-x86/delay.h b/include/asm-x86/delay.h index d11d47fc1a0e..409a649204aa 100644 --- a/include/asm-x86/delay.h +++ b/include/asm-x86/delay.h | |||
@@ -13,7 +13,7 @@ extern void __bad_ndelay(void); | |||
13 | 13 | ||
14 | extern void __udelay(unsigned long usecs); | 14 | extern void __udelay(unsigned long usecs); |
15 | extern void __ndelay(unsigned long nsecs); | 15 | extern void __ndelay(unsigned long nsecs); |
16 | extern void __const_udelay(unsigned long usecs); | 16 | extern void __const_udelay(unsigned long xloops); |
17 | extern void __delay(unsigned long loops); | 17 | extern void __delay(unsigned long loops); |
18 | 18 | ||
19 | /* 0x10c7 is 2**32 / 1000000 (rounded up) */ | 19 | /* 0x10c7 is 2**32 / 1000000 (rounded up) */ |
diff --git a/include/asm-x86/timex.h b/include/asm-x86/timex.h index 27cfd6c599ba..43e5a78500c5 100644 --- a/include/asm-x86/timex.h +++ b/include/asm-x86/timex.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #endif | 14 | #endif |
15 | #define CLOCK_TICK_RATE PIT_TICK_RATE | 15 | #define CLOCK_TICK_RATE PIT_TICK_RATE |
16 | 16 | ||
17 | extern int read_current_timer(unsigned long *timer_value); | 17 | #define ARCH_HAS_READ_CURRENT_TIMER |
18 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | ||
19 | 18 | ||
20 | #endif | 19 | #endif |
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h index 22eb9367235a..0260c3e79fdd 100644 --- a/include/linux/ac97_codec.h +++ b/include/linux/ac97_codec.h | |||
@@ -326,11 +326,7 @@ struct ac97_ops | |||
326 | #define AC97_DEFAULT_POWER_OFF 4 /* Needs warm reset to power up */ | 326 | #define AC97_DEFAULT_POWER_OFF 4 /* Needs warm reset to power up */ |
327 | }; | 327 | }; |
328 | 328 | ||
329 | extern int ac97_read_proc (char *page_out, char **start, off_t off, | ||
330 | int count, int *eof, void *data); | ||
331 | extern int ac97_probe_codec(struct ac97_codec *); | 329 | extern int ac97_probe_codec(struct ac97_codec *); |
332 | extern unsigned int ac97_set_adc_rate(struct ac97_codec *codec, unsigned int rate); | ||
333 | extern unsigned int ac97_set_dac_rate(struct ac97_codec *codec, unsigned int rate); | ||
334 | 330 | ||
335 | extern struct ac97_codec *ac97_alloc_codec(void); | 331 | extern struct ac97_codec *ac97_alloc_codec(void); |
336 | extern void ac97_release_codec(struct ac97_codec *codec); | 332 | extern void ac97_release_codec(struct ac97_codec *codec); |
@@ -363,7 +359,4 @@ struct ac97_quirk { | |||
363 | int type; /* quirk type above */ | 359 | int type; /* quirk type above */ |
364 | }; | 360 | }; |
365 | 361 | ||
366 | struct pci_dev; | ||
367 | extern int ac97_tune_hardware(struct pci_dev *pdev, struct ac97_quirk *quirk, int override); | ||
368 | |||
369 | #endif /* _AC97_CODEC_H_ */ | 362 | #endif /* _AC97_CODEC_H_ */ |
diff --git a/include/linux/acct.h b/include/linux/acct.h index 302eb727ecb8..e8cae54e8d88 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -173,7 +173,11 @@ typedef struct acct acct_t; | |||
173 | static inline u32 jiffies_to_AHZ(unsigned long x) | 173 | static inline u32 jiffies_to_AHZ(unsigned long x) |
174 | { | 174 | { |
175 | #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 | 175 | #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 |
176 | # if HZ < AHZ | ||
177 | return x * (AHZ / HZ); | ||
178 | # else | ||
176 | return x / (HZ / AHZ); | 179 | return x / (HZ / AHZ); |
180 | # endif | ||
177 | #else | 181 | #else |
178 | u64 tmp = (u64)x * TICK_NSEC; | 182 | u64 tmp = (u64)x * TICK_NSEC; |
179 | do_div(tmp, (NSEC_PER_SEC / AHZ)); | 183 | do_div(tmp, (NSEC_PER_SEC / AHZ)); |
diff --git a/include/linux/compat.h b/include/linux/compat.h index ae0a483bef9b..a671dbff7a1f 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -257,16 +257,8 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, | |||
257 | /* | 257 | /* |
258 | * epoll (fs/eventpoll.c) compat bits follow ... | 258 | * epoll (fs/eventpoll.c) compat bits follow ... |
259 | */ | 259 | */ |
260 | #ifndef CONFIG_HAS_COMPAT_EPOLL_EVENT | ||
261 | struct epoll_event; | 260 | struct epoll_event; |
262 | #define compat_epoll_event epoll_event | 261 | #define compat_epoll_event epoll_event |
263 | #else | ||
264 | asmlinkage long compat_sys_epoll_ctl(int epfd, int op, int fd, | ||
265 | struct compat_epoll_event __user *event); | ||
266 | asmlinkage long compat_sys_epoll_wait(int epfd, | ||
267 | struct compat_epoll_event __user *events, | ||
268 | int maxevents, int timeout); | ||
269 | #endif | ||
270 | asmlinkage long compat_sys_epoll_pwait(int epfd, | 262 | asmlinkage long compat_sys_epoll_pwait(int epfd, |
271 | struct compat_epoll_event __user *events, | 263 | struct compat_epoll_event __user *events, |
272 | int maxevents, int timeout, | 264 | int maxevents, int timeout, |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 56bd421c1208..109734bf6377 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | /* Fixed constants first: */ | 22 | /* Fixed constants first: */ |
23 | #undef NR_OPEN | 23 | #undef NR_OPEN |
24 | #define NR_OPEN (1024*1024) /* Absolute upper limit on fd num */ | 24 | extern int sysctl_nr_open; |
25 | #define INR_OPEN 1024 /* Initial setting for nfile rlimits */ | 25 | #define INR_OPEN 1024 /* Initial setting for nfile rlimits */ |
26 | 26 | ||
27 | #define BLOCK_SIZE_BITS 10 | 27 | #define BLOCK_SIZE_BITS 10 |
@@ -977,7 +977,6 @@ extern int send_sigurg(struct fown_struct *fown); | |||
977 | extern struct list_head super_blocks; | 977 | extern struct list_head super_blocks; |
978 | extern spinlock_t sb_lock; | 978 | extern spinlock_t sb_lock; |
979 | 979 | ||
980 | #define sb_entry(list) list_entry((list), struct super_block, s_list) | ||
981 | #define S_BIAS (1<<30) | 980 | #define S_BIAS (1<<30) |
982 | struct super_block { | 981 | struct super_block { |
983 | struct list_head s_list; /* Keep this first */ | 982 | struct list_head s_list; /* Keep this first */ |
@@ -1279,8 +1278,10 @@ struct super_operations { | |||
1279 | * | 1278 | * |
1280 | * Two bits are used for locking and completion notification, I_LOCK and I_SYNC. | 1279 | * Two bits are used for locking and completion notification, I_LOCK and I_SYNC. |
1281 | * | 1280 | * |
1282 | * I_DIRTY_SYNC Inode itself is dirty. | 1281 | * I_DIRTY_SYNC Inode is dirty, but doesn't have to be written on |
1283 | * I_DIRTY_DATASYNC Data-related inode changes pending | 1282 | * fdatasync(). i_atime is the usual cause. |
1283 | * I_DIRTY_DATASYNC Inode is dirty and must be written on fdatasync(), f.e. | ||
1284 | * because i_size changed. | ||
1284 | * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean. | 1285 | * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean. |
1285 | * I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both | 1286 | * I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both |
1286 | * are cleared by unlock_new_inode(), called from iget(). | 1287 | * are cleared by unlock_new_inode(), called from iget(). |
@@ -1312,8 +1313,6 @@ struct super_operations { | |||
1312 | * purpose reduces latency and prevents some filesystem- | 1313 | * purpose reduces latency and prevents some filesystem- |
1313 | * specific deadlocks. | 1314 | * specific deadlocks. |
1314 | * | 1315 | * |
1315 | * Q: Why does I_DIRTY_DATASYNC exist? It appears as if it could be replaced | ||
1316 | * by (I_DIRTY_SYNC|I_DIRTY_PAGES). | ||
1317 | * Q: What is the difference between I_WILL_FREE and I_FREEING? | 1316 | * Q: What is the difference between I_WILL_FREE and I_FREEING? |
1318 | * Q: igrab() only checks on (I_FREEING|I_WILL_FREE). Should it also check on | 1317 | * Q: igrab() only checks on (I_FREEING|I_WILL_FREE). Should it also check on |
1319 | * I_CLEAR? If not, why? | 1318 | * I_CLEAR? If not, why? |
@@ -2113,6 +2112,7 @@ struct ctl_table; | |||
2113 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, | 2112 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, |
2114 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2113 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2115 | 2114 | ||
2115 | int get_filesystem_list(char * buf); | ||
2116 | 2116 | ||
2117 | #endif /* __KERNEL__ */ | 2117 | #endif /* __KERNEL__ */ |
2118 | #endif /* _LINUX_FS_H */ | 2118 | #endif /* _LINUX_FS_H */ |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 2bd31fa623b6..d4b7c4ac72e6 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -92,6 +92,14 @@ static inline void fsnotify_inoderemove(struct inode *inode) | |||
92 | } | 92 | } |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * fsnotify_link_count - inode's link count changed | ||
96 | */ | ||
97 | static inline void fsnotify_link_count(struct inode *inode) | ||
98 | { | ||
99 | inotify_inode_queue_event(inode, IN_ATTRIB, 0, NULL, NULL); | ||
100 | } | ||
101 | |||
102 | /* | ||
95 | * fsnotify_create - 'name' was linked in | 103 | * fsnotify_create - 'name' was linked in |
96 | */ | 104 | */ |
97 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | 105 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) |
@@ -103,6 +111,20 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
103 | } | 111 | } |
104 | 112 | ||
105 | /* | 113 | /* |
114 | * fsnotify_link - new hardlink in 'inode' directory | ||
115 | * Note: We have to pass also the linked inode ptr as some filesystems leave | ||
116 | * new_dentry->d_inode NULL and instantiate inode pointer later | ||
117 | */ | ||
118 | static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct dentry *new_dentry) | ||
119 | { | ||
120 | inode_dir_notify(dir, DN_CREATE); | ||
121 | inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, | ||
122 | inode); | ||
123 | fsnotify_link_count(inode); | ||
124 | audit_inode_child(new_dentry->d_name.name, new_dentry, dir); | ||
125 | } | ||
126 | |||
127 | /* | ||
106 | * fsnotify_mkdir - directory 'name' was created | 128 | * fsnotify_mkdir - directory 'name' was created |
107 | */ | 129 | */ |
108 | static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | 130 | static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) |
diff --git a/include/linux/hash.h b/include/linux/hash.h index acf17bb8e7f9..06d25c189cc5 100644 --- a/include/linux/hash.h +++ b/include/linux/hash.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef _LINUX_HASH_H | 1 | #ifndef _LINUX_HASH_H |
2 | #define _LINUX_HASH_H | 2 | #define _LINUX_HASH_H |
3 | /* Fast hashing routine for a long. | 3 | /* Fast hashing routine for ints, longs and pointers. |
4 | (C) 2002 William Lee Irwin III, IBM */ | 4 | (C) 2002 William Lee Irwin III, IBM */ |
5 | 5 | ||
6 | /* | 6 | /* |
@@ -13,23 +13,30 @@ | |||
13 | * them can use shifts and additions instead of multiplications for | 13 | * them can use shifts and additions instead of multiplications for |
14 | * machines where multiplications are slow. | 14 | * machines where multiplications are slow. |
15 | */ | 15 | */ |
16 | #if BITS_PER_LONG == 32 | 16 | |
17 | #include <asm/types.h> | ||
18 | |||
17 | /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ | 19 | /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ |
18 | #define GOLDEN_RATIO_PRIME 0x9e370001UL | 20 | #define GOLDEN_RATIO_PRIME_32 0x9e370001UL |
19 | #elif BITS_PER_LONG == 64 | ||
20 | /* 2^63 + 2^61 - 2^57 + 2^54 - 2^51 - 2^18 + 1 */ | 21 | /* 2^63 + 2^61 - 2^57 + 2^54 - 2^51 - 2^18 + 1 */ |
21 | #define GOLDEN_RATIO_PRIME 0x9e37fffffffc0001UL | 22 | #define GOLDEN_RATIO_PRIME_64 0x9e37fffffffc0001UL |
23 | |||
24 | #if BITS_PER_LONG == 32 | ||
25 | #define GOLDEN_RATIO_PRIME GOLDEN_RATIO_PRIME_32 | ||
26 | #define hash_long(val, bits) hash_32(val, bits) | ||
27 | #elif BITS_PER_LONG == 64 | ||
28 | #define hash_long(val, bits) hash_64(val, bits) | ||
29 | #define GOLDEN_RATIO_PRIME GOLDEN_RATIO_PRIME_64 | ||
22 | #else | 30 | #else |
23 | #error Define GOLDEN_RATIO_PRIME for your wordsize. | 31 | #error Wordsize not 32 or 64 |
24 | #endif | 32 | #endif |
25 | 33 | ||
26 | static inline unsigned long hash_long(unsigned long val, unsigned int bits) | 34 | static inline u64 hash_64(u64 val, unsigned int bits) |
27 | { | 35 | { |
28 | unsigned long hash = val; | 36 | u64 hash = val; |
29 | 37 | ||
30 | #if BITS_PER_LONG == 64 | ||
31 | /* Sigh, gcc can't optimise this alone like it does for 32 bits. */ | 38 | /* Sigh, gcc can't optimise this alone like it does for 32 bits. */ |
32 | unsigned long n = hash; | 39 | u64 n = hash; |
33 | n <<= 18; | 40 | n <<= 18; |
34 | hash -= n; | 41 | hash -= n; |
35 | n <<= 33; | 42 | n <<= 33; |
@@ -42,15 +49,20 @@ static inline unsigned long hash_long(unsigned long val, unsigned int bits) | |||
42 | hash += n; | 49 | hash += n; |
43 | n <<= 2; | 50 | n <<= 2; |
44 | hash += n; | 51 | hash += n; |
45 | #else | 52 | |
53 | /* High bits are more random, so use them. */ | ||
54 | return hash >> (64 - bits); | ||
55 | } | ||
56 | |||
57 | static inline u32 hash_32(u32 val, unsigned int bits) | ||
58 | { | ||
46 | /* On some cpus multiply is faster, on others gcc will do shifts */ | 59 | /* On some cpus multiply is faster, on others gcc will do shifts */ |
47 | hash *= GOLDEN_RATIO_PRIME; | 60 | u32 hash = val * GOLDEN_RATIO_PRIME_32; |
48 | #endif | ||
49 | 61 | ||
50 | /* High bits are more random, so use them. */ | 62 | /* High bits are more random, so use them. */ |
51 | return hash >> (BITS_PER_LONG - bits); | 63 | return hash >> (32 - bits); |
52 | } | 64 | } |
53 | 65 | ||
54 | static inline unsigned long hash_ptr(void *ptr, unsigned int bits) | 66 | static inline unsigned long hash_ptr(void *ptr, unsigned int bits) |
55 | { | 67 | { |
56 | return hash_long((unsigned long)ptr, bits); | 68 | return hash_long((unsigned long)ptr, bits); |
diff --git a/include/linux/i2c/pca9539.h b/include/linux/i2c/pca953x.h index 611d84ab7a30..3c7361217df8 100644 --- a/include/linux/i2c/pca9539.h +++ b/include/linux/i2c/pca953x.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* platform data for the PCA9539 16-bit I/O expander driver */ | 1 | /* platform data for the PCA9539 16-bit I/O expander driver */ |
2 | 2 | ||
3 | struct pca9539_platform_data { | 3 | struct pca953x_platform_data { |
4 | /* number of the first GPIO */ | 4 | /* number of the first GPIO */ |
5 | unsigned gpio_base; | 5 | unsigned gpio_base; |
6 | 6 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 367c17084a28..acec99da832d 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -115,10 +115,6 @@ typedef unsigned char byte; /* used everywhere */ | |||
115 | #define SATA_ERROR_OFFSET (1) | 115 | #define SATA_ERROR_OFFSET (1) |
116 | #define SATA_CONTROL_OFFSET (2) | 116 | #define SATA_CONTROL_OFFSET (2) |
117 | 117 | ||
118 | #define SATA_MISC_OFFSET (0) | ||
119 | #define SATA_PHY_OFFSET (1) | ||
120 | #define SATA_IEN_OFFSET (2) | ||
121 | |||
122 | /* | 118 | /* |
123 | * Our Physical Region Descriptor (PRD) table should be large enough | 119 | * Our Physical Region Descriptor (PRD) table should be large enough |
124 | * to handle the biggest I/O request we are likely to see. Since requests | 120 | * to handle the biggest I/O request we are likely to see. Since requests |
@@ -173,7 +169,7 @@ enum { ide_unknown, ide_generic, ide_pci, | |||
173 | ide_rz1000, ide_trm290, | 169 | ide_rz1000, ide_trm290, |
174 | ide_cmd646, ide_cy82c693, ide_4drives, | 170 | ide_cmd646, ide_cy82c693, ide_4drives, |
175 | ide_pmac, ide_etrax100, ide_acorn, | 171 | ide_pmac, ide_etrax100, ide_acorn, |
176 | ide_au1xxx, ide_forced | 172 | ide_au1xxx, ide_palm3710, ide_forced |
177 | }; | 173 | }; |
178 | 174 | ||
179 | typedef u8 hwif_chipset_t; | 175 | typedef u8 hwif_chipset_t; |
@@ -198,17 +194,6 @@ struct ide_drive_s; | |||
198 | int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *), | 194 | int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *), |
199 | struct hwif_s **); | 195 | struct hwif_s **); |
200 | 196 | ||
201 | void ide_setup_ports( hw_regs_t *hw, | ||
202 | unsigned long base, | ||
203 | int *offsets, | ||
204 | unsigned long ctrl, | ||
205 | unsigned long intr, | ||
206 | ide_ack_intr_t *ack_intr, | ||
207 | #if 0 | ||
208 | ide_io_ops_t *iops, | ||
209 | #endif | ||
210 | int irq); | ||
211 | |||
212 | static inline void ide_std_init_ports(hw_regs_t *hw, | 197 | static inline void ide_std_init_ports(hw_regs_t *hw, |
213 | unsigned long io_addr, | 198 | unsigned long io_addr, |
214 | unsigned long ctl_addr) | 199 | unsigned long ctl_addr) |
@@ -473,7 +458,6 @@ typedef struct hwif_s { | |||
473 | /* task file registers for pata and sata */ | 458 | /* task file registers for pata and sata */ |
474 | unsigned long io_ports[IDE_NR_PORTS]; | 459 | unsigned long io_ports[IDE_NR_PORTS]; |
475 | unsigned long sata_scr[SATA_NR_PORTS]; | 460 | unsigned long sata_scr[SATA_NR_PORTS]; |
476 | unsigned long sata_misc[SATA_NR_PORTS]; | ||
477 | 461 | ||
478 | ide_drive_t drives[MAX_DRIVES]; /* drive info */ | 462 | ide_drive_t drives[MAX_DRIVES]; /* drive info */ |
479 | 463 | ||
@@ -1014,7 +998,8 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o | |||
1014 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *); | 998 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *); |
1015 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 999 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1016 | 1000 | ||
1017 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1001 | /* FIXME: palm_bk3710 uses BLK_DEV_IDEDMA_PCI without BLK_DEV_IDEPCI! */ |
1002 | #if defined(CONFIG_BLK_DEV_IDEPCI) && defined(CONFIG_BLK_DEV_IDEDMA_PCI) | ||
1018 | void ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); | 1003 | void ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); |
1019 | #else | 1004 | #else |
1020 | static inline void ide_hwif_setup_dma(ide_hwif_t *hwif, | 1005 | static inline void ide_hwif_setup_dma(ide_hwif_t *hwif, |
@@ -1324,4 +1309,25 @@ static inline void ide_set_irq(ide_drive_t *drive, int on) | |||
1324 | drive->hwif->OUTB(drive->ctl | (on ? 0 : 2), IDE_CONTROL_REG); | 1309 | drive->hwif->OUTB(drive->ctl | (on ? 0 : 2), IDE_CONTROL_REG); |
1325 | } | 1310 | } |
1326 | 1311 | ||
1312 | static inline u8 ide_read_status(ide_drive_t *drive) | ||
1313 | { | ||
1314 | ide_hwif_t *hwif = drive->hwif; | ||
1315 | |||
1316 | return hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]); | ||
1317 | } | ||
1318 | |||
1319 | static inline u8 ide_read_altstatus(ide_drive_t *drive) | ||
1320 | { | ||
1321 | ide_hwif_t *hwif = drive->hwif; | ||
1322 | |||
1323 | return hwif->INB(hwif->io_ports[IDE_CONTROL_OFFSET]); | ||
1324 | } | ||
1325 | |||
1326 | static inline u8 ide_read_error(ide_drive_t *drive) | ||
1327 | { | ||
1328 | ide_hwif_t *hwif = drive->hwif; | ||
1329 | |||
1330 | return hwif->INB(hwif->io_ports[IDE_ERROR_OFFSET]); | ||
1331 | } | ||
1332 | |||
1327 | #endif /* _IDE_H */ | 1333 | #endif /* _IDE_H */ |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index c3db4a00f1fa..dea7598aeff4 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -444,4 +444,6 @@ static inline void init_irq_proc(void) | |||
444 | } | 444 | } |
445 | #endif | 445 | #endif |
446 | 446 | ||
447 | int show_interrupts(struct seq_file *p, void *v); | ||
448 | |||
447 | #endif | 449 | #endif |
diff --git a/include/linux/isdn.h b/include/linux/isdn.h index d0ecc8eebfbf..9cb2855bb170 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h | |||
@@ -507,7 +507,6 @@ typedef struct modem_info { | |||
507 | struct ktermios normal_termios; /* For saving termios structs */ | 507 | struct ktermios normal_termios; /* For saving termios structs */ |
508 | struct ktermios callout_termios; | 508 | struct ktermios callout_termios; |
509 | wait_queue_head_t open_wait, close_wait; | 509 | wait_queue_head_t open_wait, close_wait; |
510 | struct semaphore write_sem; | ||
511 | spinlock_t readlock; | 510 | spinlock_t readlock; |
512 | } modem_info; | 511 | } modem_info; |
513 | 512 | ||
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index d9ecd13393b0..b18fd3b9b835 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/lockdep.h> | 33 | #include <linux/lockdep.h> |
34 | 34 | ||
35 | #include <asm/semaphore.h> | 35 | #include <asm/semaphore.h> |
36 | #endif | ||
37 | 36 | ||
38 | #define journal_oom_retry 1 | 37 | #define journal_oom_retry 1 |
39 | 38 | ||
@@ -84,7 +83,6 @@ static inline void jbd_free(void *ptr, size_t size) | |||
84 | 83 | ||
85 | #define JFS_MIN_JOURNAL_BLOCKS 1024 | 84 | #define JFS_MIN_JOURNAL_BLOCKS 1024 |
86 | 85 | ||
87 | #ifdef __KERNEL__ | ||
88 | 86 | ||
89 | /** | 87 | /** |
90 | * typedef handle_t - The handle_t type represents a single atomic update being performed by some process. | 88 | * typedef handle_t - The handle_t type represents a single atomic update being performed by some process. |
@@ -924,7 +922,6 @@ extern int journal_recover (journal_t *journal); | |||
924 | extern int journal_wipe (journal_t *, int); | 922 | extern int journal_wipe (journal_t *, int); |
925 | extern int journal_skip_recovery (journal_t *); | 923 | extern int journal_skip_recovery (journal_t *); |
926 | extern void journal_update_superblock (journal_t *, int); | 924 | extern void journal_update_superblock (journal_t *, int); |
927 | extern void __journal_abort_hard (journal_t *); | ||
928 | extern void journal_abort (journal_t *, int); | 925 | extern void journal_abort (journal_t *, int); |
929 | extern int journal_errno (journal_t *); | 926 | extern int journal_errno (journal_t *); |
930 | extern void journal_ack_err (journal_t *); | 927 | extern void journal_ack_err (journal_t *); |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ff356b2ee478..18222f267bc4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -35,7 +35,7 @@ extern const char linux_proc_banner[]; | |||
35 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | 35 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) |
36 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | 36 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) |
37 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) | 37 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) |
38 | #define IS_ALIGNED(x,a) (((x) % ((typeof(x))(a))) == 0) | 38 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) |
39 | 39 | ||
40 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 40 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
41 | 41 | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 6168c0a44172..4a6ce82ba039 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -152,8 +152,10 @@ static inline int arch_trampoline_kprobe(struct kprobe *p) | |||
152 | struct kretprobe { | 152 | struct kretprobe { |
153 | struct kprobe kp; | 153 | struct kprobe kp; |
154 | kretprobe_handler_t handler; | 154 | kretprobe_handler_t handler; |
155 | kretprobe_handler_t entry_handler; | ||
155 | int maxactive; | 156 | int maxactive; |
156 | int nmissed; | 157 | int nmissed; |
158 | size_t data_size; | ||
157 | struct hlist_head free_instances; | 159 | struct hlist_head free_instances; |
158 | struct hlist_head used_instances; | 160 | struct hlist_head used_instances; |
159 | }; | 161 | }; |
@@ -164,6 +166,7 @@ struct kretprobe_instance { | |||
164 | struct kretprobe *rp; | 166 | struct kretprobe *rp; |
165 | kprobe_opcode_t *ret_addr; | 167 | kprobe_opcode_t *ret_addr; |
166 | struct task_struct *task; | 168 | struct task_struct *task; |
169 | char data[0]; | ||
167 | }; | 170 | }; |
168 | 171 | ||
169 | struct kretprobe_blackpoint { | 172 | struct kretprobe_blackpoint { |
diff --git a/include/linux/log2.h b/include/linux/log2.h index c8cf5e8ef171..25b808631cd9 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h | |||
@@ -190,4 +190,20 @@ unsigned long __rounddown_pow_of_two(unsigned long n) | |||
190 | __rounddown_pow_of_two(n) \ | 190 | __rounddown_pow_of_two(n) \ |
191 | ) | 191 | ) |
192 | 192 | ||
193 | /** | ||
194 | * order_base_2 - calculate the (rounded up) base 2 order of the argument | ||
195 | * @n: parameter | ||
196 | * | ||
197 | * The first few values calculated by this routine: | ||
198 | * ob2(0) = 0 | ||
199 | * ob2(1) = 0 | ||
200 | * ob2(2) = 1 | ||
201 | * ob2(3) = 2 | ||
202 | * ob2(4) = 2 | ||
203 | * ob2(5) = 3 | ||
204 | * ... and so on. | ||
205 | */ | ||
206 | |||
207 | #define order_base_2(n) ilog2(roundup_pow_of_two(n)) | ||
208 | |||
193 | #endif /* _LINUX_LOG2_H */ | 209 | #endif /* _LINUX_LOG2_H */ |
diff --git a/include/linux/loop.h b/include/linux/loop.h index 26a0a103898f..46169a7b559b 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
@@ -76,6 +76,7 @@ struct loop_device { | |||
76 | enum { | 76 | enum { |
77 | LO_FLAGS_READ_ONLY = 1, | 77 | LO_FLAGS_READ_ONLY = 1, |
78 | LO_FLAGS_USE_AOPS = 2, | 78 | LO_FLAGS_USE_AOPS = 2, |
79 | LO_FLAGS_AUTOCLEAR = 4, | ||
79 | }; | 80 | }; |
80 | 81 | ||
81 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ | 82 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ |
diff --git a/include/linux/lp.h b/include/linux/lp.h index 7059b6b9878a..0df024bfd6f0 100644 --- a/include/linux/lp.h +++ b/include/linux/lp.h | |||
@@ -99,7 +99,7 @@ | |||
99 | #ifdef __KERNEL__ | 99 | #ifdef __KERNEL__ |
100 | 100 | ||
101 | #include <linux/wait.h> | 101 | #include <linux/wait.h> |
102 | #include <asm/semaphore.h> | 102 | #include <linux/mutex.h> |
103 | 103 | ||
104 | /* Magic numbers for defining port-device mappings */ | 104 | /* Magic numbers for defining port-device mappings */ |
105 | #define LP_PARPORT_UNSPEC -4 | 105 | #define LP_PARPORT_UNSPEC -4 |
@@ -145,7 +145,7 @@ struct lp_struct { | |||
145 | #endif | 145 | #endif |
146 | wait_queue_head_t waitq; | 146 | wait_queue_head_t waitq; |
147 | unsigned int last_error; | 147 | unsigned int last_error; |
148 | struct semaphore port_mutex; | 148 | struct mutex port_mutex; |
149 | wait_queue_head_t dataq; | 149 | wait_queue_head_t dataq; |
150 | long timeout; | 150 | long timeout; |
151 | unsigned int best_mode; | 151 | unsigned int best_mode; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 39d32837265b..df6dd79a0d3b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1765,6 +1765,7 @@ | |||
1765 | #define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 | 1765 | #define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 |
1766 | #define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050 | 1766 | #define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050 |
1767 | #define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060 | 1767 | #define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060 |
1768 | #define PCI_DEVICE_ID_QUATECH_SPPXP_100 0x0278 | ||
1768 | 1769 | ||
1769 | #define PCI_VENDOR_ID_SEALEVEL 0x135e | 1770 | #define PCI_VENDOR_ID_SEALEVEL 0x135e |
1770 | #define PCI_DEVICE_ID_SEALEVEL_U530 0x7101 | 1771 | #define PCI_DEVICE_ID_SEALEVEL_U530 0x7101 |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 50faa0ea28e4..1ac969724bb2 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -54,7 +54,7 @@ | |||
54 | #ifdef CONFIG_SMP | 54 | #ifdef CONFIG_SMP |
55 | 55 | ||
56 | struct percpu_data { | 56 | struct percpu_data { |
57 | void *ptrs[NR_CPUS]; | 57 | void *ptrs[1]; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata) | 60 | #define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata) |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index b9339d8b95bc..cd6332b88829 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -258,6 +258,7 @@ extern struct pnp_protocol isapnp_protocol; | |||
258 | #else | 258 | #else |
259 | #define pnp_device_is_isapnp(dev) 0 | 259 | #define pnp_device_is_isapnp(dev) 0 |
260 | #endif | 260 | #endif |
261 | extern struct mutex pnp_res_mutex; | ||
261 | 262 | ||
262 | #ifdef CONFIG_PNPBIOS | 263 | #ifdef CONFIG_PNPBIOS |
263 | extern struct pnp_protocol pnpbios_protocol; | 264 | extern struct pnp_protocol pnpbios_protocol; |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 515bff053de8..6ab80714a916 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -204,6 +204,41 @@ static inline void user_enable_block_step(struct task_struct *task) | |||
204 | } | 204 | } |
205 | #endif /* arch_has_block_step */ | 205 | #endif /* arch_has_block_step */ |
206 | 206 | ||
207 | #ifndef arch_ptrace_stop_needed | ||
208 | /** | ||
209 | * arch_ptrace_stop_needed - Decide whether arch_ptrace_stop() should be called | ||
210 | * @code: current->exit_code value ptrace will stop with | ||
211 | * @info: siginfo_t pointer (or %NULL) for signal ptrace will stop with | ||
212 | * | ||
213 | * This is called with the siglock held, to decide whether or not it's | ||
214 | * necessary to release the siglock and call arch_ptrace_stop() with the | ||
215 | * same @code and @info arguments. It can be defined to a constant if | ||
216 | * arch_ptrace_stop() is never required, or always is. On machines where | ||
217 | * this makes sense, it should be defined to a quick test to optimize out | ||
218 | * calling arch_ptrace_stop() when it would be superfluous. For example, | ||
219 | * if the thread has not been back to user mode since the last stop, the | ||
220 | * thread state might indicate that nothing needs to be done. | ||
221 | */ | ||
222 | #define arch_ptrace_stop_needed(code, info) (0) | ||
223 | #endif | ||
224 | |||
225 | #ifndef arch_ptrace_stop | ||
226 | /** | ||
227 | * arch_ptrace_stop - Do machine-specific work before stopping for ptrace | ||
228 | * @code: current->exit_code value ptrace will stop with | ||
229 | * @info: siginfo_t pointer (or %NULL) for signal ptrace will stop with | ||
230 | * | ||
231 | * This is called with no locks held when arch_ptrace_stop_needed() has | ||
232 | * just returned nonzero. It is allowed to block, e.g. for user memory | ||
233 | * access. The arch can have machine-specific work to be done before | ||
234 | * ptrace stops. On ia64, register backing store gets written back to user | ||
235 | * memory here. Since this can be costly (requires dropping the siglock), | ||
236 | * we only do it when the arch requires it for this particular stop, as | ||
237 | * indicated by arch_ptrace_stop_needed(). | ||
238 | */ | ||
239 | #define arch_ptrace_stop(code, info) do { } while (0) | ||
240 | #endif | ||
241 | |||
207 | #endif | 242 | #endif |
208 | 243 | ||
209 | #endif | 244 | #endif |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 306a1d1a5af0..e51b531cd0b2 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -244,6 +244,8 @@ struct bitmap { | |||
244 | */ | 244 | */ |
245 | unsigned long daemon_lastrun; /* jiffies of last run */ | 245 | unsigned long daemon_lastrun; /* jiffies of last run */ |
246 | unsigned long daemon_sleep; /* how many seconds between updates? */ | 246 | unsigned long daemon_sleep; /* how many seconds between updates? */ |
247 | unsigned long last_end_sync; /* when we lasted called end_sync to | ||
248 | * update bitmap with resync progress */ | ||
247 | 249 | ||
248 | atomic_t pending_writes; /* pending writes to the bitmap file */ | 250 | atomic_t pending_writes; /* pending writes to the bitmap file */ |
249 | wait_queue_head_t write_wait; | 251 | wait_queue_head_t write_wait; |
@@ -275,6 +277,7 @@ void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, | |||
275 | int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int degraded); | 277 | int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int degraded); |
276 | void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted); | 278 | void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted); |
277 | void bitmap_close_sync(struct bitmap *bitmap); | 279 | void bitmap_close_sync(struct bitmap *bitmap); |
280 | void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector); | ||
278 | 281 | ||
279 | void bitmap_unplug(struct bitmap *bitmap); | 282 | void bitmap_unplug(struct bitmap *bitmap); |
280 | void bitmap_daemon_work(struct bitmap *bitmap); | 283 | void bitmap_daemon_work(struct bitmap *bitmap); |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index dcb729244f47..85a068bab625 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -81,6 +81,8 @@ struct mdk_rdev_s | |||
81 | #define In_sync 2 /* device is in_sync with rest of array */ | 81 | #define In_sync 2 /* device is in_sync with rest of array */ |
82 | #define WriteMostly 4 /* Avoid reading if at all possible */ | 82 | #define WriteMostly 4 /* Avoid reading if at all possible */ |
83 | #define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */ | 83 | #define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */ |
84 | #define AllReserved 6 /* If whole device is reserved for | ||
85 | * one array */ | ||
84 | 86 | ||
85 | int desc_nr; /* descriptor index in the superblock */ | 87 | int desc_nr; /* descriptor index in the superblock */ |
86 | int raid_disk; /* role of device in array */ | 88 | int raid_disk; /* role of device in array */ |
@@ -130,6 +132,9 @@ struct mddev_s | |||
130 | minor_version, | 132 | minor_version, |
131 | patch_version; | 133 | patch_version; |
132 | int persistent; | 134 | int persistent; |
135 | int external; /* metadata is | ||
136 | * managed externally */ | ||
137 | char metadata_type[17]; /* externally set*/ | ||
133 | int chunk_size; | 138 | int chunk_size; |
134 | time_t ctime, utime; | 139 | time_t ctime, utime; |
135 | int level, layout; | 140 | int level, layout; |
@@ -216,6 +221,8 @@ struct mddev_s | |||
216 | atomic_t recovery_active; /* blocks scheduled, but not written */ | 221 | atomic_t recovery_active; /* blocks scheduled, but not written */ |
217 | wait_queue_head_t recovery_wait; | 222 | wait_queue_head_t recovery_wait; |
218 | sector_t recovery_cp; | 223 | sector_t recovery_cp; |
224 | sector_t resync_max; /* resync should pause | ||
225 | * when it gets here */ | ||
219 | 226 | ||
220 | spinlock_t write_lock; | 227 | spinlock_t write_lock; |
221 | wait_queue_head_t sb_wait; /* for waiting on superblock updates */ | 228 | wait_queue_head_t sb_wait; /* for waiting on superblock updates */ |
@@ -306,23 +313,17 @@ static inline char * mdname (mddev_t * mddev) | |||
306 | * iterates through some rdev ringlist. It's safe to remove the | 313 | * iterates through some rdev ringlist. It's safe to remove the |
307 | * current 'rdev'. Dont touch 'tmp' though. | 314 | * current 'rdev'. Dont touch 'tmp' though. |
308 | */ | 315 | */ |
309 | #define ITERATE_RDEV_GENERIC(head,rdev,tmp) \ | 316 | #define rdev_for_each_list(rdev, tmp, list) \ |
310 | \ | 317 | \ |
311 | for ((tmp) = (head).next; \ | 318 | for ((tmp) = (list).next; \ |
312 | (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), \ | 319 | (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), \ |
313 | (tmp) = (tmp)->next, (tmp)->prev != &(head) \ | 320 | (tmp) = (tmp)->next, (tmp)->prev != &(list) \ |
314 | ; ) | 321 | ; ) |
315 | /* | 322 | /* |
316 | * iterates through the 'same array disks' ringlist | 323 | * iterates through the 'same array disks' ringlist |
317 | */ | 324 | */ |
318 | #define ITERATE_RDEV(mddev,rdev,tmp) \ | 325 | #define rdev_for_each(rdev, tmp, mddev) \ |
319 | ITERATE_RDEV_GENERIC((mddev)->disks,rdev,tmp) | 326 | rdev_for_each_list(rdev, tmp, (mddev)->disks) |
320 | |||
321 | /* | ||
322 | * Iterates through 'pending RAID disks' | ||
323 | */ | ||
324 | #define ITERATE_RDEV_PENDING(rdev,tmp) \ | ||
325 | ITERATE_RDEV_GENERIC(pending_raid_disks,rdev,tmp) | ||
326 | 327 | ||
327 | typedef struct mdk_thread_s { | 328 | typedef struct mdk_thread_s { |
328 | void (*run) (mddev_t *mddev); | 329 | void (*run) (mddev_t *mddev); |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index d32c14de270e..37a642c54871 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -174,10 +174,13 @@ struct rcu_head { | |||
174 | * code. | 174 | * code. |
175 | */ | 175 | */ |
176 | 176 | ||
177 | #define rcu_assign_pointer(p, v) ({ \ | 177 | #define rcu_assign_pointer(p, v) \ |
178 | smp_wmb(); \ | 178 | ({ \ |
179 | (p) = (v); \ | 179 | if (!__builtin_constant_p(v) || \ |
180 | }) | 180 | ((v) != NULL)) \ |
181 | smp_wmb(); \ | ||
182 | (p) = (v); \ | ||
183 | }) | ||
181 | 184 | ||
182 | /** | 185 | /** |
183 | * synchronize_sched - block until all CPUs have exited any non-preemptive | 186 | * synchronize_sched - block until all CPUs have exited any non-preemptive |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9c13be3a21e8..7c8ca05c3cae 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -810,7 +810,7 @@ static inline int above_background_load(void) | |||
810 | 810 | ||
811 | struct io_context; /* See blkdev.h */ | 811 | struct io_context; /* See blkdev.h */ |
812 | #define NGROUPS_SMALL 32 | 812 | #define NGROUPS_SMALL 32 |
813 | #define NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t))) | 813 | #define NGROUPS_PER_BLOCK ((unsigned int)(PAGE_SIZE / sizeof(gid_t))) |
814 | struct group_info { | 814 | struct group_info { |
815 | int ngroups; | 815 | int ngroups; |
816 | atomic_t usage; | 816 | atomic_t usage; |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 0ae338866240..7e095147656c 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -371,6 +371,8 @@ int unhandled_signal(struct task_struct *tsk, int sig); | |||
371 | (!siginmask(signr, SIG_KERNEL_IGNORE_MASK|SIG_KERNEL_STOP_MASK) && \ | 371 | (!siginmask(signr, SIG_KERNEL_IGNORE_MASK|SIG_KERNEL_STOP_MASK) && \ |
372 | (t)->sighand->action[(signr)-1].sa.sa_handler == SIG_DFL) | 372 | (t)->sighand->action[(signr)-1].sa.sa_handler == SIG_DFL) |
373 | 373 | ||
374 | void signals_init(void); | ||
375 | |||
374 | #endif /* __KERNEL__ */ | 376 | #endif /* __KERNEL__ */ |
375 | 377 | ||
376 | #endif /* _LINUX_SIGNAL_H */ | 378 | #endif /* _LINUX_SIGNAL_H */ |
diff --git a/include/linux/sm501.h b/include/linux/sm501.h index 9e3aaad6fe4d..932a9efee8a5 100644 --- a/include/linux/sm501.h +++ b/include/linux/sm501.h | |||
@@ -70,6 +70,8 @@ extern unsigned long sm501_gpio_get(struct device *dev, | |||
70 | #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) | 70 | #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) |
71 | #define SM501FB_FLAG_USE_HWCURSOR (1<<2) | 71 | #define SM501FB_FLAG_USE_HWCURSOR (1<<2) |
72 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) | 72 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) |
73 | #define SM501FB_FLAG_PANEL_USE_FPEN (1<<4) | ||
74 | #define SM501FB_FLAG_PANEL_USE_VBIASEN (1<<5) | ||
73 | 75 | ||
74 | struct sm501_platdata_fbsub { | 76 | struct sm501_platdata_fbsub { |
75 | struct fb_videomode *def_mode; | 77 | struct fb_videomode *def_mode; |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 24c6a2b59511..8ea3e71ba7fa 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -244,6 +244,8 @@ extern int do_adjtimex(struct timex *); | |||
244 | /* Don't use! Compatibility define for existing users. */ | 244 | /* Don't use! Compatibility define for existing users. */ |
245 | #define tickadj (500/HZ ? : 1) | 245 | #define tickadj (500/HZ ? : 1) |
246 | 246 | ||
247 | int read_current_timer(unsigned long *timer_val); | ||
248 | |||
247 | #endif /* KERNEL */ | 249 | #endif /* KERNEL */ |
248 | 250 | ||
249 | #endif /* LINUX_TIMEX_H */ | 251 | #endif /* LINUX_TIMEX_H */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 402de892b3ed..5824a9777ad7 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -74,7 +74,6 @@ struct tty_buffer { | |||
74 | 74 | ||
75 | struct tty_bufhead { | 75 | struct tty_bufhead { |
76 | struct delayed_work work; | 76 | struct delayed_work work; |
77 | struct semaphore pty_sem; | ||
78 | spinlock_t lock; | 77 | spinlock_t lock; |
79 | struct tty_buffer *head; /* Queue head */ | 78 | struct tty_buffer *head; /* Queue head */ |
80 | struct tty_buffer *tail; /* Active buffer */ | 79 | struct tty_buffer *tail; /* Active buffer */ |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index feb5e99a1079..9448ffbdcbf6 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -77,6 +77,7 @@ void change_console(struct vc_data *new_vc); | |||
77 | void reset_vc(struct vc_data *vc); | 77 | void reset_vc(struct vc_data *vc); |
78 | extern int unbind_con_driver(const struct consw *csw, int first, int last, | 78 | extern int unbind_con_driver(const struct consw *csw, int first, int last, |
79 | int deflt); | 79 | int deflt); |
80 | int vty_init(void); | ||
80 | 81 | ||
81 | /* | 82 | /* |
82 | * vc_screen.c shares this temporary buffer with the console write code so that | 83 | * vc_screen.c shares this temporary buffer with the console write code so that |
diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h new file mode 100644 index 000000000000..9797fec7748a --- /dev/null +++ b/include/linux/w1-gpio.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * w1-gpio interface to platform code | ||
3 | * | ||
4 | * Copyright (C) 2007 Ville Syrjala <syrjala@sci.fi> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef _LINUX_W1_GPIO_H | ||
11 | #define _LINUX_W1_GPIO_H | ||
12 | |||
13 | /** | ||
14 | * struct w1_gpio_platform_data - Platform-dependent data for w1-gpio | ||
15 | * @pin: GPIO pin to use | ||
16 | * @is_open_drain: GPIO pin is configured as open drain | ||
17 | */ | ||
18 | struct w1_gpio_platform_data { | ||
19 | unsigned int pin; | ||
20 | unsigned int is_open_drain:1; | ||
21 | }; | ||
22 | |||
23 | #endif /* _LINUX_W1_GPIO_H */ | ||
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 4eea63761a3f..336c20db87f8 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #ifndef __ATMEL_LCDC_H__ | 22 | #ifndef __ATMEL_LCDC_H__ |
23 | #define __ATMEL_LCDC_H__ | 23 | #define __ATMEL_LCDC_H__ |
24 | 24 | ||
25 | /* LCD Controller info data structure */ | 25 | /* LCD Controller info data structure, stored in device platform_data */ |
26 | struct atmel_lcdfb_info { | 26 | struct atmel_lcdfb_info { |
27 | spinlock_t lock; | 27 | spinlock_t lock; |
28 | struct fb_info *info; | 28 | struct fb_info *info; |
@@ -33,7 +33,14 @@ struct atmel_lcdfb_info { | |||
33 | struct platform_device *pdev; | 33 | struct platform_device *pdev; |
34 | struct clk *bus_clk; | 34 | struct clk *bus_clk; |
35 | struct clk *lcdc_clk; | 35 | struct clk *lcdc_clk; |
36 | unsigned int default_bpp; | 36 | |
37 | #ifdef CONFIG_BACKLIGHT_ATMEL_LCDC | ||
38 | struct backlight_device *backlight; | ||
39 | u8 bl_power; | ||
40 | #endif | ||
41 | bool lcdcon_is_backlight; | ||
42 | |||
43 | u8 default_bpp; | ||
37 | unsigned int default_lcdcon2; | 44 | unsigned int default_lcdcon2; |
38 | unsigned int default_dmacon; | 45 | unsigned int default_dmacon; |
39 | void (*atmel_lcdfb_power_control)(int on); | 46 | void (*atmel_lcdfb_power_control)(int on); |
@@ -115,20 +122,20 @@ struct atmel_lcdfb_info { | |||
115 | #define ATMEL_LCDC_MEMOR_LITTLE (1 << 31) | 122 | #define ATMEL_LCDC_MEMOR_LITTLE (1 << 31) |
116 | 123 | ||
117 | #define ATMEL_LCDC_TIM1 0x0808 | 124 | #define ATMEL_LCDC_TIM1 0x0808 |
118 | #define ATMEL_LCDC_VFP (0xff << 0) | 125 | #define ATMEL_LCDC_VFP (0xffU << 0) |
119 | #define ATMEL_LCDC_VBP_OFFSET 8 | 126 | #define ATMEL_LCDC_VBP_OFFSET 8 |
120 | #define ATMEL_LCDC_VBP (0xff << ATMEL_LCDC_VBP_OFFSET) | 127 | #define ATMEL_LCDC_VBP (0xffU << ATMEL_LCDC_VBP_OFFSET) |
121 | #define ATMEL_LCDC_VPW_OFFSET 16 | 128 | #define ATMEL_LCDC_VPW_OFFSET 16 |
122 | #define ATMEL_LCDC_VPW (0x3f << ATMEL_LCDC_VPW_OFFSET) | 129 | #define ATMEL_LCDC_VPW (0x3fU << ATMEL_LCDC_VPW_OFFSET) |
123 | #define ATMEL_LCDC_VHDLY_OFFSET 24 | 130 | #define ATMEL_LCDC_VHDLY_OFFSET 24 |
124 | #define ATMEL_LCDC_VHDLY (0xf << ATMEL_LCDC_VHDLY_OFFSET) | 131 | #define ATMEL_LCDC_VHDLY (0xfU << ATMEL_LCDC_VHDLY_OFFSET) |
125 | 132 | ||
126 | #define ATMEL_LCDC_TIM2 0x080c | 133 | #define ATMEL_LCDC_TIM2 0x080c |
127 | #define ATMEL_LCDC_HBP (0xff << 0) | 134 | #define ATMEL_LCDC_HBP (0xffU << 0) |
128 | #define ATMEL_LCDC_HPW_OFFSET 8 | 135 | #define ATMEL_LCDC_HPW_OFFSET 8 |
129 | #define ATMEL_LCDC_HPW (0x3f << ATMEL_LCDC_HPW_OFFSET) | 136 | #define ATMEL_LCDC_HPW (0x3fU << ATMEL_LCDC_HPW_OFFSET) |
130 | #define ATMEL_LCDC_HFP_OFFSET 21 | 137 | #define ATMEL_LCDC_HFP_OFFSET 21 |
131 | #define ATMEL_LCDC_HFP (0x7ff << ATMEL_LCDC_HFP_OFFSET) | 138 | #define ATMEL_LCDC_HFP (0x7ffU << ATMEL_LCDC_HFP_OFFSET) |
132 | 139 | ||
133 | #define ATMEL_LCDC_LCDFRMCFG 0x0810 | 140 | #define ATMEL_LCDC_LCDFRMCFG 0x0810 |
134 | #define ATMEL_LCDC_LINEVAL (0x7ff << 0) | 141 | #define ATMEL_LCDC_LINEVAL (0x7ff << 0) |