aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-06-29 20:16:50 -0400
committerPaul Mackerras <paulus@samba.org>2008-06-29 20:16:50 -0400
commite9a4b6a3f6592862a67837e80aad3f50468857a6 (patch)
tree087420cf91ac922c7e99757c4490a605ec7b10f2 /include
parent441dbb500b4344a8e3125e5aabab4f9dbf72514f (diff)
parent1702b52092e9a6d05398d3f9581ddc050ef00d06 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'include')
-rw-r--r--include/acpi/processor.h1
-rw-r--r--include/asm-alpha/core_mcpcia.h2
-rw-r--r--include/asm-alpha/core_t2.h14
-rw-r--r--include/asm-alpha/io.h6
-rw-r--r--include/asm-alpha/mmu_context.h6
-rw-r--r--include/asm-alpha/percpu.h74
-rw-r--r--include/asm-alpha/system.h10
-rw-r--r--include/asm-alpha/vga.h6
-rw-r--r--include/asm-arm/arch-pxa/regs-lcd.h5
-rw-r--r--include/asm-blackfin/mach-bf527/bfin_serial_5xx.h8
-rw-r--r--include/asm-blackfin/mach-bf533/bfin_serial_5xx.h8
-rw-r--r--include/asm-blackfin/mach-bf537/bfin_serial_5xx.h8
-rw-r--r--include/asm-blackfin/mach-bf548/bfin_serial_5xx.h12
-rw-r--r--include/asm-blackfin/mach-bf561/bfin_serial_5xx.h8
-rw-r--r--include/asm-generic/Kbuild.asm2
-rw-r--r--include/asm-ia64/sn/simulator.h7
-rw-r--r--include/asm-m68k/bitops.h45
-rw-r--r--include/asm-mips/cpu-info.h4
-rw-r--r--include/asm-mips/gic.h4
-rw-r--r--include/asm-mips/lasat/serial.h4
-rw-r--r--include/asm-mips/mach-au1x00/au1000.h1
-rw-r--r--include/asm-mips/pgtable-bits.h2
-rw-r--r--include/asm-parisc/checksum.h2
-rw-r--r--include/asm-powerpc/Kbuild1
-rw-r--r--include/asm-powerpc/kvm_ppc.h1
-rw-r--r--include/asm-powerpc/mediabay.h12
-rw-r--r--include/asm-powerpc/spu.h1
-rw-r--r--include/asm-powerpc/spu_csa.h2
-rw-r--r--include/asm-powerpc/system.h2
-rw-r--r--include/asm-s390/system.h8
-rw-r--r--include/asm-x86/geode.h4
-rw-r--r--include/asm-x86/kvm_host.h4
-rw-r--r--include/asm-x86/kvm_para.h18
-rw-r--r--include/asm-x86/page_32.h3
-rw-r--r--include/asm-x86/pvclock-abi.h42
-rw-r--r--include/asm-x86/pvclock.h13
-rw-r--r--include/asm-x86/xen/page.h4
-rw-r--r--include/linux/Kbuild3
-rw-r--r--include/linux/a.out.h8
-rw-r--r--include/linux/agp_backend.h16
-rw-r--r--include/linux/agpgart.h4
-rw-r--r--include/linux/audit.h2
-rw-r--r--include/linux/bootmem.h2
-rw-r--r--include/linux/cpuidle.h1
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/if_tunnel.h2
-rw-r--r--include/linux/ioport.h6
-rw-r--r--include/linux/ipv6.h4
-rw-r--r--include/linux/jbd2.h3
-rw-r--r--include/linux/kvm_host.h3
-rw-r--r--include/linux/math64.h21
-rw-r--r--include/linux/mm.h17
-rw-r--r--include/linux/msdos_fs.h12
-rw-r--r--include/linux/page-flags.h24
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/proc_fs.h4
-rw-r--r--include/linux/rtnetlink.h1
-rw-r--r--include/linux/sched.h13
-rw-r--r--include/linux/ssb/ssb_driver_gige.h2
-rw-r--r--include/linux/tcp.h7
-rw-r--r--include/linux/thermal.h6
-rw-r--r--include/linux/time.h16
-rw-r--r--include/linux/tty_driver.h5
-rw-r--r--include/linux/virtio_net.h2
-rw-r--r--include/media/cx25840.h6
-rw-r--r--include/media/ir-common.h1
-rw-r--r--include/media/v4l2-dev.h4
-rw-r--r--include/net/inet_sock.h10
-rw-r--r--include/net/ipv6.h6
-rw-r--r--include/net/net_namespace.h11
-rw-r--r--include/net/netfilter/nf_conntrack_extend.h1
-rw-r--r--include/net/request_sock.h4
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/rdma/ib_verbs.h1
-rw-r--r--include/xen/interface/xen.h7
78 files changed, 431 insertions, 168 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 06480bcabfdc..06ebb6ef72aa 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -319,6 +319,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
319#endif /* CONFIG_CPU_FREQ */ 319#endif /* CONFIG_CPU_FREQ */
320 320
321/* in processor_throttling.c */ 321/* in processor_throttling.c */
322int acpi_processor_tstate_has_changed(struct acpi_processor *pr);
322int acpi_processor_get_throttling_info(struct acpi_processor *pr); 323int acpi_processor_get_throttling_info(struct acpi_processor *pr);
323extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); 324extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state);
324extern struct file_operations acpi_processor_throttling_fops; 325extern struct file_operations acpi_processor_throttling_fops;
diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h
index 525b4f6a7ace..acf55b483472 100644
--- a/include/asm-alpha/core_mcpcia.h
+++ b/include/asm-alpha/core_mcpcia.h
@@ -261,7 +261,7 @@ struct el_MCPCIA_uncorrected_frame_mcheck {
261 } 261 }
262#endif 262#endif
263 263
264static inline int __mcpcia_is_mmio(unsigned long addr) 264extern inline int __mcpcia_is_mmio(unsigned long addr)
265{ 265{
266 return (addr & 0x80000000UL) == 0; 266 return (addr & 0x80000000UL) == 0;
267} 267}
diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h
index 90e6b5d6c214..46bfff58f670 100644
--- a/include/asm-alpha/core_t2.h
+++ b/include/asm-alpha/core_t2.h
@@ -356,13 +356,13 @@ struct el_t2_frame_corrected {
356#define vip volatile int * 356#define vip volatile int *
357#define vuip volatile unsigned int * 357#define vuip volatile unsigned int *
358 358
359static inline u8 t2_inb(unsigned long addr) 359extern inline u8 t2_inb(unsigned long addr)
360{ 360{
361 long result = *(vip) ((addr << 5) + T2_IO + 0x00); 361 long result = *(vip) ((addr << 5) + T2_IO + 0x00);
362 return __kernel_extbl(result, addr & 3); 362 return __kernel_extbl(result, addr & 3);
363} 363}
364 364
365static inline void t2_outb(u8 b, unsigned long addr) 365extern inline void t2_outb(u8 b, unsigned long addr)
366{ 366{
367 unsigned long w; 367 unsigned long w;
368 368
@@ -371,13 +371,13 @@ static inline void t2_outb(u8 b, unsigned long addr)
371 mb(); 371 mb();
372} 372}
373 373
374static inline u16 t2_inw(unsigned long addr) 374extern inline u16 t2_inw(unsigned long addr)
375{ 375{
376 long result = *(vip) ((addr << 5) + T2_IO + 0x08); 376 long result = *(vip) ((addr << 5) + T2_IO + 0x08);
377 return __kernel_extwl(result, addr & 3); 377 return __kernel_extwl(result, addr & 3);
378} 378}
379 379
380static inline void t2_outw(u16 b, unsigned long addr) 380extern inline void t2_outw(u16 b, unsigned long addr)
381{ 381{
382 unsigned long w; 382 unsigned long w;
383 383
@@ -386,12 +386,12 @@ static inline void t2_outw(u16 b, unsigned long addr)
386 mb(); 386 mb();
387} 387}
388 388
389static inline u32 t2_inl(unsigned long addr) 389extern inline u32 t2_inl(unsigned long addr)
390{ 390{
391 return *(vuip) ((addr << 5) + T2_IO + 0x18); 391 return *(vuip) ((addr << 5) + T2_IO + 0x18);
392} 392}
393 393
394static inline void t2_outl(u32 b, unsigned long addr) 394extern inline void t2_outl(u32 b, unsigned long addr)
395{ 395{
396 *(vuip) ((addr << 5) + T2_IO + 0x18) = b; 396 *(vuip) ((addr << 5) + T2_IO + 0x18) = b;
397 mb(); 397 mb();
@@ -435,7 +435,7 @@ static inline void t2_outl(u32 b, unsigned long addr)
435 set_hae(msb); \ 435 set_hae(msb); \
436} 436}
437 437
438static DEFINE_SPINLOCK(t2_hae_lock); 438extern spinlock_t t2_hae_lock;
439 439
440/* 440/*
441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since 441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h
index 38f18cf18c9d..e971ab000f95 100644
--- a/include/asm-alpha/io.h
+++ b/include/asm-alpha/io.h
@@ -35,7 +35,7 @@
35 * register not being up-to-date with respect to the hardware 35 * register not being up-to-date with respect to the hardware
36 * value. 36 * value.
37 */ 37 */
38static inline void __set_hae(unsigned long new_hae) 38extern inline void __set_hae(unsigned long new_hae)
39{ 39{
40 unsigned long flags; 40 unsigned long flags;
41 local_irq_save(flags); 41 local_irq_save(flags);
@@ -49,7 +49,7 @@ static inline void __set_hae(unsigned long new_hae)
49 local_irq_restore(flags); 49 local_irq_restore(flags);
50} 50}
51 51
52static inline void set_hae(unsigned long new_hae) 52extern inline void set_hae(unsigned long new_hae)
53{ 53{
54 if (new_hae != alpha_mv.hae_cache) 54 if (new_hae != alpha_mv.hae_cache)
55 __set_hae(new_hae); 55 __set_hae(new_hae);
@@ -176,7 +176,7 @@ REMAP2(u64, writeq, volatile)
176#undef REMAP1 176#undef REMAP1
177#undef REMAP2 177#undef REMAP2
178 178
179static inline void __iomem *generic_ioportmap(unsigned long a) 179extern inline void __iomem *generic_ioportmap(unsigned long a)
180{ 180{
181 return alpha_mv.mv_ioportmap(a); 181 return alpha_mv.mv_ioportmap(a);
182} 182}
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h
index 6a5be1f7debf..86c08a02d239 100644
--- a/include/asm-alpha/mmu_context.h
+++ b/include/asm-alpha/mmu_context.h
@@ -23,7 +23,7 @@
23#endif 23#endif
24 24
25 25
26extern inline unsigned long 26static inline unsigned long
27__reload_thread(struct pcb_struct *pcb) 27__reload_thread(struct pcb_struct *pcb)
28{ 28{
29 register unsigned long a0 __asm__("$16"); 29 register unsigned long a0 __asm__("$16");
@@ -114,7 +114,7 @@ extern unsigned long last_asn;
114#define __MMU_EXTERN_INLINE 114#define __MMU_EXTERN_INLINE
115#endif 115#endif
116 116
117static inline unsigned long 117extern inline unsigned long
118__get_new_mm_context(struct mm_struct *mm, long cpu) 118__get_new_mm_context(struct mm_struct *mm, long cpu)
119{ 119{
120 unsigned long asn = cpu_last_asn(cpu); 120 unsigned long asn = cpu_last_asn(cpu);
@@ -226,7 +226,7 @@ ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
226# endif 226# endif
227#endif 227#endif
228 228
229extern inline int 229static inline int
230init_new_context(struct task_struct *tsk, struct mm_struct *mm) 230init_new_context(struct task_struct *tsk, struct mm_struct *mm)
231{ 231{
232 int i; 232 int i;
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h
index 48348fe34c19..3495e8e00d70 100644
--- a/include/asm-alpha/percpu.h
+++ b/include/asm-alpha/percpu.h
@@ -1,6 +1,78 @@
1#ifndef __ALPHA_PERCPU_H 1#ifndef __ALPHA_PERCPU_H
2#define __ALPHA_PERCPU_H 2#define __ALPHA_PERCPU_H
3#include <linux/compiler.h>
4#include <linux/threads.h>
3 5
4#include <asm-generic/percpu.h> 6/*
7 * Determine the real variable name from the name visible in the
8 * kernel sources.
9 */
10#define per_cpu_var(var) per_cpu__##var
11
12#ifdef CONFIG_SMP
13
14/*
15 * per_cpu_offset() is the offset that has to be added to a
16 * percpu variable to get to the instance for a certain processor.
17 */
18extern unsigned long __per_cpu_offset[NR_CPUS];
19
20#define per_cpu_offset(x) (__per_cpu_offset[x])
21
22#define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
23#ifdef CONFIG_DEBUG_PREEMPT
24#define my_cpu_offset per_cpu_offset(smp_processor_id())
25#else
26#define my_cpu_offset __my_cpu_offset
27#endif
28
29#ifndef MODULE
30#define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset))
31#define PER_CPU_ATTRIBUTES
32#else
33/*
34 * To calculate addresses of locally defined variables, GCC uses 32-bit
35 * displacement from the GP. Which doesn't work for per cpu variables in
36 * modules, as an offset to the kernel per cpu area is way above 4G.
37 *
38 * This forces allocation of a GOT entry for per cpu variable using
39 * ldq instruction with a 'literal' relocation.
40 */
41#define SHIFT_PERCPU_PTR(var, offset) ({ \
42 extern int simple_identifier_##var(void); \
43 unsigned long __ptr, tmp_gp; \
44 asm ( "br %1, 1f \n\
45 1: ldgp %1, 0(%1) \n\
46 ldq %0, per_cpu__" #var"(%1)\t!literal" \
47 : "=&r"(__ptr), "=&r"(tmp_gp)); \
48 (typeof(&per_cpu_var(var)))(__ptr + (offset)); })
49
50#define PER_CPU_ATTRIBUTES __used
51
52#endif /* MODULE */
53
54/*
55 * A percpu variable may point to a discarded regions. The following are
56 * established ways to produce a usable pointer from the percpu variable
57 * offset.
58 */
59#define per_cpu(var, cpu) \
60 (*SHIFT_PERCPU_PTR(var, per_cpu_offset(cpu)))
61#define __get_cpu_var(var) \
62 (*SHIFT_PERCPU_PTR(var, my_cpu_offset))
63#define __raw_get_cpu_var(var) \
64 (*SHIFT_PERCPU_PTR(var, __my_cpu_offset))
65
66#else /* ! SMP */
67
68#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var)))
69#define __get_cpu_var(var) per_cpu_var(var)
70#define __raw_get_cpu_var(var) per_cpu_var(var)
71
72#define PER_CPU_ATTRIBUTES
73
74#endif /* SMP */
75
76#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name)
5 77
6#endif /* __ALPHA_PERCPU_H */ 78#endif /* __ALPHA_PERCPU_H */
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index ed221d6408fc..afe20fa58c99 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -184,7 +184,7 @@ enum amask_enum {
184 __amask; }) 184 __amask; })
185 185
186#define __CALL_PAL_R0(NAME, TYPE) \ 186#define __CALL_PAL_R0(NAME, TYPE) \
187static inline TYPE NAME(void) \ 187extern inline TYPE NAME(void) \
188{ \ 188{ \
189 register TYPE __r0 __asm__("$0"); \ 189 register TYPE __r0 __asm__("$0"); \
190 __asm__ __volatile__( \ 190 __asm__ __volatile__( \
@@ -196,7 +196,7 @@ static inline TYPE NAME(void) \
196} 196}
197 197
198#define __CALL_PAL_W1(NAME, TYPE0) \ 198#define __CALL_PAL_W1(NAME, TYPE0) \
199static inline void NAME(TYPE0 arg0) \ 199extern inline void NAME(TYPE0 arg0) \
200{ \ 200{ \
201 register TYPE0 __r16 __asm__("$16") = arg0; \ 201 register TYPE0 __r16 __asm__("$16") = arg0; \
202 __asm__ __volatile__( \ 202 __asm__ __volatile__( \
@@ -207,7 +207,7 @@ static inline void NAME(TYPE0 arg0) \
207} 207}
208 208
209#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \ 209#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \
210static inline void NAME(TYPE0 arg0, TYPE1 arg1) \ 210extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \
211{ \ 211{ \
212 register TYPE0 __r16 __asm__("$16") = arg0; \ 212 register TYPE0 __r16 __asm__("$16") = arg0; \
213 register TYPE1 __r17 __asm__("$17") = arg1; \ 213 register TYPE1 __r17 __asm__("$17") = arg1; \
@@ -219,7 +219,7 @@ static inline void NAME(TYPE0 arg0, TYPE1 arg1) \
219} 219}
220 220
221#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \ 221#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \
222static inline RTYPE NAME(TYPE0 arg0) \ 222extern inline RTYPE NAME(TYPE0 arg0) \
223{ \ 223{ \
224 register RTYPE __r0 __asm__("$0"); \ 224 register RTYPE __r0 __asm__("$0"); \
225 register TYPE0 __r16 __asm__("$16") = arg0; \ 225 register TYPE0 __r16 __asm__("$16") = arg0; \
@@ -232,7 +232,7 @@ static inline RTYPE NAME(TYPE0 arg0) \
232} 232}
233 233
234#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \ 234#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \
235static inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \ 235extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \
236{ \ 236{ \
237 register RTYPE __r0 __asm__("$0"); \ 237 register RTYPE __r0 __asm__("$0"); \
238 register TYPE0 __r16 __asm__("$16") = arg0; \ 238 register TYPE0 __r16 __asm__("$16") = arg0; \
diff --git a/include/asm-alpha/vga.h b/include/asm-alpha/vga.h
index e8df1e7aae6b..c00106bac521 100644
--- a/include/asm-alpha/vga.h
+++ b/include/asm-alpha/vga.h
@@ -13,7 +13,7 @@
13#define VT_BUF_HAVE_MEMSETW 13#define VT_BUF_HAVE_MEMSETW
14#define VT_BUF_HAVE_MEMCPYW 14#define VT_BUF_HAVE_MEMCPYW
15 15
16extern inline void scr_writew(u16 val, volatile u16 *addr) 16static inline void scr_writew(u16 val, volatile u16 *addr)
17{ 17{
18 if (__is_ioaddr(addr)) 18 if (__is_ioaddr(addr))
19 __raw_writew(val, (volatile u16 __iomem *) addr); 19 __raw_writew(val, (volatile u16 __iomem *) addr);
@@ -21,7 +21,7 @@ extern inline void scr_writew(u16 val, volatile u16 *addr)
21 *addr = val; 21 *addr = val;
22} 22}
23 23
24extern inline u16 scr_readw(volatile const u16 *addr) 24static inline u16 scr_readw(volatile const u16 *addr)
25{ 25{
26 if (__is_ioaddr(addr)) 26 if (__is_ioaddr(addr))
27 return __raw_readw((volatile const u16 __iomem *) addr); 27 return __raw_readw((volatile const u16 __iomem *) addr);
@@ -29,7 +29,7 @@ extern inline u16 scr_readw(volatile const u16 *addr)
29 return *addr; 29 return *addr;
30} 30}
31 31
32extern inline void scr_memsetw(u16 *s, u16 c, unsigned int count) 32static inline void scr_memsetw(u16 *s, u16 c, unsigned int count)
33{ 33{
34 if (__is_ioaddr(s)) 34 if (__is_ioaddr(s))
35 memsetw_io((u16 __iomem *) s, c, count); 35 memsetw_io((u16 __iomem *) s, c, count);
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h
index f762493f5141..3ba464c913a5 100644
--- a/include/asm-arm/arch-pxa/regs-lcd.h
+++ b/include/asm-arm/arch-pxa/regs-lcd.h
@@ -1,5 +1,8 @@
1#ifndef __ASM_ARCH_REGS_LCD_H 1#ifndef __ASM_ARCH_REGS_LCD_H
2#define __ASM_ARCH_REGS_LCD_H 2#define __ASM_ARCH_REGS_LCD_H
3
4#include <asm/arch/bitfield.h>
5
3/* 6/*
4 * LCD Controller Registers and Bits Definitions 7 * LCD Controller Registers and Bits Definitions
5 */ 8 */
@@ -69,7 +72,7 @@
69#define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */ 72#define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */
70#define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */ 73#define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */
71#define LCCR0_PDD_S 12 74#define LCCR0_PDD_S 12
72#define LCCR0_BM (1 << 20) /* Branch mask */ 75#define LCCR0_BM (1 << 20) /* Branch mask */
73#define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ 76#define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */
74#define LCCR0_LCDT (1 << 22) /* LCD panel type */ 77#define LCCR0_LCDT (1 << 22) /* LCD panel type */
75#define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ 78#define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
index 26e3c8076b4e..2526b6ed6faa 100644
--- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
@@ -53,6 +53,12 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
56#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 62#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
57# define CONFIG_SERIAL_BFIN_CTSRTS 63# define CONFIG_SERIAL_BFIN_CTSRTS
58 64
@@ -90,7 +96,7 @@ struct bfin_serial_port {
90 struct work_struct tx_dma_workqueue; 96 struct work_struct tx_dma_workqueue;
91#endif 97#endif
92#ifdef CONFIG_SERIAL_BFIN_CTSRTS 98#ifdef CONFIG_SERIAL_BFIN_CTSRTS
93 struct work_struct cts_workqueue; 99 struct timer_list cts_timer;
94 int cts_pin; 100 int cts_pin;
95 int rts_pin; 101 int rts_pin;
96#endif 102#endif
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
index d016603b6615..ebf592b59aab 100644
--- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
@@ -53,6 +53,12 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
56#ifdef CONFIG_BFIN_UART0_CTSRTS 62#ifdef CONFIG_BFIN_UART0_CTSRTS
57# define CONFIG_SERIAL_BFIN_CTSRTS 63# define CONFIG_SERIAL_BFIN_CTSRTS
58# ifndef CONFIG_UART0_CTS_PIN 64# ifndef CONFIG_UART0_CTS_PIN
@@ -82,7 +88,7 @@ struct bfin_serial_port {
82# endif 88# endif
83#endif 89#endif
84#ifdef CONFIG_SERIAL_BFIN_CTSRTS 90#ifdef CONFIG_SERIAL_BFIN_CTSRTS
85 struct work_struct cts_workqueue; 91 struct timer_list cts_timer;
86 int cts_pin; 92 int cts_pin;
87 int rts_pin; 93 int rts_pin;
88#endif 94#endif
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
index f79d1a0e9129..1bf56ffa22f9 100644
--- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
@@ -53,6 +53,12 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
56#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 62#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
57# define CONFIG_SERIAL_BFIN_CTSRTS 63# define CONFIG_SERIAL_BFIN_CTSRTS
58 64
@@ -90,7 +96,7 @@ struct bfin_serial_port {
90 struct work_struct tx_dma_workqueue; 96 struct work_struct tx_dma_workqueue;
91#endif 97#endif
92#ifdef CONFIG_SERIAL_BFIN_CTSRTS 98#ifdef CONFIG_SERIAL_BFIN_CTSRTS
93 struct work_struct cts_workqueue; 99 struct timer_list cts_timer;
94 int cts_pin; 100 int cts_pin;
95 int rts_pin; 101 int rts_pin;
96#endif 102#endif
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
index 5eb46a77d919..5e29446a8e03 100644
--- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
@@ -57,6 +57,12 @@
57#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ 57#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */
58#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ 58#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */
59 59
60#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
61#define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS))
62#define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS))
63#define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
64#define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
65
60#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 66#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
61# define CONFIG_SERIAL_BFIN_CTSRTS 67# define CONFIG_SERIAL_BFIN_CTSRTS
62 68
@@ -93,7 +99,7 @@ struct bfin_serial_port {
93 struct work_struct tx_dma_workqueue; 99 struct work_struct tx_dma_workqueue;
94#endif 100#endif
95#ifdef CONFIG_SERIAL_BFIN_CTSRTS 101#ifdef CONFIG_SERIAL_BFIN_CTSRTS
96 struct work_struct cts_workqueue; 102 struct timer_list cts_timer;
97 int cts_pin; 103 int cts_pin;
98 int rts_pin; 104 int rts_pin;
99#endif 105#endif
@@ -181,7 +187,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart)
181 187
182#ifdef CONFIG_BFIN_UART1_CTSRTS 188#ifdef CONFIG_BFIN_UART1_CTSRTS
183 peripheral_request(P_UART1_RTS, DRIVER_NAME); 189 peripheral_request(P_UART1_RTS, DRIVER_NAME);
184 peripheral_request(P_UART1_CTS DRIVER_NAME); 190 peripheral_request(P_UART1_CTS, DRIVER_NAME);
185#endif 191#endif
186#endif 192#endif
187 193
@@ -196,7 +202,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart)
196 202
197#ifdef CONFIG_BFIN_UART3_CTSRTS 203#ifdef CONFIG_BFIN_UART3_CTSRTS
198 peripheral_request(P_UART3_RTS, DRIVER_NAME); 204 peripheral_request(P_UART3_RTS, DRIVER_NAME);
199 peripheral_request(P_UART3_CTS DRIVER_NAME); 205 peripheral_request(P_UART3_CTS, DRIVER_NAME);
200#endif 206#endif
201#endif 207#endif
202 SSYNC(); 208 SSYNC();
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
index 7a9628769296..8aa02780e642 100644
--- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
@@ -53,6 +53,12 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
56#ifdef CONFIG_BFIN_UART0_CTSRTS 62#ifdef CONFIG_BFIN_UART0_CTSRTS
57# define CONFIG_SERIAL_BFIN_CTSRTS 63# define CONFIG_SERIAL_BFIN_CTSRTS
58# ifndef CONFIG_UART0_CTS_PIN 64# ifndef CONFIG_UART0_CTS_PIN
@@ -82,7 +88,7 @@ struct bfin_serial_port {
82# endif 88# endif
83#endif 89#endif
84#ifdef CONFIG_SERIAL_BFIN_CTSRTS 90#ifdef CONFIG_SERIAL_BFIN_CTSRTS
85 struct work_struct cts_workqueue; 91 struct timer_list cts_timer;
86 int cts_pin; 92 int cts_pin;
87 int rts_pin; 93 int rts_pin;
88#endif 94#endif
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
index 92a6d91d0c1a..7cd25b8e7c9a 100644
--- a/include/asm-generic/Kbuild.asm
+++ b/include/asm-generic/Kbuild.asm
@@ -1,6 +1,6 @@
1header-y += kvm.h 1header-y += kvm.h
2 2
3ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h) 3ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
4unifdef-y += a.out.h 4unifdef-y += a.out.h
5endif 5endif
6unifdef-y += auxvec.h 6unifdef-y += auxvec.h
diff --git a/include/asm-ia64/sn/simulator.h b/include/asm-ia64/sn/simulator.h
index c3fd3eb25768..c2611f6cfe33 100644
--- a/include/asm-ia64/sn/simulator.h
+++ b/include/asm-ia64/sn/simulator.h
@@ -8,7 +8,7 @@
8#ifndef _ASM_IA64_SN_SIMULATOR_H 8#ifndef _ASM_IA64_SN_SIMULATOR_H
9#define _ASM_IA64_SN_SIMULATOR_H 9#define _ASM_IA64_SN_SIMULATOR_H
10 10
11 11#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_SGI_UV)
12#define SNMAGIC 0xaeeeeeee8badbeefL 12#define SNMAGIC 0xaeeeeeee8badbeefL
13#define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) 13#define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;})
14 14
@@ -16,5 +16,10 @@
16#define IS_RUNNING_ON_SIMULATOR() (sn_prom_type) 16#define IS_RUNNING_ON_SIMULATOR() (sn_prom_type)
17#define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2) 17#define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2)
18extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ 18extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */
19#else
20#define IS_MEDUSA() 0
21#define SIMULATOR_SLEEP()
22#define IS_RUNNING_ON_SIMULATOR() 0
23#endif
19 24
20#endif /* _ASM_IA64_SN_SIMULATOR_H */ 25#endif /* _ASM_IA64_SN_SIMULATOR_H */
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h
index 83d1f286230b..3e8106442d5a 100644
--- a/include/asm-m68k/bitops.h
+++ b/include/asm-m68k/bitops.h
@@ -410,8 +410,49 @@ static inline int ext2_find_next_zero_bit(const void *vaddr, unsigned size,
410 res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); 410 res = ext2_find_first_zero_bit (p, size - 32 * (p - addr));
411 return (p - addr) * 32 + res; 411 return (p - addr) * 32 + res;
412} 412}
413#define ext2_find_next_bit(addr, size, off) \ 413
414 generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) 414static inline int ext2_find_first_bit(const void *vaddr, unsigned size)
415{
416 const unsigned long *p = vaddr, *addr = vaddr;
417 int res;
418
419 if (!size)
420 return 0;
421
422 size = (size >> 5) + ((size & 31) > 0);
423 while (*p++ == 0UL) {
424 if (--size == 0)
425 return (p - addr) << 5;
426 }
427
428 --p;
429 for (res = 0; res < 32; res++)
430 if (ext2_test_bit(res, p))
431 break;
432 return (p - addr) * 32 + res;
433}
434
435static inline int ext2_find_next_bit(const void *vaddr, unsigned size,
436 unsigned offset)
437{
438 const unsigned long *addr = vaddr;
439 const unsigned long *p = addr + (offset >> 5);
440 int bit = offset & 31UL, res;
441
442 if (offset >= size)
443 return size;
444
445 if (bit) {
446 /* Look for one in first longword */
447 for (res = bit; res < 32; res++)
448 if (ext2_test_bit(res, p))
449 return (p - addr) * 32 + res;
450 p++;
451 }
452 /* No set bit yet, search remaining full bytes for a set bit */
453 res = ext2_find_first_bit(p, size - 32 * (p - addr));
454 return (p - addr) * 32 + res;
455}
415 456
416#endif /* __KERNEL__ */ 457#endif /* __KERNEL__ */
417 458
diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h
index 0c5a358863f3..2de73dbb2e9e 100644
--- a/include/asm-mips/cpu-info.h
+++ b/include/asm-mips/cpu-info.h
@@ -56,7 +56,7 @@ struct cpuinfo_mips {
56 struct cache_desc tcache; /* Tertiary/split secondary cache */ 56 struct cache_desc tcache; /* Tertiary/split secondary cache */
57 int srsets; /* Shadow register sets */ 57 int srsets; /* Shadow register sets */
58 int core; /* physical core number */ 58 int core; /* physical core number */
59#if defined(CONFIG_MIPS_MT_SMTC) 59#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
60 /* 60 /*
61 * In the MIPS MT "SMTC" model, each TC is considered 61 * In the MIPS MT "SMTC" model, each TC is considered
62 * to be a "CPU" for the purposes of scheduling, but 62 * to be a "CPU" for the purposes of scheduling, but
@@ -64,7 +64,7 @@ struct cpuinfo_mips {
64 * to all TCs within the same VPE. 64 * to all TCs within the same VPE.
65 */ 65 */
66 int vpe_id; /* Virtual Processor number */ 66 int vpe_id; /* Virtual Processor number */
67#endif /* CONFIG_MIPS_MT */ 67#endif
68#ifdef CONFIG_MIPS_MT_SMTC 68#ifdef CONFIG_MIPS_MT_SMTC
69 int tc_id; /* Thread Context number */ 69 int tc_id; /* Thread Context number */
70#endif 70#endif
diff --git a/include/asm-mips/gic.h b/include/asm-mips/gic.h
index 3a492f225f00..954807d9d66a 100644
--- a/include/asm-mips/gic.h
+++ b/include/asm-mips/gic.h
@@ -24,8 +24,8 @@
24 24
25#define MSK(n) ((1 << (n)) - 1) 25#define MSK(n) ((1 << (n)) - 1)
26#define REG32(addr) (*(volatile unsigned int *) (addr)) 26#define REG32(addr) (*(volatile unsigned int *) (addr))
27#define REG(base, offs) REG32((unsigned int)(base) + offs##_##OFS) 27#define REG(base, offs) REG32((unsigned long)(base) + offs##_##OFS)
28#define REGP(base, phys) REG32((unsigned int)(base) + (phys)) 28#define REGP(base, phys) REG32((unsigned long)(base) + (phys))
29 29
30/* Accessors */ 30/* Accessors */
31#define GIC_REG(segment, offset) \ 31#define GIC_REG(segment, offset) \
diff --git a/include/asm-mips/lasat/serial.h b/include/asm-mips/lasat/serial.h
index bafe68b10614..1c37d70579b8 100644
--- a/include/asm-mips/lasat/serial.h
+++ b/include/asm-mips/lasat/serial.h
@@ -4,10 +4,10 @@
4#define LASAT_BASE_BAUD_100 (7372800 / 16) 4#define LASAT_BASE_BAUD_100 (7372800 / 16)
5#define LASAT_UART_REGS_BASE_100 0x1c8b0000 5#define LASAT_UART_REGS_BASE_100 0x1c8b0000
6#define LASAT_UART_REGS_SHIFT_100 2 6#define LASAT_UART_REGS_SHIFT_100 2
7#define LASATINT_UART_100 8 7#define LASATINT_UART_100 16
8 8
9/* * LASAT 200 boards serial configuration */ 9/* * LASAT 200 boards serial configuration */
10#define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) 10#define LASAT_BASE_BAUD_200 (100000000 / 16 / 12)
11#define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) 11#define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300)
12#define LASAT_UART_REGS_SHIFT_200 3 12#define LASAT_UART_REGS_SHIFT_200 3
13#define LASATINT_UART_200 13 13#define LASATINT_UART_200 21
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h
index 1b5064dac007..0d302bad4492 100644
--- a/include/asm-mips/mach-au1x00/au1000.h
+++ b/include/asm-mips/mach-au1x00/au1000.h
@@ -615,6 +615,7 @@ enum soc_au1500_ints {
615 AU1000_RTC_MATCH1_INT, 615 AU1000_RTC_MATCH1_INT,
616 AU1000_RTC_MATCH2_INT, 616 AU1000_RTC_MATCH2_INT,
617 AU1500_PCI_ERR_INT, 617 AU1500_PCI_ERR_INT,
618 AU1500_RESERVED_INT,
618 AU1000_USB_DEV_REQ_INT, 619 AU1000_USB_DEV_REQ_INT,
619 AU1000_USB_DEV_SUS_INT, 620 AU1000_USB_DEV_SUS_INT,
620 AU1000_USB_HOST_INT, 621 AU1000_USB_HOST_INT,
diff --git a/include/asm-mips/pgtable-bits.h b/include/asm-mips/pgtable-bits.h
index 60e2f9338fcd..51b34a48c84a 100644
--- a/include/asm-mips/pgtable-bits.h
+++ b/include/asm-mips/pgtable-bits.h
@@ -134,6 +134,4 @@
134 134
135#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK) 135#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK)
136 136
137#define CONF_CM_DEFAULT (PAGE_CACHABLE_DEFAULT>>_CACHE_SHIFT)
138
139#endif /* _ASM_PGTABLE_BITS_H */ 137#endif /* _ASM_PGTABLE_BITS_H */
diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h
index cc3ec1bd8919..e9639ccc3fce 100644
--- a/include/asm-parisc/checksum.h
+++ b/include/asm-parisc/checksum.h
@@ -65,7 +65,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
65"2:\n" 65"2:\n"
66 : "=r" (sum), "=r" (iph), "=r" (ihl) 66 : "=r" (sum), "=r" (iph), "=r" (ihl)
67 : "1" (iph), "2" (ihl) 67 : "1" (iph), "2" (ihl)
68 : "r19", "r20", "r21" ); 68 : "r19", "r20", "r21", "memory");
69 69
70 return (__force __sum16)sum; 70 return (__force __sum16)sum;
71} 71}
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild
index 7381916dfcbb..bca352e033c3 100644
--- a/include/asm-powerpc/Kbuild
+++ b/include/asm-powerpc/Kbuild
@@ -1,6 +1,5 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += a.out.h
4header-y += auxvec.h 3header-y += auxvec.h
5header-y += ioctls.h 4header-y += ioctls.h
6header-y += mman.h 5header-y += mman.h
diff --git a/include/asm-powerpc/kvm_ppc.h b/include/asm-powerpc/kvm_ppc.h
index b35a7e3ef978..5a21115228af 100644
--- a/include/asm-powerpc/kvm_ppc.h
+++ b/include/asm-powerpc/kvm_ppc.h
@@ -57,6 +57,7 @@ extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu,
57 57
58extern int kvmppc_emulate_instruction(struct kvm_run *run, 58extern int kvmppc_emulate_instruction(struct kvm_run *run,
59 struct kvm_vcpu *vcpu); 59 struct kvm_vcpu *vcpu);
60extern int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu);
60 61
61extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, 62extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn,
62 u64 asid, u32 flags); 63 u64 asid, u32 flags);
diff --git a/include/asm-powerpc/mediabay.h b/include/asm-powerpc/mediabay.h
index df111c362a7f..b2efb3325808 100644
--- a/include/asm-powerpc/mediabay.h
+++ b/include/asm-powerpc/mediabay.h
@@ -17,8 +17,6 @@
17#define MB_POWER 6 /* media bay contains a Power device (???) */ 17#define MB_POWER 6 /* media bay contains a Power device (???) */
18#define MB_NO 7 /* media bay contains nothing */ 18#define MB_NO 7 /* media bay contains nothing */
19 19
20int check_media_bay(struct device_node *which_bay, int what);
21
22/* Number of bays in the machine or 0 */ 20/* Number of bays in the machine or 0 */
23extern int media_bay_count; 21extern int media_bay_count;
24 22
@@ -29,6 +27,16 @@ int check_media_bay_by_base(unsigned long base, int what);
29/* called by IDE PMAC host driver to register IDE controller for media bay */ 27/* called by IDE PMAC host driver to register IDE controller for media bay */
30int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, 28int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base,
31 int irq, ide_hwif_t *hwif); 29 int irq, ide_hwif_t *hwif);
30
31int check_media_bay(struct device_node *which_bay, int what);
32
33#else
34
35static inline int check_media_bay(struct device_node *which_bay, int what)
36{
37 return -ENODEV;
38}
39
32#endif 40#endif
33 41
34#endif /* __KERNEL__ */ 42#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 6abead6e681a..99348c1f4cab 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -131,7 +131,6 @@ struct spu {
131 u64 flags; 131 u64 flags;
132 u64 class_0_pending; 132 u64 class_0_pending;
133 u64 class_0_dar; 133 u64 class_0_dar;
134 u64 class_0_dsisr;
135 u64 class_1_dar; 134 u64 class_1_dar;
136 u64 class_1_dsisr; 135 u64 class_1_dsisr;
137 size_t ls_size; 136 size_t ls_size;
diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h
index 129ec148d451..a40fd491250c 100644
--- a/include/asm-powerpc/spu_csa.h
+++ b/include/asm-powerpc/spu_csa.h
@@ -254,7 +254,7 @@ struct spu_state {
254 u64 spu_chnldata_RW[32]; 254 u64 spu_chnldata_RW[32];
255 u32 spu_mailbox_data[4]; 255 u32 spu_mailbox_data[4];
256 u32 pu_mailbox_data[1]; 256 u32 pu_mailbox_data[1];
257 u64 class_0_dar, class_0_dsisr, class_0_pending; 257 u64 class_0_dar, class_0_pending;
258 u64 class_1_dar, class_1_dsisr; 258 u64 class_1_dar, class_1_dsisr;
259 unsigned long suspend_time; 259 unsigned long suspend_time;
260 spinlock_t register_lock; 260 spinlock_t register_lock;
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index df781adac6dd..d1ced5029c42 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -34,7 +34,7 @@
34 * SMP since it is only used to order updates to system memory. 34 * SMP since it is only used to order updates to system memory.
35 */ 35 */
36#define mb() __asm__ __volatile__ ("sync" : : : "memory") 36#define mb() __asm__ __volatile__ ("sync" : : : "memory")
37#define rmb() __asm__ __volatile__ (__stringify(LWSYNC) : : : "memory") 37#define rmb() __asm__ __volatile__ ("sync" : : : "memory")
38#define wmb() __asm__ __volatile__ ("sync" : : : "memory") 38#define wmb() __asm__ __volatile__ ("sync" : : : "memory")
39#define read_barrier_depends() do { } while(0) 39#define read_barrier_depends() do { } while(0)
40 40
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h
index e0d4500d5f95..819e7d99ca0c 100644
--- a/include/asm-s390/system.h
+++ b/include/asm-s390/system.h
@@ -315,14 +315,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
315 asm volatile( \ 315 asm volatile( \
316 " lctlg %1,%2,0(%0)\n" \ 316 " lctlg %1,%2,0(%0)\n" \
317 : : "a" (&array), "i" (low), "i" (high), \ 317 : : "a" (&array), "i" (low), "i" (high), \
318 "m" (*(addrtype *)(array))); \ 318 "m" (*(addrtype *)(&array))); \
319 }) 319 })
320 320
321#define __ctl_store(array, low, high) ({ \ 321#define __ctl_store(array, low, high) ({ \
322 typedef struct { char _[sizeof(array)]; } addrtype; \ 322 typedef struct { char _[sizeof(array)]; } addrtype; \
323 asm volatile( \ 323 asm volatile( \
324 " stctg %2,%3,0(%1)\n" \ 324 " stctg %2,%3,0(%1)\n" \
325 : "=m" (*(addrtype *)(array)) \ 325 : "=m" (*(addrtype *)(&array)) \
326 : "a" (&array), "i" (low), "i" (high)); \ 326 : "a" (&array), "i" (low), "i" (high)); \
327 }) 327 })
328 328
@@ -333,14 +333,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
333 asm volatile( \ 333 asm volatile( \
334 " lctl %1,%2,0(%0)\n" \ 334 " lctl %1,%2,0(%0)\n" \
335 : : "a" (&array), "i" (low), "i" (high), \ 335 : : "a" (&array), "i" (low), "i" (high), \
336 "m" (*(addrtype *)(array))); \ 336 "m" (*(addrtype *)(&array))); \
337}) 337})
338 338
339#define __ctl_store(array, low, high) ({ \ 339#define __ctl_store(array, low, high) ({ \
340 typedef struct { char _[sizeof(array)]; } addrtype; \ 340 typedef struct { char _[sizeof(array)]; } addrtype; \
341 asm volatile( \ 341 asm volatile( \
342 " stctl %2,%3,0(%1)\n" \ 342 " stctl %2,%3,0(%1)\n" \
343 : "=m" (*(addrtype *)(array)) \ 343 : "=m" (*(addrtype *)(&array)) \
344 : "a" (&array), "i" (low), "i" (high)); \ 344 : "a" (&array), "i" (low), "i" (high)); \
345 }) 345 })
346 346
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h
index 6e6458853a36..bb06027fc83e 100644
--- a/include/asm-x86/geode.h
+++ b/include/asm-x86/geode.h
@@ -112,8 +112,8 @@ extern int geode_get_dev_base(unsigned int dev);
112#define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */ 112#define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */
113#define VSA_VR_SIGNATURE 0x0003 113#define VSA_VR_SIGNATURE 0x0003
114#define VSA_VR_MEM_SIZE 0x0200 114#define VSA_VR_MEM_SIZE 0x0200
115#define VSA_SIG 0x4132 /* signature is ascii 'VSA2' */ 115#define AMD_VSA_SIG 0x4132 /* signature is ascii 'VSA2' */
116 116#define GSW_VSA_SIG 0x534d /* General Software signature */
117/* GPIO */ 117/* GPIO */
118 118
119#define GPIO_OUTPUT_VAL 0x00 119#define GPIO_OUTPUT_VAL 0x00
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index 1d8cd01fa514..844f2a89afbc 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -18,6 +18,7 @@
18#include <linux/kvm_para.h> 18#include <linux/kvm_para.h>
19#include <linux/kvm_types.h> 19#include <linux/kvm_types.h>
20 20
21#include <asm/pvclock-abi.h>
21#include <asm/desc.h> 22#include <asm/desc.h>
22 23
23#define KVM_MAX_VCPUS 16 24#define KVM_MAX_VCPUS 16
@@ -282,7 +283,8 @@ struct kvm_vcpu_arch {
282 struct x86_emulate_ctxt emulate_ctxt; 283 struct x86_emulate_ctxt emulate_ctxt;
283 284
284 gpa_t time; 285 gpa_t time;
285 struct kvm_vcpu_time_info hv_clock; 286 struct pvclock_vcpu_time_info hv_clock;
287 unsigned int hv_clock_tsc_khz;
286 unsigned int time_offset; 288 unsigned int time_offset;
287 struct page *time_page; 289 struct page *time_page;
288}; 290};
diff --git a/include/asm-x86/kvm_para.h b/include/asm-x86/kvm_para.h
index 509845942070..bfd9900742bf 100644
--- a/include/asm-x86/kvm_para.h
+++ b/include/asm-x86/kvm_para.h
@@ -48,24 +48,6 @@ struct kvm_mmu_op_release_pt {
48#ifdef __KERNEL__ 48#ifdef __KERNEL__
49#include <asm/processor.h> 49#include <asm/processor.h>
50 50
51/* xen binary-compatible interface. See xen headers for details */
52struct kvm_vcpu_time_info {
53 uint32_t version;
54 uint32_t pad0;
55 uint64_t tsc_timestamp;
56 uint64_t system_time;
57 uint32_t tsc_to_system_mul;
58 int8_t tsc_shift;
59 int8_t pad[3];
60} __attribute__((__packed__)); /* 32 bytes */
61
62struct kvm_wall_clock {
63 uint32_t wc_version;
64 uint32_t wc_sec;
65 uint32_t wc_nsec;
66} __attribute__((__packed__));
67
68
69extern void kvmclock_init(void); 51extern void kvmclock_init(void);
70 52
71 53
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h
index 424e82f8ae27..ccf0ba3c3aba 100644
--- a/include/asm-x86/page_32.h
+++ b/include/asm-x86/page_32.h
@@ -14,7 +14,8 @@
14#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) 14#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
15 15
16#ifdef CONFIG_X86_PAE 16#ifdef CONFIG_X86_PAE
17#define __PHYSICAL_MASK_SHIFT 36 17/* 44=32+12, the limit we can fit into an unsigned long pfn */
18#define __PHYSICAL_MASK_SHIFT 44
18#define __VIRTUAL_MASK_SHIFT 32 19#define __VIRTUAL_MASK_SHIFT 32
19#define PAGETABLE_LEVELS 3 20#define PAGETABLE_LEVELS 3
20 21
diff --git a/include/asm-x86/pvclock-abi.h b/include/asm-x86/pvclock-abi.h
new file mode 100644
index 000000000000..6857f840b243
--- /dev/null
+++ b/include/asm-x86/pvclock-abi.h
@@ -0,0 +1,42 @@
1#ifndef _ASM_X86_PVCLOCK_ABI_H_
2#define _ASM_X86_PVCLOCK_ABI_H_
3#ifndef __ASSEMBLY__
4
5/*
6 * These structs MUST NOT be changed.
7 * They are the ABI between hypervisor and guest OS.
8 * Both Xen and KVM are using this.
9 *
10 * pvclock_vcpu_time_info holds the system time and the tsc timestamp
11 * of the last update. So the guest can use the tsc delta to get a
12 * more precise system time. There is one per virtual cpu.
13 *
14 * pvclock_wall_clock references the point in time when the system
15 * time was zero (usually boot time), thus the guest calculates the
16 * current wall clock by adding the system time.
17 *
18 * Protocol for the "version" fields is: hypervisor raises it (making
19 * it uneven) before it starts updating the fields and raises it again
20 * (making it even) when it is done. Thus the guest can make sure the
21 * time values it got are consistent by checking the version before
22 * and after reading them.
23 */
24
25struct pvclock_vcpu_time_info {
26 u32 version;
27 u32 pad0;
28 u64 tsc_timestamp;
29 u64 system_time;
30 u32 tsc_to_system_mul;
31 s8 tsc_shift;
32 u8 pad[3];
33} __attribute__((__packed__)); /* 32 bytes */
34
35struct pvclock_wall_clock {
36 u32 version;
37 u32 sec;
38 u32 nsec;
39} __attribute__((__packed__));
40
41#endif /* __ASSEMBLY__ */
42#endif /* _ASM_X86_PVCLOCK_ABI_H_ */
diff --git a/include/asm-x86/pvclock.h b/include/asm-x86/pvclock.h
new file mode 100644
index 000000000000..85b1bba8e0a3
--- /dev/null
+++ b/include/asm-x86/pvclock.h
@@ -0,0 +1,13 @@
1#ifndef _ASM_X86_PVCLOCK_H_
2#define _ASM_X86_PVCLOCK_H_
3
4#include <linux/clocksource.h>
5#include <asm/pvclock-abi.h>
6
7/* some helper functions for xen and kvm pv clock sources */
8cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src);
9void pvclock_read_wallclock(struct pvclock_wall_clock *wall,
10 struct pvclock_vcpu_time_info *vcpu,
11 struct timespec *ts);
12
13#endif /* _ASM_X86_PVCLOCK_H_ */
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h
index baf3a4dce28c..e11f24038b1d 100644
--- a/include/asm-x86/xen/page.h
+++ b/include/asm-x86/xen/page.h
@@ -150,13 +150,9 @@ static inline pte_t __pte_ma(pteval_t x)
150 return (pte_t) { .pte = x }; 150 return (pte_t) { .pte = x };
151} 151}
152 152
153#ifdef CONFIG_X86_PAE
154#define pmd_val_ma(v) ((v).pmd) 153#define pmd_val_ma(v) ((v).pmd)
155#define pud_val_ma(v) ((v).pgd.pgd) 154#define pud_val_ma(v) ((v).pgd.pgd)
156#define __pmd_ma(x) ((pmd_t) { (x) } ) 155#define __pmd_ma(x) ((pmd_t) { (x) } )
157#else /* !X86_PAE */
158#define pmd_val_ma(v) ((v).pud.pgd.pgd)
159#endif /* CONFIG_X86_PAE */
160 156
161#define pgd_val_ma(x) ((x).pgd) 157#define pgd_val_ma(x) ((x).pgd)
162 158
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 93b98856007a..71d70d1fbce2 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -166,6 +166,9 @@ unifdef-y += acct.h
166unifdef-y += adb.h 166unifdef-y += adb.h
167unifdef-y += adfs_fs.h 167unifdef-y += adfs_fs.h
168unifdef-y += agpgart.h 168unifdef-y += agpgart.h
169ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
170unifdef-y += a.out.h
171endif
169unifdef-y += apm_bios.h 172unifdef-y += apm_bios.h
170unifdef-y += atalk.h 173unifdef-y += atalk.h
171unifdef-y += atmdev.h 174unifdef-y += atmdev.h
diff --git a/include/linux/a.out.h b/include/linux/a.out.h
index 208f4e8ed304..e86dfca44589 100644
--- a/include/linux/a.out.h
+++ b/include/linux/a.out.h
@@ -1,8 +1,6 @@
1#ifndef __A_OUT_GNU_H__ 1#ifndef __A_OUT_GNU_H__
2#define __A_OUT_GNU_H__ 2#define __A_OUT_GNU_H__
3 3
4#ifdef CONFIG_ARCH_SUPPORTS_AOUT
5
6#define __GNU_EXEC_MACROS__ 4#define __GNU_EXEC_MACROS__
7 5
8#ifndef __STRUCT_EXEC_OVERRIDE__ 6#ifndef __STRUCT_EXEC_OVERRIDE__
@@ -277,10 +275,4 @@ struct relocation_info
277#endif /* no N_RELOCATION_INFO_DECLARED. */ 275#endif /* no N_RELOCATION_INFO_DECLARED. */
278 276
279#endif /*__ASSEMBLY__ */ 277#endif /*__ASSEMBLY__ */
280#else /* CONFIG_ARCH_SUPPORTS_AOUT */
281#ifndef __ASSEMBLY__
282struct exec {
283};
284#endif
285#endif /* CONFIG_ARCH_SUPPORTS_AOUT */
286#endif /* __A_OUT_GNU_H__ */ 278#endif /* __A_OUT_GNU_H__ */
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h
index 661d90d6cf7c..972b12bcfb36 100644
--- a/include/linux/agp_backend.h
+++ b/include/linux/agp_backend.h
@@ -30,14 +30,6 @@
30#ifndef _AGP_BACKEND_H 30#ifndef _AGP_BACKEND_H
31#define _AGP_BACKEND_H 1 31#define _AGP_BACKEND_H 1
32 32
33#ifndef TRUE
34#define TRUE 1
35#endif
36
37#ifndef FALSE
38#define FALSE 0
39#endif
40
41enum chipset_type { 33enum chipset_type {
42 NOT_SUPPORTED, 34 NOT_SUPPORTED,
43 SUPPORTED, 35 SUPPORTED,
@@ -57,7 +49,7 @@ struct agp_kern_info {
57 size_t aper_size; 49 size_t aper_size;
58 int max_memory; /* In pages */ 50 int max_memory; /* In pages */
59 int current_memory; 51 int current_memory;
60 int cant_use_aperture; 52 bool cant_use_aperture;
61 unsigned long page_mask; 53 unsigned long page_mask;
62 struct vm_operations_struct *vm_ops; 54 struct vm_operations_struct *vm_ops;
63}; 55};
@@ -83,9 +75,9 @@ struct agp_memory {
83 off_t pg_start; 75 off_t pg_start;
84 u32 type; 76 u32 type;
85 u32 physical; 77 u32 physical;
86 u8 is_bound; 78 bool is_bound;
87 u8 is_flushed; 79 bool is_flushed;
88 u8 vmalloc_flag; 80 bool vmalloc_flag;
89}; 81};
90 82
91#define AGP_NORMAL_MEMORY 0 83#define AGP_NORMAL_MEMORY 0
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h
index 62aef589eb94..c8fdb6e658e1 100644
--- a/include/linux/agpgart.h
+++ b/include/linux/agpgart.h
@@ -206,8 +206,8 @@ struct agp_front_data {
206 struct agp_controller *current_controller; 206 struct agp_controller *current_controller;
207 struct agp_controller *controllers; 207 struct agp_controller *controllers;
208 struct agp_file_private *file_priv_list; 208 struct agp_file_private *file_priv_list;
209 u8 used_by_controller; 209 bool used_by_controller;
210 u8 backend_acquired; 210 bool backend_acquired;
211}; 211};
212 212
213#endif /* __KERNEL__ */ 213#endif /* __KERNEL__ */
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 63c3bb98558f..8b82974bdc12 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -571,7 +571,7 @@ extern void audit_log_lost(const char *message);
571extern int audit_update_lsm_rules(void); 571extern int audit_update_lsm_rules(void);
572 572
573 /* Private API (for audit.c only) */ 573 /* Private API (for audit.c only) */
574extern int audit_filter_user(struct netlink_skb_parms *cb, int type); 574extern int audit_filter_user(struct netlink_skb_parms *cb);
575extern int audit_filter_type(int type); 575extern int audit_filter_type(int type);
576extern int audit_receive_filter(int type, int pid, int uid, int seq, 576extern int audit_receive_filter(int type, int pid, int uid, int seq,
577 void *data, size_t datasz, uid_t loginuid, 577 void *data, size_t datasz, uid_t loginuid,
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 6a5dbdc8a7dc..686895bacd9d 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -94,7 +94,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat,
94 unsigned long freepfn, 94 unsigned long freepfn,
95 unsigned long startpfn, 95 unsigned long startpfn,
96 unsigned long endpfn); 96 unsigned long endpfn);
97extern void reserve_bootmem_node(pg_data_t *pgdat, 97extern int reserve_bootmem_node(pg_data_t *pgdat,
98 unsigned long physaddr, 98 unsigned long physaddr,
99 unsigned long size, 99 unsigned long size,
100 int flags); 100 int flags);
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 51e6b1e520e6..dcf77fa826b5 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -82,6 +82,7 @@ struct cpuidle_state_kobj {
82}; 82};
83 83
84struct cpuidle_device { 84struct cpuidle_device {
85 unsigned int registered:1;
85 unsigned int enabled:1; 86 unsigned int enabled:1;
86 unsigned int cpu; 87 unsigned int cpu;
87 88
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 2a6639407c80..d982eb89c77d 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -300,7 +300,7 @@ extern int d_validate(struct dentry *, struct dentry *);
300extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); 300extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
301 301
302extern char *__d_path(const struct path *path, struct path *root, char *, int); 302extern char *__d_path(const struct path *path, struct path *root, char *, int);
303extern char *d_path(struct path *, char *, int); 303extern char *d_path(const struct path *, char *, int);
304extern char *dentry_path(struct dentry *, char *, int); 304extern char *dentry_path(struct dentry *, char *, int);
305 305
306/* Allocation counts.. */ 306/* Allocation counts.. */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d490779f18d9..7c1080826832 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -894,8 +894,6 @@ static inline int file_check_writeable(struct file *filp)
894typedef struct files_struct *fl_owner_t; 894typedef struct files_struct *fl_owner_t;
895 895
896struct file_lock_operations { 896struct file_lock_operations {
897 void (*fl_insert)(struct file_lock *); /* lock insertion callback */
898 void (*fl_remove)(struct file_lock *); /* lock removal callback */
899 void (*fl_copy_lock)(struct file_lock *, struct file_lock *); 897 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
900 void (*fl_release_private)(struct file_lock *); 898 void (*fl_release_private)(struct file_lock *);
901}; 899};
diff --git a/include/linux/ide.h b/include/linux/ide.h
index f8f195c20da2..9918772bf274 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -153,7 +153,7 @@ enum { ide_unknown, ide_generic, ide_pci,
153 ide_qd65xx, ide_umc8672, ide_ht6560b, 153 ide_qd65xx, ide_umc8672, ide_ht6560b,
154 ide_rz1000, ide_trm290, 154 ide_rz1000, ide_trm290,
155 ide_cmd646, ide_cy82c693, ide_4drives, 155 ide_cmd646, ide_cy82c693, ide_4drives,
156 ide_pmac, ide_etrax100, ide_acorn, 156 ide_pmac, ide_acorn,
157 ide_au1xxx, ide_palm3710 157 ide_au1xxx, ide_palm3710
158}; 158};
159 159
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
index f1fbe9c930d7..d4efe4014705 100644
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -41,7 +41,7 @@ struct ip_tunnel_prl {
41 __u16 __reserved; 41 __u16 __reserved;
42 __u32 datalen; 42 __u32 datalen;
43 __u32 __reserved2; 43 __u32 __reserved2;
44 void __user *data; 44 /* data follows */
45}; 45};
46 46
47/* PRL flags */ 47/* PRL flags */
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index d5d40a9f7929..c6801bffe76d 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -53,14 +53,14 @@ struct resource_list {
53#define IORESOURCE_AUTO 0x40000000 53#define IORESOURCE_AUTO 0x40000000
54#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ 54#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
55 55
56/* ISA PnP IRQ specific bits (IORESOURCE_BITS) */ 56/* PnP IRQ specific bits (IORESOURCE_BITS) */
57#define IORESOURCE_IRQ_HIGHEDGE (1<<0) 57#define IORESOURCE_IRQ_HIGHEDGE (1<<0)
58#define IORESOURCE_IRQ_LOWEDGE (1<<1) 58#define IORESOURCE_IRQ_LOWEDGE (1<<1)
59#define IORESOURCE_IRQ_HIGHLEVEL (1<<2) 59#define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
60#define IORESOURCE_IRQ_LOWLEVEL (1<<3) 60#define IORESOURCE_IRQ_LOWLEVEL (1<<3)
61#define IORESOURCE_IRQ_SHAREABLE (1<<4) 61#define IORESOURCE_IRQ_SHAREABLE (1<<4)
62 62
63/* ISA PnP DMA specific bits (IORESOURCE_BITS) */ 63/* PnP DMA specific bits (IORESOURCE_BITS) */
64#define IORESOURCE_DMA_TYPE_MASK (3<<0) 64#define IORESOURCE_DMA_TYPE_MASK (3<<0)
65#define IORESOURCE_DMA_8BIT (0<<0) 65#define IORESOURCE_DMA_8BIT (0<<0)
66#define IORESOURCE_DMA_8AND16BIT (1<<0) 66#define IORESOURCE_DMA_8AND16BIT (1<<0)
@@ -76,7 +76,7 @@ struct resource_list {
76#define IORESOURCE_DMA_TYPEB (2<<6) 76#define IORESOURCE_DMA_TYPEB (2<<6)
77#define IORESOURCE_DMA_TYPEF (3<<6) 77#define IORESOURCE_DMA_TYPEF (3<<6)
78 78
79/* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */ 79/* PnP memory I/O specific bits (IORESOURCE_BITS) */
80#define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ 80#define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */
81#define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ 81#define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */
82#define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ 82#define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 10b666b61add..cde056e08181 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op
396{ 396{
397 struct request_sock *req = reqsk_alloc(ops); 397 struct request_sock *req = reqsk_alloc(ops);
398 398
399 if (req != NULL) 399 if (req != NULL) {
400 inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); 400 inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req);
401 inet6_rsk(req)->pktopts = NULL;
402 }
401 403
402 return req; 404 return req;
403} 405}
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 05e2b307161a..d147f0f90360 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -919,6 +919,9 @@ struct journal_s
919 struct proc_dir_entry *j_proc_entry; 919 struct proc_dir_entry *j_proc_entry;
920 struct transaction_stats_s j_stats; 920 struct transaction_stats_s j_stats;
921 921
922 /* Failed journal commit ID */
923 unsigned int j_failed_commit;
924
922 /* 925 /*
923 * An opaque pointer to fs-private information. ext3 puts its 926 * An opaque pointer to fs-private information. ext3 puts its
924 * superblock pointer here 927 * superblock pointer here
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 398978972b7a..de9d1df4bba2 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -33,6 +33,7 @@
33#define KVM_REQ_REPORT_TPR_ACCESS 2 33#define KVM_REQ_REPORT_TPR_ACCESS 2
34#define KVM_REQ_MMU_RELOAD 3 34#define KVM_REQ_MMU_RELOAD 3
35#define KVM_REQ_TRIPLE_FAULT 4 35#define KVM_REQ_TRIPLE_FAULT 4
36#define KVM_REQ_PENDING_TIMER 5
36 37
37struct kvm_vcpu; 38struct kvm_vcpu;
38extern struct kmem_cache *kvm_vcpu_cache; 39extern struct kmem_cache *kvm_vcpu_cache;
@@ -297,7 +298,7 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn)
297 return (gpa_t)gfn << PAGE_SHIFT; 298 return (gpa_t)gfn << PAGE_SHIFT;
298} 299}
299 300
300static inline void kvm_migrate_apic_timer(struct kvm_vcpu *vcpu) 301static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu)
301{ 302{
302 set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); 303 set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests);
303} 304}
diff --git a/include/linux/math64.h b/include/linux/math64.h
index c1a5f81501ff..c87f1528703a 100644
--- a/include/linux/math64.h
+++ b/include/linux/math64.h
@@ -81,4 +81,25 @@ static inline s64 div_s64(s64 dividend, s32 divisor)
81} 81}
82#endif 82#endif
83 83
84u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder);
85
86static __always_inline u32
87__iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
88{
89 u32 ret = 0;
90
91 while (dividend >= divisor) {
92 /* The following asm() prevents the compiler from
93 optimising this loop into a modulo operation. */
94 asm("" : "+rm"(dividend));
95
96 dividend -= divisor;
97 ret++;
98 }
99
100 *remainder = dividend;
101
102 return ret;
103}
104
84#endif /* _LINUX_MATH64_H */ 105#endif /* _LINUX_MATH64_H */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c31a9cd2a30e..586a943cab01 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb,
760 * (see walk_page_range for more details) 760 * (see walk_page_range for more details)
761 */ 761 */
762struct mm_walk { 762struct mm_walk {
763 int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *); 763 int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *);
764 int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *); 764 int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *);
765 int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *); 765 int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *);
766 int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *); 766 int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *);
767 int (*pte_hole)(unsigned long, unsigned long, void *); 767 int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *);
768 struct mm_struct *mm;
769 void *private;
768}; 770};
769 771
770int walk_page_range(const struct mm_struct *, unsigned long addr, 772int walk_page_range(unsigned long addr, unsigned long end,
771 unsigned long end, const struct mm_walk *walk, 773 struct mm_walk *walk);
772 void *private);
773void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, 774void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
774 unsigned long end, unsigned long floor, unsigned long ceiling); 775 unsigned long end, unsigned long floor, unsigned long ceiling);
775void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, 776void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index b03b27457413..81cd36b735b0 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -57,12 +57,6 @@
57#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ 57#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */
58#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ 58#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
59 59
60/* media of boot sector */
61static inline int fat_valid_media(u8 media)
62{
63 return 0xf8 <= media || media == 0xf0;
64}
65
66#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ 60#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
67 MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) 61 MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
68 62
@@ -334,6 +328,12 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len)
334#endif 328#endif
335} 329}
336 330
331/* media of boot sector */
332static inline int fat_valid_media(u8 media)
333{
334 return 0xf8 <= media || media == 0xf0;
335}
336
337/* fat/cache.c */ 337/* fat/cache.c */
338extern void fat_cache_inval_inode(struct inode *inode); 338extern void fat_cache_inval_inode(struct inode *inode);
339extern int fat_get_cluster(struct inode *inode, int cluster, 339extern int fat_get_cluster(struct inode *inode, int cluster,
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 590cff32415d..f31debfac926 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -306,5 +306,29 @@ static inline void __ClearPageTail(struct page *page)
306} 306}
307 307
308#endif /* !PAGEFLAGS_EXTENDED */ 308#endif /* !PAGEFLAGS_EXTENDED */
309
310#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \
311 1 << PG_buddy | 1 << PG_writeback | \
312 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active)
313
314/*
315 * Flags checked in bad_page(). Pages on the free list should not have
316 * these flags set. It they are, there is a problem.
317 */
318#define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty)
319
320/*
321 * Flags checked when a page is freed. Pages being freed should not have
322 * these flags set. It they are, there is a problem.
323 */
324#define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved)
325
326/*
327 * Flags checked when a page is prepped for return by the page allocator.
328 * Pages being prepped should not have these flags set. It they are, there
329 * is a problem.
330 */
331#define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty)
332
309#endif /* !__GENERATING_BOUNDS_H */ 333#endif /* !__GENERATING_BOUNDS_H */
310#endif /* PAGE_FLAGS_H */ 334#endif /* PAGE_FLAGS_H */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 509159bcd4e7..d18b1dd49fab 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -206,6 +206,7 @@ struct pci_dev {
206 struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ 206 struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */
207 int rom_attr_enabled; /* has display of the rom attribute been enabled? */ 207 int rom_attr_enabled; /* has display of the rom attribute been enabled? */
208 struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ 208 struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
209 struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
209#ifdef CONFIG_PCI_MSI 210#ifdef CONFIG_PCI_MSI
210 struct list_head msi_list; 211 struct list_head msi_list;
211#endif 212#endif
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9b940e644179..eafc9d6d2b35 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -716,6 +716,7 @@
716#define PCI_DEVICE_ID_HP_CISSA 0x3220 716#define PCI_DEVICE_ID_HP_CISSA 0x3220
717#define PCI_DEVICE_ID_HP_CISSC 0x3230 717#define PCI_DEVICE_ID_HP_CISSC 0x3230
718#define PCI_DEVICE_ID_HP_CISSD 0x3238 718#define PCI_DEVICE_ID_HP_CISSD 0x3238
719#define PCI_DEVICE_ID_HP_CISSE 0x323a
719#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 720#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031
720 721
721#define PCI_VENDOR_ID_PCTECH 0x1042 722#define PCI_VENDOR_ID_PCTECH 0x1042
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 9883bc942262..fff1d27ddb4c 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -9,6 +9,8 @@
9 9
10struct net; 10struct net;
11struct completion; 11struct completion;
12struct mm_struct;
13
12/* 14/*
13 * The proc filesystem constants/structures 15 * The proc filesystem constants/structures
14 */ 16 */
@@ -101,8 +103,6 @@ extern spinlock_t proc_subdir_lock;
101extern void proc_root_init(void); 103extern void proc_root_init(void);
102extern void proc_misc_init(void); 104extern void proc_misc_init(void);
103 105
104struct mm_struct;
105
106void proc_flush_task(struct task_struct *task); 106void proc_flush_task(struct task_struct *task);
107struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); 107struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
108int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); 108int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index a2aec2c0cfb5..b358c704d102 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -246,6 +246,7 @@ enum rt_class_t
246{ 246{
247 RT_TABLE_UNSPEC=0, 247 RT_TABLE_UNSPEC=0,
248/* User defined values */ 248/* User defined values */
249 RT_TABLE_COMPAT=252,
249 RT_TABLE_DEFAULT=253, 250 RT_TABLE_DEFAULT=253,
250 RT_TABLE_MAIN=254, 251 RT_TABLE_MAIN=254,
251 RT_TABLE_LOCAL=255, 252 RT_TABLE_LOCAL=255,
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ae0be3c62375..c5d3f847ca8d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2026,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p)
2026 return signal_pending(p) && __fatal_signal_pending(p); 2026 return signal_pending(p) && __fatal_signal_pending(p);
2027} 2027}
2028 2028
2029static inline int signal_pending_state(long state, struct task_struct *p)
2030{
2031 if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL)))
2032 return 0;
2033 if (!signal_pending(p))
2034 return 0;
2035
2036 if (state & (__TASK_STOPPED | __TASK_TRACED))
2037 return 0;
2038
2039 return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
2040}
2041
2029static inline int need_resched(void) 2042static inline int need_resched(void)
2030{ 2043{
2031 return unlikely(test_thread_flag(TIF_NEED_RESCHED)); 2044 return unlikely(test_thread_flag(TIF_NEED_RESCHED));
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
index 01fbdf5fef22..942e38736901 100644
--- a/include/linux/ssb/ssb_driver_gige.h
+++ b/include/linux/ssb/ssb_driver_gige.h
@@ -100,7 +100,7 @@ extern char * nvram_get(const char *name);
100/* Get the device MAC address */ 100/* Get the device MAC address */
101static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) 101static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
102{ 102{
103#ifdef CONFIG_BCM947XX 103#ifdef CONFIG_BCM47XX
104 char *res = nvram_get("et0macaddr"); 104 char *res = nvram_get("et0macaddr");
105 if (res) 105 if (res)
106 memcpy(macaddr, res, 6); 106 memcpy(macaddr, res, 6);
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 18e62e3d406f..b31b6b74aa28 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -239,11 +239,6 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
239 return (struct tcp_request_sock *)req; 239 return (struct tcp_request_sock *)req;
240} 240}
241 241
242struct tcp_deferred_accept_info {
243 struct sock *listen_sk;
244 struct request_sock *request;
245};
246
247struct tcp_sock { 242struct tcp_sock {
248 /* inet_connection_sock has to be the first member of tcp_sock */ 243 /* inet_connection_sock has to be the first member of tcp_sock */
249 struct inet_connection_sock inet_conn; 244 struct inet_connection_sock inet_conn;
@@ -379,8 +374,6 @@ struct tcp_sock {
379 unsigned int keepalive_intvl; /* time interval between keep alive probes */ 374 unsigned int keepalive_intvl; /* time interval between keep alive probes */
380 int linger2; 375 int linger2;
381 376
382 struct tcp_deferred_accept_info defer_tcp_accept;
383
384 unsigned long last_synq_overflow; 377 unsigned long last_synq_overflow;
385 378
386 u32 tso_deferred; 379 u32 tso_deferred;
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 06d3e6eb9ca8..917707e6151d 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -66,8 +66,7 @@ struct thermal_cooling_device {
66 ((long)t-2732+5)/10 : ((long)t-2732-5)/10) 66 ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
67#define CELSIUS_TO_KELVIN(t) ((t)*10+2732) 67#define CELSIUS_TO_KELVIN(t) ((t)*10+2732)
68 68
69#if defined(CONFIG_HWMON) || \ 69#if defined(CONFIG_THERMAL_HWMON)
70 (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE))
71/* thermal zone devices with the same type share one hwmon device */ 70/* thermal zone devices with the same type share one hwmon device */
72struct thermal_hwmon_device { 71struct thermal_hwmon_device {
73 char type[THERMAL_NAME_LENGTH]; 72 char type[THERMAL_NAME_LENGTH];
@@ -94,8 +93,7 @@ struct thermal_zone_device {
94 struct idr idr; 93 struct idr idr;
95 struct mutex lock; /* protect cooling devices list */ 94 struct mutex lock; /* protect cooling devices list */
96 struct list_head node; 95 struct list_head node;
97#if defined(CONFIG_HWMON) || \ 96#if defined(CONFIG_THERMAL_HWMON)
98 (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE))
99 struct list_head hwmon_node; 97 struct list_head hwmon_node;
100 struct thermal_hwmon_device *hwmon; 98 struct thermal_hwmon_device *hwmon;
101 struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ 99 struct thermal_hwmon_attr temp_input; /* hwmon sys attr */
diff --git a/include/linux/time.h b/include/linux/time.h
index d32ef0ad4c0a..e15206a7e82e 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -6,6 +6,7 @@
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
7# include <linux/cache.h> 7# include <linux/cache.h>
8# include <linux/seqlock.h> 8# include <linux/seqlock.h>
9# include <linux/math64.h>
9#endif 10#endif
10 11
11#ifndef _STRUCT_TIMESPEC 12#ifndef _STRUCT_TIMESPEC
@@ -169,18 +170,13 @@ extern struct timeval ns_to_timeval(const s64 nsec);
169 * timespec_add_ns - Adds nanoseconds to a timespec 170 * timespec_add_ns - Adds nanoseconds to a timespec
170 * @a: pointer to timespec to be incremented 171 * @a: pointer to timespec to be incremented
171 * @ns: unsigned nanoseconds value to be added 172 * @ns: unsigned nanoseconds value to be added
173 *
174 * This must always be inlined because its used from the x86-64 vdso,
175 * which cannot call other kernel functions.
172 */ 176 */
173static inline void timespec_add_ns(struct timespec *a, u64 ns) 177static __always_inline void timespec_add_ns(struct timespec *a, u64 ns)
174{ 178{
175 ns += a->tv_nsec; 179 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns);
176 while(unlikely(ns >= NSEC_PER_SEC)) {
177 /* The following asm() prevents the compiler from
178 * optimising this loop into a modulo operation. */
179 asm("" : "+r"(ns));
180
181 ns -= NSEC_PER_SEC;
182 a->tv_sec++;
183 }
184 a->tv_nsec = ns; 180 a->tv_nsec = ns;
185} 181}
186#endif /* __KERNEL__ */ 182#endif /* __KERNEL__ */
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 59f1c0bd8f9c..d2a003586761 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -27,8 +27,7 @@
27 * This routine is called by the kernel to write a series of 27 * This routine is called by the kernel to write a series of
28 * characters to the tty device. The characters may come from 28 * characters to the tty device. The characters may come from
29 * user space or kernel space. This routine will return the 29 * user space or kernel space. This routine will return the
30 * number of characters actually accepted for writing. This 30 * number of characters actually accepted for writing.
31 * routine is mandatory.
32 * 31 *
33 * Optional: Required for writable devices. 32 * Optional: Required for writable devices.
34 * 33 *
@@ -134,7 +133,7 @@
134 * This routine notifies the tty driver that it should hangup the 133 * This routine notifies the tty driver that it should hangup the
135 * tty device. 134 * tty device.
136 * 135 *
137 * Required: 136 * Optional:
138 * 137 *
139 * void (*break_ctl)(struct tty_stuct *tty, int state); 138 * void (*break_ctl)(struct tty_stuct *tty, int state);
140 * 139 *
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 9405aa6cdf26..38c0571820fb 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -38,7 +38,7 @@ struct virtio_net_hdr
38#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set 38#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set
39 __u8 gso_type; 39 __u8 gso_type;
40 __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ 40 __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
41 __u16 gso_size; /* Bytes to append to gso_hdr_len per frame */ 41 __u16 gso_size; /* Bytes to append to hdr_len per frame */
42 __u16 csum_start; /* Position to start checksumming from */ 42 __u16 csum_start; /* Position to start checksumming from */
43 __u16 csum_offset; /* Offset after that to place checksum */ 43 __u16 csum_offset; /* Offset after that to place checksum */
44}; 44};
diff --git a/include/media/cx25840.h b/include/media/cx25840.h
index cd599ad29fb2..db431d513f2f 100644
--- a/include/media/cx25840.h
+++ b/include/media/cx25840.h
@@ -32,12 +32,16 @@ enum cx25840_video_input {
32 CX25840_COMPOSITE7, 32 CX25840_COMPOSITE7,
33 CX25840_COMPOSITE8, 33 CX25840_COMPOSITE8,
34 34
35 /* S-Video inputs consist of one luma input (In1-In4) ORed with one 35 /* S-Video inputs consist of one luma input (In1-In8) ORed with one
36 chroma input (In5-In8) */ 36 chroma input (In5-In8) */
37 CX25840_SVIDEO_LUMA1 = 0x10, 37 CX25840_SVIDEO_LUMA1 = 0x10,
38 CX25840_SVIDEO_LUMA2 = 0x20, 38 CX25840_SVIDEO_LUMA2 = 0x20,
39 CX25840_SVIDEO_LUMA3 = 0x30, 39 CX25840_SVIDEO_LUMA3 = 0x30,
40 CX25840_SVIDEO_LUMA4 = 0x40, 40 CX25840_SVIDEO_LUMA4 = 0x40,
41 CX25840_SVIDEO_LUMA5 = 0x50,
42 CX25840_SVIDEO_LUMA6 = 0x60,
43 CX25840_SVIDEO_LUMA7 = 0x70,
44 CX25840_SVIDEO_LUMA8 = 0x80,
41 CX25840_SVIDEO_CHROMA4 = 0x400, 45 CX25840_SVIDEO_CHROMA4 = 0x400,
42 CX25840_SVIDEO_CHROMA5 = 0x500, 46 CX25840_SVIDEO_CHROMA5 = 0x500,
43 CX25840_SVIDEO_CHROMA6 = 0x600, 47 CX25840_SVIDEO_CHROMA6 = 0x600,
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index bfee8be5d63f..b8e8aa91905a 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -146,6 +146,7 @@ extern IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE];
146extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; 146extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE];
147extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; 147extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE];
148extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; 148extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE];
149extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE];
149 150
150#endif 151#endif
151 152
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 33f01ae08f76..859f7a6f6f67 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -40,9 +40,9 @@
40#define VFL_TYPE_VTX 3 40#define VFL_TYPE_VTX 3
41 41
42/* Video standard functions */ 42/* Video standard functions */
43extern char *v4l2_norm_to_name(v4l2_std_id id); 43extern const char *v4l2_norm_to_name(v4l2_std_id id);
44extern int v4l2_video_std_construct(struct v4l2_standard *vs, 44extern int v4l2_video_std_construct(struct v4l2_standard *vs,
45 int id, char *name); 45 int id, const char *name);
46/* Prints the ioctl in a human-readable format */ 46/* Prints the ioctl in a human-readable format */
47extern void v4l_printk_ioctl(unsigned int cmd); 47extern void v4l_printk_ioctl(unsigned int cmd);
48 48
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index a42cd63d241a..9fabe5b38912 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -197,4 +197,14 @@ static inline int inet_iif(const struct sk_buff *skb)
197 return skb->rtable->rt_iif; 197 return skb->rtable->rt_iif;
198} 198}
199 199
200static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops)
201{
202 struct request_sock *req = reqsk_alloc(ops);
203
204 if (req != NULL)
205 inet_rsk(req)->opt = NULL;
206
207 return req;
208}
209
200#endif /* _INET_SOCK_H */ 210#endif /* _INET_SOCK_H */
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index e0a612bc9c4e..f422f7218e1c 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -367,6 +367,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a)
367 a->s6_addr32[2] | a->s6_addr32[3] ) == 0); 367 a->s6_addr32[2] | a->s6_addr32[3] ) == 0);
368} 368}
369 369
370static inline int ipv6_addr_loopback(const struct in6_addr *a)
371{
372 return ((a->s6_addr32[0] | a->s6_addr32[1] |
373 a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0);
374}
375
370static inline int ipv6_addr_v4mapped(const struct in6_addr *a) 376static inline int ipv6_addr_v4mapped(const struct in6_addr *a)
371{ 377{
372 return ((a->s6_addr32[0] | a->s6_addr32[1] | 378 return ((a->s6_addr32[0] | a->s6_addr32[1] |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index aa540e6be502..d9dd0f707296 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -95,6 +95,11 @@ extern struct list_head net_namespace_list;
95#ifdef CONFIG_NET_NS 95#ifdef CONFIG_NET_NS
96extern void __put_net(struct net *net); 96extern void __put_net(struct net *net);
97 97
98static inline int net_alive(struct net *net)
99{
100 return net && atomic_read(&net->count);
101}
102
98static inline struct net *get_net(struct net *net) 103static inline struct net *get_net(struct net *net)
99{ 104{
100 atomic_inc(&net->count); 105 atomic_inc(&net->count);
@@ -125,6 +130,12 @@ int net_eq(const struct net *net1, const struct net *net2)
125 return net1 == net2; 130 return net1 == net2;
126} 131}
127#else 132#else
133
134static inline int net_alive(struct net *net)
135{
136 return 1;
137}
138
128static inline struct net *get_net(struct net *net) 139static inline struct net *get_net(struct net *net)
129{ 140{
130 return net; 141 return net;
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
index f736e842977f..f80c0ed6d870 100644
--- a/include/net/netfilter/nf_conntrack_extend.h
+++ b/include/net/netfilter/nf_conntrack_extend.h
@@ -15,6 +15,7 @@ enum nf_ct_ext_id
15 15
16/* Extensions: optional stuff which isn't permanently in struct. */ 16/* Extensions: optional stuff which isn't permanently in struct. */
17struct nf_ct_ext { 17struct nf_ct_ext {
18 struct rcu_head rcu;
18 u8 offset[NF_CT_EXT_NUM]; 19 u8 offset[NF_CT_EXT_NUM];
19 u8 len; 20 u8 len;
20 char data[0]; 21 char data[0];
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index b220b5f624de..0c96e7bed5db 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -115,8 +115,8 @@ struct request_sock_queue {
115 struct request_sock *rskq_accept_head; 115 struct request_sock *rskq_accept_head;
116 struct request_sock *rskq_accept_tail; 116 struct request_sock *rskq_accept_tail;
117 rwlock_t syn_wait_lock; 117 rwlock_t syn_wait_lock;
118 u16 rskq_defer_accept; 118 u8 rskq_defer_accept;
119 /* 2 bytes hole, try to pack */ 119 /* 3 bytes hole, try to pack */
120 struct listen_sock *listen_opt; 120 struct listen_sock *listen_opt;
121}; 121};
122 122
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 633147cb6bbc..cf54034019d9 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -139,7 +139,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
139#define MAX_TCP_KEEPINTVL 32767 139#define MAX_TCP_KEEPINTVL 32767
140#define MAX_TCP_KEEPCNT 127 140#define MAX_TCP_KEEPCNT 127
141#define MAX_TCP_SYNCNT 127 141#define MAX_TCP_SYNCNT 127
142#define MAX_TCP_ACCEPT_DEFERRED 65535
143 142
144#define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ 143#define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */
145 144
@@ -433,7 +432,6 @@ extern struct sk_buff * tcp_make_synack(struct sock *sk,
433 432
434extern int tcp_disconnect(struct sock *sk, int flags); 433extern int tcp_disconnect(struct sock *sk, int flags);
435 434
436extern void tcp_unhash(struct sock *sk);
437 435
438/* From syncookies.c */ 436/* From syncookies.c */
439extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; 437extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 911a661b7278..31d30b1852e8 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -105,7 +105,6 @@ enum ib_device_cap_flags {
105 */ 105 */
106 IB_DEVICE_UD_IP_CSUM = (1<<18), 106 IB_DEVICE_UD_IP_CSUM = (1<<18),
107 IB_DEVICE_UD_TSO = (1<<19), 107 IB_DEVICE_UD_TSO = (1<<19),
108 IB_DEVICE_SEND_W_INV = (1<<21),
109}; 108};
110 109
111enum ib_atomic_cap { 110enum ib_atomic_cap {
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h
index 9b018da48cf3..819a0331cda9 100644
--- a/include/xen/interface/xen.h
+++ b/include/xen/interface/xen.h
@@ -10,6 +10,7 @@
10#define __XEN_PUBLIC_XEN_H__ 10#define __XEN_PUBLIC_XEN_H__
11 11
12#include <asm/xen/interface.h> 12#include <asm/xen/interface.h>
13#include <asm/pvclock-abi.h>
13 14
14/* 15/*
15 * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS). 16 * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS).
@@ -336,7 +337,7 @@ struct vcpu_info {
336 uint8_t evtchn_upcall_mask; 337 uint8_t evtchn_upcall_mask;
337 unsigned long evtchn_pending_sel; 338 unsigned long evtchn_pending_sel;
338 struct arch_vcpu_info arch; 339 struct arch_vcpu_info arch;
339 struct vcpu_time_info time; 340 struct pvclock_vcpu_time_info time;
340}; /* 64 bytes (x86) */ 341}; /* 64 bytes (x86) */
341 342
342/* 343/*
@@ -384,9 +385,7 @@ struct shared_info {
384 * Wallclock time: updated only by control software. Guests should base 385 * Wallclock time: updated only by control software. Guests should base
385 * their gettimeofday() syscall on this wallclock-base value. 386 * their gettimeofday() syscall on this wallclock-base value.
386 */ 387 */
387 uint32_t wc_version; /* Version counter: see vcpu_time_info_t. */ 388 struct pvclock_wall_clock wc;
388 uint32_t wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */
389 uint32_t wc_nsec; /* Nsecs 00:00:00 UTC, Jan 1, 1970. */
390 389
391 struct arch_shared_info arch; 390 struct arch_shared_info arch;
392 391