aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-at91/at91cap9.h7
-rw-r--r--include/asm-arm/arch-omap/board-h3.h2
-rw-r--r--include/asm-arm/arch-omap/common.h9
-rw-r--r--include/asm-arm/arch-omap/dsp_common.h8
-rw-r--r--include/asm-arm/arch-omap/gpioexpander.h11
-rw-r--r--include/asm-arm/arch-s3c2410/irqs.h2
-rw-r--r--include/asm-arm/kprobes.h1
-rw-r--r--include/asm-arm/pgtable-nommu.h2
-rw-r--r--include/asm-arm/plat-s3c/uncompress.h4
-rw-r--r--include/asm-arm/proc-fns.h4
-rw-r--r--include/asm-blackfin/mmu_context.h2
-rw-r--r--include/asm-blackfin/unistd.h6
-rw-r--r--include/asm-cris/uaccess.h53
-rw-r--r--include/asm-cris/unistd.h6
-rw-r--r--include/asm-h8300/uaccess.h11
-rw-r--r--include/asm-ia64/Kbuild2
-rw-r--r--include/asm-ia64/hw_irq.h12
-rw-r--r--include/asm-ia64/kprobes.h7
-rw-r--r--include/asm-ia64/ptrace.h9
-rw-r--r--include/asm-ia64/sal.h4
-rw-r--r--include/asm-m68k/unistd.h6
-rw-r--r--include/asm-m68knommu/machdep.h2
-rw-r--r--include/asm-m68knommu/unistd.h6
-rw-r--r--include/asm-mips/cacheflush.h2
-rw-r--r--include/asm-mips/highmem.h1
-rw-r--r--include/asm-mips/mach-ip27/cpu-feature-overrides.h4
-rw-r--r--include/asm-mips/mach-jmr3927/ioremap.h2
-rw-r--r--include/asm-mips/mach-lasat/irq.h2
-rw-r--r--include/asm-mips/pgtable-32.h2
-rw-r--r--include/asm-mips/time.h5
-rw-r--r--include/asm-mn10300/Kbuild4
-rw-r--r--include/asm-parisc/elf.h22
-rw-r--r--include/asm-parisc/fixmap.h9
-rw-r--r--include/asm-parisc/futex.h10
-rw-r--r--include/asm-parisc/pdc.h3
-rw-r--r--include/asm-parisc/pgalloc.h4
-rw-r--r--include/asm-parisc/pgtable.h8
-rw-r--r--include/asm-parisc/unistd.h5
-rw-r--r--include/asm-powerpc/kprobes.h1
-rw-r--r--include/asm-powerpc/pgtable-ppc32.h8
-rw-r--r--include/asm-powerpc/reg.h3
-rw-r--r--include/asm-ppc/pgtable.h8
-rw-r--r--include/asm-s390/kprobes.h1
-rw-r--r--include/asm-sh/byteorder.h15
-rw-r--r--include/asm-sh/delay.h5
-rw-r--r--include/asm-sh/posix_types.h6
-rw-r--r--include/asm-sparc/system.h2
-rw-r--r--include/asm-sparc64/backoff.h3
-rw-r--r--include/asm-sparc64/cpudata.h2
-rw-r--r--include/asm-sparc64/dcu.h41
-rw-r--r--include/asm-sparc64/hvtramp.h2
-rw-r--r--include/asm-sparc64/irq.h1
-rw-r--r--include/asm-sparc64/kprobes.h2
-rw-r--r--include/asm-sparc64/pgtable.h12
-rw-r--r--include/asm-sparc64/processor.h3
-rw-r--r--include/asm-sparc64/spitfire.h2
-rw-r--r--include/asm-sparc64/stacktrace.h6
-rw-r--r--include/asm-sparc64/system.h2
-rw-r--r--include/asm-sparc64/timer.h9
-rw-r--r--include/asm-x86/Kbuild1
-rw-r--r--include/asm-x86/cmpxchg_32.h32
-rw-r--r--include/asm-x86/e820_32.h2
-rw-r--r--include/asm-x86/e820_64.h2
-rw-r--r--include/asm-x86/io_32.h6
-rw-r--r--include/asm-x86/io_64.h6
-rw-r--r--include/asm-x86/kprobes.h1
-rw-r--r--include/asm-x86/page.h4
-rw-r--r--include/asm-x86/pgtable.h2
-rw-r--r--include/asm-x86/pgtable_32.h9
-rw-r--r--include/asm-x86/pgtable_64.h6
-rw-r--r--include/asm-x86/sync_bitops.h9
-rw-r--r--include/crypto/internal/skcipher.h6
-rw-r--r--include/linux/Kbuild3
-rw-r--r--include/linux/blkdev.h4
-rw-r--r--include/linux/cgroup_subsys.h2
-rw-r--r--include/linux/compiler.h6
-rw-r--r--include/linux/cpuidle.h4
-rw-r--r--include/linux/debugfs.h5
-rw-r--r--include/linux/delay.h8
-rw-r--r--include/linux/dmaengine.h2
-rw-r--r--include/linux/ethtool.h1
-rw-r--r--include/linux/exportfs.h4
-rw-r--r--include/linux/firmware.h23
-rw-r--r--include/linux/genhd.h35
-rw-r--r--include/linux/gpio.h95
-rw-r--r--include/linux/in.h2
-rw-r--r--include/linux/iommu-helper.h3
-rw-r--r--include/linux/jbd.h11
-rw-r--r--include/linux/kprobes.h6
-rw-r--r--include/linux/kvm.h4
-rw-r--r--include/linux/kvm_host.h1
-rw-r--r--include/linux/libata.h8
-rw-r--r--include/linux/marker.h8
-rw-r--r--include/linux/memcontrol.h41
-rw-r--r--include/linux/memstick.h133
-rw-r--r--include/linux/mm.h13
-rw-r--r--include/linux/mm_types.h9
-rw-r--r--include/linux/netfilter/nfnetlink_compat.h2
-rw-r--r--include/linux/netpoll.h7
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--include/linux/pci.h17
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/pkt_cls.h8
-rw-r--r--include/linux/pmu.h9
-rw-r--r--include/linux/pnp.h2
-rw-r--r--include/linux/proc_fs.h3
-rw-r--r--include/linux/ps2esdi.h98
-rw-r--r--include/linux/raid/bitmap.h2
-rw-r--r--include/linux/raid/md_k.h1
-rw-r--r--include/linux/rcupreempt.h4
-rw-r--r--include/linux/sched.h18
-rw-r--r--include/linux/security.h102
-rw-r--r--include/linux/slab_def.h4
-rw-r--r--include/linux/slub_def.h4
-rw-r--r--include/linux/sm501-regs.h3
-rw-r--r--include/linux/sm501.h3
-rw-r--r--include/linux/tifm.h2
-rw-r--r--include/linux/time.h4
-rw-r--r--include/linux/timex.h9
-rw-r--r--include/linux/topology.h3
-rw-r--r--include/linux/usb.h12
-rw-r--r--include/linux/usb/Kbuild2
-rw-r--r--include/linux/usb/gadget.h4
-rw-r--r--include/linux/usb/quirks.h3
-rw-r--r--include/linux/usb_usual.h4
-rw-r--r--include/linux/virtio.h5
-rw-r--r--include/net/bluetooth/bluetooth.h2
-rw-r--r--include/net/dst.h23
-rw-r--r--include/net/inet_sock.h3
-rw-r--r--include/net/irda/irttp.h6
-rw-r--r--include/net/neighbour.h4
-rw-r--r--include/net/net_namespace.h1
-rw-r--r--include/net/netfilter/nf_conntrack_extend.h1
-rw-r--r--include/net/sctp/sctp.h12
-rw-r--r--include/net/xfrm.h31
-rw-r--r--include/scsi/libsas.h1
-rw-r--r--include/scsi/scsi_transport_iscsi.h2
137 files changed, 774 insertions, 559 deletions
diff --git a/include/asm-arm/arch-at91/at91cap9.h b/include/asm-arm/arch-at91/at91cap9.h
index 73e1fcf4a0aa..bac83adb5050 100644
--- a/include/asm-arm/arch-at91/at91cap9.h
+++ b/include/asm-arm/arch-at91/at91cap9.h
@@ -97,12 +97,17 @@
97#define AT91_PIOD (0xfffff800 - AT91_BASE_SYS) 97#define AT91_PIOD (0xfffff800 - AT91_BASE_SYS)
98#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) 98#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
99#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS) 99#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
100#define AT91_SHDC (0xfffffd10 - AT91_BASE_SYS) 100#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
101#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) 101#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
102#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) 102#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
103#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) 103#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
104#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS) 104#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
105 105
106#define AT91_USART0 AT91CAP9_BASE_US0
107#define AT91_USART1 AT91CAP9_BASE_US1
108#define AT91_USART2 AT91CAP9_BASE_US2
109
110
106/* 111/*
107 * Internal Memory. 112 * Internal Memory.
108 */ 113 */
diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h
index 1c2b55c61ca0..0f6404435ea8 100644
--- a/include/asm-arm/arch-omap/board-h3.h
+++ b/include/asm-arm/arch-omap/board-h3.h
@@ -36,7 +36,7 @@
36 36
37#define NR_IRQS (MAXIRQNUM + 1) 37#define NR_IRQS (MAXIRQNUM + 1)
38 38
39extern void __init h3_mmc_init(void); 39extern void h3_mmc_init(void);
40extern void h3_mmc_slot_cover_handler(void *arg, int state); 40extern void h3_mmc_slot_cover_handler(void *arg, int state);
41 41
42#endif /* __ASM_ARCH_OMAP_H3_H */ 42#endif /* __ASM_ARCH_OMAP_H3_H */
diff --git a/include/asm-arm/arch-omap/common.h b/include/asm-arm/arch-omap/common.h
index 442aecbb8f44..224e009e5296 100644
--- a/include/asm-arm/arch-omap/common.h
+++ b/include/asm-arm/arch-omap/common.h
@@ -27,9 +27,7 @@
27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H 27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
28#define __ARCH_ARM_MACH_OMAP_COMMON_H 28#define __ARCH_ARM_MACH_OMAP_COMMON_H
29 29
30#ifdef CONFIG_I2C_OMAP
31#include <linux/i2c.h> 30#include <linux/i2c.h>
32#endif
33 31
34struct sys_timer; 32struct sys_timer;
35 33
@@ -41,7 +39,12 @@ extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
41 struct i2c_board_info const *info, 39 struct i2c_board_info const *info,
42 unsigned len); 40 unsigned len);
43#else 41#else
44#define omap_register_i2c_bus(a, b, c, d) 0 42static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
43 struct i2c_board_info const *info,
44 unsigned len)
45{
46 return 0;
47}
45#endif 48#endif
46 49
47#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ 50#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
diff --git a/include/asm-arm/arch-omap/dsp_common.h b/include/asm-arm/arch-omap/dsp_common.h
index c61f868f24ee..da97736f3efa 100644
--- a/include/asm-arm/arch-omap/dsp_common.h
+++ b/include/asm-arm/arch-omap/dsp_common.h
@@ -24,11 +24,17 @@
24#ifndef ASM_ARCH_DSP_COMMON_H 24#ifndef ASM_ARCH_DSP_COMMON_H
25#define ASM_ARCH_DSP_COMMON_H 25#define ASM_ARCH_DSP_COMMON_H
26 26
27#ifdef CONFIG_ARCH_OMAP1 27#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_OMAP_MMU_FWK)
28extern void omap_dsp_request_mpui(void); 28extern void omap_dsp_request_mpui(void);
29extern void omap_dsp_release_mpui(void); 29extern void omap_dsp_release_mpui(void);
30extern int omap_dsp_request_mem(void); 30extern int omap_dsp_request_mem(void);
31extern int omap_dsp_release_mem(void); 31extern int omap_dsp_release_mem(void);
32#else
33static inline int omap_dsp_request_mem(void)
34{
35 return 0;
36}
37#define omap_dsp_release_mem() do {} while (0)
32#endif 38#endif
33 39
34#endif /* ASM_ARCH_DSP_COMMON_H */ 40#endif /* ASM_ARCH_DSP_COMMON_H */
diff --git a/include/asm-arm/arch-omap/gpioexpander.h b/include/asm-arm/arch-omap/gpioexpander.h
index 7a43b0a912e4..4eed1f80e2fb 100644
--- a/include/asm-arm/arch-omap/gpioexpander.h
+++ b/include/asm-arm/arch-omap/gpioexpander.h
@@ -18,7 +18,18 @@
18 18
19/* Function Prototypes for GPIO Expander functions */ 19/* Function Prototypes for GPIO Expander functions */
20 20
21#ifdef CONFIG_GPIOEXPANDER_OMAP
21int read_gpio_expa(u8 *, int); 22int read_gpio_expa(u8 *, int);
22int write_gpio_expa(u8 , int); 23int write_gpio_expa(u8 , int);
24#else
25static inline int read_gpio_expa(u8 *val, int addr)
26{
27 return 0;
28}
29static inline int write_gpio_expa(u8 val, int addr)
30{
31 return 0;
32}
33#endif
23 34
24#endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */ 35#endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h
index d858b3eb5547..f5435d8c3769 100644
--- a/include/asm-arm/arch-s3c2410/irqs.h
+++ b/include/asm-arm/arch-s3c2410/irqs.h
@@ -85,7 +85,7 @@
85#define IRQ_EINT23 S3C2410_IRQ(51) 85#define IRQ_EINT23 S3C2410_IRQ(51)
86 86
87 87
88#define IRQ_EINT(x) S3C2410_IRQ((x >= 4) ? (IRQ_EINT4 + (x) - 4) : (S3C2410_IRQ(0) + (x))) 88#define IRQ_EINT(x) (((x) >= 4) ? (IRQ_EINT4 + (x) - 4) : (IRQ_EINT0 + (x)))
89 89
90#define IRQ_LCD_FIFO S3C2410_IRQ(52) 90#define IRQ_LCD_FIFO S3C2410_IRQ(52)
91#define IRQ_LCD_FRAME S3C2410_IRQ(53) 91#define IRQ_LCD_FRAME S3C2410_IRQ(53)
diff --git a/include/asm-arm/kprobes.h b/include/asm-arm/kprobes.h
index 4e7bd32288ae..c042194d3ab5 100644
--- a/include/asm-arm/kprobes.h
+++ b/include/asm-arm/kprobes.h
@@ -20,7 +20,6 @@
20#include <linux/ptrace.h> 20#include <linux/ptrace.h>
21#include <linux/percpu.h> 21#include <linux/percpu.h>
22 22
23#define ARCH_SUPPORTS_KRETPROBES
24#define __ARCH_WANT_KPROBES_INSN_SLOT 23#define __ARCH_WANT_KPROBES_INSN_SLOT
25#define MAX_INSN_SIZE 2 24#define MAX_INSN_SIZE 2
26#define MAX_STACK_SIZE 64 /* 32 would probably be OK */ 25#define MAX_STACK_SIZE 64 /* 32 would probably be OK */
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h
index 33c83dd87965..2e5868bbe03b 100644
--- a/include/asm-arm/pgtable-nommu.h
+++ b/include/asm-arm/pgtable-nommu.h
@@ -92,6 +92,8 @@ extern unsigned int kobjsize(const void *objp);
92 92
93#define FIRST_USER_ADDRESS (0) 93#define FIRST_USER_ADDRESS (0)
94 94
95#include <asm-generic/pgtable.h>
96
95#else 97#else
96 98
97/* 99/*
diff --git a/include/asm-arm/plat-s3c/uncompress.h b/include/asm-arm/plat-s3c/uncompress.h
index b5e6208175d1..19b9eda39485 100644
--- a/include/asm-arm/plat-s3c/uncompress.h
+++ b/include/asm-arm/plat-s3c/uncompress.h
@@ -27,8 +27,8 @@ static void arch_detect_cpu(void);
27 27
28/* defines for UART registers */ 28/* defines for UART registers */
29 29
30#include "asm/plat-s3c/regs-serial.h" 30#include <asm/plat-s3c/regs-serial.h>
31#include "asm/plat-s3c/regs-watchdog.h" 31#include <asm/plat-s3c/regs-watchdog.h>
32 32
33/* working in physical space... */ 33/* working in physical space... */
34#undef S3C2410_WDOGREG 34#undef S3C2410_WDOGREG
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
index a4ce457199d3..75ec760f4c74 100644
--- a/include/asm-arm/proc-fns.h
+++ b/include/asm-arm/proc-fns.h
@@ -214,9 +214,9 @@
214#ifndef __ASSEMBLY__ 214#ifndef __ASSEMBLY__
215 215
216#ifndef MULTI_CPU 216#ifndef MULTI_CPU
217#include "asm/cpu-single.h" 217#include <asm/cpu-single.h>
218#else 218#else
219#include "asm/cpu-multi32.h" 219#include <asm/cpu-multi32.h>
220#endif 220#endif
221 221
222#include <asm/memory.h> 222#include <asm/memory.h>
diff --git a/include/asm-blackfin/mmu_context.h b/include/asm-blackfin/mmu_context.h
index b5eb67596ad5..f55ec3c23a92 100644
--- a/include/asm-blackfin/mmu_context.h
+++ b/include/asm-blackfin/mmu_context.h
@@ -73,7 +73,7 @@ static inline void destroy_context(struct mm_struct *mm)
73 struct sram_list_struct *tmp; 73 struct sram_list_struct *tmp;
74 74
75 if (current_l1_stack_save == mm->context.l1_stack_save) 75 if (current_l1_stack_save == mm->context.l1_stack_save)
76 current_l1_stack_save = 0; 76 current_l1_stack_save = NULL;
77 if (mm->context.l1_stack_save) 77 if (mm->context.l1_stack_save)
78 free_l1stack(); 78 free_l1stack();
79 79
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h
index e98167358d26..c18a399f6e3e 100644
--- a/include/asm-blackfin/unistd.h
+++ b/include/asm-blackfin/unistd.h
@@ -361,7 +361,7 @@
361#define __NR_epoll_pwait 346 361#define __NR_epoll_pwait 346
362#define __NR_utimensat 347 362#define __NR_utimensat 347
363#define __NR_signalfd 348 363#define __NR_signalfd 348
364#define __NR_timerfd 349 364#define __NR_timerfd_create 349
365#define __NR_eventfd 350 365#define __NR_eventfd 350
366#define __NR_pread64 351 366#define __NR_pread64 351
367#define __NR_pwrite64 352 367#define __NR_pwrite64 352
@@ -370,8 +370,10 @@
370#define __NR_get_robust_list 355 370#define __NR_get_robust_list 355
371#define __NR_fallocate 356 371#define __NR_fallocate 356
372#define __NR_semtimedop 357 372#define __NR_semtimedop 357
373#define __NR_timerfd_settime 358
374#define __NR_timerfd_gettime 359
373 375
374#define __NR_syscall 358 376#define __NR_syscall 360
375#define NR_syscalls __NR_syscall 377#define NR_syscalls __NR_syscall
376 378
377/* Old optional stuff no one actually uses */ 379/* Old optional stuff no one actually uses */
diff --git a/include/asm-cris/uaccess.h b/include/asm-cris/uaccess.h
index 69d48a2dc8e1..ea11eaf0e922 100644
--- a/include/asm-cris/uaccess.h
+++ b/include/asm-cris/uaccess.h
@@ -1,43 +1,6 @@
1/* 1/*
2 * Authors: Bjorn Wesen (bjornw@axis.com) 2 * Authors: Bjorn Wesen (bjornw@axis.com)
3 * Hans-Peter Nilsson (hp@axis.com) 3 * Hans-Peter Nilsson (hp@axis.com)
4 *
5 * $Log: uaccess.h,v $
6 * Revision 1.8 2001/10/29 13:01:48 bjornw
7 * Removed unused variable tmp2 in strnlen_user
8 *
9 * Revision 1.7 2001/10/02 12:44:52 hp
10 * Add support for 64-bit put_user/get_user
11 *
12 * Revision 1.6 2001/10/01 14:51:17 bjornw
13 * Added register prefixes and removed underscores
14 *
15 * Revision 1.5 2000/10/25 03:33:21 hp
16 * - Provide implementation for everything else but get_user and put_user;
17 * copying inline to/from user for constant length 0..16, 20, 24, and
18 * clearing for 0..4, 8, 12, 16, 20, 24, strncpy_from_user and strnlen_user
19 * always inline.
20 * - Constraints for destination addr in get_user cannot be memory, only reg.
21 * - Correct labels for PC at expected fault points.
22 * - Nits with assembly code.
23 * - Don't use statement expressions without value; use "do {} while (0)".
24 * - Return correct values from __generic_... functions.
25 *
26 * Revision 1.4 2000/09/12 16:28:25 bjornw
27 * * Removed comments from the get/put user asm code
28 * * Constrains for destination addr in put_user cannot be memory, only reg
29 *
30 * Revision 1.3 2000/09/12 14:30:20 bjornw
31 * MAX_ADDR_USER does not exist anymore
32 *
33 * Revision 1.2 2000/07/13 15:52:48 bjornw
34 * New user-access functions
35 *
36 * Revision 1.1.1.1 2000/07/10 16:32:31 bjornw
37 * CRIS architecture, working draft
38 *
39 *
40 *
41 */ 4 */
42 5
43/* Asm:s have been tweaked (within the domain of correctness) to give 6/* Asm:s have been tweaked (within the domain of correctness) to give
@@ -209,9 +172,9 @@ extern long __get_user_bad(void);
209/* More complex functions. Most are inline, but some call functions that 172/* More complex functions. Most are inline, but some call functions that
210 live in lib/usercopy.c */ 173 live in lib/usercopy.c */
211 174
212extern unsigned long __copy_user(void *to, const void *from, unsigned long n); 175extern unsigned long __copy_user(void __user *to, const void *from, unsigned long n);
213extern unsigned long __copy_user_zeroing(void *to, const void *from, unsigned long n); 176extern unsigned long __copy_user_zeroing(void *to, const void __user *from, unsigned long n);
214extern unsigned long __do_clear_user(void *to, unsigned long n); 177extern unsigned long __do_clear_user(void __user *to, unsigned long n);
215 178
216static inline unsigned long 179static inline unsigned long
217__generic_copy_to_user(void __user *to, const void *from, unsigned long n) 180__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
@@ -253,7 +216,7 @@ strncpy_from_user(char *dst, const char __user *src, long count)
253} 216}
254 217
255 218
256/* Note that if these expand awfully if made into switch constructs, so 219/* Note that these expand awfully if made into switch constructs, so
257 don't do that. */ 220 don't do that. */
258 221
259static inline unsigned long 222static inline unsigned long
@@ -407,19 +370,21 @@ __constant_clear_user(void __user *to, unsigned long n)
407 */ 370 */
408 371
409static inline unsigned long 372static inline unsigned long
410__generic_copy_from_user_nocheck(void *to, const void *from, unsigned long n) 373__generic_copy_from_user_nocheck(void *to, const void __user *from,
374 unsigned long n)
411{ 375{
412 return __copy_user_zeroing(to,from,n); 376 return __copy_user_zeroing(to,from,n);
413} 377}
414 378
415static inline unsigned long 379static inline unsigned long
416__generic_copy_to_user_nocheck(void *to, const void *from, unsigned long n) 380__generic_copy_to_user_nocheck(void __user *to, const void *from,
381 unsigned long n)
417{ 382{
418 return __copy_user(to,from,n); 383 return __copy_user(to,from,n);
419} 384}
420 385
421static inline unsigned long 386static inline unsigned long
422__generic_clear_user_nocheck(void *to, unsigned long n) 387__generic_clear_user_nocheck(void __user *to, unsigned long n)
423{ 388{
424 return __do_clear_user(to,n); 389 return __do_clear_user(to,n);
425} 390}
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
index 007cb16a6b5b..76398ef87e9b 100644
--- a/include/asm-cris/unistd.h
+++ b/include/asm-cris/unistd.h
@@ -329,12 +329,12 @@
329#define __NR_timerfd_create 322 329#define __NR_timerfd_create 322
330#define __NR_eventfd 323 330#define __NR_eventfd 323
331#define __NR_fallocate 324 331#define __NR_fallocate 324
332#define __NR_timerfd_settime 315 332#define __NR_timerfd_settime 325
333#define __NR_timerfd_gettime 316 333#define __NR_timerfd_gettime 326
334 334
335#ifdef __KERNEL__ 335#ifdef __KERNEL__
336 336
337#define NR_syscalls 325 337#define NR_syscalls 327
338 338
339#include <asm/arch/unistd.h> 339#include <asm/arch/unistd.h>
340 340
diff --git a/include/asm-h8300/uaccess.h b/include/asm-h8300/uaccess.h
index a22350ec271a..356068cd0879 100644
--- a/include/asm-h8300/uaccess.h
+++ b/include/asm-h8300/uaccess.h
@@ -91,22 +91,19 @@ extern int __put_user_bad(void);
91#define get_user(x, ptr) \ 91#define get_user(x, ptr) \
92({ \ 92({ \
93 int __gu_err = 0; \ 93 int __gu_err = 0; \
94 uint32_t __gu_val = 0; \ 94 typeof(*(ptr)) __gu_val = *ptr; \
95 switch (sizeof(*(ptr))) { \ 95 switch (sizeof(*(ptr))) { \
96 case 1: \ 96 case 1: \
97 case 2: \ 97 case 2: \
98 case 4: \ 98 case 4: \
99 __gu_val = *(ptr); \ 99 case 8: \
100 break; \
101 case 8: \
102 memcpy(&__gu_val, ptr, sizeof (*(ptr))); \
103 break; \ 100 break; \
104 default: \ 101 default: \
105 __gu_val = 0; \
106 __gu_err = __get_user_bad(); \ 102 __gu_err = __get_user_bad(); \
103 __gu_val = 0; \
107 break; \ 104 break; \
108 } \ 105 } \
109 (x) = (typeof(*(ptr)))__gu_val; \ 106 (x) = __gu_val; \
110 __gu_err; \ 107 __gu_err; \
111}) 108})
112#define __get_user(x, ptr) get_user(x, ptr) 109#define __get_user(x, ptr) get_user(x, ptr)
diff --git a/include/asm-ia64/Kbuild b/include/asm-ia64/Kbuild
index 4a1e48b9f403..eb24a3f47caa 100644
--- a/include/asm-ia64/Kbuild
+++ b/include/asm-ia64/Kbuild
@@ -3,7 +3,6 @@ include include/asm-generic/Kbuild.asm
3header-y += break.h 3header-y += break.h
4header-y += fpu.h 4header-y += fpu.h
5header-y += fpswa.h 5header-y += fpswa.h
6header-y += gcc_intrin.h
7header-y += ia64regs.h 6header-y += ia64regs.h
8header-y += intel_intrin.h 7header-y += intel_intrin.h
9header-y += intrinsics.h 8header-y += intrinsics.h
@@ -12,5 +11,6 @@ header-y += ptrace_offsets.h
12header-y += rse.h 11header-y += rse.h
13header-y += ucontext.h 12header-y += ucontext.h
14 13
14unifdef-y += gcc_intrin.h
15unifdef-y += perfmon.h 15unifdef-y += perfmon.h
16unifdef-y += ustack.h 16unifdef-y += ustack.h
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h
index 7e6e3779670a..76366dc9c1a0 100644
--- a/include/asm-ia64/hw_irq.h
+++ b/include/asm-ia64/hw_irq.h
@@ -93,6 +93,9 @@ extern __u8 isa_irq_to_vector_map[16];
93struct irq_cfg { 93struct irq_cfg {
94 ia64_vector vector; 94 ia64_vector vector;
95 cpumask_t domain; 95 cpumask_t domain;
96 cpumask_t old_domain;
97 unsigned move_cleanup_count;
98 u8 move_in_progress : 1;
96}; 99};
97extern spinlock_t vector_lock; 100extern spinlock_t vector_lock;
98extern struct irq_cfg irq_cfg[NR_IRQS]; 101extern struct irq_cfg irq_cfg[NR_IRQS];
@@ -106,12 +109,19 @@ extern int assign_irq_vector (int irq); /* allocate a free vector */
106extern void free_irq_vector (int vector); 109extern void free_irq_vector (int vector);
107extern int reserve_irq_vector (int vector); 110extern int reserve_irq_vector (int vector);
108extern void __setup_vector_irq(int cpu); 111extern void __setup_vector_irq(int cpu);
109extern int reassign_irq_vector(int irq, int cpu);
110extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); 112extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect);
111extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); 113extern void register_percpu_irq (ia64_vector vec, struct irqaction *action);
112extern int check_irq_used (int irq); 114extern int check_irq_used (int irq);
113extern void destroy_and_reserve_irq (unsigned int irq); 115extern void destroy_and_reserve_irq (unsigned int irq);
114 116
117#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG))
118extern int irq_prepare_move(int irq, int cpu);
119extern void irq_complete_move(unsigned int irq);
120#else
121static inline int irq_prepare_move(int irq, int cpu) { return 0; }
122static inline void irq_complete_move(unsigned int irq) {}
123#endif
124
115static inline void ia64_resend_irq(unsigned int vector) 125static inline void ia64_resend_irq(unsigned int vector)
116{ 126{
117 platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); 127 platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0);
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h
index a93ce9ef07ff..d03bf9ff68e3 100644
--- a/include/asm-ia64/kprobes.h
+++ b/include/asm-ia64/kprobes.h
@@ -82,7 +82,6 @@ struct kprobe_ctlblk {
82 struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ]; 82 struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ];
83}; 83};
84 84
85#define ARCH_SUPPORTS_KRETPROBES
86#define kretprobe_blacklist_size 0 85#define kretprobe_blacklist_size 0
87 86
88#define SLOT0_OPCODE_SHIFT (37) 87#define SLOT0_OPCODE_SHIFT (37)
@@ -118,14 +117,10 @@ struct arch_specific_insn {
118 unsigned short slot; 117 unsigned short slot;
119}; 118};
120 119
121extern int kprobes_fault_handler(struct pt_regs *regs, int trapnr); 120extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
122extern int kprobe_exceptions_notify(struct notifier_block *self, 121extern int kprobe_exceptions_notify(struct notifier_block *self,
123 unsigned long val, void *data); 122 unsigned long val, void *data);
124 123
125/* ia64 does not need this */
126static inline void jprobe_return(void)
127{
128}
129extern void invalidate_stacked_regs(void); 124extern void invalidate_stacked_regs(void);
130extern void flush_register_stack(void); 125extern void flush_register_stack(void);
131extern void arch_remove_kprobe(struct kprobe *p); 126extern void arch_remove_kprobe(struct kprobe *p);
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h
index 0bdce7dde1b0..4b2a8d40ebc5 100644
--- a/include/asm-ia64/ptrace.h
+++ b/include/asm-ia64/ptrace.h
@@ -233,8 +233,6 @@ struct switch_stack {
233#include <asm/current.h> 233#include <asm/current.h>
234#include <asm/page.h> 234#include <asm/page.h>
235 235
236#define __ARCH_SYS_PTRACE 1
237
238/* 236/*
239 * We use the ia64_psr(regs)->ri to determine which of the three 237 * We use the ia64_psr(regs)->ri to determine which of the three
240 * instructions in bundle (16 bytes) took the sample. Generate 238 * instructions in bundle (16 bytes) took the sample. Generate
@@ -314,6 +312,13 @@ struct switch_stack {
314 #define arch_ptrace_attach(child) \ 312 #define arch_ptrace_attach(child) \
315 ptrace_attach_sync_user_rbs(child) 313 ptrace_attach_sync_user_rbs(child)
316 314
315 #define arch_has_single_step() (1)
316 extern void user_enable_single_step(struct task_struct *);
317 extern void user_disable_single_step(struct task_struct *);
318
319 #define arch_has_block_step() (1)
320 extern void user_enable_block_step(struct task_struct *);
321
317#endif /* !__KERNEL__ */ 322#endif /* !__KERNEL__ */
318 323
319/* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */ 324/* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h
index 2251118894ae..f4904db3b057 100644
--- a/include/asm-ia64/sal.h
+++ b/include/asm-ia64/sal.h
@@ -807,6 +807,10 @@ static inline s64
807ia64_sal_physical_id_info(u16 *splid) 807ia64_sal_physical_id_info(u16 *splid)
808{ 808{
809 struct ia64_sal_retval isrv; 809 struct ia64_sal_retval isrv;
810
811 if (sal_revision < SAL_VERSION_CODE(3,2))
812 return -1;
813
810 SAL_CALL(isrv, SAL_PHYSICAL_ID_INFO, 0, 0, 0, 0, 0, 0, 0); 814 SAL_CALL(isrv, SAL_PHYSICAL_ID_INFO, 0, 0, 0, 0, 0, 0, 0);
811 if (splid) 815 if (splid)
812 *splid = isrv.v0; 816 *splid = isrv.v0;
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index 87f77b119317..e72ba563f102 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -320,13 +320,15 @@
320#define __NR_epoll_pwait 315 320#define __NR_epoll_pwait 315
321#define __NR_utimensat 316 321#define __NR_utimensat 316
322#define __NR_signalfd 317 322#define __NR_signalfd 317
323#define __NR_timerfd 318 323#define __NR_timerfd_create 318
324#define __NR_eventfd 319 324#define __NR_eventfd 319
325#define __NR_fallocate 320 325#define __NR_fallocate 320
326#define __NR_timerfd_settime 321
327#define __NR_timerfd_gettime 322
326 328
327#ifdef __KERNEL__ 329#ifdef __KERNEL__
328 330
329#define NR_syscalls 321 331#define NR_syscalls 323
330 332
331#define __ARCH_WANT_IPC_PARSE_VERSION 333#define __ARCH_WANT_IPC_PARSE_VERSION
332#define __ARCH_WANT_OLD_READDIR 334#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-m68knommu/machdep.h b/include/asm-m68knommu/machdep.h
index 1cf26d240d83..de9f47a51cc2 100644
--- a/include/asm-m68knommu/machdep.h
+++ b/include/asm-m68knommu/machdep.h
@@ -21,4 +21,6 @@ extern void (*mach_power_off)( void );
21 21
22extern void config_BSP(char *command, int len); 22extern void config_BSP(char *command, int len);
23 23
24extern void do_IRQ(int irq, struct pt_regs *fp);
25
24#endif /* _M68KNOMMU_MACHDEP_H */ 26#endif /* _M68KNOMMU_MACHDEP_H */
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h
index 27c2f9bb4dbd..4ba98b9c5d79 100644
--- a/include/asm-m68knommu/unistd.h
+++ b/include/asm-m68knommu/unistd.h
@@ -321,13 +321,15 @@
321#define __NR_epoll_pwait 315 321#define __NR_epoll_pwait 315
322#define __NR_utimensat 316 322#define __NR_utimensat 316
323#define __NR_signalfd 317 323#define __NR_signalfd 317
324#define __NR_timerfd 318 324#define __NR_timerfd_create 318
325#define __NR_eventfd 319 325#define __NR_eventfd 319
326#define __NR_fallocate 320 326#define __NR_fallocate 320
327#define __NR_timerfd_settime 321
328#define __NR_timerfd_gettime 322
327 329
328#ifdef __KERNEL__ 330#ifdef __KERNEL__
329 331
330#define NR_syscalls 321 332#define NR_syscalls 323
331 333
332#define __ARCH_WANT_IPC_PARSE_VERSION 334#define __ARCH_WANT_IPC_PARSE_VERSION
333#define __ARCH_WANT_OLD_READDIR 335#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h
index 4933b4947ed0..01e7eadc97e2 100644
--- a/include/asm-mips/cacheflush.h
+++ b/include/asm-mips/cacheflush.h
@@ -93,7 +93,7 @@ extern void (*flush_data_cache_page)(unsigned long addr);
93 clear_bit(PG_dcache_dirty, &(page)->flags) 93 clear_bit(PG_dcache_dirty, &(page)->flags)
94 94
95/* Run kernel code uncached, useful for cache probing functions. */ 95/* Run kernel code uncached, useful for cache probing functions. */
96unsigned long __init run_uncached(void *func); 96unsigned long run_uncached(void *func);
97 97
98extern void *kmap_coherent(struct page *page, unsigned long addr); 98extern void *kmap_coherent(struct page *page, unsigned long addr);
99extern void kunmap_coherent(void); 99extern void kunmap_coherent(void);
diff --git a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h
index 4d6bd5c31c7b..4374ab2adc75 100644
--- a/include/asm-mips/highmem.h
+++ b/include/asm-mips/highmem.h
@@ -39,7 +39,6 @@ extern pte_t *pkmap_page_table;
39 * easily, subsequent pte tables have to be allocated in one physical 39 * easily, subsequent pte tables have to be allocated in one physical
40 * chunk of RAM. 40 * chunk of RAM.
41 */ 41 */
42#define PKMAP_BASE (0xfe000000UL)
43#define LAST_PKMAP 1024 42#define LAST_PKMAP 1024
44#define LAST_PKMAP_MASK (LAST_PKMAP-1) 43#define LAST_PKMAP_MASK (LAST_PKMAP-1)
45#define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) 44#define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)
diff --git a/include/asm-mips/mach-ip27/cpu-feature-overrides.h b/include/asm-mips/mach-ip27/cpu-feature-overrides.h
index fe076380c189..7d3112b148d9 100644
--- a/include/asm-mips/mach-ip27/cpu-feature-overrides.h
+++ b/include/asm-mips/mach-ip27/cpu-feature-overrides.h
@@ -34,7 +34,11 @@
34#define cpu_has_64bits 1 34#define cpu_has_64bits 1
35 35
36#define cpu_has_4kex 1 36#define cpu_has_4kex 1
37#define cpu_has_3k_cache 0
38#define cpu_has_6k_cache 0
37#define cpu_has_4k_cache 1 39#define cpu_has_4k_cache 1
40#define cpu_has_8k_cache 0
41#define cpu_has_tx39_cache 0
38 42
39#define cpu_has_inclusive_pcaches 1 43#define cpu_has_inclusive_pcaches 1
40 44
diff --git a/include/asm-mips/mach-jmr3927/ioremap.h b/include/asm-mips/mach-jmr3927/ioremap.h
index aa131ad7f717..29989ff10d66 100644
--- a/include/asm-mips/mach-jmr3927/ioremap.h
+++ b/include/asm-mips/mach-jmr3927/ioremap.h
@@ -25,7 +25,7 @@ static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size,
25{ 25{
26#define TXX9_DIRECTMAP_BASE 0xff000000ul 26#define TXX9_DIRECTMAP_BASE 0xff000000ul
27 if (offset >= TXX9_DIRECTMAP_BASE && 27 if (offset >= TXX9_DIRECTMAP_BASE &&
28 offset < TXX9_DIRECTMAP_BASE + 0xf0000) 28 offset < TXX9_DIRECTMAP_BASE + 0xff0000)
29 return (void __iomem *)offset; 29 return (void __iomem *)offset;
30 return NULL; 30 return NULL;
31} 31}
diff --git a/include/asm-mips/mach-lasat/irq.h b/include/asm-mips/mach-lasat/irq.h
index da75f89f3723..3a282419d5f9 100644
--- a/include/asm-mips/mach-lasat/irq.h
+++ b/include/asm-mips/mach-lasat/irq.h
@@ -1,7 +1,7 @@
1#ifndef _ASM_MACH_LASAT_IRQ_H 1#ifndef _ASM_MACH_LASAT_IRQ_H
2#define _ASM_MACH_LASAT_IRQ_H 2#define _ASM_MACH_LASAT_IRQ_H
3 3
4#define LASAT_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 0) 4#define LASAT_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 2)
5 5
6#define LASAT_IRQ_BASE 8 6#define LASAT_IRQ_BASE 8
7#define LASAT_IRQ_END 23 7#define LASAT_IRQ_END 23
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
index a0947092d0e0..ceefe027c761 100644
--- a/include/asm-mips/pgtable-32.h
+++ b/include/asm-mips/pgtable-32.h
@@ -65,6 +65,8 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
65 65
66#define VMALLOC_START MAP_BASE 66#define VMALLOC_START MAP_BASE
67 67
68#define PKMAP_BASE (0xfe000000UL)
69
68#ifdef CONFIG_HIGHMEM 70#ifdef CONFIG_HIGHMEM
69# define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) 71# define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE)
70#else 72#else
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h
index a8fd16e1981f..d3bd5c5aa2ec 100644
--- a/include/asm-mips/time.h
+++ b/include/asm-mips/time.h
@@ -64,10 +64,11 @@ static inline int mips_clockevent_init(void)
64 * Initialize the count register as a clocksource 64 * Initialize the count register as a clocksource
65 */ 65 */
66#ifdef CONFIG_CEVT_R4K 66#ifdef CONFIG_CEVT_R4K
67extern void init_mips_clocksource(void); 67extern int init_mips_clocksource(void);
68#else 68#else
69static inline void init_mips_clocksource(void) 69static inline int init_mips_clocksource(void)
70{ 70{
71 return 0;
71} 72}
72#endif 73#endif
73 74
diff --git a/include/asm-mn10300/Kbuild b/include/asm-mn10300/Kbuild
index 79384c537dc6..c68e1680da01 100644
--- a/include/asm-mn10300/Kbuild
+++ b/include/asm-mn10300/Kbuild
@@ -1,5 +1 @@
1include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
2
3unifdef-y += termios.h
4unifdef-y += ptrace.h
5unifdef-y += page.h
diff --git a/include/asm-parisc/elf.h b/include/asm-parisc/elf.h
index ce0c0d844c7d..d0a4a8262818 100644
--- a/include/asm-parisc/elf.h
+++ b/include/asm-parisc/elf.h
@@ -204,7 +204,7 @@ typedef struct elf64_fdesc {
204/* 204/*
205 * The following definitions are those for 32-bit ELF binaries on a 32-bit 205 * The following definitions are those for 32-bit ELF binaries on a 32-bit
206 * kernel and for 64-bit binaries on a 64-bit kernel. To run 32-bit binaries 206 * kernel and for 64-bit binaries on a 64-bit kernel. To run 32-bit binaries
207 * on a 64-bit kernel, arch/parisc64/kernel/binfmt_elf32.c defines these 207 * on a 64-bit kernel, arch/parisc/kernel/binfmt_elf32.c defines these
208 * macros appropriately and then #includes binfmt_elf.c, which then includes 208 * macros appropriately and then #includes binfmt_elf.c, which then includes
209 * this file. 209 * this file.
210 */ 210 */
@@ -216,26 +216,25 @@ typedef struct elf64_fdesc {
216 * Note that this header file is used by default in fs/binfmt_elf.c. So 216 * Note that this header file is used by default in fs/binfmt_elf.c. So
217 * the following macros are for the default case. However, for the 64 217 * the following macros are for the default case. However, for the 64
218 * bit kernel we also support 32 bit parisc binaries. To do that 218 * bit kernel we also support 32 bit parisc binaries. To do that
219 * arch/parisc64/kernel/binfmt_elf32.c defines its own set of these 219 * arch/parisc/kernel/binfmt_elf32.c defines its own set of these
220 * macros, and then it includes fs/binfmt_elf.c to provide an alternate 220 * macros, and then it includes fs/binfmt_elf.c to provide an alternate
221 * elf binary handler for 32 bit binaries (on the 64 bit kernel). 221 * elf binary handler for 32 bit binaries (on the 64 bit kernel).
222 */ 222 */
223#ifdef CONFIG_64BIT 223#ifdef CONFIG_64BIT
224#define ELF_CLASS ELFCLASS64 224#define ELF_CLASS ELFCLASS64
225#else 225#else
226#define ELF_CLASS ELFCLASS32 226#define ELF_CLASS ELFCLASS32
227#endif 227#endif
228 228
229typedef unsigned long elf_greg_t; 229typedef unsigned long elf_greg_t;
230 230
231/* This yields a string that ld.so will use to load implementation 231/*
232 specific libraries for optimization. This is more specific in 232 * This yields a string that ld.so will use to load implementation
233 intent than poking at uname or /proc/cpuinfo. 233 * specific libraries for optimization. This is more specific in
234 234 * intent than poking at uname or /proc/cpuinfo.
235 For the moment, we have only optimizations for the Intel generations, 235 */
236 but that could change... */
237 236
238#define ELF_PLATFORM ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */) 237#define ELF_PLATFORM ("PARISC\0")
239 238
240#define SET_PERSONALITY(ex, ibcs2) \ 239#define SET_PERSONALITY(ex, ibcs2) \
241 current->personality = PER_LINUX; \ 240 current->personality = PER_LINUX; \
@@ -310,7 +309,7 @@ struct pt_regs; /* forward declaration... */
310#define ELF_OSABI ELFOSABI_LINUX 309#define ELF_OSABI ELFOSABI_LINUX
311 310
312/* %r23 is set by ld.so to a pointer to a function which might be 311/* %r23 is set by ld.so to a pointer to a function which might be
313 registered using atexit. This provides a mean for the dynamic 312 registered using atexit. This provides a means for the dynamic
314 linker to call DT_FINI functions for shared libraries that have 313 linker to call DT_FINI functions for shared libraries that have
315 been loaded before the code runs. 314 been loaded before the code runs.
316 315
@@ -339,6 +338,5 @@ struct pt_regs; /* forward declaration... */
339 but it's not easy, and we've already done it here. */ 338 but it's not easy, and we've already done it here. */
340 339
341#define ELF_HWCAP 0 340#define ELF_HWCAP 0
342/* (boot_cpu_data.x86_capability) */
343 341
344#endif 342#endif
diff --git a/include/asm-parisc/fixmap.h b/include/asm-parisc/fixmap.h
index a5caf4b122b7..de3fe3a18229 100644
--- a/include/asm-parisc/fixmap.h
+++ b/include/asm-parisc/fixmap.h
@@ -20,4 +20,11 @@
20#define KERNEL_MAP_START (GATEWAY_PAGE_SIZE) 20#define KERNEL_MAP_START (GATEWAY_PAGE_SIZE)
21#define KERNEL_MAP_END (TMPALIAS_MAP_START) 21#define KERNEL_MAP_END (TMPALIAS_MAP_START)
22 22
23#endif 23#ifndef __ASSEMBLY__
24extern void *vmalloc_start;
25#define PCXL_DMA_MAP_SIZE (8*1024*1024)
26#define VMALLOC_START ((unsigned long)vmalloc_start)
27#define VMALLOC_END (KERNEL_MAP_END)
28#endif /*__ASSEMBLY__*/
29
30#endif /*_ASM_FIXMAP_H*/
diff --git a/include/asm-parisc/futex.h b/include/asm-parisc/futex.h
index dbee6e60aa81..fdc6d055ef7f 100644
--- a/include/asm-parisc/futex.h
+++ b/include/asm-parisc/futex.h
@@ -56,6 +56,12 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
56 int err = 0; 56 int err = 0;
57 int uval; 57 int uval;
58 58
59 /* futex.c wants to do a cmpxchg_inatomic on kernel NULL, which is
60 * our gateway page, and causes no end of trouble...
61 */
62 if (segment_eq(KERNEL_DS, get_fs()) && !uaddr)
63 return -EFAULT;
64
59 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) 65 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
60 return -EFAULT; 66 return -EFAULT;
61 67
@@ -67,5 +73,5 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
67 return uval; 73 return uval;
68} 74}
69 75
70#endif 76#endif /*__KERNEL__*/
71#endif 77#endif /*_ASM_PARISC_FUTEX_H*/
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
index deda8c311373..9eaa794c3e4a 100644
--- a/include/asm-parisc/pdc.h
+++ b/include/asm-parisc/pdc.h
@@ -645,8 +645,7 @@ int pdc_soft_power_button(int sw_control);
645void pdc_io_reset(void); 645void pdc_io_reset(void);
646void pdc_io_reset_devices(void); 646void pdc_io_reset_devices(void);
647int pdc_iodc_getc(void); 647int pdc_iodc_getc(void);
648int pdc_iodc_print(unsigned char *str, unsigned count); 648int pdc_iodc_print(const unsigned char *str, unsigned count);
649void pdc_printf(const char *fmt, ...);
650 649
651void pdc_emergency_unlock(void); 650void pdc_emergency_unlock(void);
652int pdc_sti_call(unsigned long func, unsigned long flags, 651int pdc_sti_call(unsigned long func, unsigned long flags,
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h
index 3996dfc30a3f..fc987a1c12a8 100644
--- a/include/asm-parisc/pgalloc.h
+++ b/include/asm-parisc/pgalloc.h
@@ -138,10 +138,10 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
138 free_page((unsigned long)pte); 138 free_page((unsigned long)pte);
139} 139}
140 140
141static inline void pte_free_kernel(struct mm_struct *mm, struct page *pte) 141static inline void pte_free(struct mm_struct *mm, struct page *pte)
142{ 142{
143 pgtable_page_dtor(pte); 143 pgtable_page_dtor(pte);
144 pte_free_kernel(page_address((pte)); 144 pte_free_kernel(mm, page_address(pte));
145} 145}
146 146
147#define check_pgt_cache() do { } while (0) 147#define check_pgt_cache() do { } while (0)
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h
index cd0fa4f73320..dc86adbec916 100644
--- a/include/asm-parisc/pgtable.h
+++ b/include/asm-parisc/pgtable.h
@@ -116,14 +116,6 @@
116 116
117#define FIRST_USER_ADDRESS 0 117#define FIRST_USER_ADDRESS 0
118 118
119#ifndef __ASSEMBLY__
120extern void *vmalloc_start;
121#define PCXL_DMA_MAP_SIZE (8*1024*1024)
122#define VMALLOC_START ((unsigned long)vmalloc_start)
123/* this is a fixmap remnant, see fixmap.h */
124#define VMALLOC_END (KERNEL_MAP_END)
125#endif
126
127/* NB: The tlb miss handlers make certain assumptions about the order */ 119/* NB: The tlb miss handlers make certain assumptions about the order */
128/* of the following bits, so be careful (One example, bits 25-31 */ 120/* of the following bits, so be careful (One example, bits 25-31 */
129/* are moved together in one instruction). */ 121/* are moved together in one instruction). */
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h
index 081b4ae61866..a7d857f0e4f4 100644
--- a/include/asm-parisc/unistd.h
+++ b/include/asm-parisc/unistd.h
@@ -798,8 +798,11 @@
798#define __NR_timerfd (__NR_Linux + 303) 798#define __NR_timerfd (__NR_Linux + 303)
799#define __NR_eventfd (__NR_Linux + 304) 799#define __NR_eventfd (__NR_Linux + 304)
800#define __NR_fallocate (__NR_Linux + 305) 800#define __NR_fallocate (__NR_Linux + 305)
801#define __NR_timerfd_create (__NR_Linux + 306)
802#define __NR_timerfd_settime (__NR_Linux + 307)
803#define __NR_timerfd_gettime (__NR_Linux + 308)
801 804
802#define __NR_Linux_syscalls (__NR_fallocate + 1) 805#define __NR_Linux_syscalls (__NR_timerfd_gettime + 1)
803 806
804 807
805#define __IGNORE_select /* newselect */ 808#define __IGNORE_select /* newselect */
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h
index afabad230dbb..d0e7701fa1f6 100644
--- a/include/asm-powerpc/kprobes.h
+++ b/include/asm-powerpc/kprobes.h
@@ -80,7 +80,6 @@ typedef unsigned int kprobe_opcode_t;
80#define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) 80#define is_trap(instr) (IS_TW(instr) || IS_TWI(instr))
81#endif 81#endif
82 82
83#define ARCH_SUPPORTS_KRETPROBES
84#define flush_insn_slot(p) do { } while (0) 83#define flush_insn_slot(p) do { } while (0)
85#define kretprobe_blacklist_size 0 84#define kretprobe_blacklist_size 0
86 85
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
index d1332bbcbd9b..2c79f550272b 100644
--- a/include/asm-powerpc/pgtable-ppc32.h
+++ b/include/asm-powerpc/pgtable-ppc32.h
@@ -339,14 +339,6 @@ extern int icache_44x_need_flush;
339#define _PMD_PAGE_MASK 0x000c 339#define _PMD_PAGE_MASK 0x000c
340#define _PMD_PAGE_8M 0x000c 340#define _PMD_PAGE_8M 0x000c
341 341
342/*
343 * The 8xx TLB miss handler allegedly sets _PAGE_ACCESSED in the PTE
344 * for an address even if _PAGE_PRESENT is not set, as a performance
345 * optimization. This is a bug if you ever want to use swap unless
346 * _PAGE_ACCESSED is 2, which it isn't, or unless you have 8xx-specific
347 * definitions for __swp_entry etc. below, which would be gross.
348 * -- paulus
349 */
350#define _PTE_NONE_MASK _PAGE_ACCESSED 342#define _PTE_NONE_MASK _PAGE_ACCESSED
351 343
352#else /* CONFIG_6xx */ 344#else /* CONFIG_6xx */
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h
index 0d6238987df8..edc0cfd7f6e2 100644
--- a/include/asm-powerpc/reg.h
+++ b/include/asm-powerpc/reg.h
@@ -153,6 +153,9 @@
153#define CTRL_RUNLATCH 0x1 153#define CTRL_RUNLATCH 0x1
154#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ 154#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
155#define DABR_TRANSLATION (1UL << 2) 155#define DABR_TRANSLATION (1UL << 2)
156#define SPRN_DABRX 0x3F7 /* Data Address Breakpoint Register Extension */
157#define DABRX_USER (1UL << 0)
158#define DABRX_KERNEL (1UL << 1)
156#define SPRN_DAR 0x013 /* Data Address Register */ 159#define SPRN_DAR 0x013 /* Data Address Register */
157#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ 160#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
158#define DSISR_NOHPTE 0x40000000 /* no translation found */ 161#define DSISR_NOHPTE 0x40000000 /* no translation found */
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index 69347bdbb401..70435d32129a 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -299,14 +299,6 @@ extern unsigned long ioremap_bot, ioremap_base;
299#define _PMD_PAGE_MASK 0x000c 299#define _PMD_PAGE_MASK 0x000c
300#define _PMD_PAGE_8M 0x000c 300#define _PMD_PAGE_8M 0x000c
301 301
302/*
303 * The 8xx TLB miss handler allegedly sets _PAGE_ACCESSED in the PTE
304 * for an address even if _PAGE_PRESENT is not set, as a performance
305 * optimization. This is a bug if you ever want to use swap unless
306 * _PAGE_ACCESSED is 2, which it isn't, or unless you have 8xx-specific
307 * definitions for __swp_entry etc. below, which would be gross.
308 * -- paulus
309 */
310#define _PTE_NONE_MASK _PAGE_ACCESSED 302#define _PTE_NONE_MASK _PAGE_ACCESSED
311 303
312#else /* CONFIG_6xx */ 304#else /* CONFIG_6xx */
diff --git a/include/asm-s390/kprobes.h b/include/asm-s390/kprobes.h
index 948db3d0d05c..330f68caffe4 100644
--- a/include/asm-s390/kprobes.h
+++ b/include/asm-s390/kprobes.h
@@ -46,7 +46,6 @@ typedef u16 kprobe_opcode_t;
46 ? (MAX_STACK_SIZE) \ 46 ? (MAX_STACK_SIZE) \
47 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) 47 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
48 48
49#define ARCH_SUPPORTS_KRETPROBES
50#define kretprobe_blacklist_size 0 49#define kretprobe_blacklist_size 0
51 50
52#define KPROBE_SWAP_INST 0x10 51#define KPROBE_SWAP_INST 0x10
diff --git a/include/asm-sh/byteorder.h b/include/asm-sh/byteorder.h
index 0eb9904b6545..4c13e6117563 100644
--- a/include/asm-sh/byteorder.h
+++ b/include/asm-sh/byteorder.h
@@ -11,13 +11,13 @@
11static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) 11static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
12{ 12{
13 __asm__( 13 __asm__(
14#ifdef CONFIG_SUPERH32 14#ifdef __SH5__
15 "byterev %0, %0\n\t"
16 "shari %0, 32, %0"
17#else
15 "swap.b %0, %0\n\t" 18 "swap.b %0, %0\n\t"
16 "swap.w %0, %0\n\t" 19 "swap.w %0, %0\n\t"
17 "swap.b %0, %0" 20 "swap.b %0, %0"
18#else
19 "byterev %0, %0\n\t"
20 "shari %0, 32, %0"
21#endif 21#endif
22 : "=r" (x) 22 : "=r" (x)
23 : "0" (x)); 23 : "0" (x));
@@ -28,12 +28,11 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
28static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) 28static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
29{ 29{
30 __asm__( 30 __asm__(
31#ifdef CONFIG_SUPERH32 31#ifdef __SH5__
32 "swap.b %0, %0"
33#else
34 "byterev %0, %0\n\t" 32 "byterev %0, %0\n\t"
35 "shari %0, 32, %0" 33 "shari %0, 32, %0"
36 34#else
35 "swap.b %0, %0"
37#endif 36#endif
38 : "=r" (x) 37 : "=r" (x)
39 : "0" (x)); 38 : "0" (x));
diff --git a/include/asm-sh/delay.h b/include/asm-sh/delay.h
index d5d464041003..4b16bf9b56bd 100644
--- a/include/asm-sh/delay.h
+++ b/include/asm-sh/delay.h
@@ -15,7 +15,6 @@ extern void __ndelay(unsigned long nsecs);
15extern void __const_udelay(unsigned long xloops); 15extern void __const_udelay(unsigned long xloops);
16extern void __delay(unsigned long loops); 16extern void __delay(unsigned long loops);
17 17
18#ifdef CONFIG_SUPERH32
19#define udelay(n) (__builtin_constant_p(n) ? \ 18#define udelay(n) (__builtin_constant_p(n) ? \
20 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \ 19 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
21 __udelay(n)) 20 __udelay(n))
@@ -23,9 +22,5 @@ extern void __delay(unsigned long loops);
23#define ndelay(n) (__builtin_constant_p(n) ? \ 22#define ndelay(n) (__builtin_constant_p(n) ? \
24 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ 23 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
25 __ndelay(n)) 24 __ndelay(n))
26#else
27extern void udelay(unsigned long usecs);
28extern void ndelay(unsigned long nsecs);
29#endif
30 25
31#endif /* __ASM_SH_DELAY_H */ 26#endif /* __ASM_SH_DELAY_H */
diff --git a/include/asm-sh/posix_types.h b/include/asm-sh/posix_types.h
index 4b9d11c9fc77..4eeb723aee7e 100644
--- a/include/asm-sh/posix_types.h
+++ b/include/asm-sh/posix_types.h
@@ -4,4 +4,10 @@
4# else 4# else
5# include "posix_types_64.h" 5# include "posix_types_64.h"
6# endif 6# endif
7#else
8# ifdef __SH5__
9# include "posix_types_64.h"
10# else
11# include "posix_types_32.h"
12# endif
7#endif /* __KERNEL__ */ 13#endif /* __KERNEL__ */
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h
index 45e47c159a6e..4e08210cd4c2 100644
--- a/include/asm-sparc/system.h
+++ b/include/asm-sparc/system.h
@@ -44,6 +44,8 @@ extern enum sparc_cpu sparc_cpu_model;
44 44
45#define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */ 45#define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */
46 46
47extern char reboot_command[];
48
47extern struct thread_info *current_set[NR_CPUS]; 49extern struct thread_info *current_set[NR_CPUS];
48 50
49extern unsigned long empty_bad_page; 51extern unsigned long empty_bad_page;
diff --git a/include/asm-sparc64/backoff.h b/include/asm-sparc64/backoff.h
index dadd6c385c6c..fa1fdf67e350 100644
--- a/include/asm-sparc64/backoff.h
+++ b/include/asm-sparc64/backoff.h
@@ -12,7 +12,8 @@
12 mov reg, tmp; \ 12 mov reg, tmp; \
1388: brnz,pt tmp, 88b; \ 1388: brnz,pt tmp, 88b; \
14 sub tmp, 1, tmp; \ 14 sub tmp, 1, tmp; \
15 cmp reg, BACKOFF_LIMIT; \ 15 set BACKOFF_LIMIT, tmp; \
16 cmp reg, tmp; \
16 bg,pn %xcc, label; \ 17 bg,pn %xcc, label; \
17 nop; \ 18 nop; \
18 ba,pt %xcc, label; \ 19 ba,pt %xcc, label; \
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h
index 542421460a12..532975ecfe10 100644
--- a/include/asm-sparc64/cpudata.h
+++ b/include/asm-sparc64/cpudata.h
@@ -86,6 +86,8 @@ extern struct trap_per_cpu trap_block[NR_CPUS];
86extern void init_cur_cpu_trap(struct thread_info *); 86extern void init_cur_cpu_trap(struct thread_info *);
87extern void setup_tba(void); 87extern void setup_tba(void);
88extern int ncpus_probed; 88extern int ncpus_probed;
89extern void __init cpu_probe(void);
90extern const struct seq_operations cpuinfo_op;
89 91
90extern unsigned long real_hard_smp_processor_id(void); 92extern unsigned long real_hard_smp_processor_id(void);
91 93
diff --git a/include/asm-sparc64/dcu.h b/include/asm-sparc64/dcu.h
index ecbed2ae548f..0f704e106a1b 100644
--- a/include/asm-sparc64/dcu.h
+++ b/include/asm-sparc64/dcu.h
@@ -1,26 +1,27 @@
1/* $Id: dcu.h,v 1.2 2001/03/01 23:23:33 davem Exp $ */
2#ifndef _SPARC64_DCU_H 1#ifndef _SPARC64_DCU_H
3#define _SPARC64_DCU_H 2#define _SPARC64_DCU_H
4 3
4#include <linux/const.h>
5
5/* UltraSparc-III Data Cache Unit Control Register */ 6/* UltraSparc-III Data Cache Unit Control Register */
6#define DCU_CP 0x0002000000000000 /* Physical Cache Enable w/o mmu*/ 7#define DCU_CP _AC(0x0002000000000000,UL) /* Phys Cache Enable w/o mmu */
7#define DCU_CV 0x0001000000000000 /* Virtual Cache Enable w/o mmu */ 8#define DCU_CV _AC(0x0001000000000000,UL) /* Virt Cache Enable w/o mmu */
8#define DCU_ME 0x0000800000000000 /* NC-store Merging Enable */ 9#define DCU_ME _AC(0x0000800000000000,UL) /* NC-store Merging Enable */
9#define DCU_RE 0x0000400000000000 /* RAW bypass Enable */ 10#define DCU_RE _AC(0x0000400000000000,UL) /* RAW bypass Enable */
10#define DCU_PE 0x0000200000000000 /* PCache Enable */ 11#define DCU_PE _AC(0x0000200000000000,UL) /* PCache Enable */
11#define DCU_HPE 0x0000100000000000 /* HW prefetch Enable */ 12#define DCU_HPE _AC(0x0000100000000000,UL) /* HW prefetch Enable */
12#define DCU_SPE 0x0000080000000000 /* SW prefetch Enable */ 13#define DCU_SPE _AC(0x0000080000000000,UL) /* SW prefetch Enable */
13#define DCU_SL 0x0000040000000000 /* Secondary load steering Enab */ 14#define DCU_SL _AC(0x0000040000000000,UL) /* Secondary ld-steering Enab*/
14#define DCU_WE 0x0000020000000000 /* WCache enable */ 15#define DCU_WE _AC(0x0000020000000000,UL) /* WCache enable */
15#define DCU_PM 0x000001fe00000000 /* PA Watchpoint Byte Mask */ 16#define DCU_PM _AC(0x000001fe00000000,UL) /* PA Watchpoint Byte Mask */
16#define DCU_VM 0x00000001fe000000 /* VA Watchpoint Byte Mask */ 17#define DCU_VM _AC(0x00000001fe000000,UL) /* VA Watchpoint Byte Mask */
17#define DCU_PR 0x0000000001000000 /* PA Watchpoint Read Enable */ 18#define DCU_PR _AC(0x0000000001000000,UL) /* PA Watchpoint Read Enable */
18#define DCU_PW 0x0000000000800000 /* PA Watchpoint Write Enable */ 19#define DCU_PW _AC(0x0000000000800000,UL) /* PA Watchpoint Write Enable*/
19#define DCU_VR 0x0000000000400000 /* VA Watchpoint Read Enable */ 20#define DCU_VR _AC(0x0000000000400000,UL) /* VA Watchpoint Read Enable */
20#define DCU_VW 0x0000000000200000 /* VA Watchpoint Write Enable */ 21#define DCU_VW _AC(0x0000000000200000,UL) /* VA Watchpoint Write Enable*/
21#define DCU_DM 0x0000000000000008 /* DMMU Enable */ 22#define DCU_DM _AC(0x0000000000000008,UL) /* DMMU Enable */
22#define DCU_IM 0x0000000000000004 /* IMMU Enable */ 23#define DCU_IM _AC(0x0000000000000004,UL) /* IMMU Enable */
23#define DCU_DC 0x0000000000000002 /* Data Cache Enable */ 24#define DCU_DC _AC(0x0000000000000002,UL) /* Data Cache Enable */
24#define DCU_IC 0x0000000000000001 /* Instruction Cache Enable */ 25#define DCU_IC _AC(0x0000000000000001,UL) /* Instruction Cache Enable */
25 26
26#endif /* _SPARC64_DCU_H */ 27#endif /* _SPARC64_DCU_H */
diff --git a/include/asm-sparc64/hvtramp.h b/include/asm-sparc64/hvtramp.h
index c7dd6ad056df..b2b9b947b3a4 100644
--- a/include/asm-sparc64/hvtramp.h
+++ b/include/asm-sparc64/hvtramp.h
@@ -16,7 +16,7 @@ struct hvtramp_descr {
16 __u64 fault_info_va; 16 __u64 fault_info_va;
17 __u64 fault_info_pa; 17 __u64 fault_info_pa;
18 __u64 thread_reg; 18 __u64 thread_reg;
19 struct hvtramp_mapping maps[2]; 19 struct hvtramp_mapping maps[1];
20}; 20};
21 21
22extern void hv_cpu_startup(unsigned long hvdescr_pa); 22extern void hv_cpu_startup(unsigned long hvdescr_pa);
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h
index 30cb76b47be1..0bb9bf531745 100644
--- a/include/asm-sparc64/irq.h
+++ b/include/asm-sparc64/irq.h
@@ -64,6 +64,7 @@ extern unsigned char virt_irq_alloc(unsigned int dev_handle,
64extern void virt_irq_free(unsigned int virt_irq); 64extern void virt_irq_free(unsigned int virt_irq);
65#endif 65#endif
66 66
67extern void __init init_IRQ(void);
67extern void fixup_irqs(void); 68extern void fixup_irqs(void);
68 69
69static inline void set_softint(unsigned long bits) 70static inline void set_softint(unsigned long bits)
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h
index 7237dd87663e..5879d71afdaa 100644
--- a/include/asm-sparc64/kprobes.h
+++ b/include/asm-sparc64/kprobes.h
@@ -14,8 +14,6 @@ typedef u32 kprobe_opcode_t;
14 14
15#define arch_remove_kprobe(p) do {} while (0) 15#define arch_remove_kprobe(p) do {} while (0)
16 16
17#define ARCH_SUPPORTS_KRETPROBES
18
19#define flush_insn_slot(p) \ 17#define flush_insn_slot(p) \
20do { flushi(&(p)->ainsn.insn[0]); \ 18do { flushi(&(p)->ainsn.insn[0]); \
21 flushi(&(p)->ainsn.insn[1]); \ 19 flushi(&(p)->ainsn.insn[1]); \
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index 3167ccff64f8..549e45266b68 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -23,9 +23,9 @@
23#include <asm/page.h> 23#include <asm/page.h>
24#include <asm/processor.h> 24#include <asm/processor.h>
25 25
26/* The kernel image occupies 0x4000000 to 0x1000000 (4MB --> 32MB). 26/* The kernel image occupies 0x4000000 to 0x6000000 (4MB --> 96MB).
27 * The page copy blockops can use 0x2000000 to 0x4000000. 27 * The page copy blockops can use 0x6000000 to 0x8000000.
28 * The TSB is mapped in the 0x4000000 to 0x6000000 range. 28 * The TSB is mapped in the 0x8000000 to 0xa000000 range.
29 * The PROM resides in an area spanning 0xf0000000 to 0x100000000. 29 * The PROM resides in an area spanning 0xf0000000 to 0x100000000.
30 * The vmalloc area spans 0x100000000 to 0x200000000. 30 * The vmalloc area spans 0x100000000 to 0x200000000.
31 * Since modules need to be in the lowest 32-bits of the address space, 31 * Since modules need to be in the lowest 32-bits of the address space,
@@ -33,8 +33,8 @@
33 * There is a single static kernel PMD which maps from 0x0 to address 33 * There is a single static kernel PMD which maps from 0x0 to address
34 * 0x400000000. 34 * 0x400000000.
35 */ 35 */
36#define TLBTEMP_BASE _AC(0x0000000002000000,UL) 36#define TLBTEMP_BASE _AC(0x0000000006000000,UL)
37#define TSBMAP_BASE _AC(0x0000000004000000,UL) 37#define TSBMAP_BASE _AC(0x0000000008000000,UL)
38#define MODULES_VADDR _AC(0x0000000010000000,UL) 38#define MODULES_VADDR _AC(0x0000000010000000,UL)
39#define MODULES_LEN _AC(0x00000000e0000000,UL) 39#define MODULES_LEN _AC(0x00000000e0000000,UL)
40#define MODULES_END _AC(0x00000000f0000000,UL) 40#define MODULES_END _AC(0x00000000f0000000,UL)
@@ -761,6 +761,8 @@ extern unsigned long get_fb_unmapped_area(struct file *filp, unsigned long,
761extern void pgtable_cache_init(void); 761extern void pgtable_cache_init(void);
762extern void sun4v_register_fault_status(void); 762extern void sun4v_register_fault_status(void);
763extern void sun4v_ktsb_register(void); 763extern void sun4v_ktsb_register(void);
764extern void __init cheetah_ecache_flush_init(void);
765extern void sun4v_patch_tlb_handlers(void);
764 766
765extern unsigned long cmdline_memory_size; 767extern unsigned long cmdline_memory_size;
766 768
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
index 8da484c19822..885b6a1dcae4 100644
--- a/include/asm-sparc64/processor.h
+++ b/include/asm-sparc64/processor.h
@@ -37,6 +37,9 @@
37#endif 37#endif
38 38
39#define TASK_SIZE ((unsigned long)-VPTE_SIZE) 39#define TASK_SIZE ((unsigned long)-VPTE_SIZE)
40#define TASK_SIZE_OF(tsk) \
41 (test_tsk_thread_flag(tsk,TIF_32BIT) ? \
42 (1UL << 32UL) : TASK_SIZE)
40#ifdef __KERNEL__ 43#ifdef __KERNEL__
41 44
42#define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE) 45#define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE)
diff --git a/include/asm-sparc64/spitfire.h b/include/asm-sparc64/spitfire.h
index 63b7040e8134..985ea7e31992 100644
--- a/include/asm-sparc64/spitfire.h
+++ b/include/asm-sparc64/spitfire.h
@@ -63,6 +63,8 @@ extern void cheetah_enable_pcache(void);
63 SPITFIRE_HIGHEST_LOCKED_TLBENT : \ 63 SPITFIRE_HIGHEST_LOCKED_TLBENT : \
64 CHEETAH_HIGHEST_LOCKED_TLBENT) 64 CHEETAH_HIGHEST_LOCKED_TLBENT)
65 65
66extern int num_kernel_image_mappings;
67
66/* The data cache is write through, so this just invalidates the 68/* The data cache is write through, so this just invalidates the
67 * specified line. 69 * specified line.
68 */ 70 */
diff --git a/include/asm-sparc64/stacktrace.h b/include/asm-sparc64/stacktrace.h
new file mode 100644
index 000000000000..6cee39adf6d6
--- /dev/null
+++ b/include/asm-sparc64/stacktrace.h
@@ -0,0 +1,6 @@
1#ifndef _SPARC64_STACKTRACE_H
2#define _SPARC64_STACKTRACE_H
3
4extern void stack_trace_flush(void);
5
6#endif /* _SPARC64_STACKTRACE_H */
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h
index ed91a5d8d4f0..53eae091a171 100644
--- a/include/asm-sparc64/system.h
+++ b/include/asm-sparc64/system.h
@@ -30,6 +30,8 @@ enum sparc_cpu {
30#define ARCH_SUN4C_SUN4 0 30#define ARCH_SUN4C_SUN4 0
31#define ARCH_SUN4 0 31#define ARCH_SUN4 0
32 32
33extern char reboot_command[];
34
33/* These are here in an effort to more fully work around Spitfire Errata 35/* These are here in an effort to more fully work around Spitfire Errata
34 * #51. Essentially, if a memory barrier occurs soon after a mispredicted 36 * #51. Essentially, if a memory barrier occurs soon after a mispredicted
35 * branch, the chip can stop executing instructions until a trap occurs. 37 * branch, the chip can stop executing instructions until a trap occurs.
diff --git a/include/asm-sparc64/timer.h b/include/asm-sparc64/timer.h
index ccbd69448866..5b779fd1f788 100644
--- a/include/asm-sparc64/timer.h
+++ b/include/asm-sparc64/timer.h
@@ -1,14 +1,13 @@
1/* $Id: timer.h,v 1.3 2000/05/09 17:40:15 davem Exp $ 1/* timer.h: System timer definitions for sun5.
2 * timer.h: System timer definitions for sun5.
3 * 2 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1997, 2008 David S. Miller (davem@davemloft.net)
5 */ 4 */
6 5
7#ifndef _SPARC64_TIMER_H 6#ifndef _SPARC64_TIMER_H
8#define _SPARC64_TIMER_H 7#define _SPARC64_TIMER_H
9 8
10#include <linux/types.h> 9#include <linux/types.h>
11 10#include <linux/init.h>
12 11
13struct sparc64_tick_ops { 12struct sparc64_tick_ops {
14 unsigned long (*get_tick)(void); 13 unsigned long (*get_tick)(void);
@@ -25,5 +24,7 @@ struct sparc64_tick_ops {
25extern struct sparc64_tick_ops *tick_ops; 24extern struct sparc64_tick_ops *tick_ops;
26 25
27extern unsigned long sparc64_get_clock_tick(unsigned int cpu); 26extern unsigned long sparc64_get_clock_tick(unsigned int cpu);
27extern void __devinit setup_sparc64_timer(void);
28extern void __init time_init(void);
28 29
29#endif /* _SPARC64_TIMER_H */ 30#endif /* _SPARC64_TIMER_H */
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild
index b04a7ff46df1..3b8160a2b47e 100644
--- a/include/asm-x86/Kbuild
+++ b/include/asm-x86/Kbuild
@@ -16,7 +16,6 @@ unifdef-y += ist.h
16unifdef-y += mce.h 16unifdef-y += mce.h
17unifdef-y += msr.h 17unifdef-y += msr.h
18unifdef-y += mtrr.h 18unifdef-y += mtrr.h
19unifdef-y += page.h
20unifdef-y += posix_types_32.h 19unifdef-y += posix_types_32.h
21unifdef-y += posix_types_64.h 20unifdef-y += posix_types_64.h
22unifdef-y += ptrace.h 21unifdef-y += ptrace.h
diff --git a/include/asm-x86/cmpxchg_32.h b/include/asm-x86/cmpxchg_32.h
index cea1dae288a7..959fad00dff5 100644
--- a/include/asm-x86/cmpxchg_32.h
+++ b/include/asm-x86/cmpxchg_32.h
@@ -269,22 +269,26 @@ static inline unsigned long cmpxchg_386(volatile void *ptr, unsigned long old,
269({ \ 269({ \
270 __typeof__(*(ptr)) __ret; \ 270 __typeof__(*(ptr)) __ret; \
271 if (likely(boot_cpu_data.x86 > 3)) \ 271 if (likely(boot_cpu_data.x86 > 3)) \
272 __ret = __cmpxchg((ptr), (unsigned long)(o), \ 272 __ret = (__typeof__(*(ptr)))__cmpxchg((ptr), \
273 (unsigned long)(n), sizeof(*(ptr))); \ 273 (unsigned long)(o), (unsigned long)(n), \
274 sizeof(*(ptr))); \
274 else \ 275 else \
275 __ret = cmpxchg_386((ptr), (unsigned long)(o), \ 276 __ret = (__typeof__(*(ptr)))cmpxchg_386((ptr), \
276 (unsigned long)(n), sizeof(*(ptr))); \ 277 (unsigned long)(o), (unsigned long)(n), \
278 sizeof(*(ptr))); \
277 __ret; \ 279 __ret; \
278}) 280})
279#define cmpxchg_local(ptr, o, n) \ 281#define cmpxchg_local(ptr, o, n) \
280({ \ 282({ \
281 __typeof__(*(ptr)) __ret; \ 283 __typeof__(*(ptr)) __ret; \
282 if (likely(boot_cpu_data.x86 > 3)) \ 284 if (likely(boot_cpu_data.x86 > 3)) \
283 __ret = __cmpxchg_local((ptr), (unsigned long)(o), \ 285 __ret = (__typeof__(*(ptr)))__cmpxchg_local((ptr), \
284 (unsigned long)(n), sizeof(*(ptr))); \ 286 (unsigned long)(o), (unsigned long)(n), \
287 sizeof(*(ptr))); \
285 else \ 288 else \
286 __ret = cmpxchg_386((ptr), (unsigned long)(o), \ 289 __ret = (__typeof__(*(ptr)))cmpxchg_386((ptr), \
287 (unsigned long)(n), sizeof(*(ptr))); \ 290 (unsigned long)(o), (unsigned long)(n), \
291 sizeof(*(ptr))); \
288 __ret; \ 292 __ret; \
289}) 293})
290#endif 294#endif
@@ -301,10 +305,12 @@ extern unsigned long long cmpxchg_486_u64(volatile void *, u64, u64);
301({ \ 305({ \
302 __typeof__(*(ptr)) __ret; \ 306 __typeof__(*(ptr)) __ret; \
303 if (likely(boot_cpu_data.x86 > 4)) \ 307 if (likely(boot_cpu_data.x86 > 4)) \
304 __ret = __cmpxchg64((ptr), (unsigned long long)(o), \ 308 __ret = (__typeof__(*(ptr)))__cmpxchg64((ptr), \
309 (unsigned long long)(o), \
305 (unsigned long long)(n)); \ 310 (unsigned long long)(n)); \
306 else \ 311 else \
307 __ret = cmpxchg_486_u64((ptr), (unsigned long long)(o), \ 312 __ret = (__typeof__(*(ptr)))cmpxchg_486_u64((ptr), \
313 (unsigned long long)(o), \
308 (unsigned long long)(n)); \ 314 (unsigned long long)(n)); \
309 __ret; \ 315 __ret; \
310}) 316})
@@ -312,10 +318,12 @@ extern unsigned long long cmpxchg_486_u64(volatile void *, u64, u64);
312({ \ 318({ \
313 __typeof__(*(ptr)) __ret; \ 319 __typeof__(*(ptr)) __ret; \
314 if (likely(boot_cpu_data.x86 > 4)) \ 320 if (likely(boot_cpu_data.x86 > 4)) \
315 __ret = __cmpxchg64_local((ptr), (unsigned long long)(o), \ 321 __ret = (__typeof__(*(ptr)))__cmpxchg64_local((ptr), \
322 (unsigned long long)(o), \
316 (unsigned long long)(n)); \ 323 (unsigned long long)(n)); \
317 else \ 324 else \
318 __ret = cmpxchg_486_u64((ptr), (unsigned long long)(o), \ 325 __ret = (__typeof__(*(ptr)))cmpxchg_486_u64((ptr), \
326 (unsigned long long)(o), \
319 (unsigned long long)(n)); \ 327 (unsigned long long)(n)); \
320 __ret; \ 328 __ret; \
321}) 329})
diff --git a/include/asm-x86/e820_32.h b/include/asm-x86/e820_32.h
index f1da7ebd1905..e7207a6de3e0 100644
--- a/include/asm-x86/e820_32.h
+++ b/include/asm-x86/e820_32.h
@@ -28,6 +28,8 @@ extern void find_max_pfn(void);
28extern void register_bootmem_low_pages(unsigned long max_low_pfn); 28extern void register_bootmem_low_pages(unsigned long max_low_pfn);
29extern void add_memory_region(unsigned long long start, 29extern void add_memory_region(unsigned long long start,
30 unsigned long long size, int type); 30 unsigned long long size, int type);
31extern void update_memory_range(u64 start, u64 size, unsigned old_type,
32 unsigned new_type);
31extern void e820_register_memory(void); 33extern void e820_register_memory(void);
32extern void limit_regions(unsigned long long size); 34extern void limit_regions(unsigned long long size);
33extern void print_memory_map(char *who); 35extern void print_memory_map(char *who);
diff --git a/include/asm-x86/e820_64.h b/include/asm-x86/e820_64.h
index a560c4f5d500..22ede73ae724 100644
--- a/include/asm-x86/e820_64.h
+++ b/include/asm-x86/e820_64.h
@@ -18,6 +18,8 @@ extern unsigned long find_e820_area(unsigned long start, unsigned long end,
18 unsigned size, unsigned long align); 18 unsigned size, unsigned long align);
19extern void add_memory_region(unsigned long start, unsigned long size, 19extern void add_memory_region(unsigned long start, unsigned long size,
20 int type); 20 int type);
21extern void update_memory_range(u64 start, u64 size, unsigned old_type,
22 unsigned new_type);
21extern void setup_memory_region(void); 23extern void setup_memory_region(void);
22extern void contig_e820_setup(void); 24extern void contig_e820_setup(void);
23extern unsigned long e820_end_of_ram(void); 25extern unsigned long e820_end_of_ram(void);
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h
index 58d2c45cd0b1..d4d8fbd9378c 100644
--- a/include/asm-x86/io_32.h
+++ b/include/asm-x86/io_32.h
@@ -114,13 +114,13 @@ static inline void * phys_to_virt(unsigned long address)
114 * If the area you are trying to map is a PCI BAR you should have a 114 * If the area you are trying to map is a PCI BAR you should have a
115 * look at pci_iomap(). 115 * look at pci_iomap().
116 */ 116 */
117extern void __iomem *ioremap_nocache(unsigned long offset, unsigned long size); 117extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
118extern void __iomem *ioremap_cache(unsigned long offset, unsigned long size); 118extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
119 119
120/* 120/*
121 * The default ioremap() behavior is non-cached: 121 * The default ioremap() behavior is non-cached:
122 */ 122 */
123static inline void __iomem *ioremap(unsigned long offset, unsigned long size) 123static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
124{ 124{
125 return ioremap_nocache(offset, size); 125 return ioremap_nocache(offset, size);
126} 126}
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h
index f64a59cc396d..db0be2011a3c 100644
--- a/include/asm-x86/io_64.h
+++ b/include/asm-x86/io_64.h
@@ -158,13 +158,13 @@ extern void early_iounmap(void *addr, unsigned long size);
158 * it's useful if some control registers are in such an area and write combining 158 * it's useful if some control registers are in such an area and write combining
159 * or read caching is not desirable: 159 * or read caching is not desirable:
160 */ 160 */
161extern void __iomem *ioremap_nocache(unsigned long offset, unsigned long size); 161extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
162extern void __iomem *ioremap_cache(unsigned long offset, unsigned long size); 162extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
163 163
164/* 164/*
165 * The default ioremap() behavior is non-cached: 165 * The default ioremap() behavior is non-cached:
166 */ 166 */
167static inline void __iomem *ioremap(unsigned long offset, unsigned long size) 167static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
168{ 168{
169 return ioremap_nocache(offset, size); 169 return ioremap_nocache(offset, size);
170} 170}
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h
index 143476a3cb52..61ad7b5d142e 100644
--- a/include/asm-x86/kprobes.h
+++ b/include/asm-x86/kprobes.h
@@ -42,7 +42,6 @@ typedef u8 kprobe_opcode_t;
42 : (((unsigned long)current_thread_info()) + THREAD_SIZE \ 42 : (((unsigned long)current_thread_info()) + THREAD_SIZE \
43 - (unsigned long)(ADDR))) 43 - (unsigned long)(ADDR)))
44 44
45#define ARCH_SUPPORTS_KRETPROBES
46#define flush_insn_slot(p) do { } while (0) 45#define flush_insn_slot(p) do { } while (0)
47 46
48extern const int kretprobe_blacklist_size; 47extern const int kretprobe_blacklist_size;
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
index 1cb7c51bc296..a05b2896492f 100644
--- a/include/asm-x86/page.h
+++ b/include/asm-x86/page.h
@@ -52,13 +52,13 @@ extern int page_is_ram(unsigned long pagenr);
52 52
53struct page; 53struct page;
54 54
55static void inline clear_user_page(void *page, unsigned long vaddr, 55static inline void clear_user_page(void *page, unsigned long vaddr,
56 struct page *pg) 56 struct page *pg)
57{ 57{
58 clear_page(page); 58 clear_page(page);
59} 59}
60 60
61static void inline copy_user_page(void *to, void *from, unsigned long vaddr, 61static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
62 struct page *topage) 62 struct page *topage)
63{ 63{
64 copy_page(to, from); 64 copy_page(to, from);
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index 174b87738714..9cf472aeb9ce 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -85,6 +85,7 @@ extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
85#define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW) 85#define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW)
86#define __PAGE_KERNEL_EXEC_NOCACHE (__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT) 86#define __PAGE_KERNEL_EXEC_NOCACHE (__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT)
87#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT) 87#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
88#define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD)
88#define __PAGE_KERNEL_VSYSCALL (__PAGE_KERNEL_RX | _PAGE_USER) 89#define __PAGE_KERNEL_VSYSCALL (__PAGE_KERNEL_RX | _PAGE_USER)
89#define __PAGE_KERNEL_VSYSCALL_NOCACHE (__PAGE_KERNEL_VSYSCALL | _PAGE_PCD | _PAGE_PWT) 90#define __PAGE_KERNEL_VSYSCALL_NOCACHE (__PAGE_KERNEL_VSYSCALL | _PAGE_PCD | _PAGE_PWT)
90#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE) 91#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
@@ -101,6 +102,7 @@ extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
101#define PAGE_KERNEL_EXEC MAKE_GLOBAL(__PAGE_KERNEL_EXEC) 102#define PAGE_KERNEL_EXEC MAKE_GLOBAL(__PAGE_KERNEL_EXEC)
102#define PAGE_KERNEL_RX MAKE_GLOBAL(__PAGE_KERNEL_RX) 103#define PAGE_KERNEL_RX MAKE_GLOBAL(__PAGE_KERNEL_RX)
103#define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE) 104#define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
105#define PAGE_KERNEL_UC_MINUS MAKE_GLOBAL(__PAGE_KERNEL_UC_MINUS)
104#define PAGE_KERNEL_EXEC_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_EXEC_NOCACHE) 106#define PAGE_KERNEL_EXEC_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_EXEC_NOCACHE)
105#define PAGE_KERNEL_LARGE MAKE_GLOBAL(__PAGE_KERNEL_LARGE) 107#define PAGE_KERNEL_LARGE MAKE_GLOBAL(__PAGE_KERNEL_LARGE)
106#define PAGE_KERNEL_LARGE_EXEC MAKE_GLOBAL(__PAGE_KERNEL_LARGE_EXEC) 108#define PAGE_KERNEL_LARGE_EXEC MAKE_GLOBAL(__PAGE_KERNEL_LARGE_EXEC)
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h
index b478efa971e0..4e6a0fca0b47 100644
--- a/include/asm-x86/pgtable_32.h
+++ b/include/asm-x86/pgtable_32.h
@@ -26,10 +26,9 @@ struct mm_struct;
26struct vm_area_struct; 26struct vm_area_struct;
27 27
28extern pgd_t swapper_pg_dir[1024]; 28extern pgd_t swapper_pg_dir[1024];
29extern struct kmem_cache *pmd_cache;
30void check_pgt_cache(void);
31 29
32static inline void pgtable_cache_init(void) {} 30static inline void pgtable_cache_init(void) { }
31static inline void check_pgt_cache(void) { }
33void paging_init(void); 32void paging_init(void);
34 33
35 34
@@ -91,9 +90,7 @@ extern unsigned long pg0[];
91/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ 90/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
92#define pmd_none(x) (!(unsigned long)pmd_val(x)) 91#define pmd_none(x) (!(unsigned long)pmd_val(x))
93#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) 92#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
94#define pmd_bad(x) ((pmd_val(x) \ 93#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
95 & ~(PAGE_MASK | _PAGE_USER | _PAGE_PSE | _PAGE_NX)) \
96 != _KERNPG_TABLE)
97 94
98 95
99#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) 96#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index 0a9258333cbd..0a0b77bc736a 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -153,14 +153,12 @@ static inline unsigned long pgd_bad(pgd_t pgd)
153 153
154static inline unsigned long pud_bad(pud_t pud) 154static inline unsigned long pud_bad(pud_t pud)
155{ 155{
156 return pud_val(pud) & 156 return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER);
157 ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX);
158} 157}
159 158
160static inline unsigned long pmd_bad(pmd_t pmd) 159static inline unsigned long pmd_bad(pmd_t pmd)
161{ 160{
162 return pmd_val(pmd) & 161 return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER);
163 ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX);
164} 162}
165 163
166#define pte_none(x) (!pte_val(x)) 164#define pte_none(x) (!pte_val(x))
diff --git a/include/asm-x86/sync_bitops.h b/include/asm-x86/sync_bitops.h
index cbce08a2d135..6b775c905666 100644
--- a/include/asm-x86/sync_bitops.h
+++ b/include/asm-x86/sync_bitops.h
@@ -23,10 +23,6 @@
23 * This function is atomic and may not be reordered. See __set_bit() 23 * This function is atomic and may not be reordered. See __set_bit()
24 * if you do not require the atomic guarantees. 24 * if you do not require the atomic guarantees.
25 * 25 *
26 * Note: there are no guarantees that this function will not be reordered
27 * on non-x86 architectures, so if you are writing portable code,
28 * make sure not to rely on its reordering guarantees.
29 *
30 * Note that @nr may be almost arbitrarily large; this function is not 26 * Note that @nr may be almost arbitrarily large; this function is not
31 * restricted to acting on a single-word quantity. 27 * restricted to acting on a single-word quantity.
32 */ 28 */
@@ -61,8 +57,7 @@ static inline void sync_clear_bit(int nr, volatile unsigned long * addr)
61 * @nr: Bit to change 57 * @nr: Bit to change
62 * @addr: Address to start counting from 58 * @addr: Address to start counting from
63 * 59 *
64 * change_bit() is atomic and may not be reordered. It may be 60 * sync_change_bit() is atomic and may not be reordered.
65 * reordered on other architectures than x86.
66 * Note that @nr may be almost arbitrarily large; this function is not 61 * Note that @nr may be almost arbitrarily large; this function is not
67 * restricted to acting on a single-word quantity. 62 * restricted to acting on a single-word quantity.
68 */ 63 */
@@ -80,7 +75,6 @@ static inline void sync_change_bit(int nr, volatile unsigned long * addr)
80 * @addr: Address to count from 75 * @addr: Address to count from
81 * 76 *
82 * This operation is atomic and cannot be reordered. 77 * This operation is atomic and cannot be reordered.
83 * It may be reordered on other architectures than x86.
84 * It also implies a memory barrier. 78 * It also implies a memory barrier.
85 */ 79 */
86static inline int sync_test_and_set_bit(int nr, volatile unsigned long * addr) 80static inline int sync_test_and_set_bit(int nr, volatile unsigned long * addr)
@@ -99,7 +93,6 @@ static inline int sync_test_and_set_bit(int nr, volatile unsigned long * addr)
99 * @addr: Address to count from 93 * @addr: Address to count from
100 * 94 *
101 * This operation is atomic and cannot be reordered. 95 * This operation is atomic and cannot be reordered.
102 * It can be reorderdered on other architectures other than x86.
103 * It also implies a memory barrier. 96 * It also implies a memory barrier.
104 */ 97 */
105static inline int sync_test_and_clear_bit(int nr, volatile unsigned long * addr) 98static inline int sync_test_and_clear_bit(int nr, volatile unsigned long * addr)
diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h
index 2ba42cd7d6aa..ccc32bad9a89 100644
--- a/include/crypto/internal/skcipher.h
+++ b/include/crypto/internal/skcipher.h
@@ -15,6 +15,7 @@
15 15
16#include <crypto/algapi.h> 16#include <crypto/algapi.h>
17#include <crypto/skcipher.h> 17#include <crypto/skcipher.h>
18#include <linux/init.h>
18#include <linux/types.h> 19#include <linux/types.h>
19 20
20struct rtattr; 21struct rtattr;
@@ -64,6 +65,11 @@ void skcipher_geniv_free(struct crypto_instance *inst);
64int skcipher_geniv_init(struct crypto_tfm *tfm); 65int skcipher_geniv_init(struct crypto_tfm *tfm);
65void skcipher_geniv_exit(struct crypto_tfm *tfm); 66void skcipher_geniv_exit(struct crypto_tfm *tfm);
66 67
68int __init eseqiv_module_init(void);
69void __exit eseqiv_module_exit(void);
70int __init chainiv_module_init(void);
71void chainiv_module_exit(void);
72
67static inline struct crypto_ablkcipher *skcipher_geniv_cipher( 73static inline struct crypto_ablkcipher *skcipher_geniv_cipher(
68 struct crypto_ablkcipher *geniv) 74 struct crypto_ablkcipher *geniv)
69{ 75{
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index aada32fffec2..4108b38ebb16 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -61,6 +61,7 @@ header-y += efs_fs_sb.h
61header-y += elf-fdpic.h 61header-y += elf-fdpic.h
62header-y += elf-em.h 62header-y += elf-em.h
63header-y += fadvise.h 63header-y += fadvise.h
64header-y += falloc.h
64header-y += fd.h 65header-y += fd.h
65header-y += fdreg.h 66header-y += fdreg.h
66header-y += fib_rules.h 67header-y += fib_rules.h
@@ -126,7 +127,6 @@ header-y += pkt_sched.h
126header-y += posix_types.h 127header-y += posix_types.h
127header-y += ppdev.h 128header-y += ppdev.h
128header-y += prctl.h 129header-y += prctl.h
129header-y += ps2esdi.h
130header-y += qnxtypes.h 130header-y += qnxtypes.h
131header-y += quotaio_v1.h 131header-y += quotaio_v1.h
132header-y += quotaio_v2.h 132header-y += quotaio_v2.h
@@ -204,7 +204,6 @@ unifdef-y += futex.h
204unifdef-y += fs.h 204unifdef-y += fs.h
205unifdef-y += gameport.h 205unifdef-y += gameport.h
206unifdef-y += generic_serial.h 206unifdef-y += generic_serial.h
207unifdef-y += genhd.h
208unifdef-y += gfs2_ondisk.h 207unifdef-y += gfs2_ondisk.h
209unifdef-y += hayesesp.h 208unifdef-y += hayesesp.h
210unifdef-y += hdlcdrv.h 209unifdef-y += hdlcdrv.h
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6fe67d1939c2..6f79d40dd3c0 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -216,8 +216,8 @@ struct request {
216 unsigned int cmd_len; 216 unsigned int cmd_len;
217 unsigned char cmd[BLK_MAX_CDB]; 217 unsigned char cmd[BLK_MAX_CDB];
218 218
219 unsigned int raw_data_len;
220 unsigned int data_len; 219 unsigned int data_len;
220 unsigned int extra_len; /* length of alignment and padding */
221 unsigned int sense_len; 221 unsigned int sense_len;
222 void *data; 222 void *data;
223 void *sense; 223 void *sense;
@@ -362,6 +362,7 @@ struct request_queue
362 unsigned long seg_boundary_mask; 362 unsigned long seg_boundary_mask;
363 void *dma_drain_buffer; 363 void *dma_drain_buffer;
364 unsigned int dma_drain_size; 364 unsigned int dma_drain_size;
365 unsigned int dma_pad_mask;
365 unsigned int dma_alignment; 366 unsigned int dma_alignment;
366 367
367 struct blk_queue_tag *queue_tags; 368 struct blk_queue_tag *queue_tags;
@@ -701,6 +702,7 @@ extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short);
701extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); 702extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
702extern void blk_queue_hardsect_size(struct request_queue *, unsigned short); 703extern void blk_queue_hardsect_size(struct request_queue *, unsigned short);
703extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); 704extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b);
705extern void blk_queue_dma_pad(struct request_queue *, unsigned int);
704extern int blk_queue_dma_drain(struct request_queue *q, 706extern int blk_queue_dma_drain(struct request_queue *q,
705 dma_drain_needed_fn *dma_drain_needed, 707 dma_drain_needed_fn *dma_drain_needed,
706 void *buf, unsigned int size); 708 void *buf, unsigned int size);
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h
index ac6aad98b607..1ddebfc52565 100644
--- a/include/linux/cgroup_subsys.h
+++ b/include/linux/cgroup_subsys.h
@@ -37,7 +37,7 @@ SUBSYS(cpuacct)
37 37
38/* */ 38/* */
39 39
40#ifdef CONFIG_CGROUP_MEM_CONT 40#ifdef CONFIG_CGROUP_MEM_RES_CTLR
41SUBSYS(mem_cgroup) 41SUBSYS(mem_cgroup)
42#endif 42#endif
43 43
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index d0e17e1657dc..dcae0c8d97e6 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -138,6 +138,12 @@ extern void __chk_io_ptr(const volatile void __iomem *);
138#define noinline 138#define noinline
139#endif 139#endif
140 140
141/*
142 * Rather then using noinline to prevent stack consumption, use
143 * noinline_for_stack instead. For documentaiton reasons.
144 */
145#define noinline_for_stack noinline
146
141#ifndef __always_inline 147#ifndef __always_inline
142#define __always_inline inline 148#define __always_inline inline
143#endif 149#endif
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 6b72a4584086..51e6b1e520e6 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -38,8 +38,8 @@ struct cpuidle_state {
38 unsigned int power_usage; /* in mW */ 38 unsigned int power_usage; /* in mW */
39 unsigned int target_residency; /* in US */ 39 unsigned int target_residency; /* in US */
40 40
41 unsigned int usage; 41 unsigned long long usage;
42 unsigned int time; /* in US */ 42 unsigned long long time; /* in US */
43 43
44 int (*enter) (struct cpuidle_device *dev, 44 int (*enter) (struct cpuidle_device *dev,
45 struct cpuidle_state *state); 45 struct cpuidle_state *state);
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index f592d6de3b97..7266124361b4 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -27,6 +27,11 @@ struct debugfs_blob_wrapper {
27}; 27};
28 28
29#if defined(CONFIG_DEBUG_FS) 29#if defined(CONFIG_DEBUG_FS)
30
31/* declared over in file.c */
32extern const struct file_operations debugfs_file_operations;
33extern const struct inode_operations debugfs_link_operations;
34
30struct dentry *debugfs_create_file(const char *name, mode_t mode, 35struct dentry *debugfs_create_file(const char *name, mode_t mode,
31 struct dentry *parent, void *data, 36 struct dentry *parent, void *data,
32 const struct file_operations *fops); 37 const struct file_operations *fops);
diff --git a/include/linux/delay.h b/include/linux/delay.h
index 17ddb55430ae..54552d21296e 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -7,6 +7,8 @@
7 * Delay routines, using a pre-computed "loops_per_jiffy" value. 7 * Delay routines, using a pre-computed "loops_per_jiffy" value.
8 */ 8 */
9 9
10#include <linux/kernel.h>
11
10extern unsigned long loops_per_jiffy; 12extern unsigned long loops_per_jiffy;
11 13
12#include <asm/delay.h> 14#include <asm/delay.h>
@@ -32,7 +34,11 @@ extern unsigned long loops_per_jiffy;
32#endif 34#endif
33 35
34#ifndef ndelay 36#ifndef ndelay
35#define ndelay(x) udelay(((x)+999)/1000) 37static inline void ndelay(unsigned long x)
38{
39 udelay(DIV_ROUND_UP(x, 1000));
40}
41#define ndelay(x) ndelay(x)
36#endif 42#endif
37 43
38void calibrate_delay(void); 44void calibrate_delay(void);
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index acbb364674ff..261e43a4c873 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -366,7 +366,7 @@ __dma_has_cap(enum dma_transaction_type tx_type, dma_cap_mask_t *srcp)
366 */ 366 */
367static inline void dma_async_issue_pending(struct dma_chan *chan) 367static inline void dma_async_issue_pending(struct dma_chan *chan)
368{ 368{
369 return chan->device->device_issue_pending(chan); 369 chan->device->device_issue_pending(chan);
370} 370}
371 371
372#define dma_async_memcpy_issue_pending(chan) dma_async_issue_pending(chan) 372#define dma_async_memcpy_issue_pending(chan) dma_async_issue_pending(chan)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index fcbe8b640ffb..c8d216357865 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -12,6 +12,7 @@
12#ifndef _LINUX_ETHTOOL_H 12#ifndef _LINUX_ETHTOOL_H
13#define _LINUX_ETHTOOL_H 13#define _LINUX_ETHTOOL_H
14 14
15#include <linux/types.h>
15 16
16/* This should work for both 32 and 64 bit userland. */ 17/* This should work for both 32 and 64 bit userland. */
17struct ethtool_cmd { 18struct ethtool_cmd {
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index 51d214138814..adcbb05b120b 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -49,11 +49,11 @@ struct fid {
49 49
50/** 50/**
51 * struct export_operations - for nfsd to communicate with file systems 51 * struct export_operations - for nfsd to communicate with file systems
52 * @decode_fh: decode a file handle fragment and return a &struct dentry
53 * @encode_fh: encode a file handle fragment from a dentry 52 * @encode_fh: encode a file handle fragment from a dentry
53 * @fh_to_dentry: find the implied object and get a dentry for it
54 * @fh_to_parent: find the implied object's parent and get a dentry for it
54 * @get_name: find the name for a given inode in a given directory 55 * @get_name: find the name for a given inode in a given directory
55 * @get_parent: find the parent of a given directory 56 * @get_parent: find the parent of a given directory
56 * @get_dentry: find a dentry for the inode given a file handle sub-fragment
57 * 57 *
58 * See Documentation/filesystems/Exporting for details on how to use 58 * See Documentation/filesystems/Exporting for details on how to use
59 * this interface correctly. 59 * this interface correctly.
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 33d8f2087b6e..4d10c7328d2d 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -10,7 +10,10 @@ struct firmware {
10 size_t size; 10 size_t size;
11 u8 *data; 11 u8 *data;
12}; 12};
13
13struct device; 14struct device;
15
16#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
14int request_firmware(const struct firmware **fw, const char *name, 17int request_firmware(const struct firmware **fw, const char *name,
15 struct device *device); 18 struct device *device);
16int request_firmware_nowait( 19int request_firmware_nowait(
@@ -19,4 +22,24 @@ int request_firmware_nowait(
19 void (*cont)(const struct firmware *fw, void *context)); 22 void (*cont)(const struct firmware *fw, void *context));
20 23
21void release_firmware(const struct firmware *fw); 24void release_firmware(const struct firmware *fw);
25#else
26static inline int request_firmware(const struct firmware **fw,
27 const char *name,
28 struct device *device)
29{
30 return -EINVAL;
31}
32static inline int request_firmware_nowait(
33 struct module *module, int uevent,
34 const char *name, struct device *device, void *context,
35 void (*cont)(const struct firmware *fw, void *context))
36{
37 return -EINVAL;
38}
39
40static inline void release_firmware(const struct firmware *fw)
41{
42}
43#endif
44
22#endif 45#endif
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 09a3b18918c7..ecd2bf63fc84 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -18,11 +18,13 @@
18#define dev_to_disk(device) container_of(device, struct gendisk, dev) 18#define dev_to_disk(device) container_of(device, struct gendisk, dev)
19#define dev_to_part(device) container_of(device, struct hd_struct, dev) 19#define dev_to_part(device) container_of(device, struct hd_struct, dev)
20 20
21extern struct device_type disk_type;
22extern struct device_type part_type; 21extern struct device_type part_type;
23extern struct kobject *block_depr; 22extern struct kobject *block_depr;
24extern struct class block_class; 23extern struct class block_class;
25 24
25extern const struct seq_operations partitions_op;
26extern const struct seq_operations diskstats_op;
27
26enum { 28enum {
27/* These three have identical behaviour; use the second one if DOS FDISK gets 29/* These three have identical behaviour; use the second one if DOS FDISK gets
28 confused about extended/logical partitions starting past cylinder 1023. */ 30 confused about extended/logical partitions starting past cylinder 1023. */
@@ -53,24 +55,6 @@ enum {
53 UNIXWARE_PARTITION = 0x63, /* Same as GNU_HURD and SCO Unix */ 55 UNIXWARE_PARTITION = 0x63, /* Same as GNU_HURD and SCO Unix */
54}; 56};
55 57
56#ifndef __KERNEL__
57
58struct partition {
59 unsigned char boot_ind; /* 0x80 - active */
60 unsigned char head; /* starting head */
61 unsigned char sector; /* starting sector */
62 unsigned char cyl; /* starting cylinder */
63 unsigned char sys_ind; /* What partition type */
64 unsigned char end_head; /* end head */
65 unsigned char end_sector; /* end sector */
66 unsigned char end_cyl; /* end cylinder */
67 unsigned int start_sect; /* starting sector counting from 0 */
68 unsigned int nr_sects; /* nr of sectors in partition */
69} __attribute__((packed));
70
71#endif
72
73#ifdef __KERNEL__
74#include <linux/major.h> 58#include <linux/major.h>
75#include <linux/device.h> 59#include <linux/device.h>
76#include <linux/smp.h> 60#include <linux/smp.h>
@@ -226,7 +210,7 @@ static inline void part_stat_set_all(struct hd_struct *part, int value) {
226 sizeof(struct disk_stats)); 210 sizeof(struct disk_stats));
227} 211}
228 212
229#else 213#else /* !CONFIG_SMP */
230#define __disk_stat_add(gendiskp, field, addnd) \ 214#define __disk_stat_add(gendiskp, field, addnd) \
231 (gendiskp->dkstats.field += addnd) 215 (gendiskp->dkstats.field += addnd)
232#define disk_stat_read(gendiskp, field) (gendiskp->dkstats.field) 216#define disk_stat_read(gendiskp, field) (gendiskp->dkstats.field)
@@ -254,7 +238,7 @@ static inline void part_stat_set_all(struct hd_struct *part, int value)
254 memset(&part->dkstats, value, sizeof(struct disk_stats)); 238 memset(&part->dkstats, value, sizeof(struct disk_stats));
255} 239}
256 240
257#endif 241#endif /* CONFIG_SMP */
258 242
259#define disk_stat_add(gendiskp, field, addnd) \ 243#define disk_stat_add(gendiskp, field, addnd) \
260 do { \ 244 do { \
@@ -393,8 +377,6 @@ static inline void set_capacity(struct gendisk *disk, sector_t size)
393 disk->capacity = size; 377 disk->capacity = size;
394} 378}
395 379
396#endif /* __KERNEL__ */
397
398#ifdef CONFIG_SOLARIS_X86_PARTITION 380#ifdef CONFIG_SOLARIS_X86_PARTITION
399 381
400#define SOLARIS_X86_NUMSLICE 16 382#define SOLARIS_X86_NUMSLICE 16
@@ -538,8 +520,6 @@ struct unixware_disklabel {
538# define MINIX_NR_SUBPARTITIONS 4 520# define MINIX_NR_SUBPARTITIONS 4
539#endif /* CONFIG_MINIX_SUBPARTITION */ 521#endif /* CONFIG_MINIX_SUBPARTITION */
540 522
541#ifdef __KERNEL__
542
543#define ADDPART_FLAG_NONE 0 523#define ADDPART_FLAG_NONE 0
544#define ADDPART_FLAG_RAID 1 524#define ADDPART_FLAG_RAID 1
545#define ADDPART_FLAG_WHOLEDISK 2 525#define ADDPART_FLAG_WHOLEDISK 2
@@ -556,7 +536,6 @@ extern struct gendisk *alloc_disk_node(int minors, int node_id);
556extern struct gendisk *alloc_disk(int minors); 536extern struct gendisk *alloc_disk(int minors);
557extern struct kobject *get_disk(struct gendisk *disk); 537extern struct kobject *get_disk(struct gendisk *disk);
558extern void put_disk(struct gendisk *disk); 538extern void put_disk(struct gendisk *disk);
559extern void genhd_media_change_notify(struct gendisk *disk);
560extern void blk_register_region(dev_t devt, unsigned long range, 539extern void blk_register_region(dev_t devt, unsigned long range,
561 struct module *module, 540 struct module *module,
562 struct kobject *(*probe)(dev_t, int *, void *), 541 struct kobject *(*probe)(dev_t, int *, void *),
@@ -569,8 +548,6 @@ static inline struct block_device *bdget_disk(struct gendisk *disk, int index)
569 return bdget(MKDEV(disk->major, disk->first_minor) + index); 548 return bdget(MKDEV(disk->major, disk->first_minor) + index);
570} 549}
571 550
572#endif
573
574#else /* CONFIG_BLOCK */ 551#else /* CONFIG_BLOCK */
575 552
576static inline void printk_all_partitions(void) { } 553static inline void printk_all_partitions(void) { }
@@ -583,4 +560,4 @@ static inline dev_t blk_lookup_devt(const char *name)
583 560
584#endif /* CONFIG_BLOCK */ 561#endif /* CONFIG_BLOCK */
585 562
586#endif 563#endif /* _LINUX_GENHD_H */
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
new file mode 100644
index 000000000000..4987a84078ef
--- /dev/null
+++ b/include/linux/gpio.h
@@ -0,0 +1,95 @@
1#ifndef __LINUX_GPIO_H
2#define __LINUX_GPIO_H
3
4/* see Documentation/gpio.txt */
5
6#ifdef CONFIG_GENERIC_GPIO
7#include <asm/gpio.h>
8
9#else
10
11/*
12 * Some platforms don't support the GPIO programming interface.
13 *
14 * In case some driver uses it anyway (it should normally have
15 * depended on GENERIC_GPIO), these routines help the compiler
16 * optimize out much GPIO-related code ... or trigger a runtime
17 * warning when something is wrongly called.
18 */
19
20static inline int gpio_is_valid(int number)
21{
22 return 0;
23}
24
25static inline int gpio_request(unsigned gpio, const char *label)
26{
27 return -ENOSYS;
28}
29
30static inline void gpio_free(unsigned gpio)
31{
32 /* GPIO can never have been requested */
33 WARN_ON(1);
34}
35
36static inline int gpio_direction_input(unsigned gpio)
37{
38 return -ENOSYS;
39}
40
41static inline int gpio_direction_output(unsigned gpio, int value)
42{
43 return -ENOSYS;
44}
45
46static inline int gpio_get_value(unsigned gpio)
47{
48 /* GPIO can never have been requested or set as {in,out}put */
49 WARN_ON(1);
50 return 0;
51}
52
53static inline void gpio_set_value(unsigned gpio, int value)
54{
55 /* GPIO can never have been requested or set as output */
56 WARN_ON(1);
57}
58
59static inline int gpio_cansleep(unsigned gpio)
60{
61 /* GPIO can never have been requested or set as {in,out}put */
62 WARN_ON(1);
63 return 0;
64}
65
66static inline int gpio_get_value_cansleep(unsigned gpio)
67{
68 /* GPIO can never have been requested or set as {in,out}put */
69 WARN_ON(1);
70 return 0;
71}
72
73static inline void gpio_set_value_cansleep(unsigned gpio, int value)
74{
75 /* GPIO can never have been requested or set as output */
76 WARN_ON(1);
77}
78
79static inline int gpio_to_irq(unsigned gpio)
80{
81 /* GPIO can never have been requested or set as input */
82 WARN_ON(1);
83 return -EINVAL;
84}
85
86static inline int irq_to_gpio(unsigned irq)
87{
88 /* irq can never have been returned from gpio_to_irq() */
89 WARN_ON(1);
90 return -EINVAL;
91}
92
93#endif
94
95#endif /* __LINUX_GPIO_H */
diff --git a/include/linux/in.h b/include/linux/in.h
index 70c6df882694..4065313cd7ee 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -265,7 +265,7 @@ static inline bool ipv4_is_local_multicast(__be32 addr)
265static inline bool ipv4_is_lbcast(__be32 addr) 265static inline bool ipv4_is_lbcast(__be32 addr)
266{ 266{
267 /* limited broadcast */ 267 /* limited broadcast */
268 return addr == INADDR_BROADCAST; 268 return addr == htonl(INADDR_BROADCAST);
269} 269}
270 270
271static inline bool ipv4_is_zeronet(__be32 addr) 271static inline bool ipv4_is_zeronet(__be32 addr)
diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h
index 4dd4c04ff2f4..c975caf75385 100644
--- a/include/linux/iommu-helper.h
+++ b/include/linux/iommu-helper.h
@@ -1,3 +1,6 @@
1extern int iommu_is_span_boundary(unsigned int index, unsigned int nr,
2 unsigned long shift,
3 unsigned long boundary_size);
1extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, 4extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
2 unsigned long start, unsigned int nr, 5 unsigned long start, unsigned int nr,
3 unsigned long shift, 6 unsigned long shift,
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index b18fd3b9b835..423f58272188 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -348,8 +348,7 @@ static inline void jbd_unlock_bh_journal_head(struct buffer_head *bh)
348struct jbd_revoke_table_s; 348struct jbd_revoke_table_s;
349 349
350/** 350/**
351 * struct handle_s - The handle_s type is the concrete type associated with 351 * struct handle_s - this is the concrete type associated with handle_t.
352 * handle_t.
353 * @h_transaction: Which compound transaction is this update a part of? 352 * @h_transaction: Which compound transaction is this update a part of?
354 * @h_buffer_credits: Number of remaining buffers we are allowed to dirty. 353 * @h_buffer_credits: Number of remaining buffers we are allowed to dirty.
355 * @h_ref: Reference count on this handle 354 * @h_ref: Reference count on this handle
@@ -358,12 +357,7 @@ struct jbd_revoke_table_s;
358 * @h_jdata: flag to force data journaling 357 * @h_jdata: flag to force data journaling
359 * @h_aborted: flag indicating fatal error on handle 358 * @h_aborted: flag indicating fatal error on handle
360 * @h_lockdep_map: lockdep info for debugging lock problems 359 * @h_lockdep_map: lockdep info for debugging lock problems
361 **/
362
363/* Docbook can't yet cope with the bit fields, but will leave the documentation
364 * in so it can be fixed later.
365 */ 360 */
366
367struct handle_s 361struct handle_s
368{ 362{
369 /* Which compound transaction is this update a part of? */ 363 /* Which compound transaction is this update a part of? */
@@ -558,8 +552,7 @@ struct transaction_s
558}; 552};
559 553
560/** 554/**
561 * struct journal_s - The journal_s type is the concrete type associated with 555 * struct journal_s - this is the concrete type associated with journal_t.
562 * journal_t.
563 * @j_flags: General journaling state flags 556 * @j_flags: General journaling state flags
564 * @j_errno: Is there an outstanding uncleared error on the journal (from a 557 * @j_errno: Is there an outstanding uncleared error on the journal (from a
565 * prior abort)? 558 * prior abort)?
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 4a6ce82ba039..0f28486f6360 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -125,11 +125,11 @@ struct jprobe {
125DECLARE_PER_CPU(struct kprobe *, current_kprobe); 125DECLARE_PER_CPU(struct kprobe *, current_kprobe);
126DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); 126DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
127 127
128#ifdef ARCH_SUPPORTS_KRETPROBES 128#ifdef CONFIG_KRETPROBES
129extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, 129extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
130 struct pt_regs *regs); 130 struct pt_regs *regs);
131extern int arch_trampoline_kprobe(struct kprobe *p); 131extern int arch_trampoline_kprobe(struct kprobe *p);
132#else /* ARCH_SUPPORTS_KRETPROBES */ 132#else /* CONFIG_KRETPROBES */
133static inline void arch_prepare_kretprobe(struct kretprobe *rp, 133static inline void arch_prepare_kretprobe(struct kretprobe *rp,
134 struct pt_regs *regs) 134 struct pt_regs *regs)
135{ 135{
@@ -138,7 +138,7 @@ static inline int arch_trampoline_kprobe(struct kprobe *p)
138{ 138{
139 return 0; 139 return 0;
140} 140}
141#endif /* ARCH_SUPPORTS_KRETPROBES */ 141#endif /* CONFIG_KRETPROBES */
142/* 142/*
143 * Function-return probe - 143 * Function-return probe -
144 * Note: 144 * Note:
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 4de4fd2d8607..c1ec04fd000d 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -221,6 +221,7 @@ struct kvm_vapic_addr {
221 * Get size for mmap(vcpu_fd) 221 * Get size for mmap(vcpu_fd)
222 */ 222 */
223#define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ 223#define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */
224#define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2)
224 225
225/* 226/*
226 * Extension capability list. 227 * Extension capability list.
@@ -230,8 +231,8 @@ struct kvm_vapic_addr {
230#define KVM_CAP_MMU_SHADOW_CACHE_CONTROL 2 231#define KVM_CAP_MMU_SHADOW_CACHE_CONTROL 2
231#define KVM_CAP_USER_MEMORY 3 232#define KVM_CAP_USER_MEMORY 3
232#define KVM_CAP_SET_TSS_ADDR 4 233#define KVM_CAP_SET_TSS_ADDR 4
233#define KVM_CAP_EXT_CPUID 5
234#define KVM_CAP_VAPIC 6 234#define KVM_CAP_VAPIC 6
235#define KVM_CAP_EXT_CPUID 7
235 236
236/* 237/*
237 * ioctls for VM fds 238 * ioctls for VM fds
@@ -249,7 +250,6 @@ struct kvm_vapic_addr {
249#define KVM_CREATE_VCPU _IO(KVMIO, 0x41) 250#define KVM_CREATE_VCPU _IO(KVMIO, 0x41)
250#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) 251#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log)
251#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) 252#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias)
252#define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x48, struct kvm_cpuid2)
253/* Device model IOC */ 253/* Device model IOC */
254#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60) 254#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)
255#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level) 255#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ea4764b0a2f4..928b0d59e9ba 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -107,6 +107,7 @@ struct kvm_memory_slot {
107struct kvm { 107struct kvm {
108 struct mutex lock; /* protects the vcpus array and APIC accesses */ 108 struct mutex lock; /* protects the vcpus array and APIC accesses */
109 spinlock_t mmu_lock; 109 spinlock_t mmu_lock;
110 struct rw_semaphore slots_lock;
110 struct mm_struct *mm; /* userspace tied to this vm */ 111 struct mm_struct *mm; /* userspace tied to this vm */
111 int nmemslots; 112 int nmemslots;
112 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + 113 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS +
diff --git a/include/linux/libata.h b/include/linux/libata.h
index a05f60013642..269cdba09578 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -463,6 +463,7 @@ struct ata_queued_cmd {
463 unsigned int sect_size; 463 unsigned int sect_size;
464 464
465 unsigned int nbytes; 465 unsigned int nbytes;
466 unsigned int extrabytes;
466 unsigned int curbytes; 467 unsigned int curbytes;
467 468
468 struct scatterlist *cursg; 469 struct scatterlist *cursg;
@@ -1336,6 +1337,11 @@ static inline struct ata_queued_cmd *ata_qc_from_tag(struct ata_port *ap,
1336 return NULL; 1337 return NULL;
1337} 1338}
1338 1339
1340static inline unsigned int ata_qc_raw_nbytes(struct ata_queued_cmd *qc)
1341{
1342 return qc->nbytes - min(qc->extrabytes, qc->nbytes);
1343}
1344
1339static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf) 1345static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf)
1340{ 1346{
1341 memset(tf, 0, sizeof(*tf)); 1347 memset(tf, 0, sizeof(*tf));
@@ -1354,7 +1360,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
1354 qc->flags = 0; 1360 qc->flags = 0;
1355 qc->cursg = NULL; 1361 qc->cursg = NULL;
1356 qc->cursg_ofs = 0; 1362 qc->cursg_ofs = 0;
1357 qc->nbytes = qc->curbytes = 0; 1363 qc->nbytes = qc->extrabytes = qc->curbytes = 0;
1358 qc->n_elem = 0; 1364 qc->n_elem = 0;
1359 qc->err_mask = 0; 1365 qc->err_mask = 0;
1360 qc->sect_size = ATA_SECT_SIZE; 1366 qc->sect_size = ATA_SECT_SIZE;
diff --git a/include/linux/marker.h b/include/linux/marker.h
index 5df879dc3776..430f6adf9762 100644
--- a/include/linux/marker.h
+++ b/include/linux/marker.h
@@ -104,10 +104,16 @@ static inline void marker_update_probe_range(struct marker *begin,
104#define MARK_NOARGS " " 104#define MARK_NOARGS " "
105 105
106/* To be used for string format validity checking with gcc */ 106/* To be used for string format validity checking with gcc */
107static inline void __printf(1, 2) __mark_check_format(const char *fmt, ...) 107static inline void __printf(1, 2) ___mark_check_format(const char *fmt, ...)
108{ 108{
109} 109}
110 110
111#define __mark_check_format(format, args...) \
112 do { \
113 if (0) \
114 ___mark_check_format(format, ## args); \
115 } while (0)
116
111extern marker_probe_func __mark_empty_function; 117extern marker_probe_func __mark_empty_function;
112 118
113extern void marker_probe_cb(const struct marker *mdata, 119extern void marker_probe_cb(const struct marker *mdata,
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 04075628cb9a..8b1c4295848b 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -25,18 +25,20 @@ struct page_cgroup;
25struct page; 25struct page;
26struct mm_struct; 26struct mm_struct;
27 27
28#ifdef CONFIG_CGROUP_MEM_CONT 28#ifdef CONFIG_CGROUP_MEM_RES_CTLR
29 29
30extern void mm_init_cgroup(struct mm_struct *mm, struct task_struct *p); 30extern void mm_init_cgroup(struct mm_struct *mm, struct task_struct *p);
31extern void mm_free_cgroup(struct mm_struct *mm); 31extern void mm_free_cgroup(struct mm_struct *mm);
32extern void page_assign_page_cgroup(struct page *page, 32
33 struct page_cgroup *pc); 33#define page_reset_bad_cgroup(page) ((page)->page_cgroup = 0)
34
34extern struct page_cgroup *page_get_page_cgroup(struct page *page); 35extern struct page_cgroup *page_get_page_cgroup(struct page *page);
35extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm, 36extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm,
36 gfp_t gfp_mask); 37 gfp_t gfp_mask);
37extern void mem_cgroup_uncharge(struct page_cgroup *pc); 38extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
39 gfp_t gfp_mask);
38extern void mem_cgroup_uncharge_page(struct page *page); 40extern void mem_cgroup_uncharge_page(struct page *page);
39extern void mem_cgroup_move_lists(struct page_cgroup *pc, bool active); 41extern void mem_cgroup_move_lists(struct page *page, bool active);
40extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, 42extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
41 struct list_head *dst, 43 struct list_head *dst,
42 unsigned long *scanned, int order, 44 unsigned long *scanned, int order,
@@ -44,11 +46,9 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
44 struct mem_cgroup *mem_cont, 46 struct mem_cgroup *mem_cont,
45 int active); 47 int active);
46extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); 48extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask);
47extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
48 gfp_t gfp_mask);
49int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); 49int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem);
50 50
51#define vm_match_cgroup(mm, cgroup) \ 51#define mm_match_cgroup(mm, cgroup) \
52 ((cgroup) == rcu_dereference((mm)->mem_cgroup)) 52 ((cgroup) == rcu_dereference((mm)->mem_cgroup))
53 53
54extern int mem_cgroup_prepare_migration(struct page *page); 54extern int mem_cgroup_prepare_migration(struct page *page);
@@ -72,7 +72,7 @@ extern long mem_cgroup_calc_reclaim_active(struct mem_cgroup *mem,
72extern long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem, 72extern long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem,
73 struct zone *zone, int priority); 73 struct zone *zone, int priority);
74 74
75#else /* CONFIG_CGROUP_MEM_CONT */ 75#else /* CONFIG_CGROUP_MEM_RES_CTLR */
76static inline void mm_init_cgroup(struct mm_struct *mm, 76static inline void mm_init_cgroup(struct mm_struct *mm,
77 struct task_struct *p) 77 struct task_struct *p)
78{ 78{
@@ -82,8 +82,7 @@ static inline void mm_free_cgroup(struct mm_struct *mm)
82{ 82{
83} 83}
84 84
85static inline void page_assign_page_cgroup(struct page *page, 85static inline void page_reset_bad_cgroup(struct page *page)
86 struct page_cgroup *pc)
87{ 86{
88} 87}
89 88
@@ -92,33 +91,27 @@ static inline struct page_cgroup *page_get_page_cgroup(struct page *page)
92 return NULL; 91 return NULL;
93} 92}
94 93
95static inline int mem_cgroup_charge(struct page *page, struct mm_struct *mm, 94static inline int mem_cgroup_charge(struct page *page,
96 gfp_t gfp_mask) 95 struct mm_struct *mm, gfp_t gfp_mask)
97{ 96{
98 return 0; 97 return 0;
99} 98}
100 99
101static inline void mem_cgroup_uncharge(struct page_cgroup *pc) 100static inline int mem_cgroup_cache_charge(struct page *page,
101 struct mm_struct *mm, gfp_t gfp_mask)
102{ 102{
103 return 0;
103} 104}
104 105
105static inline void mem_cgroup_uncharge_page(struct page *page) 106static inline void mem_cgroup_uncharge_page(struct page *page)
106{ 107{
107} 108}
108 109
109static inline void mem_cgroup_move_lists(struct page_cgroup *pc, 110static inline void mem_cgroup_move_lists(struct page *page, bool active)
110 bool active)
111{
112}
113
114static inline int mem_cgroup_cache_charge(struct page *page,
115 struct mm_struct *mm,
116 gfp_t gfp_mask)
117{ 111{
118 return 0;
119} 112}
120 113
121static inline int vm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) 114static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem)
122{ 115{
123 return 1; 116 return 1;
124} 117}
diff --git a/include/linux/memstick.h b/include/linux/memstick.h
index 334d059d6794..3e686ec6a967 100644
--- a/include/linux/memstick.h
+++ b/include/linux/memstick.h
@@ -22,6 +22,8 @@ struct ms_status_register {
22 unsigned char reserved; 22 unsigned char reserved;
23 unsigned char interrupt; 23 unsigned char interrupt;
24#define MEMSTICK_INT_CMDNAK 0x0001 24#define MEMSTICK_INT_CMDNAK 0x0001
25#define MEMSTICK_INT_IOREQ 0x0008
26#define MEMSTICK_INT_IOBREQ 0x0010
25#define MEMSTICK_INT_BREQ 0x0020 27#define MEMSTICK_INT_BREQ 0x0020
26#define MEMSTICK_INT_ERR 0x0040 28#define MEMSTICK_INT_ERR 0x0040
27#define MEMSTICK_INT_CED 0x0080 29#define MEMSTICK_INT_CED 0x0080
@@ -47,13 +49,17 @@ struct ms_status_register {
47 49
48struct ms_id_register { 50struct ms_id_register {
49 unsigned char type; 51 unsigned char type;
50 unsigned char reserved; 52 unsigned char if_mode;
51 unsigned char category; 53 unsigned char category;
52 unsigned char class; 54 unsigned char class;
53} __attribute__((packed)); 55} __attribute__((packed));
54 56
55struct ms_param_register { 57struct ms_param_register {
56 unsigned char system; 58 unsigned char system;
59#define MEMSTICK_SYS_ATEN 0xc0
60#define MEMSTICK_SYS_BAMD 0x80
61#define MEMSTICK_SYS_PAM 0x08
62
57 unsigned char block_address_msb; 63 unsigned char block_address_msb;
58 unsigned short block_address; 64 unsigned short block_address;
59 unsigned char cp; 65 unsigned char cp;
@@ -90,16 +96,48 @@ struct ms_register {
90 96
91struct mspro_param_register { 97struct mspro_param_register {
92 unsigned char system; 98 unsigned char system;
99#define MEMSTICK_SYS_SERIAL 0x80
100#define MEMSTICK_SYS_PAR4 0x00
101#define MEMSTICK_SYS_PAR8 0x40
102
103 unsigned short data_count;
104 unsigned int data_address;
105 unsigned char tpc_param;
106} __attribute__((packed));
107
108struct mspro_io_info_register {
109 unsigned char version;
110 unsigned char io_category;
111 unsigned char current_req;
112 unsigned char card_opt_info;
113 unsigned char rdy_wait_time;
114} __attribute__((packed));
115
116struct mspro_io_func_register {
117 unsigned char func_enable;
118 unsigned char func_select;
119 unsigned char func_intmask;
120 unsigned char transfer_mode;
121} __attribute__((packed));
122
123struct mspro_io_cmd_register {
124 unsigned short tpc_param;
93 unsigned short data_count; 125 unsigned short data_count;
94 unsigned int data_address; 126 unsigned int data_address;
95 unsigned char cmd_param;
96} __attribute__((packed)); 127} __attribute__((packed));
97 128
98struct mspro_register { 129struct mspro_register {
99 struct ms_status_register status; 130 struct ms_status_register status;
100 struct ms_id_register id; 131 struct ms_id_register id;
101 unsigned char reserved[8]; 132 unsigned char reserved0[8];
102 struct mspro_param_register param; 133 struct mspro_param_register param;
134 unsigned char reserved1[8];
135 struct mspro_io_info_register io_info;
136 struct mspro_io_func_register io_func;
137 unsigned char reserved2[7];
138 struct mspro_io_cmd_register io_cmd;
139 unsigned char io_int;
140 unsigned char io_int_func;
103} __attribute__((packed)); 141} __attribute__((packed));
104 142
105struct ms_register_addr { 143struct ms_register_addr {
@@ -110,49 +148,55 @@ struct ms_register_addr {
110} __attribute__((packed)); 148} __attribute__((packed));
111 149
112enum { 150enum {
151 MS_TPC_READ_MG_STATUS = 0x01,
113 MS_TPC_READ_LONG_DATA = 0x02, 152 MS_TPC_READ_LONG_DATA = 0x02,
114 MS_TPC_READ_SHORT_DATA = 0x03, 153 MS_TPC_READ_SHORT_DATA = 0x03,
154 MS_TPC_READ_MG_DATA = 0x03,
115 MS_TPC_READ_REG = 0x04, 155 MS_TPC_READ_REG = 0x04,
116 MS_TPC_READ_IO_DATA = 0x05, /* unverified */ 156 MS_TPC_READ_QUAD_DATA = 0x05,
157 MS_TPC_READ_IO_DATA = 0x05,
117 MS_TPC_GET_INT = 0x07, 158 MS_TPC_GET_INT = 0x07,
118 MS_TPC_SET_RW_REG_ADRS = 0x08, 159 MS_TPC_SET_RW_REG_ADRS = 0x08,
119 MS_TPC_EX_SET_CMD = 0x09, 160 MS_TPC_EX_SET_CMD = 0x09,
120 MS_TPC_WRITE_IO_DATA = 0x0a, /* unverified */ 161 MS_TPC_WRITE_QUAD_DATA = 0x0a,
162 MS_TPC_WRITE_IO_DATA = 0x0a,
121 MS_TPC_WRITE_REG = 0x0b, 163 MS_TPC_WRITE_REG = 0x0b,
122 MS_TPC_WRITE_SHORT_DATA = 0x0c, 164 MS_TPC_WRITE_SHORT_DATA = 0x0c,
165 MS_TPC_WRITE_MG_DATA = 0x0c,
123 MS_TPC_WRITE_LONG_DATA = 0x0d, 166 MS_TPC_WRITE_LONG_DATA = 0x0d,
124 MS_TPC_SET_CMD = 0x0e 167 MS_TPC_SET_CMD = 0x0e
125}; 168};
126 169
127enum { 170enum {
128 MS_CMD_BLOCK_END = 0x33, 171 MS_CMD_BLOCK_END = 0x33,
129 MS_CMD_RESET = 0x3c, 172 MS_CMD_RESET = 0x3c,
130 MS_CMD_BLOCK_WRITE = 0x55, 173 MS_CMD_BLOCK_WRITE = 0x55,
131 MS_CMD_SLEEP = 0x5a, 174 MS_CMD_SLEEP = 0x5a,
132 MS_CMD_BLOCK_ERASE = 0x99, 175 MS_CMD_BLOCK_ERASE = 0x99,
133 MS_CMD_BLOCK_READ = 0xaa, 176 MS_CMD_BLOCK_READ = 0xaa,
134 MS_CMD_CLEAR_BUF = 0xc3, 177 MS_CMD_CLEAR_BUF = 0xc3,
135 MS_CMD_FLASH_STOP = 0xcc, 178 MS_CMD_FLASH_STOP = 0xcc,
136 MSPRO_CMD_FORMAT = 0x10, 179 MS_CMD_LOAD_ID = 0x60,
137 MSPRO_CMD_SLEEP = 0x11, 180 MS_CMD_CMP_ICV = 0x7f,
138 MSPRO_CMD_READ_DATA = 0x20, 181 MSPRO_CMD_FORMAT = 0x10,
139 MSPRO_CMD_WRITE_DATA = 0x21, 182 MSPRO_CMD_SLEEP = 0x11,
140 MSPRO_CMD_READ_ATRB = 0x24, 183 MSPRO_CMD_WAKEUP = 0x12,
141 MSPRO_CMD_STOP = 0x25, 184 MSPRO_CMD_READ_DATA = 0x20,
142 MSPRO_CMD_ERASE = 0x26, 185 MSPRO_CMD_WRITE_DATA = 0x21,
143 MSPRO_CMD_SET_IBA = 0x46, 186 MSPRO_CMD_READ_ATRB = 0x24,
144 MSPRO_CMD_SET_IBD = 0x47 187 MSPRO_CMD_STOP = 0x25,
145/* 188 MSPRO_CMD_ERASE = 0x26,
146 MSPRO_CMD_RESET 189 MSPRO_CMD_READ_QUAD = 0x27,
147 MSPRO_CMD_WAKEUP 190 MSPRO_CMD_WRITE_QUAD = 0x28,
148 MSPRO_CMD_IN_IO_DATA 191 MSPRO_CMD_SET_IBD = 0x46,
149 MSPRO_CMD_OUT_IO_DATA 192 MSPRO_CMD_GET_IBD = 0x47,
150 MSPRO_CMD_READ_IO_ATRB 193 MSPRO_CMD_IN_IO_DATA = 0xb0,
151 MSPRO_CMD_IN_IO_FIFO 194 MSPRO_CMD_OUT_IO_DATA = 0xb1,
152 MSPRO_CMD_OUT_IO_FIFO 195 MSPRO_CMD_READ_IO_ATRB = 0xb2,
153 MSPRO_CMD_IN_IOM 196 MSPRO_CMD_IN_IO_FIFO = 0xb3,
154 MSPRO_CMD_OUT_IOM 197 MSPRO_CMD_OUT_IO_FIFO = 0xb4,
155*/ 198 MSPRO_CMD_IN_IOM = 0xb5,
199 MSPRO_CMD_OUT_IOM = 0xb6,
156}; 200};
157 201
158/*** Driver structures and functions ***/ 202/*** Driver structures and functions ***/
@@ -165,7 +209,8 @@ enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE };
165#define MEMSTICK_POWER_ON 1 209#define MEMSTICK_POWER_ON 1
166 210
167#define MEMSTICK_SERIAL 0 211#define MEMSTICK_SERIAL 0
168#define MEMSTICK_PARALLEL 1 212#define MEMSTICK_PAR4 1
213#define MEMSTICK_PAR8 2
169 214
170struct memstick_host; 215struct memstick_host;
171struct memstick_driver; 216struct memstick_driver;
@@ -194,12 +239,7 @@ struct memstick_request {
194 unsigned char tpc; 239 unsigned char tpc;
195 unsigned char data_dir:1, 240 unsigned char data_dir:1,
196 need_card_int:1, 241 need_card_int:1,
197 get_int_reg:1, 242 long_data:1;
198 io_type:2;
199#define MEMSTICK_IO_NONE 0
200#define MEMSTICK_IO_VAL 1
201#define MEMSTICK_IO_SG 2
202
203 unsigned char int_reg; 243 unsigned char int_reg;
204 int error; 244 int error;
205 union { 245 union {
@@ -231,8 +271,9 @@ struct memstick_host {
231 struct mutex lock; 271 struct mutex lock;
232 unsigned int id; 272 unsigned int id;
233 unsigned int caps; 273 unsigned int caps;
234#define MEMSTICK_CAP_PARALLEL 1 274#define MEMSTICK_CAP_AUTO_GET_INT 1
235#define MEMSTICK_CAP_AUTO_GET_INT 2 275#define MEMSTICK_CAP_PAR4 2
276#define MEMSTICK_CAP_PAR8 4
236 277
237 struct work_struct media_checker; 278 struct work_struct media_checker;
238 struct class_device cdev; 279 struct class_device cdev;
@@ -270,6 +311,8 @@ int memstick_add_host(struct memstick_host *host);
270void memstick_remove_host(struct memstick_host *host); 311void memstick_remove_host(struct memstick_host *host);
271void memstick_free_host(struct memstick_host *host); 312void memstick_free_host(struct memstick_host *host);
272void memstick_detect_change(struct memstick_host *host); 313void memstick_detect_change(struct memstick_host *host);
314void memstick_suspend_host(struct memstick_host *host);
315void memstick_resume_host(struct memstick_host *host);
273 316
274void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, 317void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc,
275 struct scatterlist *sg); 318 struct scatterlist *sg);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 3f3ccfe42de0..b695875d63e3 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -235,15 +235,22 @@ static inline int get_page_unless_zero(struct page *page)
235struct page *vmalloc_to_page(const void *addr); 235struct page *vmalloc_to_page(const void *addr);
236unsigned long vmalloc_to_pfn(const void *addr); 236unsigned long vmalloc_to_pfn(const void *addr);
237 237
238#ifdef CONFIG_MMU 238/*
239/* Determine if an address is within the vmalloc range */ 239 * Determine if an address is within the vmalloc range
240 *
241 * On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there
242 * is no special casing required.
243 */
240static inline int is_vmalloc_addr(const void *x) 244static inline int is_vmalloc_addr(const void *x)
241{ 245{
246#ifdef CONFIG_MMU
242 unsigned long addr = (unsigned long)x; 247 unsigned long addr = (unsigned long)x;
243 248
244 return addr >= VMALLOC_START && addr < VMALLOC_END; 249 return addr >= VMALLOC_START && addr < VMALLOC_END;
245} 250#else
251 return 0;
246#endif 252#endif
253}
247 254
248static inline struct page *compound_head(struct page *page) 255static inline struct page *compound_head(struct page *page)
249{ 256{
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index bfee0bd1d435..af190ceab971 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -64,10 +64,7 @@ struct page {
64#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS 64#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
65 spinlock_t ptl; 65 spinlock_t ptl;
66#endif 66#endif
67 struct { 67 struct kmem_cache *slab; /* SLUB: Pointer to slab */
68 struct kmem_cache *slab; /* SLUB: Pointer to slab */
69 void *end; /* SLUB: end marker */
70 };
71 struct page *first_page; /* Compound tail pages */ 68 struct page *first_page; /* Compound tail pages */
72 }; 69 };
73 union { 70 union {
@@ -91,7 +88,7 @@ struct page {
91 void *virtual; /* Kernel virtual address (NULL if 88 void *virtual; /* Kernel virtual address (NULL if
92 not kmapped, ie. highmem) */ 89 not kmapped, ie. highmem) */
93#endif /* WANT_PAGE_VIRTUAL */ 90#endif /* WANT_PAGE_VIRTUAL */
94#ifdef CONFIG_CGROUP_MEM_CONT 91#ifdef CONFIG_CGROUP_MEM_RES_CTLR
95 unsigned long page_cgroup; 92 unsigned long page_cgroup;
96#endif 93#endif
97}; 94};
@@ -225,7 +222,7 @@ struct mm_struct {
225 /* aio bits */ 222 /* aio bits */
226 rwlock_t ioctx_list_lock; 223 rwlock_t ioctx_list_lock;
227 struct kioctx *ioctx_list; 224 struct kioctx *ioctx_list;
228#ifdef CONFIG_CGROUP_MEM_CONT 225#ifdef CONFIG_CGROUP_MEM_RES_CTLR
229 struct mem_cgroup *mem_cgroup; 226 struct mem_cgroup *mem_cgroup;
230#endif 227#endif
231}; 228};
diff --git a/include/linux/netfilter/nfnetlink_compat.h b/include/linux/netfilter/nfnetlink_compat.h
index 02a42d875cf7..e1451760c9cd 100644
--- a/include/linux/netfilter/nfnetlink_compat.h
+++ b/include/linux/netfilter/nfnetlink_compat.h
@@ -1,6 +1,6 @@
1#ifndef _NFNETLINK_COMPAT_H 1#ifndef _NFNETLINK_COMPAT_H
2#define _NFNETLINK_COMPAT_H 2#define _NFNETLINK_COMPAT_H
3#ifndef __KERNEL 3#ifndef __KERNEL__
4/* Old nfnetlink macros for userspace */ 4/* Old nfnetlink macros for userspace */
5 5
6/* nfnetlink groups: Up to 32 maximum */ 6/* nfnetlink groups: Up to 32 maximum */
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index a0525a1f4715..e3d79593fb3a 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -25,6 +25,7 @@ struct netpoll {
25 25
26struct netpoll_info { 26struct netpoll_info {
27 atomic_t refcnt; 27 atomic_t refcnt;
28 int rx_flags;
28 spinlock_t rx_lock; 29 spinlock_t rx_lock;
29 struct netpoll *rx_np; /* netpoll that registered an rx_hook */ 30 struct netpoll *rx_np; /* netpoll that registered an rx_hook */
30 struct sk_buff_head arp_tx; /* list of arp requests to reply to */ 31 struct sk_buff_head arp_tx; /* list of arp requests to reply to */
@@ -50,12 +51,12 @@ static inline int netpoll_rx(struct sk_buff *skb)
50 unsigned long flags; 51 unsigned long flags;
51 int ret = 0; 52 int ret = 0;
52 53
53 if (!npinfo || !npinfo->rx_np) 54 if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags))
54 return 0; 55 return 0;
55 56
56 spin_lock_irqsave(&npinfo->rx_lock, flags); 57 spin_lock_irqsave(&npinfo->rx_lock, flags);
57 /* check rx_np again with the lock held */ 58 /* check rx_flags again with the lock held */
58 if (npinfo->rx_np && __netpoll_rx(skb)) 59 if (npinfo->rx_flags && __netpoll_rx(skb))
59 ret = 1; 60 ret = 1;
60 spin_unlock_irqrestore(&npinfo->rx_lock, flags); 61 spin_unlock_irqrestore(&npinfo->rx_lock, flags);
61 62
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index a69ba80f2dfe..f4a0e4c218df 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -195,6 +195,7 @@ struct nfs_inode {
195#define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ 195#define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */
196#define NFS_INO_STALE (2) /* possible stale inode */ 196#define NFS_INO_STALE (2) /* possible stale inode */
197#define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ 197#define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */
198#define NFS_INO_MOUNTPOINT (4) /* inode is remote mountpoint */
198 199
199static inline struct nfs_inode *NFS_I(const struct inode *inode) 200static inline struct nfs_inode *NFS_I(const struct inode *inode)
200{ 201{
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 87195b62de52..ea760e519c46 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -278,6 +278,7 @@ struct pci_bus {
278 struct device dev; 278 struct device dev;
279 struct bin_attribute *legacy_io; /* legacy I/O for this bus */ 279 struct bin_attribute *legacy_io; /* legacy I/O for this bus */
280 struct bin_attribute *legacy_mem; /* legacy mem */ 280 struct bin_attribute *legacy_mem; /* legacy mem */
281 unsigned int is_added:1;
281}; 282};
282 283
283#define pci_bus_b(n) list_entry(n, struct pci_bus, node) 284#define pci_bus_b(n) list_entry(n, struct pci_bus, node)
@@ -389,6 +390,16 @@ struct pci_driver {
389#define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) 390#define to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
390 391
391/** 392/**
393 * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table
394 * @_table: device table name
395 *
396 * This macro is used to create a struct pci_device_id array (a device table)
397 * in a generic manner.
398 */
399#define DEFINE_PCI_DEVICE_TABLE(_table) \
400 const struct pci_device_id _table[] __devinitconst
401
402/**
392 * PCI_DEVICE - macro used to describe a specific pci device 403 * PCI_DEVICE - macro used to describe a specific pci device
393 * @vend: the 16 bit PCI Vendor ID 404 * @vend: the 16 bit PCI Vendor ID
394 * @dev: the 16 bit PCI Device ID 405 * @dev: the 16 bit PCI Device ID
@@ -502,7 +513,6 @@ int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
502int pci_find_ext_capability(struct pci_dev *dev, int cap); 513int pci_find_ext_capability(struct pci_dev *dev, int cap);
503int pci_find_ht_capability(struct pci_dev *dev, int ht_cap); 514int pci_find_ht_capability(struct pci_dev *dev, int ht_cap);
504int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap); 515int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap);
505void pcie_wait_pending_transaction(struct pci_dev *dev);
506struct pci_bus *pci_find_next_bus(const struct pci_bus *from); 516struct pci_bus *pci_find_next_bus(const struct pci_bus *from);
507 517
508struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, 518struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device,
@@ -873,9 +883,6 @@ static inline int pci_find_ext_capability(struct pci_dev *dev, int cap)
873 return 0; 883 return 0;
874} 884}
875 885
876static inline void pcie_wait_pending_transaction(struct pci_dev *dev)
877{ }
878
879/* Power management related routines */ 886/* Power management related routines */
880static inline int pci_save_state(struct pci_dev *dev) 887static inline int pci_save_state(struct pci_dev *dev)
881{ 888{
@@ -1034,6 +1041,8 @@ void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
1034void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); 1041void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
1035void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); 1042void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
1036int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); 1043int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
1044int pcim_iomap_regions_request_all(struct pci_dev *pdev, u16 mask,
1045 const char *name);
1037void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask); 1046void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask);
1038 1047
1039extern int pci_pci_problems; 1048extern int pci_pci_problems;
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index effdb558a588..70eb3c803d47 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2184,6 +2184,7 @@
2184#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 2184#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
2185#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 2185#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368
2186#define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 2186#define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381
2187#define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383
2187 2188
2188#define PCI_VENDOR_ID_KORENIX 0x1982 2189#define PCI_VENDOR_ID_KORENIX 0x1982
2189#define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 2190#define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
index 28dfc61cf79e..99efbed81fa2 100644
--- a/include/linux/pkt_cls.h
+++ b/include/linux/pkt_cls.h
@@ -201,8 +201,8 @@ enum
201 201
202struct tc_u32_key 202struct tc_u32_key
203{ 203{
204 __u32 mask; 204 __be32 mask;
205 __u32 val; 205 __be32 val;
206 int off; 206 int off;
207 int offmask; 207 int offmask;
208}; 208};
@@ -213,12 +213,12 @@ struct tc_u32_sel
213 unsigned char offshift; 213 unsigned char offshift;
214 unsigned char nkeys; 214 unsigned char nkeys;
215 215
216 __u16 offmask; 216 __be16 offmask;
217 __u16 off; 217 __u16 off;
218 short offoff; 218 short offoff;
219 219
220 short hoff; 220 short hoff;
221 __u32 hmask; 221 __be32 hmask;
222 struct tc_u32_key keys[0]; 222 struct tc_u32_key keys[0];
223}; 223};
224 224
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index 4c5f65392d36..cafe98d96948 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -147,8 +147,15 @@ extern void pmu_wait_complete(struct adb_request *req);
147/* For use before switching interrupts off for a long time; 147/* For use before switching interrupts off for a long time;
148 * warning: not stackable 148 * warning: not stackable
149 */ 149 */
150#if defined(CONFIG_ADB_PMU)
150extern void pmu_suspend(void); 151extern void pmu_suspend(void);
151extern void pmu_resume(void); 152extern void pmu_resume(void);
153#else
154static inline void pmu_suspend(void)
155{}
156static inline void pmu_resume(void)
157{}
158#endif
152 159
153extern void pmu_enable_irled(int on); 160extern void pmu_enable_irled(int on);
154 161
@@ -192,7 +199,7 @@ extern unsigned int pmu_power_flags;
192extern void pmu_backlight_init(void); 199extern void pmu_backlight_init(void);
193 200
194/* some code needs to know if the PMU was suspended for hibernation */ 201/* some code needs to know if the PMU was suspended for hibernation */
195#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) 202#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
196extern int pmu_sys_suspended; 203extern int pmu_sys_suspended;
197#else 204#else
198/* if power management is not configured it can't be suspended */ 205/* if power management is not configured it can't be suspended */
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index cd6332b88829..29dd55838e84 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -14,7 +14,7 @@
14#include <linux/mod_devicetable.h> 14#include <linux/mod_devicetable.h>
15 15
16#define PNP_MAX_PORT 40 16#define PNP_MAX_PORT 40
17#define PNP_MAX_MEM 12 17#define PNP_MAX_MEM 24
18#define PNP_MAX_IRQ 2 18#define PNP_MAX_IRQ 2
19#define PNP_MAX_DMA 2 19#define PNP_MAX_DMA 2
20#define PNP_NAME_LEN 50 20#define PNP_NAME_LEN 50
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index d9a9e718ad19..9b6c935f69cf 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -50,8 +50,6 @@ typedef int (read_proc_t)(char *page, char **start, off_t off,
50typedef int (write_proc_t)(struct file *file, const char __user *buffer, 50typedef int (write_proc_t)(struct file *file, const char __user *buffer,
51 unsigned long count, void *data); 51 unsigned long count, void *data);
52typedef int (get_info_t)(char *, char **, off_t, int); 52typedef int (get_info_t)(char *, char **, off_t, int);
53typedef struct proc_dir_entry *(shadow_proc_t)(struct task_struct *task,
54 struct proc_dir_entry *pde);
55 53
56struct proc_dir_entry { 54struct proc_dir_entry {
57 unsigned int low_ino; 55 unsigned int low_ino;
@@ -82,7 +80,6 @@ struct proc_dir_entry {
82 int pde_users; /* number of callers into module in progress */ 80 int pde_users; /* number of callers into module in progress */
83 spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ 81 spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */
84 struct completion *pde_unload_completion; 82 struct completion *pde_unload_completion;
85 shadow_proc_t *shadow_proc;
86}; 83};
87 84
88struct kcore_list { 85struct kcore_list {
diff --git a/include/linux/ps2esdi.h b/include/linux/ps2esdi.h
deleted file mode 100644
index c0e050b1dfe9..000000000000
--- a/include/linux/ps2esdi.h
+++ /dev/null
@@ -1,98 +0,0 @@
1#ifndef _PS2ESDI_H_
2#define _PS2ESDI_H_
3
4#define NRML_ESDI_ID 0xddff
5#define INTG_ESDI_ID 0xdf9f
6
7#define PRIMARY_IO_BASE 0x3510
8#define ALT_IO_BASE 0x3518
9
10#define ESDI_CMD_INT (io_base+0)
11#define ESDI_STT_INT (io_base+0)
12#define ESDI_CONTROL (io_base+2)
13#define ESDI_STATUS (io_base+2)
14#define ESDI_ATTN (io_base+3)
15#define ESDI_INTRPT (io_base+3)
16
17#define STATUS_ENABLED 0x01
18#define STATUS_ALTERNATE 0x02
19#define STATUS_BUSY 0x10
20#define STATUS_STAT_AVAIL 0x08
21#define STATUS_INTR 0x01
22#define STATUS_RESET_FAIL 0xea
23#define STATUS_CMD_INF 0x04
24
25#define CTRL_SOFT_RESET 0xe4
26#define CTRL_HARD_RESET 0x80
27#define CTRL_EOI 0xe2
28#define CTRL_ENABLE_DMA 0x02
29#define CTRL_ENABLE_INTR 0x01
30#define CTRL_DISABLE_INTR 0x00
31
32#define ATT_EOI 0x02
33
34/* bits of word 0 of configuration status block. more info see p.38 of tech ref */
35#define CONFIG_IS 0x10 /* Invalid Secondary */
36#define CONFIG_ZD 0x08 /* Zero Defect */
37#define CONFIG_SF 0x04 /* Skewed Format */
38#define CONFIG_FR 0x02 /* Removable */
39#define CONFIG_RT 0x01 /* Retries */
40
41#define PORT_SYS_A 0x92
42#define PORT_DMA_FN 0x18
43#define PORT_DMA_EX 0x1a
44
45#define ON (unsigned char)0x40
46#define OFF (unsigned char)~ON
47#define LITE_ON outb(inb(PORT_SYS_A) | ON,PORT_SYS_A)
48#define LITE_OFF outb((inb(PORT_SYS_A) & OFF),PORT_SYS_A)
49
50#define FAIL 0
51#define SUCCES 1
52
53#define INT_CMD_COMPLETE 0x01
54#define INT_CMD_ECC 0x03
55#define INT_CMD_RETRY 0x05
56#define INT_CMD_FORMAT 0x06
57#define INT_CMD_ECC_RETRY 0x07
58#define INT_CMD_WARNING 0x08
59#define INT_CMD_ABORT 0x09
60#define INT_RESET 0x0A
61#define INT_TRANSFER_REQ 0x0B
62#define INT_CMD_FAILED 0x0C
63#define INT_DMA_ERR 0x0D
64#define INT_CMD_BLK_ERR 0x0E
65#define INT_ATTN_ERROR 0x0F
66
67#define DMA_MASK_CHAN 0x90
68#define DMA_UNMASK_CHAN 0xA0
69#define DMA_WRITE_ADDR 0x20
70#define DMA_WRITE_TC 0x40
71#define DMA_WRITE_MODE 0x70
72
73#define CMD_GET_DEV_CONFIG 0x09
74#define CMD_READ 0x4601
75#define CMD_WRITE 0x4602
76#define DMA_READ_16 0x4C
77#define DMA_WRITE_16 0x44
78
79
80#define MB 1024*1024
81#define SECT_SIZE 512
82
83#define ERROR 1
84#define OK 0
85
86#define HDIO_GETGEO 0x0301
87
88#define FALSE 0
89#define TRUE !FALSE
90
91struct ps2esdi_geometry {
92 unsigned char heads;
93 unsigned char sectors;
94 unsigned short cylinders;
95 unsigned long start;
96};
97
98#endif /* _PS2ESDI_H_ */
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h
index e51b531cd0b2..47fbcba11850 100644
--- a/include/linux/raid/bitmap.h
+++ b/include/linux/raid/bitmap.h
@@ -235,6 +235,8 @@ struct bitmap {
235 235
236 unsigned long flags; 236 unsigned long flags;
237 237
238 int allclean;
239
238 unsigned long max_write_behind; /* write-behind mode */ 240 unsigned long max_write_behind; /* write-behind mode */
239 atomic_t behind_writes; 241 atomic_t behind_writes;
240 242
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 85a068bab625..7bb6d1abf71e 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -83,6 +83,7 @@ struct mdk_rdev_s
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 84#define AllReserved 6 /* If whole device is reserved for
85 * one array */ 85 * one array */
86#define AutoDetected 7 /* added by auto-detect */
86 87
87 int desc_nr; /* descriptor index in the superblock */ 88 int desc_nr; /* descriptor index in the superblock */
88 int raid_disk; /* role of device in array */ 89 int raid_disk; /* role of device in array */
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
index 01152ed532c8..d038aa6e5ee1 100644
--- a/include/linux/rcupreempt.h
+++ b/include/linux/rcupreempt.h
@@ -87,15 +87,15 @@ DECLARE_PER_CPU(long, dynticks_progress_counter);
87 87
88static inline void rcu_enter_nohz(void) 88static inline void rcu_enter_nohz(void)
89{ 89{
90 smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */
90 __get_cpu_var(dynticks_progress_counter)++; 91 __get_cpu_var(dynticks_progress_counter)++;
91 WARN_ON(__get_cpu_var(dynticks_progress_counter) & 0x1); 92 WARN_ON(__get_cpu_var(dynticks_progress_counter) & 0x1);
92 mb();
93} 93}
94 94
95static inline void rcu_exit_nohz(void) 95static inline void rcu_exit_nohz(void)
96{ 96{
97 mb();
98 __get_cpu_var(dynticks_progress_counter)++; 97 __get_cpu_var(dynticks_progress_counter)++;
98 smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
99 WARN_ON(!(__get_cpu_var(dynticks_progress_counter) & 0x1)); 99 WARN_ON(!(__get_cpu_var(dynticks_progress_counter) & 0x1));
100} 100}
101 101
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2c9621f8bf87..6a1e7afb099b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -790,6 +790,7 @@ struct sched_domain {
790}; 790};
791 791
792extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new); 792extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new);
793extern int arch_reinit_sched_domains(void);
793 794
794#endif /* CONFIG_SMP */ 795#endif /* CONFIG_SMP */
795 796
@@ -899,6 +900,10 @@ struct sched_class {
899 int running); 900 int running);
900 void (*prio_changed) (struct rq *this_rq, struct task_struct *task, 901 void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
901 int oldprio, int running); 902 int oldprio, int running);
903
904#ifdef CONFIG_FAIR_GROUP_SCHED
905 void (*moved_group) (struct task_struct *p);
906#endif
902}; 907};
903 908
904struct load_weight { 909struct load_weight {
@@ -925,6 +930,9 @@ struct sched_entity {
925 u64 vruntime; 930 u64 vruntime;
926 u64 prev_sum_exec_runtime; 931 u64 prev_sum_exec_runtime;
927 932
933 u64 last_wakeup;
934 u64 avg_overlap;
935
928#ifdef CONFIG_SCHEDSTATS 936#ifdef CONFIG_SCHEDSTATS
929 u64 wait_start; 937 u64 wait_start;
930 u64 wait_max; 938 u64 wait_max;
@@ -1533,6 +1541,12 @@ static inline void idle_task_exit(void) {}
1533 1541
1534extern void sched_idle_next(void); 1542extern void sched_idle_next(void);
1535 1543
1544#if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
1545extern void wake_up_idle_cpu(int cpu);
1546#else
1547static inline void wake_up_idle_cpu(int cpu) { }
1548#endif
1549
1536#ifdef CONFIG_SCHED_DEBUG 1550#ifdef CONFIG_SCHED_DEBUG
1537extern unsigned int sysctl_sched_latency; 1551extern unsigned int sysctl_sched_latency;
1538extern unsigned int sysctl_sched_min_granularity; 1552extern unsigned int sysctl_sched_min_granularity;
@@ -1542,10 +1556,6 @@ extern unsigned int sysctl_sched_child_runs_first;
1542extern unsigned int sysctl_sched_features; 1556extern unsigned int sysctl_sched_features;
1543extern unsigned int sysctl_sched_migration_cost; 1557extern unsigned int sysctl_sched_migration_cost;
1544extern unsigned int sysctl_sched_nr_migrate; 1558extern unsigned int sysctl_sched_nr_migrate;
1545#if defined(CONFIG_FAIR_GROUP_SCHED) && defined(CONFIG_SMP)
1546extern unsigned int sysctl_sched_min_bal_int_shares;
1547extern unsigned int sysctl_sched_max_bal_int_shares;
1548#endif
1549 1559
1550int sched_nr_latency_handler(struct ctl_table *table, int write, 1560int sched_nr_latency_handler(struct ctl_table *table, int write,
1551 struct file *file, void __user *buffer, size_t *length, 1561 struct file *file, void __user *buffer, size_t *length,
diff --git a/include/linux/security.h b/include/linux/security.h
index fe52cdeab0a6..c673dfd4dffc 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -34,12 +34,6 @@
34#include <linux/xfrm.h> 34#include <linux/xfrm.h>
35#include <net/flow.h> 35#include <net/flow.h>
36 36
37/* only a char in selinux superblock security struct flags */
38#define FSCONTEXT_MNT 0x01
39#define CONTEXT_MNT 0x02
40#define ROOTCONTEXT_MNT 0x04
41#define DEFCONTEXT_MNT 0x08
42
43extern unsigned securebits; 37extern unsigned securebits;
44 38
45struct ctl_table; 39struct ctl_table;
@@ -63,7 +57,6 @@ extern int cap_inode_need_killpriv(struct dentry *dentry);
63extern int cap_inode_killpriv(struct dentry *dentry); 57extern int cap_inode_killpriv(struct dentry *dentry);
64extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags); 58extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
65extern void cap_task_reparent_to_init (struct task_struct *p); 59extern void cap_task_reparent_to_init (struct task_struct *p);
66extern int cap_task_kill(struct task_struct *p, struct siginfo *info, int sig, u32 secid);
67extern int cap_task_setscheduler (struct task_struct *p, int policy, struct sched_param *lp); 60extern int cap_task_setscheduler (struct task_struct *p, int policy, struct sched_param *lp);
68extern int cap_task_setioprio (struct task_struct *p, int ioprio); 61extern int cap_task_setioprio (struct task_struct *p, int ioprio);
69extern int cap_task_setnice (struct task_struct *p, int nice); 62extern int cap_task_setnice (struct task_struct *p, int nice);
@@ -114,6 +107,32 @@ struct request_sock;
114 107
115#ifdef CONFIG_SECURITY 108#ifdef CONFIG_SECURITY
116 109
110struct security_mnt_opts {
111 char **mnt_opts;
112 int *mnt_opts_flags;
113 int num_mnt_opts;
114};
115
116static inline void security_init_mnt_opts(struct security_mnt_opts *opts)
117{
118 opts->mnt_opts = NULL;
119 opts->mnt_opts_flags = NULL;
120 opts->num_mnt_opts = 0;
121}
122
123static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
124{
125 int i;
126 if (opts->mnt_opts)
127 for(i = 0; i < opts->num_mnt_opts; i++)
128 kfree(opts->mnt_opts[i]);
129 kfree(opts->mnt_opts);
130 opts->mnt_opts = NULL;
131 kfree(opts->mnt_opts_flags);
132 opts->mnt_opts_flags = NULL;
133 opts->num_mnt_opts = 0;
134}
135
117/** 136/**
118 * struct security_operations - main security structure 137 * struct security_operations - main security structure
119 * 138 *
@@ -262,19 +281,19 @@ struct request_sock;
262 * @sb_get_mnt_opts: 281 * @sb_get_mnt_opts:
263 * Get the security relevant mount options used for a superblock 282 * Get the security relevant mount options used for a superblock
264 * @sb the superblock to get security mount options from 283 * @sb the superblock to get security mount options from
265 * @mount_options array for pointers to mount options 284 * @opts binary data structure containing all lsm mount data
266 * @mount_flags array of ints specifying what each mount options is
267 * @num_opts number of options in the arrays
268 * @sb_set_mnt_opts: 285 * @sb_set_mnt_opts:
269 * Set the security relevant mount options used for a superblock 286 * Set the security relevant mount options used for a superblock
270 * @sb the superblock to set security mount options for 287 * @sb the superblock to set security mount options for
271 * @mount_options array for pointers to mount options 288 * @opts binary data structure containing all lsm mount data
272 * @mount_flags array of ints specifying what each mount options is
273 * @num_opts number of options in the arrays
274 * @sb_clone_mnt_opts: 289 * @sb_clone_mnt_opts:
275 * Copy all security options from a given superblock to another 290 * Copy all security options from a given superblock to another
276 * @oldsb old superblock which contain information to clone 291 * @oldsb old superblock which contain information to clone
277 * @newsb new superblock which needs filled in 292 * @newsb new superblock which needs filled in
293 * @sb_parse_opts_str:
294 * Parse a string of security data filling in the opts structure
295 * @options string containing all mount options known by the LSM
296 * @opts binary data structure usable by the LSM
278 * 297 *
279 * Security hooks for inode operations. 298 * Security hooks for inode operations.
280 * 299 *
@@ -1238,8 +1257,7 @@ struct security_operations {
1238 1257
1239 int (*sb_alloc_security) (struct super_block * sb); 1258 int (*sb_alloc_security) (struct super_block * sb);
1240 void (*sb_free_security) (struct super_block * sb); 1259 void (*sb_free_security) (struct super_block * sb);
1241 int (*sb_copy_data)(struct file_system_type *type, 1260 int (*sb_copy_data)(char *orig, char *copy);
1242 void *orig, void *copy);
1243 int (*sb_kern_mount) (struct super_block *sb, void *data); 1261 int (*sb_kern_mount) (struct super_block *sb, void *data);
1244 int (*sb_statfs) (struct dentry *dentry); 1262 int (*sb_statfs) (struct dentry *dentry);
1245 int (*sb_mount) (char *dev_name, struct nameidata * nd, 1263 int (*sb_mount) (char *dev_name, struct nameidata * nd,
@@ -1257,12 +1275,12 @@ struct security_operations {
1257 void (*sb_post_pivotroot) (struct nameidata * old_nd, 1275 void (*sb_post_pivotroot) (struct nameidata * old_nd,
1258 struct nameidata * new_nd); 1276 struct nameidata * new_nd);
1259 int (*sb_get_mnt_opts) (const struct super_block *sb, 1277 int (*sb_get_mnt_opts) (const struct super_block *sb,
1260 char ***mount_options, int **flags, 1278 struct security_mnt_opts *opts);
1261 int *num_opts); 1279 int (*sb_set_mnt_opts) (struct super_block *sb,
1262 int (*sb_set_mnt_opts) (struct super_block *sb, char **mount_options, 1280 struct security_mnt_opts *opts);
1263 int *flags, int num_opts);
1264 void (*sb_clone_mnt_opts) (const struct super_block *oldsb, 1281 void (*sb_clone_mnt_opts) (const struct super_block *oldsb,
1265 struct super_block *newsb); 1282 struct super_block *newsb);
1283 int (*sb_parse_opts_str) (char *options, struct security_mnt_opts *opts);
1266 1284
1267 int (*inode_alloc_security) (struct inode *inode); 1285 int (*inode_alloc_security) (struct inode *inode);
1268 void (*inode_free_security) (struct inode *inode); 1286 void (*inode_free_security) (struct inode *inode);
@@ -1507,7 +1525,7 @@ int security_bprm_check(struct linux_binprm *bprm);
1507int security_bprm_secureexec(struct linux_binprm *bprm); 1525int security_bprm_secureexec(struct linux_binprm *bprm);
1508int security_sb_alloc(struct super_block *sb); 1526int security_sb_alloc(struct super_block *sb);
1509void security_sb_free(struct super_block *sb); 1527void security_sb_free(struct super_block *sb);
1510int security_sb_copy_data(struct file_system_type *type, void *orig, void *copy); 1528int security_sb_copy_data(char *orig, char *copy);
1511int security_sb_kern_mount(struct super_block *sb, void *data); 1529int security_sb_kern_mount(struct super_block *sb, void *data);
1512int security_sb_statfs(struct dentry *dentry); 1530int security_sb_statfs(struct dentry *dentry);
1513int security_sb_mount(char *dev_name, struct nameidata *nd, 1531int security_sb_mount(char *dev_name, struct nameidata *nd,
@@ -1520,12 +1538,12 @@ void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *d
1520void security_sb_post_addmount(struct vfsmount *mnt, struct nameidata *mountpoint_nd); 1538void security_sb_post_addmount(struct vfsmount *mnt, struct nameidata *mountpoint_nd);
1521int security_sb_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd); 1539int security_sb_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd);
1522void security_sb_post_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd); 1540void security_sb_post_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd);
1523int security_sb_get_mnt_opts(const struct super_block *sb, char ***mount_options, 1541int security_sb_get_mnt_opts(const struct super_block *sb,
1524 int **flags, int *num_opts); 1542 struct security_mnt_opts *opts);
1525int security_sb_set_mnt_opts(struct super_block *sb, char **mount_options, 1543int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts);
1526 int *flags, int num_opts);
1527void security_sb_clone_mnt_opts(const struct super_block *oldsb, 1544void security_sb_clone_mnt_opts(const struct super_block *oldsb,
1528 struct super_block *newsb); 1545 struct super_block *newsb);
1546int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts);
1529 1547
1530int security_inode_alloc(struct inode *inode); 1548int security_inode_alloc(struct inode *inode);
1531void security_inode_free(struct inode *inode); 1549void security_inode_free(struct inode *inode);
@@ -1635,6 +1653,16 @@ int security_secctx_to_secid(char *secdata, u32 seclen, u32 *secid);
1635void security_release_secctx(char *secdata, u32 seclen); 1653void security_release_secctx(char *secdata, u32 seclen);
1636 1654
1637#else /* CONFIG_SECURITY */ 1655#else /* CONFIG_SECURITY */
1656struct security_mnt_opts {
1657};
1658
1659static inline void security_init_mnt_opts(struct security_mnt_opts *opts)
1660{
1661}
1662
1663static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1664{
1665}
1638 1666
1639/* 1667/*
1640 * This is the default capabilities functionality. Most of these functions 1668 * This is the default capabilities functionality. Most of these functions
@@ -1762,8 +1790,7 @@ static inline int security_sb_alloc (struct super_block *sb)
1762static inline void security_sb_free (struct super_block *sb) 1790static inline void security_sb_free (struct super_block *sb)
1763{ } 1791{ }
1764 1792
1765static inline int security_sb_copy_data (struct file_system_type *type, 1793static inline int security_sb_copy_data (char *orig, char *copy)
1766 void *orig, void *copy)
1767{ 1794{
1768 return 0; 1795 return 0;
1769} 1796}
@@ -1819,6 +1846,27 @@ static inline int security_sb_pivotroot (struct nameidata *old_nd,
1819static inline void security_sb_post_pivotroot (struct nameidata *old_nd, 1846static inline void security_sb_post_pivotroot (struct nameidata *old_nd,
1820 struct nameidata *new_nd) 1847 struct nameidata *new_nd)
1821{ } 1848{ }
1849static inline int security_sb_get_mnt_opts(const struct super_block *sb,
1850 struct security_mnt_opts *opts)
1851{
1852 security_init_mnt_opts(opts);
1853 return 0;
1854}
1855
1856static inline int security_sb_set_mnt_opts(struct super_block *sb,
1857 struct security_mnt_opts *opts)
1858{
1859 return 0;
1860}
1861
1862static inline void security_sb_clone_mnt_opts(const struct super_block *oldsb,
1863 struct super_block *newsb)
1864{ }
1865
1866static inline int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts)
1867{
1868 return 0;
1869}
1822 1870
1823static inline int security_inode_alloc (struct inode *inode) 1871static inline int security_inode_alloc (struct inode *inode)
1824{ 1872{
@@ -2138,7 +2186,7 @@ static inline int security_task_kill (struct task_struct *p,
2138 struct siginfo *info, int sig, 2186 struct siginfo *info, int sig,
2139 u32 secid) 2187 u32 secid)
2140{ 2188{
2141 return cap_task_kill(p, info, sig, secid); 2189 return 0;
2142} 2190}
2143 2191
2144static inline int security_task_wait (struct task_struct *p) 2192static inline int security_task_wait (struct task_struct *p)
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index fcc48096ee64..39c3a5eb8ebe 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -41,7 +41,7 @@ static inline void *kmalloc(size_t size, gfp_t flags)
41 goto found; \ 41 goto found; \
42 else \ 42 else \
43 i++; 43 i++;
44#include "kmalloc_sizes.h" 44#include <linux/kmalloc_sizes.h>
45#undef CACHE 45#undef CACHE
46 { 46 {
47 extern void __you_cannot_kmalloc_that_much(void); 47 extern void __you_cannot_kmalloc_that_much(void);
@@ -75,7 +75,7 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
75 goto found; \ 75 goto found; \
76 else \ 76 else \
77 i++; 77 i++;
78#include "kmalloc_sizes.h" 78#include <linux/kmalloc_sizes.h>
79#undef CACHE 79#undef CACHE
80 { 80 {
81 extern void __you_cannot_kmalloc_that_much(void); 81 extern void __you_cannot_kmalloc_that_much(void);
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 57deecc79d52..b00c1c73eb0a 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -61,7 +61,7 @@ struct kmem_cache {
61 int size; /* The size of an object including meta data */ 61 int size; /* The size of an object including meta data */
62 int objsize; /* The size of an object without meta data */ 62 int objsize; /* The size of an object without meta data */
63 int offset; /* Free pointer offset. */ 63 int offset; /* Free pointer offset. */
64 int order; 64 int order; /* Current preferred allocation order */
65 65
66 /* 66 /*
67 * Avoid an extra cache line for UP, SMP and for the node local to 67 * Avoid an extra cache line for UP, SMP and for the node local to
@@ -138,11 +138,11 @@ static __always_inline int kmalloc_index(size_t size)
138 if (size <= 512) return 9; 138 if (size <= 512) return 9;
139 if (size <= 1024) return 10; 139 if (size <= 1024) return 10;
140 if (size <= 2 * 1024) return 11; 140 if (size <= 2 * 1024) return 11;
141 if (size <= 4 * 1024) return 12;
141/* 142/*
142 * The following is only needed to support architectures with a larger page 143 * The following is only needed to support architectures with a larger page
143 * size than 4k. 144 * size than 4k.
144 */ 145 */
145 if (size <= 4 * 1024) return 12;
146 if (size <= 8 * 1024) return 13; 146 if (size <= 8 * 1024) return 13;
147 if (size <= 16 * 1024) return 14; 147 if (size <= 16 * 1024) return 14;
148 if (size <= 32 * 1024) return 15; 148 if (size <= 32 * 1024) return 15;
diff --git a/include/linux/sm501-regs.h b/include/linux/sm501-regs.h
index 64236b73c724..d53642d2d899 100644
--- a/include/linux/sm501-regs.h
+++ b/include/linux/sm501-regs.h
@@ -129,11 +129,14 @@
129 129
130#define SM501_DEVICEID_SM501 (0x05010000) 130#define SM501_DEVICEID_SM501 (0x05010000)
131#define SM501_DEVICEID_IDMASK (0xffff0000) 131#define SM501_DEVICEID_IDMASK (0xffff0000)
132#define SM501_DEVICEID_REVMASK (0x000000ff)
132 133
133#define SM501_PLLCLOCK_COUNT (0x000064) 134#define SM501_PLLCLOCK_COUNT (0x000064)
134#define SM501_MISC_TIMING (0x000068) 135#define SM501_MISC_TIMING (0x000068)
135#define SM501_CURRENT_SDRAM_CLOCK (0x00006C) 136#define SM501_CURRENT_SDRAM_CLOCK (0x00006C)
136 137
138#define SM501_PROGRAMMABLE_PLL_CONTROL (0x000074)
139
137/* GPIO base */ 140/* GPIO base */
138#define SM501_GPIO (0x010000) 141#define SM501_GPIO (0x010000)
139#define SM501_GPIO_DATA_LOW (0x00) 142#define SM501_GPIO_DATA_LOW (0x00)
diff --git a/include/linux/sm501.h b/include/linux/sm501.h
index 932a9efee8a5..bca134544700 100644
--- a/include/linux/sm501.h
+++ b/include/linux/sm501.h
@@ -24,7 +24,8 @@ extern int sm501_unit_power(struct device *dev,
24extern unsigned long sm501_set_clock(struct device *dev, 24extern unsigned long sm501_set_clock(struct device *dev,
25 int clksrc, unsigned long freq); 25 int clksrc, unsigned long freq);
26 26
27extern unsigned long sm501_find_clock(int clksrc, unsigned long req_freq); 27extern unsigned long sm501_find_clock(struct device *dev,
28 int clksrc, unsigned long req_freq);
28 29
29/* sm501_misc_control 30/* sm501_misc_control
30 * 31 *
diff --git a/include/linux/tifm.h b/include/linux/tifm.h
index da76ed85f595..848c0f392541 100644
--- a/include/linux/tifm.h
+++ b/include/linux/tifm.h
@@ -70,9 +70,9 @@ enum {
70 70
71#define TIFM_FIFO_ENABLE 0x00000001 71#define TIFM_FIFO_ENABLE 0x00000001
72#define TIFM_FIFO_READY 0x00000001 72#define TIFM_FIFO_READY 0x00000001
73#define TIFM_FIFO_MORE 0x00000008
73#define TIFM_FIFO_INT_SETALL 0x0000ffff 74#define TIFM_FIFO_INT_SETALL 0x0000ffff
74#define TIFM_FIFO_INTMASK 0x00000005 75#define TIFM_FIFO_INTMASK 0x00000005
75#define TIFM_FIFO_SIZE 0x00000200
76 76
77#define TIFM_DMA_RESET 0x00000002 77#define TIFM_DMA_RESET 0x00000002
78#define TIFM_DMA_TX 0x00008000 78#define TIFM_DMA_TX 0x00008000
diff --git a/include/linux/time.h b/include/linux/time.h
index 2091a19f1655..d32ef0ad4c0a 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -174,6 +174,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
174{ 174{
175 ns += a->tv_nsec; 175 ns += a->tv_nsec;
176 while(unlikely(ns >= NSEC_PER_SEC)) { 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
177 ns -= NSEC_PER_SEC; 181 ns -= NSEC_PER_SEC;
178 a->tv_sec++; 182 a->tv_sec++;
179 } 183 }
diff --git a/include/linux/timex.h b/include/linux/timex.h
index c3f374786a43..8ea3e71ba7fa 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -232,14 +232,7 @@ static inline int ntp_synced(void)
232#else 232#else
233#define NTP_INTERVAL_FREQ (HZ) 233#define NTP_INTERVAL_FREQ (HZ)
234#endif 234#endif
235 235#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ)
236#define CLOCK_TICK_OVERFLOW (LATCH * HZ - CLOCK_TICK_RATE)
237#define CLOCK_TICK_ADJUST (((s64)CLOCK_TICK_OVERFLOW * NSEC_PER_SEC) / \
238 (s64)CLOCK_TICK_RATE)
239
240/* Because using NSEC_PER_SEC would be too easy */
241#define NTP_INTERVAL_LENGTH ((((s64)TICK_USEC * NSEC_PER_USEC * USER_HZ) + \
242 CLOCK_TICK_ADJUST) / NTP_INTERVAL_FREQ)
243 236
244/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ 237/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
245extern u64 current_tick_length(void); 238extern u64 current_tick_length(void);
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 2352f46160d3..bd14f8b30f09 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -50,6 +50,8 @@
50 for_each_online_node(node) \ 50 for_each_online_node(node) \
51 if (nr_cpus_node(node)) 51 if (nr_cpus_node(node))
52 52
53void arch_update_cpu_topology(void);
54
53/* Conform to ACPI 2.0 SLIT distance definitions */ 55/* Conform to ACPI 2.0 SLIT distance definitions */
54#define LOCAL_DISTANCE 10 56#define LOCAL_DISTANCE 10
55#define REMOTE_DISTANCE 20 57#define REMOTE_DISTANCE 20
@@ -138,7 +140,6 @@
138 | SD_BALANCE_FORK \ 140 | SD_BALANCE_FORK \
139 | SD_BALANCE_EXEC \ 141 | SD_BALANCE_EXEC \
140 | SD_WAKE_AFFINE \ 142 | SD_WAKE_AFFINE \
141 | SD_WAKE_IDLE \
142 | SD_SHARE_PKG_RESOURCES\ 143 | SD_SHARE_PKG_RESOURCES\
143 | BALANCE_FOR_MC_POWER, \ 144 | BALANCE_FOR_MC_POWER, \
144 .last_balance = jiffies, \ 145 .last_balance = jiffies, \
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 2372e2e6b527..583e0481dfa0 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -94,10 +94,9 @@ enum usb_interface_condition {
94 * @altsetting: array of interface structures, one for each alternate 94 * @altsetting: array of interface structures, one for each alternate
95 * setting that may be selected. Each one includes a set of 95 * setting that may be selected. Each one includes a set of
96 * endpoint configurations. They will be in no particular order. 96 * endpoint configurations. They will be in no particular order.
97 * @num_altsetting: number of altsettings defined.
98 * @cur_altsetting: the current altsetting. 97 * @cur_altsetting: the current altsetting.
98 * @num_altsetting: number of altsettings defined.
99 * @intf_assoc: interface association descriptor 99 * @intf_assoc: interface association descriptor
100 * @driver: the USB driver that is bound to this interface.
101 * @minor: the minor number assigned to this interface, if this 100 * @minor: the minor number assigned to this interface, if this
102 * interface is bound to a driver that uses the USB major number. 101 * interface is bound to a driver that uses the USB major number.
103 * If this interface does not use the USB major, this field should 102 * If this interface does not use the USB major, this field should
@@ -781,8 +780,7 @@ static inline int usb_endpoint_is_isoc_out(
781 .idVendor = (vend), \ 780 .idVendor = (vend), \
782 .idProduct = (prod) 781 .idProduct = (prod)
783/** 782/**
784 * USB_DEVICE_VER - macro used to describe a specific usb device with a 783 * USB_DEVICE_VER - describe a specific usb device with a version range
785 * version range
786 * @vend: the 16 bit USB Vendor ID 784 * @vend: the 16 bit USB Vendor ID
787 * @prod: the 16 bit USB Product ID 785 * @prod: the 16 bit USB Product ID
788 * @lo: the bcdDevice_lo value 786 * @lo: the bcdDevice_lo value
@@ -799,8 +797,7 @@ static inline int usb_endpoint_is_isoc_out(
799 .bcdDevice_hi = (hi) 797 .bcdDevice_hi = (hi)
800 798
801/** 799/**
802 * USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb 800 * USB_DEVICE_INTERFACE_PROTOCOL - describe a usb device with a specific interface protocol
803 * device with a specific interface protocol
804 * @vend: the 16 bit USB Vendor ID 801 * @vend: the 16 bit USB Vendor ID
805 * @prod: the 16 bit USB Product ID 802 * @prod: the 16 bit USB Product ID
806 * @pr: bInterfaceProtocol value 803 * @pr: bInterfaceProtocol value
@@ -846,8 +843,7 @@ static inline int usb_endpoint_is_isoc_out(
846 .bInterfaceProtocol = (pr) 843 .bInterfaceProtocol = (pr)
847 844
848/** 845/**
849 * USB_DEVICE_AND_INTERFACE_INFO - macro used to describe a specific usb device 846 * USB_DEVICE_AND_INTERFACE_INFO - describe a specific usb device with a class of usb interfaces
850 * with a class of usb interfaces
851 * @vend: the 16 bit USB Vendor ID 847 * @vend: the 16 bit USB Vendor ID
852 * @prod: the 16 bit USB Product ID 848 * @prod: the 16 bit USB Product ID
853 * @cl: bInterfaceClass value 849 * @cl: bInterfaceClass value
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild
index b8cba1dcb2c6..42e84fc315e3 100644
--- a/include/linux/usb/Kbuild
+++ b/include/linux/usb/Kbuild
@@ -3,5 +3,5 @@ header-y += cdc.h
3header-y += ch9.h 3header-y += ch9.h
4header-y += gadgetfs.h 4header-y += gadgetfs.h
5header-y += midi.h 5header-y += midi.h
6unifdef-y += g_printer.h 6header-y += g_printer.h
7 7
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index aa3047ff00d1..f3295296b435 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -15,8 +15,6 @@
15#ifndef __LINUX_USB_GADGET_H 15#ifndef __LINUX_USB_GADGET_H
16#define __LINUX_USB_GADGET_H 16#define __LINUX_USB_GADGET_H
17 17
18#ifdef __KERNEL__
19
20struct usb_ep; 18struct usb_ep;
21 19
22/** 20/**
@@ -848,6 +846,4 @@ extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,
848 846
849extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; 847extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit;
850 848
851#endif /* __KERNEL__ */
852
853#endif /* __LINUX_USB_GADGET_H */ 849#endif /* __LINUX_USB_GADGET_H */
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
index 2692ec9389ca..1f999ec8d08c 100644
--- a/include/linux/usb/quirks.h
+++ b/include/linux/usb/quirks.h
@@ -9,3 +9,6 @@
9 9
10/* device can't resume correctly so reset it instead */ 10/* device can't resume correctly so reset it instead */
11#define USB_QUIRK_RESET_RESUME 0x00000002 11#define USB_QUIRK_RESET_RESUME 0x00000002
12
13/* device can't handle Set-Interface requests */
14#define USB_QUIRK_NO_SET_INTF 0x00000004
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
index cee0623b3c7b..0a40dfa44c9f 100644
--- a/include/linux/usb_usual.h
+++ b/include/linux/usb_usual.h
@@ -50,7 +50,9 @@
50 US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ 50 US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \
51 /* sometimes sizes is too big */ \ 51 /* sometimes sizes is too big */ \
52 US_FLAG(MAX_SECTORS_MIN,0x00002000) \ 52 US_FLAG(MAX_SECTORS_MIN,0x00002000) \
53 /* Sets max_sectors to arch min */ 53 /* Sets max_sectors to arch min */ \
54 US_FLAG(BULK_IGNORE_TAG,0x00004000) \
55 /* Ignore tag mismatch in bulk operations */
54 56
55 57
56#define US_FLAG(name, value) US_FL_##name = value , 58#define US_FLAG(name, value) US_FL_##name = value ,
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 260d1fcf29a4..12c18ac1b973 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -43,8 +43,9 @@ struct virtqueue
43 * vq: the struct virtqueue we're talking about. 43 * vq: the struct virtqueue we're talking about.
44 * @enable_cb: restart callbacks after disable_cb. 44 * @enable_cb: restart callbacks after disable_cb.
45 * vq: the struct virtqueue we're talking about. 45 * vq: the struct virtqueue we're talking about.
46 * This returns "false" (and doesn't re-enable) if there are pending 46 * This re-enables callbacks; it returns "false" if there are pending
47 * buffers in the queue, to avoid a race. 47 * buffers in the queue, to detect a possible race between the driver
48 * checking for more work, and enabling callbacks.
48 * 49 *
49 * Locking rules are straightforward: the driver is responsible for 50 * Locking rules are straightforward: the driver is responsible for
50 * locking. No two operations may be invoked simultaneously. 51 * locking. No two operations may be invoked simultaneously.
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 771d17783c18..750648df13f4 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -170,7 +170,7 @@ static inline int skb_frags_no(struct sk_buff *skb)
170int bt_err(__u16 code); 170int bt_err(__u16 code);
171 171
172extern int hci_sock_init(void); 172extern int hci_sock_init(void);
173extern int hci_sock_cleanup(void); 173extern void hci_sock_cleanup(void);
174 174
175extern int bt_sysfs_init(void); 175extern int bt_sysfs_init(void);
176extern void bt_sysfs_cleanup(void); 176extern void bt_sysfs_cleanup(void);
diff --git a/include/net/dst.h b/include/net/dst.h
index e3ac7d0fc4e1..ae13370e8484 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -52,15 +52,10 @@ struct dst_entry
52 unsigned short header_len; /* more space at head required */ 52 unsigned short header_len; /* more space at head required */
53 unsigned short trailer_len; /* space to reserve at tail */ 53 unsigned short trailer_len; /* space to reserve at tail */
54 54
55 u32 metrics[RTAX_MAX];
56 struct dst_entry *path;
57
58 unsigned long rate_last; /* rate limiting for ICMP */
59 unsigned int rate_tokens; 55 unsigned int rate_tokens;
56 unsigned long rate_last; /* rate limiting for ICMP */
60 57
61#ifdef CONFIG_NET_CLS_ROUTE 58 struct dst_entry *path;
62 __u32 tclassid;
63#endif
64 59
65 struct neighbour *neighbour; 60 struct neighbour *neighbour;
66 struct hh_cache *hh; 61 struct hh_cache *hh;
@@ -70,10 +65,20 @@ struct dst_entry
70 int (*output)(struct sk_buff*); 65 int (*output)(struct sk_buff*);
71 66
72 struct dst_ops *ops; 67 struct dst_ops *ops;
73 68
74 unsigned long lastuse; 69 u32 metrics[RTAX_MAX];
70
71#ifdef CONFIG_NET_CLS_ROUTE
72 __u32 tclassid;
73#endif
74
75 /*
76 * __refcnt wants to be on a different cache line from
77 * input/output/ops or performance tanks badly
78 */
75 atomic_t __refcnt; /* client references */ 79 atomic_t __refcnt; /* client references */
76 int __use; 80 int __use;
81 unsigned long lastuse;
77 union { 82 union {
78 struct dst_entry *next; 83 struct dst_entry *next;
79 struct rtable *rt_next; 84 struct rtable *rt_next;
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 70013c5f4e59..89cd011edb99 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -175,7 +175,8 @@ extern void build_ehash_secret(void);
175static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, 175static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport,
176 const __be32 faddr, const __be16 fport) 176 const __be32 faddr, const __be16 fport)
177{ 177{
178 return jhash_2words((__force __u32) laddr ^ (__force __u32) faddr, 178 return jhash_3words((__force __u32) laddr,
179 (__force __u32) faddr,
179 ((__u32) lport) << 16 | (__force __u32)fport, 180 ((__u32) lport) << 16 | (__force __u32)fport,
180 inet_ehash_secret); 181 inet_ehash_secret);
181} 182}
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h
index 32c385dd9e06..0788c23d2828 100644
--- a/include/net/irda/irttp.h
+++ b/include/net/irda/irttp.h
@@ -169,17 +169,17 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *skb,
169void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow); 169void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow);
170struct tsap_cb *irttp_dup(struct tsap_cb *self, void *instance); 170struct tsap_cb *irttp_dup(struct tsap_cb *self, void *instance);
171 171
172static __inline __u32 irttp_get_saddr(struct tsap_cb *self) 172static inline __u32 irttp_get_saddr(struct tsap_cb *self)
173{ 173{
174 return irlmp_get_saddr(self->lsap); 174 return irlmp_get_saddr(self->lsap);
175} 175}
176 176
177static __inline __u32 irttp_get_daddr(struct tsap_cb *self) 177static inline __u32 irttp_get_daddr(struct tsap_cb *self)
178{ 178{
179 return irlmp_get_daddr(self->lsap); 179 return irlmp_get_daddr(self->lsap);
180} 180}
181 181
182static __inline __u32 irttp_get_max_seg_size(struct tsap_cb *self) 182static inline __u32 irttp_get_max_seg_size(struct tsap_cb *self)
183{ 183{
184 return self->max_seg_size; 184 return self->max_seg_size;
185} 185}
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index ebbfb509822e..64a5f0120b52 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -218,6 +218,10 @@ extern unsigned long neigh_rand_reach_time(unsigned long base);
218extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, 218extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
219 struct sk_buff *skb); 219 struct sk_buff *skb);
220extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat); 220extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat);
221extern struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl,
222 struct net *net,
223 const void *key,
224 struct net_device *dev);
221extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev); 225extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev);
222 226
223extern void neigh_app_ns(struct neighbour *n); 227extern void neigh_app_ns(struct neighbour *n);
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 28738b7d53eb..923f2b8b9096 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -31,7 +31,6 @@ struct net {
31 31
32 struct proc_dir_entry *proc_net; 32 struct proc_dir_entry *proc_net;
33 struct proc_dir_entry *proc_net_stat; 33 struct proc_dir_entry *proc_net_stat;
34 struct proc_dir_entry *proc_net_root;
35 34
36 struct list_head sysctl_table_headers; 35 struct list_head sysctl_table_headers;
37 36
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
index 49aac6323fbe..f736e842977f 100644
--- a/include/net/netfilter/nf_conntrack_extend.h
+++ b/include/net/netfilter/nf_conntrack_extend.h
@@ -17,7 +17,6 @@ enum nf_ct_ext_id
17struct nf_ct_ext { 17struct nf_ct_ext {
18 u8 offset[NF_CT_EXT_NUM]; 18 u8 offset[NF_CT_EXT_NUM];
19 u8 len; 19 u8 len;
20 u8 real_len;
21 char data[0]; 20 char data[0];
22}; 21};
23 22
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 57df27f19588..ea806732b084 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -380,15 +380,19 @@ static inline int sctp_sysctl_jiffies_ms(ctl_table *table, int __user *name, int
380 380
381#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 381#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
382 382
383int sctp_v6_init(void); 383void sctp_v6_pf_init(void);
384void sctp_v6_exit(void); 384void sctp_v6_pf_exit(void);
385int sctp_v6_protosw_init(void);
386void sctp_v6_protosw_exit(void);
385int sctp_v6_add_protocol(void); 387int sctp_v6_add_protocol(void);
386void sctp_v6_del_protocol(void); 388void sctp_v6_del_protocol(void);
387 389
388#else /* #ifdef defined(CONFIG_IPV6) */ 390#else /* #ifdef defined(CONFIG_IPV6) */
389 391
390static inline int sctp_v6_init(void) { return 0; } 392static inline void sctp_v6_pf_init(void) { return; }
391static inline void sctp_v6_exit(void) { return; } 393static inline void sctp_v6_pf_exit(void) { return; }
394static inline int sctp_v6_protosw_init(void) { return 0; }
395static inline void sctp_v6_protosw_exit(void) { return; }
392static inline int sctp_v6_add_protocol(void) { return 0; } 396static inline int sctp_v6_add_protocol(void) { return 0; }
393static inline void sctp_v6_del_protocol(void) { return; } 397static inline void sctp_v6_del_protocol(void) { return; }
394 398
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index eea7785cc757..0d255ae008b6 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -204,6 +204,7 @@ struct xfrm_state
204 * transformer. */ 204 * transformer. */
205 const struct xfrm_type *type; 205 const struct xfrm_type *type;
206 struct xfrm_mode *inner_mode; 206 struct xfrm_mode *inner_mode;
207 struct xfrm_mode *inner_mode_iaf;
207 struct xfrm_mode *outer_mode; 208 struct xfrm_mode *outer_mode;
208 209
209 /* Security context */ 210 /* Security context */
@@ -277,7 +278,7 @@ extern int __xfrm_state_delete(struct xfrm_state *x);
277struct xfrm_state_afinfo { 278struct xfrm_state_afinfo {
278 unsigned int family; 279 unsigned int family;
279 unsigned int proto; 280 unsigned int proto;
280 unsigned int eth_proto; 281 __be16 eth_proto;
281 struct module *owner; 282 struct module *owner;
282 const struct xfrm_type *type_map[IPPROTO_MAX]; 283 const struct xfrm_type *type_map[IPPROTO_MAX];
283 struct xfrm_mode *mode_map[XFRM_MODE_MAX]; 284 struct xfrm_mode *mode_map[XFRM_MODE_MAX];
@@ -387,6 +388,27 @@ enum {
387extern int xfrm_register_mode(struct xfrm_mode *mode, int family); 388extern int xfrm_register_mode(struct xfrm_mode *mode, int family);
388extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family); 389extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family);
389 390
391static inline int xfrm_af2proto(unsigned int family)
392{
393 switch(family) {
394 case AF_INET:
395 return IPPROTO_IPIP;
396 case AF_INET6:
397 return IPPROTO_IPV6;
398 default:
399 return 0;
400 }
401}
402
403static inline struct xfrm_mode *xfrm_ip2inner_mode(struct xfrm_state *x, int ipproto)
404{
405 if ((ipproto == IPPROTO_IPIP && x->props.family == AF_INET) ||
406 (ipproto == IPPROTO_IPV6 && x->props.family == AF_INET6))
407 return x->inner_mode;
408 else
409 return x->inner_mode_iaf;
410}
411
390struct xfrm_tmpl 412struct xfrm_tmpl
391{ 413{
392/* id in template is interpreted as: 414/* id in template is interpreted as:
@@ -530,6 +552,9 @@ struct xfrm_mode_skb_cb {
530 __be16 id; 552 __be16 id;
531 __be16 frag_off; 553 __be16 frag_off;
532 554
555 /* IP header length (excluding options or extension headers). */
556 u8 ihl;
557
533 /* TOS for IPv4, class for IPv6. */ 558 /* TOS for IPv4, class for IPv6. */
534 u8 tos; 559 u8 tos;
535 560
@@ -539,6 +564,9 @@ struct xfrm_mode_skb_cb {
539 /* Protocol for IPv4, NH for IPv6. */ 564 /* Protocol for IPv4, NH for IPv6. */
540 u8 protocol; 565 u8 protocol;
541 566
567 /* Option length for IPv4, zero for IPv6. */
568 u8 optlen;
569
542 /* Used by IPv6 only, zero for IPv4. */ 570 /* Used by IPv6 only, zero for IPv4. */
543 u8 flow_lbl[3]; 571 u8 flow_lbl[3];
544}; 572};
@@ -1253,6 +1281,7 @@ extern int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi,
1253extern int xfrm_input_resume(struct sk_buff *skb, int nexthdr); 1281extern int xfrm_input_resume(struct sk_buff *skb, int nexthdr);
1254extern int xfrm_output_resume(struct sk_buff *skb, int err); 1282extern int xfrm_output_resume(struct sk_buff *skb, int err);
1255extern int xfrm_output(struct sk_buff *skb); 1283extern int xfrm_output(struct sk_buff *skb);
1284extern int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb);
1256extern int xfrm4_extract_header(struct sk_buff *skb); 1285extern int xfrm4_extract_header(struct sk_buff *skb);
1257extern int xfrm4_extract_input(struct xfrm_state *x, struct sk_buff *skb); 1286extern int xfrm4_extract_input(struct xfrm_state *x, struct sk_buff *skb);
1258extern int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi, 1287extern int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi,
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 3ffd6b582a97..39e1cac24bb7 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -675,5 +675,6 @@ extern int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
675 675
676extern void sas_ssp_task_response(struct device *dev, struct sas_task *task, 676extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,
677 struct ssp_response_iu *iu); 677 struct ssp_response_iu *iu);
678struct sas_phy *sas_find_local_phy(struct domain_device *dev);
678 679
679#endif /* _SASLIB_H_ */ 680#endif /* _SASLIB_H_ */
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index dbc96ef4cc72..aab1eae2ec4c 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -177,6 +177,8 @@ struct iscsi_cls_session {
177 struct list_head host_list; 177 struct list_head host_list;
178 struct iscsi_transport *transport; 178 struct iscsi_transport *transport;
179 spinlock_t lock; 179 spinlock_t lock;
180 struct work_struct block_work;
181 struct work_struct unblock_work;
180 struct work_struct scan_work; 182 struct work_struct scan_work;
181 struct work_struct unbind_work; 183 struct work_struct unbind_work;
182 184