aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--arch/alpha/include/asm/statfs.h2
-rw-r--r--arch/alpha/include/asm/swab.h2
-rw-r--r--arch/arm/include/asm/a.out.h2
-rw-r--r--arch/arm/include/asm/setup.h2
-rw-r--r--arch/arm/include/asm/swab.h2
-rw-r--r--arch/avr32/include/asm/swab.h2
-rw-r--r--arch/blackfin/include/asm/swab.h2
-rw-r--r--arch/h8300/include/asm/swab.h2
-rw-r--r--arch/ia64/include/asm/fpu.h2
-rw-r--r--arch/ia64/include/asm/gcc_intrin.h1
-rw-r--r--arch/ia64/include/asm/intrinsics.h1
-rw-r--r--arch/ia64/include/asm/kvm.h3
-rw-r--r--arch/ia64/include/asm/percpu.h4
-rw-r--r--arch/ia64/include/asm/swab.h2
-rw-r--r--arch/ia64/include/asm/uv/uv.h13
-rw-r--r--arch/ia64/kernel/acpi.c4
-rw-r--r--arch/mips/include/asm/sigcontext.h1
-rw-r--r--arch/mips/include/asm/swab.h2
-rw-r--r--arch/parisc/include/asm/pdc.h3
-rw-r--r--arch/parisc/include/asm/swab.h2
-rw-r--r--arch/powerpc/include/asm/bootx.h2
-rw-r--r--arch/powerpc/include/asm/elf.h2
-rw-r--r--arch/powerpc/include/asm/kvm.h2
-rw-r--r--arch/powerpc/include/asm/ps3fb.h1
-rw-r--r--arch/powerpc/include/asm/spu_info.h3
-rw-r--r--arch/powerpc/include/asm/swab.h2
-rw-r--r--arch/x86/Kconfig5
-rw-r--r--arch/x86/Makefile17
-rw-r--r--arch/x86/boot/a20.c75
-rw-r--r--arch/x86/configs/i386_defconfig413
-rw-r--r--arch/x86/configs/x86_64_defconfig419
-rw-r--r--arch/x86/include/asm/a.out-core.h2
-rw-r--r--arch/x86/include/asm/acpi.h3
-rw-r--r--arch/x86/include/asm/calling.h56
-rw-r--r--arch/x86/include/asm/elf.h15
-rw-r--r--arch/x86/include/asm/fixmap_32.h4
-rw-r--r--arch/x86/include/asm/fixmap_64.h4
-rw-r--r--arch/x86/include/asm/io.h91
-rw-r--r--arch/x86/include/asm/io_32.h88
-rw-r--r--arch/x86/include/asm/io_64.h61
-rw-r--r--arch/x86/include/asm/kexec.h27
-rw-r--r--arch/x86/include/asm/mmu_context.h2
-rw-r--r--arch/x86/include/asm/page.h152
-rw-r--r--arch/x86/include/asm/page_32.h87
-rw-r--r--arch/x86/include/asm/page_32_types.h62
-rw-r--r--arch/x86/include/asm/page_64.h101
-rw-r--r--arch/x86/include/asm/page_64.h.rej114
-rw-r--r--arch/x86/include/asm/page_64_types.h91
-rw-r--r--arch/x86/include/asm/page_types.h63
-rw-r--r--arch/x86/include/asm/paravirt.h19
-rw-r--r--arch/x86/include/asm/percpu.h22
-rw-r--r--arch/x86/include/asm/pgtable-2level.h2
-rw-r--r--arch/x86/include/asm/pgtable-2level_types.h (renamed from arch/x86/include/asm/pgtable-2level-defs.h)15
-rw-r--r--arch/x86/include/asm/pgtable-3level.h35
-rw-r--r--arch/x86/include/asm/pgtable-3level_types.h (renamed from arch/x86/include/asm/pgtable-3level-defs.h)18
-rw-r--r--arch/x86/include/asm/pgtable.h469
-rw-r--r--arch/x86/include/asm/pgtable_32.h88
-rw-r--r--arch/x86/include/asm/pgtable_32_types.h46
-rw-r--r--arch/x86/include/asm/pgtable_64.h112
-rw-r--r--arch/x86/include/asm/pgtable_64_types.h62
-rw-r--r--arch/x86/include/asm/pgtable_types.h322
-rw-r--r--arch/x86/include/asm/processor.h7
-rw-r--r--arch/x86/include/asm/ptrace.h4
-rw-r--r--arch/x86/include/asm/segment.h9
-rw-r--r--arch/x86/include/asm/setup.h43
-rw-r--r--arch/x86/include/asm/stackprotector.h96
-rw-r--r--arch/x86/include/asm/syscalls.h21
-rw-r--r--arch/x86/include/asm/system.h38
-rw-r--r--arch/x86/include/asm/traps.h2
-rw-r--r--arch/x86/include/asm/uaccess.h33
-rw-r--r--arch/x86/include/asm/uv/uv.h3
-rw-r--r--arch/x86/include/asm/xen/hypervisor.h28
-rw-r--r--arch/x86/kernel/acpi/boot.c31
-rw-r--r--arch/x86/kernel/apic.c51
-rw-r--r--arch/x86/kernel/asm-offsets_32.c1
-rw-r--r--arch/x86/kernel/cpu/common.c31
-rw-r--r--arch/x86/kernel/dumpstack.c2
-rw-r--r--arch/x86/kernel/early_printk.c2
-rw-r--r--arch/x86/kernel/entry_32.S443
-rw-r--r--arch/x86/kernel/es7000_32.c9
-rw-r--r--arch/x86/kernel/head_32.S21
-rw-r--r--arch/x86/kernel/head_64.S21
-rw-r--r--arch/x86/kernel/hpet.c2
-rw-r--r--arch/x86/kernel/ioport.c3
-rw-r--r--arch/x86/kernel/machine_kexec_64.c82
-rw-r--r--arch/x86/kernel/olpc.c2
-rw-r--r--arch/x86/kernel/paravirt.c26
-rw-r--r--arch/x86/kernel/process_32.c53
-rw-r--r--arch/x86/kernel/process_64.c11
-rw-r--r--arch/x86/kernel/ptrace.c35
-rw-r--r--arch/x86/kernel/relocate_kernel_64.S125
-rw-r--r--arch/x86/kernel/setup_percpu.c2
-rw-r--r--arch/x86/kernel/signal.c75
-rw-r--r--arch/x86/kernel/syscall_table_32.S20
-rw-r--r--arch/x86/kernel/trampoline_64.S19
-rw-r--r--arch/x86/kernel/traps.c19
-rw-r--r--arch/x86/kernel/vm86_32.c20
-rw-r--r--arch/x86/kernel/vmlinux_64.lds.S8
-rw-r--r--arch/x86/lguest/boot.c2
-rw-r--r--arch/x86/mach-voyager/voyager_smp.c9
-rw-r--r--arch/x86/math-emu/get_address.c6
-rw-r--r--arch/x86/mm/fault.c22
-rw-r--r--arch/x86/mm/init_32.c134
-rw-r--r--arch/x86/mm/ioremap.c19
-rw-r--r--arch/x86/mm/numa_64.c4
-rw-r--r--arch/x86/mm/pageattr.c15
-rw-r--r--arch/x86/mm/pat.c83
-rw-r--r--arch/x86/vdso/Makefile2
-rw-r--r--arch/x86/xen/enlighten.c17
-rw-r--r--arch/x86/xen/mmu.c3
-rw-r--r--arch/x86/xen/multicalls.c15
-rw-r--r--arch/x86/xen/xen-asm.S78
-rw-r--r--arch/x86/xen/xen-asm_32.S238
-rw-r--r--arch/x86/xen/xen-asm_64.S107
-rw-r--r--arch/xtensa/include/asm/swab.h2
-rw-r--r--drivers/acpi/acpica/tbxface.c17
-rw-r--r--drivers/acpi/osl.c11
-rw-r--r--drivers/acpi/tables.c20
-rw-r--r--drivers/firmware/iscsi_ibft.c4
-rw-r--r--drivers/gpu/drm/drm_proc.c4
-rw-r--r--drivers/misc/sgi-gru/gru.h2
-rw-r--r--drivers/misc/sgi-gru/grufile.c18
-rw-r--r--drivers/misc/sgi-xp/xp.h22
-rw-r--r--drivers/net/ne3210.c3
-rw-r--r--drivers/net/sfc/falcon.c24
-rw-r--r--drivers/net/wireless/arlan-main.c4
-rw-r--r--drivers/pci/dmar.c7
-rw-r--r--include/acpi/acpiosxf.h1
-rw-r--r--include/acpi/acpixf.h4
-rw-r--r--include/asm-frv/swab.h2
-rw-r--r--include/asm-m32r/swab.h2
-rw-r--r--include/asm-mn10300/swab.h2
-rw-r--r--include/linux/acpi.h1
-rw-r--r--include/linux/coda_psdev.h15
-rw-r--r--include/linux/elfcore.h9
-rw-r--r--include/linux/in6.h2
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/nubus.h2
-rw-r--r--include/linux/percpu.h8
-rw-r--r--include/linux/reiserfs_fs.h56
-rw-r--r--include/linux/socket.h6
-rw-r--r--include/linux/types.h6
-rw-r--r--kernel/kexec.c2
-rw-r--r--kernel/panic.c4
-rw-r--r--mm/mlock.c7
-rw-r--r--scripts/gcc-x86_32-has-stack-protector.sh8
-rw-r--r--scripts/gcc-x86_64-has-stack-protector.sh6
-rw-r--r--scripts/headers_check.pl2
-rw-r--r--scripts/mod/modpost.c5
150 files changed, 3375 insertions, 2297 deletions
diff --git a/Makefile b/Makefile
index 22d758495ad2..b280cfcf1efe 100644
--- a/Makefile
+++ b/Makefile
@@ -532,8 +532,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
532endif 532endif
533 533
534# Force gcc to behave correct even for buggy distributions 534# Force gcc to behave correct even for buggy distributions
535# Arch Makefiles may override this setting 535ifndef CONFIG_CC_STACKPROTECTOR
536KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) 536KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
537endif
537 538
538ifdef CONFIG_FRAME_POINTER 539ifdef CONFIG_FRAME_POINTER
539KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 540KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
diff --git a/arch/alpha/include/asm/statfs.h b/arch/alpha/include/asm/statfs.h
index de35cd438a10..ccd2e186bfd8 100644
--- a/arch/alpha/include/asm/statfs.h
+++ b/arch/alpha/include/asm/statfs.h
@@ -1,6 +1,8 @@
1#ifndef _ALPHA_STATFS_H 1#ifndef _ALPHA_STATFS_H
2#define _ALPHA_STATFS_H 2#define _ALPHA_STATFS_H
3 3
4#include <linux/types.h>
5
4/* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't 6/* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't
5 even seem to implement statfs64 */ 7 even seem to implement statfs64 */
6#define __statfs_word __u32 8#define __statfs_word __u32
diff --git a/arch/alpha/include/asm/swab.h b/arch/alpha/include/asm/swab.h
index 68e7089e02d5..4d682b16c7c4 100644
--- a/arch/alpha/include/asm/swab.h
+++ b/arch/alpha/include/asm/swab.h
@@ -1,7 +1,7 @@
1#ifndef _ALPHA_SWAB_H 1#ifndef _ALPHA_SWAB_H
2#define _ALPHA_SWAB_H 2#define _ALPHA_SWAB_H
3 3
4#include <asm/types.h> 4#include <linux/types.h>
5#include <linux/compiler.h> 5#include <linux/compiler.h>
6#include <asm/compiler.h> 6#include <asm/compiler.h>
7 7
diff --git a/arch/arm/include/asm/a.out.h b/arch/arm/include/asm/a.out.h
index 79489fdcc8b8..083894b2e3bc 100644
--- a/arch/arm/include/asm/a.out.h
+++ b/arch/arm/include/asm/a.out.h
@@ -2,7 +2,7 @@
2#define __ARM_A_OUT_H__ 2#define __ARM_A_OUT_H__
3 3
4#include <linux/personality.h> 4#include <linux/personality.h>
5#include <asm/types.h> 5#include <linux/types.h>
6 6
7struct exec 7struct exec
8{ 8{
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index f2cd18a0932b..ee1304f22f94 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -14,7 +14,7 @@
14#ifndef __ASMARM_SETUP_H 14#ifndef __ASMARM_SETUP_H
15#define __ASMARM_SETUP_H 15#define __ASMARM_SETUP_H
16 16
17#include <asm/types.h> 17#include <linux/types.h>
18 18
19#define COMMAND_LINE_SIZE 1024 19#define COMMAND_LINE_SIZE 1024
20 20
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h
index 27a689be0856..ca2bf2f6d6ea 100644
--- a/arch/arm/include/asm/swab.h
+++ b/arch/arm/include/asm/swab.h
@@ -16,7 +16,7 @@
16#define __ASM_ARM_SWAB_H 16#define __ASM_ARM_SWAB_H
17 17
18#include <linux/compiler.h> 18#include <linux/compiler.h>
19#include <asm/types.h> 19#include <linux/types.h>
20 20
21#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 21#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
22# define __SWAB_64_THRU_32__ 22# define __SWAB_64_THRU_32__
diff --git a/arch/avr32/include/asm/swab.h b/arch/avr32/include/asm/swab.h
index a14aa5b46d98..14cc737bbca6 100644
--- a/arch/avr32/include/asm/swab.h
+++ b/arch/avr32/include/asm/swab.h
@@ -4,7 +4,7 @@
4#ifndef __ASM_AVR32_SWAB_H 4#ifndef __ASM_AVR32_SWAB_H
5#define __ASM_AVR32_SWAB_H 5#define __ASM_AVR32_SWAB_H
6 6
7#include <asm/types.h> 7#include <linux/types.h>
8#include <linux/compiler.h> 8#include <linux/compiler.h>
9 9
10#define __SWAB_64_THRU_32__ 10#define __SWAB_64_THRU_32__
diff --git a/arch/blackfin/include/asm/swab.h b/arch/blackfin/include/asm/swab.h
index 69a051b612bd..6403ad2932eb 100644
--- a/arch/blackfin/include/asm/swab.h
+++ b/arch/blackfin/include/asm/swab.h
@@ -1,7 +1,7 @@
1#ifndef _BLACKFIN_SWAB_H 1#ifndef _BLACKFIN_SWAB_H
2#define _BLACKFIN_SWAB_H 2#define _BLACKFIN_SWAB_H
3 3
4#include <asm/types.h> 4#include <linux/types.h>
5#include <linux/compiler.h> 5#include <linux/compiler.h>
6 6
7#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 7#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
diff --git a/arch/h8300/include/asm/swab.h b/arch/h8300/include/asm/swab.h
index c108f39b8bc4..39abbf52807d 100644
--- a/arch/h8300/include/asm/swab.h
+++ b/arch/h8300/include/asm/swab.h
@@ -1,7 +1,7 @@
1#ifndef _H8300_SWAB_H 1#ifndef _H8300_SWAB_H
2#define _H8300_SWAB_H 2#define _H8300_SWAB_H
3 3
4#include <asm/types.h> 4#include <linux/types.h>
5 5
6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
7# define __SWAB_64_THRU_32__ 7# define __SWAB_64_THRU_32__
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index 3859558ff0a4..0c26157cffa5 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,8 +6,6 @@
6 * David Mosberger-Tang <davidm@hpl.hp.com> 6 * David Mosberger-Tang <davidm@hpl.hp.com>
7 */ 7 */
8 8
9#include <asm/types.h>
10
11/* floating point status register: */ 9/* floating point status register: */
12#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */ 10#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */
13#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */ 11#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */
diff --git a/arch/ia64/include/asm/gcc_intrin.h b/arch/ia64/include/asm/gcc_intrin.h
index 0f5b55921758..c2c5fd8fcac4 100644
--- a/arch/ia64/include/asm/gcc_intrin.h
+++ b/arch/ia64/include/asm/gcc_intrin.h
@@ -6,6 +6,7 @@
6 * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> 6 * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com>
7 */ 7 */
8 8
9#include <linux/types.h>
9#include <linux/compiler.h> 10#include <linux/compiler.h>
10 11
11/* define this macro to get some asm stmts included in 'c' files */ 12/* define this macro to get some asm stmts included in 'c' files */
diff --git a/arch/ia64/include/asm/intrinsics.h b/arch/ia64/include/asm/intrinsics.h
index a3e44a5ed497..c47830e26cb7 100644
--- a/arch/ia64/include/asm/intrinsics.h
+++ b/arch/ia64/include/asm/intrinsics.h
@@ -10,6 +10,7 @@
10 10
11#ifndef __ASSEMBLY__ 11#ifndef __ASSEMBLY__
12 12
13#include <linux/types.h>
13/* include compiler specific intrinsics */ 14/* include compiler specific intrinsics */
14#include <asm/ia64regs.h> 15#include <asm/ia64regs.h>
15#ifdef __INTEL_COMPILER 16#ifdef __INTEL_COMPILER
diff --git a/arch/ia64/include/asm/kvm.h b/arch/ia64/include/asm/kvm.h
index 68aa6da807c1..116761ca462d 100644
--- a/arch/ia64/include/asm/kvm.h
+++ b/arch/ia64/include/asm/kvm.h
@@ -21,8 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include <asm/types.h> 24#include <linux/types.h>
25
26#include <linux/ioctl.h> 25#include <linux/ioctl.h>
27 26
28/* Architectural interrupt line count. */ 27/* Architectural interrupt line count. */
diff --git a/arch/ia64/include/asm/percpu.h b/arch/ia64/include/asm/percpu.h
index 77f30b664b4e..30cf46534dd2 100644
--- a/arch/ia64/include/asm/percpu.h
+++ b/arch/ia64/include/asm/percpu.h
@@ -27,12 +27,12 @@ extern void *per_cpu_init(void);
27 27
28#else /* ! SMP */ 28#else /* ! SMP */
29 29
30#define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu")))
31
32#define per_cpu_init() (__phys_per_cpu_start) 30#define per_cpu_init() (__phys_per_cpu_start)
33 31
34#endif /* SMP */ 32#endif /* SMP */
35 33
34#define PER_CPU_BASE_SECTION ".data.percpu"
35
36/* 36/*
37 * Be extremely careful when taking the address of this variable! Due to virtual 37 * Be extremely careful when taking the address of this variable! Due to virtual
38 * remapping, it is different from the canonical address returned by __get_cpu_var(var)! 38 * remapping, it is different from the canonical address returned by __get_cpu_var(var)!
diff --git a/arch/ia64/include/asm/swab.h b/arch/ia64/include/asm/swab.h
index 6aa58b699eea..c89a8cb5d8a5 100644
--- a/arch/ia64/include/asm/swab.h
+++ b/arch/ia64/include/asm/swab.h
@@ -6,7 +6,7 @@
6 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co. 6 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
7 */ 7 */
8 8
9#include <asm/types.h> 9#include <linux/types.h>
10#include <asm/intrinsics.h> 10#include <asm/intrinsics.h>
11#include <linux/compiler.h> 11#include <linux/compiler.h>
12 12
diff --git a/arch/ia64/include/asm/uv/uv.h b/arch/ia64/include/asm/uv/uv.h
new file mode 100644
index 000000000000..61b5bdfd980e
--- /dev/null
+++ b/arch/ia64/include/asm/uv/uv.h
@@ -0,0 +1,13 @@
1#ifndef _ASM_IA64_UV_UV_H
2#define _ASM_IA64_UV_UV_H
3
4#include <asm/system.h>
5#include <asm/sn/simulator.h>
6
7static inline int is_uv_system(void)
8{
9 /* temporary support for running on hardware simulator */
10 return IS_MEDUSA() || ia64_platform_is("uv");
11}
12
13#endif /* _ASM_IA64_UV_UV_H */
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index d541671caf4a..bdef2ce38c8b 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -199,6 +199,10 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size)
199 return __va(phys_addr); 199 return __va(phys_addr);
200} 200}
201 201
202void __init __acpi_unmap_table(char *map, unsigned long size)
203{
204}
205
202/* -------------------------------------------------------------------------- 206/* --------------------------------------------------------------------------
203 Boot-time Table Parsing 207 Boot-time Table Parsing
204 -------------------------------------------------------------------------- */ 208 -------------------------------------------------------------------------- */
diff --git a/arch/mips/include/asm/sigcontext.h b/arch/mips/include/asm/sigcontext.h
index 9ce0607d7a4e..9e89cf99d4e4 100644
--- a/arch/mips/include/asm/sigcontext.h
+++ b/arch/mips/include/asm/sigcontext.h
@@ -9,6 +9,7 @@
9#ifndef _ASM_SIGCONTEXT_H 9#ifndef _ASM_SIGCONTEXT_H
10#define _ASM_SIGCONTEXT_H 10#define _ASM_SIGCONTEXT_H
11 11
12#include <linux/types.h>
12#include <asm/sgidefs.h> 13#include <asm/sgidefs.h>
13 14
14#if _MIPS_SIM == _MIPS_SIM_ABI32 15#if _MIPS_SIM == _MIPS_SIM_ABI32
diff --git a/arch/mips/include/asm/swab.h b/arch/mips/include/asm/swab.h
index 88f1f7d555cb..99993c0d6c12 100644
--- a/arch/mips/include/asm/swab.h
+++ b/arch/mips/include/asm/swab.h
@@ -9,7 +9,7 @@
9#define _ASM_SWAB_H 9#define _ASM_SWAB_H
10 10
11#include <linux/compiler.h> 11#include <linux/compiler.h>
12#include <asm/types.h> 12#include <linux/types.h>
13 13
14#define __SWAB_64_THRU_32__ 14#define __SWAB_64_THRU_32__
15 15
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h
index c584b00c6074..430f1aeea0b8 100644
--- a/arch/parisc/include/asm/pdc.h
+++ b/arch/parisc/include/asm/pdc.h
@@ -336,10 +336,11 @@
336#define NUM_PDC_RESULT 32 336#define NUM_PDC_RESULT 32
337 337
338#if !defined(__ASSEMBLY__) 338#if !defined(__ASSEMBLY__)
339#ifdef __KERNEL__
340 339
341#include <linux/types.h> 340#include <linux/types.h>
342 341
342#ifdef __KERNEL__
343
343extern int pdc_type; 344extern int pdc_type;
344 345
345/* Values for pdc_type */ 346/* Values for pdc_type */
diff --git a/arch/parisc/include/asm/swab.h b/arch/parisc/include/asm/swab.h
index 3ff16c5a3358..e78403b129ef 100644
--- a/arch/parisc/include/asm/swab.h
+++ b/arch/parisc/include/asm/swab.h
@@ -1,7 +1,7 @@
1#ifndef _PARISC_SWAB_H 1#ifndef _PARISC_SWAB_H
2#define _PARISC_SWAB_H 2#define _PARISC_SWAB_H
3 3
4#include <asm/types.h> 4#include <linux/types.h>
5#include <linux/compiler.h> 5#include <linux/compiler.h>
6 6
7#define __SWAB_64_THRU_32__ 7#define __SWAB_64_THRU_32__
diff --git a/arch/powerpc/include/asm/bootx.h b/arch/powerpc/include/asm/bootx.h
index 57b82e3f89ce..60a3c9ef3017 100644
--- a/arch/powerpc/include/asm/bootx.h
+++ b/arch/powerpc/include/asm/bootx.h
@@ -9,7 +9,7 @@
9#ifndef __ASM_BOOTX_H__ 9#ifndef __ASM_BOOTX_H__
10#define __ASM_BOOTX_H__ 10#define __ASM_BOOTX_H__
11 11
12#include <asm/types.h> 12#include <linux/types.h>
13 13
14#ifdef macintosh 14#ifdef macintosh
15#include <Types.h> 15#include <Types.h>
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index cd46f023ec6d..b5600ce6055e 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -7,7 +7,7 @@
7#include <asm/string.h> 7#include <asm/string.h>
8#endif 8#endif
9 9
10#include <asm/types.h> 10#include <linux/types.h>
11#include <asm/ptrace.h> 11#include <asm/ptrace.h>
12#include <asm/cputable.h> 12#include <asm/cputable.h>
13#include <asm/auxvec.h> 13#include <asm/auxvec.h>
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h
index f993e4198d5c..4e0cf65f7f5a 100644
--- a/arch/powerpc/include/asm/kvm.h
+++ b/arch/powerpc/include/asm/kvm.h
@@ -20,7 +20,7 @@
20#ifndef __LINUX_KVM_POWERPC_H 20#ifndef __LINUX_KVM_POWERPC_H
21#define __LINUX_KVM_POWERPC_H 21#define __LINUX_KVM_POWERPC_H
22 22
23#include <asm/types.h> 23#include <linux/types.h>
24 24
25struct kvm_regs { 25struct kvm_regs {
26 __u64 pc; 26 __u64 pc;
diff --git a/arch/powerpc/include/asm/ps3fb.h b/arch/powerpc/include/asm/ps3fb.h
index 3f121fe4010d..e7233a849680 100644
--- a/arch/powerpc/include/asm/ps3fb.h
+++ b/arch/powerpc/include/asm/ps3fb.h
@@ -19,6 +19,7 @@
19#ifndef _ASM_POWERPC_PS3FB_H_ 19#ifndef _ASM_POWERPC_PS3FB_H_
20#define _ASM_POWERPC_PS3FB_H_ 20#define _ASM_POWERPC_PS3FB_H_
21 21
22#include <linux/types.h>
22#include <linux/ioctl.h> 23#include <linux/ioctl.h>
23 24
24/* ioctl */ 25/* ioctl */
diff --git a/arch/powerpc/include/asm/spu_info.h b/arch/powerpc/include/asm/spu_info.h
index 3545efbf9891..1286c823f0d8 100644
--- a/arch/powerpc/include/asm/spu_info.h
+++ b/arch/powerpc/include/asm/spu_info.h
@@ -23,9 +23,10 @@
23#ifndef _SPU_INFO_H 23#ifndef _SPU_INFO_H
24#define _SPU_INFO_H 24#define _SPU_INFO_H
25 25
26#include <linux/types.h>
27
26#ifdef __KERNEL__ 28#ifdef __KERNEL__
27#include <asm/spu.h> 29#include <asm/spu.h>
28#include <linux/types.h>
29#else 30#else
30struct mfc_cq_sr { 31struct mfc_cq_sr {
31 __u64 mfc_cq_data0_RW; 32 __u64 mfc_cq_data0_RW;
diff --git a/arch/powerpc/include/asm/swab.h b/arch/powerpc/include/asm/swab.h
index ef824ae4b79c..c581e3ef73ed 100644
--- a/arch/powerpc/include/asm/swab.h
+++ b/arch/powerpc/include/asm/swab.h
@@ -8,7 +8,7 @@
8 * 2 of the License, or (at your option) any later version. 8 * 2 of the License, or (at your option) any later version.
9 */ 9 */
10 10
11#include <asm/types.h> 11#include <linux/types.h>
12#include <linux/compiler.h> 12#include <linux/compiler.h>
13 13
14#ifdef __GNUC__ 14#ifdef __GNUC__
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 148c112c9ca4..1042d69b267d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -194,6 +194,10 @@ config X86_TRAMPOLINE
194 depends on SMP || (64BIT && ACPI_SLEEP) 194 depends on SMP || (64BIT && ACPI_SLEEP)
195 default y 195 default y
196 196
197config X86_32_LAZY_GS
198 def_bool y
199 depends on X86_32 && !CC_STACKPROTECTOR
200
197config KTIME_SCALAR 201config KTIME_SCALAR
198 def_bool X86_32 202 def_bool X86_32
199source "init/Kconfig" 203source "init/Kconfig"
@@ -1339,7 +1343,6 @@ config CC_STACKPROTECTOR_ALL
1339 1343
1340config CC_STACKPROTECTOR 1344config CC_STACKPROTECTOR
1341 bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)" 1345 bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
1342 depends on X86_64
1343 select CC_STACKPROTECTOR_ALL 1346 select CC_STACKPROTECTOR_ALL
1344 ---help--- 1347 ---help---
1345 This option turns on the -fstack-protector GCC feature. This 1348 This option turns on the -fstack-protector GCC feature. This
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 99550c407990..1836191839ee 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -70,14 +70,17 @@ else
70 # this works around some issues with generating unwind tables in older gccs 70 # this works around some issues with generating unwind tables in older gccs
71 # newer gccs do it by default 71 # newer gccs do it by default
72 KBUILD_CFLAGS += -maccumulate-outgoing-args 72 KBUILD_CFLAGS += -maccumulate-outgoing-args
73endif
73 74
74 stackp := $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh 75ifdef CONFIG_CC_STACKPROTECTOR
75 stackp-$(CONFIG_CC_STACKPROTECTOR) := $(shell $(stackp) \ 76 cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh
76 "$(CC)" "-fstack-protector -DGCC_HAS_SP" ) 77 ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC)),y)
77 stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(stackp) \ 78 stackp-y := -fstack-protector
78 "$(CC)" -fstack-protector-all ) 79 stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += -fstack-protector-all
79 80 KBUILD_CFLAGS += $(stackp-y)
80 KBUILD_CFLAGS += $(stackp-y) 81 else
82 $(warning stack protector enabled but no compiler support)
83 endif
81endif 84endif
82 85
83# Stackpointer is addressed different for 32 bit and 64 bit x86 86# Stackpointer is addressed different for 32 bit and 64 bit x86
diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c
index 4063d630deff..fba8e9c6a504 100644
--- a/arch/x86/boot/a20.c
+++ b/arch/x86/boot/a20.c
@@ -2,6 +2,7 @@
2 * 2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007-2008 rPath, Inc. - All Rights Reserved 4 * Copyright 2007-2008 rPath, Inc. - All Rights Reserved
5 * Copyright 2009 Intel Corporation
5 * 6 *
6 * This file is part of the Linux kernel, and is made available under 7 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2. 8 * the terms of the GNU General Public License version 2.
@@ -15,16 +16,23 @@
15#include "boot.h" 16#include "boot.h"
16 17
17#define MAX_8042_LOOPS 100000 18#define MAX_8042_LOOPS 100000
19#define MAX_8042_FF 32
18 20
19static int empty_8042(void) 21static int empty_8042(void)
20{ 22{
21 u8 status; 23 u8 status;
22 int loops = MAX_8042_LOOPS; 24 int loops = MAX_8042_LOOPS;
25 int ffs = MAX_8042_FF;
23 26
24 while (loops--) { 27 while (loops--) {
25 io_delay(); 28 io_delay();
26 29
27 status = inb(0x64); 30 status = inb(0x64);
31 if (status == 0xff) {
32 /* FF is a plausible, but very unlikely status */
33 if (!--ffs)
34 return -1; /* Assume no KBC present */
35 }
28 if (status & 1) { 36 if (status & 1) {
29 /* Read and discard input data */ 37 /* Read and discard input data */
30 io_delay(); 38 io_delay();
@@ -118,44 +126,43 @@ static void enable_a20_fast(void)
118 126
119int enable_a20(void) 127int enable_a20(void)
120{ 128{
121#if defined(CONFIG_X86_ELAN) 129#ifdef CONFIG_X86_VOYAGER
122 /* Elan croaks if we try to touch the KBC */
123 enable_a20_fast();
124 while (!a20_test_long())
125 ;
126 return 0;
127#elif defined(CONFIG_X86_VOYAGER)
128 /* On Voyager, a20_test() is unsafe? */ 130 /* On Voyager, a20_test() is unsafe? */
129 enable_a20_kbc(); 131 enable_a20_kbc();
130 return 0; 132 return 0;
131#else 133#else
132 int loops = A20_ENABLE_LOOPS; 134 int loops = A20_ENABLE_LOOPS;
133 while (loops--) { 135 int kbc_err;
134 /* First, check to see if A20 is already enabled 136
135 (legacy free, etc.) */ 137 while (loops--) {
136 if (a20_test_short()) 138 /* First, check to see if A20 is already enabled
137 return 0; 139 (legacy free, etc.) */
138 140 if (a20_test_short())
139 /* Next, try the BIOS (INT 0x15, AX=0x2401) */ 141 return 0;
140 enable_a20_bios(); 142
141 if (a20_test_short()) 143 /* Next, try the BIOS (INT 0x15, AX=0x2401) */
142 return 0; 144 enable_a20_bios();
143 145 if (a20_test_short())
144 /* Try enabling A20 through the keyboard controller */ 146 return 0;
145 empty_8042(); 147
146 if (a20_test_short()) 148 /* Try enabling A20 through the keyboard controller */
147 return 0; /* BIOS worked, but with delayed reaction */ 149 kbc_err = empty_8042();
148 150
149 enable_a20_kbc(); 151 if (a20_test_short())
150 if (a20_test_long()) 152 return 0; /* BIOS worked, but with delayed reaction */
151 return 0; 153
152 154 if (!kbc_err) {
153 /* Finally, try enabling the "fast A20 gate" */ 155 enable_a20_kbc();
154 enable_a20_fast(); 156 if (a20_test_long())
155 if (a20_test_long()) 157 return 0;
156 return 0; 158 }
157 } 159
158 160 /* Finally, try enabling the "fast A20 gate" */
159 return -1; 161 enable_a20_fast();
162 if (a20_test_long())
163 return 0;
164 }
165
166 return -1;
160#endif 167#endif
161} 168}
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 739bce993b56..096dd5359cd9 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.27-rc5 3# Linux kernel version: 2.6.29-rc4
4# Wed Sep 3 17:23:09 2008 4# Thu Feb 12 12:57:57 2009
5# 5#
6# CONFIG_64BIT is not set 6# CONFIG_64BIT is not set
7CONFIG_X86_32=y 7CONFIG_X86_32=y
8# CONFIG_X86_64 is not set 8# CONFIG_X86_64 is not set
9CONFIG_X86=y 9CONFIG_X86=y
10CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" 10CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
11# CONFIG_GENERIC_LOCKBREAK is not set
12CONFIG_GENERIC_TIME=y 11CONFIG_GENERIC_TIME=y
13CONFIG_GENERIC_CMOS_UPDATE=y 12CONFIG_GENERIC_CMOS_UPDATE=y
14CONFIG_CLOCKSOURCE_WATCHDOG=y 13CONFIG_CLOCKSOURCE_WATCHDOG=y
@@ -24,16 +23,14 @@ CONFIG_GENERIC_ISA_DMA=y
24CONFIG_GENERIC_IOMAP=y 23CONFIG_GENERIC_IOMAP=y
25CONFIG_GENERIC_BUG=y 24CONFIG_GENERIC_BUG=y
26CONFIG_GENERIC_HWEIGHT=y 25CONFIG_GENERIC_HWEIGHT=y
27# CONFIG_GENERIC_GPIO is not set
28CONFIG_ARCH_MAY_HAVE_PC_FDC=y 26CONFIG_ARCH_MAY_HAVE_PC_FDC=y
29# CONFIG_RWSEM_GENERIC_SPINLOCK is not set 27# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
30CONFIG_RWSEM_XCHGADD_ALGORITHM=y 28CONFIG_RWSEM_XCHGADD_ALGORITHM=y
31# CONFIG_ARCH_HAS_ILOG2_U32 is not set
32# CONFIG_ARCH_HAS_ILOG2_U64 is not set
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y 29CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
34CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
35# CONFIG_GENERIC_TIME_VSYSCALL is not set 31# CONFIG_GENERIC_TIME_VSYSCALL is not set
36CONFIG_ARCH_HAS_CPU_RELAX=y 32CONFIG_ARCH_HAS_CPU_RELAX=y
33CONFIG_ARCH_HAS_DEFAULT_IDLE=y
37CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y 34CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
38CONFIG_HAVE_SETUP_PER_CPU_AREA=y 35CONFIG_HAVE_SETUP_PER_CPU_AREA=y
39# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set 36# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
@@ -42,12 +39,12 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
42# CONFIG_ZONE_DMA32 is not set 39# CONFIG_ZONE_DMA32 is not set
43CONFIG_ARCH_POPULATES_NODE_MAP=y 40CONFIG_ARCH_POPULATES_NODE_MAP=y
44# CONFIG_AUDIT_ARCH is not set 41# CONFIG_AUDIT_ARCH is not set
45CONFIG_ARCH_SUPPORTS_AOUT=y
46CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y 42CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
47CONFIG_GENERIC_HARDIRQS=y 43CONFIG_GENERIC_HARDIRQS=y
48CONFIG_GENERIC_IRQ_PROBE=y 44CONFIG_GENERIC_IRQ_PROBE=y
49CONFIG_GENERIC_PENDING_IRQ=y 45CONFIG_GENERIC_PENDING_IRQ=y
50CONFIG_X86_SMP=y 46CONFIG_X86_SMP=y
47CONFIG_USE_GENERIC_SMP_HELPERS=y
51CONFIG_X86_32_SMP=y 48CONFIG_X86_32_SMP=y
52CONFIG_X86_HT=y 49CONFIG_X86_HT=y
53CONFIG_X86_BIOS_REBOOT=y 50CONFIG_X86_BIOS_REBOOT=y
@@ -76,30 +73,44 @@ CONFIG_TASK_IO_ACCOUNTING=y
76CONFIG_AUDIT=y 73CONFIG_AUDIT=y
77CONFIG_AUDITSYSCALL=y 74CONFIG_AUDITSYSCALL=y
78CONFIG_AUDIT_TREE=y 75CONFIG_AUDIT_TREE=y
76
77#
78# RCU Subsystem
79#
80# CONFIG_CLASSIC_RCU is not set
81CONFIG_TREE_RCU=y
82# CONFIG_PREEMPT_RCU is not set
83# CONFIG_RCU_TRACE is not set
84CONFIG_RCU_FANOUT=32
85# CONFIG_RCU_FANOUT_EXACT is not set
86# CONFIG_TREE_RCU_TRACE is not set
87# CONFIG_PREEMPT_RCU_TRACE is not set
79# CONFIG_IKCONFIG is not set 88# CONFIG_IKCONFIG is not set
80CONFIG_LOG_BUF_SHIFT=18 89CONFIG_LOG_BUF_SHIFT=18
81CONFIG_CGROUPS=y
82# CONFIG_CGROUP_DEBUG is not set
83CONFIG_CGROUP_NS=y
84# CONFIG_CGROUP_DEVICE is not set
85CONFIG_CPUSETS=y
86CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y 90CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
87CONFIG_GROUP_SCHED=y 91CONFIG_GROUP_SCHED=y
88CONFIG_FAIR_GROUP_SCHED=y 92CONFIG_FAIR_GROUP_SCHED=y
89# CONFIG_RT_GROUP_SCHED is not set 93# CONFIG_RT_GROUP_SCHED is not set
90# CONFIG_USER_SCHED is not set 94# CONFIG_USER_SCHED is not set
91CONFIG_CGROUP_SCHED=y 95CONFIG_CGROUP_SCHED=y
96CONFIG_CGROUPS=y
97# CONFIG_CGROUP_DEBUG is not set
98CONFIG_CGROUP_NS=y
99CONFIG_CGROUP_FREEZER=y
100# CONFIG_CGROUP_DEVICE is not set
101CONFIG_CPUSETS=y
102CONFIG_PROC_PID_CPUSET=y
92CONFIG_CGROUP_CPUACCT=y 103CONFIG_CGROUP_CPUACCT=y
93CONFIG_RESOURCE_COUNTERS=y 104CONFIG_RESOURCE_COUNTERS=y
94# CONFIG_CGROUP_MEM_RES_CTLR is not set 105# CONFIG_CGROUP_MEM_RES_CTLR is not set
95# CONFIG_SYSFS_DEPRECATED_V2 is not set 106# CONFIG_SYSFS_DEPRECATED_V2 is not set
96CONFIG_PROC_PID_CPUSET=y
97CONFIG_RELAY=y 107CONFIG_RELAY=y
98CONFIG_NAMESPACES=y 108CONFIG_NAMESPACES=y
99CONFIG_UTS_NS=y 109CONFIG_UTS_NS=y
100CONFIG_IPC_NS=y 110CONFIG_IPC_NS=y
101CONFIG_USER_NS=y 111CONFIG_USER_NS=y
102CONFIG_PID_NS=y 112CONFIG_PID_NS=y
113CONFIG_NET_NS=y
103CONFIG_BLK_DEV_INITRD=y 114CONFIG_BLK_DEV_INITRD=y
104CONFIG_INITRAMFS_SOURCE="" 115CONFIG_INITRAMFS_SOURCE=""
105CONFIG_CC_OPTIMIZE_FOR_SIZE=y 116CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -124,12 +135,15 @@ CONFIG_SIGNALFD=y
124CONFIG_TIMERFD=y 135CONFIG_TIMERFD=y
125CONFIG_EVENTFD=y 136CONFIG_EVENTFD=y
126CONFIG_SHMEM=y 137CONFIG_SHMEM=y
138CONFIG_AIO=y
127CONFIG_VM_EVENT_COUNTERS=y 139CONFIG_VM_EVENT_COUNTERS=y
140CONFIG_PCI_QUIRKS=y
128CONFIG_SLUB_DEBUG=y 141CONFIG_SLUB_DEBUG=y
129# CONFIG_SLAB is not set 142# CONFIG_SLAB is not set
130CONFIG_SLUB=y 143CONFIG_SLUB=y
131# CONFIG_SLOB is not set 144# CONFIG_SLOB is not set
132CONFIG_PROFILING=y 145CONFIG_PROFILING=y
146CONFIG_TRACEPOINTS=y
133CONFIG_MARKERS=y 147CONFIG_MARKERS=y
134# CONFIG_OPROFILE is not set 148# CONFIG_OPROFILE is not set
135CONFIG_HAVE_OPROFILE=y 149CONFIG_HAVE_OPROFILE=y
@@ -139,15 +153,10 @@ CONFIG_KRETPROBES=y
139CONFIG_HAVE_IOREMAP_PROT=y 153CONFIG_HAVE_IOREMAP_PROT=y
140CONFIG_HAVE_KPROBES=y 154CONFIG_HAVE_KPROBES=y
141CONFIG_HAVE_KRETPROBES=y 155CONFIG_HAVE_KRETPROBES=y
142# CONFIG_HAVE_ARCH_TRACEHOOK is not set 156CONFIG_HAVE_ARCH_TRACEHOOK=y
143# CONFIG_HAVE_DMA_ATTRS is not set
144CONFIG_USE_GENERIC_SMP_HELPERS=y
145# CONFIG_HAVE_CLK is not set
146CONFIG_PROC_PAGE_MONITOR=y
147CONFIG_HAVE_GENERIC_DMA_COHERENT=y 157CONFIG_HAVE_GENERIC_DMA_COHERENT=y
148CONFIG_SLABINFO=y 158CONFIG_SLABINFO=y
149CONFIG_RT_MUTEXES=y 159CONFIG_RT_MUTEXES=y
150# CONFIG_TINY_SHMEM is not set
151CONFIG_BASE_SMALL=0 160CONFIG_BASE_SMALL=0
152CONFIG_MODULES=y 161CONFIG_MODULES=y
153# CONFIG_MODULE_FORCE_LOAD is not set 162# CONFIG_MODULE_FORCE_LOAD is not set
@@ -155,12 +164,10 @@ CONFIG_MODULE_UNLOAD=y
155CONFIG_MODULE_FORCE_UNLOAD=y 164CONFIG_MODULE_FORCE_UNLOAD=y
156# CONFIG_MODVERSIONS is not set 165# CONFIG_MODVERSIONS is not set
157# CONFIG_MODULE_SRCVERSION_ALL is not set 166# CONFIG_MODULE_SRCVERSION_ALL is not set
158CONFIG_KMOD=y
159CONFIG_STOP_MACHINE=y 167CONFIG_STOP_MACHINE=y
160CONFIG_BLOCK=y 168CONFIG_BLOCK=y
161# CONFIG_LBD is not set 169# CONFIG_LBD is not set
162CONFIG_BLK_DEV_IO_TRACE=y 170CONFIG_BLK_DEV_IO_TRACE=y
163# CONFIG_LSF is not set
164CONFIG_BLK_DEV_BSG=y 171CONFIG_BLK_DEV_BSG=y
165# CONFIG_BLK_DEV_INTEGRITY is not set 172# CONFIG_BLK_DEV_INTEGRITY is not set
166 173
@@ -176,7 +183,7 @@ CONFIG_IOSCHED_CFQ=y
176CONFIG_DEFAULT_CFQ=y 183CONFIG_DEFAULT_CFQ=y
177# CONFIG_DEFAULT_NOOP is not set 184# CONFIG_DEFAULT_NOOP is not set
178CONFIG_DEFAULT_IOSCHED="cfq" 185CONFIG_DEFAULT_IOSCHED="cfq"
179CONFIG_CLASSIC_RCU=y 186CONFIG_FREEZER=y
180 187
181# 188#
182# Processor type and features 189# Processor type and features
@@ -186,6 +193,7 @@ CONFIG_NO_HZ=y
186CONFIG_HIGH_RES_TIMERS=y 193CONFIG_HIGH_RES_TIMERS=y
187CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 194CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
188CONFIG_SMP=y 195CONFIG_SMP=y
196CONFIG_SPARSE_IRQ=y
189CONFIG_X86_FIND_SMP_CONFIG=y 197CONFIG_X86_FIND_SMP_CONFIG=y
190CONFIG_X86_MPPARSE=y 198CONFIG_X86_MPPARSE=y
191# CONFIG_X86_ELAN is not set 199# CONFIG_X86_ELAN is not set
@@ -193,7 +201,7 @@ CONFIG_X86_MPPARSE=y
193# CONFIG_X86_GENERICARCH is not set 201# CONFIG_X86_GENERICARCH is not set
194# CONFIG_X86_VSMP is not set 202# CONFIG_X86_VSMP is not set
195# CONFIG_X86_RDC321X is not set 203# CONFIG_X86_RDC321X is not set
196CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 204CONFIG_SCHED_OMIT_FRAME_POINTER=y
197# CONFIG_PARAVIRT_GUEST is not set 205# CONFIG_PARAVIRT_GUEST is not set
198# CONFIG_MEMTEST is not set 206# CONFIG_MEMTEST is not set
199# CONFIG_M386 is not set 207# CONFIG_M386 is not set
@@ -237,10 +245,19 @@ CONFIG_X86_TSC=y
237CONFIG_X86_CMOV=y 245CONFIG_X86_CMOV=y
238CONFIG_X86_MINIMUM_CPU_FAMILY=4 246CONFIG_X86_MINIMUM_CPU_FAMILY=4
239CONFIG_X86_DEBUGCTLMSR=y 247CONFIG_X86_DEBUGCTLMSR=y
248CONFIG_CPU_SUP_INTEL=y
249CONFIG_CPU_SUP_CYRIX_32=y
250CONFIG_CPU_SUP_AMD=y
251CONFIG_CPU_SUP_CENTAUR_32=y
252CONFIG_CPU_SUP_TRANSMETA_32=y
253CONFIG_CPU_SUP_UMC_32=y
254CONFIG_X86_DS=y
255CONFIG_X86_PTRACE_BTS=y
240CONFIG_HPET_TIMER=y 256CONFIG_HPET_TIMER=y
241CONFIG_HPET_EMULATE_RTC=y 257CONFIG_HPET_EMULATE_RTC=y
242CONFIG_DMI=y 258CONFIG_DMI=y
243# CONFIG_IOMMU_HELPER is not set 259# CONFIG_IOMMU_HELPER is not set
260# CONFIG_IOMMU_API is not set
244CONFIG_NR_CPUS=64 261CONFIG_NR_CPUS=64
245CONFIG_SCHED_SMT=y 262CONFIG_SCHED_SMT=y
246CONFIG_SCHED_MC=y 263CONFIG_SCHED_MC=y
@@ -249,12 +266,15 @@ CONFIG_PREEMPT_VOLUNTARY=y
249# CONFIG_PREEMPT is not set 266# CONFIG_PREEMPT is not set
250CONFIG_X86_LOCAL_APIC=y 267CONFIG_X86_LOCAL_APIC=y
251CONFIG_X86_IO_APIC=y 268CONFIG_X86_IO_APIC=y
269CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
252# CONFIG_X86_MCE is not set 270# CONFIG_X86_MCE is not set
253CONFIG_VM86=y 271CONFIG_VM86=y
254# CONFIG_TOSHIBA is not set 272# CONFIG_TOSHIBA is not set
255# CONFIG_I8K is not set 273# CONFIG_I8K is not set
256CONFIG_X86_REBOOTFIXUPS=y 274CONFIG_X86_REBOOTFIXUPS=y
257CONFIG_MICROCODE=y 275CONFIG_MICROCODE=y
276CONFIG_MICROCODE_INTEL=y
277CONFIG_MICROCODE_AMD=y
258CONFIG_MICROCODE_OLD_INTERFACE=y 278CONFIG_MICROCODE_OLD_INTERFACE=y
259CONFIG_X86_MSR=y 279CONFIG_X86_MSR=y
260CONFIG_X86_CPUID=y 280CONFIG_X86_CPUID=y
@@ -263,6 +283,7 @@ CONFIG_HIGHMEM4G=y
263# CONFIG_HIGHMEM64G is not set 283# CONFIG_HIGHMEM64G is not set
264CONFIG_PAGE_OFFSET=0xC0000000 284CONFIG_PAGE_OFFSET=0xC0000000
265CONFIG_HIGHMEM=y 285CONFIG_HIGHMEM=y
286# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
266CONFIG_ARCH_FLATMEM_ENABLE=y 287CONFIG_ARCH_FLATMEM_ENABLE=y
267CONFIG_ARCH_SPARSEMEM_ENABLE=y 288CONFIG_ARCH_SPARSEMEM_ENABLE=y
268CONFIG_ARCH_SELECT_MEMORY_MODEL=y 289CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -273,14 +294,17 @@ CONFIG_FLATMEM_MANUAL=y
273CONFIG_FLATMEM=y 294CONFIG_FLATMEM=y
274CONFIG_FLAT_NODE_MEM_MAP=y 295CONFIG_FLAT_NODE_MEM_MAP=y
275CONFIG_SPARSEMEM_STATIC=y 296CONFIG_SPARSEMEM_STATIC=y
276# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
277CONFIG_PAGEFLAGS_EXTENDED=y 297CONFIG_PAGEFLAGS_EXTENDED=y
278CONFIG_SPLIT_PTLOCK_CPUS=4 298CONFIG_SPLIT_PTLOCK_CPUS=4
279CONFIG_RESOURCES_64BIT=y 299# CONFIG_PHYS_ADDR_T_64BIT is not set
280CONFIG_ZONE_DMA_FLAG=1 300CONFIG_ZONE_DMA_FLAG=1
281CONFIG_BOUNCE=y 301CONFIG_BOUNCE=y
282CONFIG_VIRT_TO_BUS=y 302CONFIG_VIRT_TO_BUS=y
303CONFIG_UNEVICTABLE_LRU=y
283CONFIG_HIGHPTE=y 304CONFIG_HIGHPTE=y
305CONFIG_X86_CHECK_BIOS_CORRUPTION=y
306CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
307CONFIG_X86_RESERVE_LOW_64K=y
284# CONFIG_MATH_EMULATION is not set 308# CONFIG_MATH_EMULATION is not set
285CONFIG_MTRR=y 309CONFIG_MTRR=y
286# CONFIG_MTRR_SANITIZER is not set 310# CONFIG_MTRR_SANITIZER is not set
@@ -301,10 +325,11 @@ CONFIG_PHYSICAL_START=0x1000000
301CONFIG_PHYSICAL_ALIGN=0x200000 325CONFIG_PHYSICAL_ALIGN=0x200000
302CONFIG_HOTPLUG_CPU=y 326CONFIG_HOTPLUG_CPU=y
303# CONFIG_COMPAT_VDSO is not set 327# CONFIG_COMPAT_VDSO is not set
328# CONFIG_CMDLINE_BOOL is not set
304CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 329CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
305 330
306# 331#
307# Power management options 332# Power management and ACPI options
308# 333#
309CONFIG_PM=y 334CONFIG_PM=y
310CONFIG_PM_DEBUG=y 335CONFIG_PM_DEBUG=y
@@ -330,19 +355,13 @@ CONFIG_ACPI_BATTERY=y
330CONFIG_ACPI_BUTTON=y 355CONFIG_ACPI_BUTTON=y
331CONFIG_ACPI_FAN=y 356CONFIG_ACPI_FAN=y
332CONFIG_ACPI_DOCK=y 357CONFIG_ACPI_DOCK=y
333# CONFIG_ACPI_BAY is not set
334CONFIG_ACPI_PROCESSOR=y 358CONFIG_ACPI_PROCESSOR=y
335CONFIG_ACPI_HOTPLUG_CPU=y 359CONFIG_ACPI_HOTPLUG_CPU=y
336CONFIG_ACPI_THERMAL=y 360CONFIG_ACPI_THERMAL=y
337# CONFIG_ACPI_WMI is not set
338# CONFIG_ACPI_ASUS is not set
339# CONFIG_ACPI_TOSHIBA is not set
340# CONFIG_ACPI_CUSTOM_DSDT is not set 361# CONFIG_ACPI_CUSTOM_DSDT is not set
341CONFIG_ACPI_BLACKLIST_YEAR=0 362CONFIG_ACPI_BLACKLIST_YEAR=0
342# CONFIG_ACPI_DEBUG is not set 363# CONFIG_ACPI_DEBUG is not set
343CONFIG_ACPI_EC=y
344# CONFIG_ACPI_PCI_SLOT is not set 364# CONFIG_ACPI_PCI_SLOT is not set
345CONFIG_ACPI_POWER=y
346CONFIG_ACPI_SYSTEM=y 365CONFIG_ACPI_SYSTEM=y
347CONFIG_X86_PM_TIMER=y 366CONFIG_X86_PM_TIMER=y
348CONFIG_ACPI_CONTAINER=y 367CONFIG_ACPI_CONTAINER=y
@@ -387,7 +406,6 @@ CONFIG_X86_ACPI_CPUFREQ=y
387# 406#
388# shared options 407# shared options
389# 408#
390# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
391# CONFIG_X86_SPEEDSTEP_LIB is not set 409# CONFIG_X86_SPEEDSTEP_LIB is not set
392CONFIG_CPU_IDLE=y 410CONFIG_CPU_IDLE=y
393CONFIG_CPU_IDLE_GOV_LADDER=y 411CONFIG_CPU_IDLE_GOV_LADDER=y
@@ -414,6 +432,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
414CONFIG_PCI_MSI=y 432CONFIG_PCI_MSI=y
415# CONFIG_PCI_LEGACY is not set 433# CONFIG_PCI_LEGACY is not set
416# CONFIG_PCI_DEBUG is not set 434# CONFIG_PCI_DEBUG is not set
435# CONFIG_PCI_STUB is not set
417CONFIG_HT_IRQ=y 436CONFIG_HT_IRQ=y
418CONFIG_ISA_DMA_API=y 437CONFIG_ISA_DMA_API=y
419# CONFIG_ISA is not set 438# CONFIG_ISA is not set
@@ -451,13 +470,17 @@ CONFIG_HOTPLUG_PCI=y
451# Executable file formats / Emulations 470# Executable file formats / Emulations
452# 471#
453CONFIG_BINFMT_ELF=y 472CONFIG_BINFMT_ELF=y
473CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
474CONFIG_HAVE_AOUT=y
454# CONFIG_BINFMT_AOUT is not set 475# CONFIG_BINFMT_AOUT is not set
455CONFIG_BINFMT_MISC=y 476CONFIG_BINFMT_MISC=y
477CONFIG_HAVE_ATOMIC_IOMAP=y
456CONFIG_NET=y 478CONFIG_NET=y
457 479
458# 480#
459# Networking options 481# Networking options
460# 482#
483CONFIG_COMPAT_NET_DEV_OPS=y
461CONFIG_PACKET=y 484CONFIG_PACKET=y
462CONFIG_PACKET_MMAP=y 485CONFIG_PACKET_MMAP=y
463CONFIG_UNIX=y 486CONFIG_UNIX=y
@@ -518,7 +541,6 @@ CONFIG_DEFAULT_CUBIC=y
518# CONFIG_DEFAULT_RENO is not set 541# CONFIG_DEFAULT_RENO is not set
519CONFIG_DEFAULT_TCP_CONG="cubic" 542CONFIG_DEFAULT_TCP_CONG="cubic"
520CONFIG_TCP_MD5SIG=y 543CONFIG_TCP_MD5SIG=y
521# CONFIG_IP_VS is not set
522CONFIG_IPV6=y 544CONFIG_IPV6=y
523# CONFIG_IPV6_PRIVACY is not set 545# CONFIG_IPV6_PRIVACY is not set
524# CONFIG_IPV6_ROUTER_PREF is not set 546# CONFIG_IPV6_ROUTER_PREF is not set
@@ -556,19 +578,21 @@ CONFIG_NF_CONNTRACK_IRC=y
556CONFIG_NF_CONNTRACK_SIP=y 578CONFIG_NF_CONNTRACK_SIP=y
557CONFIG_NF_CT_NETLINK=y 579CONFIG_NF_CT_NETLINK=y
558CONFIG_NETFILTER_XTABLES=y 580CONFIG_NETFILTER_XTABLES=y
581CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
559CONFIG_NETFILTER_XT_TARGET_MARK=y 582CONFIG_NETFILTER_XT_TARGET_MARK=y
560CONFIG_NETFILTER_XT_TARGET_NFLOG=y 583CONFIG_NETFILTER_XT_TARGET_NFLOG=y
561CONFIG_NETFILTER_XT_TARGET_SECMARK=y 584CONFIG_NETFILTER_XT_TARGET_SECMARK=y
562CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
563CONFIG_NETFILTER_XT_TARGET_TCPMSS=y 585CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
564CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y 586CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
565CONFIG_NETFILTER_XT_MATCH_MARK=y 587CONFIG_NETFILTER_XT_MATCH_MARK=y
566CONFIG_NETFILTER_XT_MATCH_POLICY=y 588CONFIG_NETFILTER_XT_MATCH_POLICY=y
567CONFIG_NETFILTER_XT_MATCH_STATE=y 589CONFIG_NETFILTER_XT_MATCH_STATE=y
590# CONFIG_IP_VS is not set
568 591
569# 592#
570# IP: Netfilter Configuration 593# IP: Netfilter Configuration
571# 594#
595CONFIG_NF_DEFRAG_IPV4=y
572CONFIG_NF_CONNTRACK_IPV4=y 596CONFIG_NF_CONNTRACK_IPV4=y
573CONFIG_NF_CONNTRACK_PROC_COMPAT=y 597CONFIG_NF_CONNTRACK_PROC_COMPAT=y
574CONFIG_IP_NF_IPTABLES=y 598CONFIG_IP_NF_IPTABLES=y
@@ -594,8 +618,8 @@ CONFIG_IP_NF_MANGLE=y
594CONFIG_NF_CONNTRACK_IPV6=y 618CONFIG_NF_CONNTRACK_IPV6=y
595CONFIG_IP6_NF_IPTABLES=y 619CONFIG_IP6_NF_IPTABLES=y
596CONFIG_IP6_NF_MATCH_IPV6HEADER=y 620CONFIG_IP6_NF_MATCH_IPV6HEADER=y
597CONFIG_IP6_NF_FILTER=y
598CONFIG_IP6_NF_TARGET_LOG=y 621CONFIG_IP6_NF_TARGET_LOG=y
622CONFIG_IP6_NF_FILTER=y
599CONFIG_IP6_NF_TARGET_REJECT=y 623CONFIG_IP6_NF_TARGET_REJECT=y
600CONFIG_IP6_NF_MANGLE=y 624CONFIG_IP6_NF_MANGLE=y
601# CONFIG_IP_DCCP is not set 625# CONFIG_IP_DCCP is not set
@@ -603,6 +627,7 @@ CONFIG_IP6_NF_MANGLE=y
603# CONFIG_TIPC is not set 627# CONFIG_TIPC is not set
604# CONFIG_ATM is not set 628# CONFIG_ATM is not set
605# CONFIG_BRIDGE is not set 629# CONFIG_BRIDGE is not set
630# CONFIG_NET_DSA is not set
606# CONFIG_VLAN_8021Q is not set 631# CONFIG_VLAN_8021Q is not set
607# CONFIG_DECNET is not set 632# CONFIG_DECNET is not set
608CONFIG_LLC=y 633CONFIG_LLC=y
@@ -622,6 +647,7 @@ CONFIG_NET_SCHED=y
622# CONFIG_NET_SCH_HTB is not set 647# CONFIG_NET_SCH_HTB is not set
623# CONFIG_NET_SCH_HFSC is not set 648# CONFIG_NET_SCH_HFSC is not set
624# CONFIG_NET_SCH_PRIO is not set 649# CONFIG_NET_SCH_PRIO is not set
650# CONFIG_NET_SCH_MULTIQ is not set
625# CONFIG_NET_SCH_RED is not set 651# CONFIG_NET_SCH_RED is not set
626# CONFIG_NET_SCH_SFQ is not set 652# CONFIG_NET_SCH_SFQ is not set
627# CONFIG_NET_SCH_TEQL is not set 653# CONFIG_NET_SCH_TEQL is not set
@@ -629,6 +655,7 @@ CONFIG_NET_SCHED=y
629# CONFIG_NET_SCH_GRED is not set 655# CONFIG_NET_SCH_GRED is not set
630# CONFIG_NET_SCH_DSMARK is not set 656# CONFIG_NET_SCH_DSMARK is not set
631# CONFIG_NET_SCH_NETEM is not set 657# CONFIG_NET_SCH_NETEM is not set
658# CONFIG_NET_SCH_DRR is not set
632# CONFIG_NET_SCH_INGRESS is not set 659# CONFIG_NET_SCH_INGRESS is not set
633 660
634# 661#
@@ -643,6 +670,7 @@ CONFIG_NET_CLS=y
643# CONFIG_NET_CLS_RSVP is not set 670# CONFIG_NET_CLS_RSVP is not set
644# CONFIG_NET_CLS_RSVP6 is not set 671# CONFIG_NET_CLS_RSVP6 is not set
645# CONFIG_NET_CLS_FLOW is not set 672# CONFIG_NET_CLS_FLOW is not set
673# CONFIG_NET_CLS_CGROUP is not set
646CONFIG_NET_EMATCH=y 674CONFIG_NET_EMATCH=y
647CONFIG_NET_EMATCH_STACK=32 675CONFIG_NET_EMATCH_STACK=32
648# CONFIG_NET_EMATCH_CMP is not set 676# CONFIG_NET_EMATCH_CMP is not set
@@ -658,7 +686,9 @@ CONFIG_NET_CLS_ACT=y
658# CONFIG_NET_ACT_NAT is not set 686# CONFIG_NET_ACT_NAT is not set
659# CONFIG_NET_ACT_PEDIT is not set 687# CONFIG_NET_ACT_PEDIT is not set
660# CONFIG_NET_ACT_SIMP is not set 688# CONFIG_NET_ACT_SIMP is not set
689# CONFIG_NET_ACT_SKBEDIT is not set
661CONFIG_NET_SCH_FIFO=y 690CONFIG_NET_SCH_FIFO=y
691# CONFIG_DCB is not set
662 692
663# 693#
664# Network testing 694# Network testing
@@ -675,29 +705,33 @@ CONFIG_HAMRADIO=y
675# CONFIG_IRDA is not set 705# CONFIG_IRDA is not set
676# CONFIG_BT is not set 706# CONFIG_BT is not set
677# CONFIG_AF_RXRPC is not set 707# CONFIG_AF_RXRPC is not set
708# CONFIG_PHONET is not set
678CONFIG_FIB_RULES=y 709CONFIG_FIB_RULES=y
679 710CONFIG_WIRELESS=y
680#
681# Wireless
682#
683CONFIG_CFG80211=y 711CONFIG_CFG80211=y
712# CONFIG_CFG80211_REG_DEBUG is not set
684CONFIG_NL80211=y 713CONFIG_NL80211=y
714CONFIG_WIRELESS_OLD_REGULATORY=y
685CONFIG_WIRELESS_EXT=y 715CONFIG_WIRELESS_EXT=y
686CONFIG_WIRELESS_EXT_SYSFS=y 716CONFIG_WIRELESS_EXT_SYSFS=y
717# CONFIG_LIB80211 is not set
687CONFIG_MAC80211=y 718CONFIG_MAC80211=y
688 719
689# 720#
690# Rate control algorithm selection 721# Rate control algorithm selection
691# 722#
692CONFIG_MAC80211_RC_PID=y 723CONFIG_MAC80211_RC_MINSTREL=y
693CONFIG_MAC80211_RC_DEFAULT_PID=y 724# CONFIG_MAC80211_RC_DEFAULT_PID is not set
694CONFIG_MAC80211_RC_DEFAULT="pid" 725CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
726CONFIG_MAC80211_RC_DEFAULT="minstrel"
695# CONFIG_MAC80211_MESH is not set 727# CONFIG_MAC80211_MESH is not set
696CONFIG_MAC80211_LEDS=y 728CONFIG_MAC80211_LEDS=y
697# CONFIG_MAC80211_DEBUGFS is not set 729# CONFIG_MAC80211_DEBUGFS is not set
698# CONFIG_MAC80211_DEBUG_MENU is not set 730# CONFIG_MAC80211_DEBUG_MENU is not set
699# CONFIG_IEEE80211 is not set 731# CONFIG_WIMAX is not set
700# CONFIG_RFKILL is not set 732CONFIG_RFKILL=y
733# CONFIG_RFKILL_INPUT is not set
734CONFIG_RFKILL_LEDS=y
701# CONFIG_NET_9P is not set 735# CONFIG_NET_9P is not set
702 736
703# 737#
@@ -721,7 +755,7 @@ CONFIG_PROC_EVENTS=y
721# CONFIG_MTD is not set 755# CONFIG_MTD is not set
722# CONFIG_PARPORT is not set 756# CONFIG_PARPORT is not set
723CONFIG_PNP=y 757CONFIG_PNP=y
724# CONFIG_PNP_DEBUG is not set 758CONFIG_PNP_DEBUG_MESSAGES=y
725 759
726# 760#
727# Protocols 761# Protocols
@@ -749,20 +783,19 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
749CONFIG_MISC_DEVICES=y 783CONFIG_MISC_DEVICES=y
750# CONFIG_IBM_ASM is not set 784# CONFIG_IBM_ASM is not set
751# CONFIG_PHANTOM is not set 785# CONFIG_PHANTOM is not set
752# CONFIG_EEPROM_93CX6 is not set
753# CONFIG_SGI_IOC4 is not set 786# CONFIG_SGI_IOC4 is not set
754# CONFIG_TIFM_CORE is not set 787# CONFIG_TIFM_CORE is not set
755# CONFIG_ACER_WMI is not set 788# CONFIG_ICS932S401 is not set
756# CONFIG_ASUS_LAPTOP is not set
757# CONFIG_FUJITSU_LAPTOP is not set
758# CONFIG_TC1100_WMI is not set
759# CONFIG_MSI_LAPTOP is not set
760# CONFIG_COMPAL_LAPTOP is not set
761# CONFIG_SONY_LAPTOP is not set
762# CONFIG_THINKPAD_ACPI is not set
763# CONFIG_INTEL_MENLOW is not set
764# CONFIG_ENCLOSURE_SERVICES is not set 789# CONFIG_ENCLOSURE_SERVICES is not set
765# CONFIG_HP_ILO is not set 790# CONFIG_HP_ILO is not set
791# CONFIG_C2PORT is not set
792
793#
794# EEPROM support
795#
796# CONFIG_EEPROM_AT24 is not set
797# CONFIG_EEPROM_LEGACY is not set
798# CONFIG_EEPROM_93CX6 is not set
766CONFIG_HAVE_IDE=y 799CONFIG_HAVE_IDE=y
767# CONFIG_IDE is not set 800# CONFIG_IDE is not set
768 801
@@ -801,7 +834,7 @@ CONFIG_SCSI_WAIT_SCAN=m
801# 834#
802CONFIG_SCSI_SPI_ATTRS=y 835CONFIG_SCSI_SPI_ATTRS=y
803# CONFIG_SCSI_FC_ATTRS is not set 836# CONFIG_SCSI_FC_ATTRS is not set
804CONFIG_SCSI_ISCSI_ATTRS=y 837# CONFIG_SCSI_ISCSI_ATTRS is not set
805# CONFIG_SCSI_SAS_ATTRS is not set 838# CONFIG_SCSI_SAS_ATTRS is not set
806# CONFIG_SCSI_SAS_LIBSAS is not set 839# CONFIG_SCSI_SAS_LIBSAS is not set
807# CONFIG_SCSI_SRP_ATTRS is not set 840# CONFIG_SCSI_SRP_ATTRS is not set
@@ -874,6 +907,7 @@ CONFIG_PATA_OLDPIIX=y
874CONFIG_PATA_SCH=y 907CONFIG_PATA_SCH=y
875CONFIG_MD=y 908CONFIG_MD=y
876CONFIG_BLK_DEV_MD=y 909CONFIG_BLK_DEV_MD=y
910CONFIG_MD_AUTODETECT=y
877# CONFIG_MD_LINEAR is not set 911# CONFIG_MD_LINEAR is not set
878# CONFIG_MD_RAID0 is not set 912# CONFIG_MD_RAID0 is not set
879# CONFIG_MD_RAID1 is not set 913# CONFIG_MD_RAID1 is not set
@@ -929,6 +963,9 @@ CONFIG_PHYLIB=y
929# CONFIG_BROADCOM_PHY is not set 963# CONFIG_BROADCOM_PHY is not set
930# CONFIG_ICPLUS_PHY is not set 964# CONFIG_ICPLUS_PHY is not set
931# CONFIG_REALTEK_PHY is not set 965# CONFIG_REALTEK_PHY is not set
966# CONFIG_NATIONAL_PHY is not set
967# CONFIG_STE10XP is not set
968# CONFIG_LSI_ET1011C_PHY is not set
932# CONFIG_FIXED_PHY is not set 969# CONFIG_FIXED_PHY is not set
933# CONFIG_MDIO_BITBANG is not set 970# CONFIG_MDIO_BITBANG is not set
934CONFIG_NET_ETHERNET=y 971CONFIG_NET_ETHERNET=y
@@ -952,6 +989,9 @@ CONFIG_NET_TULIP=y
952# CONFIG_IBM_NEW_EMAC_RGMII is not set 989# CONFIG_IBM_NEW_EMAC_RGMII is not set
953# CONFIG_IBM_NEW_EMAC_TAH is not set 990# CONFIG_IBM_NEW_EMAC_TAH is not set
954# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 991# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
992# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
993# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
994# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
955CONFIG_NET_PCI=y 995CONFIG_NET_PCI=y
956# CONFIG_PCNET32 is not set 996# CONFIG_PCNET32 is not set
957# CONFIG_AMD8111_ETH is not set 997# CONFIG_AMD8111_ETH is not set
@@ -959,7 +999,6 @@ CONFIG_NET_PCI=y
959# CONFIG_B44 is not set 999# CONFIG_B44 is not set
960CONFIG_FORCEDETH=y 1000CONFIG_FORCEDETH=y
961# CONFIG_FORCEDETH_NAPI is not set 1001# CONFIG_FORCEDETH_NAPI is not set
962# CONFIG_EEPRO100 is not set
963CONFIG_E100=y 1002CONFIG_E100=y
964# CONFIG_FEALNX is not set 1003# CONFIG_FEALNX is not set
965# CONFIG_NATSEMI is not set 1004# CONFIG_NATSEMI is not set
@@ -973,15 +1012,16 @@ CONFIG_8139TOO=y
973# CONFIG_R6040 is not set 1012# CONFIG_R6040 is not set
974# CONFIG_SIS900 is not set 1013# CONFIG_SIS900 is not set
975# CONFIG_EPIC100 is not set 1014# CONFIG_EPIC100 is not set
1015# CONFIG_SMSC9420 is not set
976# CONFIG_SUNDANCE is not set 1016# CONFIG_SUNDANCE is not set
977# CONFIG_TLAN is not set 1017# CONFIG_TLAN is not set
978# CONFIG_VIA_RHINE is not set 1018# CONFIG_VIA_RHINE is not set
979# CONFIG_SC92031 is not set 1019# CONFIG_SC92031 is not set
1020# CONFIG_ATL2 is not set
980CONFIG_NETDEV_1000=y 1021CONFIG_NETDEV_1000=y
981# CONFIG_ACENIC is not set 1022# CONFIG_ACENIC is not set
982# CONFIG_DL2K is not set 1023# CONFIG_DL2K is not set
983CONFIG_E1000=y 1024CONFIG_E1000=y
984# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
985CONFIG_E1000E=y 1025CONFIG_E1000E=y
986# CONFIG_IP1000 is not set 1026# CONFIG_IP1000 is not set
987# CONFIG_IGB is not set 1027# CONFIG_IGB is not set
@@ -999,18 +1039,23 @@ CONFIG_BNX2=y
999# CONFIG_QLA3XXX is not set 1039# CONFIG_QLA3XXX is not set
1000# CONFIG_ATL1 is not set 1040# CONFIG_ATL1 is not set
1001# CONFIG_ATL1E is not set 1041# CONFIG_ATL1E is not set
1042# CONFIG_JME is not set
1002CONFIG_NETDEV_10000=y 1043CONFIG_NETDEV_10000=y
1003# CONFIG_CHELSIO_T1 is not set 1044# CONFIG_CHELSIO_T1 is not set
1045CONFIG_CHELSIO_T3_DEPENDS=y
1004# CONFIG_CHELSIO_T3 is not set 1046# CONFIG_CHELSIO_T3 is not set
1047# CONFIG_ENIC is not set
1005# CONFIG_IXGBE is not set 1048# CONFIG_IXGBE is not set
1006# CONFIG_IXGB is not set 1049# CONFIG_IXGB is not set
1007# CONFIG_S2IO is not set 1050# CONFIG_S2IO is not set
1008# CONFIG_MYRI10GE is not set 1051# CONFIG_MYRI10GE is not set
1009# CONFIG_NETXEN_NIC is not set 1052# CONFIG_NETXEN_NIC is not set
1010# CONFIG_NIU is not set 1053# CONFIG_NIU is not set
1054# CONFIG_MLX4_EN is not set
1011# CONFIG_MLX4_CORE is not set 1055# CONFIG_MLX4_CORE is not set
1012# CONFIG_TEHUTI is not set 1056# CONFIG_TEHUTI is not set
1013# CONFIG_BNX2X is not set 1057# CONFIG_BNX2X is not set
1058# CONFIG_QLGE is not set
1014# CONFIG_SFC is not set 1059# CONFIG_SFC is not set
1015CONFIG_TR=y 1060CONFIG_TR=y
1016# CONFIG_IBMOL is not set 1061# CONFIG_IBMOL is not set
@@ -1024,9 +1069,8 @@ CONFIG_TR=y
1024# CONFIG_WLAN_PRE80211 is not set 1069# CONFIG_WLAN_PRE80211 is not set
1025CONFIG_WLAN_80211=y 1070CONFIG_WLAN_80211=y
1026# CONFIG_PCMCIA_RAYCS is not set 1071# CONFIG_PCMCIA_RAYCS is not set
1027# CONFIG_IPW2100 is not set
1028# CONFIG_IPW2200 is not set
1029# CONFIG_LIBERTAS is not set 1072# CONFIG_LIBERTAS is not set
1073# CONFIG_LIBERTAS_THINFIRM is not set
1030# CONFIG_AIRO is not set 1074# CONFIG_AIRO is not set
1031# CONFIG_HERMES is not set 1075# CONFIG_HERMES is not set
1032# CONFIG_ATMEL is not set 1076# CONFIG_ATMEL is not set
@@ -1043,6 +1087,8 @@ CONFIG_WLAN_80211=y
1043CONFIG_ATH5K=y 1087CONFIG_ATH5K=y
1044# CONFIG_ATH5K_DEBUG is not set 1088# CONFIG_ATH5K_DEBUG is not set
1045# CONFIG_ATH9K is not set 1089# CONFIG_ATH9K is not set
1090# CONFIG_IPW2100 is not set
1091# CONFIG_IPW2200 is not set
1046# CONFIG_IWLCORE is not set 1092# CONFIG_IWLCORE is not set
1047# CONFIG_IWLWIFI_LEDS is not set 1093# CONFIG_IWLWIFI_LEDS is not set
1048# CONFIG_IWLAGN is not set 1094# CONFIG_IWLAGN is not set
@@ -1054,6 +1100,10 @@ CONFIG_ATH5K=y
1054# CONFIG_RT2X00 is not set 1100# CONFIG_RT2X00 is not set
1055 1101
1056# 1102#
1103# Enable WiMAX (Networking options) to see the WiMAX drivers
1104#
1105
1106#
1057# USB Network Adapters 1107# USB Network Adapters
1058# 1108#
1059# CONFIG_USB_CATC is not set 1109# CONFIG_USB_CATC is not set
@@ -1061,6 +1111,7 @@ CONFIG_ATH5K=y
1061# CONFIG_USB_PEGASUS is not set 1111# CONFIG_USB_PEGASUS is not set
1062# CONFIG_USB_RTL8150 is not set 1112# CONFIG_USB_RTL8150 is not set
1063# CONFIG_USB_USBNET is not set 1113# CONFIG_USB_USBNET is not set
1114# CONFIG_USB_HSO is not set
1064CONFIG_NET_PCMCIA=y 1115CONFIG_NET_PCMCIA=y
1065# CONFIG_PCMCIA_3C589 is not set 1116# CONFIG_PCMCIA_3C589 is not set
1066# CONFIG_PCMCIA_3C574 is not set 1117# CONFIG_PCMCIA_3C574 is not set
@@ -1122,6 +1173,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
1122CONFIG_MOUSE_PS2_SYNAPTICS=y 1173CONFIG_MOUSE_PS2_SYNAPTICS=y
1123CONFIG_MOUSE_PS2_LIFEBOOK=y 1174CONFIG_MOUSE_PS2_LIFEBOOK=y
1124CONFIG_MOUSE_PS2_TRACKPOINT=y 1175CONFIG_MOUSE_PS2_TRACKPOINT=y
1176# CONFIG_MOUSE_PS2_ELANTECH is not set
1125# CONFIG_MOUSE_PS2_TOUCHKIT is not set 1177# CONFIG_MOUSE_PS2_TOUCHKIT is not set
1126# CONFIG_MOUSE_SERIAL is not set 1178# CONFIG_MOUSE_SERIAL is not set
1127# CONFIG_MOUSE_APPLETOUCH is not set 1179# CONFIG_MOUSE_APPLETOUCH is not set
@@ -1159,15 +1211,16 @@ CONFIG_INPUT_TOUCHSCREEN=y
1159# CONFIG_TOUCHSCREEN_FUJITSU is not set 1211# CONFIG_TOUCHSCREEN_FUJITSU is not set
1160# CONFIG_TOUCHSCREEN_GUNZE is not set 1212# CONFIG_TOUCHSCREEN_GUNZE is not set
1161# CONFIG_TOUCHSCREEN_ELO is not set 1213# CONFIG_TOUCHSCREEN_ELO is not set
1214# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
1162# CONFIG_TOUCHSCREEN_MTOUCH is not set 1215# CONFIG_TOUCHSCREEN_MTOUCH is not set
1163# CONFIG_TOUCHSCREEN_INEXIO is not set 1216# CONFIG_TOUCHSCREEN_INEXIO is not set
1164# CONFIG_TOUCHSCREEN_MK712 is not set 1217# CONFIG_TOUCHSCREEN_MK712 is not set
1165# CONFIG_TOUCHSCREEN_PENMOUNT is not set 1218# CONFIG_TOUCHSCREEN_PENMOUNT is not set
1166# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 1219# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
1167# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 1220# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
1168# CONFIG_TOUCHSCREEN_UCB1400 is not set
1169# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set 1221# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
1170# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 1222# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
1223# CONFIG_TOUCHSCREEN_TSC2007 is not set
1171CONFIG_INPUT_MISC=y 1224CONFIG_INPUT_MISC=y
1172# CONFIG_INPUT_PCSPKR is not set 1225# CONFIG_INPUT_PCSPKR is not set
1173# CONFIG_INPUT_APANEL is not set 1226# CONFIG_INPUT_APANEL is not set
@@ -1178,6 +1231,7 @@ CONFIG_INPUT_MISC=y
1178# CONFIG_INPUT_KEYSPAN_REMOTE is not set 1231# CONFIG_INPUT_KEYSPAN_REMOTE is not set
1179# CONFIG_INPUT_POWERMATE is not set 1232# CONFIG_INPUT_POWERMATE is not set
1180# CONFIG_INPUT_YEALINK is not set 1233# CONFIG_INPUT_YEALINK is not set
1234# CONFIG_INPUT_CM109 is not set
1181# CONFIG_INPUT_UINPUT is not set 1235# CONFIG_INPUT_UINPUT is not set
1182 1236
1183# 1237#
@@ -1244,6 +1298,7 @@ CONFIG_SERIAL_CORE=y
1244CONFIG_SERIAL_CORE_CONSOLE=y 1298CONFIG_SERIAL_CORE_CONSOLE=y
1245# CONFIG_SERIAL_JSM is not set 1299# CONFIG_SERIAL_JSM is not set
1246CONFIG_UNIX98_PTYS=y 1300CONFIG_UNIX98_PTYS=y
1301# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
1247# CONFIG_LEGACY_PTYS is not set 1302# CONFIG_LEGACY_PTYS is not set
1248# CONFIG_IPMI_HANDLER is not set 1303# CONFIG_IPMI_HANDLER is not set
1249CONFIG_HW_RANDOM=y 1304CONFIG_HW_RANDOM=y
@@ -1278,6 +1333,7 @@ CONFIG_I2C=y
1278CONFIG_I2C_BOARDINFO=y 1333CONFIG_I2C_BOARDINFO=y
1279# CONFIG_I2C_CHARDEV is not set 1334# CONFIG_I2C_CHARDEV is not set
1280CONFIG_I2C_HELPER_AUTO=y 1335CONFIG_I2C_HELPER_AUTO=y
1336CONFIG_I2C_ALGOBIT=y
1281 1337
1282# 1338#
1283# I2C Hardware Bus support 1339# I2C Hardware Bus support
@@ -1330,8 +1386,6 @@ CONFIG_I2C_I801=y
1330# Miscellaneous I2C Chip support 1386# Miscellaneous I2C Chip support
1331# 1387#
1332# CONFIG_DS1682 is not set 1388# CONFIG_DS1682 is not set
1333# CONFIG_EEPROM_AT24 is not set
1334# CONFIG_EEPROM_LEGACY is not set
1335# CONFIG_SENSORS_PCF8574 is not set 1389# CONFIG_SENSORS_PCF8574 is not set
1336# CONFIG_PCF8575 is not set 1390# CONFIG_PCF8575 is not set
1337# CONFIG_SENSORS_PCA9539 is not set 1391# CONFIG_SENSORS_PCA9539 is not set
@@ -1350,8 +1404,78 @@ CONFIG_POWER_SUPPLY=y
1350# CONFIG_POWER_SUPPLY_DEBUG is not set 1404# CONFIG_POWER_SUPPLY_DEBUG is not set
1351# CONFIG_PDA_POWER is not set 1405# CONFIG_PDA_POWER is not set
1352# CONFIG_BATTERY_DS2760 is not set 1406# CONFIG_BATTERY_DS2760 is not set
1353# CONFIG_HWMON is not set 1407# CONFIG_BATTERY_BQ27x00 is not set
1408CONFIG_HWMON=y
1409# CONFIG_HWMON_VID is not set
1410# CONFIG_SENSORS_ABITUGURU is not set
1411# CONFIG_SENSORS_ABITUGURU3 is not set
1412# CONFIG_SENSORS_AD7414 is not set
1413# CONFIG_SENSORS_AD7418 is not set
1414# CONFIG_SENSORS_ADM1021 is not set
1415# CONFIG_SENSORS_ADM1025 is not set
1416# CONFIG_SENSORS_ADM1026 is not set
1417# CONFIG_SENSORS_ADM1029 is not set
1418# CONFIG_SENSORS_ADM1031 is not set
1419# CONFIG_SENSORS_ADM9240 is not set
1420# CONFIG_SENSORS_ADT7462 is not set
1421# CONFIG_SENSORS_ADT7470 is not set
1422# CONFIG_SENSORS_ADT7473 is not set
1423# CONFIG_SENSORS_ADT7475 is not set
1424# CONFIG_SENSORS_K8TEMP is not set
1425# CONFIG_SENSORS_ASB100 is not set
1426# CONFIG_SENSORS_ATXP1 is not set
1427# CONFIG_SENSORS_DS1621 is not set
1428# CONFIG_SENSORS_I5K_AMB is not set
1429# CONFIG_SENSORS_F71805F is not set
1430# CONFIG_SENSORS_F71882FG is not set
1431# CONFIG_SENSORS_F75375S is not set
1432# CONFIG_SENSORS_FSCHER is not set
1433# CONFIG_SENSORS_FSCPOS is not set
1434# CONFIG_SENSORS_FSCHMD is not set
1435# CONFIG_SENSORS_GL518SM is not set
1436# CONFIG_SENSORS_GL520SM is not set
1437# CONFIG_SENSORS_CORETEMP is not set
1438# CONFIG_SENSORS_IT87 is not set
1439# CONFIG_SENSORS_LM63 is not set
1440# CONFIG_SENSORS_LM75 is not set
1441# CONFIG_SENSORS_LM77 is not set
1442# CONFIG_SENSORS_LM78 is not set
1443# CONFIG_SENSORS_LM80 is not set
1444# CONFIG_SENSORS_LM83 is not set
1445# CONFIG_SENSORS_LM85 is not set
1446# CONFIG_SENSORS_LM87 is not set
1447# CONFIG_SENSORS_LM90 is not set
1448# CONFIG_SENSORS_LM92 is not set
1449# CONFIG_SENSORS_LM93 is not set
1450# CONFIG_SENSORS_LTC4245 is not set
1451# CONFIG_SENSORS_MAX1619 is not set
1452# CONFIG_SENSORS_MAX6650 is not set
1453# CONFIG_SENSORS_PC87360 is not set
1454# CONFIG_SENSORS_PC87427 is not set
1455# CONFIG_SENSORS_SIS5595 is not set
1456# CONFIG_SENSORS_DME1737 is not set
1457# CONFIG_SENSORS_SMSC47M1 is not set
1458# CONFIG_SENSORS_SMSC47M192 is not set
1459# CONFIG_SENSORS_SMSC47B397 is not set
1460# CONFIG_SENSORS_ADS7828 is not set
1461# CONFIG_SENSORS_THMC50 is not set
1462# CONFIG_SENSORS_VIA686A is not set
1463# CONFIG_SENSORS_VT1211 is not set
1464# CONFIG_SENSORS_VT8231 is not set
1465# CONFIG_SENSORS_W83781D is not set
1466# CONFIG_SENSORS_W83791D is not set
1467# CONFIG_SENSORS_W83792D is not set
1468# CONFIG_SENSORS_W83793 is not set
1469# CONFIG_SENSORS_W83L785TS is not set
1470# CONFIG_SENSORS_W83L786NG is not set
1471# CONFIG_SENSORS_W83627HF is not set
1472# CONFIG_SENSORS_W83627EHF is not set
1473# CONFIG_SENSORS_HDAPS is not set
1474# CONFIG_SENSORS_LIS3LV02D is not set
1475# CONFIG_SENSORS_APPLESMC is not set
1476# CONFIG_HWMON_DEBUG_CHIP is not set
1354CONFIG_THERMAL=y 1477CONFIG_THERMAL=y
1478# CONFIG_THERMAL_HWMON is not set
1355CONFIG_WATCHDOG=y 1479CONFIG_WATCHDOG=y
1356# CONFIG_WATCHDOG_NOWAYOUT is not set 1480# CONFIG_WATCHDOG_NOWAYOUT is not set
1357 1481
@@ -1371,6 +1495,7 @@ CONFIG_WATCHDOG=y
1371# CONFIG_I6300ESB_WDT is not set 1495# CONFIG_I6300ESB_WDT is not set
1372# CONFIG_ITCO_WDT is not set 1496# CONFIG_ITCO_WDT is not set
1373# CONFIG_IT8712F_WDT is not set 1497# CONFIG_IT8712F_WDT is not set
1498# CONFIG_IT87_WDT is not set
1374# CONFIG_HP_WATCHDOG is not set 1499# CONFIG_HP_WATCHDOG is not set
1375# CONFIG_SC1200_WDT is not set 1500# CONFIG_SC1200_WDT is not set
1376# CONFIG_PC87413_WDT is not set 1501# CONFIG_PC87413_WDT is not set
@@ -1378,9 +1503,11 @@ CONFIG_WATCHDOG=y
1378# CONFIG_SBC8360_WDT is not set 1503# CONFIG_SBC8360_WDT is not set
1379# CONFIG_SBC7240_WDT is not set 1504# CONFIG_SBC7240_WDT is not set
1380# CONFIG_CPU5_WDT is not set 1505# CONFIG_CPU5_WDT is not set
1506# CONFIG_SMSC_SCH311X_WDT is not set
1381# CONFIG_SMSC37B787_WDT is not set 1507# CONFIG_SMSC37B787_WDT is not set
1382# CONFIG_W83627HF_WDT is not set 1508# CONFIG_W83627HF_WDT is not set
1383# CONFIG_W83697HF_WDT is not set 1509# CONFIG_W83697HF_WDT is not set
1510# CONFIG_W83697UG_WDT is not set
1384# CONFIG_W83877F_WDT is not set 1511# CONFIG_W83877F_WDT is not set
1385# CONFIG_W83977F_WDT is not set 1512# CONFIG_W83977F_WDT is not set
1386# CONFIG_MACHZ_WDT is not set 1513# CONFIG_MACHZ_WDT is not set
@@ -1396,11 +1523,11 @@ CONFIG_WATCHDOG=y
1396# USB-based Watchdog Cards 1523# USB-based Watchdog Cards
1397# 1524#
1398# CONFIG_USBPCWATCHDOG is not set 1525# CONFIG_USBPCWATCHDOG is not set
1526CONFIG_SSB_POSSIBLE=y
1399 1527
1400# 1528#
1401# Sonics Silicon Backplane 1529# Sonics Silicon Backplane
1402# 1530#
1403CONFIG_SSB_POSSIBLE=y
1404# CONFIG_SSB is not set 1531# CONFIG_SSB is not set
1405 1532
1406# 1533#
@@ -1409,7 +1536,13 @@ CONFIG_SSB_POSSIBLE=y
1409# CONFIG_MFD_CORE is not set 1536# CONFIG_MFD_CORE is not set
1410# CONFIG_MFD_SM501 is not set 1537# CONFIG_MFD_SM501 is not set
1411# CONFIG_HTC_PASIC3 is not set 1538# CONFIG_HTC_PASIC3 is not set
1539# CONFIG_TWL4030_CORE is not set
1412# CONFIG_MFD_TMIO is not set 1540# CONFIG_MFD_TMIO is not set
1541# CONFIG_PMIC_DA903X is not set
1542# CONFIG_MFD_WM8400 is not set
1543# CONFIG_MFD_WM8350_I2C is not set
1544# CONFIG_MFD_PCF50633 is not set
1545# CONFIG_REGULATOR is not set
1413 1546
1414# 1547#
1415# Multimedia devices 1548# Multimedia devices
@@ -1449,6 +1582,7 @@ CONFIG_DRM=y
1449# CONFIG_DRM_I810 is not set 1582# CONFIG_DRM_I810 is not set
1450# CONFIG_DRM_I830 is not set 1583# CONFIG_DRM_I830 is not set
1451CONFIG_DRM_I915=y 1584CONFIG_DRM_I915=y
1585# CONFIG_DRM_I915_KMS is not set
1452# CONFIG_DRM_MGA is not set 1586# CONFIG_DRM_MGA is not set
1453# CONFIG_DRM_SIS is not set 1587# CONFIG_DRM_SIS is not set
1454# CONFIG_DRM_VIA is not set 1588# CONFIG_DRM_VIA is not set
@@ -1458,6 +1592,7 @@ CONFIG_DRM_I915=y
1458CONFIG_FB=y 1592CONFIG_FB=y
1459# CONFIG_FIRMWARE_EDID is not set 1593# CONFIG_FIRMWARE_EDID is not set
1460# CONFIG_FB_DDC is not set 1594# CONFIG_FB_DDC is not set
1595# CONFIG_FB_BOOT_VESA_SUPPORT is not set
1461CONFIG_FB_CFB_FILLRECT=y 1596CONFIG_FB_CFB_FILLRECT=y
1462CONFIG_FB_CFB_COPYAREA=y 1597CONFIG_FB_CFB_COPYAREA=y
1463CONFIG_FB_CFB_IMAGEBLIT=y 1598CONFIG_FB_CFB_IMAGEBLIT=y
@@ -1486,7 +1621,6 @@ CONFIG_FB_TILEBLITTING=y
1486# CONFIG_FB_UVESA is not set 1621# CONFIG_FB_UVESA is not set
1487# CONFIG_FB_VESA is not set 1622# CONFIG_FB_VESA is not set
1488CONFIG_FB_EFI=y 1623CONFIG_FB_EFI=y
1489# CONFIG_FB_IMAC is not set
1490# CONFIG_FB_N411 is not set 1624# CONFIG_FB_N411 is not set
1491# CONFIG_FB_HGA is not set 1625# CONFIG_FB_HGA is not set
1492# CONFIG_FB_S1D13XXX is not set 1626# CONFIG_FB_S1D13XXX is not set
@@ -1502,6 +1636,7 @@ CONFIG_FB_EFI=y
1502# CONFIG_FB_S3 is not set 1636# CONFIG_FB_S3 is not set
1503# CONFIG_FB_SAVAGE is not set 1637# CONFIG_FB_SAVAGE is not set
1504# CONFIG_FB_SIS is not set 1638# CONFIG_FB_SIS is not set
1639# CONFIG_FB_VIA is not set
1505# CONFIG_FB_NEOMAGIC is not set 1640# CONFIG_FB_NEOMAGIC is not set
1506# CONFIG_FB_KYRO is not set 1641# CONFIG_FB_KYRO is not set
1507# CONFIG_FB_3DFX is not set 1642# CONFIG_FB_3DFX is not set
@@ -1514,12 +1649,15 @@ CONFIG_FB_EFI=y
1514# CONFIG_FB_CARMINE is not set 1649# CONFIG_FB_CARMINE is not set
1515# CONFIG_FB_GEODE is not set 1650# CONFIG_FB_GEODE is not set
1516# CONFIG_FB_VIRTUAL is not set 1651# CONFIG_FB_VIRTUAL is not set
1652# CONFIG_FB_METRONOME is not set
1653# CONFIG_FB_MB862XX is not set
1517CONFIG_BACKLIGHT_LCD_SUPPORT=y 1654CONFIG_BACKLIGHT_LCD_SUPPORT=y
1518# CONFIG_LCD_CLASS_DEVICE is not set 1655# CONFIG_LCD_CLASS_DEVICE is not set
1519CONFIG_BACKLIGHT_CLASS_DEVICE=y 1656CONFIG_BACKLIGHT_CLASS_DEVICE=y
1520# CONFIG_BACKLIGHT_CORGI is not set 1657CONFIG_BACKLIGHT_GENERIC=y
1521# CONFIG_BACKLIGHT_PROGEAR is not set 1658# CONFIG_BACKLIGHT_PROGEAR is not set
1522# CONFIG_BACKLIGHT_MBP_NVIDIA is not set 1659# CONFIG_BACKLIGHT_MBP_NVIDIA is not set
1660# CONFIG_BACKLIGHT_SAHARA is not set
1523 1661
1524# 1662#
1525# Display device support 1663# Display device support
@@ -1539,10 +1677,12 @@ CONFIG_LOGO=y
1539# CONFIG_LOGO_LINUX_VGA16 is not set 1677# CONFIG_LOGO_LINUX_VGA16 is not set
1540CONFIG_LOGO_LINUX_CLUT224=y 1678CONFIG_LOGO_LINUX_CLUT224=y
1541CONFIG_SOUND=y 1679CONFIG_SOUND=y
1680CONFIG_SOUND_OSS_CORE=y
1542CONFIG_SND=y 1681CONFIG_SND=y
1543CONFIG_SND_TIMER=y 1682CONFIG_SND_TIMER=y
1544CONFIG_SND_PCM=y 1683CONFIG_SND_PCM=y
1545CONFIG_SND_HWDEP=y 1684CONFIG_SND_HWDEP=y
1685CONFIG_SND_JACK=y
1546CONFIG_SND_SEQUENCER=y 1686CONFIG_SND_SEQUENCER=y
1547CONFIG_SND_SEQ_DUMMY=y 1687CONFIG_SND_SEQ_DUMMY=y
1548CONFIG_SND_OSSEMUL=y 1688CONFIG_SND_OSSEMUL=y
@@ -1550,6 +1690,8 @@ CONFIG_SND_MIXER_OSS=y
1550CONFIG_SND_PCM_OSS=y 1690CONFIG_SND_PCM_OSS=y
1551CONFIG_SND_PCM_OSS_PLUGINS=y 1691CONFIG_SND_PCM_OSS_PLUGINS=y
1552CONFIG_SND_SEQUENCER_OSS=y 1692CONFIG_SND_SEQUENCER_OSS=y
1693CONFIG_SND_HRTIMER=y
1694CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
1553CONFIG_SND_DYNAMIC_MINORS=y 1695CONFIG_SND_DYNAMIC_MINORS=y
1554CONFIG_SND_SUPPORT_OLD_API=y 1696CONFIG_SND_SUPPORT_OLD_API=y
1555CONFIG_SND_VERBOSE_PROCFS=y 1697CONFIG_SND_VERBOSE_PROCFS=y
@@ -1604,11 +1746,16 @@ CONFIG_SND_PCI=y
1604# CONFIG_SND_FM801 is not set 1746# CONFIG_SND_FM801 is not set
1605CONFIG_SND_HDA_INTEL=y 1747CONFIG_SND_HDA_INTEL=y
1606CONFIG_SND_HDA_HWDEP=y 1748CONFIG_SND_HDA_HWDEP=y
1749# CONFIG_SND_HDA_RECONFIG is not set
1750# CONFIG_SND_HDA_INPUT_BEEP is not set
1607CONFIG_SND_HDA_CODEC_REALTEK=y 1751CONFIG_SND_HDA_CODEC_REALTEK=y
1608CONFIG_SND_HDA_CODEC_ANALOG=y 1752CONFIG_SND_HDA_CODEC_ANALOG=y
1609CONFIG_SND_HDA_CODEC_SIGMATEL=y 1753CONFIG_SND_HDA_CODEC_SIGMATEL=y
1610CONFIG_SND_HDA_CODEC_VIA=y 1754CONFIG_SND_HDA_CODEC_VIA=y
1611CONFIG_SND_HDA_CODEC_ATIHDMI=y 1755CONFIG_SND_HDA_CODEC_ATIHDMI=y
1756CONFIG_SND_HDA_CODEC_NVHDMI=y
1757CONFIG_SND_HDA_CODEC_INTELHDMI=y
1758CONFIG_SND_HDA_ELD=y
1612CONFIG_SND_HDA_CODEC_CONEXANT=y 1759CONFIG_SND_HDA_CODEC_CONEXANT=y
1613CONFIG_SND_HDA_CODEC_CMEDIA=y 1760CONFIG_SND_HDA_CODEC_CMEDIA=y
1614CONFIG_SND_HDA_CODEC_SI3054=y 1761CONFIG_SND_HDA_CODEC_SI3054=y
@@ -1642,6 +1789,7 @@ CONFIG_SND_USB=y
1642# CONFIG_SND_USB_AUDIO is not set 1789# CONFIG_SND_USB_AUDIO is not set
1643# CONFIG_SND_USB_USX2Y is not set 1790# CONFIG_SND_USB_USX2Y is not set
1644# CONFIG_SND_USB_CAIAQ is not set 1791# CONFIG_SND_USB_CAIAQ is not set
1792# CONFIG_SND_USB_US122L is not set
1645CONFIG_SND_PCMCIA=y 1793CONFIG_SND_PCMCIA=y
1646# CONFIG_SND_VXPOCKET is not set 1794# CONFIG_SND_VXPOCKET is not set
1647# CONFIG_SND_PDAUDIOCF is not set 1795# CONFIG_SND_PDAUDIOCF is not set
@@ -1656,15 +1804,37 @@ CONFIG_HIDRAW=y
1656# USB Input Devices 1804# USB Input Devices
1657# 1805#
1658CONFIG_USB_HID=y 1806CONFIG_USB_HID=y
1659CONFIG_USB_HIDINPUT_POWERBOOK=y
1660CONFIG_HID_FF=y
1661CONFIG_HID_PID=y 1807CONFIG_HID_PID=y
1808CONFIG_USB_HIDDEV=y
1809
1810#
1811# Special HID drivers
1812#
1813CONFIG_HID_COMPAT=y
1814CONFIG_HID_A4TECH=y
1815CONFIG_HID_APPLE=y
1816CONFIG_HID_BELKIN=y
1817CONFIG_HID_CHERRY=y
1818CONFIG_HID_CHICONY=y
1819CONFIG_HID_CYPRESS=y
1820CONFIG_HID_EZKEY=y
1821CONFIG_HID_GYRATION=y
1822CONFIG_HID_LOGITECH=y
1662CONFIG_LOGITECH_FF=y 1823CONFIG_LOGITECH_FF=y
1663# CONFIG_LOGIRUMBLEPAD2_FF is not set 1824# CONFIG_LOGIRUMBLEPAD2_FF is not set
1825CONFIG_HID_MICROSOFT=y
1826CONFIG_HID_MONTEREY=y
1827CONFIG_HID_NTRIG=y
1828CONFIG_HID_PANTHERLORD=y
1664CONFIG_PANTHERLORD_FF=y 1829CONFIG_PANTHERLORD_FF=y
1830CONFIG_HID_PETALYNX=y
1831CONFIG_HID_SAMSUNG=y
1832CONFIG_HID_SONY=y
1833CONFIG_HID_SUNPLUS=y
1834# CONFIG_GREENASIA_FF is not set
1835CONFIG_HID_TOPSEED=y
1665CONFIG_THRUSTMASTER_FF=y 1836CONFIG_THRUSTMASTER_FF=y
1666CONFIG_ZEROPLUS_FF=y 1837CONFIG_ZEROPLUS_FF=y
1667CONFIG_USB_HIDDEV=y
1668CONFIG_USB_SUPPORT=y 1838CONFIG_USB_SUPPORT=y
1669CONFIG_USB_ARCH_HAS_HCD=y 1839CONFIG_USB_ARCH_HAS_HCD=y
1670CONFIG_USB_ARCH_HAS_OHCI=y 1840CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1682,6 +1852,8 @@ CONFIG_USB_DEVICEFS=y
1682CONFIG_USB_SUSPEND=y 1852CONFIG_USB_SUSPEND=y
1683# CONFIG_USB_OTG is not set 1853# CONFIG_USB_OTG is not set
1684CONFIG_USB_MON=y 1854CONFIG_USB_MON=y
1855# CONFIG_USB_WUSB is not set
1856# CONFIG_USB_WUSB_CBAF is not set
1685 1857
1686# 1858#
1687# USB Host Controller Drivers 1859# USB Host Controller Drivers
@@ -1690,6 +1862,7 @@ CONFIG_USB_MON=y
1690CONFIG_USB_EHCI_HCD=y 1862CONFIG_USB_EHCI_HCD=y
1691# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1863# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1692# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1864# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1865# CONFIG_USB_OXU210HP_HCD is not set
1693# CONFIG_USB_ISP116X_HCD is not set 1866# CONFIG_USB_ISP116X_HCD is not set
1694# CONFIG_USB_ISP1760_HCD is not set 1867# CONFIG_USB_ISP1760_HCD is not set
1695CONFIG_USB_OHCI_HCD=y 1868CONFIG_USB_OHCI_HCD=y
@@ -1699,6 +1872,8 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1699CONFIG_USB_UHCI_HCD=y 1872CONFIG_USB_UHCI_HCD=y
1700# CONFIG_USB_SL811_HCD is not set 1873# CONFIG_USB_SL811_HCD is not set
1701# CONFIG_USB_R8A66597_HCD is not set 1874# CONFIG_USB_R8A66597_HCD is not set
1875# CONFIG_USB_WHCI_HCD is not set
1876# CONFIG_USB_HWA_HCD is not set
1702 1877
1703# 1878#
1704# USB Device Class drivers 1879# USB Device Class drivers
@@ -1706,20 +1881,20 @@ CONFIG_USB_UHCI_HCD=y
1706# CONFIG_USB_ACM is not set 1881# CONFIG_USB_ACM is not set
1707CONFIG_USB_PRINTER=y 1882CONFIG_USB_PRINTER=y
1708# CONFIG_USB_WDM is not set 1883# CONFIG_USB_WDM is not set
1884# CONFIG_USB_TMC is not set
1709 1885
1710# 1886#
1711# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1887# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
1712# 1888#
1713 1889
1714# 1890#
1715# may also be needed; see USB_STORAGE Help for more information 1891# see USB_STORAGE Help for more information
1716# 1892#
1717CONFIG_USB_STORAGE=y 1893CONFIG_USB_STORAGE=y
1718# CONFIG_USB_STORAGE_DEBUG is not set 1894# CONFIG_USB_STORAGE_DEBUG is not set
1719# CONFIG_USB_STORAGE_DATAFAB is not set 1895# CONFIG_USB_STORAGE_DATAFAB is not set
1720# CONFIG_USB_STORAGE_FREECOM is not set 1896# CONFIG_USB_STORAGE_FREECOM is not set
1721# CONFIG_USB_STORAGE_ISD200 is not set 1897# CONFIG_USB_STORAGE_ISD200 is not set
1722# CONFIG_USB_STORAGE_DPCM is not set
1723# CONFIG_USB_STORAGE_USBAT is not set 1898# CONFIG_USB_STORAGE_USBAT is not set
1724# CONFIG_USB_STORAGE_SDDR09 is not set 1899# CONFIG_USB_STORAGE_SDDR09 is not set
1725# CONFIG_USB_STORAGE_SDDR55 is not set 1900# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1727,7 +1902,6 @@ CONFIG_USB_STORAGE=y
1727# CONFIG_USB_STORAGE_ALAUDA is not set 1902# CONFIG_USB_STORAGE_ALAUDA is not set
1728# CONFIG_USB_STORAGE_ONETOUCH is not set 1903# CONFIG_USB_STORAGE_ONETOUCH is not set
1729# CONFIG_USB_STORAGE_KARMA is not set 1904# CONFIG_USB_STORAGE_KARMA is not set
1730# CONFIG_USB_STORAGE_SIERRA is not set
1731# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set 1905# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1732CONFIG_USB_LIBUSUAL=y 1906CONFIG_USB_LIBUSUAL=y
1733 1907
@@ -1748,6 +1922,7 @@ CONFIG_USB_LIBUSUAL=y
1748# CONFIG_USB_EMI62 is not set 1922# CONFIG_USB_EMI62 is not set
1749# CONFIG_USB_EMI26 is not set 1923# CONFIG_USB_EMI26 is not set
1750# CONFIG_USB_ADUTUX is not set 1924# CONFIG_USB_ADUTUX is not set
1925# CONFIG_USB_SEVSEG is not set
1751# CONFIG_USB_RIO500 is not set 1926# CONFIG_USB_RIO500 is not set
1752# CONFIG_USB_LEGOTOWER is not set 1927# CONFIG_USB_LEGOTOWER is not set
1753# CONFIG_USB_LCD is not set 1928# CONFIG_USB_LCD is not set
@@ -1765,7 +1940,13 @@ CONFIG_USB_LIBUSUAL=y
1765# CONFIG_USB_IOWARRIOR is not set 1940# CONFIG_USB_IOWARRIOR is not set
1766# CONFIG_USB_TEST is not set 1941# CONFIG_USB_TEST is not set
1767# CONFIG_USB_ISIGHTFW is not set 1942# CONFIG_USB_ISIGHTFW is not set
1943# CONFIG_USB_VST is not set
1768# CONFIG_USB_GADGET is not set 1944# CONFIG_USB_GADGET is not set
1945
1946#
1947# OTG and related infrastructure
1948#
1949# CONFIG_UWB is not set
1769# CONFIG_MMC is not set 1950# CONFIG_MMC is not set
1770# CONFIG_MEMSTICK is not set 1951# CONFIG_MEMSTICK is not set
1771CONFIG_NEW_LEDS=y 1952CONFIG_NEW_LEDS=y
@@ -1774,6 +1955,7 @@ CONFIG_LEDS_CLASS=y
1774# 1955#
1775# LED drivers 1956# LED drivers
1776# 1957#
1958# CONFIG_LEDS_ALIX2 is not set
1777# CONFIG_LEDS_PCA9532 is not set 1959# CONFIG_LEDS_PCA9532 is not set
1778# CONFIG_LEDS_CLEVO_MAIL is not set 1960# CONFIG_LEDS_CLEVO_MAIL is not set
1779# CONFIG_LEDS_PCA955X is not set 1961# CONFIG_LEDS_PCA955X is not set
@@ -1784,6 +1966,7 @@ CONFIG_LEDS_CLASS=y
1784CONFIG_LEDS_TRIGGERS=y 1966CONFIG_LEDS_TRIGGERS=y
1785# CONFIG_LEDS_TRIGGER_TIMER is not set 1967# CONFIG_LEDS_TRIGGER_TIMER is not set
1786# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set 1968# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
1969# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1787# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set 1970# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1788# CONFIG_ACCESSIBILITY is not set 1971# CONFIG_ACCESSIBILITY is not set
1789# CONFIG_INFINIBAND is not set 1972# CONFIG_INFINIBAND is not set
@@ -1823,6 +2006,7 @@ CONFIG_RTC_INTF_DEV=y
1823# CONFIG_RTC_DRV_M41T80 is not set 2006# CONFIG_RTC_DRV_M41T80 is not set
1824# CONFIG_RTC_DRV_S35390A is not set 2007# CONFIG_RTC_DRV_S35390A is not set
1825# CONFIG_RTC_DRV_FM3130 is not set 2008# CONFIG_RTC_DRV_FM3130 is not set
2009# CONFIG_RTC_DRV_RX8581 is not set
1826 2010
1827# 2011#
1828# SPI RTC drivers 2012# SPI RTC drivers
@@ -1832,12 +2016,15 @@ CONFIG_RTC_INTF_DEV=y
1832# Platform RTC drivers 2016# Platform RTC drivers
1833# 2017#
1834CONFIG_RTC_DRV_CMOS=y 2018CONFIG_RTC_DRV_CMOS=y
2019# CONFIG_RTC_DRV_DS1286 is not set
1835# CONFIG_RTC_DRV_DS1511 is not set 2020# CONFIG_RTC_DRV_DS1511 is not set
1836# CONFIG_RTC_DRV_DS1553 is not set 2021# CONFIG_RTC_DRV_DS1553 is not set
1837# CONFIG_RTC_DRV_DS1742 is not set 2022# CONFIG_RTC_DRV_DS1742 is not set
1838# CONFIG_RTC_DRV_STK17TA8 is not set 2023# CONFIG_RTC_DRV_STK17TA8 is not set
1839# CONFIG_RTC_DRV_M48T86 is not set 2024# CONFIG_RTC_DRV_M48T86 is not set
2025# CONFIG_RTC_DRV_M48T35 is not set
1840# CONFIG_RTC_DRV_M48T59 is not set 2026# CONFIG_RTC_DRV_M48T59 is not set
2027# CONFIG_RTC_DRV_BQ4802 is not set
1841# CONFIG_RTC_DRV_V3020 is not set 2028# CONFIG_RTC_DRV_V3020 is not set
1842 2029
1843# 2030#
@@ -1850,6 +2037,22 @@ CONFIG_DMADEVICES=y
1850# 2037#
1851# CONFIG_INTEL_IOATDMA is not set 2038# CONFIG_INTEL_IOATDMA is not set
1852# CONFIG_UIO is not set 2039# CONFIG_UIO is not set
2040# CONFIG_STAGING is not set
2041CONFIG_X86_PLATFORM_DEVICES=y
2042# CONFIG_ACER_WMI is not set
2043# CONFIG_ASUS_LAPTOP is not set
2044# CONFIG_FUJITSU_LAPTOP is not set
2045# CONFIG_TC1100_WMI is not set
2046# CONFIG_MSI_LAPTOP is not set
2047# CONFIG_PANASONIC_LAPTOP is not set
2048# CONFIG_COMPAL_LAPTOP is not set
2049# CONFIG_SONY_LAPTOP is not set
2050# CONFIG_THINKPAD_ACPI is not set
2051# CONFIG_INTEL_MENLOW is not set
2052CONFIG_EEEPC_LAPTOP=y
2053# CONFIG_ACPI_WMI is not set
2054# CONFIG_ACPI_ASUS is not set
2055# CONFIG_ACPI_TOSHIBA is not set
1853 2056
1854# 2057#
1855# Firmware Drivers 2058# Firmware Drivers
@@ -1860,8 +2063,7 @@ CONFIG_EFI_VARS=y
1860# CONFIG_DELL_RBU is not set 2063# CONFIG_DELL_RBU is not set
1861# CONFIG_DCDBAS is not set 2064# CONFIG_DCDBAS is not set
1862CONFIG_DMIID=y 2065CONFIG_DMIID=y
1863CONFIG_ISCSI_IBFT_FIND=y 2066# CONFIG_ISCSI_IBFT_FIND is not set
1864CONFIG_ISCSI_IBFT=y
1865 2067
1866# 2068#
1867# File systems 2069# File systems
@@ -1871,21 +2073,24 @@ CONFIG_EXT3_FS=y
1871CONFIG_EXT3_FS_XATTR=y 2073CONFIG_EXT3_FS_XATTR=y
1872CONFIG_EXT3_FS_POSIX_ACL=y 2074CONFIG_EXT3_FS_POSIX_ACL=y
1873CONFIG_EXT3_FS_SECURITY=y 2075CONFIG_EXT3_FS_SECURITY=y
1874# CONFIG_EXT4DEV_FS is not set 2076# CONFIG_EXT4_FS is not set
1875CONFIG_JBD=y 2077CONFIG_JBD=y
1876# CONFIG_JBD_DEBUG is not set 2078# CONFIG_JBD_DEBUG is not set
1877CONFIG_FS_MBCACHE=y 2079CONFIG_FS_MBCACHE=y
1878# CONFIG_REISERFS_FS is not set 2080# CONFIG_REISERFS_FS is not set
1879# CONFIG_JFS_FS is not set 2081# CONFIG_JFS_FS is not set
1880CONFIG_FS_POSIX_ACL=y 2082CONFIG_FS_POSIX_ACL=y
2083CONFIG_FILE_LOCKING=y
1881# CONFIG_XFS_FS is not set 2084# CONFIG_XFS_FS is not set
1882# CONFIG_OCFS2_FS is not set 2085# CONFIG_OCFS2_FS is not set
2086# CONFIG_BTRFS_FS is not set
1883CONFIG_DNOTIFY=y 2087CONFIG_DNOTIFY=y
1884CONFIG_INOTIFY=y 2088CONFIG_INOTIFY=y
1885CONFIG_INOTIFY_USER=y 2089CONFIG_INOTIFY_USER=y
1886CONFIG_QUOTA=y 2090CONFIG_QUOTA=y
1887CONFIG_QUOTA_NETLINK_INTERFACE=y 2091CONFIG_QUOTA_NETLINK_INTERFACE=y
1888# CONFIG_PRINT_QUOTA_WARNING is not set 2092# CONFIG_PRINT_QUOTA_WARNING is not set
2093CONFIG_QUOTA_TREE=y
1889# CONFIG_QFMT_V1 is not set 2094# CONFIG_QFMT_V1 is not set
1890CONFIG_QFMT_V2=y 2095CONFIG_QFMT_V2=y
1891CONFIG_QUOTACTL=y 2096CONFIG_QUOTACTL=y
@@ -1919,16 +2124,14 @@ CONFIG_PROC_FS=y
1919CONFIG_PROC_KCORE=y 2124CONFIG_PROC_KCORE=y
1920CONFIG_PROC_VMCORE=y 2125CONFIG_PROC_VMCORE=y
1921CONFIG_PROC_SYSCTL=y 2126CONFIG_PROC_SYSCTL=y
2127CONFIG_PROC_PAGE_MONITOR=y
1922CONFIG_SYSFS=y 2128CONFIG_SYSFS=y
1923CONFIG_TMPFS=y 2129CONFIG_TMPFS=y
1924CONFIG_TMPFS_POSIX_ACL=y 2130CONFIG_TMPFS_POSIX_ACL=y
1925CONFIG_HUGETLBFS=y 2131CONFIG_HUGETLBFS=y
1926CONFIG_HUGETLB_PAGE=y 2132CONFIG_HUGETLB_PAGE=y
1927# CONFIG_CONFIGFS_FS is not set 2133# CONFIG_CONFIGFS_FS is not set
1928 2134CONFIG_MISC_FILESYSTEMS=y
1929#
1930# Miscellaneous filesystems
1931#
1932# CONFIG_ADFS_FS is not set 2135# CONFIG_ADFS_FS is not set
1933# CONFIG_AFFS_FS is not set 2136# CONFIG_AFFS_FS is not set
1934# CONFIG_ECRYPT_FS is not set 2137# CONFIG_ECRYPT_FS is not set
@@ -1938,6 +2141,7 @@ CONFIG_HUGETLB_PAGE=y
1938# CONFIG_BFS_FS is not set 2141# CONFIG_BFS_FS is not set
1939# CONFIG_EFS_FS is not set 2142# CONFIG_EFS_FS is not set
1940# CONFIG_CRAMFS is not set 2143# CONFIG_CRAMFS is not set
2144# CONFIG_SQUASHFS is not set
1941# CONFIG_VXFS_FS is not set 2145# CONFIG_VXFS_FS is not set
1942# CONFIG_MINIX_FS is not set 2146# CONFIG_MINIX_FS is not set
1943# CONFIG_OMFS_FS is not set 2147# CONFIG_OMFS_FS is not set
@@ -1959,6 +2163,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1959CONFIG_NFS_COMMON=y 2163CONFIG_NFS_COMMON=y
1960CONFIG_SUNRPC=y 2164CONFIG_SUNRPC=y
1961CONFIG_SUNRPC_GSS=y 2165CONFIG_SUNRPC_GSS=y
2166# CONFIG_SUNRPC_REGISTER_V4 is not set
1962CONFIG_RPCSEC_GSS_KRB5=y 2167CONFIG_RPCSEC_GSS_KRB5=y
1963# CONFIG_RPCSEC_GSS_SPKM3 is not set 2168# CONFIG_RPCSEC_GSS_SPKM3 is not set
1964# CONFIG_SMB_FS is not set 2169# CONFIG_SMB_FS is not set
@@ -2035,7 +2240,7 @@ CONFIG_NLS_UTF8=y
2035# 2240#
2036CONFIG_TRACE_IRQFLAGS_SUPPORT=y 2241CONFIG_TRACE_IRQFLAGS_SUPPORT=y
2037CONFIG_PRINTK_TIME=y 2242CONFIG_PRINTK_TIME=y
2038CONFIG_ENABLE_WARN_DEPRECATED=y 2243# CONFIG_ENABLE_WARN_DEPRECATED is not set
2039CONFIG_ENABLE_MUST_CHECK=y 2244CONFIG_ENABLE_MUST_CHECK=y
2040CONFIG_FRAME_WARN=2048 2245CONFIG_FRAME_WARN=2048
2041CONFIG_MAGIC_SYSRQ=y 2246CONFIG_MAGIC_SYSRQ=y
@@ -2065,33 +2270,54 @@ CONFIG_TIMER_STATS=y
2065CONFIG_DEBUG_BUGVERBOSE=y 2270CONFIG_DEBUG_BUGVERBOSE=y
2066# CONFIG_DEBUG_INFO is not set 2271# CONFIG_DEBUG_INFO is not set
2067# CONFIG_DEBUG_VM is not set 2272# CONFIG_DEBUG_VM is not set
2273# CONFIG_DEBUG_VIRTUAL is not set
2068# CONFIG_DEBUG_WRITECOUNT is not set 2274# CONFIG_DEBUG_WRITECOUNT is not set
2069CONFIG_DEBUG_MEMORY_INIT=y 2275CONFIG_DEBUG_MEMORY_INIT=y
2070# CONFIG_DEBUG_LIST is not set 2276# CONFIG_DEBUG_LIST is not set
2071# CONFIG_DEBUG_SG is not set 2277# CONFIG_DEBUG_SG is not set
2278# CONFIG_DEBUG_NOTIFIERS is not set
2279CONFIG_ARCH_WANT_FRAME_POINTERS=y
2072CONFIG_FRAME_POINTER=y 2280CONFIG_FRAME_POINTER=y
2073# CONFIG_BOOT_PRINTK_DELAY is not set 2281# CONFIG_BOOT_PRINTK_DELAY is not set
2074# CONFIG_RCU_TORTURE_TEST is not set 2282# CONFIG_RCU_TORTURE_TEST is not set
2283# CONFIG_RCU_CPU_STALL_DETECTOR is not set
2075# CONFIG_KPROBES_SANITY_TEST is not set 2284# CONFIG_KPROBES_SANITY_TEST is not set
2076# CONFIG_BACKTRACE_SELF_TEST is not set 2285# CONFIG_BACKTRACE_SELF_TEST is not set
2286# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
2077# CONFIG_LKDTM is not set 2287# CONFIG_LKDTM is not set
2078# CONFIG_FAULT_INJECTION is not set 2288# CONFIG_FAULT_INJECTION is not set
2079# CONFIG_LATENCYTOP is not set 2289# CONFIG_LATENCYTOP is not set
2080CONFIG_SYSCTL_SYSCALL_CHECK=y 2290CONFIG_SYSCTL_SYSCALL_CHECK=y
2081CONFIG_HAVE_FTRACE=y 2291CONFIG_USER_STACKTRACE_SUPPORT=y
2292CONFIG_HAVE_FUNCTION_TRACER=y
2293CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
2294CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
2082CONFIG_HAVE_DYNAMIC_FTRACE=y 2295CONFIG_HAVE_DYNAMIC_FTRACE=y
2083# CONFIG_FTRACE is not set 2296CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
2297CONFIG_HAVE_HW_BRANCH_TRACER=y
2298
2299#
2300# Tracers
2301#
2302# CONFIG_FUNCTION_TRACER is not set
2084# CONFIG_IRQSOFF_TRACER is not set 2303# CONFIG_IRQSOFF_TRACER is not set
2085# CONFIG_SYSPROF_TRACER is not set 2304# CONFIG_SYSPROF_TRACER is not set
2086# CONFIG_SCHED_TRACER is not set 2305# CONFIG_SCHED_TRACER is not set
2087# CONFIG_CONTEXT_SWITCH_TRACER is not set 2306# CONFIG_CONTEXT_SWITCH_TRACER is not set
2307# CONFIG_BOOT_TRACER is not set
2308# CONFIG_TRACE_BRANCH_PROFILING is not set
2309# CONFIG_POWER_TRACER is not set
2310# CONFIG_STACK_TRACER is not set
2311# CONFIG_HW_BRANCH_TRACER is not set
2088CONFIG_PROVIDE_OHCI1394_DMA_INIT=y 2312CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
2313# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
2089# CONFIG_SAMPLES is not set 2314# CONFIG_SAMPLES is not set
2090CONFIG_HAVE_ARCH_KGDB=y 2315CONFIG_HAVE_ARCH_KGDB=y
2091# CONFIG_KGDB is not set 2316# CONFIG_KGDB is not set
2092# CONFIG_STRICT_DEVMEM is not set 2317# CONFIG_STRICT_DEVMEM is not set
2093CONFIG_X86_VERBOSE_BOOTUP=y 2318CONFIG_X86_VERBOSE_BOOTUP=y
2094CONFIG_EARLY_PRINTK=y 2319CONFIG_EARLY_PRINTK=y
2320CONFIG_EARLY_PRINTK_DBGP=y
2095CONFIG_DEBUG_STACKOVERFLOW=y 2321CONFIG_DEBUG_STACKOVERFLOW=y
2096CONFIG_DEBUG_STACK_USAGE=y 2322CONFIG_DEBUG_STACK_USAGE=y
2097# CONFIG_DEBUG_PAGEALLOC is not set 2323# CONFIG_DEBUG_PAGEALLOC is not set
@@ -2122,8 +2348,10 @@ CONFIG_OPTIMIZE_INLINING=y
2122CONFIG_KEYS=y 2348CONFIG_KEYS=y
2123CONFIG_KEYS_DEBUG_PROC_KEYS=y 2349CONFIG_KEYS_DEBUG_PROC_KEYS=y
2124CONFIG_SECURITY=y 2350CONFIG_SECURITY=y
2351# CONFIG_SECURITYFS is not set
2125CONFIG_SECURITY_NETWORK=y 2352CONFIG_SECURITY_NETWORK=y
2126# CONFIG_SECURITY_NETWORK_XFRM is not set 2353# CONFIG_SECURITY_NETWORK_XFRM is not set
2354# CONFIG_SECURITY_PATH is not set
2127CONFIG_SECURITY_FILE_CAPABILITIES=y 2355CONFIG_SECURITY_FILE_CAPABILITIES=y
2128# CONFIG_SECURITY_ROOTPLUG is not set 2356# CONFIG_SECURITY_ROOTPLUG is not set
2129CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536 2357CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536
@@ -2134,7 +2362,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y
2134CONFIG_SECURITY_SELINUX_DEVELOP=y 2362CONFIG_SECURITY_SELINUX_DEVELOP=y
2135CONFIG_SECURITY_SELINUX_AVC_STATS=y 2363CONFIG_SECURITY_SELINUX_AVC_STATS=y
2136CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 2364CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
2137# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set
2138# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set 2365# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
2139# CONFIG_SECURITY_SMACK is not set 2366# CONFIG_SECURITY_SMACK is not set
2140CONFIG_CRYPTO=y 2367CONFIG_CRYPTO=y
@@ -2142,11 +2369,18 @@ CONFIG_CRYPTO=y
2142# 2369#
2143# Crypto core or helper 2370# Crypto core or helper
2144# 2371#
2372# CONFIG_CRYPTO_FIPS is not set
2145CONFIG_CRYPTO_ALGAPI=y 2373CONFIG_CRYPTO_ALGAPI=y
2374CONFIG_CRYPTO_ALGAPI2=y
2146CONFIG_CRYPTO_AEAD=y 2375CONFIG_CRYPTO_AEAD=y
2376CONFIG_CRYPTO_AEAD2=y
2147CONFIG_CRYPTO_BLKCIPHER=y 2377CONFIG_CRYPTO_BLKCIPHER=y
2378CONFIG_CRYPTO_BLKCIPHER2=y
2148CONFIG_CRYPTO_HASH=y 2379CONFIG_CRYPTO_HASH=y
2380CONFIG_CRYPTO_HASH2=y
2381CONFIG_CRYPTO_RNG2=y
2149CONFIG_CRYPTO_MANAGER=y 2382CONFIG_CRYPTO_MANAGER=y
2383CONFIG_CRYPTO_MANAGER2=y
2150# CONFIG_CRYPTO_GF128MUL is not set 2384# CONFIG_CRYPTO_GF128MUL is not set
2151# CONFIG_CRYPTO_NULL is not set 2385# CONFIG_CRYPTO_NULL is not set
2152# CONFIG_CRYPTO_CRYPTD is not set 2386# CONFIG_CRYPTO_CRYPTD is not set
@@ -2181,6 +2415,7 @@ CONFIG_CRYPTO_HMAC=y
2181# Digest 2415# Digest
2182# 2416#
2183# CONFIG_CRYPTO_CRC32C is not set 2417# CONFIG_CRYPTO_CRC32C is not set
2418# CONFIG_CRYPTO_CRC32C_INTEL is not set
2184# CONFIG_CRYPTO_MD4 is not set 2419# CONFIG_CRYPTO_MD4 is not set
2185CONFIG_CRYPTO_MD5=y 2420CONFIG_CRYPTO_MD5=y
2186# CONFIG_CRYPTO_MICHAEL_MIC is not set 2421# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -2221,6 +2456,11 @@ CONFIG_CRYPTO_DES=y
2221# 2456#
2222# CONFIG_CRYPTO_DEFLATE is not set 2457# CONFIG_CRYPTO_DEFLATE is not set
2223# CONFIG_CRYPTO_LZO is not set 2458# CONFIG_CRYPTO_LZO is not set
2459
2460#
2461# Random Number Generation
2462#
2463# CONFIG_CRYPTO_ANSI_CPRNG is not set
2224CONFIG_CRYPTO_HW=y 2464CONFIG_CRYPTO_HW=y
2225# CONFIG_CRYPTO_DEV_PADLOCK is not set 2465# CONFIG_CRYPTO_DEV_PADLOCK is not set
2226# CONFIG_CRYPTO_DEV_GEODE is not set 2466# CONFIG_CRYPTO_DEV_GEODE is not set
@@ -2238,6 +2478,7 @@ CONFIG_VIRTUALIZATION=y
2238CONFIG_BITREVERSE=y 2478CONFIG_BITREVERSE=y
2239CONFIG_GENERIC_FIND_FIRST_BIT=y 2479CONFIG_GENERIC_FIND_FIRST_BIT=y
2240CONFIG_GENERIC_FIND_NEXT_BIT=y 2480CONFIG_GENERIC_FIND_NEXT_BIT=y
2481CONFIG_GENERIC_FIND_LAST_BIT=y
2241# CONFIG_CRC_CCITT is not set 2482# CONFIG_CRC_CCITT is not set
2242# CONFIG_CRC16 is not set 2483# CONFIG_CRC16 is not set
2243CONFIG_CRC_T10DIF=y 2484CONFIG_CRC_T10DIF=y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 02b514e8f4c4..2efb5d5063ff 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.27-rc5 3# Linux kernel version: 2.6.29-rc4
4# Wed Sep 3 17:13:39 2008 4# Thu Feb 12 12:57:29 2009
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7# CONFIG_X86_32 is not set 7# CONFIG_X86_32 is not set
8CONFIG_X86_64=y 8CONFIG_X86_64=y
9CONFIG_X86=y 9CONFIG_X86=y
10CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" 10CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
11# CONFIG_GENERIC_LOCKBREAK is not set
12CONFIG_GENERIC_TIME=y 11CONFIG_GENERIC_TIME=y
13CONFIG_GENERIC_CMOS_UPDATE=y 12CONFIG_GENERIC_CMOS_UPDATE=y
14CONFIG_CLOCKSOURCE_WATCHDOG=y 13CONFIG_CLOCKSOURCE_WATCHDOG=y
@@ -23,17 +22,16 @@ CONFIG_ZONE_DMA=y
23CONFIG_GENERIC_ISA_DMA=y 22CONFIG_GENERIC_ISA_DMA=y
24CONFIG_GENERIC_IOMAP=y 23CONFIG_GENERIC_IOMAP=y
25CONFIG_GENERIC_BUG=y 24CONFIG_GENERIC_BUG=y
25CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
26CONFIG_GENERIC_HWEIGHT=y 26CONFIG_GENERIC_HWEIGHT=y
27# CONFIG_GENERIC_GPIO is not set
28CONFIG_ARCH_MAY_HAVE_PC_FDC=y 27CONFIG_ARCH_MAY_HAVE_PC_FDC=y
29CONFIG_RWSEM_GENERIC_SPINLOCK=y 28CONFIG_RWSEM_GENERIC_SPINLOCK=y
30# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 29# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
31# CONFIG_ARCH_HAS_ILOG2_U32 is not set
32# CONFIG_ARCH_HAS_ILOG2_U64 is not set
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y 30CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
34CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
35CONFIG_GENERIC_TIME_VSYSCALL=y 32CONFIG_GENERIC_TIME_VSYSCALL=y
36CONFIG_ARCH_HAS_CPU_RELAX=y 33CONFIG_ARCH_HAS_CPU_RELAX=y
34CONFIG_ARCH_HAS_DEFAULT_IDLE=y
37CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y 35CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
38CONFIG_HAVE_SETUP_PER_CPU_AREA=y 36CONFIG_HAVE_SETUP_PER_CPU_AREA=y
39CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y 37CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y
@@ -42,12 +40,12 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
42CONFIG_ZONE_DMA32=y 40CONFIG_ZONE_DMA32=y
43CONFIG_ARCH_POPULATES_NODE_MAP=y 41CONFIG_ARCH_POPULATES_NODE_MAP=y
44CONFIG_AUDIT_ARCH=y 42CONFIG_AUDIT_ARCH=y
45CONFIG_ARCH_SUPPORTS_AOUT=y
46CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y 43CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
47CONFIG_GENERIC_HARDIRQS=y 44CONFIG_GENERIC_HARDIRQS=y
48CONFIG_GENERIC_IRQ_PROBE=y 45CONFIG_GENERIC_IRQ_PROBE=y
49CONFIG_GENERIC_PENDING_IRQ=y 46CONFIG_GENERIC_PENDING_IRQ=y
50CONFIG_X86_SMP=y 47CONFIG_X86_SMP=y
48CONFIG_USE_GENERIC_SMP_HELPERS=y
51CONFIG_X86_64_SMP=y 49CONFIG_X86_64_SMP=y
52CONFIG_X86_HT=y 50CONFIG_X86_HT=y
53CONFIG_X86_BIOS_REBOOT=y 51CONFIG_X86_BIOS_REBOOT=y
@@ -76,30 +74,44 @@ CONFIG_TASK_IO_ACCOUNTING=y
76CONFIG_AUDIT=y 74CONFIG_AUDIT=y
77CONFIG_AUDITSYSCALL=y 75CONFIG_AUDITSYSCALL=y
78CONFIG_AUDIT_TREE=y 76CONFIG_AUDIT_TREE=y
77
78#
79# RCU Subsystem
80#
81# CONFIG_CLASSIC_RCU is not set
82CONFIG_TREE_RCU=y
83# CONFIG_PREEMPT_RCU is not set
84# CONFIG_RCU_TRACE is not set
85CONFIG_RCU_FANOUT=64
86# CONFIG_RCU_FANOUT_EXACT is not set
87# CONFIG_TREE_RCU_TRACE is not set
88# CONFIG_PREEMPT_RCU_TRACE is not set
79# CONFIG_IKCONFIG is not set 89# CONFIG_IKCONFIG is not set
80CONFIG_LOG_BUF_SHIFT=18 90CONFIG_LOG_BUF_SHIFT=18
81CONFIG_CGROUPS=y
82# CONFIG_CGROUP_DEBUG is not set
83CONFIG_CGROUP_NS=y
84# CONFIG_CGROUP_DEVICE is not set
85CONFIG_CPUSETS=y
86CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y 91CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
87CONFIG_GROUP_SCHED=y 92CONFIG_GROUP_SCHED=y
88CONFIG_FAIR_GROUP_SCHED=y 93CONFIG_FAIR_GROUP_SCHED=y
89# CONFIG_RT_GROUP_SCHED is not set 94# CONFIG_RT_GROUP_SCHED is not set
90# CONFIG_USER_SCHED is not set 95# CONFIG_USER_SCHED is not set
91CONFIG_CGROUP_SCHED=y 96CONFIG_CGROUP_SCHED=y
97CONFIG_CGROUPS=y
98# CONFIG_CGROUP_DEBUG is not set
99CONFIG_CGROUP_NS=y
100CONFIG_CGROUP_FREEZER=y
101# CONFIG_CGROUP_DEVICE is not set
102CONFIG_CPUSETS=y
103CONFIG_PROC_PID_CPUSET=y
92CONFIG_CGROUP_CPUACCT=y 104CONFIG_CGROUP_CPUACCT=y
93CONFIG_RESOURCE_COUNTERS=y 105CONFIG_RESOURCE_COUNTERS=y
94# CONFIG_CGROUP_MEM_RES_CTLR is not set 106# CONFIG_CGROUP_MEM_RES_CTLR is not set
95# CONFIG_SYSFS_DEPRECATED_V2 is not set 107# CONFIG_SYSFS_DEPRECATED_V2 is not set
96CONFIG_PROC_PID_CPUSET=y
97CONFIG_RELAY=y 108CONFIG_RELAY=y
98CONFIG_NAMESPACES=y 109CONFIG_NAMESPACES=y
99CONFIG_UTS_NS=y 110CONFIG_UTS_NS=y
100CONFIG_IPC_NS=y 111CONFIG_IPC_NS=y
101CONFIG_USER_NS=y 112CONFIG_USER_NS=y
102CONFIG_PID_NS=y 113CONFIG_PID_NS=y
114CONFIG_NET_NS=y
103CONFIG_BLK_DEV_INITRD=y 115CONFIG_BLK_DEV_INITRD=y
104CONFIG_INITRAMFS_SOURCE="" 116CONFIG_INITRAMFS_SOURCE=""
105CONFIG_CC_OPTIMIZE_FOR_SIZE=y 117CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -124,12 +136,15 @@ CONFIG_SIGNALFD=y
124CONFIG_TIMERFD=y 136CONFIG_TIMERFD=y
125CONFIG_EVENTFD=y 137CONFIG_EVENTFD=y
126CONFIG_SHMEM=y 138CONFIG_SHMEM=y
139CONFIG_AIO=y
127CONFIG_VM_EVENT_COUNTERS=y 140CONFIG_VM_EVENT_COUNTERS=y
141CONFIG_PCI_QUIRKS=y
128CONFIG_SLUB_DEBUG=y 142CONFIG_SLUB_DEBUG=y
129# CONFIG_SLAB is not set 143# CONFIG_SLAB is not set
130CONFIG_SLUB=y 144CONFIG_SLUB=y
131# CONFIG_SLOB is not set 145# CONFIG_SLOB is not set
132CONFIG_PROFILING=y 146CONFIG_PROFILING=y
147CONFIG_TRACEPOINTS=y
133CONFIG_MARKERS=y 148CONFIG_MARKERS=y
134# CONFIG_OPROFILE is not set 149# CONFIG_OPROFILE is not set
135CONFIG_HAVE_OPROFILE=y 150CONFIG_HAVE_OPROFILE=y
@@ -139,15 +154,10 @@ CONFIG_KRETPROBES=y
139CONFIG_HAVE_IOREMAP_PROT=y 154CONFIG_HAVE_IOREMAP_PROT=y
140CONFIG_HAVE_KPROBES=y 155CONFIG_HAVE_KPROBES=y
141CONFIG_HAVE_KRETPROBES=y 156CONFIG_HAVE_KRETPROBES=y
142# CONFIG_HAVE_ARCH_TRACEHOOK is not set 157CONFIG_HAVE_ARCH_TRACEHOOK=y
143# CONFIG_HAVE_DMA_ATTRS is not set
144CONFIG_USE_GENERIC_SMP_HELPERS=y
145# CONFIG_HAVE_CLK is not set
146CONFIG_PROC_PAGE_MONITOR=y
147# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 158# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
148CONFIG_SLABINFO=y 159CONFIG_SLABINFO=y
149CONFIG_RT_MUTEXES=y 160CONFIG_RT_MUTEXES=y
150# CONFIG_TINY_SHMEM is not set
151CONFIG_BASE_SMALL=0 161CONFIG_BASE_SMALL=0
152CONFIG_MODULES=y 162CONFIG_MODULES=y
153# CONFIG_MODULE_FORCE_LOAD is not set 163# CONFIG_MODULE_FORCE_LOAD is not set
@@ -155,7 +165,6 @@ CONFIG_MODULE_UNLOAD=y
155CONFIG_MODULE_FORCE_UNLOAD=y 165CONFIG_MODULE_FORCE_UNLOAD=y
156# CONFIG_MODVERSIONS is not set 166# CONFIG_MODVERSIONS is not set
157# CONFIG_MODULE_SRCVERSION_ALL is not set 167# CONFIG_MODULE_SRCVERSION_ALL is not set
158CONFIG_KMOD=y
159CONFIG_STOP_MACHINE=y 168CONFIG_STOP_MACHINE=y
160CONFIG_BLOCK=y 169CONFIG_BLOCK=y
161CONFIG_BLK_DEV_IO_TRACE=y 170CONFIG_BLK_DEV_IO_TRACE=y
@@ -175,7 +184,7 @@ CONFIG_IOSCHED_CFQ=y
175CONFIG_DEFAULT_CFQ=y 184CONFIG_DEFAULT_CFQ=y
176# CONFIG_DEFAULT_NOOP is not set 185# CONFIG_DEFAULT_NOOP is not set
177CONFIG_DEFAULT_IOSCHED="cfq" 186CONFIG_DEFAULT_IOSCHED="cfq"
178CONFIG_CLASSIC_RCU=y 187CONFIG_FREEZER=y
179 188
180# 189#
181# Processor type and features 190# Processor type and features
@@ -185,12 +194,15 @@ CONFIG_NO_HZ=y
185CONFIG_HIGH_RES_TIMERS=y 194CONFIG_HIGH_RES_TIMERS=y
186CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 195CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
187CONFIG_SMP=y 196CONFIG_SMP=y
197CONFIG_SPARSE_IRQ=y
198# CONFIG_NUMA_MIGRATE_IRQ_DESC is not set
188CONFIG_X86_FIND_SMP_CONFIG=y 199CONFIG_X86_FIND_SMP_CONFIG=y
189CONFIG_X86_MPPARSE=y 200CONFIG_X86_MPPARSE=y
190# CONFIG_X86_ELAN is not set 201# CONFIG_X86_ELAN is not set
191# CONFIG_X86_VOYAGER is not set 202# CONFIG_X86_VOYAGER is not set
192# CONFIG_X86_GENERICARCH is not set 203# CONFIG_X86_GENERICARCH is not set
193# CONFIG_X86_VSMP is not set 204# CONFIG_X86_VSMP is not set
205CONFIG_SCHED_OMIT_FRAME_POINTER=y
194# CONFIG_PARAVIRT_GUEST is not set 206# CONFIG_PARAVIRT_GUEST is not set
195# CONFIG_MEMTEST is not set 207# CONFIG_MEMTEST is not set
196# CONFIG_M386 is not set 208# CONFIG_M386 is not set
@@ -229,6 +241,11 @@ CONFIG_X86_CMPXCHG64=y
229CONFIG_X86_CMOV=y 241CONFIG_X86_CMOV=y
230CONFIG_X86_MINIMUM_CPU_FAMILY=64 242CONFIG_X86_MINIMUM_CPU_FAMILY=64
231CONFIG_X86_DEBUGCTLMSR=y 243CONFIG_X86_DEBUGCTLMSR=y
244CONFIG_CPU_SUP_INTEL=y
245CONFIG_CPU_SUP_AMD=y
246CONFIG_CPU_SUP_CENTAUR_64=y
247CONFIG_X86_DS=y
248CONFIG_X86_PTRACE_BTS=y
232CONFIG_HPET_TIMER=y 249CONFIG_HPET_TIMER=y
233CONFIG_HPET_EMULATE_RTC=y 250CONFIG_HPET_EMULATE_RTC=y
234CONFIG_DMI=y 251CONFIG_DMI=y
@@ -236,8 +253,11 @@ CONFIG_GART_IOMMU=y
236CONFIG_CALGARY_IOMMU=y 253CONFIG_CALGARY_IOMMU=y
237CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y 254CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
238CONFIG_AMD_IOMMU=y 255CONFIG_AMD_IOMMU=y
256CONFIG_AMD_IOMMU_STATS=y
239CONFIG_SWIOTLB=y 257CONFIG_SWIOTLB=y
240CONFIG_IOMMU_HELPER=y 258CONFIG_IOMMU_HELPER=y
259CONFIG_IOMMU_API=y
260# CONFIG_MAXSMP is not set
241CONFIG_NR_CPUS=64 261CONFIG_NR_CPUS=64
242CONFIG_SCHED_SMT=y 262CONFIG_SCHED_SMT=y
243CONFIG_SCHED_MC=y 263CONFIG_SCHED_MC=y
@@ -246,12 +266,17 @@ CONFIG_PREEMPT_VOLUNTARY=y
246# CONFIG_PREEMPT is not set 266# CONFIG_PREEMPT is not set
247CONFIG_X86_LOCAL_APIC=y 267CONFIG_X86_LOCAL_APIC=y
248CONFIG_X86_IO_APIC=y 268CONFIG_X86_IO_APIC=y
269CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
249# CONFIG_X86_MCE is not set 270# CONFIG_X86_MCE is not set
250# CONFIG_I8K is not set 271# CONFIG_I8K is not set
251CONFIG_MICROCODE=y 272CONFIG_MICROCODE=y
273CONFIG_MICROCODE_INTEL=y
274CONFIG_MICROCODE_AMD=y
252CONFIG_MICROCODE_OLD_INTERFACE=y 275CONFIG_MICROCODE_OLD_INTERFACE=y
253CONFIG_X86_MSR=y 276CONFIG_X86_MSR=y
254CONFIG_X86_CPUID=y 277CONFIG_X86_CPUID=y
278CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
279CONFIG_DIRECT_GBPAGES=y
255CONFIG_NUMA=y 280CONFIG_NUMA=y
256CONFIG_K8_NUMA=y 281CONFIG_K8_NUMA=y
257CONFIG_X86_64_ACPI_NUMA=y 282CONFIG_X86_64_ACPI_NUMA=y
@@ -268,7 +293,6 @@ CONFIG_SPARSEMEM_MANUAL=y
268CONFIG_SPARSEMEM=y 293CONFIG_SPARSEMEM=y
269CONFIG_NEED_MULTIPLE_NODES=y 294CONFIG_NEED_MULTIPLE_NODES=y
270CONFIG_HAVE_MEMORY_PRESENT=y 295CONFIG_HAVE_MEMORY_PRESENT=y
271# CONFIG_SPARSEMEM_STATIC is not set
272CONFIG_SPARSEMEM_EXTREME=y 296CONFIG_SPARSEMEM_EXTREME=y
273CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y 297CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
274CONFIG_SPARSEMEM_VMEMMAP=y 298CONFIG_SPARSEMEM_VMEMMAP=y
@@ -279,10 +303,14 @@ CONFIG_SPARSEMEM_VMEMMAP=y
279CONFIG_PAGEFLAGS_EXTENDED=y 303CONFIG_PAGEFLAGS_EXTENDED=y
280CONFIG_SPLIT_PTLOCK_CPUS=4 304CONFIG_SPLIT_PTLOCK_CPUS=4
281CONFIG_MIGRATION=y 305CONFIG_MIGRATION=y
282CONFIG_RESOURCES_64BIT=y 306CONFIG_PHYS_ADDR_T_64BIT=y
283CONFIG_ZONE_DMA_FLAG=1 307CONFIG_ZONE_DMA_FLAG=1
284CONFIG_BOUNCE=y 308CONFIG_BOUNCE=y
285CONFIG_VIRT_TO_BUS=y 309CONFIG_VIRT_TO_BUS=y
310CONFIG_UNEVICTABLE_LRU=y
311CONFIG_X86_CHECK_BIOS_CORRUPTION=y
312CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
313CONFIG_X86_RESERVE_LOW_64K=y
286CONFIG_MTRR=y 314CONFIG_MTRR=y
287# CONFIG_MTRR_SANITIZER is not set 315# CONFIG_MTRR_SANITIZER is not set
288CONFIG_X86_PAT=y 316CONFIG_X86_PAT=y
@@ -301,11 +329,12 @@ CONFIG_PHYSICAL_START=0x1000000
301CONFIG_PHYSICAL_ALIGN=0x200000 329CONFIG_PHYSICAL_ALIGN=0x200000
302CONFIG_HOTPLUG_CPU=y 330CONFIG_HOTPLUG_CPU=y
303# CONFIG_COMPAT_VDSO is not set 331# CONFIG_COMPAT_VDSO is not set
332# CONFIG_CMDLINE_BOOL is not set
304CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 333CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
305CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 334CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
306 335
307# 336#
308# Power management options 337# Power management and ACPI options
309# 338#
310CONFIG_ARCH_HIBERNATION_HEADER=y 339CONFIG_ARCH_HIBERNATION_HEADER=y
311CONFIG_PM=y 340CONFIG_PM=y
@@ -332,20 +361,14 @@ CONFIG_ACPI_BATTERY=y
332CONFIG_ACPI_BUTTON=y 361CONFIG_ACPI_BUTTON=y
333CONFIG_ACPI_FAN=y 362CONFIG_ACPI_FAN=y
334CONFIG_ACPI_DOCK=y 363CONFIG_ACPI_DOCK=y
335# CONFIG_ACPI_BAY is not set
336CONFIG_ACPI_PROCESSOR=y 364CONFIG_ACPI_PROCESSOR=y
337CONFIG_ACPI_HOTPLUG_CPU=y 365CONFIG_ACPI_HOTPLUG_CPU=y
338CONFIG_ACPI_THERMAL=y 366CONFIG_ACPI_THERMAL=y
339CONFIG_ACPI_NUMA=y 367CONFIG_ACPI_NUMA=y
340# CONFIG_ACPI_WMI is not set
341# CONFIG_ACPI_ASUS is not set
342# CONFIG_ACPI_TOSHIBA is not set
343# CONFIG_ACPI_CUSTOM_DSDT is not set 368# CONFIG_ACPI_CUSTOM_DSDT is not set
344CONFIG_ACPI_BLACKLIST_YEAR=0 369CONFIG_ACPI_BLACKLIST_YEAR=0
345# CONFIG_ACPI_DEBUG is not set 370# CONFIG_ACPI_DEBUG is not set
346CONFIG_ACPI_EC=y
347# CONFIG_ACPI_PCI_SLOT is not set 371# CONFIG_ACPI_PCI_SLOT is not set
348CONFIG_ACPI_POWER=y
349CONFIG_ACPI_SYSTEM=y 372CONFIG_ACPI_SYSTEM=y
350CONFIG_X86_PM_TIMER=y 373CONFIG_X86_PM_TIMER=y
351CONFIG_ACPI_CONTAINER=y 374CONFIG_ACPI_CONTAINER=y
@@ -380,13 +403,17 @@ CONFIG_X86_ACPI_CPUFREQ=y
380# 403#
381# shared options 404# shared options
382# 405#
383# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
384# CONFIG_X86_SPEEDSTEP_LIB is not set 406# CONFIG_X86_SPEEDSTEP_LIB is not set
385CONFIG_CPU_IDLE=y 407CONFIG_CPU_IDLE=y
386CONFIG_CPU_IDLE_GOV_LADDER=y 408CONFIG_CPU_IDLE_GOV_LADDER=y
387CONFIG_CPU_IDLE_GOV_MENU=y 409CONFIG_CPU_IDLE_GOV_MENU=y
388 410
389# 411#
412# Memory power savings
413#
414# CONFIG_I7300_IDLE is not set
415
416#
390# Bus options (PCI etc.) 417# Bus options (PCI etc.)
391# 418#
392CONFIG_PCI=y 419CONFIG_PCI=y
@@ -394,8 +421,10 @@ CONFIG_PCI_DIRECT=y
394CONFIG_PCI_MMCONFIG=y 421CONFIG_PCI_MMCONFIG=y
395CONFIG_PCI_DOMAINS=y 422CONFIG_PCI_DOMAINS=y
396CONFIG_DMAR=y 423CONFIG_DMAR=y
424# CONFIG_DMAR_DEFAULT_ON is not set
397CONFIG_DMAR_GFX_WA=y 425CONFIG_DMAR_GFX_WA=y
398CONFIG_DMAR_FLOPPY_WA=y 426CONFIG_DMAR_FLOPPY_WA=y
427# CONFIG_INTR_REMAP is not set
399CONFIG_PCIEPORTBUS=y 428CONFIG_PCIEPORTBUS=y
400# CONFIG_HOTPLUG_PCI_PCIE is not set 429# CONFIG_HOTPLUG_PCI_PCIE is not set
401CONFIG_PCIEAER=y 430CONFIG_PCIEAER=y
@@ -404,6 +433,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
404CONFIG_PCI_MSI=y 433CONFIG_PCI_MSI=y
405# CONFIG_PCI_LEGACY is not set 434# CONFIG_PCI_LEGACY is not set
406# CONFIG_PCI_DEBUG is not set 435# CONFIG_PCI_DEBUG is not set
436# CONFIG_PCI_STUB is not set
407CONFIG_HT_IRQ=y 437CONFIG_HT_IRQ=y
408CONFIG_ISA_DMA_API=y 438CONFIG_ISA_DMA_API=y
409CONFIG_K8_NB=y 439CONFIG_K8_NB=y
@@ -437,6 +467,8 @@ CONFIG_HOTPLUG_PCI=y
437# 467#
438CONFIG_BINFMT_ELF=y 468CONFIG_BINFMT_ELF=y
439CONFIG_COMPAT_BINFMT_ELF=y 469CONFIG_COMPAT_BINFMT_ELF=y
470CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
471# CONFIG_HAVE_AOUT is not set
440CONFIG_BINFMT_MISC=y 472CONFIG_BINFMT_MISC=y
441CONFIG_IA32_EMULATION=y 473CONFIG_IA32_EMULATION=y
442# CONFIG_IA32_AOUT is not set 474# CONFIG_IA32_AOUT is not set
@@ -448,6 +480,7 @@ CONFIG_NET=y
448# 480#
449# Networking options 481# Networking options
450# 482#
483CONFIG_COMPAT_NET_DEV_OPS=y
451CONFIG_PACKET=y 484CONFIG_PACKET=y
452CONFIG_PACKET_MMAP=y 485CONFIG_PACKET_MMAP=y
453CONFIG_UNIX=y 486CONFIG_UNIX=y
@@ -508,7 +541,6 @@ CONFIG_DEFAULT_CUBIC=y
508# CONFIG_DEFAULT_RENO is not set 541# CONFIG_DEFAULT_RENO is not set
509CONFIG_DEFAULT_TCP_CONG="cubic" 542CONFIG_DEFAULT_TCP_CONG="cubic"
510CONFIG_TCP_MD5SIG=y 543CONFIG_TCP_MD5SIG=y
511# CONFIG_IP_VS is not set
512CONFIG_IPV6=y 544CONFIG_IPV6=y
513# CONFIG_IPV6_PRIVACY is not set 545# CONFIG_IPV6_PRIVACY is not set
514# CONFIG_IPV6_ROUTER_PREF is not set 546# CONFIG_IPV6_ROUTER_PREF is not set
@@ -546,19 +578,21 @@ CONFIG_NF_CONNTRACK_IRC=y
546CONFIG_NF_CONNTRACK_SIP=y 578CONFIG_NF_CONNTRACK_SIP=y
547CONFIG_NF_CT_NETLINK=y 579CONFIG_NF_CT_NETLINK=y
548CONFIG_NETFILTER_XTABLES=y 580CONFIG_NETFILTER_XTABLES=y
581CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
549CONFIG_NETFILTER_XT_TARGET_MARK=y 582CONFIG_NETFILTER_XT_TARGET_MARK=y
550CONFIG_NETFILTER_XT_TARGET_NFLOG=y 583CONFIG_NETFILTER_XT_TARGET_NFLOG=y
551CONFIG_NETFILTER_XT_TARGET_SECMARK=y 584CONFIG_NETFILTER_XT_TARGET_SECMARK=y
552CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
553CONFIG_NETFILTER_XT_TARGET_TCPMSS=y 585CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
554CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y 586CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
555CONFIG_NETFILTER_XT_MATCH_MARK=y 587CONFIG_NETFILTER_XT_MATCH_MARK=y
556CONFIG_NETFILTER_XT_MATCH_POLICY=y 588CONFIG_NETFILTER_XT_MATCH_POLICY=y
557CONFIG_NETFILTER_XT_MATCH_STATE=y 589CONFIG_NETFILTER_XT_MATCH_STATE=y
590# CONFIG_IP_VS is not set
558 591
559# 592#
560# IP: Netfilter Configuration 593# IP: Netfilter Configuration
561# 594#
595CONFIG_NF_DEFRAG_IPV4=y
562CONFIG_NF_CONNTRACK_IPV4=y 596CONFIG_NF_CONNTRACK_IPV4=y
563CONFIG_NF_CONNTRACK_PROC_COMPAT=y 597CONFIG_NF_CONNTRACK_PROC_COMPAT=y
564CONFIG_IP_NF_IPTABLES=y 598CONFIG_IP_NF_IPTABLES=y
@@ -584,8 +618,8 @@ CONFIG_IP_NF_MANGLE=y
584CONFIG_NF_CONNTRACK_IPV6=y 618CONFIG_NF_CONNTRACK_IPV6=y
585CONFIG_IP6_NF_IPTABLES=y 619CONFIG_IP6_NF_IPTABLES=y
586CONFIG_IP6_NF_MATCH_IPV6HEADER=y 620CONFIG_IP6_NF_MATCH_IPV6HEADER=y
587CONFIG_IP6_NF_FILTER=y
588CONFIG_IP6_NF_TARGET_LOG=y 621CONFIG_IP6_NF_TARGET_LOG=y
622CONFIG_IP6_NF_FILTER=y
589CONFIG_IP6_NF_TARGET_REJECT=y 623CONFIG_IP6_NF_TARGET_REJECT=y
590CONFIG_IP6_NF_MANGLE=y 624CONFIG_IP6_NF_MANGLE=y
591# CONFIG_IP_DCCP is not set 625# CONFIG_IP_DCCP is not set
@@ -593,6 +627,7 @@ CONFIG_IP6_NF_MANGLE=y
593# CONFIG_TIPC is not set 627# CONFIG_TIPC is not set
594# CONFIG_ATM is not set 628# CONFIG_ATM is not set
595# CONFIG_BRIDGE is not set 629# CONFIG_BRIDGE is not set
630# CONFIG_NET_DSA is not set
596# CONFIG_VLAN_8021Q is not set 631# CONFIG_VLAN_8021Q is not set
597# CONFIG_DECNET is not set 632# CONFIG_DECNET is not set
598CONFIG_LLC=y 633CONFIG_LLC=y
@@ -612,6 +647,7 @@ CONFIG_NET_SCHED=y
612# CONFIG_NET_SCH_HTB is not set 647# CONFIG_NET_SCH_HTB is not set
613# CONFIG_NET_SCH_HFSC is not set 648# CONFIG_NET_SCH_HFSC is not set
614# CONFIG_NET_SCH_PRIO is not set 649# CONFIG_NET_SCH_PRIO is not set
650# CONFIG_NET_SCH_MULTIQ is not set
615# CONFIG_NET_SCH_RED is not set 651# CONFIG_NET_SCH_RED is not set
616# CONFIG_NET_SCH_SFQ is not set 652# CONFIG_NET_SCH_SFQ is not set
617# CONFIG_NET_SCH_TEQL is not set 653# CONFIG_NET_SCH_TEQL is not set
@@ -619,6 +655,7 @@ CONFIG_NET_SCHED=y
619# CONFIG_NET_SCH_GRED is not set 655# CONFIG_NET_SCH_GRED is not set
620# CONFIG_NET_SCH_DSMARK is not set 656# CONFIG_NET_SCH_DSMARK is not set
621# CONFIG_NET_SCH_NETEM is not set 657# CONFIG_NET_SCH_NETEM is not set
658# CONFIG_NET_SCH_DRR is not set
622# CONFIG_NET_SCH_INGRESS is not set 659# CONFIG_NET_SCH_INGRESS is not set
623 660
624# 661#
@@ -633,6 +670,7 @@ CONFIG_NET_CLS=y
633# CONFIG_NET_CLS_RSVP is not set 670# CONFIG_NET_CLS_RSVP is not set
634# CONFIG_NET_CLS_RSVP6 is not set 671# CONFIG_NET_CLS_RSVP6 is not set
635# CONFIG_NET_CLS_FLOW is not set 672# CONFIG_NET_CLS_FLOW is not set
673# CONFIG_NET_CLS_CGROUP is not set
636CONFIG_NET_EMATCH=y 674CONFIG_NET_EMATCH=y
637CONFIG_NET_EMATCH_STACK=32 675CONFIG_NET_EMATCH_STACK=32
638# CONFIG_NET_EMATCH_CMP is not set 676# CONFIG_NET_EMATCH_CMP is not set
@@ -648,7 +686,9 @@ CONFIG_NET_CLS_ACT=y
648# CONFIG_NET_ACT_NAT is not set 686# CONFIG_NET_ACT_NAT is not set
649# CONFIG_NET_ACT_PEDIT is not set 687# CONFIG_NET_ACT_PEDIT is not set
650# CONFIG_NET_ACT_SIMP is not set 688# CONFIG_NET_ACT_SIMP is not set
689# CONFIG_NET_ACT_SKBEDIT is not set
651CONFIG_NET_SCH_FIFO=y 690CONFIG_NET_SCH_FIFO=y
691# CONFIG_DCB is not set
652 692
653# 693#
654# Network testing 694# Network testing
@@ -665,29 +705,33 @@ CONFIG_HAMRADIO=y
665# CONFIG_IRDA is not set 705# CONFIG_IRDA is not set
666# CONFIG_BT is not set 706# CONFIG_BT is not set
667# CONFIG_AF_RXRPC is not set 707# CONFIG_AF_RXRPC is not set
708# CONFIG_PHONET is not set
668CONFIG_FIB_RULES=y 709CONFIG_FIB_RULES=y
669 710CONFIG_WIRELESS=y
670#
671# Wireless
672#
673CONFIG_CFG80211=y 711CONFIG_CFG80211=y
712# CONFIG_CFG80211_REG_DEBUG is not set
674CONFIG_NL80211=y 713CONFIG_NL80211=y
714CONFIG_WIRELESS_OLD_REGULATORY=y
675CONFIG_WIRELESS_EXT=y 715CONFIG_WIRELESS_EXT=y
676CONFIG_WIRELESS_EXT_SYSFS=y 716CONFIG_WIRELESS_EXT_SYSFS=y
717# CONFIG_LIB80211 is not set
677CONFIG_MAC80211=y 718CONFIG_MAC80211=y
678 719
679# 720#
680# Rate control algorithm selection 721# Rate control algorithm selection
681# 722#
682CONFIG_MAC80211_RC_PID=y 723CONFIG_MAC80211_RC_MINSTREL=y
683CONFIG_MAC80211_RC_DEFAULT_PID=y 724# CONFIG_MAC80211_RC_DEFAULT_PID is not set
684CONFIG_MAC80211_RC_DEFAULT="pid" 725CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
726CONFIG_MAC80211_RC_DEFAULT="minstrel"
685# CONFIG_MAC80211_MESH is not set 727# CONFIG_MAC80211_MESH is not set
686CONFIG_MAC80211_LEDS=y 728CONFIG_MAC80211_LEDS=y
687# CONFIG_MAC80211_DEBUGFS is not set 729# CONFIG_MAC80211_DEBUGFS is not set
688# CONFIG_MAC80211_DEBUG_MENU is not set 730# CONFIG_MAC80211_DEBUG_MENU is not set
689# CONFIG_IEEE80211 is not set 731# CONFIG_WIMAX is not set
690# CONFIG_RFKILL is not set 732CONFIG_RFKILL=y
733# CONFIG_RFKILL_INPUT is not set
734CONFIG_RFKILL_LEDS=y
691# CONFIG_NET_9P is not set 735# CONFIG_NET_9P is not set
692 736
693# 737#
@@ -711,7 +755,7 @@ CONFIG_PROC_EVENTS=y
711# CONFIG_MTD is not set 755# CONFIG_MTD is not set
712# CONFIG_PARPORT is not set 756# CONFIG_PARPORT is not set
713CONFIG_PNP=y 757CONFIG_PNP=y
714# CONFIG_PNP_DEBUG is not set 758CONFIG_PNP_DEBUG_MESSAGES=y
715 759
716# 760#
717# Protocols 761# Protocols
@@ -739,21 +783,21 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
739CONFIG_MISC_DEVICES=y 783CONFIG_MISC_DEVICES=y
740# CONFIG_IBM_ASM is not set 784# CONFIG_IBM_ASM is not set
741# CONFIG_PHANTOM is not set 785# CONFIG_PHANTOM is not set
742# CONFIG_EEPROM_93CX6 is not set
743# CONFIG_SGI_IOC4 is not set 786# CONFIG_SGI_IOC4 is not set
744# CONFIG_TIFM_CORE is not set 787# CONFIG_TIFM_CORE is not set
745# CONFIG_ACER_WMI is not set 788# CONFIG_ICS932S401 is not set
746# CONFIG_ASUS_LAPTOP is not set
747# CONFIG_FUJITSU_LAPTOP is not set
748# CONFIG_MSI_LAPTOP is not set
749# CONFIG_COMPAL_LAPTOP is not set
750# CONFIG_SONY_LAPTOP is not set
751# CONFIG_THINKPAD_ACPI is not set
752# CONFIG_INTEL_MENLOW is not set
753# CONFIG_ENCLOSURE_SERVICES is not set 789# CONFIG_ENCLOSURE_SERVICES is not set
754# CONFIG_SGI_XP is not set 790# CONFIG_SGI_XP is not set
755# CONFIG_HP_ILO is not set 791# CONFIG_HP_ILO is not set
756# CONFIG_SGI_GRU is not set 792# CONFIG_SGI_GRU is not set
793# CONFIG_C2PORT is not set
794
795#
796# EEPROM support
797#
798# CONFIG_EEPROM_AT24 is not set
799# CONFIG_EEPROM_LEGACY is not set
800# CONFIG_EEPROM_93CX6 is not set
757CONFIG_HAVE_IDE=y 801CONFIG_HAVE_IDE=y
758# CONFIG_IDE is not set 802# CONFIG_IDE is not set
759 803
@@ -792,7 +836,7 @@ CONFIG_SCSI_WAIT_SCAN=m
792# 836#
793CONFIG_SCSI_SPI_ATTRS=y 837CONFIG_SCSI_SPI_ATTRS=y
794# CONFIG_SCSI_FC_ATTRS is not set 838# CONFIG_SCSI_FC_ATTRS is not set
795CONFIG_SCSI_ISCSI_ATTRS=y 839# CONFIG_SCSI_ISCSI_ATTRS is not set
796# CONFIG_SCSI_SAS_ATTRS is not set 840# CONFIG_SCSI_SAS_ATTRS is not set
797# CONFIG_SCSI_SAS_LIBSAS is not set 841# CONFIG_SCSI_SAS_LIBSAS is not set
798# CONFIG_SCSI_SRP_ATTRS is not set 842# CONFIG_SCSI_SRP_ATTRS is not set
@@ -863,6 +907,7 @@ CONFIG_PATA_OLDPIIX=y
863CONFIG_PATA_SCH=y 907CONFIG_PATA_SCH=y
864CONFIG_MD=y 908CONFIG_MD=y
865CONFIG_BLK_DEV_MD=y 909CONFIG_BLK_DEV_MD=y
910CONFIG_MD_AUTODETECT=y
866# CONFIG_MD_LINEAR is not set 911# CONFIG_MD_LINEAR is not set
867# CONFIG_MD_RAID0 is not set 912# CONFIG_MD_RAID0 is not set
868# CONFIG_MD_RAID1 is not set 913# CONFIG_MD_RAID1 is not set
@@ -918,6 +963,9 @@ CONFIG_PHYLIB=y
918# CONFIG_BROADCOM_PHY is not set 963# CONFIG_BROADCOM_PHY is not set
919# CONFIG_ICPLUS_PHY is not set 964# CONFIG_ICPLUS_PHY is not set
920# CONFIG_REALTEK_PHY is not set 965# CONFIG_REALTEK_PHY is not set
966# CONFIG_NATIONAL_PHY is not set
967# CONFIG_STE10XP is not set
968# CONFIG_LSI_ET1011C_PHY is not set
921# CONFIG_FIXED_PHY is not set 969# CONFIG_FIXED_PHY is not set
922# CONFIG_MDIO_BITBANG is not set 970# CONFIG_MDIO_BITBANG is not set
923CONFIG_NET_ETHERNET=y 971CONFIG_NET_ETHERNET=y
@@ -941,6 +989,9 @@ CONFIG_NET_TULIP=y
941# CONFIG_IBM_NEW_EMAC_RGMII is not set 989# CONFIG_IBM_NEW_EMAC_RGMII is not set
942# CONFIG_IBM_NEW_EMAC_TAH is not set 990# CONFIG_IBM_NEW_EMAC_TAH is not set
943# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 991# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
992# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
993# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
994# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
944CONFIG_NET_PCI=y 995CONFIG_NET_PCI=y
945# CONFIG_PCNET32 is not set 996# CONFIG_PCNET32 is not set
946# CONFIG_AMD8111_ETH is not set 997# CONFIG_AMD8111_ETH is not set
@@ -948,7 +999,6 @@ CONFIG_NET_PCI=y
948# CONFIG_B44 is not set 999# CONFIG_B44 is not set
949CONFIG_FORCEDETH=y 1000CONFIG_FORCEDETH=y
950# CONFIG_FORCEDETH_NAPI is not set 1001# CONFIG_FORCEDETH_NAPI is not set
951# CONFIG_EEPRO100 is not set
952CONFIG_E100=y 1002CONFIG_E100=y
953# CONFIG_FEALNX is not set 1003# CONFIG_FEALNX is not set
954# CONFIG_NATSEMI is not set 1004# CONFIG_NATSEMI is not set
@@ -962,15 +1012,16 @@ CONFIG_8139TOO_PIO=y
962# CONFIG_R6040 is not set 1012# CONFIG_R6040 is not set
963# CONFIG_SIS900 is not set 1013# CONFIG_SIS900 is not set
964# CONFIG_EPIC100 is not set 1014# CONFIG_EPIC100 is not set
1015# CONFIG_SMSC9420 is not set
965# CONFIG_SUNDANCE is not set 1016# CONFIG_SUNDANCE is not set
966# CONFIG_TLAN is not set 1017# CONFIG_TLAN is not set
967# CONFIG_VIA_RHINE is not set 1018# CONFIG_VIA_RHINE is not set
968# CONFIG_SC92031 is not set 1019# CONFIG_SC92031 is not set
1020# CONFIG_ATL2 is not set
969CONFIG_NETDEV_1000=y 1021CONFIG_NETDEV_1000=y
970# CONFIG_ACENIC is not set 1022# CONFIG_ACENIC is not set
971# CONFIG_DL2K is not set 1023# CONFIG_DL2K is not set
972CONFIG_E1000=y 1024CONFIG_E1000=y
973# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
974# CONFIG_E1000E is not set 1025# CONFIG_E1000E is not set
975# CONFIG_IP1000 is not set 1026# CONFIG_IP1000 is not set
976# CONFIG_IGB is not set 1027# CONFIG_IGB is not set
@@ -988,18 +1039,23 @@ CONFIG_TIGON3=y
988# CONFIG_QLA3XXX is not set 1039# CONFIG_QLA3XXX is not set
989# CONFIG_ATL1 is not set 1040# CONFIG_ATL1 is not set
990# CONFIG_ATL1E is not set 1041# CONFIG_ATL1E is not set
1042# CONFIG_JME is not set
991CONFIG_NETDEV_10000=y 1043CONFIG_NETDEV_10000=y
992# CONFIG_CHELSIO_T1 is not set 1044# CONFIG_CHELSIO_T1 is not set
1045CONFIG_CHELSIO_T3_DEPENDS=y
993# CONFIG_CHELSIO_T3 is not set 1046# CONFIG_CHELSIO_T3 is not set
1047# CONFIG_ENIC is not set
994# CONFIG_IXGBE is not set 1048# CONFIG_IXGBE is not set
995# CONFIG_IXGB is not set 1049# CONFIG_IXGB is not set
996# CONFIG_S2IO is not set 1050# CONFIG_S2IO is not set
997# CONFIG_MYRI10GE is not set 1051# CONFIG_MYRI10GE is not set
998# CONFIG_NETXEN_NIC is not set 1052# CONFIG_NETXEN_NIC is not set
999# CONFIG_NIU is not set 1053# CONFIG_NIU is not set
1054# CONFIG_MLX4_EN is not set
1000# CONFIG_MLX4_CORE is not set 1055# CONFIG_MLX4_CORE is not set
1001# CONFIG_TEHUTI is not set 1056# CONFIG_TEHUTI is not set
1002# CONFIG_BNX2X is not set 1057# CONFIG_BNX2X is not set
1058# CONFIG_QLGE is not set
1003# CONFIG_SFC is not set 1059# CONFIG_SFC is not set
1004CONFIG_TR=y 1060CONFIG_TR=y
1005# CONFIG_IBMOL is not set 1061# CONFIG_IBMOL is not set
@@ -1012,9 +1068,8 @@ CONFIG_TR=y
1012# CONFIG_WLAN_PRE80211 is not set 1068# CONFIG_WLAN_PRE80211 is not set
1013CONFIG_WLAN_80211=y 1069CONFIG_WLAN_80211=y
1014# CONFIG_PCMCIA_RAYCS is not set 1070# CONFIG_PCMCIA_RAYCS is not set
1015# CONFIG_IPW2100 is not set
1016# CONFIG_IPW2200 is not set
1017# CONFIG_LIBERTAS is not set 1071# CONFIG_LIBERTAS is not set
1072# CONFIG_LIBERTAS_THINFIRM is not set
1018# CONFIG_AIRO is not set 1073# CONFIG_AIRO is not set
1019# CONFIG_HERMES is not set 1074# CONFIG_HERMES is not set
1020# CONFIG_ATMEL is not set 1075# CONFIG_ATMEL is not set
@@ -1031,6 +1086,8 @@ CONFIG_WLAN_80211=y
1031CONFIG_ATH5K=y 1086CONFIG_ATH5K=y
1032# CONFIG_ATH5K_DEBUG is not set 1087# CONFIG_ATH5K_DEBUG is not set
1033# CONFIG_ATH9K is not set 1088# CONFIG_ATH9K is not set
1089# CONFIG_IPW2100 is not set
1090# CONFIG_IPW2200 is not set
1034# CONFIG_IWLCORE is not set 1091# CONFIG_IWLCORE is not set
1035# CONFIG_IWLWIFI_LEDS is not set 1092# CONFIG_IWLWIFI_LEDS is not set
1036# CONFIG_IWLAGN is not set 1093# CONFIG_IWLAGN is not set
@@ -1042,6 +1099,10 @@ CONFIG_ATH5K=y
1042# CONFIG_RT2X00 is not set 1099# CONFIG_RT2X00 is not set
1043 1100
1044# 1101#
1102# Enable WiMAX (Networking options) to see the WiMAX drivers
1103#
1104
1105#
1045# USB Network Adapters 1106# USB Network Adapters
1046# 1107#
1047# CONFIG_USB_CATC is not set 1108# CONFIG_USB_CATC is not set
@@ -1049,6 +1110,7 @@ CONFIG_ATH5K=y
1049# CONFIG_USB_PEGASUS is not set 1110# CONFIG_USB_PEGASUS is not set
1050# CONFIG_USB_RTL8150 is not set 1111# CONFIG_USB_RTL8150 is not set
1051# CONFIG_USB_USBNET is not set 1112# CONFIG_USB_USBNET is not set
1113# CONFIG_USB_HSO is not set
1052CONFIG_NET_PCMCIA=y 1114CONFIG_NET_PCMCIA=y
1053# CONFIG_PCMCIA_3C589 is not set 1115# CONFIG_PCMCIA_3C589 is not set
1054# CONFIG_PCMCIA_3C574 is not set 1116# CONFIG_PCMCIA_3C574 is not set
@@ -1058,6 +1120,7 @@ CONFIG_NET_PCMCIA=y
1058# CONFIG_PCMCIA_SMC91C92 is not set 1120# CONFIG_PCMCIA_SMC91C92 is not set
1059# CONFIG_PCMCIA_XIRC2PS is not set 1121# CONFIG_PCMCIA_XIRC2PS is not set
1060# CONFIG_PCMCIA_AXNET is not set 1122# CONFIG_PCMCIA_AXNET is not set
1123# CONFIG_PCMCIA_IBMTR is not set
1061# CONFIG_WAN is not set 1124# CONFIG_WAN is not set
1062CONFIG_FDDI=y 1125CONFIG_FDDI=y
1063# CONFIG_DEFXX is not set 1126# CONFIG_DEFXX is not set
@@ -1109,6 +1172,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
1109CONFIG_MOUSE_PS2_SYNAPTICS=y 1172CONFIG_MOUSE_PS2_SYNAPTICS=y
1110CONFIG_MOUSE_PS2_LIFEBOOK=y 1173CONFIG_MOUSE_PS2_LIFEBOOK=y
1111CONFIG_MOUSE_PS2_TRACKPOINT=y 1174CONFIG_MOUSE_PS2_TRACKPOINT=y
1175# CONFIG_MOUSE_PS2_ELANTECH is not set
1112# CONFIG_MOUSE_PS2_TOUCHKIT is not set 1176# CONFIG_MOUSE_PS2_TOUCHKIT is not set
1113# CONFIG_MOUSE_SERIAL is not set 1177# CONFIG_MOUSE_SERIAL is not set
1114# CONFIG_MOUSE_APPLETOUCH is not set 1178# CONFIG_MOUSE_APPLETOUCH is not set
@@ -1146,15 +1210,16 @@ CONFIG_INPUT_TOUCHSCREEN=y
1146# CONFIG_TOUCHSCREEN_FUJITSU is not set 1210# CONFIG_TOUCHSCREEN_FUJITSU is not set
1147# CONFIG_TOUCHSCREEN_GUNZE is not set 1211# CONFIG_TOUCHSCREEN_GUNZE is not set
1148# CONFIG_TOUCHSCREEN_ELO is not set 1212# CONFIG_TOUCHSCREEN_ELO is not set
1213# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
1149# CONFIG_TOUCHSCREEN_MTOUCH is not set 1214# CONFIG_TOUCHSCREEN_MTOUCH is not set
1150# CONFIG_TOUCHSCREEN_INEXIO is not set 1215# CONFIG_TOUCHSCREEN_INEXIO is not set
1151# CONFIG_TOUCHSCREEN_MK712 is not set 1216# CONFIG_TOUCHSCREEN_MK712 is not set
1152# CONFIG_TOUCHSCREEN_PENMOUNT is not set 1217# CONFIG_TOUCHSCREEN_PENMOUNT is not set
1153# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 1218# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
1154# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 1219# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
1155# CONFIG_TOUCHSCREEN_UCB1400 is not set
1156# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set 1220# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
1157# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 1221# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
1222# CONFIG_TOUCHSCREEN_TSC2007 is not set
1158CONFIG_INPUT_MISC=y 1223CONFIG_INPUT_MISC=y
1159# CONFIG_INPUT_PCSPKR is not set 1224# CONFIG_INPUT_PCSPKR is not set
1160# CONFIG_INPUT_APANEL is not set 1225# CONFIG_INPUT_APANEL is not set
@@ -1164,6 +1229,7 @@ CONFIG_INPUT_MISC=y
1164# CONFIG_INPUT_KEYSPAN_REMOTE is not set 1229# CONFIG_INPUT_KEYSPAN_REMOTE is not set
1165# CONFIG_INPUT_POWERMATE is not set 1230# CONFIG_INPUT_POWERMATE is not set
1166# CONFIG_INPUT_YEALINK is not set 1231# CONFIG_INPUT_YEALINK is not set
1232# CONFIG_INPUT_CM109 is not set
1167# CONFIG_INPUT_UINPUT is not set 1233# CONFIG_INPUT_UINPUT is not set
1168 1234
1169# 1235#
@@ -1230,6 +1296,7 @@ CONFIG_SERIAL_CORE=y
1230CONFIG_SERIAL_CORE_CONSOLE=y 1296CONFIG_SERIAL_CORE_CONSOLE=y
1231# CONFIG_SERIAL_JSM is not set 1297# CONFIG_SERIAL_JSM is not set
1232CONFIG_UNIX98_PTYS=y 1298CONFIG_UNIX98_PTYS=y
1299# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
1233# CONFIG_LEGACY_PTYS is not set 1300# CONFIG_LEGACY_PTYS is not set
1234# CONFIG_IPMI_HANDLER is not set 1301# CONFIG_IPMI_HANDLER is not set
1235CONFIG_HW_RANDOM=y 1302CONFIG_HW_RANDOM=y
@@ -1259,6 +1326,7 @@ CONFIG_I2C=y
1259CONFIG_I2C_BOARDINFO=y 1326CONFIG_I2C_BOARDINFO=y
1260# CONFIG_I2C_CHARDEV is not set 1327# CONFIG_I2C_CHARDEV is not set
1261CONFIG_I2C_HELPER_AUTO=y 1328CONFIG_I2C_HELPER_AUTO=y
1329CONFIG_I2C_ALGOBIT=y
1262 1330
1263# 1331#
1264# I2C Hardware Bus support 1332# I2C Hardware Bus support
@@ -1310,8 +1378,6 @@ CONFIG_I2C_I801=y
1310# Miscellaneous I2C Chip support 1378# Miscellaneous I2C Chip support
1311# 1379#
1312# CONFIG_DS1682 is not set 1380# CONFIG_DS1682 is not set
1313# CONFIG_EEPROM_AT24 is not set
1314# CONFIG_EEPROM_LEGACY is not set
1315# CONFIG_SENSORS_PCF8574 is not set 1381# CONFIG_SENSORS_PCF8574 is not set
1316# CONFIG_PCF8575 is not set 1382# CONFIG_PCF8575 is not set
1317# CONFIG_SENSORS_PCA9539 is not set 1383# CONFIG_SENSORS_PCA9539 is not set
@@ -1330,8 +1396,78 @@ CONFIG_POWER_SUPPLY=y
1330# CONFIG_POWER_SUPPLY_DEBUG is not set 1396# CONFIG_POWER_SUPPLY_DEBUG is not set
1331# CONFIG_PDA_POWER is not set 1397# CONFIG_PDA_POWER is not set
1332# CONFIG_BATTERY_DS2760 is not set 1398# CONFIG_BATTERY_DS2760 is not set
1333# CONFIG_HWMON is not set 1399# CONFIG_BATTERY_BQ27x00 is not set
1400CONFIG_HWMON=y
1401# CONFIG_HWMON_VID is not set
1402# CONFIG_SENSORS_ABITUGURU is not set
1403# CONFIG_SENSORS_ABITUGURU3 is not set
1404# CONFIG_SENSORS_AD7414 is not set
1405# CONFIG_SENSORS_AD7418 is not set
1406# CONFIG_SENSORS_ADM1021 is not set
1407# CONFIG_SENSORS_ADM1025 is not set
1408# CONFIG_SENSORS_ADM1026 is not set
1409# CONFIG_SENSORS_ADM1029 is not set
1410# CONFIG_SENSORS_ADM1031 is not set
1411# CONFIG_SENSORS_ADM9240 is not set
1412# CONFIG_SENSORS_ADT7462 is not set
1413# CONFIG_SENSORS_ADT7470 is not set
1414# CONFIG_SENSORS_ADT7473 is not set
1415# CONFIG_SENSORS_ADT7475 is not set
1416# CONFIG_SENSORS_K8TEMP is not set
1417# CONFIG_SENSORS_ASB100 is not set
1418# CONFIG_SENSORS_ATXP1 is not set
1419# CONFIG_SENSORS_DS1621 is not set
1420# CONFIG_SENSORS_I5K_AMB is not set
1421# CONFIG_SENSORS_F71805F is not set
1422# CONFIG_SENSORS_F71882FG is not set
1423# CONFIG_SENSORS_F75375S is not set
1424# CONFIG_SENSORS_FSCHER is not set
1425# CONFIG_SENSORS_FSCPOS is not set
1426# CONFIG_SENSORS_FSCHMD is not set
1427# CONFIG_SENSORS_GL518SM is not set
1428# CONFIG_SENSORS_GL520SM is not set
1429# CONFIG_SENSORS_CORETEMP is not set
1430# CONFIG_SENSORS_IT87 is not set
1431# CONFIG_SENSORS_LM63 is not set
1432# CONFIG_SENSORS_LM75 is not set
1433# CONFIG_SENSORS_LM77 is not set
1434# CONFIG_SENSORS_LM78 is not set
1435# CONFIG_SENSORS_LM80 is not set
1436# CONFIG_SENSORS_LM83 is not set
1437# CONFIG_SENSORS_LM85 is not set
1438# CONFIG_SENSORS_LM87 is not set
1439# CONFIG_SENSORS_LM90 is not set
1440# CONFIG_SENSORS_LM92 is not set
1441# CONFIG_SENSORS_LM93 is not set
1442# CONFIG_SENSORS_LTC4245 is not set
1443# CONFIG_SENSORS_MAX1619 is not set
1444# CONFIG_SENSORS_MAX6650 is not set
1445# CONFIG_SENSORS_PC87360 is not set
1446# CONFIG_SENSORS_PC87427 is not set
1447# CONFIG_SENSORS_SIS5595 is not set
1448# CONFIG_SENSORS_DME1737 is not set
1449# CONFIG_SENSORS_SMSC47M1 is not set
1450# CONFIG_SENSORS_SMSC47M192 is not set
1451# CONFIG_SENSORS_SMSC47B397 is not set
1452# CONFIG_SENSORS_ADS7828 is not set
1453# CONFIG_SENSORS_THMC50 is not set
1454# CONFIG_SENSORS_VIA686A is not set
1455# CONFIG_SENSORS_VT1211 is not set
1456# CONFIG_SENSORS_VT8231 is not set
1457# CONFIG_SENSORS_W83781D is not set
1458# CONFIG_SENSORS_W83791D is not set
1459# CONFIG_SENSORS_W83792D is not set
1460# CONFIG_SENSORS_W83793 is not set
1461# CONFIG_SENSORS_W83L785TS is not set
1462# CONFIG_SENSORS_W83L786NG is not set
1463# CONFIG_SENSORS_W83627HF is not set
1464# CONFIG_SENSORS_W83627EHF is not set
1465# CONFIG_SENSORS_HDAPS is not set
1466# CONFIG_SENSORS_LIS3LV02D is not set
1467# CONFIG_SENSORS_APPLESMC is not set
1468# CONFIG_HWMON_DEBUG_CHIP is not set
1334CONFIG_THERMAL=y 1469CONFIG_THERMAL=y
1470# CONFIG_THERMAL_HWMON is not set
1335CONFIG_WATCHDOG=y 1471CONFIG_WATCHDOG=y
1336# CONFIG_WATCHDOG_NOWAYOUT is not set 1472# CONFIG_WATCHDOG_NOWAYOUT is not set
1337 1473
@@ -1351,15 +1487,18 @@ CONFIG_WATCHDOG=y
1351# CONFIG_I6300ESB_WDT is not set 1487# CONFIG_I6300ESB_WDT is not set
1352# CONFIG_ITCO_WDT is not set 1488# CONFIG_ITCO_WDT is not set
1353# CONFIG_IT8712F_WDT is not set 1489# CONFIG_IT8712F_WDT is not set
1490# CONFIG_IT87_WDT is not set
1354# CONFIG_HP_WATCHDOG is not set 1491# CONFIG_HP_WATCHDOG is not set
1355# CONFIG_SC1200_WDT is not set 1492# CONFIG_SC1200_WDT is not set
1356# CONFIG_PC87413_WDT is not set 1493# CONFIG_PC87413_WDT is not set
1357# CONFIG_60XX_WDT is not set 1494# CONFIG_60XX_WDT is not set
1358# CONFIG_SBC8360_WDT is not set 1495# CONFIG_SBC8360_WDT is not set
1359# CONFIG_CPU5_WDT is not set 1496# CONFIG_CPU5_WDT is not set
1497# CONFIG_SMSC_SCH311X_WDT is not set
1360# CONFIG_SMSC37B787_WDT is not set 1498# CONFIG_SMSC37B787_WDT is not set
1361# CONFIG_W83627HF_WDT is not set 1499# CONFIG_W83627HF_WDT is not set
1362# CONFIG_W83697HF_WDT is not set 1500# CONFIG_W83697HF_WDT is not set
1501# CONFIG_W83697UG_WDT is not set
1363# CONFIG_W83877F_WDT is not set 1502# CONFIG_W83877F_WDT is not set
1364# CONFIG_W83977F_WDT is not set 1503# CONFIG_W83977F_WDT is not set
1365# CONFIG_MACHZ_WDT is not set 1504# CONFIG_MACHZ_WDT is not set
@@ -1375,11 +1514,11 @@ CONFIG_WATCHDOG=y
1375# USB-based Watchdog Cards 1514# USB-based Watchdog Cards
1376# 1515#
1377# CONFIG_USBPCWATCHDOG is not set 1516# CONFIG_USBPCWATCHDOG is not set
1517CONFIG_SSB_POSSIBLE=y
1378 1518
1379# 1519#
1380# Sonics Silicon Backplane 1520# Sonics Silicon Backplane
1381# 1521#
1382CONFIG_SSB_POSSIBLE=y
1383# CONFIG_SSB is not set 1522# CONFIG_SSB is not set
1384 1523
1385# 1524#
@@ -1388,7 +1527,13 @@ CONFIG_SSB_POSSIBLE=y
1388# CONFIG_MFD_CORE is not set 1527# CONFIG_MFD_CORE is not set
1389# CONFIG_MFD_SM501 is not set 1528# CONFIG_MFD_SM501 is not set
1390# CONFIG_HTC_PASIC3 is not set 1529# CONFIG_HTC_PASIC3 is not set
1530# CONFIG_TWL4030_CORE is not set
1391# CONFIG_MFD_TMIO is not set 1531# CONFIG_MFD_TMIO is not set
1532# CONFIG_PMIC_DA903X is not set
1533# CONFIG_MFD_WM8400 is not set
1534# CONFIG_MFD_WM8350_I2C is not set
1535# CONFIG_MFD_PCF50633 is not set
1536# CONFIG_REGULATOR is not set
1392 1537
1393# 1538#
1394# Multimedia devices 1539# Multimedia devices
@@ -1422,6 +1567,7 @@ CONFIG_DRM=y
1422# CONFIG_DRM_I810 is not set 1567# CONFIG_DRM_I810 is not set
1423# CONFIG_DRM_I830 is not set 1568# CONFIG_DRM_I830 is not set
1424CONFIG_DRM_I915=y 1569CONFIG_DRM_I915=y
1570CONFIG_DRM_I915_KMS=y
1425# CONFIG_DRM_MGA is not set 1571# CONFIG_DRM_MGA is not set
1426# CONFIG_DRM_SIS is not set 1572# CONFIG_DRM_SIS is not set
1427# CONFIG_DRM_VIA is not set 1573# CONFIG_DRM_VIA is not set
@@ -1431,6 +1577,7 @@ CONFIG_DRM_I915=y
1431CONFIG_FB=y 1577CONFIG_FB=y
1432# CONFIG_FIRMWARE_EDID is not set 1578# CONFIG_FIRMWARE_EDID is not set
1433# CONFIG_FB_DDC is not set 1579# CONFIG_FB_DDC is not set
1580# CONFIG_FB_BOOT_VESA_SUPPORT is not set
1434CONFIG_FB_CFB_FILLRECT=y 1581CONFIG_FB_CFB_FILLRECT=y
1435CONFIG_FB_CFB_COPYAREA=y 1582CONFIG_FB_CFB_COPYAREA=y
1436CONFIG_FB_CFB_IMAGEBLIT=y 1583CONFIG_FB_CFB_IMAGEBLIT=y
@@ -1459,7 +1606,6 @@ CONFIG_FB_TILEBLITTING=y
1459# CONFIG_FB_UVESA is not set 1606# CONFIG_FB_UVESA is not set
1460# CONFIG_FB_VESA is not set 1607# CONFIG_FB_VESA is not set
1461CONFIG_FB_EFI=y 1608CONFIG_FB_EFI=y
1462# CONFIG_FB_IMAC is not set
1463# CONFIG_FB_N411 is not set 1609# CONFIG_FB_N411 is not set
1464# CONFIG_FB_HGA is not set 1610# CONFIG_FB_HGA is not set
1465# CONFIG_FB_S1D13XXX is not set 1611# CONFIG_FB_S1D13XXX is not set
@@ -1474,6 +1620,7 @@ CONFIG_FB_EFI=y
1474# CONFIG_FB_S3 is not set 1620# CONFIG_FB_S3 is not set
1475# CONFIG_FB_SAVAGE is not set 1621# CONFIG_FB_SAVAGE is not set
1476# CONFIG_FB_SIS is not set 1622# CONFIG_FB_SIS is not set
1623# CONFIG_FB_VIA is not set
1477# CONFIG_FB_NEOMAGIC is not set 1624# CONFIG_FB_NEOMAGIC is not set
1478# CONFIG_FB_KYRO is not set 1625# CONFIG_FB_KYRO is not set
1479# CONFIG_FB_3DFX is not set 1626# CONFIG_FB_3DFX is not set
@@ -1485,12 +1632,15 @@ CONFIG_FB_EFI=y
1485# CONFIG_FB_CARMINE is not set 1632# CONFIG_FB_CARMINE is not set
1486# CONFIG_FB_GEODE is not set 1633# CONFIG_FB_GEODE is not set
1487# CONFIG_FB_VIRTUAL is not set 1634# CONFIG_FB_VIRTUAL is not set
1635# CONFIG_FB_METRONOME is not set
1636# CONFIG_FB_MB862XX is not set
1488CONFIG_BACKLIGHT_LCD_SUPPORT=y 1637CONFIG_BACKLIGHT_LCD_SUPPORT=y
1489# CONFIG_LCD_CLASS_DEVICE is not set 1638# CONFIG_LCD_CLASS_DEVICE is not set
1490CONFIG_BACKLIGHT_CLASS_DEVICE=y 1639CONFIG_BACKLIGHT_CLASS_DEVICE=y
1491# CONFIG_BACKLIGHT_CORGI is not set 1640CONFIG_BACKLIGHT_GENERIC=y
1492# CONFIG_BACKLIGHT_PROGEAR is not set 1641# CONFIG_BACKLIGHT_PROGEAR is not set
1493# CONFIG_BACKLIGHT_MBP_NVIDIA is not set 1642# CONFIG_BACKLIGHT_MBP_NVIDIA is not set
1643# CONFIG_BACKLIGHT_SAHARA is not set
1494 1644
1495# 1645#
1496# Display device support 1646# Display device support
@@ -1510,10 +1660,12 @@ CONFIG_LOGO=y
1510# CONFIG_LOGO_LINUX_VGA16 is not set 1660# CONFIG_LOGO_LINUX_VGA16 is not set
1511CONFIG_LOGO_LINUX_CLUT224=y 1661CONFIG_LOGO_LINUX_CLUT224=y
1512CONFIG_SOUND=y 1662CONFIG_SOUND=y
1663CONFIG_SOUND_OSS_CORE=y
1513CONFIG_SND=y 1664CONFIG_SND=y
1514CONFIG_SND_TIMER=y 1665CONFIG_SND_TIMER=y
1515CONFIG_SND_PCM=y 1666CONFIG_SND_PCM=y
1516CONFIG_SND_HWDEP=y 1667CONFIG_SND_HWDEP=y
1668CONFIG_SND_JACK=y
1517CONFIG_SND_SEQUENCER=y 1669CONFIG_SND_SEQUENCER=y
1518CONFIG_SND_SEQ_DUMMY=y 1670CONFIG_SND_SEQ_DUMMY=y
1519CONFIG_SND_OSSEMUL=y 1671CONFIG_SND_OSSEMUL=y
@@ -1521,6 +1673,8 @@ CONFIG_SND_MIXER_OSS=y
1521CONFIG_SND_PCM_OSS=y 1673CONFIG_SND_PCM_OSS=y
1522CONFIG_SND_PCM_OSS_PLUGINS=y 1674CONFIG_SND_PCM_OSS_PLUGINS=y
1523CONFIG_SND_SEQUENCER_OSS=y 1675CONFIG_SND_SEQUENCER_OSS=y
1676CONFIG_SND_HRTIMER=y
1677CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
1524CONFIG_SND_DYNAMIC_MINORS=y 1678CONFIG_SND_DYNAMIC_MINORS=y
1525CONFIG_SND_SUPPORT_OLD_API=y 1679CONFIG_SND_SUPPORT_OLD_API=y
1526CONFIG_SND_VERBOSE_PROCFS=y 1680CONFIG_SND_VERBOSE_PROCFS=y
@@ -1574,11 +1728,16 @@ CONFIG_SND_PCI=y
1574# CONFIG_SND_FM801 is not set 1728# CONFIG_SND_FM801 is not set
1575CONFIG_SND_HDA_INTEL=y 1729CONFIG_SND_HDA_INTEL=y
1576CONFIG_SND_HDA_HWDEP=y 1730CONFIG_SND_HDA_HWDEP=y
1731# CONFIG_SND_HDA_RECONFIG is not set
1732# CONFIG_SND_HDA_INPUT_BEEP is not set
1577CONFIG_SND_HDA_CODEC_REALTEK=y 1733CONFIG_SND_HDA_CODEC_REALTEK=y
1578CONFIG_SND_HDA_CODEC_ANALOG=y 1734CONFIG_SND_HDA_CODEC_ANALOG=y
1579CONFIG_SND_HDA_CODEC_SIGMATEL=y 1735CONFIG_SND_HDA_CODEC_SIGMATEL=y
1580CONFIG_SND_HDA_CODEC_VIA=y 1736CONFIG_SND_HDA_CODEC_VIA=y
1581CONFIG_SND_HDA_CODEC_ATIHDMI=y 1737CONFIG_SND_HDA_CODEC_ATIHDMI=y
1738CONFIG_SND_HDA_CODEC_NVHDMI=y
1739CONFIG_SND_HDA_CODEC_INTELHDMI=y
1740CONFIG_SND_HDA_ELD=y
1582CONFIG_SND_HDA_CODEC_CONEXANT=y 1741CONFIG_SND_HDA_CODEC_CONEXANT=y
1583CONFIG_SND_HDA_CODEC_CMEDIA=y 1742CONFIG_SND_HDA_CODEC_CMEDIA=y
1584CONFIG_SND_HDA_CODEC_SI3054=y 1743CONFIG_SND_HDA_CODEC_SI3054=y
@@ -1611,6 +1770,7 @@ CONFIG_SND_USB=y
1611# CONFIG_SND_USB_AUDIO is not set 1770# CONFIG_SND_USB_AUDIO is not set
1612# CONFIG_SND_USB_USX2Y is not set 1771# CONFIG_SND_USB_USX2Y is not set
1613# CONFIG_SND_USB_CAIAQ is not set 1772# CONFIG_SND_USB_CAIAQ is not set
1773# CONFIG_SND_USB_US122L is not set
1614CONFIG_SND_PCMCIA=y 1774CONFIG_SND_PCMCIA=y
1615# CONFIG_SND_VXPOCKET is not set 1775# CONFIG_SND_VXPOCKET is not set
1616# CONFIG_SND_PDAUDIOCF is not set 1776# CONFIG_SND_PDAUDIOCF is not set
@@ -1625,15 +1785,37 @@ CONFIG_HIDRAW=y
1625# USB Input Devices 1785# USB Input Devices
1626# 1786#
1627CONFIG_USB_HID=y 1787CONFIG_USB_HID=y
1628CONFIG_USB_HIDINPUT_POWERBOOK=y
1629CONFIG_HID_FF=y
1630CONFIG_HID_PID=y 1788CONFIG_HID_PID=y
1789CONFIG_USB_HIDDEV=y
1790
1791#
1792# Special HID drivers
1793#
1794CONFIG_HID_COMPAT=y
1795CONFIG_HID_A4TECH=y
1796CONFIG_HID_APPLE=y
1797CONFIG_HID_BELKIN=y
1798CONFIG_HID_CHERRY=y
1799CONFIG_HID_CHICONY=y
1800CONFIG_HID_CYPRESS=y
1801CONFIG_HID_EZKEY=y
1802CONFIG_HID_GYRATION=y
1803CONFIG_HID_LOGITECH=y
1631CONFIG_LOGITECH_FF=y 1804CONFIG_LOGITECH_FF=y
1632# CONFIG_LOGIRUMBLEPAD2_FF is not set 1805# CONFIG_LOGIRUMBLEPAD2_FF is not set
1806CONFIG_HID_MICROSOFT=y
1807CONFIG_HID_MONTEREY=y
1808CONFIG_HID_NTRIG=y
1809CONFIG_HID_PANTHERLORD=y
1633CONFIG_PANTHERLORD_FF=y 1810CONFIG_PANTHERLORD_FF=y
1811CONFIG_HID_PETALYNX=y
1812CONFIG_HID_SAMSUNG=y
1813CONFIG_HID_SONY=y
1814CONFIG_HID_SUNPLUS=y
1815# CONFIG_GREENASIA_FF is not set
1816CONFIG_HID_TOPSEED=y
1634CONFIG_THRUSTMASTER_FF=y 1817CONFIG_THRUSTMASTER_FF=y
1635CONFIG_ZEROPLUS_FF=y 1818CONFIG_ZEROPLUS_FF=y
1636CONFIG_USB_HIDDEV=y
1637CONFIG_USB_SUPPORT=y 1819CONFIG_USB_SUPPORT=y
1638CONFIG_USB_ARCH_HAS_HCD=y 1820CONFIG_USB_ARCH_HAS_HCD=y
1639CONFIG_USB_ARCH_HAS_OHCI=y 1821CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1651,6 +1833,8 @@ CONFIG_USB_DEVICEFS=y
1651CONFIG_USB_SUSPEND=y 1833CONFIG_USB_SUSPEND=y
1652# CONFIG_USB_OTG is not set 1834# CONFIG_USB_OTG is not set
1653CONFIG_USB_MON=y 1835CONFIG_USB_MON=y
1836# CONFIG_USB_WUSB is not set
1837# CONFIG_USB_WUSB_CBAF is not set
1654 1838
1655# 1839#
1656# USB Host Controller Drivers 1840# USB Host Controller Drivers
@@ -1659,6 +1843,7 @@ CONFIG_USB_MON=y
1659CONFIG_USB_EHCI_HCD=y 1843CONFIG_USB_EHCI_HCD=y
1660# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1844# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1661# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1845# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1846# CONFIG_USB_OXU210HP_HCD is not set
1662# CONFIG_USB_ISP116X_HCD is not set 1847# CONFIG_USB_ISP116X_HCD is not set
1663# CONFIG_USB_ISP1760_HCD is not set 1848# CONFIG_USB_ISP1760_HCD is not set
1664CONFIG_USB_OHCI_HCD=y 1849CONFIG_USB_OHCI_HCD=y
@@ -1668,6 +1853,8 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1668CONFIG_USB_UHCI_HCD=y 1853CONFIG_USB_UHCI_HCD=y
1669# CONFIG_USB_SL811_HCD is not set 1854# CONFIG_USB_SL811_HCD is not set
1670# CONFIG_USB_R8A66597_HCD is not set 1855# CONFIG_USB_R8A66597_HCD is not set
1856# CONFIG_USB_WHCI_HCD is not set
1857# CONFIG_USB_HWA_HCD is not set
1671 1858
1672# 1859#
1673# USB Device Class drivers 1860# USB Device Class drivers
@@ -1675,20 +1862,20 @@ CONFIG_USB_UHCI_HCD=y
1675# CONFIG_USB_ACM is not set 1862# CONFIG_USB_ACM is not set
1676CONFIG_USB_PRINTER=y 1863CONFIG_USB_PRINTER=y
1677# CONFIG_USB_WDM is not set 1864# CONFIG_USB_WDM is not set
1865# CONFIG_USB_TMC is not set
1678 1866
1679# 1867#
1680# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1868# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
1681# 1869#
1682 1870
1683# 1871#
1684# may also be needed; see USB_STORAGE Help for more information 1872# see USB_STORAGE Help for more information
1685# 1873#
1686CONFIG_USB_STORAGE=y 1874CONFIG_USB_STORAGE=y
1687# CONFIG_USB_STORAGE_DEBUG is not set 1875# CONFIG_USB_STORAGE_DEBUG is not set
1688# CONFIG_USB_STORAGE_DATAFAB is not set 1876# CONFIG_USB_STORAGE_DATAFAB is not set
1689# CONFIG_USB_STORAGE_FREECOM is not set 1877# CONFIG_USB_STORAGE_FREECOM is not set
1690# CONFIG_USB_STORAGE_ISD200 is not set 1878# CONFIG_USB_STORAGE_ISD200 is not set
1691# CONFIG_USB_STORAGE_DPCM is not set
1692# CONFIG_USB_STORAGE_USBAT is not set 1879# CONFIG_USB_STORAGE_USBAT is not set
1693# CONFIG_USB_STORAGE_SDDR09 is not set 1880# CONFIG_USB_STORAGE_SDDR09 is not set
1694# CONFIG_USB_STORAGE_SDDR55 is not set 1881# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1696,7 +1883,6 @@ CONFIG_USB_STORAGE=y
1696# CONFIG_USB_STORAGE_ALAUDA is not set 1883# CONFIG_USB_STORAGE_ALAUDA is not set
1697# CONFIG_USB_STORAGE_ONETOUCH is not set 1884# CONFIG_USB_STORAGE_ONETOUCH is not set
1698# CONFIG_USB_STORAGE_KARMA is not set 1885# CONFIG_USB_STORAGE_KARMA is not set
1699# CONFIG_USB_STORAGE_SIERRA is not set
1700# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set 1886# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1701CONFIG_USB_LIBUSUAL=y 1887CONFIG_USB_LIBUSUAL=y
1702 1888
@@ -1717,6 +1903,7 @@ CONFIG_USB_LIBUSUAL=y
1717# CONFIG_USB_EMI62 is not set 1903# CONFIG_USB_EMI62 is not set
1718# CONFIG_USB_EMI26 is not set 1904# CONFIG_USB_EMI26 is not set
1719# CONFIG_USB_ADUTUX is not set 1905# CONFIG_USB_ADUTUX is not set
1906# CONFIG_USB_SEVSEG is not set
1720# CONFIG_USB_RIO500 is not set 1907# CONFIG_USB_RIO500 is not set
1721# CONFIG_USB_LEGOTOWER is not set 1908# CONFIG_USB_LEGOTOWER is not set
1722# CONFIG_USB_LCD is not set 1909# CONFIG_USB_LCD is not set
@@ -1734,7 +1921,13 @@ CONFIG_USB_LIBUSUAL=y
1734# CONFIG_USB_IOWARRIOR is not set 1921# CONFIG_USB_IOWARRIOR is not set
1735# CONFIG_USB_TEST is not set 1922# CONFIG_USB_TEST is not set
1736# CONFIG_USB_ISIGHTFW is not set 1923# CONFIG_USB_ISIGHTFW is not set
1924# CONFIG_USB_VST is not set
1737# CONFIG_USB_GADGET is not set 1925# CONFIG_USB_GADGET is not set
1926
1927#
1928# OTG and related infrastructure
1929#
1930# CONFIG_UWB is not set
1738# CONFIG_MMC is not set 1931# CONFIG_MMC is not set
1739# CONFIG_MEMSTICK is not set 1932# CONFIG_MEMSTICK is not set
1740CONFIG_NEW_LEDS=y 1933CONFIG_NEW_LEDS=y
@@ -1743,6 +1936,7 @@ CONFIG_LEDS_CLASS=y
1743# 1936#
1744# LED drivers 1937# LED drivers
1745# 1938#
1939# CONFIG_LEDS_ALIX2 is not set
1746# CONFIG_LEDS_PCA9532 is not set 1940# CONFIG_LEDS_PCA9532 is not set
1747# CONFIG_LEDS_CLEVO_MAIL is not set 1941# CONFIG_LEDS_CLEVO_MAIL is not set
1748# CONFIG_LEDS_PCA955X is not set 1942# CONFIG_LEDS_PCA955X is not set
@@ -1753,6 +1947,7 @@ CONFIG_LEDS_CLASS=y
1753CONFIG_LEDS_TRIGGERS=y 1947CONFIG_LEDS_TRIGGERS=y
1754# CONFIG_LEDS_TRIGGER_TIMER is not set 1948# CONFIG_LEDS_TRIGGER_TIMER is not set
1755# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set 1949# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
1950# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1756# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set 1951# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1757# CONFIG_ACCESSIBILITY is not set 1952# CONFIG_ACCESSIBILITY is not set
1758# CONFIG_INFINIBAND is not set 1953# CONFIG_INFINIBAND is not set
@@ -1792,6 +1987,7 @@ CONFIG_RTC_INTF_DEV=y
1792# CONFIG_RTC_DRV_M41T80 is not set 1987# CONFIG_RTC_DRV_M41T80 is not set
1793# CONFIG_RTC_DRV_S35390A is not set 1988# CONFIG_RTC_DRV_S35390A is not set
1794# CONFIG_RTC_DRV_FM3130 is not set 1989# CONFIG_RTC_DRV_FM3130 is not set
1990# CONFIG_RTC_DRV_RX8581 is not set
1795 1991
1796# 1992#
1797# SPI RTC drivers 1993# SPI RTC drivers
@@ -1801,12 +1997,15 @@ CONFIG_RTC_INTF_DEV=y
1801# Platform RTC drivers 1997# Platform RTC drivers
1802# 1998#
1803CONFIG_RTC_DRV_CMOS=y 1999CONFIG_RTC_DRV_CMOS=y
2000# CONFIG_RTC_DRV_DS1286 is not set
1804# CONFIG_RTC_DRV_DS1511 is not set 2001# CONFIG_RTC_DRV_DS1511 is not set
1805# CONFIG_RTC_DRV_DS1553 is not set 2002# CONFIG_RTC_DRV_DS1553 is not set
1806# CONFIG_RTC_DRV_DS1742 is not set 2003# CONFIG_RTC_DRV_DS1742 is not set
1807# CONFIG_RTC_DRV_STK17TA8 is not set 2004# CONFIG_RTC_DRV_STK17TA8 is not set
1808# CONFIG_RTC_DRV_M48T86 is not set 2005# CONFIG_RTC_DRV_M48T86 is not set
2006# CONFIG_RTC_DRV_M48T35 is not set
1809# CONFIG_RTC_DRV_M48T59 is not set 2007# CONFIG_RTC_DRV_M48T59 is not set
2008# CONFIG_RTC_DRV_BQ4802 is not set
1810# CONFIG_RTC_DRV_V3020 is not set 2009# CONFIG_RTC_DRV_V3020 is not set
1811 2010
1812# 2011#
@@ -1819,6 +2018,21 @@ CONFIG_DMADEVICES=y
1819# 2018#
1820# CONFIG_INTEL_IOATDMA is not set 2019# CONFIG_INTEL_IOATDMA is not set
1821# CONFIG_UIO is not set 2020# CONFIG_UIO is not set
2021# CONFIG_STAGING is not set
2022CONFIG_X86_PLATFORM_DEVICES=y
2023# CONFIG_ACER_WMI is not set
2024# CONFIG_ASUS_LAPTOP is not set
2025# CONFIG_FUJITSU_LAPTOP is not set
2026# CONFIG_MSI_LAPTOP is not set
2027# CONFIG_PANASONIC_LAPTOP is not set
2028# CONFIG_COMPAL_LAPTOP is not set
2029# CONFIG_SONY_LAPTOP is not set
2030# CONFIG_THINKPAD_ACPI is not set
2031# CONFIG_INTEL_MENLOW is not set
2032CONFIG_EEEPC_LAPTOP=y
2033# CONFIG_ACPI_WMI is not set
2034# CONFIG_ACPI_ASUS is not set
2035# CONFIG_ACPI_TOSHIBA is not set
1822 2036
1823# 2037#
1824# Firmware Drivers 2038# Firmware Drivers
@@ -1829,8 +2043,7 @@ CONFIG_EFI_VARS=y
1829# CONFIG_DELL_RBU is not set 2043# CONFIG_DELL_RBU is not set
1830# CONFIG_DCDBAS is not set 2044# CONFIG_DCDBAS is not set
1831CONFIG_DMIID=y 2045CONFIG_DMIID=y
1832CONFIG_ISCSI_IBFT_FIND=y 2046# CONFIG_ISCSI_IBFT_FIND is not set
1833CONFIG_ISCSI_IBFT=y
1834 2047
1835# 2048#
1836# File systems 2049# File systems
@@ -1840,22 +2053,25 @@ CONFIG_EXT3_FS=y
1840CONFIG_EXT3_FS_XATTR=y 2053CONFIG_EXT3_FS_XATTR=y
1841CONFIG_EXT3_FS_POSIX_ACL=y 2054CONFIG_EXT3_FS_POSIX_ACL=y
1842CONFIG_EXT3_FS_SECURITY=y 2055CONFIG_EXT3_FS_SECURITY=y
1843# CONFIG_EXT4DEV_FS is not set 2056# CONFIG_EXT4_FS is not set
1844CONFIG_JBD=y 2057CONFIG_JBD=y
1845# CONFIG_JBD_DEBUG is not set 2058# CONFIG_JBD_DEBUG is not set
1846CONFIG_FS_MBCACHE=y 2059CONFIG_FS_MBCACHE=y
1847# CONFIG_REISERFS_FS is not set 2060# CONFIG_REISERFS_FS is not set
1848# CONFIG_JFS_FS is not set 2061# CONFIG_JFS_FS is not set
1849CONFIG_FS_POSIX_ACL=y 2062CONFIG_FS_POSIX_ACL=y
2063CONFIG_FILE_LOCKING=y
1850# CONFIG_XFS_FS is not set 2064# CONFIG_XFS_FS is not set
1851# CONFIG_GFS2_FS is not set 2065# CONFIG_GFS2_FS is not set
1852# CONFIG_OCFS2_FS is not set 2066# CONFIG_OCFS2_FS is not set
2067# CONFIG_BTRFS_FS is not set
1853CONFIG_DNOTIFY=y 2068CONFIG_DNOTIFY=y
1854CONFIG_INOTIFY=y 2069CONFIG_INOTIFY=y
1855CONFIG_INOTIFY_USER=y 2070CONFIG_INOTIFY_USER=y
1856CONFIG_QUOTA=y 2071CONFIG_QUOTA=y
1857CONFIG_QUOTA_NETLINK_INTERFACE=y 2072CONFIG_QUOTA_NETLINK_INTERFACE=y
1858# CONFIG_PRINT_QUOTA_WARNING is not set 2073# CONFIG_PRINT_QUOTA_WARNING is not set
2074CONFIG_QUOTA_TREE=y
1859# CONFIG_QFMT_V1 is not set 2075# CONFIG_QFMT_V1 is not set
1860CONFIG_QFMT_V2=y 2076CONFIG_QFMT_V2=y
1861CONFIG_QUOTACTL=y 2077CONFIG_QUOTACTL=y
@@ -1889,16 +2105,14 @@ CONFIG_PROC_FS=y
1889CONFIG_PROC_KCORE=y 2105CONFIG_PROC_KCORE=y
1890CONFIG_PROC_VMCORE=y 2106CONFIG_PROC_VMCORE=y
1891CONFIG_PROC_SYSCTL=y 2107CONFIG_PROC_SYSCTL=y
2108CONFIG_PROC_PAGE_MONITOR=y
1892CONFIG_SYSFS=y 2109CONFIG_SYSFS=y
1893CONFIG_TMPFS=y 2110CONFIG_TMPFS=y
1894CONFIG_TMPFS_POSIX_ACL=y 2111CONFIG_TMPFS_POSIX_ACL=y
1895CONFIG_HUGETLBFS=y 2112CONFIG_HUGETLBFS=y
1896CONFIG_HUGETLB_PAGE=y 2113CONFIG_HUGETLB_PAGE=y
1897# CONFIG_CONFIGFS_FS is not set 2114# CONFIG_CONFIGFS_FS is not set
1898 2115CONFIG_MISC_FILESYSTEMS=y
1899#
1900# Miscellaneous filesystems
1901#
1902# CONFIG_ADFS_FS is not set 2116# CONFIG_ADFS_FS is not set
1903# CONFIG_AFFS_FS is not set 2117# CONFIG_AFFS_FS is not set
1904# CONFIG_ECRYPT_FS is not set 2118# CONFIG_ECRYPT_FS is not set
@@ -1908,6 +2122,7 @@ CONFIG_HUGETLB_PAGE=y
1908# CONFIG_BFS_FS is not set 2122# CONFIG_BFS_FS is not set
1909# CONFIG_EFS_FS is not set 2123# CONFIG_EFS_FS is not set
1910# CONFIG_CRAMFS is not set 2124# CONFIG_CRAMFS is not set
2125# CONFIG_SQUASHFS is not set
1911# CONFIG_VXFS_FS is not set 2126# CONFIG_VXFS_FS is not set
1912# CONFIG_MINIX_FS is not set 2127# CONFIG_MINIX_FS is not set
1913# CONFIG_OMFS_FS is not set 2128# CONFIG_OMFS_FS is not set
@@ -1929,6 +2144,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1929CONFIG_NFS_COMMON=y 2144CONFIG_NFS_COMMON=y
1930CONFIG_SUNRPC=y 2145CONFIG_SUNRPC=y
1931CONFIG_SUNRPC_GSS=y 2146CONFIG_SUNRPC_GSS=y
2147# CONFIG_SUNRPC_REGISTER_V4 is not set
1932CONFIG_RPCSEC_GSS_KRB5=y 2148CONFIG_RPCSEC_GSS_KRB5=y
1933# CONFIG_RPCSEC_GSS_SPKM3 is not set 2149# CONFIG_RPCSEC_GSS_SPKM3 is not set
1934# CONFIG_SMB_FS is not set 2150# CONFIG_SMB_FS is not set
@@ -2005,7 +2221,7 @@ CONFIG_NLS_UTF8=y
2005# 2221#
2006CONFIG_TRACE_IRQFLAGS_SUPPORT=y 2222CONFIG_TRACE_IRQFLAGS_SUPPORT=y
2007CONFIG_PRINTK_TIME=y 2223CONFIG_PRINTK_TIME=y
2008CONFIG_ENABLE_WARN_DEPRECATED=y 2224# CONFIG_ENABLE_WARN_DEPRECATED is not set
2009CONFIG_ENABLE_MUST_CHECK=y 2225CONFIG_ENABLE_MUST_CHECK=y
2010CONFIG_FRAME_WARN=2048 2226CONFIG_FRAME_WARN=2048
2011CONFIG_MAGIC_SYSRQ=y 2227CONFIG_MAGIC_SYSRQ=y
@@ -2034,40 +2250,60 @@ CONFIG_TIMER_STATS=y
2034CONFIG_DEBUG_BUGVERBOSE=y 2250CONFIG_DEBUG_BUGVERBOSE=y
2035# CONFIG_DEBUG_INFO is not set 2251# CONFIG_DEBUG_INFO is not set
2036# CONFIG_DEBUG_VM is not set 2252# CONFIG_DEBUG_VM is not set
2253# CONFIG_DEBUG_VIRTUAL is not set
2037# CONFIG_DEBUG_WRITECOUNT is not set 2254# CONFIG_DEBUG_WRITECOUNT is not set
2038CONFIG_DEBUG_MEMORY_INIT=y 2255CONFIG_DEBUG_MEMORY_INIT=y
2039# CONFIG_DEBUG_LIST is not set 2256# CONFIG_DEBUG_LIST is not set
2040# CONFIG_DEBUG_SG is not set 2257# CONFIG_DEBUG_SG is not set
2258# CONFIG_DEBUG_NOTIFIERS is not set
2259CONFIG_ARCH_WANT_FRAME_POINTERS=y
2041CONFIG_FRAME_POINTER=y 2260CONFIG_FRAME_POINTER=y
2042# CONFIG_BOOT_PRINTK_DELAY is not set 2261# CONFIG_BOOT_PRINTK_DELAY is not set
2043# CONFIG_RCU_TORTURE_TEST is not set 2262# CONFIG_RCU_TORTURE_TEST is not set
2263# CONFIG_RCU_CPU_STALL_DETECTOR is not set
2044# CONFIG_KPROBES_SANITY_TEST is not set 2264# CONFIG_KPROBES_SANITY_TEST is not set
2045# CONFIG_BACKTRACE_SELF_TEST is not set 2265# CONFIG_BACKTRACE_SELF_TEST is not set
2266# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
2046# CONFIG_LKDTM is not set 2267# CONFIG_LKDTM is not set
2047# CONFIG_FAULT_INJECTION is not set 2268# CONFIG_FAULT_INJECTION is not set
2048# CONFIG_LATENCYTOP is not set 2269# CONFIG_LATENCYTOP is not set
2049CONFIG_SYSCTL_SYSCALL_CHECK=y 2270CONFIG_SYSCTL_SYSCALL_CHECK=y
2050CONFIG_HAVE_FTRACE=y 2271CONFIG_USER_STACKTRACE_SUPPORT=y
2272CONFIG_HAVE_FUNCTION_TRACER=y
2273CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
2274CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
2051CONFIG_HAVE_DYNAMIC_FTRACE=y 2275CONFIG_HAVE_DYNAMIC_FTRACE=y
2052# CONFIG_FTRACE is not set 2276CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
2277CONFIG_HAVE_HW_BRANCH_TRACER=y
2278
2279#
2280# Tracers
2281#
2282# CONFIG_FUNCTION_TRACER is not set
2053# CONFIG_IRQSOFF_TRACER is not set 2283# CONFIG_IRQSOFF_TRACER is not set
2054# CONFIG_SYSPROF_TRACER is not set 2284# CONFIG_SYSPROF_TRACER is not set
2055# CONFIG_SCHED_TRACER is not set 2285# CONFIG_SCHED_TRACER is not set
2056# CONFIG_CONTEXT_SWITCH_TRACER is not set 2286# CONFIG_CONTEXT_SWITCH_TRACER is not set
2287# CONFIG_BOOT_TRACER is not set
2288# CONFIG_TRACE_BRANCH_PROFILING is not set
2289# CONFIG_POWER_TRACER is not set
2290# CONFIG_STACK_TRACER is not set
2291# CONFIG_HW_BRANCH_TRACER is not set
2057CONFIG_PROVIDE_OHCI1394_DMA_INIT=y 2292CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
2293# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
2058# CONFIG_SAMPLES is not set 2294# CONFIG_SAMPLES is not set
2059CONFIG_HAVE_ARCH_KGDB=y 2295CONFIG_HAVE_ARCH_KGDB=y
2060# CONFIG_KGDB is not set 2296# CONFIG_KGDB is not set
2061# CONFIG_STRICT_DEVMEM is not set 2297# CONFIG_STRICT_DEVMEM is not set
2062CONFIG_X86_VERBOSE_BOOTUP=y 2298CONFIG_X86_VERBOSE_BOOTUP=y
2063CONFIG_EARLY_PRINTK=y 2299CONFIG_EARLY_PRINTK=y
2300CONFIG_EARLY_PRINTK_DBGP=y
2064CONFIG_DEBUG_STACKOVERFLOW=y 2301CONFIG_DEBUG_STACKOVERFLOW=y
2065CONFIG_DEBUG_STACK_USAGE=y 2302CONFIG_DEBUG_STACK_USAGE=y
2066# CONFIG_DEBUG_PAGEALLOC is not set 2303# CONFIG_DEBUG_PAGEALLOC is not set
2067# CONFIG_DEBUG_PER_CPU_MAPS is not set 2304# CONFIG_DEBUG_PER_CPU_MAPS is not set
2068# CONFIG_X86_PTDUMP is not set 2305# CONFIG_X86_PTDUMP is not set
2069CONFIG_DEBUG_RODATA=y 2306CONFIG_DEBUG_RODATA=y
2070# CONFIG_DIRECT_GBPAGES is not set
2071# CONFIG_DEBUG_RODATA_TEST is not set 2307# CONFIG_DEBUG_RODATA_TEST is not set
2072CONFIG_DEBUG_NX_TEST=m 2308CONFIG_DEBUG_NX_TEST=m
2073# CONFIG_IOMMU_DEBUG is not set 2309# CONFIG_IOMMU_DEBUG is not set
@@ -2091,8 +2327,10 @@ CONFIG_OPTIMIZE_INLINING=y
2091CONFIG_KEYS=y 2327CONFIG_KEYS=y
2092CONFIG_KEYS_DEBUG_PROC_KEYS=y 2328CONFIG_KEYS_DEBUG_PROC_KEYS=y
2093CONFIG_SECURITY=y 2329CONFIG_SECURITY=y
2330# CONFIG_SECURITYFS is not set
2094CONFIG_SECURITY_NETWORK=y 2331CONFIG_SECURITY_NETWORK=y
2095# CONFIG_SECURITY_NETWORK_XFRM is not set 2332# CONFIG_SECURITY_NETWORK_XFRM is not set
2333# CONFIG_SECURITY_PATH is not set
2096CONFIG_SECURITY_FILE_CAPABILITIES=y 2334CONFIG_SECURITY_FILE_CAPABILITIES=y
2097# CONFIG_SECURITY_ROOTPLUG is not set 2335# CONFIG_SECURITY_ROOTPLUG is not set
2098CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536 2336CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536
@@ -2103,7 +2341,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y
2103CONFIG_SECURITY_SELINUX_DEVELOP=y 2341CONFIG_SECURITY_SELINUX_DEVELOP=y
2104CONFIG_SECURITY_SELINUX_AVC_STATS=y 2342CONFIG_SECURITY_SELINUX_AVC_STATS=y
2105CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 2343CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
2106# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set
2107# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set 2344# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
2108# CONFIG_SECURITY_SMACK is not set 2345# CONFIG_SECURITY_SMACK is not set
2109CONFIG_CRYPTO=y 2346CONFIG_CRYPTO=y
@@ -2111,11 +2348,18 @@ CONFIG_CRYPTO=y
2111# 2348#
2112# Crypto core or helper 2349# Crypto core or helper
2113# 2350#
2351# CONFIG_CRYPTO_FIPS is not set
2114CONFIG_CRYPTO_ALGAPI=y 2352CONFIG_CRYPTO_ALGAPI=y
2353CONFIG_CRYPTO_ALGAPI2=y
2115CONFIG_CRYPTO_AEAD=y 2354CONFIG_CRYPTO_AEAD=y
2355CONFIG_CRYPTO_AEAD2=y
2116CONFIG_CRYPTO_BLKCIPHER=y 2356CONFIG_CRYPTO_BLKCIPHER=y
2357CONFIG_CRYPTO_BLKCIPHER2=y
2117CONFIG_CRYPTO_HASH=y 2358CONFIG_CRYPTO_HASH=y
2359CONFIG_CRYPTO_HASH2=y
2360CONFIG_CRYPTO_RNG2=y
2118CONFIG_CRYPTO_MANAGER=y 2361CONFIG_CRYPTO_MANAGER=y
2362CONFIG_CRYPTO_MANAGER2=y
2119# CONFIG_CRYPTO_GF128MUL is not set 2363# CONFIG_CRYPTO_GF128MUL is not set
2120# CONFIG_CRYPTO_NULL is not set 2364# CONFIG_CRYPTO_NULL is not set
2121# CONFIG_CRYPTO_CRYPTD is not set 2365# CONFIG_CRYPTO_CRYPTD is not set
@@ -2150,6 +2394,7 @@ CONFIG_CRYPTO_HMAC=y
2150# Digest 2394# Digest
2151# 2395#
2152# CONFIG_CRYPTO_CRC32C is not set 2396# CONFIG_CRYPTO_CRC32C is not set
2397# CONFIG_CRYPTO_CRC32C_INTEL is not set
2153# CONFIG_CRYPTO_MD4 is not set 2398# CONFIG_CRYPTO_MD4 is not set
2154CONFIG_CRYPTO_MD5=y 2399CONFIG_CRYPTO_MD5=y
2155# CONFIG_CRYPTO_MICHAEL_MIC is not set 2400# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -2190,6 +2435,11 @@ CONFIG_CRYPTO_DES=y
2190# 2435#
2191# CONFIG_CRYPTO_DEFLATE is not set 2436# CONFIG_CRYPTO_DEFLATE is not set
2192# CONFIG_CRYPTO_LZO is not set 2437# CONFIG_CRYPTO_LZO is not set
2438
2439#
2440# Random Number Generation
2441#
2442# CONFIG_CRYPTO_ANSI_CPRNG is not set
2193CONFIG_CRYPTO_HW=y 2443CONFIG_CRYPTO_HW=y
2194# CONFIG_CRYPTO_DEV_HIFN_795X is not set 2444# CONFIG_CRYPTO_DEV_HIFN_795X is not set
2195CONFIG_HAVE_KVM=y 2445CONFIG_HAVE_KVM=y
@@ -2204,6 +2454,7 @@ CONFIG_VIRTUALIZATION=y
2204CONFIG_BITREVERSE=y 2454CONFIG_BITREVERSE=y
2205CONFIG_GENERIC_FIND_FIRST_BIT=y 2455CONFIG_GENERIC_FIND_FIRST_BIT=y
2206CONFIG_GENERIC_FIND_NEXT_BIT=y 2456CONFIG_GENERIC_FIND_NEXT_BIT=y
2457CONFIG_GENERIC_FIND_LAST_BIT=y
2207# CONFIG_CRC_CCITT is not set 2458# CONFIG_CRC_CCITT is not set
2208# CONFIG_CRC16 is not set 2459# CONFIG_CRC16 is not set
2209CONFIG_CRC_T10DIF=y 2460CONFIG_CRC_T10DIF=y
diff --git a/arch/x86/include/asm/a.out-core.h b/arch/x86/include/asm/a.out-core.h
index 3c601f8224be..bb70e397aa84 100644
--- a/arch/x86/include/asm/a.out-core.h
+++ b/arch/x86/include/asm/a.out-core.h
@@ -55,7 +55,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
55 dump->regs.ds = (u16)regs->ds; 55 dump->regs.ds = (u16)regs->ds;
56 dump->regs.es = (u16)regs->es; 56 dump->regs.es = (u16)regs->es;
57 dump->regs.fs = (u16)regs->fs; 57 dump->regs.fs = (u16)regs->fs;
58 savesegment(gs, dump->regs.gs); 58 dump->regs.gs = get_user_gs(regs);
59 dump->regs.orig_ax = regs->orig_ax; 59 dump->regs.orig_ax = regs->orig_ax;
60 dump->regs.ip = regs->ip; 60 dump->regs.ip = regs->ip;
61 dump->regs.cs = (u16)regs->cs; 61 dump->regs.cs = (u16)regs->cs;
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 9830681446ad..4518dc500903 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -102,9 +102,6 @@ static inline void disable_acpi(void)
102 acpi_noirq = 1; 102 acpi_noirq = 1;
103} 103}
104 104
105/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
106#define FIX_ACPI_PAGES 4
107
108extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); 105extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
109 106
110static inline void acpi_noirq_set(void) { acpi_noirq = 1; } 107static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h
index 2bc162e0ec6e..0e63c9a2a8d0 100644
--- a/arch/x86/include/asm/calling.h
+++ b/arch/x86/include/asm/calling.h
@@ -1,5 +1,55 @@
1/* 1/*
2 * Some macros to handle stack frames in assembly. 2
3 x86 function call convention, 64-bit:
4 -------------------------------------
5 arguments | callee-saved | extra caller-saved | return
6 [callee-clobbered] | | [callee-clobbered] |
7 ---------------------------------------------------------------------------
8 rdi rsi rdx rcx r8-9 | rbx rbp [*] r12-15 | r10-11 | rax, rdx [**]
9
10 ( rsp is obviously invariant across normal function calls. (gcc can 'merge'
11 functions when it sees tail-call optimization possibilities) rflags is
12 clobbered. Leftover arguments are passed over the stack frame.)
13
14 [*] In the frame-pointers case rbp is fixed to the stack frame.
15
16 [**] for struct return values wider than 64 bits the return convention is a
17 bit more complex: up to 128 bits width we return small structures
18 straight in rax, rdx. For structures larger than that (3 words or
19 larger) the caller puts a pointer to an on-stack return struct
20 [allocated in the caller's stack frame] into the first argument - i.e.
21 into rdi. All other arguments shift up by one in this case.
22 Fortunately this case is rare in the kernel.
23
24For 32-bit we have the following conventions - kernel is built with
25-mregparm=3 and -freg-struct-return:
26
27 x86 function calling convention, 32-bit:
28 ----------------------------------------
29 arguments | callee-saved | extra caller-saved | return
30 [callee-clobbered] | | [callee-clobbered] |
31 -------------------------------------------------------------------------
32 eax edx ecx | ebx edi esi ebp [*] | <none> | eax, edx [**]
33
34 ( here too esp is obviously invariant across normal function calls. eflags
35 is clobbered. Leftover arguments are passed over the stack frame. )
36
37 [*] In the frame-pointers case ebp is fixed to the stack frame.
38
39 [**] We build with -freg-struct-return, which on 32-bit means similar
40 semantics as on 64-bit: edx can be used for a second return value
41 (i.e. covering integer and structure sizes up to 64 bits) - after that
42 it gets more complex and more expensive: 3-word or larger struct returns
43 get done in the caller's frame and the pointer to the return struct goes
44 into regparm0, i.e. eax - the other arguments shift up and the
45 function's register parameters degenerate to regparm=2 in essence.
46
47*/
48
49
50/*
51 * 64-bit system call stack frame layout defines and helpers,
52 * for assembly code:
3 */ 53 */
4 54
5#define R15 0 55#define R15 0
@@ -9,7 +59,7 @@
9#define RBP 32 59#define RBP 32
10#define RBX 40 60#define RBX 40
11 61
12/* arguments: interrupts/non tracing syscalls only save upto here*/ 62/* arguments: interrupts/non tracing syscalls only save up to here: */
13#define R11 48 63#define R11 48
14#define R10 56 64#define R10 56
15#define R9 64 65#define R9 64
@@ -22,7 +72,7 @@
22#define ORIG_RAX 120 /* + error_code */ 72#define ORIG_RAX 120 /* + error_code */
23/* end of arguments */ 73/* end of arguments */
24 74
25/* cpu exception frame or undefined in case of fast syscall. */ 75/* cpu exception frame or undefined in case of fast syscall: */
26#define RIP 128 76#define RIP 128
27#define CS 136 77#define CS 136
28#define EFLAGS 144 78#define EFLAGS 144
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index f51a3ddde01a..83c1bc8d2e8a 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -112,7 +112,7 @@ extern unsigned int vdso_enabled;
112 * now struct_user_regs, they are different) 112 * now struct_user_regs, they are different)
113 */ 113 */
114 114
115#define ELF_CORE_COPY_REGS(pr_reg, regs) \ 115#define ELF_CORE_COPY_REGS_COMMON(pr_reg, regs) \
116do { \ 116do { \
117 pr_reg[0] = regs->bx; \ 117 pr_reg[0] = regs->bx; \
118 pr_reg[1] = regs->cx; \ 118 pr_reg[1] = regs->cx; \
@@ -124,7 +124,6 @@ do { \
124 pr_reg[7] = regs->ds & 0xffff; \ 124 pr_reg[7] = regs->ds & 0xffff; \
125 pr_reg[8] = regs->es & 0xffff; \ 125 pr_reg[8] = regs->es & 0xffff; \
126 pr_reg[9] = regs->fs & 0xffff; \ 126 pr_reg[9] = regs->fs & 0xffff; \
127 savesegment(gs, pr_reg[10]); \
128 pr_reg[11] = regs->orig_ax; \ 127 pr_reg[11] = regs->orig_ax; \
129 pr_reg[12] = regs->ip; \ 128 pr_reg[12] = regs->ip; \
130 pr_reg[13] = regs->cs & 0xffff; \ 129 pr_reg[13] = regs->cs & 0xffff; \
@@ -133,6 +132,18 @@ do { \
133 pr_reg[16] = regs->ss & 0xffff; \ 132 pr_reg[16] = regs->ss & 0xffff; \
134} while (0); 133} while (0);
135 134
135#define ELF_CORE_COPY_REGS(pr_reg, regs) \
136do { \
137 ELF_CORE_COPY_REGS_COMMON(pr_reg, regs);\
138 pr_reg[10] = get_user_gs(regs); \
139} while (0);
140
141#define ELF_CORE_COPY_KERNEL_REGS(pr_reg, regs) \
142do { \
143 ELF_CORE_COPY_REGS_COMMON(pr_reg, regs);\
144 savesegment(gs, pr_reg[10]); \
145} while (0);
146
136#define ELF_PLATFORM (utsname()->machine) 147#define ELF_PLATFORM (utsname()->machine)
137#define set_personality_64bit() do { } while (0) 148#define set_personality_64bit() do { } while (0)
138 149
diff --git a/arch/x86/include/asm/fixmap_32.h b/arch/x86/include/asm/fixmap_32.h
index c7115c1d7217..047d9bab2b31 100644
--- a/arch/x86/include/asm/fixmap_32.h
+++ b/arch/x86/include/asm/fixmap_32.h
@@ -95,10 +95,6 @@ enum fixed_addresses {
95 (__end_of_permanent_fixed_addresses & 255), 95 (__end_of_permanent_fixed_addresses & 255),
96 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, 96 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
97 FIX_WP_TEST, 97 FIX_WP_TEST,
98#ifdef CONFIG_ACPI
99 FIX_ACPI_BEGIN,
100 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
101#endif
102#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT 98#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
103 FIX_OHCI1394_BASE, 99 FIX_OHCI1394_BASE,
104#endif 100#endif
diff --git a/arch/x86/include/asm/fixmap_64.h b/arch/x86/include/asm/fixmap_64.h
index 00a30ab9b1a5..298d9ba3faeb 100644
--- a/arch/x86/include/asm/fixmap_64.h
+++ b/arch/x86/include/asm/fixmap_64.h
@@ -50,10 +50,6 @@ enum fixed_addresses {
50 FIX_PARAVIRT_BOOTMAP, 50 FIX_PARAVIRT_BOOTMAP,
51#endif 51#endif
52 __end_of_permanent_fixed_addresses, 52 __end_of_permanent_fixed_addresses,
53#ifdef CONFIG_ACPI
54 FIX_ACPI_BEGIN,
55 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
56#endif
57#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT 53#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
58 FIX_OHCI1394_BASE, 54 FIX_OHCI1394_BASE,
59#endif 55#endif
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index bcf7ea4e1367..4f8e820cf38f 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -5,6 +5,7 @@
5 5
6#include <linux/compiler.h> 6#include <linux/compiler.h>
7#include <asm-generic/int-ll64.h> 7#include <asm-generic/int-ll64.h>
8#include <asm/page.h>
8 9
9#define build_mmio_read(name, size, type, reg, barrier) \ 10#define build_mmio_read(name, size, type, reg, barrier) \
10static inline type name(const volatile void __iomem *addr) \ 11static inline type name(const volatile void __iomem *addr) \
@@ -80,6 +81,95 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
80#define readq readq 81#define readq readq
81#define writeq writeq 82#define writeq writeq
82 83
84/**
85 * virt_to_phys - map virtual addresses to physical
86 * @address: address to remap
87 *
88 * The returned physical address is the physical (CPU) mapping for
89 * the memory address given. It is only valid to use this function on
90 * addresses directly mapped or allocated via kmalloc.
91 *
92 * This function does not give bus mappings for DMA transfers. In
93 * almost all conceivable cases a device driver should not be using
94 * this function
95 */
96
97static inline phys_addr_t virt_to_phys(volatile void *address)
98{
99 return __pa(address);
100}
101
102/**
103 * phys_to_virt - map physical address to virtual
104 * @address: address to remap
105 *
106 * The returned virtual address is a current CPU mapping for
107 * the memory address given. It is only valid to use this function on
108 * addresses that have a kernel mapping
109 *
110 * This function does not handle bus mappings for DMA transfers. In
111 * almost all conceivable cases a device driver should not be using
112 * this function
113 */
114
115static inline void *phys_to_virt(phys_addr_t address)
116{
117 return __va(address);
118}
119
120/*
121 * Change "struct page" to physical address.
122 */
123#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
124
125/*
126 * ISA I/O bus memory addresses are 1:1 with the physical address.
127 */
128#define isa_virt_to_bus (unsigned long)virt_to_phys
129#define isa_page_to_bus page_to_phys
130#define isa_bus_to_virt phys_to_virt
131
132/*
133 * However PCI ones are not necessarily 1:1 and therefore these interfaces
134 * are forbidden in portable PCI drivers.
135 *
136 * Allow them on x86 for legacy drivers, though.
137 */
138#define virt_to_bus virt_to_phys
139#define bus_to_virt phys_to_virt
140
141/**
142 * ioremap - map bus memory into CPU space
143 * @offset: bus address of the memory
144 * @size: size of the resource to map
145 *
146 * ioremap performs a platform specific sequence of operations to
147 * make bus memory CPU accessible via the readb/readw/readl/writeb/
148 * writew/writel functions and the other mmio helpers. The returned
149 * address is not guaranteed to be usable directly as a virtual
150 * address.
151 *
152 * If the area you are trying to map is a PCI BAR you should have a
153 * look at pci_iomap().
154 */
155extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
156extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
157extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
158 unsigned long prot_val);
159
160/*
161 * The default ioremap() behavior is non-cached:
162 */
163static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
164{
165 return ioremap_nocache(offset, size);
166}
167
168extern void iounmap(volatile void __iomem *addr);
169
170extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
171
172
83#ifdef CONFIG_X86_32 173#ifdef CONFIG_X86_32
84# include "io_32.h" 174# include "io_32.h"
85#else 175#else
@@ -105,5 +195,6 @@ extern void __iomem *early_memremap(unsigned long offset, unsigned long size);
105extern void early_iounmap(void __iomem *addr, unsigned long size); 195extern void early_iounmap(void __iomem *addr, unsigned long size);
106extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); 196extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
107 197
198#define IO_SPACE_LIMIT 0xffff
108 199
109#endif /* _ASM_X86_IO_H */ 200#endif /* _ASM_X86_IO_H */
diff --git a/arch/x86/include/asm/io_32.h b/arch/x86/include/asm/io_32.h
index d8e242e1b396..a299900f5920 100644
--- a/arch/x86/include/asm/io_32.h
+++ b/arch/x86/include/asm/io_32.h
@@ -37,8 +37,6 @@
37 * - Arnaldo Carvalho de Melo <acme@conectiva.com.br> 37 * - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
38 */ 38 */
39 39
40#define IO_SPACE_LIMIT 0xffff
41
42#define XQUAD_PORTIO_BASE 0xfe400000 40#define XQUAD_PORTIO_BASE 0xfe400000
43#define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */ 41#define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */
44 42
@@ -53,92 +51,6 @@
53 */ 51 */
54#define xlate_dev_kmem_ptr(p) p 52#define xlate_dev_kmem_ptr(p) p
55 53
56/**
57 * virt_to_phys - map virtual addresses to physical
58 * @address: address to remap
59 *
60 * The returned physical address is the physical (CPU) mapping for
61 * the memory address given. It is only valid to use this function on
62 * addresses directly mapped or allocated via kmalloc.
63 *
64 * This function does not give bus mappings for DMA transfers. In
65 * almost all conceivable cases a device driver should not be using
66 * this function
67 */
68
69static inline unsigned long virt_to_phys(volatile void *address)
70{
71 return __pa(address);
72}
73
74/**
75 * phys_to_virt - map physical address to virtual
76 * @address: address to remap
77 *
78 * The returned virtual address is a current CPU mapping for
79 * the memory address given. It is only valid to use this function on
80 * addresses that have a kernel mapping
81 *
82 * This function does not handle bus mappings for DMA transfers. In
83 * almost all conceivable cases a device driver should not be using
84 * this function
85 */
86
87static inline void *phys_to_virt(unsigned long address)
88{
89 return __va(address);
90}
91
92/*
93 * Change "struct page" to physical address.
94 */
95#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
96
97/**
98 * ioremap - map bus memory into CPU space
99 * @offset: bus address of the memory
100 * @size: size of the resource to map
101 *
102 * ioremap performs a platform specific sequence of operations to
103 * make bus memory CPU accessible via the readb/readw/readl/writeb/
104 * writew/writel functions and the other mmio helpers. The returned
105 * address is not guaranteed to be usable directly as a virtual
106 * address.
107 *
108 * If the area you are trying to map is a PCI BAR you should have a
109 * look at pci_iomap().
110 */
111extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
112extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
113extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
114 unsigned long prot_val);
115
116/*
117 * The default ioremap() behavior is non-cached:
118 */
119static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
120{
121 return ioremap_nocache(offset, size);
122}
123
124extern void iounmap(volatile void __iomem *addr);
125
126/*
127 * ISA I/O bus memory addresses are 1:1 with the physical address.
128 */
129#define isa_virt_to_bus virt_to_phys
130#define isa_page_to_bus page_to_phys
131#define isa_bus_to_virt phys_to_virt
132
133/*
134 * However PCI ones are not necessarily 1:1 and therefore these interfaces
135 * are forbidden in portable PCI drivers.
136 *
137 * Allow them on x86 for legacy drivers, though.
138 */
139#define virt_to_bus virt_to_phys
140#define bus_to_virt phys_to_virt
141
142static inline void 54static inline void
143memset_io(volatile void __iomem *addr, unsigned char val, int count) 55memset_io(volatile void __iomem *addr, unsigned char val, int count)
144{ 56{
diff --git a/arch/x86/include/asm/io_64.h b/arch/x86/include/asm/io_64.h
index 563c16270ba6..244067893af4 100644
--- a/arch/x86/include/asm/io_64.h
+++ b/arch/x86/include/asm/io_64.h
@@ -136,73 +136,12 @@ __OUTS(b)
136__OUTS(w) 136__OUTS(w)
137__OUTS(l) 137__OUTS(l)
138 138
139#define IO_SPACE_LIMIT 0xffff
140
141#if defined(__KERNEL__) && defined(__x86_64__) 139#if defined(__KERNEL__) && defined(__x86_64__)
142 140
143#include <linux/vmalloc.h> 141#include <linux/vmalloc.h>
144 142
145#ifndef __i386__
146/*
147 * Change virtual addresses to physical addresses and vv.
148 * These are pretty trivial
149 */
150static inline unsigned long virt_to_phys(volatile void *address)
151{
152 return __pa(address);
153}
154
155static inline void *phys_to_virt(unsigned long address)
156{
157 return __va(address);
158}
159#endif
160
161/*
162 * Change "struct page" to physical address.
163 */
164#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
165
166#include <asm-generic/iomap.h> 143#include <asm-generic/iomap.h>
167 144
168/*
169 * This one maps high address device memory and turns off caching for that area.
170 * it's useful if some control registers are in such an area and write combining
171 * or read caching is not desirable:
172 */
173extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
174extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
175extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
176 unsigned long prot_val);
177
178/*
179 * The default ioremap() behavior is non-cached:
180 */
181static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
182{
183 return ioremap_nocache(offset, size);
184}
185
186extern void iounmap(volatile void __iomem *addr);
187
188extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
189
190/*
191 * ISA I/O bus memory addresses are 1:1 with the physical address.
192 */
193#define isa_virt_to_bus virt_to_phys
194#define isa_page_to_bus page_to_phys
195#define isa_bus_to_virt phys_to_virt
196
197/*
198 * However PCI ones are not necessarily 1:1 and therefore these interfaces
199 * are forbidden in portable PCI drivers.
200 *
201 * Allow them on x86 for legacy drivers, though.
202 */
203#define virt_to_bus virt_to_phys
204#define bus_to_virt phys_to_virt
205
206void __memcpy_fromio(void *, unsigned long, unsigned); 145void __memcpy_fromio(void *, unsigned long, unsigned);
207void __memcpy_toio(unsigned long, const void *, unsigned); 146void __memcpy_toio(unsigned long, const void *, unsigned);
208 147
diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h
index c61d8b2ab8b9..0ceb6d19ed30 100644
--- a/arch/x86/include/asm/kexec.h
+++ b/arch/x86/include/asm/kexec.h
@@ -9,23 +9,8 @@
9# define PAGES_NR 4 9# define PAGES_NR 4
10#else 10#else
11# define PA_CONTROL_PAGE 0 11# define PA_CONTROL_PAGE 0
12# define VA_CONTROL_PAGE 1 12# define PA_TABLE_PAGE 1
13# define PA_PGD 2 13# define PAGES_NR 2
14# define VA_PGD 3
15# define PA_PUD_0 4
16# define VA_PUD_0 5
17# define PA_PMD_0 6
18# define VA_PMD_0 7
19# define PA_PTE_0 8
20# define VA_PTE_0 9
21# define PA_PUD_1 10
22# define VA_PUD_1 11
23# define PA_PMD_1 12
24# define VA_PMD_1 13
25# define PA_PTE_1 14
26# define VA_PTE_1 15
27# define PA_TABLE_PAGE 16
28# define PAGES_NR 17
29#endif 14#endif
30 15
31#ifdef CONFIG_X86_32 16#ifdef CONFIG_X86_32
@@ -157,9 +142,9 @@ relocate_kernel(unsigned long indirection_page,
157 unsigned long start_address) ATTRIB_NORET; 142 unsigned long start_address) ATTRIB_NORET;
158#endif 143#endif
159 144
160#ifdef CONFIG_X86_32
161#define ARCH_HAS_KIMAGE_ARCH 145#define ARCH_HAS_KIMAGE_ARCH
162 146
147#ifdef CONFIG_X86_32
163struct kimage_arch { 148struct kimage_arch {
164 pgd_t *pgd; 149 pgd_t *pgd;
165#ifdef CONFIG_X86_PAE 150#ifdef CONFIG_X86_PAE
@@ -169,6 +154,12 @@ struct kimage_arch {
169 pte_t *pte0; 154 pte_t *pte0;
170 pte_t *pte1; 155 pte_t *pte1;
171}; 156};
157#else
158struct kimage_arch {
159 pud_t *pud;
160 pmd_t *pmd;
161 pte_t *pte;
162};
172#endif 163#endif
173 164
174#endif /* __ASSEMBLY__ */ 165#endif /* __ASSEMBLY__ */
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h
index 52948df9cd1d..f923203dc39a 100644
--- a/arch/x86/include/asm/mmu_context.h
+++ b/arch/x86/include/asm/mmu_context.h
@@ -79,7 +79,7 @@ do { \
79#ifdef CONFIG_X86_32 79#ifdef CONFIG_X86_32
80#define deactivate_mm(tsk, mm) \ 80#define deactivate_mm(tsk, mm) \
81do { \ 81do { \
82 loadsegment(gs, 0); \ 82 lazy_load_gs(0); \
83} while (0) 83} while (0)
84#else 84#else
85#define deactivate_mm(tsk, mm) \ 85#define deactivate_mm(tsk, mm) \
diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h
index 6b9810859daf..89ed9d70b0aa 100644
--- a/arch/x86/include/asm/page.h
+++ b/arch/x86/include/asm/page.h
@@ -1,42 +1,11 @@
1#ifndef _ASM_X86_PAGE_H 1#ifndef _ASM_X86_PAGE_H
2#define _ASM_X86_PAGE_H 2#define _ASM_X86_PAGE_H
3 3
4#include <linux/const.h> 4#include <linux/types.h>
5
6/* PAGE_SHIFT determines the page size */
7#define PAGE_SHIFT 12
8#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
9#define PAGE_MASK (~(PAGE_SIZE-1))
10 5
11#ifdef __KERNEL__ 6#ifdef __KERNEL__
12 7
13#define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1) 8#include <asm/page_types.h>
14#define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1)
15
16/* Cast PAGE_MASK to a signed type so that it is sign-extended if
17 virtual addresses are 32-bits but physical addresses are larger
18 (ie, 32-bit PAE). */
19#define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK)
20
21/* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
22#define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK)
23
24/* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */
25#define PTE_FLAGS_MASK (~PTE_PFN_MASK)
26
27#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT)
28#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1))
29
30#define HPAGE_SHIFT PMD_SHIFT
31#define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT)
32#define HPAGE_MASK (~(HPAGE_SIZE - 1))
33#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
34
35#define HUGE_MAX_HSTATE 2
36
37#ifndef __ASSEMBLY__
38#include <linux/types.h>
39#endif
40 9
41#ifdef CONFIG_X86_64 10#ifdef CONFIG_X86_64
42#include <asm/page_64.h> 11#include <asm/page_64.h>
@@ -44,39 +13,18 @@
44#include <asm/page_32.h> 13#include <asm/page_32.h>
45#endif /* CONFIG_X86_64 */ 14#endif /* CONFIG_X86_64 */
46 15
47#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
48
49#define VM_DATA_DEFAULT_FLAGS \
50 (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
51 VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
52
53
54#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
55 17
56typedef struct { pgdval_t pgd; } pgd_t;
57typedef struct { pgprotval_t pgprot; } pgprot_t;
58
59extern int page_is_ram(unsigned long pagenr);
60extern int pagerange_is_ram(unsigned long start, unsigned long end);
61extern int devmem_is_allowed(unsigned long pagenr);
62extern void map_devmem(unsigned long pfn, unsigned long size,
63 pgprot_t vma_prot);
64extern void unmap_devmem(unsigned long pfn, unsigned long size,
65 pgprot_t vma_prot);
66
67extern unsigned long max_low_pfn_mapped;
68extern unsigned long max_pfn_mapped;
69
70struct page; 18struct page;
71 19
72static inline void clear_user_page(void *page, unsigned long vaddr, 20static inline void clear_user_page(void *page, unsigned long vaddr,
73 struct page *pg) 21 struct page *pg)
74{ 22{
75 clear_page(page); 23 clear_page(page);
76} 24}
77 25
78static inline void copy_user_page(void *to, void *from, unsigned long vaddr, 26static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
79 struct page *topage) 27 struct page *topage)
80{ 28{
81 copy_page(to, from); 29 copy_page(to, from);
82} 30}
@@ -85,98 +33,6 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
85 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) 33 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr)
86#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE 34#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
87 35
88static inline pgd_t native_make_pgd(pgdval_t val)
89{
90 return (pgd_t) { val };
91}
92
93static inline pgdval_t native_pgd_val(pgd_t pgd)
94{
95 return pgd.pgd;
96}
97
98#if PAGETABLE_LEVELS >= 3
99#if PAGETABLE_LEVELS == 4
100typedef struct { pudval_t pud; } pud_t;
101
102static inline pud_t native_make_pud(pmdval_t val)
103{
104 return (pud_t) { val };
105}
106
107static inline pudval_t native_pud_val(pud_t pud)
108{
109 return pud.pud;
110}
111#else /* PAGETABLE_LEVELS == 3 */
112#include <asm-generic/pgtable-nopud.h>
113
114static inline pudval_t native_pud_val(pud_t pud)
115{
116 return native_pgd_val(pud.pgd);
117}
118#endif /* PAGETABLE_LEVELS == 4 */
119
120typedef struct { pmdval_t pmd; } pmd_t;
121
122static inline pmd_t native_make_pmd(pmdval_t val)
123{
124 return (pmd_t) { val };
125}
126
127static inline pmdval_t native_pmd_val(pmd_t pmd)
128{
129 return pmd.pmd;
130}
131#else /* PAGETABLE_LEVELS == 2 */
132#include <asm-generic/pgtable-nopmd.h>
133
134static inline pmdval_t native_pmd_val(pmd_t pmd)
135{
136 return native_pgd_val(pmd.pud.pgd);
137}
138#endif /* PAGETABLE_LEVELS >= 3 */
139
140static inline pte_t native_make_pte(pteval_t val)
141{
142 return (pte_t) { .pte = val };
143}
144
145static inline pteval_t native_pte_val(pte_t pte)
146{
147 return pte.pte;
148}
149
150static inline pteval_t pte_flags(pte_t pte)
151{
152 return native_pte_val(pte) & PTE_FLAGS_MASK;
153}
154
155#define pgprot_val(x) ((x).pgprot)
156#define __pgprot(x) ((pgprot_t) { (x) } )
157
158#ifdef CONFIG_PARAVIRT
159#include <asm/paravirt.h>
160#else /* !CONFIG_PARAVIRT */
161
162#define pgd_val(x) native_pgd_val(x)
163#define __pgd(x) native_make_pgd(x)
164
165#ifndef __PAGETABLE_PUD_FOLDED
166#define pud_val(x) native_pud_val(x)
167#define __pud(x) native_make_pud(x)
168#endif
169
170#ifndef __PAGETABLE_PMD_FOLDED
171#define pmd_val(x) native_pmd_val(x)
172#define __pmd(x) native_make_pmd(x)
173#endif
174
175#define pte_val(x) native_pte_val(x)
176#define __pte(x) native_make_pte(x)
177
178#endif /* CONFIG_PARAVIRT */
179
180#define __pa(x) __phys_addr((unsigned long)(x)) 36#define __pa(x) __phys_addr((unsigned long)(x))
181#define __pa_nodebug(x) __phys_addr_nodebug((unsigned long)(x)) 37#define __pa_nodebug(x) __phys_addr_nodebug((unsigned long)(x))
182/* __pa_symbol should be used for C visible symbols. 38/* __pa_symbol should be used for C visible symbols.
diff --git a/arch/x86/include/asm/page_32.h b/arch/x86/include/asm/page_32.h
index bcde0d7b4325..da4e762406f7 100644
--- a/arch/x86/include/asm/page_32.h
+++ b/arch/x86/include/asm/page_32.h
@@ -1,82 +1,14 @@
1#ifndef _ASM_X86_PAGE_32_H 1#ifndef _ASM_X86_PAGE_32_H
2#define _ASM_X86_PAGE_32_H 2#define _ASM_X86_PAGE_32_H
3 3
4/* 4#include <asm/page_32_types.h>
5 * This handles the memory map.
6 *
7 * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
8 * a virtual address space of one gigabyte, which limits the
9 * amount of physical memory you can use to about 950MB.
10 *
11 * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
12 * and CONFIG_HIGHMEM64G options in the kernel configuration.
13 */
14#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
15
16#ifdef CONFIG_4KSTACKS
17#define THREAD_ORDER 0
18#else
19#define THREAD_ORDER 1
20#endif
21#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
22
23#define STACKFAULT_STACK 0
24#define DOUBLEFAULT_STACK 1
25#define NMI_STACK 0
26#define DEBUG_STACK 0
27#define MCE_STACK 0
28#define N_EXCEPTION_STACKS 1
29
30#ifdef CONFIG_X86_PAE
31/* 44=32+12, the limit we can fit into an unsigned long pfn */
32#define __PHYSICAL_MASK_SHIFT 44
33#define __VIRTUAL_MASK_SHIFT 32
34#define PAGETABLE_LEVELS 3
35
36#ifndef __ASSEMBLY__
37typedef u64 pteval_t;
38typedef u64 pmdval_t;
39typedef u64 pudval_t;
40typedef u64 pgdval_t;
41typedef u64 pgprotval_t;
42
43typedef union {
44 struct {
45 unsigned long pte_low, pte_high;
46 };
47 pteval_t pte;
48} pte_t;
49#endif /* __ASSEMBLY__
50 */
51#else /* !CONFIG_X86_PAE */
52#define __PHYSICAL_MASK_SHIFT 32
53#define __VIRTUAL_MASK_SHIFT 32
54#define PAGETABLE_LEVELS 2
55
56#ifndef __ASSEMBLY__
57typedef unsigned long pteval_t;
58typedef unsigned long pmdval_t;
59typedef unsigned long pudval_t;
60typedef unsigned long pgdval_t;
61typedef unsigned long pgprotval_t;
62
63typedef union {
64 pteval_t pte;
65 pteval_t pte_low;
66} pte_t;
67
68#endif /* __ASSEMBLY__ */
69#endif /* CONFIG_X86_PAE */
70 5
71#ifndef __ASSEMBLY__ 6#ifndef __ASSEMBLY__
72typedef struct page *pgtable_t;
73#endif
74 7
75#ifdef CONFIG_HUGETLB_PAGE 8#ifdef CONFIG_HUGETLB_PAGE
76#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA 9#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
77#endif 10#endif
78 11
79#ifndef __ASSEMBLY__
80#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET) 12#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
81#ifdef CONFIG_DEBUG_VIRTUAL 13#ifdef CONFIG_DEBUG_VIRTUAL
82extern unsigned long __phys_addr(unsigned long); 14extern unsigned long __phys_addr(unsigned long);
@@ -89,23 +21,6 @@ extern unsigned long __phys_addr(unsigned long);
89#define pfn_valid(pfn) ((pfn) < max_mapnr) 21#define pfn_valid(pfn) ((pfn) < max_mapnr)
90#endif /* CONFIG_FLATMEM */ 22#endif /* CONFIG_FLATMEM */
91 23
92extern int nx_enabled;
93
94/*
95 * This much address space is reserved for vmalloc() and iomap()
96 * as well as fixmap mappings.
97 */
98extern unsigned int __VMALLOC_RESERVE;
99extern int sysctl_legacy_va_layout;
100
101extern void find_low_pfn_range(void);
102extern unsigned long init_memory_mapping(unsigned long start,
103 unsigned long end);
104extern void initmem_init(unsigned long, unsigned long);
105extern void free_initmem(void);
106extern void setup_bootmem_allocator(void);
107
108
109#ifdef CONFIG_X86_USE_3DNOW 24#ifdef CONFIG_X86_USE_3DNOW
110#include <asm/mmx.h> 25#include <asm/mmx.h>
111 26
diff --git a/arch/x86/include/asm/page_32_types.h b/arch/x86/include/asm/page_32_types.h
new file mode 100644
index 000000000000..b5486aaf36ec
--- /dev/null
+++ b/arch/x86/include/asm/page_32_types.h
@@ -0,0 +1,62 @@
1#ifndef _ASM_X86_PAGE_32_DEFS_H
2#define _ASM_X86_PAGE_32_DEFS_H
3
4#include <linux/const.h>
5
6/*
7 * This handles the memory map.
8 *
9 * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
10 * a virtual address space of one gigabyte, which limits the
11 * amount of physical memory you can use to about 950MB.
12 *
13 * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
14 * and CONFIG_HIGHMEM64G options in the kernel configuration.
15 */
16#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
17
18#ifdef CONFIG_4KSTACKS
19#define THREAD_ORDER 0
20#else
21#define THREAD_ORDER 1
22#endif
23#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
24
25#define STACKFAULT_STACK 0
26#define DOUBLEFAULT_STACK 1
27#define NMI_STACK 0
28#define DEBUG_STACK 0
29#define MCE_STACK 0
30#define N_EXCEPTION_STACKS 1
31
32#ifdef CONFIG_X86_PAE
33/* 44=32+12, the limit we can fit into an unsigned long pfn */
34#define __PHYSICAL_MASK_SHIFT 44
35#define __VIRTUAL_MASK_SHIFT 32
36#define PAGETABLE_LEVELS 3
37
38#else /* !CONFIG_X86_PAE */
39#define __PHYSICAL_MASK_SHIFT 32
40#define __VIRTUAL_MASK_SHIFT 32
41#define PAGETABLE_LEVELS 2
42#endif /* CONFIG_X86_PAE */
43
44#ifndef __ASSEMBLY__
45
46/*
47 * This much address space is reserved for vmalloc() and iomap()
48 * as well as fixmap mappings.
49 */
50extern unsigned int __VMALLOC_RESERVE;
51extern int sysctl_legacy_va_layout;
52
53extern void find_low_pfn_range(void);
54extern unsigned long init_memory_mapping(unsigned long start,
55 unsigned long end);
56extern void initmem_init(unsigned long, unsigned long);
57extern void free_initmem(void);
58extern void setup_bootmem_allocator(void);
59
60#endif /* !__ASSEMBLY__ */
61
62#endif /* _ASM_X86_PAGE_32_DEFS_H */
diff --git a/arch/x86/include/asm/page_64.h b/arch/x86/include/asm/page_64.h
index e27fdbe5f9e4..072694ed81a5 100644
--- a/arch/x86/include/asm/page_64.h
+++ b/arch/x86/include/asm/page_64.h
@@ -1,105 +1,6 @@
1#ifndef _ASM_X86_PAGE_64_H 1#ifndef _ASM_X86_PAGE_64_H
2#define _ASM_X86_PAGE_64_H 2#define _ASM_X86_PAGE_64_H
3 3
4#define PAGETABLE_LEVELS 4 4#include <asm/page_64_types.h>
5
6#define THREAD_ORDER 1
7#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
8#define CURRENT_MASK (~(THREAD_SIZE - 1))
9
10#define EXCEPTION_STACK_ORDER 0
11#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
12
13#define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1)
14#define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
15
16#define IRQ_STACK_ORDER 2
17#define IRQ_STACK_SIZE (PAGE_SIZE << IRQ_STACK_ORDER)
18
19#define STACKFAULT_STACK 1
20#define DOUBLEFAULT_STACK 2
21#define NMI_STACK 3
22#define DEBUG_STACK 4
23#define MCE_STACK 5
24#define N_EXCEPTION_STACKS 5 /* hw limit: 7 */
25
26#define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT)
27#define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1))
28
29/*
30 * Set __PAGE_OFFSET to the most negative possible address +
31 * PGDIR_SIZE*16 (pgd slot 272). The gap is to allow a space for a
32 * hypervisor to fit. Choosing 16 slots here is arbitrary, but it's
33 * what Xen requires.
34 */
35#define __PAGE_OFFSET _AC(0xffff880000000000, UL)
36
37#define __PHYSICAL_START CONFIG_PHYSICAL_START
38#define __KERNEL_ALIGN 0x200000
39
40/*
41 * Make sure kernel is aligned to 2MB address. Catching it at compile
42 * time is better. Change your config file and compile the kernel
43 * for a 2MB aligned address (CONFIG_PHYSICAL_START)
44 */
45#if (CONFIG_PHYSICAL_START % __KERNEL_ALIGN) != 0
46#error "CONFIG_PHYSICAL_START must be a multiple of 2MB"
47#endif
48
49#define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START)
50#define __START_KERNEL_map _AC(0xffffffff80000000, UL)
51
52/* See Documentation/x86_64/mm.txt for a description of the memory map. */
53#define __PHYSICAL_MASK_SHIFT 46
54#define __VIRTUAL_MASK_SHIFT 48
55
56/*
57 * Kernel image size is limited to 512 MB (see level2_kernel_pgt in
58 * arch/x86/kernel/head_64.S), and it is mapped here:
59 */
60#define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
61#define KERNEL_IMAGE_START _AC(0xffffffff80000000, UL)
62
63#ifndef __ASSEMBLY__
64void clear_page(void *page);
65void copy_page(void *to, void *from);
66
67/* duplicated to the one in bootmem.h */
68extern unsigned long max_pfn;
69extern unsigned long phys_base;
70
71extern unsigned long __phys_addr(unsigned long);
72#define __phys_reloc_hide(x) (x)
73
74/*
75 * These are used to make use of C type-checking..
76 */
77typedef unsigned long pteval_t;
78typedef unsigned long pmdval_t;
79typedef unsigned long pudval_t;
80typedef unsigned long pgdval_t;
81typedef unsigned long pgprotval_t;
82
83typedef struct page *pgtable_t;
84
85typedef struct { pteval_t pte; } pte_t;
86
87#define vmemmap ((struct page *)VMEMMAP_START)
88
89extern unsigned long init_memory_mapping(unsigned long start,
90 unsigned long end);
91
92extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn);
93extern void free_initmem(void);
94
95extern void init_extra_mapping_uc(unsigned long phys, unsigned long size);
96extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);
97
98#endif /* !__ASSEMBLY__ */
99
100#ifdef CONFIG_FLATMEM
101#define pfn_valid(pfn) ((pfn) < max_pfn)
102#endif
103
104 5
105#endif /* _ASM_X86_PAGE_64_H */ 6#endif /* _ASM_X86_PAGE_64_H */
diff --git a/arch/x86/include/asm/page_64.h.rej b/arch/x86/include/asm/page_64.h.rej
new file mode 100644
index 000000000000..9b1807f18596
--- /dev/null
+++ b/arch/x86/include/asm/page_64.h.rej
@@ -0,0 +1,114 @@
1***************
2*** 1,105 ****
3 #ifndef _ASM_X86_PAGE_64_H
4 #define _ASM_X86_PAGE_64_H
5
6- #define PAGETABLE_LEVELS 4
7-
8- #define THREAD_ORDER 1
9- #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
10- #define CURRENT_MASK (~(THREAD_SIZE - 1))
11-
12- #define EXCEPTION_STACK_ORDER 0
13- #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
14-
15- #define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1)
16- #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
17-
18- #define IRQSTACK_ORDER 2
19- #define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER)
20-
21- #define STACKFAULT_STACK 1
22- #define DOUBLEFAULT_STACK 2
23- #define NMI_STACK 3
24- #define DEBUG_STACK 4
25- #define MCE_STACK 5
26- #define N_EXCEPTION_STACKS 5 /* hw limit: 7 */
27-
28- #define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT)
29- #define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1))
30-
31- /*
32- * Set __PAGE_OFFSET to the most negative possible address +
33- * PGDIR_SIZE*16 (pgd slot 272). The gap is to allow a space for a
34- * hypervisor to fit. Choosing 16 slots here is arbitrary, but it's
35- * what Xen requires.
36- */
37- #define __PAGE_OFFSET _AC(0xffff880000000000, UL)
38-
39- #define __PHYSICAL_START CONFIG_PHYSICAL_START
40- #define __KERNEL_ALIGN 0x200000
41-
42- /*
43- * Make sure kernel is aligned to 2MB address. Catching it at compile
44- * time is better. Change your config file and compile the kernel
45- * for a 2MB aligned address (CONFIG_PHYSICAL_START)
46- */
47- #if (CONFIG_PHYSICAL_START % __KERNEL_ALIGN) != 0
48- #error "CONFIG_PHYSICAL_START must be a multiple of 2MB"
49- #endif
50-
51- #define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START)
52- #define __START_KERNEL_map _AC(0xffffffff80000000, UL)
53-
54- /* See Documentation/x86_64/mm.txt for a description of the memory map. */
55- #define __PHYSICAL_MASK_SHIFT 46
56- #define __VIRTUAL_MASK_SHIFT 48
57-
58- /*
59- * Kernel image size is limited to 512 MB (see level2_kernel_pgt in
60- * arch/x86/kernel/head_64.S), and it is mapped here:
61- */
62- #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
63- #define KERNEL_IMAGE_START _AC(0xffffffff80000000, UL)
64-
65- #ifndef __ASSEMBLY__
66- void clear_page(void *page);
67- void copy_page(void *to, void *from);
68-
69- /* duplicated to the one in bootmem.h */
70- extern unsigned long max_pfn;
71- extern unsigned long phys_base;
72-
73- extern unsigned long __phys_addr(unsigned long);
74- #define __phys_reloc_hide(x) (x)
75-
76- /*
77- * These are used to make use of C type-checking..
78- */
79- typedef unsigned long pteval_t;
80- typedef unsigned long pmdval_t;
81- typedef unsigned long pudval_t;
82- typedef unsigned long pgdval_t;
83- typedef unsigned long pgprotval_t;
84-
85- typedef struct page *pgtable_t;
86-
87- typedef struct { pteval_t pte; } pte_t;
88-
89- #define vmemmap ((struct page *)VMEMMAP_START)
90-
91- extern unsigned long init_memory_mapping(unsigned long start,
92- unsigned long end);
93-
94- extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn);
95- extern void free_initmem(void);
96-
97- extern void init_extra_mapping_uc(unsigned long phys, unsigned long size);
98- extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);
99-
100- #endif /* !__ASSEMBLY__ */
101-
102- #ifdef CONFIG_FLATMEM
103- #define pfn_valid(pfn) ((pfn) < max_pfn)
104- #endif
105-
106
107 #endif /* _ASM_X86_PAGE_64_H */
108--- 1,6 ----
109 #ifndef _ASM_X86_PAGE_64_H
110 #define _ASM_X86_PAGE_64_H
111
112+ #include <asm/page_64_types.h>
113
114 #endif /* _ASM_X86_PAGE_64_H */
diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h
new file mode 100644
index 000000000000..bc73af3eda9c
--- /dev/null
+++ b/arch/x86/include/asm/page_64_types.h
@@ -0,0 +1,91 @@
1#ifndef _ASM_X86_PAGE_64_DEFS_H
2#define _ASM_X86_PAGE_64_DEFS_H
3
4#define PAGETABLE_LEVELS 4
5
6#define THREAD_ORDER 1
7#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
8#define CURRENT_MASK (~(THREAD_SIZE - 1))
9
10#define EXCEPTION_STACK_ORDER 0
11#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
12
13#define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1)
14#define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
15
16#define IRQ_STACK_ORDER 2
17#define IRQ_STACK_SIZE (PAGE_SIZE << IRQ_STACK_ORDER)
18
19#define STACKFAULT_STACK 1
20#define DOUBLEFAULT_STACK 2
21#define NMI_STACK 3
22#define DEBUG_STACK 4
23#define MCE_STACK 5
24#define N_EXCEPTION_STACKS 5 /* hw limit: 7 */
25
26#define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT)
27#define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1))
28
29/*
30 * Set __PAGE_OFFSET to the most negative possible address +
31 * PGDIR_SIZE*16 (pgd slot 272). The gap is to allow a space for a
32 * hypervisor to fit. Choosing 16 slots here is arbitrary, but it's
33 * what Xen requires.
34 */
35#define __PAGE_OFFSET _AC(0xffff880000000000, UL)
36
37#define __PHYSICAL_START CONFIG_PHYSICAL_START
38#define __KERNEL_ALIGN 0x200000
39
40/*
41 * Make sure kernel is aligned to 2MB address. Catching it at compile
42 * time is better. Change your config file and compile the kernel
43 * for a 2MB aligned address (CONFIG_PHYSICAL_START)
44 */
45#if (CONFIG_PHYSICAL_START % __KERNEL_ALIGN) != 0
46#error "CONFIG_PHYSICAL_START must be a multiple of 2MB"
47#endif
48
49#define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START)
50#define __START_KERNEL_map _AC(0xffffffff80000000, UL)
51
52/* See Documentation/x86_64/mm.txt for a description of the memory map. */
53#define __PHYSICAL_MASK_SHIFT 46
54#define __VIRTUAL_MASK_SHIFT 48
55
56/*
57 * Kernel image size is limited to 512 MB (see level2_kernel_pgt in
58 * arch/x86/kernel/head_64.S), and it is mapped here:
59 */
60#define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
61#define KERNEL_IMAGE_START _AC(0xffffffff80000000, UL)
62
63#ifndef __ASSEMBLY__
64void clear_page(void *page);
65void copy_page(void *to, void *from);
66
67/* duplicated to the one in bootmem.h */
68extern unsigned long max_pfn;
69extern unsigned long phys_base;
70
71extern unsigned long __phys_addr(unsigned long);
72#define __phys_reloc_hide(x) (x)
73
74#define vmemmap ((struct page *)VMEMMAP_START)
75
76extern unsigned long init_memory_mapping(unsigned long start,
77 unsigned long end);
78
79extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn);
80extern void free_initmem(void);
81
82extern void init_extra_mapping_uc(unsigned long phys, unsigned long size);
83extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);
84
85#endif /* !__ASSEMBLY__ */
86
87#ifdef CONFIG_FLATMEM
88#define pfn_valid(pfn) ((pfn) < max_pfn)
89#endif
90
91#endif /* _ASM_X86_PAGE_64_DEFS_H */
diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h
new file mode 100644
index 000000000000..2c52ff767584
--- /dev/null
+++ b/arch/x86/include/asm/page_types.h
@@ -0,0 +1,63 @@
1#ifndef _ASM_X86_PAGE_DEFS_H
2#define _ASM_X86_PAGE_DEFS_H
3
4#include <linux/const.h>
5
6/* PAGE_SHIFT determines the page size */
7#define PAGE_SHIFT 12
8#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
9#define PAGE_MASK (~(PAGE_SIZE-1))
10
11#define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1)
12#define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1)
13
14/* Cast PAGE_MASK to a signed type so that it is sign-extended if
15 virtual addresses are 32-bits but physical addresses are larger
16 (ie, 32-bit PAE). */
17#define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK)
18
19/* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
20#define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK)
21
22/* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */
23#define PTE_FLAGS_MASK (~PTE_PFN_MASK)
24
25#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT)
26#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1))
27
28#define HPAGE_SHIFT PMD_SHIFT
29#define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT)
30#define HPAGE_MASK (~(HPAGE_SIZE - 1))
31#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
32
33#define HUGE_MAX_HSTATE 2
34
35#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
36
37#define VM_DATA_DEFAULT_FLAGS \
38 (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
39 VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
40
41#ifdef CONFIG_X86_64
42#include <asm/page_64_types.h>
43#else
44#include <asm/page_32_types.h>
45#endif /* CONFIG_X86_64 */
46
47#ifndef __ASSEMBLY__
48
49struct pgprot;
50
51extern int page_is_ram(unsigned long pagenr);
52extern int devmem_is_allowed(unsigned long pagenr);
53extern void map_devmem(unsigned long pfn, unsigned long size,
54 struct pgprot vma_prot);
55extern void unmap_devmem(unsigned long pfn, unsigned long size,
56 struct pgprot vma_prot);
57
58extern unsigned long max_low_pfn_mapped;
59extern unsigned long max_pfn_mapped;
60
61#endif /* !__ASSEMBLY__ */
62
63#endif /* _ASM_X86_PAGE_DEFS_H */
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 1c244b64573f..0617d5cc9712 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -4,7 +4,7 @@
4 * para-virtualization: those hooks are defined here. */ 4 * para-virtualization: those hooks are defined here. */
5 5
6#ifdef CONFIG_PARAVIRT 6#ifdef CONFIG_PARAVIRT
7#include <asm/page.h> 7#include <asm/pgtable_types.h>
8#include <asm/asm.h> 8#include <asm/asm.h>
9 9
10/* Bitmask of what can be clobbered: usually at least eax. */ 10/* Bitmask of what can be clobbered: usually at least eax. */
@@ -1431,14 +1431,7 @@ static inline void arch_leave_lazy_cpu_mode(void)
1431 PVOP_VCALL0(pv_cpu_ops.lazy_mode.leave); 1431 PVOP_VCALL0(pv_cpu_ops.lazy_mode.leave);
1432} 1432}
1433 1433
1434static inline void arch_flush_lazy_cpu_mode(void) 1434void arch_flush_lazy_cpu_mode(void);
1435{
1436 if (unlikely(paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU)) {
1437 arch_leave_lazy_cpu_mode();
1438 arch_enter_lazy_cpu_mode();
1439 }
1440}
1441
1442 1435
1443#define __HAVE_ARCH_ENTER_LAZY_MMU_MODE 1436#define __HAVE_ARCH_ENTER_LAZY_MMU_MODE
1444static inline void arch_enter_lazy_mmu_mode(void) 1437static inline void arch_enter_lazy_mmu_mode(void)
@@ -1451,13 +1444,7 @@ static inline void arch_leave_lazy_mmu_mode(void)
1451 PVOP_VCALL0(pv_mmu_ops.lazy_mode.leave); 1444 PVOP_VCALL0(pv_mmu_ops.lazy_mode.leave);
1452} 1445}
1453 1446
1454static inline void arch_flush_lazy_mmu_mode(void) 1447void arch_flush_lazy_mmu_mode(void);
1455{
1456 if (unlikely(paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU)) {
1457 arch_leave_lazy_mmu_mode();
1458 arch_enter_lazy_mmu_mode();
1459 }
1460}
1461 1448
1462static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx, 1449static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
1463 unsigned long phys, pgprot_t flags) 1450 unsigned long phys, pgprot_t flags)
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
index 0b64af4f13ac..aee103b26d01 100644
--- a/arch/x86/include/asm/percpu.h
+++ b/arch/x86/include/asm/percpu.h
@@ -34,6 +34,12 @@
34#define PER_CPU_VAR(var) per_cpu__##var 34#define PER_CPU_VAR(var) per_cpu__##var
35#endif /* SMP */ 35#endif /* SMP */
36 36
37#ifdef CONFIG_X86_64_SMP
38#define INIT_PER_CPU_VAR(var) init_per_cpu__##var
39#else
40#define INIT_PER_CPU_VAR(var) per_cpu__##var
41#endif
42
37#else /* ...!ASSEMBLY */ 43#else /* ...!ASSEMBLY */
38 44
39#include <linux/stringify.h> 45#include <linux/stringify.h>
@@ -45,6 +51,22 @@
45#define __percpu_arg(x) "%" #x 51#define __percpu_arg(x) "%" #x
46#endif 52#endif
47 53
54/*
55 * Initialized pointers to per-cpu variables needed for the boot
56 * processor need to use these macros to get the proper address
57 * offset from __per_cpu_load on SMP.
58 *
59 * There also must be an entry in vmlinux_64.lds.S
60 */
61#define DECLARE_INIT_PER_CPU(var) \
62 extern typeof(per_cpu_var(var)) init_per_cpu_var(var)
63
64#ifdef CONFIG_X86_64_SMP
65#define init_per_cpu_var(var) init_per_cpu__##var
66#else
67#define init_per_cpu_var(var) per_cpu_var(var)
68#endif
69
48/* For arch-specific code, we can use direct single-insn ops (they 70/* For arch-specific code, we can use direct single-insn ops (they
49 * don't give an lvalue though). */ 71 * don't give an lvalue though). */
50extern void __bad_percpu_size(void); 72extern void __bad_percpu_size(void);
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h
index e0d199fe1d83..c1774ac9da7a 100644
--- a/arch/x86/include/asm/pgtable-2level.h
+++ b/arch/x86/include/asm/pgtable-2level.h
@@ -53,8 +53,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp)
53#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) 53#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
54#endif 54#endif
55 55
56#define pte_none(x) (!(x).pte_low)
57
58/* 56/*
59 * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken, 57 * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken,
60 * split up the 29 bits of offset into this range: 58 * split up the 29 bits of offset into this range:
diff --git a/arch/x86/include/asm/pgtable-2level-defs.h b/arch/x86/include/asm/pgtable-2level_types.h
index d77db8990eaa..09ae67efcebd 100644
--- a/arch/x86/include/asm/pgtable-2level-defs.h
+++ b/arch/x86/include/asm/pgtable-2level_types.h
@@ -1,6 +1,21 @@
1#ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H 1#ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H
2#define _ASM_X86_PGTABLE_2LEVEL_DEFS_H 2#define _ASM_X86_PGTABLE_2LEVEL_DEFS_H
3 3
4#ifndef __ASSEMBLY__
5#include <linux/types.h>
6
7typedef unsigned long pteval_t;
8typedef unsigned long pmdval_t;
9typedef unsigned long pudval_t;
10typedef unsigned long pgdval_t;
11typedef unsigned long pgprotval_t;
12
13typedef union {
14 pteval_t pte;
15 pteval_t pte_low;
16} pte_t;
17#endif /* !__ASSEMBLY__ */
18
4#define SHARED_KERNEL_PMD 0 19#define SHARED_KERNEL_PMD 0
5 20
6/* 21/*
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index 447da43cddb3..3f13cdf61156 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -18,21 +18,6 @@
18 printk("%s:%d: bad pgd %p(%016Lx).\n", \ 18 printk("%s:%d: bad pgd %p(%016Lx).\n", \
19 __FILE__, __LINE__, &(e), pgd_val(e)) 19 __FILE__, __LINE__, &(e), pgd_val(e))
20 20
21static inline int pud_none(pud_t pud)
22{
23 return pud_val(pud) == 0;
24}
25
26static inline int pud_bad(pud_t pud)
27{
28 return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
29}
30
31static inline int pud_present(pud_t pud)
32{
33 return pud_val(pud) & _PAGE_PRESENT;
34}
35
36/* Rules for using set_pte: the pte being assigned *must* be 21/* Rules for using set_pte: the pte being assigned *must* be
37 * either not present or in a state where the hardware will 22 * either not present or in a state where the hardware will
38 * not attempt to update the pte. In places where this is 23 * not attempt to update the pte. In places where this is
@@ -120,15 +105,6 @@ static inline void pud_clear(pud_t *pudp)
120 write_cr3(pgd); 105 write_cr3(pgd);
121} 106}
122 107
123#define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)
124
125#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))
126
127
128/* Find an entry in the second-level page table.. */
129#define pmd_offset(pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) + \
130 pmd_index(address))
131
132#ifdef CONFIG_SMP 108#ifdef CONFIG_SMP
133static inline pte_t native_ptep_get_and_clear(pte_t *ptep) 109static inline pte_t native_ptep_get_and_clear(pte_t *ptep)
134{ 110{
@@ -145,17 +121,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *ptep)
145#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) 121#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
146#endif 122#endif
147 123
148#define __HAVE_ARCH_PTE_SAME
149static inline int pte_same(pte_t a, pte_t b)
150{
151 return a.pte_low == b.pte_low && a.pte_high == b.pte_high;
152}
153
154static inline int pte_none(pte_t pte)
155{
156 return !pte.pte_low && !pte.pte_high;
157}
158
159/* 124/*
160 * Bits 0, 6 and 7 are taken in the low part of the pte, 125 * Bits 0, 6 and 7 are taken in the low part of the pte,
161 * put the 32 bits of offset into the high part. 126 * put the 32 bits of offset into the high part.
diff --git a/arch/x86/include/asm/pgtable-3level-defs.h b/arch/x86/include/asm/pgtable-3level_types.h
index 62561367653c..bcc89625ebe5 100644
--- a/arch/x86/include/asm/pgtable-3level-defs.h
+++ b/arch/x86/include/asm/pgtable-3level_types.h
@@ -1,6 +1,23 @@
1#ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H 1#ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H
2#define _ASM_X86_PGTABLE_3LEVEL_DEFS_H 2#define _ASM_X86_PGTABLE_3LEVEL_DEFS_H
3 3
4#ifndef __ASSEMBLY__
5#include <linux/types.h>
6
7typedef u64 pteval_t;
8typedef u64 pmdval_t;
9typedef u64 pudval_t;
10typedef u64 pgdval_t;
11typedef u64 pgprotval_t;
12
13typedef union {
14 struct {
15 unsigned long pte_low, pte_high;
16 };
17 pteval_t pte;
18} pte_t;
19#endif /* !__ASSEMBLY__ */
20
4#ifdef CONFIG_PARAVIRT 21#ifdef CONFIG_PARAVIRT
5#define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd) 22#define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd)
6#else 23#else
@@ -25,4 +42,5 @@
25 */ 42 */
26#define PTRS_PER_PTE 512 43#define PTRS_PER_PTE 512
27 44
45
28#endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */ 46#endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 6f7c102018bf..1c097a3a6669 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -1,164 +1,9 @@
1#ifndef _ASM_X86_PGTABLE_H 1#ifndef _ASM_X86_PGTABLE_H
2#define _ASM_X86_PGTABLE_H 2#define _ASM_X86_PGTABLE_H
3 3
4#define FIRST_USER_ADDRESS 0 4#include <asm/page.h>
5
6#define _PAGE_BIT_PRESENT 0 /* is present */
7#define _PAGE_BIT_RW 1 /* writeable */
8#define _PAGE_BIT_USER 2 /* userspace addressable */
9#define _PAGE_BIT_PWT 3 /* page write through */
10#define _PAGE_BIT_PCD 4 /* page cache disabled */
11#define _PAGE_BIT_ACCESSED 5 /* was accessed (raised by CPU) */
12#define _PAGE_BIT_DIRTY 6 /* was written to (raised by CPU) */
13#define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
14#define _PAGE_BIT_PAT 7 /* on 4KB pages */
15#define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */
16#define _PAGE_BIT_UNUSED1 9 /* available for programmer */
17#define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */
18#define _PAGE_BIT_UNUSED3 11
19#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
20#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1
21#define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1
22#define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */
23
24/* If _PAGE_BIT_PRESENT is clear, we use these: */
25/* - if the user mapped it with PROT_NONE; pte_present gives true */
26#define _PAGE_BIT_PROTNONE _PAGE_BIT_GLOBAL
27/* - set: nonlinear file mapping, saved PTE; unset:swap */
28#define _PAGE_BIT_FILE _PAGE_BIT_DIRTY
29
30#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
31#define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
32#define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER)
33#define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT)
34#define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD)
35#define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED)
36#define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
37#define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE)
38#define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
39#define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1)
40#define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP)
41#define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3)
42#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
43#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
44#define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
45#define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST)
46#define __HAVE_ARCH_PTE_SPECIAL
47
48#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
49#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
50#else
51#define _PAGE_NX (_AT(pteval_t, 0))
52#endif
53 5
54#define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE) 6#include <asm/pgtable_types.h>
55#define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE)
56
57#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
58 _PAGE_ACCESSED | _PAGE_DIRTY)
59#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \
60 _PAGE_DIRTY)
61
62/* Set of bits not changed in pte_modify */
63#define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \
64 _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY)
65
66#define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT)
67#define _PAGE_CACHE_WB (0)
68#define _PAGE_CACHE_WC (_PAGE_PWT)
69#define _PAGE_CACHE_UC_MINUS (_PAGE_PCD)
70#define _PAGE_CACHE_UC (_PAGE_PCD | _PAGE_PWT)
71
72#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
73#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
74 _PAGE_ACCESSED | _PAGE_NX)
75
76#define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW | \
77 _PAGE_USER | _PAGE_ACCESSED)
78#define PAGE_COPY_NOEXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
79 _PAGE_ACCESSED | _PAGE_NX)
80#define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
81 _PAGE_ACCESSED)
82#define PAGE_COPY PAGE_COPY_NOEXEC
83#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | \
84 _PAGE_ACCESSED | _PAGE_NX)
85#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
86 _PAGE_ACCESSED)
87
88#define __PAGE_KERNEL_EXEC \
89 (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
90#define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
91
92#define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW)
93#define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW)
94#define __PAGE_KERNEL_EXEC_NOCACHE (__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT)
95#define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC)
96#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
97#define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD)
98#define __PAGE_KERNEL_VSYSCALL (__PAGE_KERNEL_RX | _PAGE_USER)
99#define __PAGE_KERNEL_VSYSCALL_NOCACHE (__PAGE_KERNEL_VSYSCALL | _PAGE_PCD | _PAGE_PWT)
100#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
101#define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE)
102#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
103
104#define __PAGE_KERNEL_IO (__PAGE_KERNEL | _PAGE_IOMAP)
105#define __PAGE_KERNEL_IO_NOCACHE (__PAGE_KERNEL_NOCACHE | _PAGE_IOMAP)
106#define __PAGE_KERNEL_IO_UC_MINUS (__PAGE_KERNEL_UC_MINUS | _PAGE_IOMAP)
107#define __PAGE_KERNEL_IO_WC (__PAGE_KERNEL_WC | _PAGE_IOMAP)
108
109#define PAGE_KERNEL __pgprot(__PAGE_KERNEL)
110#define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO)
111#define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC)
112#define PAGE_KERNEL_RX __pgprot(__PAGE_KERNEL_RX)
113#define PAGE_KERNEL_WC __pgprot(__PAGE_KERNEL_WC)
114#define PAGE_KERNEL_NOCACHE __pgprot(__PAGE_KERNEL_NOCACHE)
115#define PAGE_KERNEL_UC_MINUS __pgprot(__PAGE_KERNEL_UC_MINUS)
116#define PAGE_KERNEL_EXEC_NOCACHE __pgprot(__PAGE_KERNEL_EXEC_NOCACHE)
117#define PAGE_KERNEL_LARGE __pgprot(__PAGE_KERNEL_LARGE)
118#define PAGE_KERNEL_LARGE_NOCACHE __pgprot(__PAGE_KERNEL_LARGE_NOCACHE)
119#define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC)
120#define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL)
121#define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE)
122
123#define PAGE_KERNEL_IO __pgprot(__PAGE_KERNEL_IO)
124#define PAGE_KERNEL_IO_NOCACHE __pgprot(__PAGE_KERNEL_IO_NOCACHE)
125#define PAGE_KERNEL_IO_UC_MINUS __pgprot(__PAGE_KERNEL_IO_UC_MINUS)
126#define PAGE_KERNEL_IO_WC __pgprot(__PAGE_KERNEL_IO_WC)
127
128/* xwr */
129#define __P000 PAGE_NONE
130#define __P001 PAGE_READONLY
131#define __P010 PAGE_COPY
132#define __P011 PAGE_COPY
133#define __P100 PAGE_READONLY_EXEC
134#define __P101 PAGE_READONLY_EXEC
135#define __P110 PAGE_COPY_EXEC
136#define __P111 PAGE_COPY_EXEC
137
138#define __S000 PAGE_NONE
139#define __S001 PAGE_READONLY
140#define __S010 PAGE_SHARED
141#define __S011 PAGE_SHARED
142#define __S100 PAGE_READONLY_EXEC
143#define __S101 PAGE_READONLY_EXEC
144#define __S110 PAGE_SHARED_EXEC
145#define __S111 PAGE_SHARED_EXEC
146
147/*
148 * early identity mapping pte attrib macros.
149 */
150#ifdef CONFIG_X86_64
151#define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC
152#else
153/*
154 * For PDE_IDENT_ATTR include USER bit. As the PDE and PTE protection
155 * bits are combined, this will alow user to access the high address mapped
156 * VDSO in the presence of CONFIG_COMPAT_VDSO
157 */
158#define PTE_IDENT_ATTR 0x003 /* PRESENT+RW */
159#define PDE_IDENT_ATTR 0x067 /* PRESENT+RW+USER+DIRTY+ACCESSED */
160#define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
161#endif
162 7
163/* 8/*
164 * Macro to mark a page protection value as UC- 9 * Macro to mark a page protection value as UC-
@@ -170,9 +15,6 @@
170 15
171#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
172 17
173#define pgprot_writecombine pgprot_writecombine
174extern pgprot_t pgprot_writecombine(pgprot_t prot);
175
176/* 18/*
177 * ZERO_PAGE is a global shared page that is always zero: used 19 * ZERO_PAGE is a global shared page that is always zero: used
178 * for zero-mapped memory areas etc.. 20 * for zero-mapped memory areas etc..
@@ -183,6 +25,66 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
183extern spinlock_t pgd_lock; 25extern spinlock_t pgd_lock;
184extern struct list_head pgd_list; 26extern struct list_head pgd_list;
185 27
28#ifdef CONFIG_PARAVIRT
29#include <asm/paravirt.h>
30#else /* !CONFIG_PARAVIRT */
31#define set_pte(ptep, pte) native_set_pte(ptep, pte)
32#define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte)
33
34#define set_pte_present(mm, addr, ptep, pte) \
35 native_set_pte_present(mm, addr, ptep, pte)
36#define set_pte_atomic(ptep, pte) \
37 native_set_pte_atomic(ptep, pte)
38
39#define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd)
40
41#ifndef __PAGETABLE_PUD_FOLDED
42#define set_pgd(pgdp, pgd) native_set_pgd(pgdp, pgd)
43#define pgd_clear(pgd) native_pgd_clear(pgd)
44#endif
45
46#ifndef set_pud
47# define set_pud(pudp, pud) native_set_pud(pudp, pud)
48#endif
49
50#ifndef __PAGETABLE_PMD_FOLDED
51#define pud_clear(pud) native_pud_clear(pud)
52#endif
53
54#define pte_clear(mm, addr, ptep) native_pte_clear(mm, addr, ptep)
55#define pmd_clear(pmd) native_pmd_clear(pmd)
56
57#define pte_update(mm, addr, ptep) do { } while (0)
58#define pte_update_defer(mm, addr, ptep) do { } while (0)
59
60static inline void __init paravirt_pagetable_setup_start(pgd_t *base)
61{
62 native_pagetable_setup_start(base);
63}
64
65static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
66{
67 native_pagetable_setup_done(base);
68}
69
70#define pgd_val(x) native_pgd_val(x)
71#define __pgd(x) native_make_pgd(x)
72
73#ifndef __PAGETABLE_PUD_FOLDED
74#define pud_val(x) native_pud_val(x)
75#define __pud(x) native_make_pud(x)
76#endif
77
78#ifndef __PAGETABLE_PMD_FOLDED
79#define pmd_val(x) native_pmd_val(x)
80#define __pmd(x) native_make_pmd(x)
81#endif
82
83#define pte_val(x) native_pte_val(x)
84#define __pte(x) native_make_pte(x)
85
86#endif /* CONFIG_PARAVIRT */
87
186/* 88/*
187 * The following only work if pte_present() is true. 89 * The following only work if pte_present() is true.
188 * Undefined behaviour if not.. 90 * Undefined behaviour if not..
@@ -236,7 +138,7 @@ static inline unsigned long pte_pfn(pte_t pte)
236 138
237static inline int pmd_large(pmd_t pte) 139static inline int pmd_large(pmd_t pte)
238{ 140{
239 return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == 141 return (pmd_flags(pte) & (_PAGE_PSE | _PAGE_PRESENT)) ==
240 (_PAGE_PSE | _PAGE_PRESENT); 142 (_PAGE_PSE | _PAGE_PRESENT);
241} 143}
242 144
@@ -314,8 +216,6 @@ static inline pte_t pte_mkspecial(pte_t pte)
314 return pte_set_flags(pte, _PAGE_SPECIAL); 216 return pte_set_flags(pte, _PAGE_SPECIAL);
315} 217}
316 218
317extern pteval_t __supported_pte_mask;
318
319/* 219/*
320 * Mask out unsupported bits in a present pgprot. Non-present pgprots 220 * Mask out unsupported bits in a present pgprot. Non-present pgprots
321 * can use those bits for other purposes, so leave them be. 221 * can use those bits for other purposes, so leave them be.
@@ -388,82 +288,195 @@ static inline int is_new_memtype_allowed(unsigned long flags,
388 return 1; 288 return 1;
389} 289}
390 290
391#ifndef __ASSEMBLY__ 291#endif /* __ASSEMBLY__ */
392/* Indicate that x86 has its own track and untrack pfn vma functions */
393#define __HAVE_PFNMAP_TRACKING
394
395#define __HAVE_PHYS_MEM_ACCESS_PROT
396struct file;
397pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
398 unsigned long size, pgprot_t vma_prot);
399int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
400 unsigned long size, pgprot_t *vma_prot);
401#endif
402
403/* Install a pte for a particular vaddr in kernel space. */
404void set_pte_vaddr(unsigned long vaddr, pte_t pte);
405 292
406#ifdef CONFIG_X86_32 293#ifdef CONFIG_X86_32
407extern void native_pagetable_setup_start(pgd_t *base); 294# include "pgtable_32.h"
408extern void native_pagetable_setup_done(pgd_t *base);
409#else 295#else
410static inline void native_pagetable_setup_start(pgd_t *base) {} 296# include "pgtable_64.h"
411static inline void native_pagetable_setup_done(pgd_t *base) {}
412#endif 297#endif
413 298
414struct seq_file; 299#ifndef __ASSEMBLY__
415extern void arch_report_meminfo(struct seq_file *m); 300#include <linux/mm_types.h>
416 301
417#ifdef CONFIG_PARAVIRT 302static inline int pte_none(pte_t pte)
418#include <asm/paravirt.h> 303{
419#else /* !CONFIG_PARAVIRT */ 304 return !pte.pte;
420#define set_pte(ptep, pte) native_set_pte(ptep, pte) 305}
421#define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte)
422 306
423#define set_pte_present(mm, addr, ptep, pte) \ 307#define __HAVE_ARCH_PTE_SAME
424 native_set_pte_present(mm, addr, ptep, pte) 308static inline int pte_same(pte_t a, pte_t b)
425#define set_pte_atomic(ptep, pte) \ 309{
426 native_set_pte_atomic(ptep, pte) 310 return a.pte == b.pte;
311}
427 312
428#define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd) 313static inline int pte_present(pte_t a)
314{
315 return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE);
316}
429 317
430#ifndef __PAGETABLE_PUD_FOLDED 318static inline int pmd_present(pmd_t pmd)
431#define set_pgd(pgdp, pgd) native_set_pgd(pgdp, pgd) 319{
432#define pgd_clear(pgd) native_pgd_clear(pgd) 320 return pmd_flags(pmd) & _PAGE_PRESENT;
433#endif 321}
434 322
435#ifndef set_pud 323static inline int pmd_none(pmd_t pmd)
436# define set_pud(pudp, pud) native_set_pud(pudp, pud) 324{
437#endif 325 /* Only check low word on 32-bit platforms, since it might be
326 out of sync with upper half. */
327 return (unsigned long)native_pmd_val(pmd) == 0;
328}
438 329
439#ifndef __PAGETABLE_PMD_FOLDED 330static inline unsigned long pmd_page_vaddr(pmd_t pmd)
440#define pud_clear(pud) native_pud_clear(pud) 331{
441#endif 332 return (unsigned long)__va(pmd_val(pmd) & PTE_PFN_MASK);
333}
442 334
443#define pte_clear(mm, addr, ptep) native_pte_clear(mm, addr, ptep) 335/*
444#define pmd_clear(pmd) native_pmd_clear(pmd) 336 * Currently stuck as a macro due to indirect forward reference to
337 * linux/mmzone.h's __section_mem_map_addr() definition:
338 */
339#define pmd_page(pmd) pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
445 340
446#define pte_update(mm, addr, ptep) do { } while (0) 341/*
447#define pte_update_defer(mm, addr, ptep) do { } while (0) 342 * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD]
343 *
344 * this macro returns the index of the entry in the pmd page which would
345 * control the given virtual address
346 */
347static inline unsigned pmd_index(unsigned long address)
348{
349 return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
350}
448 351
449static inline void __init paravirt_pagetable_setup_start(pgd_t *base) 352/*
353 * Conversion functions: convert a page and protection to a page entry,
354 * and a page entry and page directory to the page they refer to.
355 *
356 * (Currently stuck as a macro because of indirect forward reference
357 * to linux/mm.h:page_to_nid())
358 */
359#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
360
361/*
362 * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
363 *
364 * this function returns the index of the entry in the pte page which would
365 * control the given virtual address
366 */
367static inline unsigned pte_index(unsigned long address)
450{ 368{
451 native_pagetable_setup_start(base); 369 return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
452} 370}
453 371
454static inline void __init paravirt_pagetable_setup_done(pgd_t *base) 372static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address)
455{ 373{
456 native_pagetable_setup_done(base); 374 return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address);
457} 375}
458#endif /* CONFIG_PARAVIRT */
459 376
460#endif /* __ASSEMBLY__ */ 377static inline int pmd_bad(pmd_t pmd)
378{
379 return (pmd_flags(pmd) & ~_PAGE_USER) != _KERNPG_TABLE;
380}
461 381
462#ifdef CONFIG_X86_32 382static inline unsigned long pages_to_mb(unsigned long npg)
463# include "pgtable_32.h" 383{
384 return npg >> (20 - PAGE_SHIFT);
385}
386
387#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
388 remap_pfn_range(vma, vaddr, pfn, size, prot)
389
390#if PAGETABLE_LEVELS > 2
391static inline int pud_none(pud_t pud)
392{
393 return native_pud_val(pud) == 0;
394}
395
396static inline int pud_present(pud_t pud)
397{
398 return pud_flags(pud) & _PAGE_PRESENT;
399}
400
401static inline unsigned long pud_page_vaddr(pud_t pud)
402{
403 return (unsigned long)__va((unsigned long)pud_val(pud) & PTE_PFN_MASK);
404}
405
406/*
407 * Currently stuck as a macro due to indirect forward reference to
408 * linux/mmzone.h's __section_mem_map_addr() definition:
409 */
410#define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)
411
412/* Find an entry in the second-level page table.. */
413static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
414{
415 return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address);
416}
417
418static inline unsigned long pmd_pfn(pmd_t pmd)
419{
420 return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT;
421}
422
423static inline int pud_large(pud_t pud)
424{
425 return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) ==
426 (_PAGE_PSE | _PAGE_PRESENT);
427}
428
429static inline int pud_bad(pud_t pud)
430{
431 return (pud_flags(pud) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0;
432}
464#else 433#else
465# include "pgtable_64.h" 434static inline int pud_large(pud_t pud)
466#endif 435{
436 return 0;
437}
438#endif /* PAGETABLE_LEVELS > 2 */
439
440#if PAGETABLE_LEVELS > 3
441static inline int pgd_present(pgd_t pgd)
442{
443 return pgd_flags(pgd) & _PAGE_PRESENT;
444}
445
446static inline unsigned long pgd_page_vaddr(pgd_t pgd)
447{
448 return (unsigned long)__va((unsigned long)pgd_val(pgd) & PTE_PFN_MASK);
449}
450
451/*
452 * Currently stuck as a macro due to indirect forward reference to
453 * linux/mmzone.h's __section_mem_map_addr() definition:
454 */
455#define pgd_page(pgd) pfn_to_page(pgd_val(pgd) >> PAGE_SHIFT)
456
457/* to find an entry in a page-table-directory. */
458static inline unsigned pud_index(unsigned long address)
459{
460 return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
461}
462
463static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
464{
465 return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address);
466}
467
468static inline int pgd_bad(pgd_t pgd)
469{
470 return (pgd_flags(pgd) & ~_PAGE_USER) != _KERNPG_TABLE;
471}
472
473static inline int pgd_none(pgd_t pgd)
474{
475 return !native_pgd_val(pgd);
476}
477#endif /* PAGETABLE_LEVELS > 3 */
478
479#endif /* __ASSEMBLY__ */
467 480
468/* 481/*
469 * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD] 482 * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
@@ -490,28 +503,6 @@ static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
490 503
491#ifndef __ASSEMBLY__ 504#ifndef __ASSEMBLY__
492 505
493enum {
494 PG_LEVEL_NONE,
495 PG_LEVEL_4K,
496 PG_LEVEL_2M,
497 PG_LEVEL_1G,
498 PG_LEVEL_NUM
499};
500
501#ifdef CONFIG_PROC_FS
502extern void update_page_count(int level, unsigned long pages);
503#else
504static inline void update_page_count(int level, unsigned long pages) { }
505#endif
506
507/*
508 * Helper function that returns the kernel pagetable entry controlling
509 * the virtual address 'address'. NULL means no pagetable entry present.
510 * NOTE: the return type is pte_t but if the pmd is PSE then we return it
511 * as a pte too.
512 */
513extern pte_t *lookup_address(unsigned long address, unsigned int *level);
514
515/* local pte updates need not use xchg for locking */ 506/* local pte updates need not use xchg for locking */
516static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) 507static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
517{ 508{
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
index 72b020deb46b..97612fc7632f 100644
--- a/arch/x86/include/asm/pgtable_32.h
+++ b/arch/x86/include/asm/pgtable_32.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_X86_PGTABLE_32_H 1#ifndef _ASM_X86_PGTABLE_32_H
2#define _ASM_X86_PGTABLE_32_H 2#define _ASM_X86_PGTABLE_32_H
3 3
4#include <asm/pgtable_32_types.h>
4 5
5/* 6/*
6 * The Linux memory management assumes a three-level page table setup. On 7 * The Linux memory management assumes a three-level page table setup. On
@@ -33,47 +34,6 @@ void paging_init(void);
33 34
34extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t); 35extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
35 36
36/*
37 * The Linux x86 paging architecture is 'compile-time dual-mode', it
38 * implements both the traditional 2-level x86 page tables and the
39 * newer 3-level PAE-mode page tables.
40 */
41#ifdef CONFIG_X86_PAE
42# include <asm/pgtable-3level-defs.h>
43# define PMD_SIZE (1UL << PMD_SHIFT)
44# define PMD_MASK (~(PMD_SIZE - 1))
45#else
46# include <asm/pgtable-2level-defs.h>
47#endif
48
49#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
50#define PGDIR_MASK (~(PGDIR_SIZE - 1))
51
52/* Just any arbitrary offset to the start of the vmalloc VM area: the
53 * current 8MB value just means that there will be a 8MB "hole" after the
54 * physical memory until the kernel virtual memory starts. That means that
55 * any out-of-bounds memory accesses will hopefully be caught.
56 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
57 * area for the same reason. ;)
58 */
59#define VMALLOC_OFFSET (8 * 1024 * 1024)
60#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)
61#ifdef CONFIG_X86_PAE
62#define LAST_PKMAP 512
63#else
64#define LAST_PKMAP 1024
65#endif
66
67#define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1)) \
68 & PMD_MASK)
69
70#ifdef CONFIG_HIGHMEM
71# define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE)
72#else
73# define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
74#endif
75
76#define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)
77 37
78/* 38/*
79 * Define this if things work differently on an i386 and an i486: 39 * Define this if things work differently on an i386 and an i486:
@@ -85,55 +45,12 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
85/* The boot page tables (all created as a single array) */ 45/* The boot page tables (all created as a single array) */
86extern unsigned long pg0[]; 46extern unsigned long pg0[];
87 47
88#define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE))
89
90/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
91#define pmd_none(x) (!(unsigned long)pmd_val((x)))
92#define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT)
93#define pmd_bad(x) ((pmd_val(x) & (PTE_FLAGS_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
94
95#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
96
97#ifdef CONFIG_X86_PAE 48#ifdef CONFIG_X86_PAE
98# include <asm/pgtable-3level.h> 49# include <asm/pgtable-3level.h>
99#else 50#else
100# include <asm/pgtable-2level.h> 51# include <asm/pgtable-2level.h>
101#endif 52#endif
102 53
103/*
104 * Conversion functions: convert a page and protection to a page entry,
105 * and a page entry and page directory to the page they refer to.
106 */
107#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
108
109
110static inline int pud_large(pud_t pud) { return 0; }
111
112/*
113 * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD]
114 *
115 * this macro returns the index of the entry in the pmd page which would
116 * control the given virtual address
117 */
118#define pmd_index(address) \
119 (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
120
121/*
122 * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
123 *
124 * this macro returns the index of the entry in the pte page which would
125 * control the given virtual address
126 */
127#define pte_index(address) \
128 (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
129#define pte_offset_kernel(dir, address) \
130 ((pte_t *)pmd_page_vaddr(*(dir)) + pte_index((address)))
131
132#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
133
134#define pmd_page_vaddr(pmd) \
135 ((unsigned long)__va(pmd_val((pmd)) & PTE_PFN_MASK))
136
137#if defined(CONFIG_HIGHPTE) 54#if defined(CONFIG_HIGHPTE)
138#define pte_offset_map(dir, address) \ 55#define pte_offset_map(dir, address) \
139 ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \ 56 ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \
@@ -176,7 +93,4 @@ do { \
176#define kern_addr_valid(kaddr) (0) 93#define kern_addr_valid(kaddr) (0)
177#endif 94#endif
178 95
179#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
180 remap_pfn_range(vma, vaddr, pfn, size, prot)
181
182#endif /* _ASM_X86_PGTABLE_32_H */ 96#endif /* _ASM_X86_PGTABLE_32_H */
diff --git a/arch/x86/include/asm/pgtable_32_types.h b/arch/x86/include/asm/pgtable_32_types.h
new file mode 100644
index 000000000000..bd8df3b2fe04
--- /dev/null
+++ b/arch/x86/include/asm/pgtable_32_types.h
@@ -0,0 +1,46 @@
1#ifndef _ASM_X86_PGTABLE_32_DEFS_H
2#define _ASM_X86_PGTABLE_32_DEFS_H
3
4/*
5 * The Linux x86 paging architecture is 'compile-time dual-mode', it
6 * implements both the traditional 2-level x86 page tables and the
7 * newer 3-level PAE-mode page tables.
8 */
9#ifdef CONFIG_X86_PAE
10# include <asm/pgtable-3level_types.h>
11# define PMD_SIZE (1UL << PMD_SHIFT)
12# define PMD_MASK (~(PMD_SIZE - 1))
13#else
14# include <asm/pgtable-2level_types.h>
15#endif
16
17#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
18#define PGDIR_MASK (~(PGDIR_SIZE - 1))
19
20/* Just any arbitrary offset to the start of the vmalloc VM area: the
21 * current 8MB value just means that there will be a 8MB "hole" after the
22 * physical memory until the kernel virtual memory starts. That means that
23 * any out-of-bounds memory accesses will hopefully be caught.
24 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
25 * area for the same reason. ;)
26 */
27#define VMALLOC_OFFSET (8 * 1024 * 1024)
28#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)
29#ifdef CONFIG_X86_PAE
30#define LAST_PKMAP 512
31#else
32#define LAST_PKMAP 1024
33#endif
34
35#define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1)) \
36 & PMD_MASK)
37
38#ifdef CONFIG_HIGHMEM
39# define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE)
40#else
41# define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
42#endif
43
44#define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)
45
46#endif /* _ASM_X86_PGTABLE_32_DEFS_H */
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 1df9637dfda3..6b87bc6d5018 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -2,6 +2,8 @@
2#define _ASM_X86_PGTABLE_64_H 2#define _ASM_X86_PGTABLE_64_H
3 3
4#include <linux/const.h> 4#include <linux/const.h>
5#include <asm/pgtable_64_types.h>
6
5#ifndef __ASSEMBLY__ 7#ifndef __ASSEMBLY__
6 8
7/* 9/*
@@ -25,32 +27,6 @@ extern void paging_init(void);
25 27
26#endif /* !__ASSEMBLY__ */ 28#endif /* !__ASSEMBLY__ */
27 29
28#define SHARED_KERNEL_PMD 0
29
30/*
31 * PGDIR_SHIFT determines what a top-level page table entry can map
32 */
33#define PGDIR_SHIFT 39
34#define PTRS_PER_PGD 512
35
36/*
37 * 3rd level page
38 */
39#define PUD_SHIFT 30
40#define PTRS_PER_PUD 512
41
42/*
43 * PMD_SHIFT determines the size of the area a middle-level
44 * page table can map
45 */
46#define PMD_SHIFT 21
47#define PTRS_PER_PMD 512
48
49/*
50 * entries per page directory level
51 */
52#define PTRS_PER_PTE 512
53
54#ifndef __ASSEMBLY__ 30#ifndef __ASSEMBLY__
55 31
56#define pte_ERROR(e) \ 32#define pte_ERROR(e) \
@@ -66,9 +42,6 @@ extern void paging_init(void);
66 printk("%s:%d: bad pgd %p(%016lx).\n", \ 42 printk("%s:%d: bad pgd %p(%016lx).\n", \
67 __FILE__, __LINE__, &(e), pgd_val(e)) 43 __FILE__, __LINE__, &(e), pgd_val(e))
68 44
69#define pgd_none(x) (!pgd_val(x))
70#define pud_none(x) (!pud_val(x))
71
72struct mm_struct; 45struct mm_struct;
73 46
74void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte); 47void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte);
@@ -133,48 +106,6 @@ static inline void native_pgd_clear(pgd_t *pgd)
133 native_set_pgd(pgd, native_make_pgd(0)); 106 native_set_pgd(pgd, native_make_pgd(0));
134} 107}
135 108
136#define pte_same(a, b) ((a).pte == (b).pte)
137
138#endif /* !__ASSEMBLY__ */
139
140#define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
141#define PMD_MASK (~(PMD_SIZE - 1))
142#define PUD_SIZE (_AC(1, UL) << PUD_SHIFT)
143#define PUD_MASK (~(PUD_SIZE - 1))
144#define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
145#define PGDIR_MASK (~(PGDIR_SIZE - 1))
146
147
148#define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL)
149#define VMALLOC_START _AC(0xffffc20000000000, UL)
150#define VMALLOC_END _AC(0xffffe1ffffffffff, UL)
151#define VMEMMAP_START _AC(0xffffe20000000000, UL)
152#define MODULES_VADDR _AC(0xffffffffa0000000, UL)
153#define MODULES_END _AC(0xffffffffff000000, UL)
154#define MODULES_LEN (MODULES_END - MODULES_VADDR)
155
156#ifndef __ASSEMBLY__
157
158static inline int pgd_bad(pgd_t pgd)
159{
160 return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
161}
162
163static inline int pud_bad(pud_t pud)
164{
165 return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
166}
167
168static inline int pmd_bad(pmd_t pmd)
169{
170 return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
171}
172
173#define pte_none(x) (!pte_val((x)))
174#define pte_present(x) (pte_val((x)) & (_PAGE_PRESENT | _PAGE_PROTNONE))
175
176#define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) /* FIXME: is this right? */
177
178/* 109/*
179 * Conversion functions: convert a page and protection to a page entry, 110 * Conversion functions: convert a page and protection to a page entry,
180 * and a page entry and page directory to the page they refer to. 111 * and a page entry and page directory to the page they refer to.
@@ -183,41 +114,12 @@ static inline int pmd_bad(pmd_t pmd)
183/* 114/*
184 * Level 4 access. 115 * Level 4 access.
185 */ 116 */
186#define pgd_page_vaddr(pgd) \
187 ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_PFN_MASK))
188#define pgd_page(pgd) (pfn_to_page(pgd_val((pgd)) >> PAGE_SHIFT))
189#define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT)
190static inline int pgd_large(pgd_t pgd) { return 0; } 117static inline int pgd_large(pgd_t pgd) { return 0; }
191#define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE) 118#define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE)
192 119
193/* PUD - Level3 access */ 120/* PUD - Level3 access */
194/* to find an entry in a page-table-directory. */
195#define pud_page_vaddr(pud) \
196 ((unsigned long)__va(pud_val((pud)) & PHYSICAL_PAGE_MASK))
197#define pud_page(pud) (pfn_to_page(pud_val((pud)) >> PAGE_SHIFT))
198#define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
199#define pud_offset(pgd, address) \
200 ((pud_t *)pgd_page_vaddr(*(pgd)) + pud_index((address)))
201#define pud_present(pud) (pud_val((pud)) & _PAGE_PRESENT)
202
203static inline int pud_large(pud_t pte)
204{
205 return (pud_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) ==
206 (_PAGE_PSE | _PAGE_PRESENT);
207}
208 121
209/* PMD - Level 2 access */ 122/* PMD - Level 2 access */
210#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_PFN_MASK))
211#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
212
213#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
214#define pmd_offset(dir, address) ((pmd_t *)pud_page_vaddr(*(dir)) + \
215 pmd_index(address))
216#define pmd_none(x) (!pmd_val((x)))
217#define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT)
218#define pfn_pmd(nr, prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val((prot))))
219#define pmd_pfn(x) ((pmd_val((x)) & __PHYSICAL_MASK) >> PAGE_SHIFT)
220
221#define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) 123#define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
222#define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \ 124#define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \
223 _PAGE_FILE }) 125 _PAGE_FILE })
@@ -225,13 +127,6 @@ static inline int pud_large(pud_t pte)
225 127
226/* PTE - Level 1 access. */ 128/* PTE - Level 1 access. */
227 129
228/* page, protection -> pte */
229#define mk_pte(page, pgprot) pfn_pte(page_to_pfn((page)), (pgprot))
230
231#define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
232#define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \
233 pte_index((address)))
234
235/* x86-64 always has all page tables mapped. */ 130/* x86-64 always has all page tables mapped. */
236#define pte_offset_map(dir, address) pte_offset_kernel((dir), (address)) 131#define pte_offset_map(dir, address) pte_offset_kernel((dir), (address))
237#define pte_offset_map_nested(dir, address) pte_offset_kernel((dir), (address)) 132#define pte_offset_map_nested(dir, address) pte_offset_kernel((dir), (address))
@@ -265,9 +160,6 @@ extern int direct_gbpages;
265extern int kern_addr_valid(unsigned long addr); 160extern int kern_addr_valid(unsigned long addr);
266extern void cleanup_highmap(void); 161extern void cleanup_highmap(void);
267 162
268#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
269 remap_pfn_range(vma, vaddr, pfn, size, prot)
270
271#define HAVE_ARCH_UNMAPPED_AREA 163#define HAVE_ARCH_UNMAPPED_AREA
272#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN 164#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
273 165
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
new file mode 100644
index 000000000000..2f59135c6f2a
--- /dev/null
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -0,0 +1,62 @@
1#ifndef _ASM_X86_PGTABLE_64_DEFS_H
2#define _ASM_X86_PGTABLE_64_DEFS_H
3
4#ifndef __ASSEMBLY__
5#include <linux/types.h>
6
7/*
8 * These are used to make use of C type-checking..
9 */
10typedef unsigned long pteval_t;
11typedef unsigned long pmdval_t;
12typedef unsigned long pudval_t;
13typedef unsigned long pgdval_t;
14typedef unsigned long pgprotval_t;
15
16typedef struct { pteval_t pte; } pte_t;
17
18#endif /* !__ASSEMBLY__ */
19
20#define SHARED_KERNEL_PMD 0
21
22/*
23 * PGDIR_SHIFT determines what a top-level page table entry can map
24 */
25#define PGDIR_SHIFT 39
26#define PTRS_PER_PGD 512
27
28/*
29 * 3rd level page
30 */
31#define PUD_SHIFT 30
32#define PTRS_PER_PUD 512
33
34/*
35 * PMD_SHIFT determines the size of the area a middle-level
36 * page table can map
37 */
38#define PMD_SHIFT 21
39#define PTRS_PER_PMD 512
40
41/*
42 * entries per page directory level
43 */
44#define PTRS_PER_PTE 512
45
46#define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
47#define PMD_MASK (~(PMD_SIZE - 1))
48#define PUD_SIZE (_AC(1, UL) << PUD_SHIFT)
49#define PUD_MASK (~(PUD_SIZE - 1))
50#define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
51#define PGDIR_MASK (~(PGDIR_SIZE - 1))
52
53
54#define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL)
55#define VMALLOC_START _AC(0xffffc20000000000, UL)
56#define VMALLOC_END _AC(0xffffe1ffffffffff, UL)
57#define VMEMMAP_START _AC(0xffffe20000000000, UL)
58#define MODULES_VADDR _AC(0xffffffffa0000000, UL)
59#define MODULES_END _AC(0xffffffffff000000, UL)
60#define MODULES_LEN (MODULES_END - MODULES_VADDR)
61
62#endif /* _ASM_X86_PGTABLE_64_DEFS_H */
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
new file mode 100644
index 000000000000..9dafe87be2de
--- /dev/null
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -0,0 +1,322 @@
1#ifndef _ASM_X86_PGTABLE_DEFS_H
2#define _ASM_X86_PGTABLE_DEFS_H
3
4#include <linux/const.h>
5#include <asm/page_types.h>
6
7#define FIRST_USER_ADDRESS 0
8
9#define _PAGE_BIT_PRESENT 0 /* is present */
10#define _PAGE_BIT_RW 1 /* writeable */
11#define _PAGE_BIT_USER 2 /* userspace addressable */
12#define _PAGE_BIT_PWT 3 /* page write through */
13#define _PAGE_BIT_PCD 4 /* page cache disabled */
14#define _PAGE_BIT_ACCESSED 5 /* was accessed (raised by CPU) */
15#define _PAGE_BIT_DIRTY 6 /* was written to (raised by CPU) */
16#define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
17#define _PAGE_BIT_PAT 7 /* on 4KB pages */
18#define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */
19#define _PAGE_BIT_UNUSED1 9 /* available for programmer */
20#define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */
21#define _PAGE_BIT_UNUSED3 11
22#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
23#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1
24#define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1
25#define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */
26
27/* If _PAGE_BIT_PRESENT is clear, we use these: */
28/* - if the user mapped it with PROT_NONE; pte_present gives true */
29#define _PAGE_BIT_PROTNONE _PAGE_BIT_GLOBAL
30/* - set: nonlinear file mapping, saved PTE; unset:swap */
31#define _PAGE_BIT_FILE _PAGE_BIT_DIRTY
32
33#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
34#define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
35#define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER)
36#define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT)
37#define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD)
38#define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED)
39#define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
40#define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE)
41#define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
42#define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1)
43#define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP)
44#define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3)
45#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
46#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
47#define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
48#define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST)
49#define __HAVE_ARCH_PTE_SPECIAL
50
51#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
52#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
53#else
54#define _PAGE_NX (_AT(pteval_t, 0))
55#endif
56
57#define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE)
58#define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE)
59
60#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
61 _PAGE_ACCESSED | _PAGE_DIRTY)
62#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \
63 _PAGE_DIRTY)
64
65/* Set of bits not changed in pte_modify */
66#define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \
67 _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY)
68
69#define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT)
70#define _PAGE_CACHE_WB (0)
71#define _PAGE_CACHE_WC (_PAGE_PWT)
72#define _PAGE_CACHE_UC_MINUS (_PAGE_PCD)
73#define _PAGE_CACHE_UC (_PAGE_PCD | _PAGE_PWT)
74
75#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
76#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
77 _PAGE_ACCESSED | _PAGE_NX)
78
79#define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW | \
80 _PAGE_USER | _PAGE_ACCESSED)
81#define PAGE_COPY_NOEXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
82 _PAGE_ACCESSED | _PAGE_NX)
83#define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
84 _PAGE_ACCESSED)
85#define PAGE_COPY PAGE_COPY_NOEXEC
86#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | \
87 _PAGE_ACCESSED | _PAGE_NX)
88#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
89 _PAGE_ACCESSED)
90
91#define __PAGE_KERNEL_EXEC \
92 (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
93#define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
94
95#define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW)
96#define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW)
97#define __PAGE_KERNEL_EXEC_NOCACHE (__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT)
98#define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC)
99#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
100#define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD)
101#define __PAGE_KERNEL_VSYSCALL (__PAGE_KERNEL_RX | _PAGE_USER)
102#define __PAGE_KERNEL_VSYSCALL_NOCACHE (__PAGE_KERNEL_VSYSCALL | _PAGE_PCD | _PAGE_PWT)
103#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
104#define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE)
105#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
106
107#define __PAGE_KERNEL_IO (__PAGE_KERNEL | _PAGE_IOMAP)
108#define __PAGE_KERNEL_IO_NOCACHE (__PAGE_KERNEL_NOCACHE | _PAGE_IOMAP)
109#define __PAGE_KERNEL_IO_UC_MINUS (__PAGE_KERNEL_UC_MINUS | _PAGE_IOMAP)
110#define __PAGE_KERNEL_IO_WC (__PAGE_KERNEL_WC | _PAGE_IOMAP)
111
112#define PAGE_KERNEL __pgprot(__PAGE_KERNEL)
113#define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO)
114#define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC)
115#define PAGE_KERNEL_RX __pgprot(__PAGE_KERNEL_RX)
116#define PAGE_KERNEL_WC __pgprot(__PAGE_KERNEL_WC)
117#define PAGE_KERNEL_NOCACHE __pgprot(__PAGE_KERNEL_NOCACHE)
118#define PAGE_KERNEL_UC_MINUS __pgprot(__PAGE_KERNEL_UC_MINUS)
119#define PAGE_KERNEL_EXEC_NOCACHE __pgprot(__PAGE_KERNEL_EXEC_NOCACHE)
120#define PAGE_KERNEL_LARGE __pgprot(__PAGE_KERNEL_LARGE)
121#define PAGE_KERNEL_LARGE_NOCACHE __pgprot(__PAGE_KERNEL_LARGE_NOCACHE)
122#define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC)
123#define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL)
124#define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE)
125
126#define PAGE_KERNEL_IO __pgprot(__PAGE_KERNEL_IO)
127#define PAGE_KERNEL_IO_NOCACHE __pgprot(__PAGE_KERNEL_IO_NOCACHE)
128#define PAGE_KERNEL_IO_UC_MINUS __pgprot(__PAGE_KERNEL_IO_UC_MINUS)
129#define PAGE_KERNEL_IO_WC __pgprot(__PAGE_KERNEL_IO_WC)
130
131/* xwr */
132#define __P000 PAGE_NONE
133#define __P001 PAGE_READONLY
134#define __P010 PAGE_COPY
135#define __P011 PAGE_COPY
136#define __P100 PAGE_READONLY_EXEC
137#define __P101 PAGE_READONLY_EXEC
138#define __P110 PAGE_COPY_EXEC
139#define __P111 PAGE_COPY_EXEC
140
141#define __S000 PAGE_NONE
142#define __S001 PAGE_READONLY
143#define __S010 PAGE_SHARED
144#define __S011 PAGE_SHARED
145#define __S100 PAGE_READONLY_EXEC
146#define __S101 PAGE_READONLY_EXEC
147#define __S110 PAGE_SHARED_EXEC
148#define __S111 PAGE_SHARED_EXEC
149
150/*
151 * early identity mapping pte attrib macros.
152 */
153#ifdef CONFIG_X86_64
154#define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC
155#else
156/*
157 * For PDE_IDENT_ATTR include USER bit. As the PDE and PTE protection
158 * bits are combined, this will alow user to access the high address mapped
159 * VDSO in the presence of CONFIG_COMPAT_VDSO
160 */
161#define PTE_IDENT_ATTR 0x003 /* PRESENT+RW */
162#define PDE_IDENT_ATTR 0x067 /* PRESENT+RW+USER+DIRTY+ACCESSED */
163#define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
164#endif
165
166#ifdef CONFIG_X86_32
167# include "pgtable_32_types.h"
168#else
169# include "pgtable_64_types.h"
170#endif
171
172#ifndef __ASSEMBLY__
173
174#include <linux/types.h>
175
176typedef struct pgprot { pgprotval_t pgprot; } pgprot_t;
177
178typedef struct { pgdval_t pgd; } pgd_t;
179
180static inline pgd_t native_make_pgd(pgdval_t val)
181{
182 return (pgd_t) { val };
183}
184
185static inline pgdval_t native_pgd_val(pgd_t pgd)
186{
187 return pgd.pgd;
188}
189
190static inline pgdval_t pgd_flags(pgd_t pgd)
191{
192 return native_pgd_val(pgd) & PTE_FLAGS_MASK;
193}
194
195#if PAGETABLE_LEVELS > 3
196typedef struct { pudval_t pud; } pud_t;
197
198static inline pud_t native_make_pud(pmdval_t val)
199{
200 return (pud_t) { val };
201}
202
203static inline pudval_t native_pud_val(pud_t pud)
204{
205 return pud.pud;
206}
207#else
208#include <asm-generic/pgtable-nopud.h>
209
210static inline pudval_t native_pud_val(pud_t pud)
211{
212 return native_pgd_val(pud.pgd);
213}
214#endif
215
216#if PAGETABLE_LEVELS > 2
217typedef struct { pmdval_t pmd; } pmd_t;
218
219static inline pmd_t native_make_pmd(pmdval_t val)
220{
221 return (pmd_t) { val };
222}
223
224static inline pmdval_t native_pmd_val(pmd_t pmd)
225{
226 return pmd.pmd;
227}
228#else
229#include <asm-generic/pgtable-nopmd.h>
230
231static inline pmdval_t native_pmd_val(pmd_t pmd)
232{
233 return native_pgd_val(pmd.pud.pgd);
234}
235#endif
236
237static inline pudval_t pud_flags(pud_t pud)
238{
239 return native_pud_val(pud) & PTE_FLAGS_MASK;
240}
241
242static inline pmdval_t pmd_flags(pmd_t pmd)
243{
244 return native_pmd_val(pmd) & PTE_FLAGS_MASK;
245}
246
247static inline pte_t native_make_pte(pteval_t val)
248{
249 return (pte_t) { .pte = val };
250}
251
252static inline pteval_t native_pte_val(pte_t pte)
253{
254 return pte.pte;
255}
256
257static inline pteval_t pte_flags(pte_t pte)
258{
259 return native_pte_val(pte) & PTE_FLAGS_MASK;
260}
261
262#define pgprot_val(x) ((x).pgprot)
263#define __pgprot(x) ((pgprot_t) { (x) } )
264
265
266typedef struct page *pgtable_t;
267
268extern pteval_t __supported_pte_mask;
269extern int nx_enabled;
270
271#define pgprot_writecombine pgprot_writecombine
272extern pgprot_t pgprot_writecombine(pgprot_t prot);
273
274/* Indicate that x86 has its own track and untrack pfn vma functions */
275#define __HAVE_PFNMAP_TRACKING
276
277#define __HAVE_PHYS_MEM_ACCESS_PROT
278struct file;
279pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
280 unsigned long size, pgprot_t vma_prot);
281int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
282 unsigned long size, pgprot_t *vma_prot);
283
284/* Install a pte for a particular vaddr in kernel space. */
285void set_pte_vaddr(unsigned long vaddr, pte_t pte);
286
287#ifdef CONFIG_X86_32
288extern void native_pagetable_setup_start(pgd_t *base);
289extern void native_pagetable_setup_done(pgd_t *base);
290#else
291static inline void native_pagetable_setup_start(pgd_t *base) {}
292static inline void native_pagetable_setup_done(pgd_t *base) {}
293#endif
294
295struct seq_file;
296extern void arch_report_meminfo(struct seq_file *m);
297
298enum {
299 PG_LEVEL_NONE,
300 PG_LEVEL_4K,
301 PG_LEVEL_2M,
302 PG_LEVEL_1G,
303 PG_LEVEL_NUM
304};
305
306#ifdef CONFIG_PROC_FS
307extern void update_page_count(int level, unsigned long pages);
308#else
309static inline void update_page_count(int level, unsigned long pages) { }
310#endif
311
312/*
313 * Helper function that returns the kernel pagetable entry controlling
314 * the virtual address 'address'. NULL means no pagetable entry present.
315 * NOTE: the return type is pte_t but if the pmd is PSE then we return it
316 * as a pte too.
317 */
318extern pte_t *lookup_address(unsigned long address, unsigned int *level);
319
320#endif /* !__ASSEMBLY__ */
321
322#endif /* _ASM_X86_PGTABLE_DEFS_H */
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index a6643f68fbb1..dabab1a19ddd 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -16,6 +16,7 @@ struct mm_struct;
16#include <asm/cpufeature.h> 16#include <asm/cpufeature.h>
17#include <asm/system.h> 17#include <asm/system.h>
18#include <asm/page.h> 18#include <asm/page.h>
19#include <asm/pgtable_types.h>
19#include <asm/percpu.h> 20#include <asm/percpu.h>
20#include <asm/msr.h> 21#include <asm/msr.h>
21#include <asm/desc_defs.h> 22#include <asm/desc_defs.h>
@@ -393,8 +394,14 @@ union irq_stack_union {
393}; 394};
394 395
395DECLARE_PER_CPU(union irq_stack_union, irq_stack_union); 396DECLARE_PER_CPU(union irq_stack_union, irq_stack_union);
397DECLARE_INIT_PER_CPU(irq_stack_union);
398
396DECLARE_PER_CPU(char *, irq_stack_ptr); 399DECLARE_PER_CPU(char *, irq_stack_ptr);
400#else /* X86_64 */
401#ifdef CONFIG_CC_STACKPROTECTOR
402DECLARE_PER_CPU(unsigned long, stack_canary);
397#endif 403#endif
404#endif /* X86_64 */
398 405
399extern void print_cpu_info(struct cpuinfo_x86 *); 406extern void print_cpu_info(struct cpuinfo_x86 *);
400extern unsigned int xstate_size; 407extern unsigned int xstate_size;
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
index 6d34d954c228..e304b66abeea 100644
--- a/arch/x86/include/asm/ptrace.h
+++ b/arch/x86/include/asm/ptrace.h
@@ -28,7 +28,7 @@ struct pt_regs {
28 int xds; 28 int xds;
29 int xes; 29 int xes;
30 int xfs; 30 int xfs;
31 /* int gs; */ 31 int xgs;
32 long orig_eax; 32 long orig_eax;
33 long eip; 33 long eip;
34 int xcs; 34 int xcs;
@@ -50,7 +50,7 @@ struct pt_regs {
50 unsigned long ds; 50 unsigned long ds;
51 unsigned long es; 51 unsigned long es;
52 unsigned long fs; 52 unsigned long fs;
53 /* int gs; */ 53 unsigned long gs;
54 unsigned long orig_ax; 54 unsigned long orig_ax;
55 unsigned long ip; 55 unsigned long ip;
56 unsigned long cs; 56 unsigned long cs;
diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
index 1dc1b51ac623..14e0ed86a6f9 100644
--- a/arch/x86/include/asm/segment.h
+++ b/arch/x86/include/asm/segment.h
@@ -61,7 +61,7 @@
61 * 61 *
62 * 26 - ESPFIX small SS 62 * 26 - ESPFIX small SS
63 * 27 - per-cpu [ offset to per-cpu data area ] 63 * 27 - per-cpu [ offset to per-cpu data area ]
64 * 28 - unused 64 * 28 - stack_canary-20 [ for stack protector ]
65 * 29 - unused 65 * 29 - unused
66 * 30 - unused 66 * 30 - unused
67 * 31 - TSS for double fault handler 67 * 31 - TSS for double fault handler
@@ -95,6 +95,13 @@
95#define __KERNEL_PERCPU 0 95#define __KERNEL_PERCPU 0
96#endif 96#endif
97 97
98#define GDT_ENTRY_STACK_CANARY (GDT_ENTRY_KERNEL_BASE + 16)
99#ifdef CONFIG_CC_STACKPROTECTOR
100#define __KERNEL_STACK_CANARY (GDT_ENTRY_STACK_CANARY * 8)
101#else
102#define __KERNEL_STACK_CANARY 0
103#endif
104
98#define GDT_ENTRY_DOUBLEFAULT_TSS 31 105#define GDT_ENTRY_DOUBLEFAULT_TSS 31
99 106
100/* 107/*
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 45b40278b582..c230189462a2 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -7,21 +7,6 @@
7 7
8#ifndef __ASSEMBLY__ 8#ifndef __ASSEMBLY__
9 9
10/* Interrupt control for vSMPowered x86_64 systems */
11void vsmp_init(void);
12
13void setup_bios_corruption_check(void);
14
15#ifdef CONFIG_X86_VISWS
16extern void visws_early_detect(void);
17extern int is_visws_box(void);
18#else
19static inline void visws_early_detect(void) { }
20static inline int is_visws_box(void) { return 0; }
21#endif
22
23extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
24extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
25/* 10/*
26 * Any setup quirks to be performed? 11 * Any setup quirks to be performed?
27 */ 12 */
@@ -48,12 +33,6 @@ struct x86_quirks {
48 int (*update_genapic)(void); 33 int (*update_genapic)(void);
49}; 34};
50 35
51extern struct x86_quirks *x86_quirks;
52extern unsigned long saved_video_mode;
53
54#ifndef CONFIG_PARAVIRT
55#define paravirt_post_allocator_init() do {} while (0)
56#endif
57#endif /* __ASSEMBLY__ */ 36#endif /* __ASSEMBLY__ */
58 37
59#ifdef __i386__ 38#ifdef __i386__
@@ -76,6 +55,28 @@ extern unsigned long saved_video_mode;
76#ifndef __ASSEMBLY__ 55#ifndef __ASSEMBLY__
77#include <asm/bootparam.h> 56#include <asm/bootparam.h>
78 57
58/* Interrupt control for vSMPowered x86_64 systems */
59void vsmp_init(void);
60
61void setup_bios_corruption_check(void);
62
63#ifdef CONFIG_X86_VISWS
64extern void visws_early_detect(void);
65extern int is_visws_box(void);
66#else
67static inline void visws_early_detect(void) { }
68static inline int is_visws_box(void) { return 0; }
69#endif
70
71extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
72extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
73extern struct x86_quirks *x86_quirks;
74extern unsigned long saved_video_mode;
75
76#ifndef CONFIG_PARAVIRT
77#define paravirt_post_allocator_init() do {} while (0)
78#endif
79
79#ifndef _SETUP 80#ifndef _SETUP
80 81
81/* 82/*
diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h
index 36a700acaf2b..c2d742c6e15f 100644
--- a/arch/x86/include/asm/stackprotector.h
+++ b/arch/x86/include/asm/stackprotector.h
@@ -1,8 +1,54 @@
1/*
2 * GCC stack protector support.
3 *
4 * Stack protector works by putting predefined pattern at the start of
5 * the stack frame and verifying that it hasn't been overwritten when
6 * returning from the function. The pattern is called stack canary
7 * and unfortunately gcc requires it to be at a fixed offset from %gs.
8 * On x86_64, the offset is 40 bytes and on x86_32 20 bytes. x86_64
9 * and x86_32 use segment registers differently and thus handles this
10 * requirement differently.
11 *
12 * On x86_64, %gs is shared by percpu area and stack canary. All
13 * percpu symbols are zero based and %gs points to the base of percpu
14 * area. The first occupant of the percpu area is always
15 * irq_stack_union which contains stack_canary at offset 40. Userland
16 * %gs is always saved and restored on kernel entry and exit using
17 * swapgs, so stack protector doesn't add any complexity there.
18 *
19 * On x86_32, it's slightly more complicated. As in x86_64, %gs is
20 * used for userland TLS. Unfortunately, some processors are much
21 * slower at loading segment registers with different value when
22 * entering and leaving the kernel, so the kernel uses %fs for percpu
23 * area and manages %gs lazily so that %gs is switched only when
24 * necessary, usually during task switch.
25 *
26 * As gcc requires the stack canary at %gs:20, %gs can't be managed
27 * lazily if stack protector is enabled, so the kernel saves and
28 * restores userland %gs on kernel entry and exit. This behavior is
29 * controlled by CONFIG_X86_32_LAZY_GS and accessors are defined in
30 * system.h to hide the details.
31 */
32
1#ifndef _ASM_STACKPROTECTOR_H 33#ifndef _ASM_STACKPROTECTOR_H
2#define _ASM_STACKPROTECTOR_H 1 34#define _ASM_STACKPROTECTOR_H 1
3 35
36#ifdef CONFIG_CC_STACKPROTECTOR
37
4#include <asm/tsc.h> 38#include <asm/tsc.h>
5#include <asm/processor.h> 39#include <asm/processor.h>
40#include <asm/percpu.h>
41#include <asm/system.h>
42#include <asm/desc.h>
43#include <linux/random.h>
44
45/*
46 * 24 byte read-only segment initializer for stack canary. Linker
47 * can't handle the address bit shifting. Address will be set in
48 * head_32 for boot CPU and setup_per_cpu_areas() for others.
49 */
50#define GDT_STACK_CANARY_INIT \
51 [GDT_ENTRY_STACK_CANARY] = { { { 0x00000018, 0x00409000 } } },
6 52
7/* 53/*
8 * Initialize the stackprotector canary value. 54 * Initialize the stackprotector canary value.
@@ -15,12 +61,9 @@ static __always_inline void boot_init_stack_canary(void)
15 u64 canary; 61 u64 canary;
16 u64 tsc; 62 u64 tsc;
17 63
18 /* 64#ifdef CONFIG_X86_64
19 * Build time only check to make sure the stack_canary is at
20 * offset 40 in the pda; this is a gcc ABI requirement
21 */
22 BUILD_BUG_ON(offsetof(union irq_stack_union, stack_canary) != 40); 65 BUILD_BUG_ON(offsetof(union irq_stack_union, stack_canary) != 40);
23 66#endif
24 /* 67 /*
25 * We both use the random pool and the current TSC as a source 68 * We both use the random pool and the current TSC as a source
26 * of randomness. The TSC only matters for very early init, 69 * of randomness. The TSC only matters for very early init,
@@ -32,7 +75,50 @@ static __always_inline void boot_init_stack_canary(void)
32 canary += tsc + (tsc << 32UL); 75 canary += tsc + (tsc << 32UL);
33 76
34 current->stack_canary = canary; 77 current->stack_canary = canary;
78#ifdef CONFIG_X86_64
35 percpu_write(irq_stack_union.stack_canary, canary); 79 percpu_write(irq_stack_union.stack_canary, canary);
80#else
81 percpu_write(stack_canary, canary);
82#endif
36} 83}
37 84
85static inline void setup_stack_canary_segment(int cpu)
86{
87#ifdef CONFIG_X86_32
88 unsigned long canary = (unsigned long)&per_cpu(stack_canary, cpu) - 20;
89 struct desc_struct *gdt_table = get_cpu_gdt_table(cpu);
90 struct desc_struct desc;
91
92 desc = gdt_table[GDT_ENTRY_STACK_CANARY];
93 desc.base0 = canary & 0xffff;
94 desc.base1 = (canary >> 16) & 0xff;
95 desc.base2 = (canary >> 24) & 0xff;
96 write_gdt_entry(gdt_table, GDT_ENTRY_STACK_CANARY, &desc, DESCTYPE_S);
97#endif
98}
99
100static inline void load_stack_canary_segment(void)
101{
102#ifdef CONFIG_X86_32
103 asm("mov %0, %%gs" : : "r" (__KERNEL_STACK_CANARY) : "memory");
104#endif
105}
106
107#else /* CC_STACKPROTECTOR */
108
109#define GDT_STACK_CANARY_INIT
110
111/* dummy boot_init_stack_canary() is defined in linux/stackprotector.h */
112
113static inline void setup_stack_canary_segment(int cpu)
114{ }
115
116static inline void load_stack_canary_segment(void)
117{
118#ifdef CONFIG_X86_32
119 asm volatile ("mov %0, %%gs" : : "r" (0));
38#endif 120#endif
121}
122
123#endif /* CC_STACKPROTECTOR */
124#endif /* _ASM_STACKPROTECTOR_H */
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
index c0b0bda754ee..258ef730aaa4 100644
--- a/arch/x86/include/asm/syscalls.h
+++ b/arch/x86/include/asm/syscalls.h
@@ -29,21 +29,21 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *);
29/* X86_32 only */ 29/* X86_32 only */
30#ifdef CONFIG_X86_32 30#ifdef CONFIG_X86_32
31/* kernel/process_32.c */ 31/* kernel/process_32.c */
32asmlinkage int sys_fork(struct pt_regs); 32int sys_fork(struct pt_regs *);
33asmlinkage int sys_clone(struct pt_regs); 33int sys_clone(struct pt_regs *);
34asmlinkage int sys_vfork(struct pt_regs); 34int sys_vfork(struct pt_regs *);
35asmlinkage int sys_execve(struct pt_regs); 35int sys_execve(struct pt_regs *);
36 36
37/* kernel/signal_32.c */ 37/* kernel/signal_32.c */
38asmlinkage int sys_sigsuspend(int, int, old_sigset_t); 38asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
39asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, 39asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
40 struct old_sigaction __user *); 40 struct old_sigaction __user *);
41asmlinkage int sys_sigaltstack(unsigned long); 41int sys_sigaltstack(struct pt_regs *);
42asmlinkage unsigned long sys_sigreturn(unsigned long); 42unsigned long sys_sigreturn(struct pt_regs *);
43asmlinkage int sys_rt_sigreturn(unsigned long); 43long sys_rt_sigreturn(struct pt_regs *);
44 44
45/* kernel/ioport.c */ 45/* kernel/ioport.c */
46asmlinkage long sys_iopl(unsigned long); 46long sys_iopl(struct pt_regs *);
47 47
48/* kernel/sys_i386_32.c */ 48/* kernel/sys_i386_32.c */
49asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, 49asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
@@ -59,8 +59,8 @@ struct oldold_utsname;
59asmlinkage int sys_olduname(struct oldold_utsname __user *); 59asmlinkage int sys_olduname(struct oldold_utsname __user *);
60 60
61/* kernel/vm86_32.c */ 61/* kernel/vm86_32.c */
62asmlinkage int sys_vm86old(struct pt_regs); 62int sys_vm86old(struct pt_regs *);
63asmlinkage int sys_vm86(struct pt_regs); 63int sys_vm86(struct pt_regs *);
64 64
65#else /* CONFIG_X86_32 */ 65#else /* CONFIG_X86_32 */
66 66
@@ -74,6 +74,7 @@ asmlinkage long sys_vfork(struct pt_regs *);
74asmlinkage long sys_execve(char __user *, char __user * __user *, 74asmlinkage long sys_execve(char __user *, char __user * __user *,
75 char __user * __user *, 75 char __user * __user *,
76 struct pt_regs *); 76 struct pt_regs *);
77long sys_arch_prctl(int, unsigned long);
77 78
78/* kernel/ioport.c */ 79/* kernel/ioport.c */
79asmlinkage long sys_iopl(unsigned int, struct pt_regs *); 80asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
index c22383743f36..c00bfdbdd456 100644
--- a/arch/x86/include/asm/system.h
+++ b/arch/x86/include/asm/system.h
@@ -23,6 +23,20 @@ struct task_struct *__switch_to(struct task_struct *prev,
23 23
24#ifdef CONFIG_X86_32 24#ifdef CONFIG_X86_32
25 25
26#ifdef CONFIG_CC_STACKPROTECTOR
27#define __switch_canary \
28 "movl %P[task_canary](%[next]), %%ebx\n\t" \
29 "movl %%ebx, "__percpu_arg([stack_canary])"\n\t"
30#define __switch_canary_oparam \
31 , [stack_canary] "=m" (per_cpu_var(stack_canary))
32#define __switch_canary_iparam \
33 , [task_canary] "i" (offsetof(struct task_struct, stack_canary))
34#else /* CC_STACKPROTECTOR */
35#define __switch_canary
36#define __switch_canary_oparam
37#define __switch_canary_iparam
38#endif /* CC_STACKPROTECTOR */
39
26/* 40/*
27 * Saving eflags is important. It switches not only IOPL between tasks, 41 * Saving eflags is important. It switches not only IOPL between tasks,
28 * it also protects other tasks from NT leaking through sysenter etc. 42 * it also protects other tasks from NT leaking through sysenter etc.
@@ -44,6 +58,7 @@ do { \
44 "movl %[next_sp],%%esp\n\t" /* restore ESP */ \ 58 "movl %[next_sp],%%esp\n\t" /* restore ESP */ \
45 "movl $1f,%[prev_ip]\n\t" /* save EIP */ \ 59 "movl $1f,%[prev_ip]\n\t" /* save EIP */ \
46 "pushl %[next_ip]\n\t" /* restore EIP */ \ 60 "pushl %[next_ip]\n\t" /* restore EIP */ \
61 __switch_canary \
47 "jmp __switch_to\n" /* regparm call */ \ 62 "jmp __switch_to\n" /* regparm call */ \
48 "1:\t" \ 63 "1:\t" \
49 "popl %%ebp\n\t" /* restore EBP */ \ 64 "popl %%ebp\n\t" /* restore EBP */ \
@@ -58,6 +73,8 @@ do { \
58 "=b" (ebx), "=c" (ecx), "=d" (edx), \ 73 "=b" (ebx), "=c" (ecx), "=d" (edx), \
59 "=S" (esi), "=D" (edi) \ 74 "=S" (esi), "=D" (edi) \
60 \ 75 \
76 __switch_canary_oparam \
77 \
61 /* input parameters: */ \ 78 /* input parameters: */ \
62 : [next_sp] "m" (next->thread.sp), \ 79 : [next_sp] "m" (next->thread.sp), \
63 [next_ip] "m" (next->thread.ip), \ 80 [next_ip] "m" (next->thread.ip), \
@@ -66,6 +83,8 @@ do { \
66 [prev] "a" (prev), \ 83 [prev] "a" (prev), \
67 [next] "d" (next) \ 84 [next] "d" (next) \
68 \ 85 \
86 __switch_canary_iparam \
87 \
69 : /* reloaded segment registers */ \ 88 : /* reloaded segment registers */ \
70 "memory"); \ 89 "memory"); \
71} while (0) 90} while (0)
@@ -182,6 +201,25 @@ extern void native_load_gs_index(unsigned);
182#define savesegment(seg, value) \ 201#define savesegment(seg, value) \
183 asm("mov %%" #seg ",%0":"=r" (value) : : "memory") 202 asm("mov %%" #seg ",%0":"=r" (value) : : "memory")
184 203
204/*
205 * x86_32 user gs accessors.
206 */
207#ifdef CONFIG_X86_32
208#ifdef CONFIG_X86_32_LAZY_GS
209#define get_user_gs(regs) (u16)({unsigned long v; savesegment(gs, v); v;})
210#define set_user_gs(regs, v) loadsegment(gs, (unsigned long)(v))
211#define task_user_gs(tsk) ((tsk)->thread.gs)
212#define lazy_save_gs(v) savesegment(gs, (v))
213#define lazy_load_gs(v) loadsegment(gs, (v))
214#else /* X86_32_LAZY_GS */
215#define get_user_gs(regs) (u16)((regs)->gs)
216#define set_user_gs(regs, v) do { (regs)->gs = (v); } while (0)
217#define task_user_gs(tsk) (task_pt_regs(tsk)->gs)
218#define lazy_save_gs(v) do { } while (0)
219#define lazy_load_gs(v) do { } while (0)
220#endif /* X86_32_LAZY_GS */
221#endif /* X86_32 */
222
185static inline unsigned long get_limit(unsigned long segment) 223static inline unsigned long get_limit(unsigned long segment)
186{ 224{
187 unsigned long __limit; 225 unsigned long __limit;
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
index cf3bb053da0b..0d5342515b86 100644
--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -41,7 +41,7 @@ dotraplinkage void do_int3(struct pt_regs *, long);
41dotraplinkage void do_overflow(struct pt_regs *, long); 41dotraplinkage void do_overflow(struct pt_regs *, long);
42dotraplinkage void do_bounds(struct pt_regs *, long); 42dotraplinkage void do_bounds(struct pt_regs *, long);
43dotraplinkage void do_invalid_op(struct pt_regs *, long); 43dotraplinkage void do_invalid_op(struct pt_regs *, long);
44dotraplinkage void do_device_not_available(struct pt_regs); 44dotraplinkage void do_device_not_available(struct pt_regs *, long);
45dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long); 45dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long);
46dotraplinkage void do_invalid_TSS(struct pt_regs *, long); 46dotraplinkage void do_invalid_TSS(struct pt_regs *, long);
47dotraplinkage void do_segment_not_present(struct pt_regs *, long); 47dotraplinkage void do_segment_not_present(struct pt_regs *, long);
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 0ec6de4bcb0b..b685ece89d5c 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -186,7 +186,7 @@ extern int __get_user_bad(void);
186 186
187 187
188#ifdef CONFIG_X86_32 188#ifdef CONFIG_X86_32
189#define __put_user_asm_u64(x, addr, err) \ 189#define __put_user_asm_u64(x, addr, err, errret) \
190 asm volatile("1: movl %%eax,0(%2)\n" \ 190 asm volatile("1: movl %%eax,0(%2)\n" \
191 "2: movl %%edx,4(%2)\n" \ 191 "2: movl %%edx,4(%2)\n" \
192 "3:\n" \ 192 "3:\n" \
@@ -197,7 +197,7 @@ extern int __get_user_bad(void);
197 _ASM_EXTABLE(1b, 4b) \ 197 _ASM_EXTABLE(1b, 4b) \
198 _ASM_EXTABLE(2b, 4b) \ 198 _ASM_EXTABLE(2b, 4b) \
199 : "=r" (err) \ 199 : "=r" (err) \
200 : "A" (x), "r" (addr), "i" (-EFAULT), "0" (err)) 200 : "A" (x), "r" (addr), "i" (errret), "0" (err))
201 201
202#define __put_user_asm_ex_u64(x, addr) \ 202#define __put_user_asm_ex_u64(x, addr) \
203 asm volatile("1: movl %%eax,0(%1)\n" \ 203 asm volatile("1: movl %%eax,0(%1)\n" \
@@ -211,8 +211,8 @@ extern int __get_user_bad(void);
211 asm volatile("call __put_user_8" : "=a" (__ret_pu) \ 211 asm volatile("call __put_user_8" : "=a" (__ret_pu) \
212 : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") 212 : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
213#else 213#else
214#define __put_user_asm_u64(x, ptr, retval) \ 214#define __put_user_asm_u64(x, ptr, retval, errret) \
215 __put_user_asm(x, ptr, retval, "q", "", "Zr", -EFAULT) 215 __put_user_asm(x, ptr, retval, "q", "", "Zr", errret)
216#define __put_user_asm_ex_u64(x, addr) \ 216#define __put_user_asm_ex_u64(x, addr) \
217 __put_user_asm_ex(x, addr, "q", "", "Zr") 217 __put_user_asm_ex(x, addr, "q", "", "Zr")
218#define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu) 218#define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu)
@@ -289,7 +289,8 @@ do { \
289 __put_user_asm(x, ptr, retval, "l", "k", "ir", errret); \ 289 __put_user_asm(x, ptr, retval, "l", "k", "ir", errret); \
290 break; \ 290 break; \
291 case 8: \ 291 case 8: \
292 __put_user_asm_u64((__typeof__(*ptr))(x), ptr, retval); \ 292 __put_user_asm_u64((__typeof__(*ptr))(x), ptr, retval, \
293 errret); \
293 break; \ 294 break; \
294 default: \ 295 default: \
295 __put_user_bad(); \ 296 __put_user_bad(); \
@@ -525,8 +526,6 @@ struct __large_struct { unsigned long buf[100]; };
525 */ 526 */
526#define get_user_try uaccess_try 527#define get_user_try uaccess_try
527#define get_user_catch(err) uaccess_catch(err) 528#define get_user_catch(err) uaccess_catch(err)
528#define put_user_try uaccess_try
529#define put_user_catch(err) uaccess_catch(err)
530 529
531#define get_user_ex(x, ptr) do { \ 530#define get_user_ex(x, ptr) do { \
532 unsigned long __gue_val; \ 531 unsigned long __gue_val; \
@@ -534,9 +533,29 @@ struct __large_struct { unsigned long buf[100]; };
534 (x) = (__force __typeof__(*(ptr)))__gue_val; \ 533 (x) = (__force __typeof__(*(ptr)))__gue_val; \
535} while (0) 534} while (0)
536 535
536#ifdef CONFIG_X86_WP_WORKS_OK
537
538#define put_user_try uaccess_try
539#define put_user_catch(err) uaccess_catch(err)
540
537#define put_user_ex(x, ptr) \ 541#define put_user_ex(x, ptr) \
538 __put_user_size_ex((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr))) 542 __put_user_size_ex((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
539 543
544#else /* !CONFIG_X86_WP_WORKS_OK */
545
546#define put_user_try do { \
547 int __uaccess_err = 0;
548
549#define put_user_catch(err) \
550 (err) |= __uaccess_err; \
551} while (0)
552
553#define put_user_ex(x, ptr) do { \
554 __uaccess_err |= __put_user(x, ptr); \
555} while (0)
556
557#endif /* CONFIG_X86_WP_WORKS_OK */
558
540/* 559/*
541 * movsl can be slow when source and dest are not both 8-byte aligned 560 * movsl can be slow when source and dest are not both 8-byte aligned
542 */ 561 */
diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h
index 8ac1d7e312f3..8242bf965812 100644
--- a/arch/x86/include/asm/uv/uv.h
+++ b/arch/x86/include/asm/uv/uv.h
@@ -3,6 +3,9 @@
3 3
4enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC}; 4enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
5 5
6struct cpumask;
7struct mm_struct;
8
6#ifdef CONFIG_X86_UV 9#ifdef CONFIG_X86_UV
7 10
8extern enum uv_system_type get_uv_system_type(void); 11extern enum uv_system_type get_uv_system_type(void);
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h
index 81fbd735aec4..d5b7e90c0edf 100644
--- a/arch/x86/include/asm/xen/hypervisor.h
+++ b/arch/x86/include/asm/xen/hypervisor.h
@@ -38,22 +38,30 @@ extern struct shared_info *HYPERVISOR_shared_info;
38extern struct start_info *xen_start_info; 38extern struct start_info *xen_start_info;
39 39
40enum xen_domain_type { 40enum xen_domain_type {
41 XEN_NATIVE, 41 XEN_NATIVE, /* running on bare hardware */
42 XEN_PV_DOMAIN, 42 XEN_PV_DOMAIN, /* running in a PV domain */
43 XEN_HVM_DOMAIN, 43 XEN_HVM_DOMAIN, /* running in a Xen hvm domain */
44}; 44};
45 45
46extern enum xen_domain_type xen_domain_type;
47
48#ifdef CONFIG_XEN 46#ifdef CONFIG_XEN
49#define xen_domain() (xen_domain_type != XEN_NATIVE) 47extern enum xen_domain_type xen_domain_type;
50#else 48#else
51#define xen_domain() (0) 49#define xen_domain_type XEN_NATIVE
52#endif 50#endif
53 51
54#define xen_pv_domain() (xen_domain() && xen_domain_type == XEN_PV_DOMAIN) 52#define xen_domain() (xen_domain_type != XEN_NATIVE)
55#define xen_hvm_domain() (xen_domain() && xen_domain_type == XEN_HVM_DOMAIN) 53#define xen_pv_domain() (xen_domain() && \
54 xen_domain_type == XEN_PV_DOMAIN)
55#define xen_hvm_domain() (xen_domain() && \
56 xen_domain_type == XEN_HVM_DOMAIN)
57
58#ifdef CONFIG_XEN_DOM0
59#include <xen/interface/xen.h>
56 60
57#define xen_initial_domain() (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN) 61#define xen_initial_domain() (xen_pv_domain() && \
62 xen_start_info->flags & SIF_INITDOMAIN)
63#else /* !CONFIG_XEN_DOM0 */
64#define xen_initial_domain() (0)
65#endif /* CONFIG_XEN_DOM0 */
58 66
59#endif /* _ASM_X86_XEN_HYPERVISOR_H */ 67#endif /* _ASM_X86_XEN_HYPERVISOR_H */
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index bba162c81d5b..956c1dee6fbe 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -108,35 +108,18 @@ enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC;
108 */ 108 */
109char *__init __acpi_map_table(unsigned long phys, unsigned long size) 109char *__init __acpi_map_table(unsigned long phys, unsigned long size)
110{ 110{
111 unsigned long base, offset, mapped_size;
112 int idx;
113 111
114 if (!phys || !size) 112 if (!phys || !size)
115 return NULL; 113 return NULL;
116 114
117 if (phys+size <= (max_low_pfn_mapped << PAGE_SHIFT)) 115 return early_ioremap(phys, size);
118 return __va(phys); 116}
119 117void __init __acpi_unmap_table(char *map, unsigned long size)
120 offset = phys & (PAGE_SIZE - 1); 118{
121 mapped_size = PAGE_SIZE - offset; 119 if (!map || !size)
122 clear_fixmap(FIX_ACPI_END); 120 return;
123 set_fixmap(FIX_ACPI_END, phys);
124 base = fix_to_virt(FIX_ACPI_END);
125
126 /*
127 * Most cases can be covered by the below.
128 */
129 idx = FIX_ACPI_END;
130 while (mapped_size < size) {
131 if (--idx < FIX_ACPI_BEGIN)
132 return NULL; /* cannot handle this */
133 phys += PAGE_SIZE;
134 clear_fixmap(idx);
135 set_fixmap(idx, phys);
136 mapped_size += PAGE_SIZE;
137 }
138 121
139 return ((unsigned char *)base + offset); 122 early_iounmap(map, size);
140} 123}
141 124
142#ifdef CONFIG_PCI_MMCONFIG 125#ifdef CONFIG_PCI_MMCONFIG
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index c03f4cc135c7..a894eea9d51a 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -555,7 +555,8 @@ static void __init lapic_cal_handler(struct clock_event_device *dev)
555 } 555 }
556} 556}
557 557
558static int __init calibrate_by_pmtimer(long deltapm, long *delta) 558static int __init
559calibrate_by_pmtimer(long deltapm, long *delta, long *deltatsc)
559{ 560{
560 const long pm_100ms = PMTMR_TICKS_PER_SEC / 10; 561 const long pm_100ms = PMTMR_TICKS_PER_SEC / 10;
561 const long pm_thresh = pm_100ms / 100; 562 const long pm_thresh = pm_100ms / 100;
@@ -566,7 +567,7 @@ static int __init calibrate_by_pmtimer(long deltapm, long *delta)
566 return -1; 567 return -1;
567#endif 568#endif
568 569
569 apic_printk(APIC_VERBOSE, "... PM timer delta = %ld\n", deltapm); 570 apic_printk(APIC_VERBOSE, "... PM-Timer delta = %ld\n", deltapm);
570 571
571 /* Check, if the PM timer is available */ 572 /* Check, if the PM timer is available */
572 if (!deltapm) 573 if (!deltapm)
@@ -576,19 +577,30 @@ static int __init calibrate_by_pmtimer(long deltapm, long *delta)
576 577
577 if (deltapm > (pm_100ms - pm_thresh) && 578 if (deltapm > (pm_100ms - pm_thresh) &&
578 deltapm < (pm_100ms + pm_thresh)) { 579 deltapm < (pm_100ms + pm_thresh)) {
579 apic_printk(APIC_VERBOSE, "... PM timer result ok\n"); 580 apic_printk(APIC_VERBOSE, "... PM-Timer result ok\n");
580 } else { 581 return 0;
581 res = (((u64)deltapm) * mult) >> 22; 582 }
582 do_div(res, 1000000); 583
583 pr_warning("APIC calibration not consistent " 584 res = (((u64)deltapm) * mult) >> 22;
584 "with PM Timer: %ldms instead of 100ms\n", 585 do_div(res, 1000000);
585 (long)res); 586 pr_warning("APIC calibration not consistent "
586 /* Correct the lapic counter value */ 587 "with PM-Timer: %ldms instead of 100ms\n",(long)res);
587 res = (((u64)(*delta)) * pm_100ms); 588
589 /* Correct the lapic counter value */
590 res = (((u64)(*delta)) * pm_100ms);
591 do_div(res, deltapm);
592 pr_info("APIC delta adjusted to PM-Timer: "
593 "%lu (%ld)\n", (unsigned long)res, *delta);
594 *delta = (long)res;
595
596 /* Correct the tsc counter value */
597 if (cpu_has_tsc) {
598 res = (((u64)(*deltatsc)) * pm_100ms);
588 do_div(res, deltapm); 599 do_div(res, deltapm);
589 pr_info("APIC delta adjusted to PM-Timer: " 600 apic_printk(APIC_VERBOSE, "TSC delta adjusted to "
590 "%lu (%ld)\n", (unsigned long)res, *delta); 601 "PM-Timer: %lu (%ld) \n",
591 *delta = (long)res; 602 (unsigned long)res, *deltatsc);
603 *deltatsc = (long)res;
592 } 604 }
593 605
594 return 0; 606 return 0;
@@ -599,7 +611,7 @@ static int __init calibrate_APIC_clock(void)
599 struct clock_event_device *levt = &__get_cpu_var(lapic_events); 611 struct clock_event_device *levt = &__get_cpu_var(lapic_events);
600 void (*real_handler)(struct clock_event_device *dev); 612 void (*real_handler)(struct clock_event_device *dev);
601 unsigned long deltaj; 613 unsigned long deltaj;
602 long delta; 614 long delta, deltatsc;
603 int pm_referenced = 0; 615 int pm_referenced = 0;
604 616
605 local_irq_disable(); 617 local_irq_disable();
@@ -629,9 +641,11 @@ static int __init calibrate_APIC_clock(void)
629 delta = lapic_cal_t1 - lapic_cal_t2; 641 delta = lapic_cal_t1 - lapic_cal_t2;
630 apic_printk(APIC_VERBOSE, "... lapic delta = %ld\n", delta); 642 apic_printk(APIC_VERBOSE, "... lapic delta = %ld\n", delta);
631 643
644 deltatsc = (long)(lapic_cal_tsc2 - lapic_cal_tsc1);
645
632 /* we trust the PM based calibration if possible */ 646 /* we trust the PM based calibration if possible */
633 pm_referenced = !calibrate_by_pmtimer(lapic_cal_pm2 - lapic_cal_pm1, 647 pm_referenced = !calibrate_by_pmtimer(lapic_cal_pm2 - lapic_cal_pm1,
634 &delta); 648 &delta, &deltatsc);
635 649
636 /* Calculate the scaled math multiplication factor */ 650 /* Calculate the scaled math multiplication factor */
637 lapic_clockevent.mult = div_sc(delta, TICK_NSEC * LAPIC_CAL_LOOPS, 651 lapic_clockevent.mult = div_sc(delta, TICK_NSEC * LAPIC_CAL_LOOPS,
@@ -649,11 +663,10 @@ static int __init calibrate_APIC_clock(void)
649 calibration_result); 663 calibration_result);
650 664
651 if (cpu_has_tsc) { 665 if (cpu_has_tsc) {
652 delta = (long)(lapic_cal_tsc2 - lapic_cal_tsc1);
653 apic_printk(APIC_VERBOSE, "..... CPU clock speed is " 666 apic_printk(APIC_VERBOSE, "..... CPU clock speed is "
654 "%ld.%04ld MHz.\n", 667 "%ld.%04ld MHz.\n",
655 (delta / LAPIC_CAL_LOOPS) / (1000000 / HZ), 668 (deltatsc / LAPIC_CAL_LOOPS) / (1000000 / HZ),
656 (delta / LAPIC_CAL_LOOPS) % (1000000 / HZ)); 669 (deltatsc / LAPIC_CAL_LOOPS) % (1000000 / HZ));
657 } 670 }
658 671
659 apic_printk(APIC_VERBOSE, "..... host bus clock speed is " 672 apic_printk(APIC_VERBOSE, "..... host bus clock speed is "
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
index ee4df08feee6..fbf2f33e3080 100644
--- a/arch/x86/kernel/asm-offsets_32.c
+++ b/arch/x86/kernel/asm-offsets_32.c
@@ -75,6 +75,7 @@ void foo(void)
75 OFFSET(PT_DS, pt_regs, ds); 75 OFFSET(PT_DS, pt_regs, ds);
76 OFFSET(PT_ES, pt_regs, es); 76 OFFSET(PT_ES, pt_regs, es);
77 OFFSET(PT_FS, pt_regs, fs); 77 OFFSET(PT_FS, pt_regs, fs);
78 OFFSET(PT_GS, pt_regs, gs);
78 OFFSET(PT_ORIG_EAX, pt_regs, orig_ax); 79 OFFSET(PT_ORIG_EAX, pt_regs, orig_ax);
79 OFFSET(PT_EIP, pt_regs, ip); 80 OFFSET(PT_EIP, pt_regs, ip);
80 OFFSET(PT_CS, pt_regs, cs); 81 OFFSET(PT_CS, pt_regs, cs);
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index cbcdb796d47f..4db150ed446d 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -39,6 +39,7 @@
39#include <asm/sections.h> 39#include <asm/sections.h>
40#include <asm/setup.h> 40#include <asm/setup.h>
41#include <asm/hypervisor.h> 41#include <asm/hypervisor.h>
42#include <asm/stackprotector.h>
42 43
43#include "cpu.h" 44#include "cpu.h"
44 45
@@ -122,6 +123,7 @@ DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
122 123
123 [GDT_ENTRY_ESPFIX_SS] = { { { 0x00000000, 0x00c09200 } } }, 124 [GDT_ENTRY_ESPFIX_SS] = { { { 0x00000000, 0x00c09200 } } },
124 [GDT_ENTRY_PERCPU] = { { { 0x0000ffff, 0x00cf9200 } } }, 125 [GDT_ENTRY_PERCPU] = { { { 0x0000ffff, 0x00cf9200 } } },
126 GDT_STACK_CANARY_INIT
125#endif 127#endif
126} }; 128} };
127EXPORT_PER_CPU_SYMBOL_GPL(gdt_page); 129EXPORT_PER_CPU_SYMBOL_GPL(gdt_page);
@@ -252,9 +254,9 @@ static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn)
252 * signs here... 254 * signs here...
253 */ 255 */
254 if (cpu_has(c, df->feature) && 256 if (cpu_has(c, df->feature) &&
255 ((s32)df->feature < 0 ? 257 ((s32)df->level < 0 ?
256 (u32)df->feature > (u32)c->extended_cpuid_level : 258 (u32)df->level > (u32)c->extended_cpuid_level :
257 (s32)df->feature > (s32)c->cpuid_level)) { 259 (s32)df->level > (s32)c->cpuid_level)) {
258 clear_cpu_cap(c, df->feature); 260 clear_cpu_cap(c, df->feature);
259 if (warn) 261 if (warn)
260 printk(KERN_WARNING 262 printk(KERN_WARNING
@@ -264,7 +266,7 @@ static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn)
264 df->level); 266 df->level);
265 } 267 }
266 } 268 }
267} 269}
268 270
269/* 271/*
270 * Naming convention should be: <Name> [(<Codename>)] 272 * Naming convention should be: <Name> [(<Codename>)]
@@ -304,6 +306,7 @@ void load_percpu_segment(int cpu)
304 loadsegment(gs, 0); 306 loadsegment(gs, 0);
305 wrmsrl(MSR_GS_BASE, (unsigned long)per_cpu(irq_stack_union.gs_base, cpu)); 307 wrmsrl(MSR_GS_BASE, (unsigned long)per_cpu(irq_stack_union.gs_base, cpu));
306#endif 308#endif
309 load_stack_canary_segment();
307} 310}
308 311
309/* Current gdt points %fs at the "master" per-cpu area: after this, 312/* Current gdt points %fs at the "master" per-cpu area: after this,
@@ -938,12 +941,8 @@ struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
938 941
939DEFINE_PER_CPU_FIRST(union irq_stack_union, 942DEFINE_PER_CPU_FIRST(union irq_stack_union,
940 irq_stack_union) __aligned(PAGE_SIZE); 943 irq_stack_union) __aligned(PAGE_SIZE);
941#ifdef CONFIG_SMP
942DEFINE_PER_CPU(char *, irq_stack_ptr); /* will be set during per cpu init */
943#else
944DEFINE_PER_CPU(char *, irq_stack_ptr) = 944DEFINE_PER_CPU(char *, irq_stack_ptr) =
945 per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64; 945 init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64;
946#endif
947 946
948DEFINE_PER_CPU(unsigned long, kernel_stack) = 947DEFINE_PER_CPU(unsigned long, kernel_stack) =
949 (unsigned long)&init_thread_union - KERNEL_STACK_OFFSET + THREAD_SIZE; 948 (unsigned long)&init_thread_union - KERNEL_STACK_OFFSET + THREAD_SIZE;
@@ -986,16 +985,21 @@ unsigned long kernel_eflags;
986 */ 985 */
987DEFINE_PER_CPU(struct orig_ist, orig_ist); 986DEFINE_PER_CPU(struct orig_ist, orig_ist);
988 987
989#else 988#else /* x86_64 */
990 989
991/* Make sure %fs is initialized properly in idle threads */ 990#ifdef CONFIG_CC_STACKPROTECTOR
991DEFINE_PER_CPU(unsigned long, stack_canary);
992#endif
993
994/* Make sure %fs and %gs are initialized properly in idle threads */
992struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs) 995struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
993{ 996{
994 memset(regs, 0, sizeof(struct pt_regs)); 997 memset(regs, 0, sizeof(struct pt_regs));
995 regs->fs = __KERNEL_PERCPU; 998 regs->fs = __KERNEL_PERCPU;
999 regs->gs = __KERNEL_STACK_CANARY;
996 return regs; 1000 return regs;
997} 1001}
998#endif 1002#endif /* x86_64 */
999 1003
1000/* 1004/*
1001 * cpu_init() initializes state that is per-CPU. Some data is already 1005 * cpu_init() initializes state that is per-CPU. Some data is already
@@ -1157,9 +1161,6 @@ void __cpuinit cpu_init(void)
1157 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss); 1161 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
1158#endif 1162#endif
1159 1163
1160 /* Clear %gs. */
1161 asm volatile ("mov %0, %%gs" : : "r" (0));
1162
1163 /* Clear all 6 debug registers: */ 1164 /* Clear all 6 debug registers: */
1164 set_debugreg(0, 0); 1165 set_debugreg(0, 0);
1165 set_debugreg(0, 1); 1166 set_debugreg(0, 1);
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index 6b1f6f6f8661..87d103ded1c3 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -99,7 +99,7 @@ print_context_stack(struct thread_info *tinfo,
99 frame = frame->next_frame; 99 frame = frame->next_frame;
100 bp = (unsigned long) frame; 100 bp = (unsigned long) frame;
101 } else { 101 } else {
102 ops->address(data, addr, bp == 0); 102 ops->address(data, addr, 0);
103 } 103 }
104 print_ftrace_graph_addr(addr, data, ops, tinfo, graph); 104 print_ftrace_graph_addr(addr, data, ops, tinfo, graph);
105 } 105 }
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 504ad198e4ad..639ad98238a2 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -13,8 +13,8 @@
13#include <asm/setup.h> 13#include <asm/setup.h>
14#include <xen/hvc-console.h> 14#include <xen/hvc-console.h>
15#include <asm/pci-direct.h> 15#include <asm/pci-direct.h>
16#include <asm/pgtable.h>
17#include <asm/fixmap.h> 16#include <asm/fixmap.h>
17#include <asm/pgtable.h>
18#include <linux/usb/ehci_def.h> 18#include <linux/usb/ehci_def.h>
19 19
20/* Simple VGA output */ 20/* Simple VGA output */
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 65efd42454be..e99206831459 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -30,12 +30,13 @@
30 * 1C(%esp) - %ds 30 * 1C(%esp) - %ds
31 * 20(%esp) - %es 31 * 20(%esp) - %es
32 * 24(%esp) - %fs 32 * 24(%esp) - %fs
33 * 28(%esp) - orig_eax 33 * 28(%esp) - %gs saved iff !CONFIG_X86_32_LAZY_GS
34 * 2C(%esp) - %eip 34 * 2C(%esp) - orig_eax
35 * 30(%esp) - %cs 35 * 30(%esp) - %eip
36 * 34(%esp) - %eflags 36 * 34(%esp) - %cs
37 * 38(%esp) - %oldesp 37 * 38(%esp) - %eflags
38 * 3C(%esp) - %oldss 38 * 3C(%esp) - %oldesp
39 * 40(%esp) - %oldss
39 * 40 *
40 * "current" is in register %ebx during any slow entries. 41 * "current" is in register %ebx during any slow entries.
41 */ 42 */
@@ -101,121 +102,221 @@
101#define resume_userspace_sig resume_userspace 102#define resume_userspace_sig resume_userspace
102#endif 103#endif
103 104
104#define SAVE_ALL \ 105/*
105 cld; \ 106 * User gs save/restore
106 pushl %fs; \ 107 *
107 CFI_ADJUST_CFA_OFFSET 4;\ 108 * %gs is used for userland TLS and kernel only uses it for stack
108 /*CFI_REL_OFFSET fs, 0;*/\ 109 * canary which is required to be at %gs:20 by gcc. Read the comment
109 pushl %es; \ 110 * at the top of stackprotector.h for more info.
110 CFI_ADJUST_CFA_OFFSET 4;\ 111 *
111 /*CFI_REL_OFFSET es, 0;*/\ 112 * Local labels 98 and 99 are used.
112 pushl %ds; \ 113 */
113 CFI_ADJUST_CFA_OFFSET 4;\ 114#ifdef CONFIG_X86_32_LAZY_GS
114 /*CFI_REL_OFFSET ds, 0;*/\ 115
115 pushl %eax; \ 116 /* unfortunately push/pop can't be no-op */
116 CFI_ADJUST_CFA_OFFSET 4;\ 117.macro PUSH_GS
117 CFI_REL_OFFSET eax, 0;\ 118 pushl $0
118 pushl %ebp; \ 119 CFI_ADJUST_CFA_OFFSET 4
119 CFI_ADJUST_CFA_OFFSET 4;\ 120.endm
120 CFI_REL_OFFSET ebp, 0;\ 121.macro POP_GS pop=0
121 pushl %edi; \ 122 addl $(4 + \pop), %esp
122 CFI_ADJUST_CFA_OFFSET 4;\ 123 CFI_ADJUST_CFA_OFFSET -(4 + \pop)
123 CFI_REL_OFFSET edi, 0;\ 124.endm
124 pushl %esi; \ 125.macro POP_GS_EX
125 CFI_ADJUST_CFA_OFFSET 4;\ 126.endm
126 CFI_REL_OFFSET esi, 0;\ 127
127 pushl %edx; \ 128 /* all the rest are no-op */
128 CFI_ADJUST_CFA_OFFSET 4;\ 129.macro PTGS_TO_GS
129 CFI_REL_OFFSET edx, 0;\ 130.endm
130 pushl %ecx; \ 131.macro PTGS_TO_GS_EX
131 CFI_ADJUST_CFA_OFFSET 4;\ 132.endm
132 CFI_REL_OFFSET ecx, 0;\ 133.macro GS_TO_REG reg
133 pushl %ebx; \ 134.endm
134 CFI_ADJUST_CFA_OFFSET 4;\ 135.macro REG_TO_PTGS reg
135 CFI_REL_OFFSET ebx, 0;\ 136.endm
136 movl $(__USER_DS), %edx; \ 137.macro SET_KERNEL_GS reg
137 movl %edx, %ds; \ 138.endm
138 movl %edx, %es; \ 139
139 movl $(__KERNEL_PERCPU), %edx; \ 140#else /* CONFIG_X86_32_LAZY_GS */
141
142.macro PUSH_GS
143 pushl %gs
144 CFI_ADJUST_CFA_OFFSET 4
145 /*CFI_REL_OFFSET gs, 0*/
146.endm
147
148.macro POP_GS pop=0
14998: popl %gs
150 CFI_ADJUST_CFA_OFFSET -4
151 /*CFI_RESTORE gs*/
152 .if \pop <> 0
153 add $\pop, %esp
154 CFI_ADJUST_CFA_OFFSET -\pop
155 .endif
156.endm
157.macro POP_GS_EX
158.pushsection .fixup, "ax"
15999: movl $0, (%esp)
160 jmp 98b
161.section __ex_table, "a"
162 .align 4
163 .long 98b, 99b
164.popsection
165.endm
166
167.macro PTGS_TO_GS
16898: mov PT_GS(%esp), %gs
169.endm
170.macro PTGS_TO_GS_EX
171.pushsection .fixup, "ax"
17299: movl $0, PT_GS(%esp)
173 jmp 98b
174.section __ex_table, "a"
175 .align 4
176 .long 98b, 99b
177.popsection
178.endm
179
180.macro GS_TO_REG reg
181 movl %gs, \reg
182 /*CFI_REGISTER gs, \reg*/
183.endm
184.macro REG_TO_PTGS reg
185 movl \reg, PT_GS(%esp)
186 /*CFI_REL_OFFSET gs, PT_GS*/
187.endm
188.macro SET_KERNEL_GS reg
189 movl $(__KERNEL_STACK_CANARY), \reg
190 movl \reg, %gs
191.endm
192
193#endif /* CONFIG_X86_32_LAZY_GS */
194
195.macro SAVE_ALL
196 cld
197 PUSH_GS
198 pushl %fs
199 CFI_ADJUST_CFA_OFFSET 4
200 /*CFI_REL_OFFSET fs, 0;*/
201 pushl %es
202 CFI_ADJUST_CFA_OFFSET 4
203 /*CFI_REL_OFFSET es, 0;*/
204 pushl %ds
205 CFI_ADJUST_CFA_OFFSET 4
206 /*CFI_REL_OFFSET ds, 0;*/
207 pushl %eax
208 CFI_ADJUST_CFA_OFFSET 4
209 CFI_REL_OFFSET eax, 0
210 pushl %ebp
211 CFI_ADJUST_CFA_OFFSET 4
212 CFI_REL_OFFSET ebp, 0
213 pushl %edi
214 CFI_ADJUST_CFA_OFFSET 4
215 CFI_REL_OFFSET edi, 0
216 pushl %esi
217 CFI_ADJUST_CFA_OFFSET 4
218 CFI_REL_OFFSET esi, 0
219 pushl %edx
220 CFI_ADJUST_CFA_OFFSET 4
221 CFI_REL_OFFSET edx, 0
222 pushl %ecx
223 CFI_ADJUST_CFA_OFFSET 4
224 CFI_REL_OFFSET ecx, 0
225 pushl %ebx
226 CFI_ADJUST_CFA_OFFSET 4
227 CFI_REL_OFFSET ebx, 0
228 movl $(__USER_DS), %edx
229 movl %edx, %ds
230 movl %edx, %es
231 movl $(__KERNEL_PERCPU), %edx
140 movl %edx, %fs 232 movl %edx, %fs
233 SET_KERNEL_GS %edx
234.endm
141 235
142#define RESTORE_INT_REGS \ 236.macro RESTORE_INT_REGS
143 popl %ebx; \ 237 popl %ebx
144 CFI_ADJUST_CFA_OFFSET -4;\ 238 CFI_ADJUST_CFA_OFFSET -4
145 CFI_RESTORE ebx;\ 239 CFI_RESTORE ebx
146 popl %ecx; \ 240 popl %ecx
147 CFI_ADJUST_CFA_OFFSET -4;\ 241 CFI_ADJUST_CFA_OFFSET -4
148 CFI_RESTORE ecx;\ 242 CFI_RESTORE ecx
149 popl %edx; \ 243 popl %edx
150 CFI_ADJUST_CFA_OFFSET -4;\ 244 CFI_ADJUST_CFA_OFFSET -4
151 CFI_RESTORE edx;\ 245 CFI_RESTORE edx
152 popl %esi; \ 246 popl %esi
153 CFI_ADJUST_CFA_OFFSET -4;\ 247 CFI_ADJUST_CFA_OFFSET -4
154 CFI_RESTORE esi;\ 248 CFI_RESTORE esi
155 popl %edi; \ 249 popl %edi
156 CFI_ADJUST_CFA_OFFSET -4;\ 250 CFI_ADJUST_CFA_OFFSET -4
157 CFI_RESTORE edi;\ 251 CFI_RESTORE edi
158 popl %ebp; \ 252 popl %ebp
159 CFI_ADJUST_CFA_OFFSET -4;\ 253 CFI_ADJUST_CFA_OFFSET -4
160 CFI_RESTORE ebp;\ 254 CFI_RESTORE ebp
161 popl %eax; \ 255 popl %eax
162 CFI_ADJUST_CFA_OFFSET -4;\ 256 CFI_ADJUST_CFA_OFFSET -4
163 CFI_RESTORE eax 257 CFI_RESTORE eax
258.endm
164 259
165#define RESTORE_REGS \ 260.macro RESTORE_REGS pop=0
166 RESTORE_INT_REGS; \ 261 RESTORE_INT_REGS
1671: popl %ds; \ 2621: popl %ds
168 CFI_ADJUST_CFA_OFFSET -4;\ 263 CFI_ADJUST_CFA_OFFSET -4
169 /*CFI_RESTORE ds;*/\ 264 /*CFI_RESTORE ds;*/
1702: popl %es; \ 2652: popl %es
171 CFI_ADJUST_CFA_OFFSET -4;\ 266 CFI_ADJUST_CFA_OFFSET -4
172 /*CFI_RESTORE es;*/\ 267 /*CFI_RESTORE es;*/
1733: popl %fs; \ 2683: popl %fs
174 CFI_ADJUST_CFA_OFFSET -4;\ 269 CFI_ADJUST_CFA_OFFSET -4
175 /*CFI_RESTORE fs;*/\ 270 /*CFI_RESTORE fs;*/
176.pushsection .fixup,"ax"; \ 271 POP_GS \pop
1774: movl $0,(%esp); \ 272.pushsection .fixup, "ax"
178 jmp 1b; \ 2734: movl $0, (%esp)
1795: movl $0,(%esp); \ 274 jmp 1b
180 jmp 2b; \ 2755: movl $0, (%esp)
1816: movl $0,(%esp); \ 276 jmp 2b
182 jmp 3b; \ 2776: movl $0, (%esp)
183.section __ex_table,"a";\ 278 jmp 3b
184 .align 4; \ 279.section __ex_table, "a"
185 .long 1b,4b; \ 280 .align 4
186 .long 2b,5b; \ 281 .long 1b, 4b
187 .long 3b,6b; \ 282 .long 2b, 5b
283 .long 3b, 6b
188.popsection 284.popsection
285 POP_GS_EX
286.endm
189 287
190#define RING0_INT_FRAME \ 288.macro RING0_INT_FRAME
191 CFI_STARTPROC simple;\ 289 CFI_STARTPROC simple
192 CFI_SIGNAL_FRAME;\ 290 CFI_SIGNAL_FRAME
193 CFI_DEF_CFA esp, 3*4;\ 291 CFI_DEF_CFA esp, 3*4
194 /*CFI_OFFSET cs, -2*4;*/\ 292 /*CFI_OFFSET cs, -2*4;*/
195 CFI_OFFSET eip, -3*4 293 CFI_OFFSET eip, -3*4
294.endm
196 295
197#define RING0_EC_FRAME \ 296.macro RING0_EC_FRAME
198 CFI_STARTPROC simple;\ 297 CFI_STARTPROC simple
199 CFI_SIGNAL_FRAME;\ 298 CFI_SIGNAL_FRAME
200 CFI_DEF_CFA esp, 4*4;\ 299 CFI_DEF_CFA esp, 4*4
201 /*CFI_OFFSET cs, -2*4;*/\ 300 /*CFI_OFFSET cs, -2*4;*/
202 CFI_OFFSET eip, -3*4 301 CFI_OFFSET eip, -3*4
302.endm
203 303
204#define RING0_PTREGS_FRAME \ 304.macro RING0_PTREGS_FRAME
205 CFI_STARTPROC simple;\ 305 CFI_STARTPROC simple
206 CFI_SIGNAL_FRAME;\ 306 CFI_SIGNAL_FRAME
207 CFI_DEF_CFA esp, PT_OLDESP-PT_EBX;\ 307 CFI_DEF_CFA esp, PT_OLDESP-PT_EBX
208 /*CFI_OFFSET cs, PT_CS-PT_OLDESP;*/\ 308 /*CFI_OFFSET cs, PT_CS-PT_OLDESP;*/
209 CFI_OFFSET eip, PT_EIP-PT_OLDESP;\ 309 CFI_OFFSET eip, PT_EIP-PT_OLDESP
210 /*CFI_OFFSET es, PT_ES-PT_OLDESP;*/\ 310 /*CFI_OFFSET es, PT_ES-PT_OLDESP;*/
211 /*CFI_OFFSET ds, PT_DS-PT_OLDESP;*/\ 311 /*CFI_OFFSET ds, PT_DS-PT_OLDESP;*/
212 CFI_OFFSET eax, PT_EAX-PT_OLDESP;\ 312 CFI_OFFSET eax, PT_EAX-PT_OLDESP
213 CFI_OFFSET ebp, PT_EBP-PT_OLDESP;\ 313 CFI_OFFSET ebp, PT_EBP-PT_OLDESP
214 CFI_OFFSET edi, PT_EDI-PT_OLDESP;\ 314 CFI_OFFSET edi, PT_EDI-PT_OLDESP
215 CFI_OFFSET esi, PT_ESI-PT_OLDESP;\ 315 CFI_OFFSET esi, PT_ESI-PT_OLDESP
216 CFI_OFFSET edx, PT_EDX-PT_OLDESP;\ 316 CFI_OFFSET edx, PT_EDX-PT_OLDESP
217 CFI_OFFSET ecx, PT_ECX-PT_OLDESP;\ 317 CFI_OFFSET ecx, PT_ECX-PT_OLDESP
218 CFI_OFFSET ebx, PT_EBX-PT_OLDESP 318 CFI_OFFSET ebx, PT_EBX-PT_OLDESP
319.endm
219 320
220ENTRY(ret_from_fork) 321ENTRY(ret_from_fork)
221 CFI_STARTPROC 322 CFI_STARTPROC
@@ -362,6 +463,7 @@ sysenter_exit:
362 xorl %ebp,%ebp 463 xorl %ebp,%ebp
363 TRACE_IRQS_ON 464 TRACE_IRQS_ON
3641: mov PT_FS(%esp), %fs 4651: mov PT_FS(%esp), %fs
466 PTGS_TO_GS
365 ENABLE_INTERRUPTS_SYSEXIT 467 ENABLE_INTERRUPTS_SYSEXIT
366 468
367#ifdef CONFIG_AUDITSYSCALL 469#ifdef CONFIG_AUDITSYSCALL
@@ -410,6 +512,7 @@ sysexit_audit:
410 .align 4 512 .align 4
411 .long 1b,2b 513 .long 1b,2b
412.popsection 514.popsection
515 PTGS_TO_GS_EX
413ENDPROC(ia32_sysenter_target) 516ENDPROC(ia32_sysenter_target)
414 517
415 # system call handler stub 518 # system call handler stub
@@ -452,8 +555,7 @@ restore_all:
452restore_nocheck: 555restore_nocheck:
453 TRACE_IRQS_IRET 556 TRACE_IRQS_IRET
454restore_nocheck_notrace: 557restore_nocheck_notrace:
455 RESTORE_REGS 558 RESTORE_REGS 4 # skip orig_eax/error_code
456 addl $4, %esp # skip orig_eax/error_code
457 CFI_ADJUST_CFA_OFFSET -4 559 CFI_ADJUST_CFA_OFFSET -4
458irq_return: 560irq_return:
459 INTERRUPT_RETURN 561 INTERRUPT_RETURN
@@ -595,28 +697,50 @@ syscall_badsys:
595END(syscall_badsys) 697END(syscall_badsys)
596 CFI_ENDPROC 698 CFI_ENDPROC
597 699
598#define FIXUP_ESPFIX_STACK \ 700/*
599 /* since we are on a wrong stack, we cant make it a C code :( */ \ 701 * System calls that need a pt_regs pointer.
600 PER_CPU(gdt_page, %ebx); \ 702 */
601 GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah); \ 703#define PTREGSCALL(name) \
602 addl %esp, %eax; \ 704 ALIGN; \
603 pushl $__KERNEL_DS; \ 705ptregs_##name: \
604 CFI_ADJUST_CFA_OFFSET 4; \ 706 leal 4(%esp),%eax; \
605 pushl %eax; \ 707 jmp sys_##name;
606 CFI_ADJUST_CFA_OFFSET 4; \ 708
607 lss (%esp), %esp; \ 709PTREGSCALL(iopl)
608 CFI_ADJUST_CFA_OFFSET -8; 710PTREGSCALL(fork)
609#define UNWIND_ESPFIX_STACK \ 711PTREGSCALL(clone)
610 movl %ss, %eax; \ 712PTREGSCALL(vfork)
611 /* see if on espfix stack */ \ 713PTREGSCALL(execve)
612 cmpw $__ESPFIX_SS, %ax; \ 714PTREGSCALL(sigaltstack)
613 jne 27f; \ 715PTREGSCALL(sigreturn)
614 movl $__KERNEL_DS, %eax; \ 716PTREGSCALL(rt_sigreturn)
615 movl %eax, %ds; \ 717PTREGSCALL(vm86)
616 movl %eax, %es; \ 718PTREGSCALL(vm86old)
617 /* switch to normal stack */ \ 719
618 FIXUP_ESPFIX_STACK; \ 720.macro FIXUP_ESPFIX_STACK
61927:; 721 /* since we are on a wrong stack, we cant make it a C code :( */
722 PER_CPU(gdt_page, %ebx)
723 GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah)
724 addl %esp, %eax
725 pushl $__KERNEL_DS
726 CFI_ADJUST_CFA_OFFSET 4
727 pushl %eax
728 CFI_ADJUST_CFA_OFFSET 4
729 lss (%esp), %esp
730 CFI_ADJUST_CFA_OFFSET -8
731.endm
732.macro UNWIND_ESPFIX_STACK
733 movl %ss, %eax
734 /* see if on espfix stack */
735 cmpw $__ESPFIX_SS, %ax
736 jne 27f
737 movl $__KERNEL_DS, %eax
738 movl %eax, %ds
739 movl %eax, %es
740 /* switch to normal stack */
741 FIXUP_ESPFIX_STACK
74227:
743.endm
620 744
621/* 745/*
622 * Build the entry stubs and pointer table with some assembler magic. 746 * Build the entry stubs and pointer table with some assembler magic.
@@ -1070,7 +1194,10 @@ ENTRY(page_fault)
1070 CFI_ADJUST_CFA_OFFSET 4 1194 CFI_ADJUST_CFA_OFFSET 4
1071 ALIGN 1195 ALIGN
1072error_code: 1196error_code:
1073 /* the function address is in %fs's slot on the stack */ 1197 /* the function address is in %gs's slot on the stack */
1198 pushl %fs
1199 CFI_ADJUST_CFA_OFFSET 4
1200 /*CFI_REL_OFFSET fs, 0*/
1074 pushl %es 1201 pushl %es
1075 CFI_ADJUST_CFA_OFFSET 4 1202 CFI_ADJUST_CFA_OFFSET 4
1076 /*CFI_REL_OFFSET es, 0*/ 1203 /*CFI_REL_OFFSET es, 0*/
@@ -1099,20 +1226,15 @@ error_code:
1099 CFI_ADJUST_CFA_OFFSET 4 1226 CFI_ADJUST_CFA_OFFSET 4
1100 CFI_REL_OFFSET ebx, 0 1227 CFI_REL_OFFSET ebx, 0
1101 cld 1228 cld
1102 pushl %fs
1103 CFI_ADJUST_CFA_OFFSET 4
1104 /*CFI_REL_OFFSET fs, 0*/
1105 movl $(__KERNEL_PERCPU), %ecx 1229 movl $(__KERNEL_PERCPU), %ecx
1106 movl %ecx, %fs 1230 movl %ecx, %fs
1107 UNWIND_ESPFIX_STACK 1231 UNWIND_ESPFIX_STACK
1108 popl %ecx 1232 GS_TO_REG %ecx
1109 CFI_ADJUST_CFA_OFFSET -4 1233 movl PT_GS(%esp), %edi # get the function address
1110 /*CFI_REGISTER es, ecx*/
1111 movl PT_FS(%esp), %edi # get the function address
1112 movl PT_ORIG_EAX(%esp), %edx # get the error code 1234 movl PT_ORIG_EAX(%esp), %edx # get the error code
1113 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart 1235 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
1114 mov %ecx, PT_FS(%esp) 1236 REG_TO_PTGS %ecx
1115 /*CFI_REL_OFFSET fs, ES*/ 1237 SET_KERNEL_GS %ecx
1116 movl $(__USER_DS), %ecx 1238 movl $(__USER_DS), %ecx
1117 movl %ecx, %ds 1239 movl %ecx, %ds
1118 movl %ecx, %es 1240 movl %ecx, %es
@@ -1136,26 +1258,27 @@ END(page_fault)
1136 * by hand onto the new stack - while updating the return eip past 1258 * by hand onto the new stack - while updating the return eip past
1137 * the instruction that would have done it for sysenter. 1259 * the instruction that would have done it for sysenter.
1138 */ 1260 */
1139#define FIX_STACK(offset, ok, label) \ 1261.macro FIX_STACK offset ok label
1140 cmpw $__KERNEL_CS,4(%esp); \ 1262 cmpw $__KERNEL_CS, 4(%esp)
1141 jne ok; \ 1263 jne \ok
1142label: \ 1264\label:
1143 movl TSS_sysenter_sp0+offset(%esp),%esp; \ 1265 movl TSS_sysenter_sp0 + \offset(%esp), %esp
1144 CFI_DEF_CFA esp, 0; \ 1266 CFI_DEF_CFA esp, 0
1145 CFI_UNDEFINED eip; \ 1267 CFI_UNDEFINED eip
1146 pushfl; \ 1268 pushfl
1147 CFI_ADJUST_CFA_OFFSET 4; \ 1269 CFI_ADJUST_CFA_OFFSET 4
1148 pushl $__KERNEL_CS; \ 1270 pushl $__KERNEL_CS
1149 CFI_ADJUST_CFA_OFFSET 4; \ 1271 CFI_ADJUST_CFA_OFFSET 4
1150 pushl $sysenter_past_esp; \ 1272 pushl $sysenter_past_esp
1151 CFI_ADJUST_CFA_OFFSET 4; \ 1273 CFI_ADJUST_CFA_OFFSET 4
1152 CFI_REL_OFFSET eip, 0 1274 CFI_REL_OFFSET eip, 0
1275.endm
1153 1276
1154ENTRY(debug) 1277ENTRY(debug)
1155 RING0_INT_FRAME 1278 RING0_INT_FRAME
1156 cmpl $ia32_sysenter_target,(%esp) 1279 cmpl $ia32_sysenter_target,(%esp)
1157 jne debug_stack_correct 1280 jne debug_stack_correct
1158 FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn) 1281 FIX_STACK 12, debug_stack_correct, debug_esp_fix_insn
1159debug_stack_correct: 1282debug_stack_correct:
1160 pushl $-1 # mark this as an int 1283 pushl $-1 # mark this as an int
1161 CFI_ADJUST_CFA_OFFSET 4 1284 CFI_ADJUST_CFA_OFFSET 4
@@ -1213,7 +1336,7 @@ nmi_stack_correct:
1213 1336
1214nmi_stack_fixup: 1337nmi_stack_fixup:
1215 RING0_INT_FRAME 1338 RING0_INT_FRAME
1216 FIX_STACK(12,nmi_stack_correct, 1) 1339 FIX_STACK 12, nmi_stack_correct, 1
1217 jmp nmi_stack_correct 1340 jmp nmi_stack_correct
1218 1341
1219nmi_debug_stack_check: 1342nmi_debug_stack_check:
@@ -1224,7 +1347,7 @@ nmi_debug_stack_check:
1224 jb nmi_stack_correct 1347 jb nmi_stack_correct
1225 cmpl $debug_esp_fix_insn,(%esp) 1348 cmpl $debug_esp_fix_insn,(%esp)
1226 ja nmi_stack_correct 1349 ja nmi_stack_correct
1227 FIX_STACK(24,nmi_stack_correct, 1) 1350 FIX_STACK 24, nmi_stack_correct, 1
1228 jmp nmi_stack_correct 1351 jmp nmi_stack_correct
1229 1352
1230nmi_espfix_stack: 1353nmi_espfix_stack:
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index d6184c12a182..55515d73d9c2 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -287,24 +287,31 @@ int __init find_unisys_acpi_oem_table(unsigned long *oem_addr)
287{ 287{
288 struct acpi_table_header *header = NULL; 288 struct acpi_table_header *header = NULL;
289 int i = 0; 289 int i = 0;
290 acpi_size tbl_size;
290 291
291 while (ACPI_SUCCESS(acpi_get_table("OEM1", i++, &header))) { 292 while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) {
292 if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) { 293 if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
293 struct oem_table *t = (struct oem_table *)header; 294 struct oem_table *t = (struct oem_table *)header;
294 295
295 oem_addrX = t->OEMTableAddr; 296 oem_addrX = t->OEMTableAddr;
296 oem_size = t->OEMTableSize; 297 oem_size = t->OEMTableSize;
298 early_acpi_os_unmap_memory(header, tbl_size);
297 299
298 *oem_addr = (unsigned long)__acpi_map_table(oem_addrX, 300 *oem_addr = (unsigned long)__acpi_map_table(oem_addrX,
299 oem_size); 301 oem_size);
300 return 0; 302 return 0;
301 } 303 }
304 early_acpi_os_unmap_memory(header, tbl_size);
302 } 305 }
303 return -1; 306 return -1;
304} 307}
305 308
306void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr) 309void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr)
307{ 310{
311 if (!oem_addr)
312 return;
313
314 __acpi_unmap_table((char *)oem_addr, oem_size);
308} 315}
309#endif 316#endif
310 317
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 722464c520cf..2a0aad7718d5 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -19,6 +19,7 @@
19#include <asm/asm-offsets.h> 19#include <asm/asm-offsets.h>
20#include <asm/setup.h> 20#include <asm/setup.h>
21#include <asm/processor-flags.h> 21#include <asm/processor-flags.h>
22#include <asm/percpu.h>
22 23
23/* Physical address */ 24/* Physical address */
24#define pa(X) ((X) - __PAGE_OFFSET) 25#define pa(X) ((X) - __PAGE_OFFSET)
@@ -437,8 +438,26 @@ is386: movl $2,%ecx # set MP
437 movl $(__KERNEL_PERCPU), %eax 438 movl $(__KERNEL_PERCPU), %eax
438 movl %eax,%fs # set this cpu's percpu 439 movl %eax,%fs # set this cpu's percpu
439 440
440 xorl %eax,%eax # Clear GS and LDT 441#ifdef CONFIG_CC_STACKPROTECTOR
442 /*
443 * The linker can't handle this by relocation. Manually set
444 * base address in stack canary segment descriptor.
445 */
446 cmpb $0,ready
447 jne 1f
448 movl $per_cpu__gdt_page,%eax
449 movl $per_cpu__stack_canary,%ecx
450 subl $20, %ecx
451 movw %cx, 8 * GDT_ENTRY_STACK_CANARY + 2(%eax)
452 shrl $16, %ecx
453 movb %cl, 8 * GDT_ENTRY_STACK_CANARY + 4(%eax)
454 movb %ch, 8 * GDT_ENTRY_STACK_CANARY + 7(%eax)
4551:
456#endif
457 movl $(__KERNEL_STACK_CANARY),%eax
441 movl %eax,%gs 458 movl %eax,%gs
459
460 xorl %eax,%eax # Clear LDT
442 lldt %ax 461 lldt %ax
443 462
444 cld # gcc2 wants the direction flag cleared at all times 463 cld # gcc2 wants the direction flag cleared at all times
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index a0a2b5ca9b7d..2e648e3a5ea4 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -205,19 +205,6 @@ ENTRY(secondary_startup_64)
205 pushq $0 205 pushq $0
206 popfq 206 popfq
207 207
208#ifdef CONFIG_SMP
209 /*
210 * Fix up static pointers that need __per_cpu_load added. The assembler
211 * is unable to do this directly. This is only needed for the boot cpu.
212 * These values are set up with the correct base addresses by C code for
213 * secondary cpus.
214 */
215 movq initial_gs(%rip), %rax
216 cmpl $0, per_cpu__cpu_number(%rax)
217 jne 1f
218 addq %rax, early_gdt_descr_base(%rip)
2191:
220#endif
221 /* 208 /*
222 * We must switch to a new descriptor in kernel space for the GDT 209 * We must switch to a new descriptor in kernel space for the GDT
223 * because soon the kernel won't have access anymore to the userspace 210 * because soon the kernel won't have access anymore to the userspace
@@ -275,11 +262,7 @@ ENTRY(secondary_startup_64)
275 ENTRY(initial_code) 262 ENTRY(initial_code)
276 .quad x86_64_start_kernel 263 .quad x86_64_start_kernel
277 ENTRY(initial_gs) 264 ENTRY(initial_gs)
278#ifdef CONFIG_SMP 265 .quad INIT_PER_CPU_VAR(irq_stack_union)
279 .quad __per_cpu_load
280#else
281 .quad PER_CPU_VAR(irq_stack_union)
282#endif
283 __FINITDATA 266 __FINITDATA
284 267
285 ENTRY(stack_start) 268 ENTRY(stack_start)
@@ -425,7 +408,7 @@ NEXT_PAGE(level2_spare_pgt)
425early_gdt_descr: 408early_gdt_descr:
426 .word GDT_ENTRIES*8-1 409 .word GDT_ENTRIES*8-1
427early_gdt_descr_base: 410early_gdt_descr_base:
428 .quad per_cpu__gdt_page 411 .quad INIT_PER_CPU_VAR(gdt_page)
429 412
430ENTRY(phys_base) 413ENTRY(phys_base)
431 /* This must match the first entry in level2_kernel_pgt */ 414 /* This must match the first entry in level2_kernel_pgt */
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 388254f69a2a..a00545fe5cdd 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -269,6 +269,8 @@ static void hpet_set_mode(enum clock_event_mode mode,
269 now = hpet_readl(HPET_COUNTER); 269 now = hpet_readl(HPET_COUNTER);
270 cmp = now + (unsigned long) delta; 270 cmp = now + (unsigned long) delta;
271 cfg = hpet_readl(HPET_Tn_CFG(timer)); 271 cfg = hpet_readl(HPET_Tn_CFG(timer));
272 /* Make sure we use edge triggered interrupts */
273 cfg &= ~HPET_TN_LEVEL;
272 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | 274 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
273 HPET_TN_SETVAL | HPET_TN_32BIT; 275 HPET_TN_SETVAL | HPET_TN_32BIT;
274 hpet_writel(cfg, HPET_Tn_CFG(timer)); 276 hpet_writel(cfg, HPET_Tn_CFG(timer));
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
index b12208f4dfee..e41980a373ab 100644
--- a/arch/x86/kernel/ioport.c
+++ b/arch/x86/kernel/ioport.c
@@ -131,9 +131,8 @@ static int do_iopl(unsigned int level, struct pt_regs *regs)
131} 131}
132 132
133#ifdef CONFIG_X86_32 133#ifdef CONFIG_X86_32
134asmlinkage long sys_iopl(unsigned long regsp) 134long sys_iopl(struct pt_regs *regs)
135{ 135{
136 struct pt_regs *regs = (struct pt_regs *)&regsp;
137 unsigned int level = regs->bx; 136 unsigned int level = regs->bx;
138 struct thread_struct *t = &current->thread; 137 struct thread_struct *t = &current->thread;
139 int rc; 138 int rc;
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index c43caa3a91f3..6993d51b7fd8 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -18,15 +18,6 @@
18#include <asm/mmu_context.h> 18#include <asm/mmu_context.h>
19#include <asm/io.h> 19#include <asm/io.h>
20 20
21#define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE)))
22static u64 kexec_pgd[512] PAGE_ALIGNED;
23static u64 kexec_pud0[512] PAGE_ALIGNED;
24static u64 kexec_pmd0[512] PAGE_ALIGNED;
25static u64 kexec_pte0[512] PAGE_ALIGNED;
26static u64 kexec_pud1[512] PAGE_ALIGNED;
27static u64 kexec_pmd1[512] PAGE_ALIGNED;
28static u64 kexec_pte1[512] PAGE_ALIGNED;
29
30static void init_level2_page(pmd_t *level2p, unsigned long addr) 21static void init_level2_page(pmd_t *level2p, unsigned long addr)
31{ 22{
32 unsigned long end_addr; 23 unsigned long end_addr;
@@ -107,12 +98,65 @@ out:
107 return result; 98 return result;
108} 99}
109 100
101static void free_transition_pgtable(struct kimage *image)
102{
103 free_page((unsigned long)image->arch.pud);
104 free_page((unsigned long)image->arch.pmd);
105 free_page((unsigned long)image->arch.pte);
106}
107
108static int init_transition_pgtable(struct kimage *image, pgd_t *pgd)
109{
110 pud_t *pud;
111 pmd_t *pmd;
112 pte_t *pte;
113 unsigned long vaddr, paddr;
114 int result = -ENOMEM;
115
116 vaddr = (unsigned long)relocate_kernel;
117 paddr = __pa(page_address(image->control_code_page)+PAGE_SIZE);
118 pgd += pgd_index(vaddr);
119 if (!pgd_present(*pgd)) {
120 pud = (pud_t *)get_zeroed_page(GFP_KERNEL);
121 if (!pud)
122 goto err;
123 image->arch.pud = pud;
124 set_pgd(pgd, __pgd(__pa(pud) | _KERNPG_TABLE));
125 }
126 pud = pud_offset(pgd, vaddr);
127 if (!pud_present(*pud)) {
128 pmd = (pmd_t *)get_zeroed_page(GFP_KERNEL);
129 if (!pmd)
130 goto err;
131 image->arch.pmd = pmd;
132 set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE));
133 }
134 pmd = pmd_offset(pud, vaddr);
135 if (!pmd_present(*pmd)) {
136 pte = (pte_t *)get_zeroed_page(GFP_KERNEL);
137 if (!pte)
138 goto err;
139 image->arch.pte = pte;
140 set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE));
141 }
142 pte = pte_offset_kernel(pmd, vaddr);
143 set_pte(pte, pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL_EXEC));
144 return 0;
145err:
146 free_transition_pgtable(image);
147 return result;
148}
149
110 150
111static int init_pgtable(struct kimage *image, unsigned long start_pgtable) 151static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
112{ 152{
113 pgd_t *level4p; 153 pgd_t *level4p;
154 int result;
114 level4p = (pgd_t *)__va(start_pgtable); 155 level4p = (pgd_t *)__va(start_pgtable);
115 return init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT); 156 result = init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT);
157 if (result)
158 return result;
159 return init_transition_pgtable(image, level4p);
116} 160}
117 161
118static void set_idt(void *newidt, u16 limit) 162static void set_idt(void *newidt, u16 limit)
@@ -174,7 +218,7 @@ int machine_kexec_prepare(struct kimage *image)
174 218
175void machine_kexec_cleanup(struct kimage *image) 219void machine_kexec_cleanup(struct kimage *image)
176{ 220{
177 return; 221 free_transition_pgtable(image);
178} 222}
179 223
180/* 224/*
@@ -195,22 +239,6 @@ void machine_kexec(struct kimage *image)
195 memcpy(control_page, relocate_kernel, PAGE_SIZE); 239 memcpy(control_page, relocate_kernel, PAGE_SIZE);
196 240
197 page_list[PA_CONTROL_PAGE] = virt_to_phys(control_page); 241 page_list[PA_CONTROL_PAGE] = virt_to_phys(control_page);
198 page_list[VA_CONTROL_PAGE] = (unsigned long)relocate_kernel;
199 page_list[PA_PGD] = virt_to_phys(&kexec_pgd);
200 page_list[VA_PGD] = (unsigned long)kexec_pgd;
201 page_list[PA_PUD_0] = virt_to_phys(&kexec_pud0);
202 page_list[VA_PUD_0] = (unsigned long)kexec_pud0;
203 page_list[PA_PMD_0] = virt_to_phys(&kexec_pmd0);
204 page_list[VA_PMD_0] = (unsigned long)kexec_pmd0;
205 page_list[PA_PTE_0] = virt_to_phys(&kexec_pte0);
206 page_list[VA_PTE_0] = (unsigned long)kexec_pte0;
207 page_list[PA_PUD_1] = virt_to_phys(&kexec_pud1);
208 page_list[VA_PUD_1] = (unsigned long)kexec_pud1;
209 page_list[PA_PMD_1] = virt_to_phys(&kexec_pmd1);
210 page_list[VA_PMD_1] = (unsigned long)kexec_pmd1;
211 page_list[PA_PTE_1] = virt_to_phys(&kexec_pte1);
212 page_list[VA_PTE_1] = (unsigned long)kexec_pte1;
213
214 page_list[PA_TABLE_PAGE] = 242 page_list[PA_TABLE_PAGE] =
215 (unsigned long)__pa(page_address(image->control_code_page)); 243 (unsigned long)__pa(page_address(image->control_code_page));
216 244
diff --git a/arch/x86/kernel/olpc.c b/arch/x86/kernel/olpc.c
index 7a13fac63a1f..4006c522adc7 100644
--- a/arch/x86/kernel/olpc.c
+++ b/arch/x86/kernel/olpc.c
@@ -203,7 +203,7 @@ static void __init platform_detect(void)
203static void __init platform_detect(void) 203static void __init platform_detect(void)
204{ 204{
205 /* stopgap until OFW support is added to the kernel */ 205 /* stopgap until OFW support is added to the kernel */
206 olpc_platform_info.boardrev = 0xc2; 206 olpc_platform_info.boardrev = olpc_board(0xc2);
207} 207}
208#endif 208#endif
209 209
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index cea11c8e3049..6dc4dca255e4 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -286,6 +286,32 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
286 return __get_cpu_var(paravirt_lazy_mode); 286 return __get_cpu_var(paravirt_lazy_mode);
287} 287}
288 288
289void arch_flush_lazy_mmu_mode(void)
290{
291 preempt_disable();
292
293 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU) {
294 WARN_ON(preempt_count() == 1);
295 arch_leave_lazy_mmu_mode();
296 arch_enter_lazy_mmu_mode();
297 }
298
299 preempt_enable();
300}
301
302void arch_flush_lazy_cpu_mode(void)
303{
304 preempt_disable();
305
306 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) {
307 WARN_ON(preempt_count() == 1);
308 arch_leave_lazy_cpu_mode();
309 arch_enter_lazy_cpu_mode();
310 }
311
312 preempt_enable();
313}
314
289struct pv_info pv_info = { 315struct pv_info pv_info = {
290 .name = "bare hardware", 316 .name = "bare hardware",
291 .paravirt_enabled = 0, 317 .paravirt_enabled = 0,
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 1a1ae8edc40c..fec79ad85dc6 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -11,6 +11,7 @@
11 11
12#include <stdarg.h> 12#include <stdarg.h>
13 13
14#include <linux/stackprotector.h>
14#include <linux/cpu.h> 15#include <linux/cpu.h>
15#include <linux/errno.h> 16#include <linux/errno.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
@@ -91,6 +92,15 @@ void cpu_idle(void)
91{ 92{
92 int cpu = smp_processor_id(); 93 int cpu = smp_processor_id();
93 94
95 /*
96 * If we're the non-boot CPU, nothing set the stack canary up
97 * for us. CPU0 already has it initialized but no harm in
98 * doing it again. This is a good place for updating it, as
99 * we wont ever return from this function (so the invalid
100 * canaries already on the stack wont ever trigger).
101 */
102 boot_init_stack_canary();
103
94 current_thread_info()->status |= TS_POLLING; 104 current_thread_info()->status |= TS_POLLING;
95 105
96 /* endless idle loop with no priority at all */ 106 /* endless idle loop with no priority at all */
@@ -131,7 +141,7 @@ void __show_regs(struct pt_regs *regs, int all)
131 if (user_mode_vm(regs)) { 141 if (user_mode_vm(regs)) {
132 sp = regs->sp; 142 sp = regs->sp;
133 ss = regs->ss & 0xffff; 143 ss = regs->ss & 0xffff;
134 savesegment(gs, gs); 144 gs = get_user_gs(regs);
135 } else { 145 } else {
136 sp = (unsigned long) (&regs->sp); 146 sp = (unsigned long) (&regs->sp);
137 savesegment(ss, ss); 147 savesegment(ss, ss);
@@ -212,6 +222,7 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
212 regs.ds = __USER_DS; 222 regs.ds = __USER_DS;
213 regs.es = __USER_DS; 223 regs.es = __USER_DS;
214 regs.fs = __KERNEL_PERCPU; 224 regs.fs = __KERNEL_PERCPU;
225 regs.gs = __KERNEL_STACK_CANARY;
215 regs.orig_ax = -1; 226 regs.orig_ax = -1;
216 regs.ip = (unsigned long) kernel_thread_helper; 227 regs.ip = (unsigned long) kernel_thread_helper;
217 regs.cs = __KERNEL_CS | get_kernel_rpl(); 228 regs.cs = __KERNEL_CS | get_kernel_rpl();
@@ -304,7 +315,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
304 315
305 p->thread.ip = (unsigned long) ret_from_fork; 316 p->thread.ip = (unsigned long) ret_from_fork;
306 317
307 savesegment(gs, p->thread.gs); 318 task_user_gs(p) = get_user_gs(regs);
308 319
309 tsk = current; 320 tsk = current;
310 if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { 321 if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) {
@@ -342,7 +353,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
342void 353void
343start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) 354start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
344{ 355{
345 __asm__("movl %0, %%gs" : : "r"(0)); 356 set_user_gs(regs, 0);
346 regs->fs = 0; 357 regs->fs = 0;
347 set_fs(USER_DS); 358 set_fs(USER_DS);
348 regs->ds = __USER_DS; 359 regs->ds = __USER_DS;
@@ -539,7 +550,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
539 * used %fs or %gs (it does not today), or if the kernel is 550 * used %fs or %gs (it does not today), or if the kernel is
540 * running inside of a hypervisor layer. 551 * running inside of a hypervisor layer.
541 */ 552 */
542 savesegment(gs, prev->gs); 553 lazy_save_gs(prev->gs);
543 554
544 /* 555 /*
545 * Load the per-thread Thread-Local Storage descriptor. 556 * Load the per-thread Thread-Local Storage descriptor.
@@ -585,31 +596,31 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
585 * Restore %gs if needed (which is common) 596 * Restore %gs if needed (which is common)
586 */ 597 */
587 if (prev->gs | next->gs) 598 if (prev->gs | next->gs)
588 loadsegment(gs, next->gs); 599 lazy_load_gs(next->gs);
589 600
590 percpu_write(current_task, next_p); 601 percpu_write(current_task, next_p);
591 602
592 return prev_p; 603 return prev_p;
593} 604}
594 605
595asmlinkage int sys_fork(struct pt_regs regs) 606int sys_fork(struct pt_regs *regs)
596{ 607{
597 return do_fork(SIGCHLD, regs.sp, &regs, 0, NULL, NULL); 608 return do_fork(SIGCHLD, regs->sp, regs, 0, NULL, NULL);
598} 609}
599 610
600asmlinkage int sys_clone(struct pt_regs regs) 611int sys_clone(struct pt_regs *regs)
601{ 612{
602 unsigned long clone_flags; 613 unsigned long clone_flags;
603 unsigned long newsp; 614 unsigned long newsp;
604 int __user *parent_tidptr, *child_tidptr; 615 int __user *parent_tidptr, *child_tidptr;
605 616
606 clone_flags = regs.bx; 617 clone_flags = regs->bx;
607 newsp = regs.cx; 618 newsp = regs->cx;
608 parent_tidptr = (int __user *)regs.dx; 619 parent_tidptr = (int __user *)regs->dx;
609 child_tidptr = (int __user *)regs.di; 620 child_tidptr = (int __user *)regs->di;
610 if (!newsp) 621 if (!newsp)
611 newsp = regs.sp; 622 newsp = regs->sp;
612 return do_fork(clone_flags, newsp, &regs, 0, parent_tidptr, child_tidptr); 623 return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, child_tidptr);
613} 624}
614 625
615/* 626/*
@@ -622,27 +633,27 @@ asmlinkage int sys_clone(struct pt_regs regs)
622 * do not have enough call-clobbered registers to hold all 633 * do not have enough call-clobbered registers to hold all
623 * the information you need. 634 * the information you need.
624 */ 635 */
625asmlinkage int sys_vfork(struct pt_regs regs) 636int sys_vfork(struct pt_regs *regs)
626{ 637{
627 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.sp, &regs, 0, NULL, NULL); 638 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->sp, regs, 0, NULL, NULL);
628} 639}
629 640
630/* 641/*
631 * sys_execve() executes a new program. 642 * sys_execve() executes a new program.
632 */ 643 */
633asmlinkage int sys_execve(struct pt_regs regs) 644int sys_execve(struct pt_regs *regs)
634{ 645{
635 int error; 646 int error;
636 char *filename; 647 char *filename;
637 648
638 filename = getname((char __user *) regs.bx); 649 filename = getname((char __user *) regs->bx);
639 error = PTR_ERR(filename); 650 error = PTR_ERR(filename);
640 if (IS_ERR(filename)) 651 if (IS_ERR(filename))
641 goto out; 652 goto out;
642 error = do_execve(filename, 653 error = do_execve(filename,
643 (char __user * __user *) regs.cx, 654 (char __user * __user *) regs->cx,
644 (char __user * __user *) regs.dx, 655 (char __user * __user *) regs->dx,
645 &regs); 656 regs);
646 if (error == 0) { 657 if (error == 0) {
647 /* Make sure we don't return using sysenter.. */ 658 /* Make sure we don't return using sysenter.. */
648 set_thread_flag(TIF_IRET); 659 set_thread_flag(TIF_IRET);
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 8eb169e45584..836ef6575f01 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -120,12 +120,11 @@ void cpu_idle(void)
120 current_thread_info()->status |= TS_POLLING; 120 current_thread_info()->status |= TS_POLLING;
121 121
122 /* 122 /*
123 * If we're the non-boot CPU, nothing set the PDA stack 123 * If we're the non-boot CPU, nothing set the stack canary up
124 * canary up for us - and if we are the boot CPU we have 124 * for us. CPU0 already has it initialized but no harm in
125 * a 0 stack canary. This is a good place for updating 125 * doing it again. This is a good place for updating it, as
126 * it, as we wont ever return from this function (so the 126 * we wont ever return from this function (so the invalid
127 * invalid canaries already on the stack wont ever 127 * canaries already on the stack wont ever trigger).
128 * trigger):
129 */ 128 */
130 boot_init_stack_canary(); 129 boot_init_stack_canary();
131 130
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 0a5df5f82fb9..d2f7cd5b2c83 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -75,10 +75,7 @@ static inline bool invalid_selector(u16 value)
75static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long regno) 75static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long regno)
76{ 76{
77 BUILD_BUG_ON(offsetof(struct pt_regs, bx) != 0); 77 BUILD_BUG_ON(offsetof(struct pt_regs, bx) != 0);
78 regno >>= 2; 78 return &regs->bx + (regno >> 2);
79 if (regno > FS)
80 --regno;
81 return &regs->bx + regno;
82} 79}
83 80
84static u16 get_segment_reg(struct task_struct *task, unsigned long offset) 81static u16 get_segment_reg(struct task_struct *task, unsigned long offset)
@@ -90,9 +87,10 @@ static u16 get_segment_reg(struct task_struct *task, unsigned long offset)
90 if (offset != offsetof(struct user_regs_struct, gs)) 87 if (offset != offsetof(struct user_regs_struct, gs))
91 retval = *pt_regs_access(task_pt_regs(task), offset); 88 retval = *pt_regs_access(task_pt_regs(task), offset);
92 else { 89 else {
93 retval = task->thread.gs;
94 if (task == current) 90 if (task == current)
95 savesegment(gs, retval); 91 retval = get_user_gs(task_pt_regs(task));
92 else
93 retval = task_user_gs(task);
96 } 94 }
97 return retval; 95 return retval;
98} 96}
@@ -126,13 +124,10 @@ static int set_segment_reg(struct task_struct *task,
126 break; 124 break;
127 125
128 case offsetof(struct user_regs_struct, gs): 126 case offsetof(struct user_regs_struct, gs):
129 task->thread.gs = value;
130 if (task == current) 127 if (task == current)
131 /* 128 set_user_gs(task_pt_regs(task), value);
132 * The user-mode %gs is not affected by 129 else
133 * kernel entry, so we must update the CPU. 130 task_user_gs(task) = value;
134 */
135 loadsegment(gs, value);
136 } 131 }
137 132
138 return 0; 133 return 0;
@@ -810,12 +805,16 @@ static void ptrace_bts_untrace(struct task_struct *child)
810 805
811static void ptrace_bts_detach(struct task_struct *child) 806static void ptrace_bts_detach(struct task_struct *child)
812{ 807{
813 if (unlikely(child->bts)) { 808 /*
814 ds_release_bts(child->bts); 809 * Ptrace_detach() races with ptrace_untrace() in case
815 child->bts = NULL; 810 * the child dies and is reaped by another thread.
816 811 *
817 ptrace_bts_free_buffer(child); 812 * We only do the memory accounting at this point and
818 } 813 * leave the buffer deallocation and the bts tracer
814 * release to ptrace_bts_untrace() which will be called
815 * later on with tasklist_lock held.
816 */
817 release_locked_buffer(child->bts_buffer, child->bts_size);
819} 818}
820#else 819#else
821static inline void ptrace_bts_fork(struct task_struct *tsk) {} 820static inline void ptrace_bts_fork(struct task_struct *tsk) {}
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index f5afe665a82b..b0bbdd4829c9 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -29,122 +29,6 @@ relocate_kernel:
29 * %rdx start address 29 * %rdx start address
30 */ 30 */
31 31
32 /* map the control page at its virtual address */
33
34 movq $0x0000ff8000000000, %r10 /* mask */
35 mov $(39 - 3), %cl /* bits to shift */
36 movq PTR(VA_CONTROL_PAGE)(%rsi), %r11 /* address to map */
37
38 movq %r11, %r9
39 andq %r10, %r9
40 shrq %cl, %r9
41
42 movq PTR(VA_PGD)(%rsi), %r8
43 addq %r8, %r9
44 movq PTR(PA_PUD_0)(%rsi), %r8
45 orq $PAGE_ATTR, %r8
46 movq %r8, (%r9)
47
48 shrq $9, %r10
49 sub $9, %cl
50
51 movq %r11, %r9
52 andq %r10, %r9
53 shrq %cl, %r9
54
55 movq PTR(VA_PUD_0)(%rsi), %r8
56 addq %r8, %r9
57 movq PTR(PA_PMD_0)(%rsi), %r8
58 orq $PAGE_ATTR, %r8
59 movq %r8, (%r9)
60
61 shrq $9, %r10
62 sub $9, %cl
63
64 movq %r11, %r9
65 andq %r10, %r9
66 shrq %cl, %r9
67
68 movq PTR(VA_PMD_0)(%rsi), %r8
69 addq %r8, %r9
70 movq PTR(PA_PTE_0)(%rsi), %r8
71 orq $PAGE_ATTR, %r8
72 movq %r8, (%r9)
73
74 shrq $9, %r10
75 sub $9, %cl
76
77 movq %r11, %r9
78 andq %r10, %r9
79 shrq %cl, %r9
80
81 movq PTR(VA_PTE_0)(%rsi), %r8
82 addq %r8, %r9
83 movq PTR(PA_CONTROL_PAGE)(%rsi), %r8
84 orq $PAGE_ATTR, %r8
85 movq %r8, (%r9)
86
87 /* identity map the control page at its physical address */
88
89 movq $0x0000ff8000000000, %r10 /* mask */
90 mov $(39 - 3), %cl /* bits to shift */
91 movq PTR(PA_CONTROL_PAGE)(%rsi), %r11 /* address to map */
92
93 movq %r11, %r9
94 andq %r10, %r9
95 shrq %cl, %r9
96
97 movq PTR(VA_PGD)(%rsi), %r8
98 addq %r8, %r9
99 movq PTR(PA_PUD_1)(%rsi), %r8
100 orq $PAGE_ATTR, %r8
101 movq %r8, (%r9)
102
103 shrq $9, %r10
104 sub $9, %cl
105
106 movq %r11, %r9
107 andq %r10, %r9
108 shrq %cl, %r9
109
110 movq PTR(VA_PUD_1)(%rsi), %r8
111 addq %r8, %r9
112 movq PTR(PA_PMD_1)(%rsi), %r8
113 orq $PAGE_ATTR, %r8
114 movq %r8, (%r9)
115
116 shrq $9, %r10
117 sub $9, %cl
118
119 movq %r11, %r9
120 andq %r10, %r9
121 shrq %cl, %r9
122
123 movq PTR(VA_PMD_1)(%rsi), %r8
124 addq %r8, %r9
125 movq PTR(PA_PTE_1)(%rsi), %r8
126 orq $PAGE_ATTR, %r8
127 movq %r8, (%r9)
128
129 shrq $9, %r10
130 sub $9, %cl
131
132 movq %r11, %r9
133 andq %r10, %r9
134 shrq %cl, %r9
135
136 movq PTR(VA_PTE_1)(%rsi), %r8
137 addq %r8, %r9
138 movq PTR(PA_CONTROL_PAGE)(%rsi), %r8
139 orq $PAGE_ATTR, %r8
140 movq %r8, (%r9)
141
142relocate_new_kernel:
143 /* %rdi indirection_page
144 * %rsi page_list
145 * %rdx start address
146 */
147
148 /* zero out flags, and disable interrupts */ 32 /* zero out flags, and disable interrupts */
149 pushq $0 33 pushq $0
150 popfq 34 popfq
@@ -156,9 +40,8 @@ relocate_new_kernel:
156 /* get physical address of page table now too */ 40 /* get physical address of page table now too */
157 movq PTR(PA_TABLE_PAGE)(%rsi), %rcx 41 movq PTR(PA_TABLE_PAGE)(%rsi), %rcx
158 42
159 /* switch to new set of page tables */ 43 /* Switch to the identity mapped page tables */
160 movq PTR(PA_PGD)(%rsi), %r9 44 movq %rcx, %cr3
161 movq %r9, %cr3
162 45
163 /* setup a new stack at the end of the physical control page */ 46 /* setup a new stack at the end of the physical control page */
164 lea PAGE_SIZE(%r8), %rsp 47 lea PAGE_SIZE(%r8), %rsp
@@ -194,9 +77,7 @@ identity_mapped:
194 jmp 1f 77 jmp 1f
1951: 781:
196 79
197 /* Switch to the identity mapped page tables, 80 /* Flush the TLB (needed?) */
198 * and flush the TLB.
199 */
200 movq %rcx, %cr3 81 movq %rcx, %cr3
201 82
202 /* Do the copies */ 83 /* Do the copies */
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index ef91747bbed5..d992e6cff730 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -16,6 +16,7 @@
16#include <asm/proto.h> 16#include <asm/proto.h>
17#include <asm/cpumask.h> 17#include <asm/cpumask.h>
18#include <asm/cpu.h> 18#include <asm/cpu.h>
19#include <asm/stackprotector.h>
19 20
20#ifdef CONFIG_DEBUG_PER_CPU_MAPS 21#ifdef CONFIG_DEBUG_PER_CPU_MAPS
21# define DBG(x...) printk(KERN_DEBUG x) 22# define DBG(x...) printk(KERN_DEBUG x)
@@ -95,6 +96,7 @@ void __init setup_per_cpu_areas(void)
95 per_cpu(this_cpu_off, cpu) = per_cpu_offset(cpu); 96 per_cpu(this_cpu_off, cpu) = per_cpu_offset(cpu);
96 per_cpu(cpu_number, cpu) = cpu; 97 per_cpu(cpu_number, cpu) = cpu;
97 setup_percpu_segment(cpu); 98 setup_percpu_segment(cpu);
99 setup_stack_canary_segment(cpu);
98 /* 100 /*
99 * Copy data used in early init routines from the 101 * Copy data used in early init routines from the
100 * initial arrays to the per cpu data areas. These 102 * initial arrays to the per cpu data areas. These
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 7fc78b019815..7cdcd16885ed 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -50,27 +50,23 @@
50# define FIX_EFLAGS __FIX_EFLAGS 50# define FIX_EFLAGS __FIX_EFLAGS
51#endif 51#endif
52 52
53#define COPY(x) { \ 53#define COPY(x) do { \
54 get_user_ex(regs->x, &sc->x); \ 54 get_user_ex(regs->x, &sc->x); \
55} 55} while (0)
56 56
57#define COPY_SEG(seg) { \ 57#define GET_SEG(seg) ({ \
58 unsigned short tmp; \ 58 unsigned short tmp; \
59 get_user_ex(tmp, &sc->seg); \ 59 get_user_ex(tmp, &sc->seg); \
60 regs->seg = tmp; \ 60 tmp; \
61} 61})
62 62
63#define COPY_SEG_CPL3(seg) { \ 63#define COPY_SEG(seg) do { \
64 unsigned short tmp; \ 64 regs->seg = GET_SEG(seg); \
65 get_user_ex(tmp, &sc->seg); \ 65} while (0)
66 regs->seg = tmp | 3; \
67}
68 66
69#define GET_SEG(seg) { \ 67#define COPY_SEG_CPL3(seg) do { \
70 unsigned short tmp; \ 68 regs->seg = GET_SEG(seg) | 3; \
71 get_user_ex(tmp, &sc->seg); \ 69} while (0)
72 loadsegment(seg, tmp); \
73}
74 70
75static int 71static int
76restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, 72restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
@@ -86,7 +82,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
86 get_user_try { 82 get_user_try {
87 83
88#ifdef CONFIG_X86_32 84#ifdef CONFIG_X86_32
89 GET_SEG(gs); 85 set_user_gs(regs, GET_SEG(gs));
90 COPY_SEG(fs); 86 COPY_SEG(fs);
91 COPY_SEG(es); 87 COPY_SEG(es);
92 COPY_SEG(ds); 88 COPY_SEG(ds);
@@ -138,12 +134,7 @@ setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
138 put_user_try { 134 put_user_try {
139 135
140#ifdef CONFIG_X86_32 136#ifdef CONFIG_X86_32
141 { 137 put_user_ex(get_user_gs(regs), (unsigned int __user *)&sc->gs);
142 unsigned int tmp;
143
144 savesegment(gs, tmp);
145 put_user_ex(tmp, (unsigned int __user *)&sc->gs);
146 }
147 put_user_ex(regs->fs, (unsigned int __user *)&sc->fs); 138 put_user_ex(regs->fs, (unsigned int __user *)&sc->fs);
148 put_user_ex(regs->es, (unsigned int __user *)&sc->es); 139 put_user_ex(regs->es, (unsigned int __user *)&sc->es);
149 put_user_ex(regs->ds, (unsigned int __user *)&sc->ds); 140 put_user_ex(regs->ds, (unsigned int __user *)&sc->ds);
@@ -558,14 +549,9 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
558#endif /* CONFIG_X86_32 */ 549#endif /* CONFIG_X86_32 */
559 550
560#ifdef CONFIG_X86_32 551#ifdef CONFIG_X86_32
561asmlinkage int sys_sigaltstack(unsigned long bx) 552int sys_sigaltstack(struct pt_regs *regs)
562{ 553{
563 /* 554 const stack_t __user *uss = (const stack_t __user *)regs->bx;
564 * This is needed to make gcc realize it doesn't own the
565 * "struct pt_regs"
566 */
567 struct pt_regs *regs = (struct pt_regs *)&bx;
568 const stack_t __user *uss = (const stack_t __user *)bx;
569 stack_t __user *uoss = (stack_t __user *)regs->cx; 555 stack_t __user *uoss = (stack_t __user *)regs->cx;
570 556
571 return do_sigaltstack(uss, uoss, regs->sp); 557 return do_sigaltstack(uss, uoss, regs->sp);
@@ -583,14 +569,12 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
583 * Do a signal return; undo the signal stack. 569 * Do a signal return; undo the signal stack.
584 */ 570 */
585#ifdef CONFIG_X86_32 571#ifdef CONFIG_X86_32
586asmlinkage unsigned long sys_sigreturn(unsigned long __unused) 572unsigned long sys_sigreturn(struct pt_regs *regs)
587{ 573{
588 struct sigframe __user *frame; 574 struct sigframe __user *frame;
589 struct pt_regs *regs;
590 unsigned long ax; 575 unsigned long ax;
591 sigset_t set; 576 sigset_t set;
592 577
593 regs = (struct pt_regs *) &__unused;
594 frame = (struct sigframe __user *)(regs->sp - 8); 578 frame = (struct sigframe __user *)(regs->sp - 8);
595 579
596 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 580 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -617,7 +601,7 @@ badframe:
617} 601}
618#endif /* CONFIG_X86_32 */ 602#endif /* CONFIG_X86_32 */
619 603
620static long do_rt_sigreturn(struct pt_regs *regs) 604long sys_rt_sigreturn(struct pt_regs *regs)
621{ 605{
622 struct rt_sigframe __user *frame; 606 struct rt_sigframe __user *frame;
623 unsigned long ax; 607 unsigned long ax;
@@ -648,25 +632,6 @@ badframe:
648 return 0; 632 return 0;
649} 633}
650 634
651#ifdef CONFIG_X86_32
652/*
653 * Note: do not pass in pt_regs directly as with tail-call optimization
654 * GCC will incorrectly stomp on the caller's frame and corrupt user-space
655 * register state:
656 */
657asmlinkage int sys_rt_sigreturn(unsigned long __unused)
658{
659 struct pt_regs *regs = (struct pt_regs *)&__unused;
660
661 return do_rt_sigreturn(regs);
662}
663#else /* !CONFIG_X86_32 */
664asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
665{
666 return do_rt_sigreturn(regs);
667}
668#endif /* CONFIG_X86_32 */
669
670/* 635/*
671 * OK, we're invoking a handler: 636 * OK, we're invoking a handler:
672 */ 637 */
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
index e2e86a08f31d..3bdb64829b82 100644
--- a/arch/x86/kernel/syscall_table_32.S
+++ b/arch/x86/kernel/syscall_table_32.S
@@ -1,7 +1,7 @@
1ENTRY(sys_call_table) 1ENTRY(sys_call_table)
2 .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */ 2 .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
3 .long sys_exit 3 .long sys_exit
4 .long sys_fork 4 .long ptregs_fork
5 .long sys_read 5 .long sys_read
6 .long sys_write 6 .long sys_write
7 .long sys_open /* 5 */ 7 .long sys_open /* 5 */
@@ -10,7 +10,7 @@ ENTRY(sys_call_table)
10 .long sys_creat 10 .long sys_creat
11 .long sys_link 11 .long sys_link
12 .long sys_unlink /* 10 */ 12 .long sys_unlink /* 10 */
13 .long sys_execve 13 .long ptregs_execve
14 .long sys_chdir 14 .long sys_chdir
15 .long sys_time 15 .long sys_time
16 .long sys_mknod 16 .long sys_mknod
@@ -109,17 +109,17 @@ ENTRY(sys_call_table)
109 .long sys_newlstat 109 .long sys_newlstat
110 .long sys_newfstat 110 .long sys_newfstat
111 .long sys_uname 111 .long sys_uname
112 .long sys_iopl /* 110 */ 112 .long ptregs_iopl /* 110 */
113 .long sys_vhangup 113 .long sys_vhangup
114 .long sys_ni_syscall /* old "idle" system call */ 114 .long sys_ni_syscall /* old "idle" system call */
115 .long sys_vm86old 115 .long ptregs_vm86old
116 .long sys_wait4 116 .long sys_wait4
117 .long sys_swapoff /* 115 */ 117 .long sys_swapoff /* 115 */
118 .long sys_sysinfo 118 .long sys_sysinfo
119 .long sys_ipc 119 .long sys_ipc
120 .long sys_fsync 120 .long sys_fsync
121 .long sys_sigreturn 121 .long ptregs_sigreturn
122 .long sys_clone /* 120 */ 122 .long ptregs_clone /* 120 */
123 .long sys_setdomainname 123 .long sys_setdomainname
124 .long sys_newuname 124 .long sys_newuname
125 .long sys_modify_ldt 125 .long sys_modify_ldt
@@ -165,14 +165,14 @@ ENTRY(sys_call_table)
165 .long sys_mremap 165 .long sys_mremap
166 .long sys_setresuid16 166 .long sys_setresuid16
167 .long sys_getresuid16 /* 165 */ 167 .long sys_getresuid16 /* 165 */
168 .long sys_vm86 168 .long ptregs_vm86
169 .long sys_ni_syscall /* Old sys_query_module */ 169 .long sys_ni_syscall /* Old sys_query_module */
170 .long sys_poll 170 .long sys_poll
171 .long sys_nfsservctl 171 .long sys_nfsservctl
172 .long sys_setresgid16 /* 170 */ 172 .long sys_setresgid16 /* 170 */
173 .long sys_getresgid16 173 .long sys_getresgid16
174 .long sys_prctl 174 .long sys_prctl
175 .long sys_rt_sigreturn 175 .long ptregs_rt_sigreturn
176 .long sys_rt_sigaction 176 .long sys_rt_sigaction
177 .long sys_rt_sigprocmask /* 175 */ 177 .long sys_rt_sigprocmask /* 175 */
178 .long sys_rt_sigpending 178 .long sys_rt_sigpending
@@ -185,11 +185,11 @@ ENTRY(sys_call_table)
185 .long sys_getcwd 185 .long sys_getcwd
186 .long sys_capget 186 .long sys_capget
187 .long sys_capset /* 185 */ 187 .long sys_capset /* 185 */
188 .long sys_sigaltstack 188 .long ptregs_sigaltstack
189 .long sys_sendfile 189 .long sys_sendfile
190 .long sys_ni_syscall /* reserved for streams1 */ 190 .long sys_ni_syscall /* reserved for streams1 */
191 .long sys_ni_syscall /* reserved for streams2 */ 191 .long sys_ni_syscall /* reserved for streams2 */
192 .long sys_vfork /* 190 */ 192 .long ptregs_vfork /* 190 */
193 .long sys_getrlimit 193 .long sys_getrlimit
194 .long sys_mmap2 194 .long sys_mmap2
195 .long sys_truncate64 195 .long sys_truncate64
diff --git a/arch/x86/kernel/trampoline_64.S b/arch/x86/kernel/trampoline_64.S
index 894293c598db..95a012a4664e 100644
--- a/arch/x86/kernel/trampoline_64.S
+++ b/arch/x86/kernel/trampoline_64.S
@@ -29,6 +29,7 @@
29#include <asm/page.h> 29#include <asm/page.h>
30#include <asm/msr.h> 30#include <asm/msr.h>
31#include <asm/segment.h> 31#include <asm/segment.h>
32#include <asm/processor-flags.h>
32 33
33.section .rodata, "a", @progbits 34.section .rodata, "a", @progbits
34 35
@@ -37,7 +38,7 @@
37ENTRY(trampoline_data) 38ENTRY(trampoline_data)
38r_base = . 39r_base = .
39 cli # We should be safe anyway 40 cli # We should be safe anyway
40 wbinvd 41 wbinvd
41 mov %cs, %ax # Code and data in the same place 42 mov %cs, %ax # Code and data in the same place
42 mov %ax, %ds 43 mov %ax, %ds
43 mov %ax, %es 44 mov %ax, %es
@@ -73,9 +74,8 @@ r_base = .
73 lidtl tidt - r_base # load idt with 0, 0 74 lidtl tidt - r_base # load idt with 0, 0
74 lgdtl tgdt - r_base # load gdt with whatever is appropriate 75 lgdtl tgdt - r_base # load gdt with whatever is appropriate
75 76
76 xor %ax, %ax 77 mov $X86_CR0_PE, %ax # protected mode (PE) bit
77 inc %ax # protected mode (PE) bit 78 lmsw %ax # into protected mode
78 lmsw %ax # into protected mode
79 79
80 # flush prefetch and jump to startup_32 80 # flush prefetch and jump to startup_32
81 ljmpl *(startup_32_vector - r_base) 81 ljmpl *(startup_32_vector - r_base)
@@ -86,9 +86,8 @@ startup_32:
86 movl $__KERNEL_DS, %eax # Initialize the %ds segment register 86 movl $__KERNEL_DS, %eax # Initialize the %ds segment register
87 movl %eax, %ds 87 movl %eax, %ds
88 88
89 xorl %eax, %eax 89 movl $X86_CR4_PAE, %eax
90 btsl $5, %eax # Enable PAE mode 90 movl %eax, %cr4 # Enable PAE mode
91 movl %eax, %cr4
92 91
93 # Setup trampoline 4 level pagetables 92 # Setup trampoline 4 level pagetables
94 leal (trampoline_level4_pgt - r_base)(%esi), %eax 93 leal (trampoline_level4_pgt - r_base)(%esi), %eax
@@ -99,9 +98,9 @@ startup_32:
99 xorl %edx, %edx 98 xorl %edx, %edx
100 wrmsr 99 wrmsr
101 100
102 xorl %eax, %eax 101 # Enable paging and in turn activate Long Mode
103 btsl $31, %eax # Enable paging and in turn activate Long Mode 102 # Enable protected mode
104 btsl $0, %eax # Enable protected mode 103 movl $(X86_CR0_PG | X86_CR0_PE), %eax
105 movl %eax, %cr0 104 movl %eax, %cr0
106 105
107 /* 106 /*
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 0d032d2d8a18..acb8c0585ab9 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -98,6 +98,12 @@ static inline void preempt_conditional_sti(struct pt_regs *regs)
98 local_irq_enable(); 98 local_irq_enable();
99} 99}
100 100
101static inline void conditional_cli(struct pt_regs *regs)
102{
103 if (regs->flags & X86_EFLAGS_IF)
104 local_irq_disable();
105}
106
101static inline void preempt_conditional_cli(struct pt_regs *regs) 107static inline void preempt_conditional_cli(struct pt_regs *regs)
102{ 108{
103 if (regs->flags & X86_EFLAGS_IF) 109 if (regs->flags & X86_EFLAGS_IF)
@@ -625,8 +631,10 @@ clear_dr7:
625 631
626#ifdef CONFIG_X86_32 632#ifdef CONFIG_X86_32
627debug_vm86: 633debug_vm86:
634 /* reenable preemption: handle_vm86_trap() might sleep */
635 dec_preempt_count();
628 handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1); 636 handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1);
629 preempt_conditional_cli(regs); 637 conditional_cli(regs);
630 return; 638 return;
631#endif 639#endif
632 640
@@ -905,19 +913,20 @@ void math_emulate(struct math_emu_info *info)
905} 913}
906#endif /* CONFIG_MATH_EMULATION */ 914#endif /* CONFIG_MATH_EMULATION */
907 915
908dotraplinkage void __kprobes do_device_not_available(struct pt_regs regs) 916dotraplinkage void __kprobes
917do_device_not_available(struct pt_regs *regs, long error_code)
909{ 918{
910#ifdef CONFIG_X86_32 919#ifdef CONFIG_X86_32
911 if (read_cr0() & X86_CR0_EM) { 920 if (read_cr0() & X86_CR0_EM) {
912 struct math_emu_info info = { }; 921 struct math_emu_info info = { };
913 922
914 conditional_sti(&regs); 923 conditional_sti(regs);
915 924
916 info.regs = &regs; 925 info.regs = regs;
917 math_emulate(&info); 926 math_emulate(&info);
918 } else { 927 } else {
919 math_state_restore(); /* interrupts still off */ 928 math_state_restore(); /* interrupts still off */
920 conditional_sti(&regs); 929 conditional_sti(regs);
921 } 930 }
922#else 931#else
923 math_state_restore(); 932 math_state_restore();
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index 4eeb5cf9720d..d7ac84e7fc1c 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -158,7 +158,7 @@ struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
158 ret = KVM86->regs32; 158 ret = KVM86->regs32;
159 159
160 ret->fs = current->thread.saved_fs; 160 ret->fs = current->thread.saved_fs;
161 loadsegment(gs, current->thread.saved_gs); 161 set_user_gs(ret, current->thread.saved_gs);
162 162
163 return ret; 163 return ret;
164} 164}
@@ -197,9 +197,9 @@ out:
197static int do_vm86_irq_handling(int subfunction, int irqnumber); 197static int do_vm86_irq_handling(int subfunction, int irqnumber);
198static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk); 198static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk);
199 199
200asmlinkage int sys_vm86old(struct pt_regs regs) 200int sys_vm86old(struct pt_regs *regs)
201{ 201{
202 struct vm86_struct __user *v86 = (struct vm86_struct __user *)regs.bx; 202 struct vm86_struct __user *v86 = (struct vm86_struct __user *)regs->bx;
203 struct kernel_vm86_struct info; /* declare this _on top_, 203 struct kernel_vm86_struct info; /* declare this _on top_,
204 * this avoids wasting of stack space. 204 * this avoids wasting of stack space.
205 * This remains on the stack until we 205 * This remains on the stack until we
@@ -218,7 +218,7 @@ asmlinkage int sys_vm86old(struct pt_regs regs)
218 if (tmp) 218 if (tmp)
219 goto out; 219 goto out;
220 memset(&info.vm86plus, 0, (int)&info.regs32 - (int)&info.vm86plus); 220 memset(&info.vm86plus, 0, (int)&info.regs32 - (int)&info.vm86plus);
221 info.regs32 = &regs; 221 info.regs32 = regs;
222 tsk->thread.vm86_info = v86; 222 tsk->thread.vm86_info = v86;
223 do_sys_vm86(&info, tsk); 223 do_sys_vm86(&info, tsk);
224 ret = 0; /* we never return here */ 224 ret = 0; /* we never return here */
@@ -227,7 +227,7 @@ out:
227} 227}
228 228
229 229
230asmlinkage int sys_vm86(struct pt_regs regs) 230int sys_vm86(struct pt_regs *regs)
231{ 231{
232 struct kernel_vm86_struct info; /* declare this _on top_, 232 struct kernel_vm86_struct info; /* declare this _on top_,
233 * this avoids wasting of stack space. 233 * this avoids wasting of stack space.
@@ -239,12 +239,12 @@ asmlinkage int sys_vm86(struct pt_regs regs)
239 struct vm86plus_struct __user *v86; 239 struct vm86plus_struct __user *v86;
240 240
241 tsk = current; 241 tsk = current;
242 switch (regs.bx) { 242 switch (regs->bx) {
243 case VM86_REQUEST_IRQ: 243 case VM86_REQUEST_IRQ:
244 case VM86_FREE_IRQ: 244 case VM86_FREE_IRQ:
245 case VM86_GET_IRQ_BITS: 245 case VM86_GET_IRQ_BITS:
246 case VM86_GET_AND_RESET_IRQ: 246 case VM86_GET_AND_RESET_IRQ:
247 ret = do_vm86_irq_handling(regs.bx, (int)regs.cx); 247 ret = do_vm86_irq_handling(regs->bx, (int)regs->cx);
248 goto out; 248 goto out;
249 case VM86_PLUS_INSTALL_CHECK: 249 case VM86_PLUS_INSTALL_CHECK:
250 /* 250 /*
@@ -261,14 +261,14 @@ asmlinkage int sys_vm86(struct pt_regs regs)
261 ret = -EPERM; 261 ret = -EPERM;
262 if (tsk->thread.saved_sp0) 262 if (tsk->thread.saved_sp0)
263 goto out; 263 goto out;
264 v86 = (struct vm86plus_struct __user *)regs.cx; 264 v86 = (struct vm86plus_struct __user *)regs->cx;
265 tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs, 265 tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs,
266 offsetof(struct kernel_vm86_struct, regs32) - 266 offsetof(struct kernel_vm86_struct, regs32) -
267 sizeof(info.regs)); 267 sizeof(info.regs));
268 ret = -EFAULT; 268 ret = -EFAULT;
269 if (tmp) 269 if (tmp)
270 goto out; 270 goto out;
271 info.regs32 = &regs; 271 info.regs32 = regs;
272 info.vm86plus.is_vm86pus = 1; 272 info.vm86plus.is_vm86pus = 1;
273 tsk->thread.vm86_info = (struct vm86_struct __user *)v86; 273 tsk->thread.vm86_info = (struct vm86_struct __user *)v86;
274 do_sys_vm86(&info, tsk); 274 do_sys_vm86(&info, tsk);
@@ -323,7 +323,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
323 info->regs32->ax = 0; 323 info->regs32->ax = 0;
324 tsk->thread.saved_sp0 = tsk->thread.sp0; 324 tsk->thread.saved_sp0 = tsk->thread.sp0;
325 tsk->thread.saved_fs = info->regs32->fs; 325 tsk->thread.saved_fs = info->regs32->fs;
326 savesegment(gs, tsk->thread.saved_gs); 326 tsk->thread.saved_gs = get_user_gs(info->regs32);
327 327
328 tss = &per_cpu(init_tss, get_cpu()); 328 tss = &per_cpu(init_tss, get_cpu());
329 tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0; 329 tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0;
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index 07f62d287ff0..087a7f2c639b 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -257,6 +257,14 @@ SECTIONS
257 DWARF_DEBUG 257 DWARF_DEBUG
258} 258}
259 259
260 /*
261 * Per-cpu symbols which need to be offset from __per_cpu_load
262 * for the boot processor.
263 */
264#define INIT_PER_CPU(x) init_per_cpu__##x = per_cpu__##x + __per_cpu_load
265INIT_PER_CPU(gdt_page);
266INIT_PER_CPU(irq_stack_union);
267
260/* 268/*
261 * Build-time check on the image size: 269 * Build-time check on the image size:
262 */ 270 */
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 19e33b6cd593..da2e314f61b5 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -283,7 +283,7 @@ static void lguest_load_tls(struct thread_struct *t, unsigned int cpu)
283 /* There's one problem which normal hardware doesn't have: the Host 283 /* There's one problem which normal hardware doesn't have: the Host
284 * can't handle us removing entries we're currently using. So we clear 284 * can't handle us removing entries we're currently using. So we clear
285 * the GS register here: if it's needed it'll be reloaded anyway. */ 285 * the GS register here: if it's needed it'll be reloaded anyway. */
286 loadsegment(gs, 0); 286 lazy_load_gs(0);
287 lazy_hcall(LHCALL_LOAD_TLS, __pa(&t->tls_array), cpu, 0); 287 lazy_hcall(LHCALL_LOAD_TLS, __pa(&t->tls_array), cpu, 0);
288} 288}
289 289
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c
index 6f5a38c7f900..98e3c2bc7563 100644
--- a/arch/x86/mach-voyager/voyager_smp.c
+++ b/arch/x86/mach-voyager/voyager_smp.c
@@ -1747,10 +1747,11 @@ static void __cpuinit voyager_smp_prepare_boot_cpu(void)
1747 int cpu = smp_processor_id(); 1747 int cpu = smp_processor_id();
1748 switch_to_new_gdt(cpu); 1748 switch_to_new_gdt(cpu);
1749 1749
1750 cpu_online_map = cpumask_of_cpu(smp_processor_id()); 1750 cpu_set(cpu, cpu_online_map);
1751 cpu_callout_map = cpumask_of_cpu(smp_processor_id()); 1751 cpu_set(cpu, cpu_callout_map);
1752 cpu_callin_map = CPU_MASK_NONE; 1752 cpu_set(cpu, cpu_possible_map);
1753 cpu_present_map = cpumask_of_cpu(smp_processor_id()); 1753 cpu_set(cpu, cpu_present_map);
1754
1754} 1755}
1755 1756
1756static int __cpuinit voyager_cpu_up(unsigned int cpu) 1757static int __cpuinit voyager_cpu_up(unsigned int cpu)
diff --git a/arch/x86/math-emu/get_address.c b/arch/x86/math-emu/get_address.c
index 420b3b6e3915..6ef5e99380f9 100644
--- a/arch/x86/math-emu/get_address.c
+++ b/arch/x86/math-emu/get_address.c
@@ -150,11 +150,9 @@ static long pm_address(u_char FPU_modrm, u_char segment,
150#endif /* PARANOID */ 150#endif /* PARANOID */
151 151
152 switch (segment) { 152 switch (segment) {
153 /* gs isn't used by the kernel, so it still has its
154 user-space value. */
155 case PREFIX_GS_ - 1: 153 case PREFIX_GS_ - 1:
156 /* N.B. - movl %seg, mem is a 2 byte write regardless of prefix */ 154 /* user gs handling can be lazy, use special accessors */
157 savesegment(gs, addr->selector); 155 addr->selector = get_user_gs(FPU_info->regs);
158 break; 156 break;
159 default: 157 default:
160 addr->selector = PM_REG_(segment); 158 addr->selector = PM_REG_(segment);
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 2a9ea3aee493..29644175490f 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -782,6 +782,15 @@ static inline int access_error(unsigned long error_code, int write,
782 return 0; 782 return 0;
783} 783}
784 784
785static int fault_in_kernel_space(unsigned long address)
786{
787#ifdef CONFIG_X86_32
788 return address >= TASK_SIZE;
789#else /* !CONFIG_X86_32 */
790 return address >= TASK_SIZE64;
791#endif /* CONFIG_X86_32 */
792}
793
785/* 794/*
786 * This routine handles page faults. It determines the address, 795 * This routine handles page faults. It determines the address,
787 * and the problem, and then passes it off to one of the appropriate 796 * and the problem, and then passes it off to one of the appropriate
@@ -822,11 +831,7 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
822 * (error_code & 4) == 0, and that the fault was not a 831 * (error_code & 4) == 0, and that the fault was not a
823 * protection error (error_code & 9) == 0. 832 * protection error (error_code & 9) == 0.
824 */ 833 */
825#ifdef CONFIG_X86_32 834 if (unlikely(fault_in_kernel_space(address))) {
826 if (unlikely(address >= TASK_SIZE)) {
827#else
828 if (unlikely(address >= TASK_SIZE64)) {
829#endif
830 if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) && 835 if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) &&
831 vmalloc_fault(address) >= 0) 836 vmalloc_fault(address) >= 0)
832 return; 837 return;
@@ -846,6 +851,7 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
846 return; 851 return;
847 } 852 }
848 853
854 /* kprobes don't want to hook the spurious faults. */
849 if (unlikely(notify_page_fault(regs))) 855 if (unlikely(notify_page_fault(regs)))
850 return; 856 return;
851 /* 857 /*
@@ -898,6 +904,12 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
898 return; 904 return;
899 } 905 }
900 down_read(&mm->mmap_sem); 906 down_read(&mm->mmap_sem);
907 } else {
908 /*
909 * The above down_read_trylock() might have succeeded in which
910 * case we'll have missed the might_sleep() from down_read().
911 */
912 might_sleep();
901 } 913 }
902 914
903 vma = find_vma(mm, address); 915 vma = find_vma(mm, address);
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 00263bf07a88..06708ee94aa4 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -674,75 +674,97 @@ static int __init parse_highmem(char *arg)
674} 674}
675early_param("highmem", parse_highmem); 675early_param("highmem", parse_highmem);
676 676
677#define MSG_HIGHMEM_TOO_BIG \
678 "highmem size (%luMB) is bigger than pages available (%luMB)!\n"
679
680#define MSG_LOWMEM_TOO_SMALL \
681 "highmem size (%luMB) results in <64MB lowmem, ignoring it!\n"
677/* 682/*
678 * Determine low and high memory ranges: 683 * All of RAM fits into lowmem - but if user wants highmem
684 * artificially via the highmem=x boot parameter then create
685 * it:
679 */ 686 */
680void __init find_low_pfn_range(void) 687void __init lowmem_pfn_init(void)
681{ 688{
682 /* it could update max_pfn */
683
684 /* max_low_pfn is 0, we already have early_res support */ 689 /* max_low_pfn is 0, we already have early_res support */
685
686 max_low_pfn = max_pfn; 690 max_low_pfn = max_pfn;
687 if (max_low_pfn > MAXMEM_PFN) { 691
688 if (highmem_pages == -1) 692 if (highmem_pages == -1)
689 highmem_pages = max_pfn - MAXMEM_PFN; 693 highmem_pages = 0;
690 if (highmem_pages + MAXMEM_PFN < max_pfn) 694#ifdef CONFIG_HIGHMEM
691 max_pfn = MAXMEM_PFN + highmem_pages; 695 if (highmem_pages >= max_pfn) {
692 if (highmem_pages + MAXMEM_PFN > max_pfn) { 696 printk(KERN_ERR MSG_HIGHMEM_TOO_BIG,
693 printk(KERN_WARNING "only %luMB highmem pages " 697 pages_to_mb(highmem_pages), pages_to_mb(max_pfn));
694 "available, ignoring highmem size of %uMB.\n", 698 highmem_pages = 0;
695 pages_to_mb(max_pfn - MAXMEM_PFN), 699 }
700 if (highmem_pages) {
701 if (max_low_pfn - highmem_pages < 64*1024*1024/PAGE_SIZE) {
702 printk(KERN_ERR MSG_LOWMEM_TOO_SMALL,
696 pages_to_mb(highmem_pages)); 703 pages_to_mb(highmem_pages));
697 highmem_pages = 0; 704 highmem_pages = 0;
698 } 705 }
699 max_low_pfn = MAXMEM_PFN; 706 max_low_pfn -= highmem_pages;
707 }
708#else
709 if (highmem_pages)
710 printk(KERN_ERR "ignoring highmem size on non-highmem kernel!\n");
711#endif
712}
713
714#define MSG_HIGHMEM_TOO_SMALL \
715 "only %luMB highmem pages available, ignoring highmem size of %luMB!\n"
716
717#define MSG_HIGHMEM_TRIMMED \
718 "Warning: only 4GB will be used. Use a HIGHMEM64G enabled kernel!\n"
719/*
720 * We have more RAM than fits into lowmem - we try to put it into
721 * highmem, also taking the highmem=x boot parameter into account:
722 */
723void __init highmem_pfn_init(void)
724{
725 max_low_pfn = MAXMEM_PFN;
726
727 if (highmem_pages == -1)
728 highmem_pages = max_pfn - MAXMEM_PFN;
729
730 if (highmem_pages + MAXMEM_PFN < max_pfn)
731 max_pfn = MAXMEM_PFN + highmem_pages;
732
733 if (highmem_pages + MAXMEM_PFN > max_pfn) {
734 printk(KERN_WARNING MSG_HIGHMEM_TOO_SMALL,
735 pages_to_mb(max_pfn - MAXMEM_PFN),
736 pages_to_mb(highmem_pages));
737 highmem_pages = 0;
738 }
700#ifndef CONFIG_HIGHMEM 739#ifndef CONFIG_HIGHMEM
701 /* Maximum memory usable is what is directly addressable */ 740 /* Maximum memory usable is what is directly addressable */
702 printk(KERN_WARNING "Warning only %ldMB will be used.\n", 741 printk(KERN_WARNING "Warning only %ldMB will be used.\n", MAXMEM>>20);
703 MAXMEM>>20); 742 if (max_pfn > MAX_NONPAE_PFN)
704 if (max_pfn > MAX_NONPAE_PFN) 743 printk(KERN_WARNING "Use a HIGHMEM64G enabled kernel.\n");
705 printk(KERN_WARNING 744 else
706 "Use a HIGHMEM64G enabled kernel.\n"); 745 printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
707 else 746 max_pfn = MAXMEM_PFN;
708 printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
709 max_pfn = MAXMEM_PFN;
710#else /* !CONFIG_HIGHMEM */ 747#else /* !CONFIG_HIGHMEM */
711#ifndef CONFIG_HIGHMEM64G 748#ifndef CONFIG_HIGHMEM64G
712 if (max_pfn > MAX_NONPAE_PFN) { 749 if (max_pfn > MAX_NONPAE_PFN) {
713 max_pfn = MAX_NONPAE_PFN; 750 max_pfn = MAX_NONPAE_PFN;
714 printk(KERN_WARNING "Warning only 4GB will be used." 751 printk(KERN_WARNING MSG_HIGHMEM_TRIMMED);
715 "Use a HIGHMEM64G enabled kernel.\n"); 752 }
716 }
717#endif /* !CONFIG_HIGHMEM64G */ 753#endif /* !CONFIG_HIGHMEM64G */
718#endif /* !CONFIG_HIGHMEM */ 754#endif /* !CONFIG_HIGHMEM */
719 } else { 755}
720 if (highmem_pages == -1) 756
721 highmem_pages = 0; 757/*
722#ifdef CONFIG_HIGHMEM 758 * Determine low and high memory ranges:
723 if (highmem_pages >= max_pfn) { 759 */
724 printk(KERN_ERR "highmem size specified (%uMB) is " 760void __init find_low_pfn_range(void)
725 "bigger than pages available (%luMB)!.\n", 761{
726 pages_to_mb(highmem_pages), 762 /* it could update max_pfn */
727 pages_to_mb(max_pfn)); 763
728 highmem_pages = 0; 764 if (max_pfn <= MAXMEM_PFN)
729 } 765 lowmem_pfn_init();
730 if (highmem_pages) { 766 else
731 if (max_low_pfn - highmem_pages < 767 highmem_pfn_init();
732 64*1024*1024/PAGE_SIZE){
733 printk(KERN_ERR "highmem size %uMB results in "
734 "smaller than 64MB lowmem, ignoring it.\n"
735 , pages_to_mb(highmem_pages));
736 highmem_pages = 0;
737 }
738 max_low_pfn -= highmem_pages;
739 }
740#else
741 if (highmem_pages)
742 printk(KERN_ERR "ignoring highmem size on non-highmem"
743 " kernel!\n");
744#endif
745 }
746} 768}
747 769
748#ifndef CONFIG_NEED_MULTIPLE_NODES 770#ifndef CONFIG_NEED_MULTIPLE_NODES
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 1448bcb7f22f..433f7bd4648a 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -134,25 +134,6 @@ int page_is_ram(unsigned long pagenr)
134 return 0; 134 return 0;
135} 135}
136 136
137int pagerange_is_ram(unsigned long start, unsigned long end)
138{
139 int ram_page = 0, not_rampage = 0;
140 unsigned long page_nr;
141
142 for (page_nr = (start >> PAGE_SHIFT); page_nr < (end >> PAGE_SHIFT);
143 ++page_nr) {
144 if (page_is_ram(page_nr))
145 ram_page = 1;
146 else
147 not_rampage = 1;
148
149 if (ram_page == not_rampage)
150 return -1;
151 }
152
153 return ram_page;
154}
155
156/* 137/*
157 * Fix up the linear direct mapping of the kernel to avoid cache attribute 138 * Fix up the linear direct mapping of the kernel to avoid cache attribute
158 * conflicts. 139 * conflicts.
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 08d140fbc31b..deb1c1ab7868 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -702,7 +702,7 @@ void __cpuinit numa_set_node(int cpu, int node)
702 } 702 }
703 703
704#ifdef CONFIG_DEBUG_PER_CPU_MAPS 704#ifdef CONFIG_DEBUG_PER_CPU_MAPS
705 if (cpu >= nr_cpu_ids || !per_cpu_offset(cpu)) { 705 if (cpu >= nr_cpu_ids || !cpu_possible(cpu)) {
706 printk(KERN_ERR "numa_set_node: invalid cpu# (%d)\n", cpu); 706 printk(KERN_ERR "numa_set_node: invalid cpu# (%d)\n", cpu);
707 dump_stack(); 707 dump_stack();
708 return; 708 return;
@@ -790,7 +790,7 @@ int early_cpu_to_node(int cpu)
790 if (early_per_cpu_ptr(x86_cpu_to_node_map)) 790 if (early_per_cpu_ptr(x86_cpu_to_node_map))
791 return early_per_cpu_ptr(x86_cpu_to_node_map)[cpu]; 791 return early_per_cpu_ptr(x86_cpu_to_node_map)[cpu];
792 792
793 if (!per_cpu_offset(cpu)) { 793 if (!cpu_possible(cpu)) {
794 printk(KERN_WARNING 794 printk(KERN_WARNING
795 "early_cpu_to_node(%d): no per_cpu area!\n", cpu); 795 "early_cpu_to_node(%d): no per_cpu area!\n", cpu);
796 dump_stack(); 796 dump_stack();
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 84ba74820ad6..8ca0d8566fc8 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -575,7 +575,6 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
575 address = cpa->vaddr[cpa->curpage]; 575 address = cpa->vaddr[cpa->curpage];
576 else 576 else
577 address = *cpa->vaddr; 577 address = *cpa->vaddr;
578
579repeat: 578repeat:
580 kpte = lookup_address(address, &level); 579 kpte = lookup_address(address, &level);
581 if (!kpte) 580 if (!kpte)
@@ -812,6 +811,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
812 811
813 vm_unmap_aliases(); 812 vm_unmap_aliases();
814 813
814 /*
815 * If we're called with lazy mmu updates enabled, the
816 * in-memory pte state may be stale. Flush pending updates to
817 * bring them up to date.
818 */
819 arch_flush_lazy_mmu_mode();
820
815 cpa.vaddr = addr; 821 cpa.vaddr = addr;
816 cpa.numpages = numpages; 822 cpa.numpages = numpages;
817 cpa.mask_set = mask_set; 823 cpa.mask_set = mask_set;
@@ -854,6 +860,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
854 } else 860 } else
855 cpa_flush_all(cache); 861 cpa_flush_all(cache);
856 862
863 /*
864 * If we've been called with lazy mmu updates enabled, then
865 * make sure that everything gets flushed out before we
866 * return.
867 */
868 arch_flush_lazy_mmu_mode();
869
857out: 870out:
858 return ret; 871 return ret;
859} 872}
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 9127e31c7268..05f9aef6818a 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -220,6 +220,33 @@ chk_conflict(struct memtype *new, struct memtype *entry, unsigned long *type)
220static struct memtype *cached_entry; 220static struct memtype *cached_entry;
221static u64 cached_start; 221static u64 cached_start;
222 222
223static int pat_pagerange_is_ram(unsigned long start, unsigned long end)
224{
225 int ram_page = 0, not_rampage = 0;
226 unsigned long page_nr;
227
228 for (page_nr = (start >> PAGE_SHIFT); page_nr < (end >> PAGE_SHIFT);
229 ++page_nr) {
230 /*
231 * For legacy reasons, physical address range in the legacy ISA
232 * region is tracked as non-RAM. This will allow users of
233 * /dev/mem to map portions of legacy ISA region, even when
234 * some of those portions are listed(or not even listed) with
235 * different e820 types(RAM/reserved/..)
236 */
237 if (page_nr >= (ISA_END_ADDRESS >> PAGE_SHIFT) &&
238 page_is_ram(page_nr))
239 ram_page = 1;
240 else
241 not_rampage = 1;
242
243 if (ram_page == not_rampage)
244 return -1;
245 }
246
247 return ram_page;
248}
249
223/* 250/*
224 * For RAM pages, mark the pages as non WB memory type using 251 * For RAM pages, mark the pages as non WB memory type using
225 * PageNonWB (PG_arch_1). We allow only one set_memory_uc() or 252 * PageNonWB (PG_arch_1). We allow only one set_memory_uc() or
@@ -345,20 +372,12 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
345 if (new_type) 372 if (new_type)
346 *new_type = actual_type; 373 *new_type = actual_type;
347 374
348 /* 375 is_range_ram = pat_pagerange_is_ram(start, end);
349 * For legacy reasons, some parts of the physical address range in the 376 if (is_range_ram == 1)
350 * legacy 1MB region is treated as non-RAM (even when listed as RAM in 377 return reserve_ram_pages_type(start, end, req_type,
351 * the e820 tables). So we will track the memory attributes of this 378 new_type);
352 * legacy 1MB region using the linear memtype_list always. 379 else if (is_range_ram < 0)
353 */ 380 return -EINVAL;
354 if (end >= ISA_END_ADDRESS) {
355 is_range_ram = pagerange_is_ram(start, end);
356 if (is_range_ram == 1)
357 return reserve_ram_pages_type(start, end, req_type,
358 new_type);
359 else if (is_range_ram < 0)
360 return -EINVAL;
361 }
362 381
363 new = kmalloc(sizeof(struct memtype), GFP_KERNEL); 382 new = kmalloc(sizeof(struct memtype), GFP_KERNEL);
364 if (!new) 383 if (!new)
@@ -455,19 +474,11 @@ int free_memtype(u64 start, u64 end)
455 if (is_ISA_range(start, end - 1)) 474 if (is_ISA_range(start, end - 1))
456 return 0; 475 return 0;
457 476
458 /* 477 is_range_ram = pat_pagerange_is_ram(start, end);
459 * For legacy reasons, some parts of the physical address range in the 478 if (is_range_ram == 1)
460 * legacy 1MB region is treated as non-RAM (even when listed as RAM in 479 return free_ram_pages_type(start, end);
461 * the e820 tables). So we will track the memory attributes of this 480 else if (is_range_ram < 0)
462 * legacy 1MB region using the linear memtype_list always. 481 return -EINVAL;
463 */
464 if (end >= ISA_END_ADDRESS) {
465 is_range_ram = pagerange_is_ram(start, end);
466 if (is_range_ram == 1)
467 return free_ram_pages_type(start, end);
468 else if (is_range_ram < 0)
469 return -EINVAL;
470 }
471 482
472 spin_lock(&memtype_lock); 483 spin_lock(&memtype_lock);
473 list_for_each_entry(entry, &memtype_list, nd) { 484 list_for_each_entry(entry, &memtype_list, nd) {
@@ -635,17 +646,13 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
635 unsigned long flags; 646 unsigned long flags;
636 unsigned long want_flags = (pgprot_val(*vma_prot) & _PAGE_CACHE_MASK); 647 unsigned long want_flags = (pgprot_val(*vma_prot) & _PAGE_CACHE_MASK);
637 648
638 is_ram = pagerange_is_ram(paddr, paddr + size); 649 is_ram = pat_pagerange_is_ram(paddr, paddr + size);
639 650
640 if (is_ram != 0) { 651 /*
641 /* 652 * reserve_pfn_range() doesn't support RAM pages.
642 * For mapping RAM pages, drivers need to call 653 */
643 * set_memory_[uc|wc|wb] directly, for reserve and free, before 654 if (is_ram != 0)
644 * setting up the PTE. 655 return -EINVAL;
645 */
646 WARN_ON_ONCE(1);
647 return 0;
648 }
649 656
650 ret = reserve_memtype(paddr, paddr + size, want_flags, &flags); 657 ret = reserve_memtype(paddr, paddr + size, want_flags, &flags);
651 if (ret) 658 if (ret)
@@ -702,7 +709,7 @@ static void free_pfn_range(u64 paddr, unsigned long size)
702{ 709{
703 int is_ram; 710 int is_ram;
704 711
705 is_ram = pagerange_is_ram(paddr, paddr + size); 712 is_ram = pat_pagerange_is_ram(paddr, paddr + size);
706 if (is_ram == 0) 713 if (is_ram == 0)
707 free_memtype(paddr, paddr + size); 714 free_memtype(paddr, paddr + size);
708} 715}
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 4d6ef0a336d6..16a9020c8f11 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -38,7 +38,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
38 $(call if_changed,objcopy) 38 $(call if_changed,objcopy)
39 39
40CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \ 40CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
41 $(filter -g%,$(KBUILD_CFLAGS)) 41 $(filter -g%,$(KBUILD_CFLAGS)) $(call cc-option, -fno-stack-protector)
42 42
43$(vobjs): KBUILD_CFLAGS += $(CFL) 43$(vobjs): KBUILD_CFLAGS += $(CFL)
44 44
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 37230342c2c4..95ff6a0e942a 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -323,13 +323,14 @@ static void load_TLS_descriptor(struct thread_struct *t,
323static void xen_load_tls(struct thread_struct *t, unsigned int cpu) 323static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
324{ 324{
325 /* 325 /*
326 * XXX sleazy hack: If we're being called in a lazy-cpu zone, 326 * XXX sleazy hack: If we're being called in a lazy-cpu zone
327 * it means we're in a context switch, and %gs has just been 327 * and lazy gs handling is enabled, it means we're in a
328 * saved. This means we can zero it out to prevent faults on 328 * context switch, and %gs has just been saved. This means we
329 * exit from the hypervisor if the next process has no %gs. 329 * can zero it out to prevent faults on exit from the
330 * Either way, it has been saved, and the new value will get 330 * hypervisor if the next process has no %gs. Either way, it
331 * loaded properly. This will go away as soon as Xen has been 331 * has been saved, and the new value will get loaded properly.
332 * modified to not save/restore %gs for normal hypercalls. 332 * This will go away as soon as Xen has been modified to not
333 * save/restore %gs for normal hypercalls.
333 * 334 *
334 * On x86_64, this hack is not used for %gs, because gs points 335 * On x86_64, this hack is not used for %gs, because gs points
335 * to KERNEL_GS_BASE (and uses it for PDA references), so we 336 * to KERNEL_GS_BASE (and uses it for PDA references), so we
@@ -341,7 +342,7 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
341 */ 342 */
342 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) { 343 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) {
343#ifdef CONFIG_X86_32 344#ifdef CONFIG_X86_32
344 loadsegment(gs, 0); 345 lazy_load_gs(0);
345#else 346#else
346 loadsegment(fs, 0); 347 loadsegment(fs, 0);
347#endif 348#endif
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index d2e8ed1aff3d..319bd40a57c2 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1273,8 +1273,6 @@ static void xen_flush_tlb_others(const struct cpumask *cpus,
1273 /* Remove us, and any offline CPUS. */ 1273 /* Remove us, and any offline CPUS. */
1274 cpumask_and(to_cpumask(args->mask), cpus, cpu_online_mask); 1274 cpumask_and(to_cpumask(args->mask), cpus, cpu_online_mask);
1275 cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask)); 1275 cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask));
1276 if (unlikely(cpumask_empty(to_cpumask(args->mask))))
1277 goto issue;
1278 1276
1279 if (va == TLB_FLUSH_ALL) { 1277 if (va == TLB_FLUSH_ALL) {
1280 args->op.cmd = MMUEXT_TLB_FLUSH_MULTI; 1278 args->op.cmd = MMUEXT_TLB_FLUSH_MULTI;
@@ -1285,7 +1283,6 @@ static void xen_flush_tlb_others(const struct cpumask *cpus,
1285 1283
1286 MULTI_mmuext_op(mcs.mc, &args->op, 1, NULL, DOMID_SELF); 1284 MULTI_mmuext_op(mcs.mc, &args->op, 1, NULL, DOMID_SELF);
1287 1285
1288issue:
1289 xen_mc_issue(PARAVIRT_LAZY_MMU); 1286 xen_mc_issue(PARAVIRT_LAZY_MMU);
1290} 1287}
1291 1288
diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c
index c738644b5435..8bff7e7c290b 100644
--- a/arch/x86/xen/multicalls.c
+++ b/arch/x86/xen/multicalls.c
@@ -39,6 +39,7 @@ struct mc_buffer {
39 struct multicall_entry entries[MC_BATCH]; 39 struct multicall_entry entries[MC_BATCH];
40#if MC_DEBUG 40#if MC_DEBUG
41 struct multicall_entry debug[MC_BATCH]; 41 struct multicall_entry debug[MC_BATCH];
42 void *caller[MC_BATCH];
42#endif 43#endif
43 unsigned char args[MC_ARGS]; 44 unsigned char args[MC_ARGS];
44 struct callback { 45 struct callback {
@@ -154,11 +155,12 @@ void xen_mc_flush(void)
154 ret, smp_processor_id()); 155 ret, smp_processor_id());
155 dump_stack(); 156 dump_stack();
156 for (i = 0; i < b->mcidx; i++) { 157 for (i = 0; i < b->mcidx; i++) {
157 printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\n", 158 printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n",
158 i+1, b->mcidx, 159 i+1, b->mcidx,
159 b->debug[i].op, 160 b->debug[i].op,
160 b->debug[i].args[0], 161 b->debug[i].args[0],
161 b->entries[i].result); 162 b->entries[i].result,
163 b->caller[i]);
162 } 164 }
163 } 165 }
164#endif 166#endif
@@ -168,8 +170,6 @@ void xen_mc_flush(void)
168 } else 170 } else
169 BUG_ON(b->argidx != 0); 171 BUG_ON(b->argidx != 0);
170 172
171 local_irq_restore(flags);
172
173 for (i = 0; i < b->cbidx; i++) { 173 for (i = 0; i < b->cbidx; i++) {
174 struct callback *cb = &b->callbacks[i]; 174 struct callback *cb = &b->callbacks[i];
175 175
@@ -177,7 +177,9 @@ void xen_mc_flush(void)
177 } 177 }
178 b->cbidx = 0; 178 b->cbidx = 0;
179 179
180 BUG_ON(ret); 180 local_irq_restore(flags);
181
182 WARN_ON(ret);
181} 183}
182 184
183struct multicall_space __xen_mc_entry(size_t args) 185struct multicall_space __xen_mc_entry(size_t args)
@@ -197,6 +199,9 @@ struct multicall_space __xen_mc_entry(size_t args)
197 } 199 }
198 200
199 ret.mc = &b->entries[b->mcidx]; 201 ret.mc = &b->entries[b->mcidx];
202#ifdef MC_DEBUG
203 b->caller[b->mcidx] = __builtin_return_address(0);
204#endif
200 b->mcidx++; 205 b->mcidx++;
201 ret.args = &b->args[argidx]; 206 ret.args = &b->args[argidx];
202 b->argidx = argidx + args; 207 b->argidx = argidx + args;
diff --git a/arch/x86/xen/xen-asm.S b/arch/x86/xen/xen-asm.S
index 4c6f96799131..79d7362ad6d1 100644
--- a/arch/x86/xen/xen-asm.S
+++ b/arch/x86/xen/xen-asm.S
@@ -1,14 +1,14 @@
1/* 1/*
2 Asm versions of Xen pv-ops, suitable for either direct use or inlining. 2 * Asm versions of Xen pv-ops, suitable for either direct use or
3 The inline versions are the same as the direct-use versions, with the 3 * inlining. The inline versions are the same as the direct-use
4 pre- and post-amble chopped off. 4 * versions, with the pre- and post-amble chopped off.
5 5 *
6 This code is encoded for size rather than absolute efficiency, 6 * This code is encoded for size rather than absolute efficiency, with
7 with a view to being able to inline as much as possible. 7 * a view to being able to inline as much as possible.
8 8 *
9 We only bother with direct forms (ie, vcpu in percpu data) of 9 * We only bother with direct forms (ie, vcpu in percpu data) of the
10 the operations here; the indirect forms are better handled in 10 * operations here; the indirect forms are better handled in C, since
11 C, since they're generally too large to inline anyway. 11 * they're generally too large to inline anyway.
12 */ 12 */
13 13
14#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
@@ -18,17 +18,19 @@
18#include "xen-asm.h" 18#include "xen-asm.h"
19 19
20/* 20/*
21 Enable events. This clears the event mask and tests the pending 21 * Enable events. This clears the event mask and tests the pending
22 event status with one and operation. If there are pending 22 * event status with one and operation. If there are pending events,
23 events, then enter the hypervisor to get them handled. 23 * then enter the hypervisor to get them handled.
24 */ 24 */
25ENTRY(xen_irq_enable_direct) 25ENTRY(xen_irq_enable_direct)
26 /* Unmask events */ 26 /* Unmask events */
27 movb $0, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask 27 movb $0, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
28 28
29 /* Preempt here doesn't matter because that will deal with 29 /*
30 any pending interrupts. The pending check may end up being 30 * Preempt here doesn't matter because that will deal with any
31 run on the wrong CPU, but that doesn't hurt. */ 31 * pending interrupts. The pending check may end up being run
32 * on the wrong CPU, but that doesn't hurt.
33 */
32 34
33 /* Test for pending */ 35 /* Test for pending */
34 testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending 36 testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
@@ -43,8 +45,8 @@ ENDPATCH(xen_irq_enable_direct)
43 45
44 46
45/* 47/*
46 Disabling events is simply a matter of making the event mask 48 * Disabling events is simply a matter of making the event mask
47 non-zero. 49 * non-zero.
48 */ 50 */
49ENTRY(xen_irq_disable_direct) 51ENTRY(xen_irq_disable_direct)
50 movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask 52 movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
@@ -54,18 +56,18 @@ ENDPATCH(xen_irq_disable_direct)
54 RELOC(xen_irq_disable_direct, 0) 56 RELOC(xen_irq_disable_direct, 0)
55 57
56/* 58/*
57 (xen_)save_fl is used to get the current interrupt enable status. 59 * (xen_)save_fl is used to get the current interrupt enable status.
58 Callers expect the status to be in X86_EFLAGS_IF, and other bits 60 * Callers expect the status to be in X86_EFLAGS_IF, and other bits
59 may be set in the return value. We take advantage of this by 61 * may be set in the return value. We take advantage of this by
60 making sure that X86_EFLAGS_IF has the right value (and other bits 62 * making sure that X86_EFLAGS_IF has the right value (and other bits
61 in that byte are 0), but other bits in the return value are 63 * in that byte are 0), but other bits in the return value are
62 undefined. We need to toggle the state of the bit, because 64 * undefined. We need to toggle the state of the bit, because Xen and
63 Xen and x86 use opposite senses (mask vs enable). 65 * x86 use opposite senses (mask vs enable).
64 */ 66 */
65ENTRY(xen_save_fl_direct) 67ENTRY(xen_save_fl_direct)
66 testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask 68 testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
67 setz %ah 69 setz %ah
68 addb %ah,%ah 70 addb %ah, %ah
69ENDPATCH(xen_save_fl_direct) 71ENDPATCH(xen_save_fl_direct)
70 ret 72 ret
71 ENDPROC(xen_save_fl_direct) 73 ENDPROC(xen_save_fl_direct)
@@ -73,12 +75,11 @@ ENDPATCH(xen_save_fl_direct)
73 75
74 76
75/* 77/*
76 In principle the caller should be passing us a value return 78 * In principle the caller should be passing us a value return from
77 from xen_save_fl_direct, but for robustness sake we test only 79 * xen_save_fl_direct, but for robustness sake we test only the
78 the X86_EFLAGS_IF flag rather than the whole byte. After 80 * X86_EFLAGS_IF flag rather than the whole byte. After setting the
79 setting the interrupt mask state, it checks for unmasked 81 * interrupt mask state, it checks for unmasked pending events and
80 pending events and enters the hypervisor to get them delivered 82 * enters the hypervisor to get them delivered if so.
81 if so.
82 */ 83 */
83ENTRY(xen_restore_fl_direct) 84ENTRY(xen_restore_fl_direct)
84#ifdef CONFIG_X86_64 85#ifdef CONFIG_X86_64
@@ -87,9 +88,11 @@ ENTRY(xen_restore_fl_direct)
87 testb $X86_EFLAGS_IF>>8, %ah 88 testb $X86_EFLAGS_IF>>8, %ah
88#endif 89#endif
89 setz PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask 90 setz PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
90 /* Preempt here doesn't matter because that will deal with 91 /*
91 any pending interrupts. The pending check may end up being 92 * Preempt here doesn't matter because that will deal with any
92 run on the wrong CPU, but that doesn't hurt. */ 93 * pending interrupts. The pending check may end up being run
94 * on the wrong CPU, but that doesn't hurt.
95 */
93 96
94 /* check for unmasked and pending */ 97 /* check for unmasked and pending */
95 cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending 98 cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
@@ -103,8 +106,8 @@ ENDPATCH(xen_restore_fl_direct)
103 106
104 107
105/* 108/*
106 Force an event check by making a hypercall, 109 * Force an event check by making a hypercall, but preserve regs
107 but preserve regs before making the call. 110 * before making the call.
108 */ 111 */
109check_events: 112check_events:
110#ifdef CONFIG_X86_32 113#ifdef CONFIG_X86_32
@@ -137,4 +140,3 @@ check_events:
137 pop %rax 140 pop %rax
138#endif 141#endif
139 ret 142 ret
140
diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S
index 082d173caaf3..88e15deb8b82 100644
--- a/arch/x86/xen/xen-asm_32.S
+++ b/arch/x86/xen/xen-asm_32.S
@@ -1,17 +1,16 @@
1/* 1/*
2 Asm versions of Xen pv-ops, suitable for either direct use or inlining. 2 * Asm versions of Xen pv-ops, suitable for either direct use or
3 The inline versions are the same as the direct-use versions, with the 3 * inlining. The inline versions are the same as the direct-use
4 pre- and post-amble chopped off. 4 * versions, with the pre- and post-amble chopped off.
5 5 *
6 This code is encoded for size rather than absolute efficiency, 6 * This code is encoded for size rather than absolute efficiency, with
7 with a view to being able to inline as much as possible. 7 * a view to being able to inline as much as possible.
8 8 *
9 We only bother with direct forms (ie, vcpu in pda) of the operations 9 * We only bother with direct forms (ie, vcpu in pda) of the
10 here; the indirect forms are better handled in C, since they're 10 * operations here; the indirect forms are better handled in C, since
11 generally too large to inline anyway. 11 * they're generally too large to inline anyway.
12 */ 12 */
13 13
14//#include <asm/asm-offsets.h>
15#include <asm/thread_info.h> 14#include <asm/thread_info.h>
16#include <asm/processor-flags.h> 15#include <asm/processor-flags.h>
17#include <asm/segment.h> 16#include <asm/segment.h>
@@ -21,8 +20,8 @@
21#include "xen-asm.h" 20#include "xen-asm.h"
22 21
23/* 22/*
24 Force an event check by making a hypercall, 23 * Force an event check by making a hypercall, but preserve regs
25 but preserve regs before making the call. 24 * before making the call.
26 */ 25 */
27check_events: 26check_events:
28 push %eax 27 push %eax
@@ -35,10 +34,10 @@ check_events:
35 ret 34 ret
36 35
37/* 36/*
38 We can't use sysexit directly, because we're not running in ring0. 37 * We can't use sysexit directly, because we're not running in ring0.
39 But we can easily fake it up using iret. Assuming xen_sysexit 38 * But we can easily fake it up using iret. Assuming xen_sysexit is
40 is jumped to with a standard stack frame, we can just strip it 39 * jumped to with a standard stack frame, we can just strip it back to
41 back to a standard iret frame and use iret. 40 * a standard iret frame and use iret.
42 */ 41 */
43ENTRY(xen_sysexit) 42ENTRY(xen_sysexit)
44 movl PT_EAX(%esp), %eax /* Shouldn't be necessary? */ 43 movl PT_EAX(%esp), %eax /* Shouldn't be necessary? */
@@ -49,33 +48,31 @@ ENTRY(xen_sysexit)
49ENDPROC(xen_sysexit) 48ENDPROC(xen_sysexit)
50 49
51/* 50/*
52 This is run where a normal iret would be run, with the same stack setup: 51 * This is run where a normal iret would be run, with the same stack setup:
53 8: eflags 52 * 8: eflags
54 4: cs 53 * 4: cs
55 esp-> 0: eip 54 * esp-> 0: eip
56 55 *
57 This attempts to make sure that any pending events are dealt 56 * This attempts to make sure that any pending events are dealt with
58 with on return to usermode, but there is a small window in 57 * on return to usermode, but there is a small window in which an
59 which an event can happen just before entering usermode. If 58 * event can happen just before entering usermode. If the nested
60 the nested interrupt ends up setting one of the TIF_WORK_MASK 59 * interrupt ends up setting one of the TIF_WORK_MASK pending work
61 pending work flags, they will not be tested again before 60 * flags, they will not be tested again before returning to
62 returning to usermode. This means that a process can end up 61 * usermode. This means that a process can end up with pending work,
63 with pending work, which will be unprocessed until the process 62 * which will be unprocessed until the process enters and leaves the
64 enters and leaves the kernel again, which could be an 63 * kernel again, which could be an unbounded amount of time. This
65 unbounded amount of time. This means that a pending signal or 64 * means that a pending signal or reschedule event could be
66 reschedule event could be indefinitely delayed. 65 * indefinitely delayed.
67 66 *
68 The fix is to notice a nested interrupt in the critical 67 * The fix is to notice a nested interrupt in the critical window, and
69 window, and if one occurs, then fold the nested interrupt into 68 * if one occurs, then fold the nested interrupt into the current
70 the current interrupt stack frame, and re-process it 69 * interrupt stack frame, and re-process it iteratively rather than
71 iteratively rather than recursively. This means that it will 70 * recursively. This means that it will exit via the normal path, and
72 exit via the normal path, and all pending work will be dealt 71 * all pending work will be dealt with appropriately.
73 with appropriately. 72 *
74 73 * Because the nested interrupt handler needs to deal with the current
75 Because the nested interrupt handler needs to deal with the 74 * stack state in whatever form its in, we keep things simple by only
76 current stack state in whatever form its in, we keep things 75 * using a single register which is pushed/popped on the stack.
77 simple by only using a single register which is pushed/popped
78 on the stack.
79 */ 76 */
80ENTRY(xen_iret) 77ENTRY(xen_iret)
81 /* test eflags for special cases */ 78 /* test eflags for special cases */
@@ -85,13 +82,15 @@ ENTRY(xen_iret)
85 push %eax 82 push %eax
86 ESP_OFFSET=4 # bytes pushed onto stack 83 ESP_OFFSET=4 # bytes pushed onto stack
87 84
88 /* Store vcpu_info pointer for easy access. Do it this 85 /*
89 way to avoid having to reload %fs */ 86 * Store vcpu_info pointer for easy access. Do it this way to
87 * avoid having to reload %fs
88 */
90#ifdef CONFIG_SMP 89#ifdef CONFIG_SMP
91 GET_THREAD_INFO(%eax) 90 GET_THREAD_INFO(%eax)
92 movl TI_cpu(%eax),%eax 91 movl TI_cpu(%eax), %eax
93 movl __per_cpu_offset(,%eax,4),%eax 92 movl __per_cpu_offset(,%eax,4), %eax
94 mov per_cpu__xen_vcpu(%eax),%eax 93 mov per_cpu__xen_vcpu(%eax), %eax
95#else 94#else
96 movl per_cpu__xen_vcpu, %eax 95 movl per_cpu__xen_vcpu, %eax
97#endif 96#endif
@@ -99,37 +98,46 @@ ENTRY(xen_iret)
99 /* check IF state we're restoring */ 98 /* check IF state we're restoring */
100 testb $X86_EFLAGS_IF>>8, 8+1+ESP_OFFSET(%esp) 99 testb $X86_EFLAGS_IF>>8, 8+1+ESP_OFFSET(%esp)
101 100
102 /* Maybe enable events. Once this happens we could get a 101 /*
103 recursive event, so the critical region starts immediately 102 * Maybe enable events. Once this happens we could get a
104 afterwards. However, if that happens we don't end up 103 * recursive event, so the critical region starts immediately
105 resuming the code, so we don't have to be worried about 104 * afterwards. However, if that happens we don't end up
106 being preempted to another CPU. */ 105 * resuming the code, so we don't have to be worried about
106 * being preempted to another CPU.
107 */
107 setz XEN_vcpu_info_mask(%eax) 108 setz XEN_vcpu_info_mask(%eax)
108xen_iret_start_crit: 109xen_iret_start_crit:
109 110
110 /* check for unmasked and pending */ 111 /* check for unmasked and pending */
111 cmpw $0x0001, XEN_vcpu_info_pending(%eax) 112 cmpw $0x0001, XEN_vcpu_info_pending(%eax)
112 113
113 /* If there's something pending, mask events again so we 114 /*
114 can jump back into xen_hypervisor_callback */ 115 * If there's something pending, mask events again so we can
116 * jump back into xen_hypervisor_callback
117 */
115 sete XEN_vcpu_info_mask(%eax) 118 sete XEN_vcpu_info_mask(%eax)
116 119
117 popl %eax 120 popl %eax
118 121
119 /* From this point on the registers are restored and the stack 122 /*
120 updated, so we don't need to worry about it if we're preempted */ 123 * From this point on the registers are restored and the stack
124 * updated, so we don't need to worry about it if we're
125 * preempted
126 */
121iret_restore_end: 127iret_restore_end:
122 128
123 /* Jump to hypervisor_callback after fixing up the stack. 129 /*
124 Events are masked, so jumping out of the critical 130 * Jump to hypervisor_callback after fixing up the stack.
125 region is OK. */ 131 * Events are masked, so jumping out of the critical region is
132 * OK.
133 */
126 je xen_hypervisor_callback 134 je xen_hypervisor_callback
127 135
1281: iret 1361: iret
129xen_iret_end_crit: 137xen_iret_end_crit:
130.section __ex_table,"a" 138.section __ex_table, "a"
131 .align 4 139 .align 4
132 .long 1b,iret_exc 140 .long 1b, iret_exc
133.previous 141.previous
134 142
135hyper_iret: 143hyper_iret:
@@ -139,55 +147,55 @@ hyper_iret:
139 .globl xen_iret_start_crit, xen_iret_end_crit 147 .globl xen_iret_start_crit, xen_iret_end_crit
140 148
141/* 149/*
142 This is called by xen_hypervisor_callback in entry.S when it sees 150 * This is called by xen_hypervisor_callback in entry.S when it sees
143 that the EIP at the time of interrupt was between xen_iret_start_crit 151 * that the EIP at the time of interrupt was between
144 and xen_iret_end_crit. We're passed the EIP in %eax so we can do 152 * xen_iret_start_crit and xen_iret_end_crit. We're passed the EIP in
145 a more refined determination of what to do. 153 * %eax so we can do a more refined determination of what to do.
146 154 *
147 The stack format at this point is: 155 * The stack format at this point is:
148 ---------------- 156 * ----------------
149 ss : (ss/esp may be present if we came from usermode) 157 * ss : (ss/esp may be present if we came from usermode)
150 esp : 158 * esp :
151 eflags } outer exception info 159 * eflags } outer exception info
152 cs } 160 * cs }
153 eip } 161 * eip }
154 ---------------- <- edi (copy dest) 162 * ---------------- <- edi (copy dest)
155 eax : outer eax if it hasn't been restored 163 * eax : outer eax if it hasn't been restored
156 ---------------- 164 * ----------------
157 eflags } nested exception info 165 * eflags } nested exception info
158 cs } (no ss/esp because we're nested 166 * cs } (no ss/esp because we're nested
159 eip } from the same ring) 167 * eip } from the same ring)
160 orig_eax }<- esi (copy src) 168 * orig_eax }<- esi (copy src)
161 - - - - - - - - 169 * - - - - - - - -
162 fs } 170 * fs }
163 es } 171 * es }
164 ds } SAVE_ALL state 172 * ds } SAVE_ALL state
165 eax } 173 * eax }
166 : : 174 * : :
167 ebx }<- esp 175 * ebx }<- esp
168 ---------------- 176 * ----------------
169 177 *
170 In order to deliver the nested exception properly, we need to shift 178 * In order to deliver the nested exception properly, we need to shift
171 everything from the return addr up to the error code so it 179 * everything from the return addr up to the error code so it sits
172 sits just under the outer exception info. This means that when we 180 * just under the outer exception info. This means that when we
173 handle the exception, we do it in the context of the outer exception 181 * handle the exception, we do it in the context of the outer
174 rather than starting a new one. 182 * exception rather than starting a new one.
175 183 *
176 The only caveat is that if the outer eax hasn't been 184 * The only caveat is that if the outer eax hasn't been restored yet
177 restored yet (ie, it's still on stack), we need to insert 185 * (ie, it's still on stack), we need to insert its value into the
178 its value into the SAVE_ALL state before going on, since 186 * SAVE_ALL state before going on, since it's usermode state which we
179 it's usermode state which we eventually need to restore. 187 * eventually need to restore.
180 */ 188 */
181ENTRY(xen_iret_crit_fixup) 189ENTRY(xen_iret_crit_fixup)
182 /* 190 /*
183 Paranoia: Make sure we're really coming from kernel space. 191 * Paranoia: Make sure we're really coming from kernel space.
184 One could imagine a case where userspace jumps into the 192 * One could imagine a case where userspace jumps into the
185 critical range address, but just before the CPU delivers a GP, 193 * critical range address, but just before the CPU delivers a
186 it decides to deliver an interrupt instead. Unlikely? 194 * GP, it decides to deliver an interrupt instead. Unlikely?
187 Definitely. Easy to avoid? Yes. The Intel documents 195 * Definitely. Easy to avoid? Yes. The Intel documents
188 explicitly say that the reported EIP for a bad jump is the 196 * explicitly say that the reported EIP for a bad jump is the
189 jump instruction itself, not the destination, but some virtual 197 * jump instruction itself, not the destination, but some
190 environments get this wrong. 198 * virtual environments get this wrong.
191 */ 199 */
192 movl PT_CS(%esp), %ecx 200 movl PT_CS(%esp), %ecx
193 andl $SEGMENT_RPL_MASK, %ecx 201 andl $SEGMENT_RPL_MASK, %ecx
@@ -197,15 +205,17 @@ ENTRY(xen_iret_crit_fixup)
197 lea PT_ORIG_EAX(%esp), %esi 205 lea PT_ORIG_EAX(%esp), %esi
198 lea PT_EFLAGS(%esp), %edi 206 lea PT_EFLAGS(%esp), %edi
199 207
200 /* If eip is before iret_restore_end then stack 208 /*
201 hasn't been restored yet. */ 209 * If eip is before iret_restore_end then stack
210 * hasn't been restored yet.
211 */
202 cmp $iret_restore_end, %eax 212 cmp $iret_restore_end, %eax
203 jae 1f 213 jae 1f
204 214
205 movl 0+4(%edi),%eax /* copy EAX (just above top of frame) */ 215 movl 0+4(%edi), %eax /* copy EAX (just above top of frame) */
206 movl %eax, PT_EAX(%esp) 216 movl %eax, PT_EAX(%esp)
207 217
208 lea ESP_OFFSET(%edi),%edi /* move dest up over saved regs */ 218 lea ESP_OFFSET(%edi), %edi /* move dest up over saved regs */
209 219
210 /* set up the copy */ 220 /* set up the copy */
2111: std 2211: std
@@ -213,6 +223,6 @@ ENTRY(xen_iret_crit_fixup)
213 rep movsl 223 rep movsl
214 cld 224 cld
215 225
216 lea 4(%edi),%esp /* point esp to new frame */ 226 lea 4(%edi), %esp /* point esp to new frame */
2172: jmp xen_do_upcall 2272: jmp xen_do_upcall
218 228
diff --git a/arch/x86/xen/xen-asm_64.S b/arch/x86/xen/xen-asm_64.S
index d205a283efe0..02f496a8dbaa 100644
--- a/arch/x86/xen/xen-asm_64.S
+++ b/arch/x86/xen/xen-asm_64.S
@@ -1,14 +1,14 @@
1/* 1/*
2 Asm versions of Xen pv-ops, suitable for either direct use or inlining. 2 * Asm versions of Xen pv-ops, suitable for either direct use or
3 The inline versions are the same as the direct-use versions, with the 3 * inlining. The inline versions are the same as the direct-use
4 pre- and post-amble chopped off. 4 * versions, with the pre- and post-amble chopped off.
5 5 *
6 This code is encoded for size rather than absolute efficiency, 6 * This code is encoded for size rather than absolute efficiency, with
7 with a view to being able to inline as much as possible. 7 * a view to being able to inline as much as possible.
8 8 *
9 We only bother with direct forms (ie, vcpu in pda) of the operations 9 * We only bother with direct forms (ie, vcpu in pda) of the
10 here; the indirect forms are better handled in C, since they're 10 * operations here; the indirect forms are better handled in C, since
11 generally too large to inline anyway. 11 * they're generally too large to inline anyway.
12 */ 12 */
13 13
14#include <asm/errno.h> 14#include <asm/errno.h>
@@ -21,25 +21,25 @@
21#include "xen-asm.h" 21#include "xen-asm.h"
22 22
23ENTRY(xen_adjust_exception_frame) 23ENTRY(xen_adjust_exception_frame)
24 mov 8+0(%rsp),%rcx 24 mov 8+0(%rsp), %rcx
25 mov 8+8(%rsp),%r11 25 mov 8+8(%rsp), %r11
26 ret $16 26 ret $16
27 27
28hypercall_iret = hypercall_page + __HYPERVISOR_iret * 32 28hypercall_iret = hypercall_page + __HYPERVISOR_iret * 32
29/* 29/*
30 Xen64 iret frame: 30 * Xen64 iret frame:
31 31 *
32 ss 32 * ss
33 rsp 33 * rsp
34 rflags 34 * rflags
35 cs 35 * cs
36 rip <-- standard iret frame 36 * rip <-- standard iret frame
37 37 *
38 flags 38 * flags
39 39 *
40 rcx } 40 * rcx }
41 r11 }<-- pushed by hypercall page 41 * r11 }<-- pushed by hypercall page
42rsp -> rax } 42 * rsp->rax }
43 */ 43 */
44ENTRY(xen_iret) 44ENTRY(xen_iret)
45 pushq $0 45 pushq $0
@@ -48,8 +48,8 @@ ENDPATCH(xen_iret)
48RELOC(xen_iret, 1b+1) 48RELOC(xen_iret, 1b+1)
49 49
50/* 50/*
51 sysexit is not used for 64-bit processes, so it's 51 * sysexit is not used for 64-bit processes, so it's only ever used to
52 only ever used to return to 32-bit compat userspace. 52 * return to 32-bit compat userspace.
53 */ 53 */
54ENTRY(xen_sysexit) 54ENTRY(xen_sysexit)
55 pushq $__USER32_DS 55 pushq $__USER32_DS
@@ -64,10 +64,12 @@ ENDPATCH(xen_sysexit)
64RELOC(xen_sysexit, 1b+1) 64RELOC(xen_sysexit, 1b+1)
65 65
66ENTRY(xen_sysret64) 66ENTRY(xen_sysret64)
67 /* We're already on the usermode stack at this point, but still 67 /*
68 with the kernel gs, so we can easily switch back */ 68 * We're already on the usermode stack at this point, but
69 * still with the kernel gs, so we can easily switch back
70 */
69 movq %rsp, PER_CPU_VAR(old_rsp) 71 movq %rsp, PER_CPU_VAR(old_rsp)
70 movq PER_CPU_VAR(kernel_stack),%rsp 72 movq PER_CPU_VAR(kernel_stack), %rsp
71 73
72 pushq $__USER_DS 74 pushq $__USER_DS
73 pushq PER_CPU_VAR(old_rsp) 75 pushq PER_CPU_VAR(old_rsp)
@@ -81,8 +83,10 @@ ENDPATCH(xen_sysret64)
81RELOC(xen_sysret64, 1b+1) 83RELOC(xen_sysret64, 1b+1)
82 84
83ENTRY(xen_sysret32) 85ENTRY(xen_sysret32)
84 /* We're already on the usermode stack at this point, but still 86 /*
85 with the kernel gs, so we can easily switch back */ 87 * We're already on the usermode stack at this point, but
88 * still with the kernel gs, so we can easily switch back
89 */
86 movq %rsp, PER_CPU_VAR(old_rsp) 90 movq %rsp, PER_CPU_VAR(old_rsp)
87 movq PER_CPU_VAR(kernel_stack), %rsp 91 movq PER_CPU_VAR(kernel_stack), %rsp
88 92
@@ -98,28 +102,27 @@ ENDPATCH(xen_sysret32)
98RELOC(xen_sysret32, 1b+1) 102RELOC(xen_sysret32, 1b+1)
99 103
100/* 104/*
101 Xen handles syscall callbacks much like ordinary exceptions, 105 * Xen handles syscall callbacks much like ordinary exceptions, which
102 which means we have: 106 * means we have:
103 - kernel gs 107 * - kernel gs
104 - kernel rsp 108 * - kernel rsp
105 - an iret-like stack frame on the stack (including rcx and r11): 109 * - an iret-like stack frame on the stack (including rcx and r11):
106 ss 110 * ss
107 rsp 111 * rsp
108 rflags 112 * rflags
109 cs 113 * cs
110 rip 114 * rip
111 r11 115 * r11
112 rsp-> rcx 116 * rsp->rcx
113 117 *
114 In all the entrypoints, we undo all that to make it look 118 * In all the entrypoints, we undo all that to make it look like a
115 like a CPU-generated syscall/sysenter and jump to the normal 119 * CPU-generated syscall/sysenter and jump to the normal entrypoint.
116 entrypoint.
117 */ 120 */
118 121
119.macro undo_xen_syscall 122.macro undo_xen_syscall
120 mov 0*8(%rsp),%rcx 123 mov 0*8(%rsp), %rcx
121 mov 1*8(%rsp),%r11 124 mov 1*8(%rsp), %r11
122 mov 5*8(%rsp),%rsp 125 mov 5*8(%rsp), %rsp
123.endm 126.endm
124 127
125/* Normal 64-bit system call target */ 128/* Normal 64-bit system call target */
@@ -146,7 +149,7 @@ ENDPROC(xen_sysenter_target)
146 149
147ENTRY(xen_syscall32_target) 150ENTRY(xen_syscall32_target)
148ENTRY(xen_sysenter_target) 151ENTRY(xen_sysenter_target)
149 lea 16(%rsp), %rsp /* strip %rcx,%r11 */ 152 lea 16(%rsp), %rsp /* strip %rcx, %r11 */
150 mov $-ENOSYS, %rax 153 mov $-ENOSYS, %rax
151 pushq $VGCF_in_syscall 154 pushq $VGCF_in_syscall
152 jmp hypercall_iret 155 jmp hypercall_iret
diff --git a/arch/xtensa/include/asm/swab.h b/arch/xtensa/include/asm/swab.h
index f50b697eb601..226a39162310 100644
--- a/arch/xtensa/include/asm/swab.h
+++ b/arch/xtensa/include/asm/swab.h
@@ -11,7 +11,7 @@
11#ifndef _XTENSA_SWAB_H 11#ifndef _XTENSA_SWAB_H
12#define _XTENSA_SWAB_H 12#define _XTENSA_SWAB_H
13 13
14#include <asm/types.h> 14#include <linux/types.h>
15#include <linux/compiler.h> 15#include <linux/compiler.h>
16 16
17#define __SWAB_64_THRU_32__ 17#define __SWAB_64_THRU_32__
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index c3e841f3cde9..ab0aff3c7d6a 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -365,7 +365,7 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id)
365 365
366/******************************************************************************* 366/*******************************************************************************
367 * 367 *
368 * FUNCTION: acpi_get_table 368 * FUNCTION: acpi_get_table_with_size
369 * 369 *
370 * PARAMETERS: Signature - ACPI signature of needed table 370 * PARAMETERS: Signature - ACPI signature of needed table
371 * Instance - Which instance (for SSDTs) 371 * Instance - Which instance (for SSDTs)
@@ -377,8 +377,9 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id)
377 * 377 *
378 *****************************************************************************/ 378 *****************************************************************************/
379acpi_status 379acpi_status
380acpi_get_table(char *signature, 380acpi_get_table_with_size(char *signature,
381 u32 instance, struct acpi_table_header **out_table) 381 u32 instance, struct acpi_table_header **out_table,
382 acpi_size *tbl_size)
382{ 383{
383 u32 i; 384 u32 i;
384 u32 j; 385 u32 j;
@@ -408,6 +409,7 @@ acpi_get_table(char *signature,
408 acpi_tb_verify_table(&acpi_gbl_root_table_list.tables[i]); 409 acpi_tb_verify_table(&acpi_gbl_root_table_list.tables[i]);
409 if (ACPI_SUCCESS(status)) { 410 if (ACPI_SUCCESS(status)) {
410 *out_table = acpi_gbl_root_table_list.tables[i].pointer; 411 *out_table = acpi_gbl_root_table_list.tables[i].pointer;
412 *tbl_size = acpi_gbl_root_table_list.tables[i].length;
411 } 413 }
412 414
413 if (!acpi_gbl_permanent_mmap) { 415 if (!acpi_gbl_permanent_mmap) {
@@ -420,6 +422,15 @@ acpi_get_table(char *signature,
420 return (AE_NOT_FOUND); 422 return (AE_NOT_FOUND);
421} 423}
422 424
425acpi_status
426acpi_get_table(char *signature,
427 u32 instance, struct acpi_table_header **out_table)
428{
429 acpi_size tbl_size;
430
431 return acpi_get_table_with_size(signature,
432 instance, out_table, &tbl_size);
433}
423ACPI_EXPORT_SYMBOL(acpi_get_table) 434ACPI_EXPORT_SYMBOL(acpi_get_table)
424 435
425/******************************************************************************* 436/*******************************************************************************
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index b3193ec0a2ef..d1dd5160daa9 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -274,12 +274,19 @@ EXPORT_SYMBOL_GPL(acpi_os_map_memory);
274 274
275void acpi_os_unmap_memory(void __iomem * virt, acpi_size size) 275void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
276{ 276{
277 if (acpi_gbl_permanent_mmap) { 277 if (acpi_gbl_permanent_mmap)
278 iounmap(virt); 278 iounmap(virt);
279 } 279 else
280 __acpi_unmap_table(virt, size);
280} 281}
281EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); 282EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
282 283
284void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
285{
286 if (!acpi_gbl_permanent_mmap)
287 __acpi_unmap_table(virt, size);
288}
289
283#ifdef ACPI_FUTURE_USAGE 290#ifdef ACPI_FUTURE_USAGE
284acpi_status 291acpi_status
285acpi_os_get_physical_address(void *virt, acpi_physical_address * phys) 292acpi_os_get_physical_address(void *virt, acpi_physical_address * phys)
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index a8852952fac4..fec1ae36d431 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -181,14 +181,15 @@ acpi_table_parse_entries(char *id,
181 struct acpi_subtable_header *entry; 181 struct acpi_subtable_header *entry;
182 unsigned int count = 0; 182 unsigned int count = 0;
183 unsigned long table_end; 183 unsigned long table_end;
184 acpi_size tbl_size;
184 185
185 if (!handler) 186 if (!handler)
186 return -EINVAL; 187 return -EINVAL;
187 188
188 if (strncmp(id, ACPI_SIG_MADT, 4) == 0) 189 if (strncmp(id, ACPI_SIG_MADT, 4) == 0)
189 acpi_get_table(id, acpi_apic_instance, &table_header); 190 acpi_get_table_with_size(id, acpi_apic_instance, &table_header, &tbl_size);
190 else 191 else
191 acpi_get_table(id, 0, &table_header); 192 acpi_get_table_with_size(id, 0, &table_header, &tbl_size);
192 193
193 if (!table_header) { 194 if (!table_header) {
194 printk(KERN_WARNING PREFIX "%4.4s not present\n", id); 195 printk(KERN_WARNING PREFIX "%4.4s not present\n", id);
@@ -206,8 +207,10 @@ acpi_table_parse_entries(char *id,
206 table_end) { 207 table_end) {
207 if (entry->type == entry_id 208 if (entry->type == entry_id
208 && (!max_entries || count++ < max_entries)) 209 && (!max_entries || count++ < max_entries))
209 if (handler(entry, table_end)) 210 if (handler(entry, table_end)) {
211 early_acpi_os_unmap_memory((char *)table_header, tbl_size);
210 return -EINVAL; 212 return -EINVAL;
213 }
211 214
212 entry = (struct acpi_subtable_header *) 215 entry = (struct acpi_subtable_header *)
213 ((unsigned long)entry + entry->length); 216 ((unsigned long)entry + entry->length);
@@ -217,6 +220,7 @@ acpi_table_parse_entries(char *id,
217 "%i found\n", id, entry_id, count - max_entries, count); 220 "%i found\n", id, entry_id, count - max_entries, count);
218 } 221 }
219 222
223 early_acpi_os_unmap_memory((char *)table_header, tbl_size);
220 return count; 224 return count;
221} 225}
222 226
@@ -241,17 +245,19 @@ acpi_table_parse_madt(enum acpi_madt_type id,
241int __init acpi_table_parse(char *id, acpi_table_handler handler) 245int __init acpi_table_parse(char *id, acpi_table_handler handler)
242{ 246{
243 struct acpi_table_header *table = NULL; 247 struct acpi_table_header *table = NULL;
248 acpi_size tbl_size;
244 249
245 if (!handler) 250 if (!handler)
246 return -EINVAL; 251 return -EINVAL;
247 252
248 if (strncmp(id, ACPI_SIG_MADT, 4) == 0) 253 if (strncmp(id, ACPI_SIG_MADT, 4) == 0)
249 acpi_get_table(id, acpi_apic_instance, &table); 254 acpi_get_table_with_size(id, acpi_apic_instance, &table, &tbl_size);
250 else 255 else
251 acpi_get_table(id, 0, &table); 256 acpi_get_table_with_size(id, 0, &table, &tbl_size);
252 257
253 if (table) { 258 if (table) {
254 handler(table); 259 handler(table);
260 early_acpi_os_unmap_memory(table, tbl_size);
255 return 0; 261 return 0;
256 } else 262 } else
257 return 1; 263 return 1;
@@ -265,8 +271,9 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler)
265static void __init check_multiple_madt(void) 271static void __init check_multiple_madt(void)
266{ 272{
267 struct acpi_table_header *table = NULL; 273 struct acpi_table_header *table = NULL;
274 acpi_size tbl_size;
268 275
269 acpi_get_table(ACPI_SIG_MADT, 2, &table); 276 acpi_get_table_with_size(ACPI_SIG_MADT, 2, &table, &tbl_size);
270 if (table) { 277 if (table) {
271 printk(KERN_WARNING PREFIX 278 printk(KERN_WARNING PREFIX
272 "BIOS bug: multiple APIC/MADT found," 279 "BIOS bug: multiple APIC/MADT found,"
@@ -275,6 +282,7 @@ static void __init check_multiple_madt(void)
275 "If \"acpi_apic_instance=%d\" works better, " 282 "If \"acpi_apic_instance=%d\" works better, "
276 "notify linux-acpi@vger.kernel.org\n", 283 "notify linux-acpi@vger.kernel.org\n",
277 acpi_apic_instance ? 0 : 2); 284 acpi_apic_instance ? 0 : 2);
285 early_acpi_os_unmap_memory(table, tbl_size);
278 286
279 } else 287 } else
280 acpi_apic_instance = 0; 288 acpi_apic_instance = 0;
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 3ab3e4a41d67..7b7ddc2d51c9 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -938,8 +938,8 @@ static int __init ibft_init(void)
938 return -ENOMEM; 938 return -ENOMEM;
939 939
940 if (ibft_addr) { 940 if (ibft_addr) {
941 printk(KERN_INFO "iBFT detected at 0x%lx.\n", 941 printk(KERN_INFO "iBFT detected at 0x%llx.\n",
942 virt_to_phys((void *)ibft_addr)); 942 (u64)virt_to_phys((void *)ibft_addr));
943 943
944 rc = ibft_check_device(); 944 rc = ibft_check_device();
945 if (rc) 945 if (rc)
diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c
index 8df849f66830..b756f043a5f4 100644
--- a/drivers/gpu/drm/drm_proc.c
+++ b/drivers/gpu/drm/drm_proc.c
@@ -678,9 +678,9 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request,
678 *start = &buf[offset]; 678 *start = &buf[offset];
679 *eof = 0; 679 *eof = 0;
680 680
681 DRM_PROC_PRINT("vma use count: %d, high_memory = %p, 0x%08lx\n", 681 DRM_PROC_PRINT("vma use count: %d, high_memory = %p, 0x%llx\n",
682 atomic_read(&dev->vma_count), 682 atomic_read(&dev->vma_count),
683 high_memory, virt_to_phys(high_memory)); 683 high_memory, (u64)virt_to_phys(high_memory));
684 list_for_each_entry(pt, &dev->vmalist, head) { 684 list_for_each_entry(pt, &dev->vmalist, head) {
685 if (!(vma = pt->vma)) 685 if (!(vma = pt->vma))
686 continue; 686 continue;
diff --git a/drivers/misc/sgi-gru/gru.h b/drivers/misc/sgi-gru/gru.h
index 1b5f579df15f..f93f03a9e6e9 100644
--- a/drivers/misc/sgi-gru/gru.h
+++ b/drivers/misc/sgi-gru/gru.h
@@ -19,8 +19,6 @@
19#ifndef __GRU_H__ 19#ifndef __GRU_H__
20#define __GRU_H__ 20#define __GRU_H__
21 21
22#include <asm/uv/uv.h>
23
24/* 22/*
25 * GRU architectural definitions 23 * GRU architectural definitions
26 */ 24 */
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c
index 650983806392..c67e4e8bd62c 100644
--- a/drivers/misc/sgi-gru/grufile.c
+++ b/drivers/misc/sgi-gru/grufile.c
@@ -36,23 +36,11 @@
36#include <linux/interrupt.h> 36#include <linux/interrupt.h>
37#include <linux/proc_fs.h> 37#include <linux/proc_fs.h>
38#include <linux/uaccess.h> 38#include <linux/uaccess.h>
39#include <asm/uv/uv.h>
39#include "gru.h" 40#include "gru.h"
40#include "grulib.h" 41#include "grulib.h"
41#include "grutables.h" 42#include "grutables.h"
42 43
43#if defined CONFIG_X86_64
44#include <asm/genapic.h>
45#include <asm/irq.h>
46#define IS_UV() is_uv_system()
47#elif defined CONFIG_IA64
48#include <asm/system.h>
49#include <asm/sn/simulator.h>
50/* temp support for running on hardware simulator */
51#define IS_UV() IS_MEDUSA() || ia64_platform_is("uv")
52#else
53#define IS_UV() 0
54#endif
55
56#include <asm/uv/uv_hub.h> 44#include <asm/uv/uv_hub.h>
57#include <asm/uv/uv_mmrs.h> 45#include <asm/uv/uv_mmrs.h>
58 46
@@ -381,7 +369,7 @@ static int __init gru_init(void)
381 char id[10]; 369 char id[10];
382 void *gru_start_vaddr; 370 void *gru_start_vaddr;
383 371
384 if (!IS_UV()) 372 if (!is_uv_system())
385 return 0; 373 return 0;
386 374
387#if defined CONFIG_IA64 375#if defined CONFIG_IA64
@@ -451,7 +439,7 @@ static void __exit gru_exit(void)
451 int order = get_order(sizeof(struct gru_state) * 439 int order = get_order(sizeof(struct gru_state) *
452 GRU_CHIPLETS_PER_BLADE); 440 GRU_CHIPLETS_PER_BLADE);
453 441
454 if (!IS_UV()) 442 if (!is_uv_system())
455 return; 443 return;
456 444
457 for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++) 445 for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++)
diff --git a/drivers/misc/sgi-xp/xp.h b/drivers/misc/sgi-xp/xp.h
index 069ad3a1c2ac..2275126cb334 100644
--- a/drivers/misc/sgi-xp/xp.h
+++ b/drivers/misc/sgi-xp/xp.h
@@ -15,21 +15,19 @@
15 15
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17 17
18#if defined CONFIG_X86_UV || defined CONFIG_IA64_SGI_UV
18#include <asm/uv/uv.h> 19#include <asm/uv/uv.h>
20#define is_uv() is_uv_system()
21#endif
22
23#ifndef is_uv
24#define is_uv() 0
25#endif
19 26
20#ifdef CONFIG_IA64 27#if defined CONFIG_IA64
21#include <asm/system.h> 28#include <asm/system.h>
22#include <asm/sn/arch.h> /* defines is_shub1() and is_shub2() */ 29#include <asm/sn/arch.h> /* defines is_shub1() and is_shub2() */
23#define is_shub() ia64_platform_is("sn2") 30#define is_shub() ia64_platform_is("sn2")
24#ifdef CONFIG_IA64_SGI_UV
25#define is_uv() ia64_platform_is("uv")
26#else
27#define is_uv() 0
28#endif
29#endif
30#ifdef CONFIG_X86_64
31#include <asm/genapic.h>
32#define is_uv() is_uv_system()
33#endif 31#endif
34 32
35#ifndef is_shub1 33#ifndef is_shub1
@@ -44,10 +42,6 @@
44#define is_shub() 0 42#define is_shub() 0
45#endif 43#endif
46 44
47#ifndef is_uv
48#define is_uv() 0
49#endif
50
51#ifdef USE_DBUG_ON 45#ifdef USE_DBUG_ON
52#define DBUG_ON(condition) BUG_ON(condition) 46#define DBUG_ON(condition) BUG_ON(condition)
53#else 47#else
diff --git a/drivers/net/ne3210.c b/drivers/net/ne3210.c
index fac43fd6fc87..6a843f7350ab 100644
--- a/drivers/net/ne3210.c
+++ b/drivers/net/ne3210.c
@@ -150,7 +150,8 @@ static int __init ne3210_eisa_probe (struct device *device)
150 if (phys_mem < virt_to_phys(high_memory)) { 150 if (phys_mem < virt_to_phys(high_memory)) {
151 printk(KERN_CRIT "ne3210.c: Card RAM overlaps with normal memory!!!\n"); 151 printk(KERN_CRIT "ne3210.c: Card RAM overlaps with normal memory!!!\n");
152 printk(KERN_CRIT "ne3210.c: Use EISA SCU to set card memory below 1MB,\n"); 152 printk(KERN_CRIT "ne3210.c: Use EISA SCU to set card memory below 1MB,\n");
153 printk(KERN_CRIT "ne3210.c: or to an address above 0x%lx.\n", virt_to_phys(high_memory)); 153 printk(KERN_CRIT "ne3210.c: or to an address above 0x%llx.\n",
154 (u64)virt_to_phys(high_memory));
154 printk(KERN_CRIT "ne3210.c: Driver NOT installed.\n"); 155 printk(KERN_CRIT "ne3210.c: Driver NOT installed.\n");
155 retval = -EINVAL; 156 retval = -EINVAL;
156 goto out3; 157 goto out3;
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index d5378e60fcdd..064307c2277e 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -338,10 +338,10 @@ static int falcon_alloc_special_buffer(struct efx_nic *efx,
338 nic_data->next_buffer_table += buffer->entries; 338 nic_data->next_buffer_table += buffer->entries;
339 339
340 EFX_LOG(efx, "allocating special buffers %d-%d at %llx+%x " 340 EFX_LOG(efx, "allocating special buffers %d-%d at %llx+%x "
341 "(virt %p phys %lx)\n", buffer->index, 341 "(virt %p phys %llx)\n", buffer->index,
342 buffer->index + buffer->entries - 1, 342 buffer->index + buffer->entries - 1,
343 (unsigned long long)buffer->dma_addr, len, 343 (u64)buffer->dma_addr, len,
344 buffer->addr, virt_to_phys(buffer->addr)); 344 buffer->addr, (u64)virt_to_phys(buffer->addr));
345 345
346 return 0; 346 return 0;
347} 347}
@@ -353,10 +353,10 @@ static void falcon_free_special_buffer(struct efx_nic *efx,
353 return; 353 return;
354 354
355 EFX_LOG(efx, "deallocating special buffers %d-%d at %llx+%x " 355 EFX_LOG(efx, "deallocating special buffers %d-%d at %llx+%x "
356 "(virt %p phys %lx)\n", buffer->index, 356 "(virt %p phys %llx)\n", buffer->index,
357 buffer->index + buffer->entries - 1, 357 buffer->index + buffer->entries - 1,
358 (unsigned long long)buffer->dma_addr, buffer->len, 358 (u64)buffer->dma_addr, buffer->len,
359 buffer->addr, virt_to_phys(buffer->addr)); 359 buffer->addr, (u64)virt_to_phys(buffer->addr));
360 360
361 pci_free_consistent(efx->pci_dev, buffer->len, buffer->addr, 361 pci_free_consistent(efx->pci_dev, buffer->len, buffer->addr,
362 buffer->dma_addr); 362 buffer->dma_addr);
@@ -2343,10 +2343,10 @@ int falcon_probe_port(struct efx_nic *efx)
2343 FALCON_MAC_STATS_SIZE); 2343 FALCON_MAC_STATS_SIZE);
2344 if (rc) 2344 if (rc)
2345 return rc; 2345 return rc;
2346 EFX_LOG(efx, "stats buffer at %llx (virt %p phys %lx)\n", 2346 EFX_LOG(efx, "stats buffer at %llx (virt %p phys %llx)\n",
2347 (unsigned long long)efx->stats_buffer.dma_addr, 2347 (u64)efx->stats_buffer.dma_addr,
2348 efx->stats_buffer.addr, 2348 efx->stats_buffer.addr,
2349 virt_to_phys(efx->stats_buffer.addr)); 2349 (u64)virt_to_phys(efx->stats_buffer.addr));
2350 2350
2351 return 0; 2351 return 0;
2352} 2352}
@@ -2921,9 +2921,9 @@ int falcon_probe_nic(struct efx_nic *efx)
2921 goto fail4; 2921 goto fail4;
2922 BUG_ON(efx->irq_status.dma_addr & 0x0f); 2922 BUG_ON(efx->irq_status.dma_addr & 0x0f);
2923 2923
2924 EFX_LOG(efx, "INT_KER at %llx (virt %p phys %lx)\n", 2924 EFX_LOG(efx, "INT_KER at %llx (virt %p phys %llx)\n",
2925 (unsigned long long)efx->irq_status.dma_addr, 2925 (u64)efx->irq_status.dma_addr,
2926 efx->irq_status.addr, virt_to_phys(efx->irq_status.addr)); 2926 efx->irq_status.addr, (u64)virt_to_phys(efx->irq_status.addr));
2927 2927
2928 falcon_probe_spi_devices(efx); 2928 falcon_probe_spi_devices(efx);
2929 2929
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
index bfca15da6f0f..14c11656e82c 100644
--- a/drivers/net/wireless/arlan-main.c
+++ b/drivers/net/wireless/arlan-main.c
@@ -1082,8 +1082,8 @@ static int __init arlan_probe_here(struct net_device *dev,
1082 if (arlan_check_fingerprint(memaddr)) 1082 if (arlan_check_fingerprint(memaddr))
1083 return -ENODEV; 1083 return -ENODEV;
1084 1084
1085 printk(KERN_NOTICE "%s: Arlan found at %x, \n ", dev->name, 1085 printk(KERN_NOTICE "%s: Arlan found at %llx, \n ", dev->name,
1086 (int) virt_to_phys((void*)memaddr)); 1086 (u64) virt_to_phys((void*)memaddr));
1087 1087
1088 ap->card = (void *) memaddr; 1088 ap->card = (void *) memaddr;
1089 dev->mem_start = memaddr; 1089 dev->mem_start = memaddr;
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index f5a662a50acb..519f5f91e765 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -42,6 +42,7 @@
42LIST_HEAD(dmar_drhd_units); 42LIST_HEAD(dmar_drhd_units);
43 43
44static struct acpi_table_header * __initdata dmar_tbl; 44static struct acpi_table_header * __initdata dmar_tbl;
45static acpi_size dmar_tbl_size;
45 46
46static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) 47static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
47{ 48{
@@ -288,8 +289,9 @@ static int __init dmar_table_detect(void)
288 acpi_status status = AE_OK; 289 acpi_status status = AE_OK;
289 290
290 /* if we could find DMAR table, then there are DMAR devices */ 291 /* if we could find DMAR table, then there are DMAR devices */
291 status = acpi_get_table(ACPI_SIG_DMAR, 0, 292 status = acpi_get_table_with_size(ACPI_SIG_DMAR, 0,
292 (struct acpi_table_header **)&dmar_tbl); 293 (struct acpi_table_header **)&dmar_tbl,
294 &dmar_tbl_size);
293 295
294 if (ACPI_SUCCESS(status) && !dmar_tbl) { 296 if (ACPI_SUCCESS(status) && !dmar_tbl) {
295 printk (KERN_WARNING PREFIX "Unable to map DMAR\n"); 297 printk (KERN_WARNING PREFIX "Unable to map DMAR\n");
@@ -481,6 +483,7 @@ void __init detect_intel_iommu(void)
481 iommu_detected = 1; 483 iommu_detected = 1;
482#endif 484#endif
483 } 485 }
486 early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size);
484 dmar_tbl = NULL; 487 dmar_tbl = NULL;
485} 488}
486 489
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index a62720a7edc0..ab0b85cf21f3 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -144,6 +144,7 @@ void __iomem *acpi_os_map_memory(acpi_physical_address where,
144 acpi_size length); 144 acpi_size length);
145 145
146void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size); 146void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
147void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
147 148
148#ifdef ACPI_FUTURE_USAGE 149#ifdef ACPI_FUTURE_USAGE
149acpi_status 150acpi_status
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index c8e8cf45830f..cc40102fe2f3 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -130,6 +130,10 @@ acpi_get_table_header(acpi_string signature,
130 struct acpi_table_header *out_table_header); 130 struct acpi_table_header *out_table_header);
131 131
132acpi_status 132acpi_status
133acpi_get_table_with_size(acpi_string signature,
134 u32 instance, struct acpi_table_header **out_table,
135 acpi_size *tbl_size);
136acpi_status
133acpi_get_table(acpi_string signature, 137acpi_get_table(acpi_string signature,
134 u32 instance, struct acpi_table_header **out_table); 138 u32 instance, struct acpi_table_header **out_table);
135 139
diff --git a/include/asm-frv/swab.h b/include/asm-frv/swab.h
index afb3396ba5ed..f305834b4799 100644
--- a/include/asm-frv/swab.h
+++ b/include/asm-frv/swab.h
@@ -1,7 +1,7 @@
1#ifndef _ASM_SWAB_H 1#ifndef _ASM_SWAB_H
2#define _ASM_SWAB_H 2#define _ASM_SWAB_H
3 3
4#include <asm/types.h> 4#include <linux/types.h>
5 5
6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
7# define __SWAB_64_THRU_32__ 7# define __SWAB_64_THRU_32__
diff --git a/include/asm-m32r/swab.h b/include/asm-m32r/swab.h
index 97973e101825..54dab001d6d1 100644
--- a/include/asm-m32r/swab.h
+++ b/include/asm-m32r/swab.h
@@ -1,7 +1,7 @@
1#ifndef _ASM_M32R_SWAB_H 1#ifndef _ASM_M32R_SWAB_H
2#define _ASM_M32R_SWAB_H 2#define _ASM_M32R_SWAB_H
3 3
4#include <asm/types.h> 4#include <linux/types.h>
5 5
6#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 6#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
7# define __SWAB_64_THRU_32__ 7# define __SWAB_64_THRU_32__
diff --git a/include/asm-mn10300/swab.h b/include/asm-mn10300/swab.h
index 4504d1b4b477..bd818a820ca8 100644
--- a/include/asm-mn10300/swab.h
+++ b/include/asm-mn10300/swab.h
@@ -11,7 +11,7 @@
11#ifndef _ASM_SWAB_H 11#ifndef _ASM_SWAB_H
12#define _ASM_SWAB_H 12#define _ASM_SWAB_H
13 13
14#include <asm/types.h> 14#include <linux/types.h>
15 15
16#ifdef __GNUC__ 16#ifdef __GNUC__
17 17
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 6fce2fc2d124..78199151c00b 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -79,6 +79,7 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table);
79typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); 79typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
80 80
81char * __acpi_map_table (unsigned long phys_addr, unsigned long size); 81char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
82void __acpi_unmap_table(char *map, unsigned long size);
82int early_acpi_boot_init(void); 83int early_acpi_boot_init(void);
83int acpi_boot_init (void); 84int acpi_boot_init (void);
84int acpi_boot_table_init (void); 85int acpi_boot_table_init (void);
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 07ae8f846055..5b5d4731f956 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -6,6 +6,7 @@
6#define CODA_PSDEV_MAJOR 67 6#define CODA_PSDEV_MAJOR 67
7#define MAX_CODADEVS 5 /* how many do we allow */ 7#define MAX_CODADEVS 5 /* how many do we allow */
8 8
9#ifdef __KERNEL__
9struct kstatfs; 10struct kstatfs;
10 11
11/* communication pending/processing queues */ 12/* communication pending/processing queues */
@@ -24,7 +25,6 @@ static inline struct venus_comm *coda_vcp(struct super_block *sb)
24 return (struct venus_comm *)((sb)->s_fs_info); 25 return (struct venus_comm *)((sb)->s_fs_info);
25} 26}
26 27
27
28/* upcalls */ 28/* upcalls */
29int venus_rootfid(struct super_block *sb, struct CodaFid *fidp); 29int venus_rootfid(struct super_block *sb, struct CodaFid *fidp);
30int venus_getattr(struct super_block *sb, struct CodaFid *fid, 30int venus_getattr(struct super_block *sb, struct CodaFid *fid,
@@ -64,6 +64,12 @@ int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb);
64int venus_fsync(struct super_block *sb, struct CodaFid *fid); 64int venus_fsync(struct super_block *sb, struct CodaFid *fid);
65int venus_statfs(struct dentry *dentry, struct kstatfs *sfs); 65int venus_statfs(struct dentry *dentry, struct kstatfs *sfs);
66 66
67/*
68 * Statistics
69 */
70
71extern struct venus_comm coda_comms[];
72#endif /* __KERNEL__ */
67 73
68/* messages between coda filesystem in kernel and Venus */ 74/* messages between coda filesystem in kernel and Venus */
69struct upc_req { 75struct upc_req {
@@ -82,11 +88,4 @@ struct upc_req {
82#define REQ_WRITE 0x4 88#define REQ_WRITE 0x4
83#define REQ_ABORT 0x8 89#define REQ_ABORT 0x8
84 90
85
86/*
87 * Statistics
88 */
89
90extern struct venus_comm coda_comms[];
91
92#endif 91#endif
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 5ca54d77079f..7605c5e9589f 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -111,6 +111,15 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re
111#endif 111#endif
112} 112}
113 113
114static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
115{
116#ifdef ELF_CORE_COPY_KERNEL_REGS
117 ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs);
118#else
119 elf_core_copy_regs(elfregs, regs);
120#endif
121}
122
114static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) 123static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
115{ 124{
116#ifdef ELF_CORE_COPY_TASK_REGS 125#ifdef ELF_CORE_COPY_TASK_REGS
diff --git a/include/linux/in6.h b/include/linux/in6.h
index bc492048c349..718bf21c5754 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -44,11 +44,11 @@ struct in6_addr
44 * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined 44 * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined
45 * in network byte order, not in host byte order as are the IPv4 equivalents 45 * in network byte order, not in host byte order as are the IPv4 equivalents
46 */ 46 */
47#ifdef __KERNEL__
47extern const struct in6_addr in6addr_any; 48extern const struct in6_addr in6addr_any;
48#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } 49#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
49extern const struct in6_addr in6addr_loopback; 50extern const struct in6_addr in6addr_loopback;
50#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } 51#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
51#ifdef __KERNEL__
52extern const struct in6_addr in6addr_linklocal_allnodes; 52extern const struct in6_addr in6addr_linklocal_allnodes;
53#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ 53#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \
54 { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } 54 { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 323561582c10..7dc04ff5ab89 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1304,5 +1304,6 @@ void vmemmap_populate_print_last(void);
1304 1304
1305extern void *alloc_locked_buffer(size_t size); 1305extern void *alloc_locked_buffer(size_t size);
1306extern void free_locked_buffer(void *buffer, size_t size); 1306extern void free_locked_buffer(void *buffer, size_t size);
1307extern void release_locked_buffer(void *buffer, size_t size);
1307#endif /* __KERNEL__ */ 1308#endif /* __KERNEL__ */
1308#endif /* _LINUX_MM_H */ 1309#endif /* _LINUX_MM_H */
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index 7382af374731..e137b3c486a7 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -237,6 +237,7 @@ struct nubus_dirent
237 int mask; 237 int mask;
238}; 238};
239 239
240#ifdef __KERNEL__
240struct nubus_board { 241struct nubus_board {
241 struct nubus_board* next; 242 struct nubus_board* next;
242 struct nubus_dev* first_dev; 243 struct nubus_dev* first_dev;
@@ -351,6 +352,7 @@ void nubus_get_rsrc_mem(void* dest,
351void nubus_get_rsrc_str(void* dest, 352void nubus_get_rsrc_str(void* dest,
352 const struct nubus_dirent *dirent, 353 const struct nubus_dirent *dirent,
353 int maxlen); 354 int maxlen);
355#endif /* __KERNEL__ */
354 356
355/* We'd like to get rid of this eventually. Only daynaport.c uses it now. */ 357/* We'd like to get rid of this eventually. Only daynaport.c uses it now. */
356static inline void *nubus_slot_addr(int slot) 358static inline void *nubus_slot_addr(int slot)
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 0e24202b5a4e..3577ffd90d45 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -8,8 +8,15 @@
8 8
9#include <asm/percpu.h> 9#include <asm/percpu.h>
10 10
11#ifndef PER_CPU_BASE_SECTION
11#ifdef CONFIG_SMP 12#ifdef CONFIG_SMP
12#define PER_CPU_BASE_SECTION ".data.percpu" 13#define PER_CPU_BASE_SECTION ".data.percpu"
14#else
15#define PER_CPU_BASE_SECTION ".data"
16#endif
17#endif
18
19#ifdef CONFIG_SMP
13 20
14#ifdef MODULE 21#ifdef MODULE
15#define PER_CPU_SHARED_ALIGNED_SECTION "" 22#define PER_CPU_SHARED_ALIGNED_SECTION ""
@@ -20,7 +27,6 @@
20 27
21#else 28#else
22 29
23#define PER_CPU_BASE_SECTION ".data"
24#define PER_CPU_SHARED_ALIGNED_SECTION "" 30#define PER_CPU_SHARED_ALIGNED_SECTION ""
25#define PER_CPU_FIRST_SECTION "" 31#define PER_CPU_FIRST_SECTION ""
26 32
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index bc5114d35e99..e356c99f0659 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -28,8 +28,6 @@
28#include <linux/reiserfs_fs_sb.h> 28#include <linux/reiserfs_fs_sb.h>
29#endif 29#endif
30 30
31struct fid;
32
33/* 31/*
34 * include/linux/reiser_fs.h 32 * include/linux/reiser_fs.h
35 * 33 *
@@ -37,6 +35,33 @@ struct fid;
37 * 35 *
38 */ 36 */
39 37
38/* ioctl's command */
39#define REISERFS_IOC_UNPACK _IOW(0xCD,1,long)
40/* define following flags to be the same as in ext2, so that chattr(1),
41 lsattr(1) will work with us. */
42#define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS
43#define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS
44#define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION
45#define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION
46
47#ifdef __KERNEL__
48/* the 32 bit compat definitions with int argument */
49#define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int)
50#define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS
51#define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS
52#define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION
53#define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION
54
55/* Locking primitives */
56/* Right now we are still falling back to (un)lock_kernel, but eventually that
57 would evolve into real per-fs locks */
58#define reiserfs_write_lock( sb ) lock_kernel()
59#define reiserfs_write_unlock( sb ) unlock_kernel()
60
61/* xattr stuff */
62#define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem)
63struct fid;
64
40/* in reading the #defines, it may help to understand that they employ 65/* in reading the #defines, it may help to understand that they employ
41 the following abbreviations: 66 the following abbreviations:
42 67
@@ -698,6 +723,7 @@ static inline void cpu_key_k_offset_dec(struct cpu_key *key)
698/* object identifier for root dir */ 723/* object identifier for root dir */
699#define REISERFS_ROOT_OBJECTID 2 724#define REISERFS_ROOT_OBJECTID 2
700#define REISERFS_ROOT_PARENT_OBJECTID 1 725#define REISERFS_ROOT_PARENT_OBJECTID 1
726
701extern struct reiserfs_key root_key; 727extern struct reiserfs_key root_key;
702 728
703/* 729/*
@@ -1540,7 +1566,6 @@ struct reiserfs_iget_args {
1540/* FUNCTION DECLARATIONS */ 1566/* FUNCTION DECLARATIONS */
1541/***************************************************************************/ 1567/***************************************************************************/
1542 1568
1543/*#ifdef __KERNEL__*/
1544#define get_journal_desc_magic(bh) (bh->b_data + bh->b_size - 12) 1569#define get_journal_desc_magic(bh) (bh->b_data + bh->b_size - 12)
1545 1570
1546#define journal_trans_half(blocksize) \ 1571#define journal_trans_half(blocksize) \
@@ -2178,29 +2203,6 @@ long reiserfs_compat_ioctl(struct file *filp,
2178 unsigned int cmd, unsigned long arg); 2203 unsigned int cmd, unsigned long arg);
2179int reiserfs_unpack(struct inode *inode, struct file *filp); 2204int reiserfs_unpack(struct inode *inode, struct file *filp);
2180 2205
2181/* ioctl's command */
2182#define REISERFS_IOC_UNPACK _IOW(0xCD,1,long)
2183/* define following flags to be the same as in ext2, so that chattr(1),
2184 lsattr(1) will work with us. */
2185#define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS
2186#define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS
2187#define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION
2188#define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION
2189
2190/* the 32 bit compat definitions with int argument */
2191#define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int)
2192#define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS
2193#define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS
2194#define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION
2195#define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION
2196
2197/* Locking primitives */
2198/* Right now we are still falling back to (un)lock_kernel, but eventually that
2199 would evolve into real per-fs locks */
2200#define reiserfs_write_lock( sb ) lock_kernel()
2201#define reiserfs_write_unlock( sb ) unlock_kernel()
2202
2203/* xattr stuff */
2204#define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem)
2205 2206
2207#endif /* __KERNEL__ */
2206#endif /* _LINUX_REISER_FS_H */ 2208#endif /* _LINUX_REISER_FS_H */
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 20fc4bbfca42..afc01909a428 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -24,10 +24,12 @@ struct __kernel_sockaddr_storage {
24#include <linux/types.h> /* pid_t */ 24#include <linux/types.h> /* pid_t */
25#include <linux/compiler.h> /* __user */ 25#include <linux/compiler.h> /* __user */
26 26
27#ifdef CONFIG_PROC_FS 27#ifdef __KERNEL__
28# ifdef CONFIG_PROC_FS
28struct seq_file; 29struct seq_file;
29extern void socket_seq_show(struct seq_file *seq); 30extern void socket_seq_show(struct seq_file *seq);
30#endif 31# endif
32#endif /* __KERNEL__ */
31 33
32typedef unsigned short sa_family_t; 34typedef unsigned short sa_family_t;
33 35
diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53bc348..fca82ed55f49 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,9 @@
1#ifndef _LINUX_TYPES_H 1#ifndef _LINUX_TYPES_H
2#define _LINUX_TYPES_H 2#define _LINUX_TYPES_H
3 3
4#include <asm/types.h>
5
6#ifndef __ASSEMBLY__
4#ifdef __KERNEL__ 7#ifdef __KERNEL__
5 8
6#define DECLARE_BITMAP(name,bits) \ 9#define DECLARE_BITMAP(name,bits) \
@@ -9,7 +12,6 @@
9#endif 12#endif
10 13
11#include <linux/posix_types.h> 14#include <linux/posix_types.h>
12#include <asm/types.h>
13 15
14#ifndef __KERNEL_STRICT_NAMES 16#ifndef __KERNEL_STRICT_NAMES
15 17
@@ -212,5 +214,5 @@ struct ustat {
212}; 214};
213 215
214#endif /* __KERNEL__ */ 216#endif /* __KERNEL__ */
215 217#endif /* __ASSEMBLY__ */
216#endif /* _LINUX_TYPES_H */ 218#endif /* _LINUX_TYPES_H */
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 8a6d7b08864e..795e7b67a228 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1130,7 +1130,7 @@ void crash_save_cpu(struct pt_regs *regs, int cpu)
1130 return; 1130 return;
1131 memset(&prstatus, 0, sizeof(prstatus)); 1131 memset(&prstatus, 0, sizeof(prstatus));
1132 prstatus.pr_pid = current->pid; 1132 prstatus.pr_pid = current->pid;
1133 elf_core_copy_regs(&prstatus.pr_reg, regs); 1133 elf_core_copy_kernel_regs(&prstatus.pr_reg, regs);
1134 buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS, 1134 buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS,
1135 &prstatus, sizeof(prstatus)); 1135 &prstatus, sizeof(prstatus));
1136 final_note(buf); 1136 final_note(buf);
diff --git a/kernel/panic.c b/kernel/panic.c
index 33cab3de1763..32fe4eff1b89 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -359,10 +359,6 @@ EXPORT_SYMBOL(warn_slowpath);
359 359
360#ifdef CONFIG_CC_STACKPROTECTOR 360#ifdef CONFIG_CC_STACKPROTECTOR
361 361
362#ifndef GCC_HAS_SP
363#warning You have selected the CONFIG_CC_STACKPROTECTOR option, but the gcc used does not support this.
364#endif
365
366/* 362/*
367 * Called when gcc's -fstack-protector feature is used, and 363 * Called when gcc's -fstack-protector feature is used, and
368 * gcc detects corruption of the on-stack canary value 364 * gcc detects corruption of the on-stack canary value
diff --git a/mm/mlock.c b/mm/mlock.c
index 037161d61b4e..cbe9e0581b75 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -660,7 +660,7 @@ void *alloc_locked_buffer(size_t size)
660 return buffer; 660 return buffer;
661} 661}
662 662
663void free_locked_buffer(void *buffer, size_t size) 663void release_locked_buffer(void *buffer, size_t size)
664{ 664{
665 unsigned long pgsz = PAGE_ALIGN(size) >> PAGE_SHIFT; 665 unsigned long pgsz = PAGE_ALIGN(size) >> PAGE_SHIFT;
666 666
@@ -670,6 +670,11 @@ void free_locked_buffer(void *buffer, size_t size)
670 current->mm->locked_vm -= pgsz; 670 current->mm->locked_vm -= pgsz;
671 671
672 up_write(&current->mm->mmap_sem); 672 up_write(&current->mm->mmap_sem);
673}
674
675void free_locked_buffer(void *buffer, size_t size)
676{
677 release_locked_buffer(buffer, size);
673 678
674 kfree(buffer); 679 kfree(buffer);
675} 680}
diff --git a/scripts/gcc-x86_32-has-stack-protector.sh b/scripts/gcc-x86_32-has-stack-protector.sh
new file mode 100644
index 000000000000..29493dc4528d
--- /dev/null
+++ b/scripts/gcc-x86_32-has-stack-protector.sh
@@ -0,0 +1,8 @@
1#!/bin/sh
2
3echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then
5 echo y
6else
7 echo n
8fi
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh
index 325c0a1b03b6..afaec618b395 100644
--- a/scripts/gcc-x86_64-has-stack-protector.sh
+++ b/scripts/gcc-x86_64-has-stack-protector.sh
@@ -1,6 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2 2
3echo "int foo(void) { char X[200]; return 3; }" | $1 -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs" 3echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then 4if [ "$?" -eq "0" ] ; then
5 echo $2 5 echo y
6else
7 echo n
6fi 8fi
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
index db30fac3083e..56f90a480899 100644
--- a/scripts/headers_check.pl
+++ b/scripts/headers_check.pl
@@ -38,7 +38,7 @@ foreach my $file (@files) {
38 &check_asm_types(); 38 &check_asm_types();
39 &check_sizetypes(); 39 &check_sizetypes();
40 &check_prototypes(); 40 &check_prototypes();
41 &check_config(); 41 # Dropped for now. Too much noise &check_config();
42 } 42 }
43 close FH; 43 close FH;
44} 44}
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 88921611b22e..7e62303133dc 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -415,8 +415,9 @@ static int parse_elf(struct elf_info *info, const char *filename)
415 const char *secstrings 415 const char *secstrings
416 = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; 416 = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
417 const char *secname; 417 const char *secname;
418 int nobits = sechdrs[i].sh_type == SHT_NOBITS;
418 419
419 if (sechdrs[i].sh_offset > info->size) { 420 if (!nobits && sechdrs[i].sh_offset > info->size) {
420 fatal("%s is truncated. sechdrs[i].sh_offset=%lu > " 421 fatal("%s is truncated. sechdrs[i].sh_offset=%lu > "
421 "sizeof(*hrd)=%zu\n", filename, 422 "sizeof(*hrd)=%zu\n", filename,
422 (unsigned long)sechdrs[i].sh_offset, 423 (unsigned long)sechdrs[i].sh_offset,
@@ -425,6 +426,8 @@ static int parse_elf(struct elf_info *info, const char *filename)
425 } 426 }
426 secname = secstrings + sechdrs[i].sh_name; 427 secname = secstrings + sechdrs[i].sh_name;
427 if (strcmp(secname, ".modinfo") == 0) { 428 if (strcmp(secname, ".modinfo") == 0) {
429 if (nobits)
430 fatal("%s has NOBITS .modinfo\n", filename);
428 info->modinfo = (void *)hdr + sechdrs[i].sh_offset; 431 info->modinfo = (void *)hdr + sechdrs[i].sh_offset;
429 info->modinfo_len = sechdrs[i].sh_size; 432 info->modinfo_len = sechdrs[i].sh_size;
430 } else if (strcmp(secname, "__ksymtab") == 0) 433 } else if (strcmp(secname, "__ksymtab") == 0)