aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-08-10 17:40:50 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2009-08-10 17:40:50 -0400
commitdcbf77cac640af0ab944d5cbb07934bf6708b4d9 (patch)
treee2f4d1b3a1089ee10436cb19740a9cb99f2dc527 /arch
parentc00aafcd4977769e8728292302ddbbb8b1082fab (diff)
parent85dfd81dc57e8183a277ddd7a56aa65c96f3f487 (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/compressed/misc.c1
-rw-r--r--arch/arm/common/clkdev.c1
-rw-r--r--arch/arm/configs/mx27_defconfig270
-rw-r--r--arch/arm/configs/mx3_defconfig151
-rw-r--r--arch/arm/configs/omap3_evm_defconfig2
-rw-r--r--arch/arm/include/asm/atomic.h2
-rw-r--r--arch/arm/kernel/entry-common.S2
-rw-r--r--arch/arm/kernel/signal.c4
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c1
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c1
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c1
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c1
-rw-r--r--arch/arm/mach-davinci/board-sffsdr.c1
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ts72xx.h3
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c18
-rw-r--r--arch/arm/mach-ks8695/include/mach/hardware.h5
-rw-r--r--arch/arm/mach-ks8695/include/mach/timex.h5
-rw-r--r--arch/arm/mach-ks8695/pci.c3
-rw-r--r--arch/arm/mach-omap1/mcbsp.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c5
-rw-r--r--arch/arm/mach-omap2/mcbsp.c1
-rw-r--r--arch/arm/mach-omap2/usb-musb.c21
-rw-r--r--arch/arm/mach-pxa/em-x270.c4
-rw-r--r--arch/arm/mach-pxa/palmld.c4
-rw-r--r--arch/arm/mach-pxa/palmt5.c4
-rw-r--r--arch/arm/mach-pxa/palmtx.c4
-rw-r--r--arch/arm/mach-pxa/treo680.c2
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c2
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa320.c2
-rw-r--r--arch/arm/mach-s3c2410/include/mach/gpio-core.h2
-rw-r--r--arch/arm/plat-s3c24xx/pwm.c4
-rw-r--r--arch/arm/plat-s3c64xx/pm.c2
-rw-r--r--arch/arm/plat-s3c64xx/s3c6400-clock.c4
-rw-r--r--arch/arm/plat-stmp3xxx/pinmux.c1
-rw-r--r--arch/ia64/kvm/mmio.c6
-rw-r--r--arch/ia64/kvm/vcpu.c6
-rw-r--r--arch/ia64/kvm/vcpu.h13
-rw-r--r--arch/mn10300/include/asm/pci.h1
-rw-r--r--arch/powerpc/include/asm/kvm_host.h2
-rw-r--r--arch/powerpc/kernel/dma.c6
-rw-r--r--arch/powerpc/kernel/mpc7450-pmu.c3
-rw-r--r--arch/powerpc/kernel/perf_counter.c8
-rw-r--r--arch/powerpc/kernel/power4-pmu.c3
-rw-r--r--arch/powerpc/kernel/power5+-pmu.c5
-rw-r--r--arch/powerpc/kernel/power5-pmu.c3
-rw-r--r--arch/powerpc/kernel/power6-pmu.c3
-rw-r--r--arch/powerpc/kernel/power7-pmu.c3
-rw-r--r--arch/powerpc/kernel/ppc970-pmu.c5
-rw-r--r--arch/s390/kernel/early.c3
-rw-r--r--arch/s390/kvm/interrupt.c2
-rw-r--r--arch/s390/kvm/sigp.c7
-rw-r--r--arch/x86/kernel/apic/x2apic_cluster.c8
-rw-r--r--arch/x86/kernel/apic/x2apic_phys.c8
-rw-r--r--arch/x86/kernel/efi.c2
-rw-r--r--arch/x86/kernel/reboot.c10
-rw-r--r--arch/x86/kernel/tsc.c29
-rw-r--r--arch/x86/kernel/vmi_32.c2
-rw-r--r--arch/x86/kvm/i8254.c3
-rw-r--r--arch/x86/kvm/mmu.c48
-rw-r--r--arch/x86/kvm/svm.c6
-rw-r--r--arch/x86/kvm/vmx.c6
-rw-r--r--arch/x86/kvm/x86.c44
62 files changed, 527 insertions, 253 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 9e6e512f0117..17153b54613b 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -29,7 +29,6 @@ unsigned int __machine_arch_type;
29 29
30static void putstr(const char *ptr); 30static void putstr(const char *ptr);
31 31
32#include <linux/compiler.h>
33#include <mach/uncompress.h> 32#include <mach/uncompress.h>
34 33
35#ifdef CONFIG_DEBUG_ICEDCC 34#ifdef CONFIG_DEBUG_ICEDCC
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
index f37afd9422f3..aae5bc01acc8 100644
--- a/arch/arm/common/clkdev.c
+++ b/arch/arm/common/clkdev.c
@@ -17,6 +17,7 @@
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/string.h> 18#include <linux/string.h>
19#include <linux/mutex.h> 19#include <linux/mutex.h>
20#include <linux/clk.h>
20 21
21#include <asm/clkdev.h> 22#include <asm/clkdev.h>
22#include <mach/clkdev.h> 23#include <mach/clkdev.h>
diff --git a/arch/arm/configs/mx27_defconfig b/arch/arm/configs/mx27_defconfig
index 083516cd0d7f..75263a83741c 100644
--- a/arch/arm/configs/mx27_defconfig
+++ b/arch/arm/configs/mx27_defconfig
@@ -1,15 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc1 3# Linux kernel version: 2.6.31-rc4
4# Wed Apr 8 10:18:06 2009 4# Fri Jul 24 16:08:06 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_HAVE_PWM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 8CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 9CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 10CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 11CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y 12CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y 14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_SUPPORT=y 15CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,14 +18,13 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_HARDIRQS_SW_RESEND=y 18CONFIG_HARDIRQS_SW_RESEND=y
19CONFIG_GENERIC_IRQ_PROBE=y 19CONFIG_GENERIC_IRQ_PROBE=y
20CONFIG_RWSEM_GENERIC_SPINLOCK=y 20CONFIG_RWSEM_GENERIC_SPINLOCK=y
21# CONFIG_ARCH_HAS_ILOG2_U32 is not set
22# CONFIG_ARCH_HAS_ILOG2_U64 is not set
23CONFIG_GENERIC_HWEIGHT=y 21CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y 22CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ARCH_MTD_XIP=y 23CONFIG_ARCH_MTD_XIP=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 24CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000 25CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27CONFIG_CONSTRUCTORS=y
29 28
30# 29#
31# General setup 30# General setup
@@ -85,7 +84,12 @@ CONFIG_TIMERFD=y
85CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
86CONFIG_SHMEM=y 85CONFIG_SHMEM=y
87CONFIG_AIO=y 86CONFIG_AIO=y
87
88#
89# Performance Counters
90#
88CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
92# CONFIG_STRIP_ASM_SYMS is not set
89# CONFIG_COMPAT_BRK is not set 93# CONFIG_COMPAT_BRK is not set
90CONFIG_SLAB=y 94CONFIG_SLAB=y
91# CONFIG_SLUB is not set 95# CONFIG_SLUB is not set
@@ -99,6 +103,12 @@ CONFIG_KPROBES=y
99CONFIG_KRETPROBES=y 103CONFIG_KRETPROBES=y
100CONFIG_HAVE_KPROBES=y 104CONFIG_HAVE_KPROBES=y
101CONFIG_HAVE_KRETPROBES=y 105CONFIG_HAVE_KRETPROBES=y
106CONFIG_HAVE_CLK=y
107
108#
109# GCOV-based kernel profiling
110#
111# CONFIG_GCOV_KERNEL is not set
102# CONFIG_SLOW_WORK is not set 112# CONFIG_SLOW_WORK is not set
103CONFIG_HAVE_GENERIC_DMA_COHERENT=y 113CONFIG_HAVE_GENERIC_DMA_COHERENT=y
104CONFIG_SLABINFO=y 114CONFIG_SLABINFO=y
@@ -111,7 +121,7 @@ CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODVERSIONS is not set 121# CONFIG_MODVERSIONS is not set
112# CONFIG_MODULE_SRCVERSION_ALL is not set 122# CONFIG_MODULE_SRCVERSION_ALL is not set
113CONFIG_BLOCK=y 123CONFIG_BLOCK=y
114# CONFIG_LBD is not set 124CONFIG_LBDAF=y
115# CONFIG_BLK_DEV_BSG is not set 125# CONFIG_BLK_DEV_BSG is not set
116# CONFIG_BLK_DEV_INTEGRITY is not set 126# CONFIG_BLK_DEV_INTEGRITY is not set
117 127
@@ -138,13 +148,14 @@ CONFIG_FREEZER=y
138# CONFIG_ARCH_VERSATILE is not set 148# CONFIG_ARCH_VERSATILE is not set
139# CONFIG_ARCH_AT91 is not set 149# CONFIG_ARCH_AT91 is not set
140# CONFIG_ARCH_CLPS711X is not set 150# CONFIG_ARCH_CLPS711X is not set
151# CONFIG_ARCH_GEMINI is not set
141# CONFIG_ARCH_EBSA110 is not set 152# CONFIG_ARCH_EBSA110 is not set
142# CONFIG_ARCH_EP93XX is not set 153# CONFIG_ARCH_EP93XX is not set
143# CONFIG_ARCH_GEMINI is not set
144# CONFIG_ARCH_FOOTBRIDGE is not set 154# CONFIG_ARCH_FOOTBRIDGE is not set
155CONFIG_ARCH_MXC=y
156# CONFIG_ARCH_STMP3XXX is not set
145# CONFIG_ARCH_NETX is not set 157# CONFIG_ARCH_NETX is not set
146# CONFIG_ARCH_H720X is not set 158# CONFIG_ARCH_H720X is not set
147# CONFIG_ARCH_IMX is not set
148# CONFIG_ARCH_IOP13XX is not set 159# CONFIG_ARCH_IOP13XX is not set
149# CONFIG_ARCH_IOP32X is not set 160# CONFIG_ARCH_IOP32X is not set
150# CONFIG_ARCH_IOP33X is not set 161# CONFIG_ARCH_IOP33X is not set
@@ -153,25 +164,25 @@ CONFIG_FREEZER=y
153# CONFIG_ARCH_IXP4XX is not set 164# CONFIG_ARCH_IXP4XX is not set
154# CONFIG_ARCH_L7200 is not set 165# CONFIG_ARCH_L7200 is not set
155# CONFIG_ARCH_KIRKWOOD is not set 166# CONFIG_ARCH_KIRKWOOD is not set
156# CONFIG_ARCH_KS8695 is not set
157# CONFIG_ARCH_NS9XXX is not set
158# CONFIG_ARCH_LOKI is not set 167# CONFIG_ARCH_LOKI is not set
159# CONFIG_ARCH_MV78XX0 is not set 168# CONFIG_ARCH_MV78XX0 is not set
160CONFIG_ARCH_MXC=y
161# CONFIG_ARCH_ORION5X is not set 169# CONFIG_ARCH_ORION5X is not set
170# CONFIG_ARCH_MMP is not set
171# CONFIG_ARCH_KS8695 is not set
172# CONFIG_ARCH_NS9XXX is not set
173# CONFIG_ARCH_W90X900 is not set
162# CONFIG_ARCH_PNX4008 is not set 174# CONFIG_ARCH_PNX4008 is not set
163# CONFIG_ARCH_PXA is not set 175# CONFIG_ARCH_PXA is not set
164# CONFIG_ARCH_MMP is not set 176# CONFIG_ARCH_MSM is not set
165# CONFIG_ARCH_RPC is not set 177# CONFIG_ARCH_RPC is not set
166# CONFIG_ARCH_SA1100 is not set 178# CONFIG_ARCH_SA1100 is not set
167# CONFIG_ARCH_S3C2410 is not set 179# CONFIG_ARCH_S3C2410 is not set
168# CONFIG_ARCH_S3C64XX is not set 180# CONFIG_ARCH_S3C64XX is not set
169# CONFIG_ARCH_SHARK is not set 181# CONFIG_ARCH_SHARK is not set
170# CONFIG_ARCH_LH7A40X is not set 182# CONFIG_ARCH_LH7A40X is not set
183# CONFIG_ARCH_U300 is not set
171# CONFIG_ARCH_DAVINCI is not set 184# CONFIG_ARCH_DAVINCI is not set
172# CONFIG_ARCH_OMAP is not set 185# CONFIG_ARCH_OMAP is not set
173# CONFIG_ARCH_MSM is not set
174# CONFIG_ARCH_W90X900 is not set
175 186
176# 187#
177# Freescale MXC Implementations 188# Freescale MXC Implementations
@@ -188,6 +199,8 @@ CONFIG_MACH_MX27=y
188CONFIG_MACH_MX27ADS=y 199CONFIG_MACH_MX27ADS=y
189CONFIG_MACH_PCM038=y 200CONFIG_MACH_PCM038=y
190CONFIG_MACH_PCM970_BASEBOARD=y 201CONFIG_MACH_PCM970_BASEBOARD=y
202CONFIG_MACH_MX27_3DS=y
203CONFIG_MACH_MX27LITE=y
191CONFIG_MXC_IRQ_PRIOR=y 204CONFIG_MXC_IRQ_PRIOR=y
192CONFIG_MXC_PWM=y 205CONFIG_MXC_PWM=y
193 206
@@ -213,7 +226,6 @@ CONFIG_ARM_THUMB=y
213# CONFIG_CPU_DCACHE_DISABLE is not set 226# CONFIG_CPU_DCACHE_DISABLE is not set
214# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 227# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
215# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 228# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
216# CONFIG_OUTER_CACHE is not set
217CONFIG_COMMON_CLKDEV=y 229CONFIG_COMMON_CLKDEV=y
218 230
219# 231#
@@ -238,7 +250,6 @@ CONFIG_PREEMPT=y
238CONFIG_HZ=100 250CONFIG_HZ=100
239CONFIG_AEABI=y 251CONFIG_AEABI=y
240CONFIG_OABI_COMPAT=y 252CONFIG_OABI_COMPAT=y
241CONFIG_ARCH_FLATMEM_HAS_HOLES=y
242# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 253# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
243# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 254# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
244# CONFIG_HIGHMEM is not set 255# CONFIG_HIGHMEM is not set
@@ -253,10 +264,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4096
253# CONFIG_PHYS_ADDR_T_64BIT is not set 264# CONFIG_PHYS_ADDR_T_64BIT is not set
254CONFIG_ZONE_DMA_FLAG=0 265CONFIG_ZONE_DMA_FLAG=0
255CONFIG_VIRT_TO_BUS=y 266CONFIG_VIRT_TO_BUS=y
256CONFIG_UNEVICTABLE_LRU=y
257CONFIG_HAVE_MLOCK=y 267CONFIG_HAVE_MLOCK=y
258CONFIG_HAVE_MLOCKED_PAGE_BIT=y 268CONFIG_HAVE_MLOCKED_PAGE_BIT=y
269CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
259CONFIG_ALIGNMENT_TRAP=y 270CONFIG_ALIGNMENT_TRAP=y
271# CONFIG_UACCESS_WITH_MEMCPY is not set
260 272
261# 273#
262# Boot options 274# Boot options
@@ -361,6 +373,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
361# CONFIG_ECONET is not set 373# CONFIG_ECONET is not set
362# CONFIG_WAN_ROUTER is not set 374# CONFIG_WAN_ROUTER is not set
363# CONFIG_PHONET is not set 375# CONFIG_PHONET is not set
376# CONFIG_IEEE802154 is not set
364# CONFIG_NET_SCHED is not set 377# CONFIG_NET_SCHED is not set
365# CONFIG_DCB is not set 378# CONFIG_DCB is not set
366 379
@@ -474,7 +487,16 @@ CONFIG_MTD_PHYSMAP=y
474# CONFIG_MTD_DOC2000 is not set 487# CONFIG_MTD_DOC2000 is not set
475# CONFIG_MTD_DOC2001 is not set 488# CONFIG_MTD_DOC2001 is not set
476# CONFIG_MTD_DOC2001PLUS is not set 489# CONFIG_MTD_DOC2001PLUS is not set
477# CONFIG_MTD_NAND is not set 490CONFIG_MTD_NAND=y
491# CONFIG_MTD_NAND_VERIFY_WRITE is not set
492# CONFIG_MTD_NAND_ECC_SMC is not set
493# CONFIG_MTD_NAND_MUSEUM_IDS is not set
494# CONFIG_MTD_NAND_GPIO is not set
495CONFIG_MTD_NAND_IDS=y
496# CONFIG_MTD_NAND_DISKONCHIP is not set
497# CONFIG_MTD_NAND_NANDSIM is not set
498# CONFIG_MTD_NAND_PLATFORM is not set
499CONFIG_MTD_NAND_MXC=y
478# CONFIG_MTD_ONENAND is not set 500# CONFIG_MTD_ONENAND is not set
479 501
480# 502#
@@ -485,7 +507,15 @@ CONFIG_MTD_PHYSMAP=y
485# 507#
486# UBI - Unsorted block images 508# UBI - Unsorted block images
487# 509#
488# CONFIG_MTD_UBI is not set 510CONFIG_MTD_UBI=y
511CONFIG_MTD_UBI_WL_THRESHOLD=4096
512CONFIG_MTD_UBI_BEB_RESERVE=1
513# CONFIG_MTD_UBI_GLUEBI is not set
514
515#
516# UBI debugging options
517#
518# CONFIG_MTD_UBI_DEBUG is not set
489# CONFIG_PARPORT is not set 519# CONFIG_PARPORT is not set
490CONFIG_BLK_DEV=y 520CONFIG_BLK_DEV=y
491# CONFIG_BLK_DEV_COW_COMMON is not set 521# CONFIG_BLK_DEV_COW_COMMON is not set
@@ -494,7 +524,21 @@ CONFIG_BLK_DEV=y
494# CONFIG_BLK_DEV_RAM is not set 524# CONFIG_BLK_DEV_RAM is not set
495# CONFIG_CDROM_PKTCDVD is not set 525# CONFIG_CDROM_PKTCDVD is not set
496# CONFIG_ATA_OVER_ETH is not set 526# CONFIG_ATA_OVER_ETH is not set
497# CONFIG_MISC_DEVICES is not set 527# CONFIG_MG_DISK is not set
528CONFIG_MISC_DEVICES=y
529# CONFIG_ICS932S401 is not set
530# CONFIG_ENCLOSURE_SERVICES is not set
531# CONFIG_ISL29003 is not set
532# CONFIG_C2PORT is not set
533
534#
535# EEPROM support
536#
537CONFIG_EEPROM_AT24=y
538# CONFIG_EEPROM_AT25 is not set
539# CONFIG_EEPROM_LEGACY is not set
540# CONFIG_EEPROM_MAX6875 is not set
541# CONFIG_EEPROM_93CX6 is not set
498CONFIG_HAVE_IDE=y 542CONFIG_HAVE_IDE=y
499# CONFIG_IDE is not set 543# CONFIG_IDE is not set
500 544
@@ -508,7 +552,6 @@ CONFIG_HAVE_IDE=y
508# CONFIG_ATA is not set 552# CONFIG_ATA is not set
509# CONFIG_MD is not set 553# CONFIG_MD is not set
510CONFIG_NETDEVICES=y 554CONFIG_NETDEVICES=y
511CONFIG_COMPAT_NET_DEV_OPS=y
512# CONFIG_DUMMY is not set 555# CONFIG_DUMMY is not set
513# CONFIG_BONDING is not set 556# CONFIG_BONDING is not set
514# CONFIG_MACVLAN is not set 557# CONFIG_MACVLAN is not set
@@ -534,6 +577,8 @@ CONFIG_NET_ETHERNET=y
534# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 577# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
535# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 578# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
536# CONFIG_B44 is not set 579# CONFIG_B44 is not set
580# CONFIG_KS8842 is not set
581# CONFIG_KS8851 is not set
537CONFIG_FEC=y 582CONFIG_FEC=y
538# CONFIG_FEC2 is not set 583# CONFIG_FEC2 is not set
539# CONFIG_NETDEV_1000 is not set 584# CONFIG_NETDEV_1000 is not set
@@ -580,6 +625,11 @@ CONFIG_INPUT_EVDEV=y
580# CONFIG_INPUT_TABLET is not set 625# CONFIG_INPUT_TABLET is not set
581CONFIG_INPUT_TOUCHSCREEN=y 626CONFIG_INPUT_TOUCHSCREEN=y
582# CONFIG_TOUCHSCREEN_ADS7846 is not set 627# CONFIG_TOUCHSCREEN_ADS7846 is not set
628# CONFIG_TOUCHSCREEN_AD7877 is not set
629# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
630# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
631# CONFIG_TOUCHSCREEN_AD7879 is not set
632# CONFIG_TOUCHSCREEN_EETI is not set
583# CONFIG_TOUCHSCREEN_FUJITSU is not set 633# CONFIG_TOUCHSCREEN_FUJITSU is not set
584# CONFIG_TOUCHSCREEN_GUNZE is not set 634# CONFIG_TOUCHSCREEN_GUNZE is not set
585# CONFIG_TOUCHSCREEN_ELO is not set 635# CONFIG_TOUCHSCREEN_ELO is not set
@@ -592,6 +642,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
592# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 642# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
593# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 643# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
594# CONFIG_TOUCHSCREEN_TSC2007 is not set 644# CONFIG_TOUCHSCREEN_TSC2007 is not set
645# CONFIG_TOUCHSCREEN_W90X900 is not set
595# CONFIG_INPUT_MISC is not set 646# CONFIG_INPUT_MISC is not set
596 647
597# 648#
@@ -644,6 +695,7 @@ CONFIG_I2C_HELPER_AUTO=y
644# 695#
645# I2C system bus drivers (mostly embedded / system-on-chip) 696# I2C system bus drivers (mostly embedded / system-on-chip)
646# 697#
698# CONFIG_I2C_DESIGNWARE is not set
647# CONFIG_I2C_GPIO is not set 699# CONFIG_I2C_GPIO is not set
648CONFIG_I2C_IMX=y 700CONFIG_I2C_IMX=y
649# CONFIG_I2C_OCORES is not set 701# CONFIG_I2C_OCORES is not set
@@ -668,7 +720,6 @@ CONFIG_I2C_IMX=y
668# CONFIG_SENSORS_PCF8574 is not set 720# CONFIG_SENSORS_PCF8574 is not set
669# CONFIG_PCF8575 is not set 721# CONFIG_PCF8575 is not set
670# CONFIG_SENSORS_PCA9539 is not set 722# CONFIG_SENSORS_PCA9539 is not set
671# CONFIG_SENSORS_MAX6875 is not set
672# CONFIG_SENSORS_TSL2550 is not set 723# CONFIG_SENSORS_TSL2550 is not set
673# CONFIG_I2C_DEBUG_CORE is not set 724# CONFIG_I2C_DEBUG_CORE is not set
674# CONFIG_I2C_DEBUG_ALGO is not set 725# CONFIG_I2C_DEBUG_ALGO is not set
@@ -719,6 +770,7 @@ CONFIG_W1=y
719# 770#
720# CONFIG_W1_MASTER_DS2482 is not set 771# CONFIG_W1_MASTER_DS2482 is not set
721CONFIG_W1_MASTER_MXC=y 772CONFIG_W1_MASTER_MXC=y
773# CONFIG_W1_MASTER_DS1WM is not set
722# CONFIG_W1_MASTER_GPIO is not set 774# CONFIG_W1_MASTER_GPIO is not set
723 775
724# 776#
@@ -753,54 +805,16 @@ CONFIG_SSB_POSSIBLE=y
753# CONFIG_TPS65010 is not set 805# CONFIG_TPS65010 is not set
754# CONFIG_TWL4030_CORE is not set 806# CONFIG_TWL4030_CORE is not set
755# CONFIG_MFD_TMIO is not set 807# CONFIG_MFD_TMIO is not set
808# CONFIG_MFD_T7L66XB is not set
809# CONFIG_MFD_TC6387XB is not set
756# CONFIG_MFD_TC6393XB is not set 810# CONFIG_MFD_TC6393XB is not set
757# CONFIG_PMIC_DA903X is not set 811# CONFIG_PMIC_DA903X is not set
758# CONFIG_MFD_WM8400 is not set 812# CONFIG_MFD_WM8400 is not set
759# CONFIG_MFD_WM8350_I2C is not set 813# CONFIG_MFD_WM8350_I2C is not set
760# CONFIG_MFD_PCF50633 is not set 814# CONFIG_MFD_PCF50633 is not set
761 815# CONFIG_AB3100_CORE is not set
762# 816# CONFIG_EZX_PCAP is not set
763# Multimedia devices 817# CONFIG_MEDIA_SUPPORT is not set
764#
765
766#
767# Multimedia core support
768#
769CONFIG_VIDEO_DEV=y
770CONFIG_VIDEO_V4L2_COMMON=y
771CONFIG_VIDEO_ALLOW_V4L1=y
772CONFIG_VIDEO_V4L1_COMPAT=y
773# CONFIG_DVB_CORE is not set
774CONFIG_VIDEO_MEDIA=y
775
776#
777# Multimedia drivers
778#
779# CONFIG_MEDIA_ATTACH is not set
780CONFIG_MEDIA_TUNER=y
781# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
782CONFIG_MEDIA_TUNER_SIMPLE=y
783CONFIG_MEDIA_TUNER_TDA8290=y
784CONFIG_MEDIA_TUNER_TDA9887=y
785CONFIG_MEDIA_TUNER_TEA5761=y
786CONFIG_MEDIA_TUNER_TEA5767=y
787CONFIG_MEDIA_TUNER_MT20XX=y
788CONFIG_MEDIA_TUNER_XC2028=y
789CONFIG_MEDIA_TUNER_XC5000=y
790CONFIG_MEDIA_TUNER_MC44S803=y
791CONFIG_VIDEO_V4L2=y
792CONFIG_VIDEO_V4L1=y
793CONFIG_VIDEO_CAPTURE_DRIVERS=y
794# CONFIG_VIDEO_ADV_DEBUG is not set
795# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
796CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
797# CONFIG_VIDEO_VIVI is not set
798# CONFIG_VIDEO_CPIA is not set
799# CONFIG_VIDEO_SAA5246A is not set
800# CONFIG_VIDEO_SAA5249 is not set
801# CONFIG_SOC_CAMERA is not set
802# CONFIG_RADIO_ADAPTERS is not set
803# CONFIG_DAB is not set
804 818
805# 819#
806# Graphics support 820# Graphics support
@@ -917,6 +931,7 @@ CONFIG_RTC_DRV_PCF8563=y
917# CONFIG_RTC_DRV_S35390A is not set 931# CONFIG_RTC_DRV_S35390A is not set
918# CONFIG_RTC_DRV_FM3130 is not set 932# CONFIG_RTC_DRV_FM3130 is not set
919# CONFIG_RTC_DRV_RX8581 is not set 933# CONFIG_RTC_DRV_RX8581 is not set
934# CONFIG_RTC_DRV_RX8025 is not set
920 935
921# 936#
922# SPI RTC drivers 937# SPI RTC drivers
@@ -962,12 +977,15 @@ CONFIG_RTC_DRV_PCF8563=y
962# CONFIG_REISERFS_FS is not set 977# CONFIG_REISERFS_FS is not set
963# CONFIG_JFS_FS is not set 978# CONFIG_JFS_FS is not set
964# CONFIG_FS_POSIX_ACL is not set 979# CONFIG_FS_POSIX_ACL is not set
965CONFIG_FILE_LOCKING=y
966# CONFIG_XFS_FS is not set 980# CONFIG_XFS_FS is not set
981# CONFIG_GFS2_FS is not set
967# CONFIG_OCFS2_FS is not set 982# CONFIG_OCFS2_FS is not set
968# CONFIG_BTRFS_FS is not set 983# CONFIG_BTRFS_FS is not set
984CONFIG_FILE_LOCKING=y
985CONFIG_FSNOTIFY=y
969# CONFIG_DNOTIFY is not set 986# CONFIG_DNOTIFY is not set
970# CONFIG_INOTIFY is not set 987# CONFIG_INOTIFY is not set
988CONFIG_INOTIFY_USER=y
971# CONFIG_QUOTA is not set 989# CONFIG_QUOTA is not set
972# CONFIG_AUTOFS_FS is not set 990# CONFIG_AUTOFS_FS is not set
973# CONFIG_AUTOFS4_FS is not set 991# CONFIG_AUTOFS4_FS is not set
@@ -1021,6 +1039,12 @@ CONFIG_JFFS2_ZLIB=y
1021# CONFIG_JFFS2_LZO is not set 1039# CONFIG_JFFS2_LZO is not set
1022CONFIG_JFFS2_RTIME=y 1040CONFIG_JFFS2_RTIME=y
1023# CONFIG_JFFS2_RUBIN is not set 1041# CONFIG_JFFS2_RUBIN is not set
1042CONFIG_UBIFS_FS=y
1043# CONFIG_UBIFS_FS_XATTR is not set
1044# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
1045CONFIG_UBIFS_FS_LZO=y
1046CONFIG_UBIFS_FS_ZLIB=y
1047# CONFIG_UBIFS_FS_DEBUG is not set
1024# CONFIG_CRAMFS is not set 1048# CONFIG_CRAMFS is not set
1025# CONFIG_SQUASHFS is not set 1049# CONFIG_SQUASHFS is not set
1026# CONFIG_VXFS_FS is not set 1050# CONFIG_VXFS_FS is not set
@@ -1119,25 +1143,11 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
1119CONFIG_NOP_TRACER=y 1143CONFIG_NOP_TRACER=y
1120CONFIG_HAVE_FUNCTION_TRACER=y 1144CONFIG_HAVE_FUNCTION_TRACER=y
1121CONFIG_RING_BUFFER=y 1145CONFIG_RING_BUFFER=y
1146CONFIG_EVENT_TRACING=y
1147CONFIG_CONTEXT_SWITCH_TRACER=y
1122CONFIG_TRACING=y 1148CONFIG_TRACING=y
1123CONFIG_TRACING_SUPPORT=y 1149CONFIG_TRACING_SUPPORT=y
1124 1150# CONFIG_FTRACE is not set
1125#
1126# Tracers
1127#
1128# CONFIG_FUNCTION_TRACER is not set
1129# CONFIG_IRQSOFF_TRACER is not set
1130# CONFIG_PREEMPT_TRACER is not set
1131# CONFIG_SCHED_TRACER is not set
1132# CONFIG_CONTEXT_SWITCH_TRACER is not set
1133# CONFIG_EVENT_TRACER is not set
1134# CONFIG_BOOT_TRACER is not set
1135# CONFIG_TRACE_BRANCH_PROFILING is not set
1136# CONFIG_STACK_TRACER is not set
1137# CONFIG_KMEMTRACE is not set
1138# CONFIG_WORKQUEUE_TRACER is not set
1139# CONFIG_BLK_DEV_IO_TRACE is not set
1140# CONFIG_FTRACE_STARTUP_TEST is not set
1141# CONFIG_DYNAMIC_DEBUG is not set 1151# CONFIG_DYNAMIC_DEBUG is not set
1142# CONFIG_SAMPLES is not set 1152# CONFIG_SAMPLES is not set
1143CONFIG_HAVE_ARCH_KGDB=y 1153CONFIG_HAVE_ARCH_KGDB=y
@@ -1151,16 +1161,104 @@ CONFIG_ARM_UNWIND=y
1151# CONFIG_SECURITY is not set 1161# CONFIG_SECURITY is not set
1152# CONFIG_SECURITYFS is not set 1162# CONFIG_SECURITYFS is not set
1153# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1163# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1154# CONFIG_CRYPTO is not set 1164CONFIG_CRYPTO=y
1165
1166#
1167# Crypto core or helper
1168#
1169# CONFIG_CRYPTO_FIPS is not set
1170CONFIG_CRYPTO_ALGAPI=y
1171CONFIG_CRYPTO_ALGAPI2=y
1172# CONFIG_CRYPTO_MANAGER is not set
1173# CONFIG_CRYPTO_MANAGER2 is not set
1174# CONFIG_CRYPTO_GF128MUL is not set
1175# CONFIG_CRYPTO_NULL is not set
1176# CONFIG_CRYPTO_CRYPTD is not set
1177# CONFIG_CRYPTO_AUTHENC is not set
1178# CONFIG_CRYPTO_TEST is not set
1179
1180#
1181# Authenticated Encryption with Associated Data
1182#
1183# CONFIG_CRYPTO_CCM is not set
1184# CONFIG_CRYPTO_GCM is not set
1185# CONFIG_CRYPTO_SEQIV is not set
1186
1187#
1188# Block modes
1189#
1190# CONFIG_CRYPTO_CBC is not set
1191# CONFIG_CRYPTO_CTR is not set
1192# CONFIG_CRYPTO_CTS is not set
1193# CONFIG_CRYPTO_ECB is not set
1194# CONFIG_CRYPTO_LRW is not set
1195# CONFIG_CRYPTO_PCBC is not set
1196# CONFIG_CRYPTO_XTS is not set
1197
1198#
1199# Hash modes
1200#
1201# CONFIG_CRYPTO_HMAC is not set
1202# CONFIG_CRYPTO_XCBC is not set
1203
1204#
1205# Digest
1206#
1207# CONFIG_CRYPTO_CRC32C is not set
1208# CONFIG_CRYPTO_MD4 is not set
1209# CONFIG_CRYPTO_MD5 is not set
1210# CONFIG_CRYPTO_MICHAEL_MIC is not set
1211# CONFIG_CRYPTO_RMD128 is not set
1212# CONFIG_CRYPTO_RMD160 is not set
1213# CONFIG_CRYPTO_RMD256 is not set
1214# CONFIG_CRYPTO_RMD320 is not set
1215# CONFIG_CRYPTO_SHA1 is not set
1216# CONFIG_CRYPTO_SHA256 is not set
1217# CONFIG_CRYPTO_SHA512 is not set
1218# CONFIG_CRYPTO_TGR192 is not set
1219# CONFIG_CRYPTO_WP512 is not set
1220
1221#
1222# Ciphers
1223#
1224# CONFIG_CRYPTO_AES is not set
1225# CONFIG_CRYPTO_ANUBIS is not set
1226# CONFIG_CRYPTO_ARC4 is not set
1227# CONFIG_CRYPTO_BLOWFISH is not set
1228# CONFIG_CRYPTO_CAMELLIA is not set
1229# CONFIG_CRYPTO_CAST5 is not set
1230# CONFIG_CRYPTO_CAST6 is not set
1231# CONFIG_CRYPTO_DES is not set
1232# CONFIG_CRYPTO_FCRYPT is not set
1233# CONFIG_CRYPTO_KHAZAD is not set
1234# CONFIG_CRYPTO_SALSA20 is not set
1235# CONFIG_CRYPTO_SEED is not set
1236# CONFIG_CRYPTO_SERPENT is not set
1237# CONFIG_CRYPTO_TEA is not set
1238# CONFIG_CRYPTO_TWOFISH is not set
1239
1240#
1241# Compression
1242#
1243CONFIG_CRYPTO_DEFLATE=y
1244# CONFIG_CRYPTO_ZLIB is not set
1245CONFIG_CRYPTO_LZO=y
1246
1247#
1248# Random Number Generation
1249#
1250# CONFIG_CRYPTO_ANSI_CPRNG is not set
1251CONFIG_CRYPTO_HW=y
1155CONFIG_BINARY_PRINTF=y 1252CONFIG_BINARY_PRINTF=y
1156 1253
1157# 1254#
1158# Library routines 1255# Library routines
1159# 1256#
1160CONFIG_BITREVERSE=y 1257CONFIG_BITREVERSE=y
1258CONFIG_RATIONAL=y
1161CONFIG_GENERIC_FIND_LAST_BIT=y 1259CONFIG_GENERIC_FIND_LAST_BIT=y
1162# CONFIG_CRC_CCITT is not set 1260# CONFIG_CRC_CCITT is not set
1163# CONFIG_CRC16 is not set 1261CONFIG_CRC16=y
1164# CONFIG_CRC_T10DIF is not set 1262# CONFIG_CRC_T10DIF is not set
1165# CONFIG_CRC_ITU_T is not set 1263# CONFIG_CRC_ITU_T is not set
1166CONFIG_CRC32=y 1264CONFIG_CRC32=y
@@ -1168,6 +1266,8 @@ CONFIG_CRC32=y
1168# CONFIG_LIBCRC32C is not set 1266# CONFIG_LIBCRC32C is not set
1169CONFIG_ZLIB_INFLATE=y 1267CONFIG_ZLIB_INFLATE=y
1170CONFIG_ZLIB_DEFLATE=y 1268CONFIG_ZLIB_DEFLATE=y
1269CONFIG_LZO_COMPRESS=y
1270CONFIG_LZO_DECOMPRESS=y
1171CONFIG_HAS_IOMEM=y 1271CONFIG_HAS_IOMEM=y
1172CONFIG_HAS_IOPORT=y 1272CONFIG_HAS_IOPORT=y
1173CONFIG_HAS_DMA=y 1273CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/mx3_defconfig b/arch/arm/configs/mx3_defconfig
index 20ada526f6de..a4f9a2a8149c 100644
--- a/arch/arm/configs/mx3_defconfig
+++ b/arch/arm/configs/mx3_defconfig
@@ -1,15 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc1 3# Linux kernel version: 2.6.31-rc4
4# Wed Apr 8 11:06:37 2009 4# Tue Jul 28 14:11:34 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_HAVE_PWM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 8CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 9CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 10CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 11CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y 12CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y 14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_SUPPORT=y 15CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,14 +18,13 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_HARDIRQS_SW_RESEND=y 18CONFIG_HARDIRQS_SW_RESEND=y
19CONFIG_GENERIC_IRQ_PROBE=y 19CONFIG_GENERIC_IRQ_PROBE=y
20CONFIG_RWSEM_GENERIC_SPINLOCK=y 20CONFIG_RWSEM_GENERIC_SPINLOCK=y
21# CONFIG_ARCH_HAS_ILOG2_U32 is not set
22# CONFIG_ARCH_HAS_ILOG2_U64 is not set
23CONFIG_GENERIC_HWEIGHT=y 21CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y 22CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ARCH_MTD_XIP=y 23CONFIG_ARCH_MTD_XIP=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 24CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000 25CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27CONFIG_CONSTRUCTORS=y
29 28
30# 29#
31# General setup 30# General setup
@@ -86,7 +85,12 @@ CONFIG_TIMERFD=y
86CONFIG_EVENTFD=y 85CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 86CONFIG_SHMEM=y
88CONFIG_AIO=y 87CONFIG_AIO=y
88
89#
90# Performance Counters
91#
89CONFIG_VM_EVENT_COUNTERS=y 92CONFIG_VM_EVENT_COUNTERS=y
93# CONFIG_STRIP_ASM_SYMS is not set
90CONFIG_COMPAT_BRK=y 94CONFIG_COMPAT_BRK=y
91CONFIG_SLAB=y 95CONFIG_SLAB=y
92# CONFIG_SLUB is not set 96# CONFIG_SLUB is not set
@@ -97,6 +101,11 @@ CONFIG_HAVE_OPROFILE=y
97# CONFIG_KPROBES is not set 101# CONFIG_KPROBES is not set
98CONFIG_HAVE_KPROBES=y 102CONFIG_HAVE_KPROBES=y
99CONFIG_HAVE_KRETPROBES=y 103CONFIG_HAVE_KRETPROBES=y
104CONFIG_HAVE_CLK=y
105
106#
107# GCOV-based kernel profiling
108#
100# CONFIG_SLOW_WORK is not set 109# CONFIG_SLOW_WORK is not set
101CONFIG_HAVE_GENERIC_DMA_COHERENT=y 110CONFIG_HAVE_GENERIC_DMA_COHERENT=y
102CONFIG_SLABINFO=y 111CONFIG_SLABINFO=y
@@ -109,7 +118,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
109CONFIG_MODVERSIONS=y 118CONFIG_MODVERSIONS=y
110# CONFIG_MODULE_SRCVERSION_ALL is not set 119# CONFIG_MODULE_SRCVERSION_ALL is not set
111CONFIG_BLOCK=y 120CONFIG_BLOCK=y
112# CONFIG_LBD is not set 121CONFIG_LBDAF=y
113# CONFIG_BLK_DEV_BSG is not set 122# CONFIG_BLK_DEV_BSG is not set
114# CONFIG_BLK_DEV_INTEGRITY is not set 123# CONFIG_BLK_DEV_INTEGRITY is not set
115 124
@@ -136,13 +145,14 @@ CONFIG_FREEZER=y
136# CONFIG_ARCH_VERSATILE is not set 145# CONFIG_ARCH_VERSATILE is not set
137# CONFIG_ARCH_AT91 is not set 146# CONFIG_ARCH_AT91 is not set
138# CONFIG_ARCH_CLPS711X is not set 147# CONFIG_ARCH_CLPS711X is not set
148# CONFIG_ARCH_GEMINI is not set
139# CONFIG_ARCH_EBSA110 is not set 149# CONFIG_ARCH_EBSA110 is not set
140# CONFIG_ARCH_EP93XX is not set 150# CONFIG_ARCH_EP93XX is not set
141# CONFIG_ARCH_GEMINI is not set
142# CONFIG_ARCH_FOOTBRIDGE is not set 151# CONFIG_ARCH_FOOTBRIDGE is not set
152CONFIG_ARCH_MXC=y
153# CONFIG_ARCH_STMP3XXX is not set
143# CONFIG_ARCH_NETX is not set 154# CONFIG_ARCH_NETX is not set
144# CONFIG_ARCH_H720X is not set 155# CONFIG_ARCH_H720X is not set
145# CONFIG_ARCH_IMX is not set
146# CONFIG_ARCH_IOP13XX is not set 156# CONFIG_ARCH_IOP13XX is not set
147# CONFIG_ARCH_IOP32X is not set 157# CONFIG_ARCH_IOP32X is not set
148# CONFIG_ARCH_IOP33X is not set 158# CONFIG_ARCH_IOP33X is not set
@@ -151,25 +161,25 @@ CONFIG_FREEZER=y
151# CONFIG_ARCH_IXP4XX is not set 161# CONFIG_ARCH_IXP4XX is not set
152# CONFIG_ARCH_L7200 is not set 162# CONFIG_ARCH_L7200 is not set
153# CONFIG_ARCH_KIRKWOOD is not set 163# CONFIG_ARCH_KIRKWOOD is not set
154# CONFIG_ARCH_KS8695 is not set
155# CONFIG_ARCH_NS9XXX is not set
156# CONFIG_ARCH_LOKI is not set 164# CONFIG_ARCH_LOKI is not set
157# CONFIG_ARCH_MV78XX0 is not set 165# CONFIG_ARCH_MV78XX0 is not set
158CONFIG_ARCH_MXC=y
159# CONFIG_ARCH_ORION5X is not set 166# CONFIG_ARCH_ORION5X is not set
167# CONFIG_ARCH_MMP is not set
168# CONFIG_ARCH_KS8695 is not set
169# CONFIG_ARCH_NS9XXX is not set
170# CONFIG_ARCH_W90X900 is not set
160# CONFIG_ARCH_PNX4008 is not set 171# CONFIG_ARCH_PNX4008 is not set
161# CONFIG_ARCH_PXA is not set 172# CONFIG_ARCH_PXA is not set
162# CONFIG_ARCH_MMP is not set 173# CONFIG_ARCH_MSM is not set
163# CONFIG_ARCH_RPC is not set 174# CONFIG_ARCH_RPC is not set
164# CONFIG_ARCH_SA1100 is not set 175# CONFIG_ARCH_SA1100 is not set
165# CONFIG_ARCH_S3C2410 is not set 176# CONFIG_ARCH_S3C2410 is not set
166# CONFIG_ARCH_S3C64XX is not set 177# CONFIG_ARCH_S3C64XX is not set
167# CONFIG_ARCH_SHARK is not set 178# CONFIG_ARCH_SHARK is not set
168# CONFIG_ARCH_LH7A40X is not set 179# CONFIG_ARCH_LH7A40X is not set
180# CONFIG_ARCH_U300 is not set
169# CONFIG_ARCH_DAVINCI is not set 181# CONFIG_ARCH_DAVINCI is not set
170# CONFIG_ARCH_OMAP is not set 182# CONFIG_ARCH_OMAP is not set
171# CONFIG_ARCH_MSM is not set
172# CONFIG_ARCH_W90X900 is not set
173 183
174# 184#
175# Freescale MXC Implementations 185# Freescale MXC Implementations
@@ -178,6 +188,7 @@ CONFIG_ARCH_MXC=y
178# CONFIG_ARCH_MX2 is not set 188# CONFIG_ARCH_MX2 is not set
179CONFIG_ARCH_MX3=y 189CONFIG_ARCH_MX3=y
180CONFIG_ARCH_MX31=y 190CONFIG_ARCH_MX31=y
191CONFIG_ARCH_MX35=y
181 192
182# 193#
183# MX3 platforms: 194# MX3 platforms:
@@ -185,12 +196,19 @@ CONFIG_ARCH_MX31=y
185CONFIG_MACH_MX31ADS=y 196CONFIG_MACH_MX31ADS=y
186CONFIG_MACH_MX31ADS_WM1133_EV1=y 197CONFIG_MACH_MX31ADS_WM1133_EV1=y
187CONFIG_MACH_PCM037=y 198CONFIG_MACH_PCM037=y
199CONFIG_MACH_PCM037_EET=y
188CONFIG_MACH_MX31LITE=y 200CONFIG_MACH_MX31LITE=y
189CONFIG_MACH_MX31_3DS=y 201CONFIG_MACH_MX31_3DS=y
190CONFIG_MACH_MX31MOBOARD=y 202CONFIG_MACH_MX31MOBOARD=y
203CONFIG_MACH_MX31LILLY=y
191CONFIG_MACH_QONG=y 204CONFIG_MACH_QONG=y
205CONFIG_MACH_PCM043=y
206CONFIG_MACH_ARMADILLO5X0=y
207CONFIG_MACH_MX35_3DS=y
192CONFIG_MXC_IRQ_PRIOR=y 208CONFIG_MXC_IRQ_PRIOR=y
193CONFIG_MXC_PWM=y 209CONFIG_MXC_PWM=y
210CONFIG_ARCH_HAS_RNGA=y
211CONFIG_ARCH_MXC_IOMUX_V3=y
194 212
195# 213#
196# Processor Type 214# Processor Type
@@ -218,6 +236,7 @@ CONFIG_ARM_THUMB=y
218# CONFIG_CPU_BPREDICT_DISABLE is not set 236# CONFIG_CPU_BPREDICT_DISABLE is not set
219CONFIG_OUTER_CACHE=y 237CONFIG_OUTER_CACHE=y
220CONFIG_CACHE_L2X0=y 238CONFIG_CACHE_L2X0=y
239# CONFIG_ARM_ERRATA_411920 is not set
221CONFIG_COMMON_CLKDEV=y 240CONFIG_COMMON_CLKDEV=y
222 241
223# 242#
@@ -242,7 +261,6 @@ CONFIG_PREEMPT=y
242CONFIG_HZ=100 261CONFIG_HZ=100
243CONFIG_AEABI=y 262CONFIG_AEABI=y
244CONFIG_OABI_COMPAT=y 263CONFIG_OABI_COMPAT=y
245CONFIG_ARCH_FLATMEM_HAS_HOLES=y
246# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 264# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
247# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 265# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
248# CONFIG_HIGHMEM is not set 266# CONFIG_HIGHMEM is not set
@@ -257,10 +275,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
257# CONFIG_PHYS_ADDR_T_64BIT is not set 275# CONFIG_PHYS_ADDR_T_64BIT is not set
258CONFIG_ZONE_DMA_FLAG=0 276CONFIG_ZONE_DMA_FLAG=0
259CONFIG_VIRT_TO_BUS=y 277CONFIG_VIRT_TO_BUS=y
260CONFIG_UNEVICTABLE_LRU=y
261CONFIG_HAVE_MLOCK=y 278CONFIG_HAVE_MLOCK=y
262CONFIG_HAVE_MLOCKED_PAGE_BIT=y 279CONFIG_HAVE_MLOCKED_PAGE_BIT=y
280CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
263CONFIG_ALIGNMENT_TRAP=y 281CONFIG_ALIGNMENT_TRAP=y
282# CONFIG_UACCESS_WITH_MEMCPY is not set
264 283
265# 284#
266# Boot options 285# Boot options
@@ -362,6 +381,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
362# CONFIG_ECONET is not set 381# CONFIG_ECONET is not set
363# CONFIG_WAN_ROUTER is not set 382# CONFIG_WAN_ROUTER is not set
364# CONFIG_PHONET is not set 383# CONFIG_PHONET is not set
384# CONFIG_IEEE802154 is not set
365# CONFIG_NET_SCHED is not set 385# CONFIG_NET_SCHED is not set
366# CONFIG_DCB is not set 386# CONFIG_DCB is not set
367 387
@@ -465,7 +485,16 @@ CONFIG_MTD_PHYSMAP=y
465# CONFIG_MTD_DOC2000 is not set 485# CONFIG_MTD_DOC2000 is not set
466# CONFIG_MTD_DOC2001 is not set 486# CONFIG_MTD_DOC2001 is not set
467# CONFIG_MTD_DOC2001PLUS is not set 487# CONFIG_MTD_DOC2001PLUS is not set
468# CONFIG_MTD_NAND is not set 488CONFIG_MTD_NAND=y
489# CONFIG_MTD_NAND_VERIFY_WRITE is not set
490# CONFIG_MTD_NAND_ECC_SMC is not set
491# CONFIG_MTD_NAND_MUSEUM_IDS is not set
492# CONFIG_MTD_NAND_GPIO is not set
493CONFIG_MTD_NAND_IDS=y
494# CONFIG_MTD_NAND_DISKONCHIP is not set
495# CONFIG_MTD_NAND_NANDSIM is not set
496# CONFIG_MTD_NAND_PLATFORM is not set
497CONFIG_MTD_NAND_MXC=y
469# CONFIG_MTD_ONENAND is not set 498# CONFIG_MTD_ONENAND is not set
470 499
471# 500#
@@ -476,10 +505,30 @@ CONFIG_MTD_PHYSMAP=y
476# 505#
477# UBI - Unsorted block images 506# UBI - Unsorted block images
478# 507#
479# CONFIG_MTD_UBI is not set 508CONFIG_MTD_UBI=y
509CONFIG_MTD_UBI_WL_THRESHOLD=4096
510CONFIG_MTD_UBI_BEB_RESERVE=1
511# CONFIG_MTD_UBI_GLUEBI is not set
512
513#
514# UBI debugging options
515#
516# CONFIG_MTD_UBI_DEBUG is not set
480# CONFIG_PARPORT is not set 517# CONFIG_PARPORT is not set
481# CONFIG_BLK_DEV is not set 518# CONFIG_BLK_DEV is not set
482# CONFIG_MISC_DEVICES is not set 519CONFIG_MISC_DEVICES=y
520# CONFIG_ICS932S401 is not set
521# CONFIG_ENCLOSURE_SERVICES is not set
522# CONFIG_ISL29003 is not set
523# CONFIG_C2PORT is not set
524
525#
526# EEPROM support
527#
528CONFIG_EEPROM_AT24=y
529# CONFIG_EEPROM_LEGACY is not set
530# CONFIG_EEPROM_MAX6875 is not set
531# CONFIG_EEPROM_93CX6 is not set
483CONFIG_HAVE_IDE=y 532CONFIG_HAVE_IDE=y
484# CONFIG_IDE is not set 533# CONFIG_IDE is not set
485 534
@@ -493,7 +542,6 @@ CONFIG_HAVE_IDE=y
493# CONFIG_ATA is not set 542# CONFIG_ATA is not set
494# CONFIG_MD is not set 543# CONFIG_MD is not set
495CONFIG_NETDEVICES=y 544CONFIG_NETDEVICES=y
496CONFIG_COMPAT_NET_DEV_OPS=y
497# CONFIG_DUMMY is not set 545# CONFIG_DUMMY is not set
498# CONFIG_BONDING is not set 546# CONFIG_BONDING is not set
499# CONFIG_MACVLAN is not set 547# CONFIG_MACVLAN is not set
@@ -528,7 +576,7 @@ CONFIG_MII=y
528# CONFIG_ETHOC is not set 576# CONFIG_ETHOC is not set
529# CONFIG_SMC911X is not set 577# CONFIG_SMC911X is not set
530CONFIG_SMSC911X=y 578CONFIG_SMSC911X=y
531# CONFIG_DNET is not set 579CONFIG_DNET=y
532# CONFIG_IBM_NEW_EMAC_ZMII is not set 580# CONFIG_IBM_NEW_EMAC_ZMII is not set
533# CONFIG_IBM_NEW_EMAC_RGMII is not set 581# CONFIG_IBM_NEW_EMAC_RGMII is not set
534# CONFIG_IBM_NEW_EMAC_TAH is not set 582# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -537,8 +585,10 @@ CONFIG_SMSC911X=y
537# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 585# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
538# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 586# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
539# CONFIG_B44 is not set 587# CONFIG_B44 is not set
540CONFIG_CS89x0=y 588# CONFIG_CS89x0 is not set
541CONFIG_CS89x0_NONISA_IRQ=y 589# CONFIG_KS8842 is not set
590CONFIG_FEC=y
591# CONFIG_FEC2 is not set
542# CONFIG_NETDEV_1000 is not set 592# CONFIG_NETDEV_1000 is not set
543# CONFIG_NETDEV_10000 is not set 593# CONFIG_NETDEV_10000 is not set
544 594
@@ -609,6 +659,7 @@ CONFIG_I2C_HELPER_AUTO=y
609# 659#
610# I2C system bus drivers (mostly embedded / system-on-chip) 660# I2C system bus drivers (mostly embedded / system-on-chip)
611# 661#
662# CONFIG_I2C_DESIGNWARE is not set
612# CONFIG_I2C_GPIO is not set 663# CONFIG_I2C_GPIO is not set
613CONFIG_I2C_IMX=y 664CONFIG_I2C_IMX=y
614# CONFIG_I2C_OCORES is not set 665# CONFIG_I2C_OCORES is not set
@@ -633,7 +684,6 @@ CONFIG_I2C_IMX=y
633# CONFIG_SENSORS_PCF8574 is not set 684# CONFIG_SENSORS_PCF8574 is not set
634# CONFIG_PCF8575 is not set 685# CONFIG_PCF8575 is not set
635# CONFIG_SENSORS_PCA9539 is not set 686# CONFIG_SENSORS_PCA9539 is not set
636# CONFIG_SENSORS_MAX6875 is not set
637# CONFIG_SENSORS_TSL2550 is not set 687# CONFIG_SENSORS_TSL2550 is not set
638# CONFIG_I2C_DEBUG_CORE is not set 688# CONFIG_I2C_DEBUG_CORE is not set
639# CONFIG_I2C_DEBUG_ALGO is not set 689# CONFIG_I2C_DEBUG_ALGO is not set
@@ -669,6 +719,7 @@ CONFIG_W1=y
669# 719#
670# CONFIG_W1_MASTER_DS2482 is not set 720# CONFIG_W1_MASTER_DS2482 is not set
671CONFIG_W1_MASTER_MXC=y 721CONFIG_W1_MASTER_MXC=y
722# CONFIG_W1_MASTER_DS1WM is not set
672# CONFIG_W1_MASTER_GPIO is not set 723# CONFIG_W1_MASTER_GPIO is not set
673 724
674# 725#
@@ -703,6 +754,8 @@ CONFIG_SSB_POSSIBLE=y
703# CONFIG_TPS65010 is not set 754# CONFIG_TPS65010 is not set
704# CONFIG_TWL4030_CORE is not set 755# CONFIG_TWL4030_CORE is not set
705# CONFIG_MFD_TMIO is not set 756# CONFIG_MFD_TMIO is not set
757# CONFIG_MFD_T7L66XB is not set
758# CONFIG_MFD_TC6387XB is not set
706# CONFIG_MFD_TC6393XB is not set 759# CONFIG_MFD_TC6393XB is not set
707# CONFIG_PMIC_DA903X is not set 760# CONFIG_PMIC_DA903X is not set
708# CONFIG_MFD_WM8400 is not set 761# CONFIG_MFD_WM8400 is not set
@@ -711,10 +764,8 @@ CONFIG_MFD_WM8350_CONFIG_MODE_0=y
711CONFIG_MFD_WM8352_CONFIG_MODE_0=y 764CONFIG_MFD_WM8352_CONFIG_MODE_0=y
712CONFIG_MFD_WM8350_I2C=y 765CONFIG_MFD_WM8350_I2C=y
713# CONFIG_MFD_PCF50633 is not set 766# CONFIG_MFD_PCF50633 is not set
714 767# CONFIG_AB3100_CORE is not set
715# 768CONFIG_MEDIA_SUPPORT=y
716# Multimedia devices
717#
718 769
719# 770#
720# Multimedia core support 771# Multimedia core support
@@ -758,8 +809,10 @@ CONFIG_SOC_CAMERA_MT9T031=y
758CONFIG_SOC_CAMERA_MT9V022=y 809CONFIG_SOC_CAMERA_MT9V022=y
759CONFIG_SOC_CAMERA_TW9910=y 810CONFIG_SOC_CAMERA_TW9910=y
760# CONFIG_SOC_CAMERA_PLATFORM is not set 811# CONFIG_SOC_CAMERA_PLATFORM is not set
761# CONFIG_SOC_CAMERA_OV772X is not set 812CONFIG_SOC_CAMERA_OV772X=y
813CONFIG_MX3_VIDEO=y
762CONFIG_VIDEO_MX3=y 814CONFIG_VIDEO_MX3=y
815# CONFIG_VIDEO_SH_MOBILE_CEU is not set
763# CONFIG_RADIO_ADAPTERS is not set 816# CONFIG_RADIO_ADAPTERS is not set
764# CONFIG_DAB is not set 817# CONFIG_DAB is not set
765 818
@@ -847,8 +900,11 @@ CONFIG_REGULATOR=y
847# CONFIG_REGULATOR_DEBUG is not set 900# CONFIG_REGULATOR_DEBUG is not set
848# CONFIG_REGULATOR_FIXED_VOLTAGE is not set 901# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
849# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set 902# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
903# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
850# CONFIG_REGULATOR_BQ24022 is not set 904# CONFIG_REGULATOR_BQ24022 is not set
905# CONFIG_REGULATOR_MAX1586 is not set
851CONFIG_REGULATOR_WM8350=y 906CONFIG_REGULATOR_WM8350=y
907# CONFIG_REGULATOR_LP3971 is not set
852# CONFIG_UIO is not set 908# CONFIG_UIO is not set
853# CONFIG_STAGING is not set 909# CONFIG_STAGING is not set
854 910
@@ -861,10 +917,12 @@ CONFIG_REGULATOR_WM8350=y
861# CONFIG_REISERFS_FS is not set 917# CONFIG_REISERFS_FS is not set
862# CONFIG_JFS_FS is not set 918# CONFIG_JFS_FS is not set
863# CONFIG_FS_POSIX_ACL is not set 919# CONFIG_FS_POSIX_ACL is not set
864CONFIG_FILE_LOCKING=y
865# CONFIG_XFS_FS is not set 920# CONFIG_XFS_FS is not set
921# CONFIG_GFS2_FS is not set
866# CONFIG_OCFS2_FS is not set 922# CONFIG_OCFS2_FS is not set
867# CONFIG_BTRFS_FS is not set 923# CONFIG_BTRFS_FS is not set
924CONFIG_FILE_LOCKING=y
925CONFIG_FSNOTIFY=y
868# CONFIG_DNOTIFY is not set 926# CONFIG_DNOTIFY is not set
869CONFIG_INOTIFY=y 927CONFIG_INOTIFY=y
870CONFIG_INOTIFY_USER=y 928CONFIG_INOTIFY_USER=y
@@ -921,6 +979,12 @@ CONFIG_JFFS2_ZLIB=y
921# CONFIG_JFFS2_LZO is not set 979# CONFIG_JFFS2_LZO is not set
922CONFIG_JFFS2_RTIME=y 980CONFIG_JFFS2_RTIME=y
923# CONFIG_JFFS2_RUBIN is not set 981# CONFIG_JFFS2_RUBIN is not set
982CONFIG_UBIFS_FS=y
983# CONFIG_UBIFS_FS_XATTR is not set
984# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
985CONFIG_UBIFS_FS_LZO=y
986CONFIG_UBIFS_FS_ZLIB=y
987# CONFIG_UBIFS_FS_DEBUG is not set
924# CONFIG_CRAMFS is not set 988# CONFIG_CRAMFS is not set
925# CONFIG_SQUASHFS is not set 989# CONFIG_SQUASHFS is not set
926# CONFIG_VXFS_FS is not set 990# CONFIG_VXFS_FS is not set
@@ -937,6 +1001,7 @@ CONFIG_NFS_FS=y
937CONFIG_NFS_V3=y 1001CONFIG_NFS_V3=y
938# CONFIG_NFS_V3_ACL is not set 1002# CONFIG_NFS_V3_ACL is not set
939CONFIG_NFS_V4=y 1003CONFIG_NFS_V4=y
1004# CONFIG_NFS_V4_1 is not set
940CONFIG_ROOT_NFS=y 1005CONFIG_ROOT_NFS=y
941# CONFIG_NFSD is not set 1006# CONFIG_NFSD is not set
942CONFIG_LOCKD=y 1007CONFIG_LOCKD=y
@@ -979,22 +1044,7 @@ CONFIG_FRAME_WARN=1024
979CONFIG_SYSCTL_SYSCALL_CHECK=y 1044CONFIG_SYSCTL_SYSCALL_CHECK=y
980CONFIG_HAVE_FUNCTION_TRACER=y 1045CONFIG_HAVE_FUNCTION_TRACER=y
981CONFIG_TRACING_SUPPORT=y 1046CONFIG_TRACING_SUPPORT=y
982 1047# CONFIG_FTRACE is not set
983#
984# Tracers
985#
986# CONFIG_FUNCTION_TRACER is not set
987# CONFIG_IRQSOFF_TRACER is not set
988# CONFIG_PREEMPT_TRACER is not set
989# CONFIG_SCHED_TRACER is not set
990# CONFIG_CONTEXT_SWITCH_TRACER is not set
991# CONFIG_EVENT_TRACER is not set
992# CONFIG_BOOT_TRACER is not set
993# CONFIG_TRACE_BRANCH_PROFILING is not set
994# CONFIG_STACK_TRACER is not set
995# CONFIG_KMEMTRACE is not set
996# CONFIG_WORKQUEUE_TRACER is not set
997# CONFIG_BLK_DEV_IO_TRACE is not set
998# CONFIG_SAMPLES is not set 1048# CONFIG_SAMPLES is not set
999CONFIG_HAVE_ARCH_KGDB=y 1049CONFIG_HAVE_ARCH_KGDB=y
1000CONFIG_ARM_UNWIND=y 1050CONFIG_ARM_UNWIND=y
@@ -1094,9 +1144,9 @@ CONFIG_CRYPTO_DES=y
1094# 1144#
1095# Compression 1145# Compression
1096# 1146#
1097# CONFIG_CRYPTO_DEFLATE is not set 1147CONFIG_CRYPTO_DEFLATE=y
1098# CONFIG_CRYPTO_ZLIB is not set 1148# CONFIG_CRYPTO_ZLIB is not set
1099# CONFIG_CRYPTO_LZO is not set 1149CONFIG_CRYPTO_LZO=y
1100 1150
1101# 1151#
1102# Random Number Generation 1152# Random Number Generation
@@ -1109,9 +1159,10 @@ CONFIG_CRYPTO_HW=y
1109# Library routines 1159# Library routines
1110# 1160#
1111CONFIG_BITREVERSE=y 1161CONFIG_BITREVERSE=y
1162CONFIG_RATIONAL=y
1112CONFIG_GENERIC_FIND_LAST_BIT=y 1163CONFIG_GENERIC_FIND_LAST_BIT=y
1113# CONFIG_CRC_CCITT is not set 1164# CONFIG_CRC_CCITT is not set
1114# CONFIG_CRC16 is not set 1165CONFIG_CRC16=y
1115# CONFIG_CRC_T10DIF is not set 1166# CONFIG_CRC_T10DIF is not set
1116# CONFIG_CRC_ITU_T is not set 1167# CONFIG_CRC_ITU_T is not set
1117CONFIG_CRC32=y 1168CONFIG_CRC32=y
@@ -1119,6 +1170,8 @@ CONFIG_CRC32=y
1119# CONFIG_LIBCRC32C is not set 1170# CONFIG_LIBCRC32C is not set
1120CONFIG_ZLIB_INFLATE=y 1171CONFIG_ZLIB_INFLATE=y
1121CONFIG_ZLIB_DEFLATE=y 1172CONFIG_ZLIB_DEFLATE=y
1173CONFIG_LZO_COMPRESS=y
1174CONFIG_LZO_DECOMPRESS=y
1122CONFIG_HAS_IOMEM=y 1175CONFIG_HAS_IOMEM=y
1123CONFIG_HAS_IOPORT=y 1176CONFIG_HAS_IOPORT=y
1124CONFIG_HAS_DMA=y 1177CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 28be17fbc157..d5ff4776cd0a 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -1107,7 +1107,7 @@ CONFIG_USB_ZERO=m
1107CONFIG_USB_OTG_UTILS=y 1107CONFIG_USB_OTG_UTILS=y
1108# CONFIG_USB_GPIO_VBUS is not set 1108# CONFIG_USB_GPIO_VBUS is not set
1109# CONFIG_ISP1301_OMAP is not set 1109# CONFIG_ISP1301_OMAP is not set
1110CONFIG_TWL4030_USB=y 1110# CONFIG_TWL4030_USB is not set
1111# CONFIG_NOP_USB_XCEIV is not set 1111# CONFIG_NOP_USB_XCEIV is not set
1112CONFIG_MMC=y 1112CONFIG_MMC=y
1113# CONFIG_MMC_DEBUG is not set 1113# CONFIG_MMC_DEBUG is not set
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 9e07fe507029..9ed2377fe8e5 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -159,8 +159,6 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
159 159
160#else /* ARM_ARCH_6 */ 160#else /* ARM_ARCH_6 */
161 161
162#include <asm/system.h>
163
164#ifdef CONFIG_SMP 162#ifdef CONFIG_SMP
165#error SMP not supported on pre-ARMv6 CPUs 163#error SMP not supported on pre-ARMv6 CPUs
166#endif 164#endif
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 366e5097a41a..8c3de1a350b5 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -148,7 +148,7 @@ trace:
148 sub r0, r0, #MCOUNT_INSN_SIZE 148 sub r0, r0, #MCOUNT_INSN_SIZE
149 mov lr, pc 149 mov lr, pc
150 mov pc, r2 150 mov pc, r2
151 mov lr, r1 @ restore lr 151 ldr lr, [fp, #-4] @ restore lr
152 ldmia sp!, {r0-r3, pc} 152 ldmia sp!, {r0-r3, pc}
153 153
154#endif /* CONFIG_DYNAMIC_FTRACE */ 154#endif /* CONFIG_DYNAMIC_FTRACE */
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 93bb4247b7ed..f6bc5d442782 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -133,7 +133,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
133} 133}
134 134
135#ifdef CONFIG_CRUNCH 135#ifdef CONFIG_CRUNCH
136static int preserve_crunch_context(struct crunch_sigframe *frame) 136static int preserve_crunch_context(struct crunch_sigframe __user *frame)
137{ 137{
138 char kbuf[sizeof(*frame) + 8]; 138 char kbuf[sizeof(*frame) + 8];
139 struct crunch_sigframe *kframe; 139 struct crunch_sigframe *kframe;
@@ -146,7 +146,7 @@ static int preserve_crunch_context(struct crunch_sigframe *frame)
146 return __copy_to_user(frame, kframe, sizeof(*frame)); 146 return __copy_to_user(frame, kframe, sizeof(*frame));
147} 147}
148 148
149static int restore_crunch_context(struct crunch_sigframe *frame) 149static int restore_crunch_context(struct crunch_sigframe __user *frame)
150{ 150{
151 char kbuf[sizeof(*frame) + 8]; 151 char kbuf[sizeof(*frame) + 8];
152 struct crunch_sigframe *kframe; 152 struct crunch_sigframe *kframe;
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 5ac2f565d860..d6ab64ccd496 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -37,7 +37,6 @@
37#include <mach/serial.h> 37#include <mach/serial.h>
38#include <mach/nand.h> 38#include <mach/nand.h>
39#include <mach/mmc.h> 39#include <mach/mmc.h>
40#include <mach/common.h>
41 40
42#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000 41#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
43#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 42#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index 28c9008df4f4..84ad5d161a87 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -36,7 +36,6 @@
36#include <mach/serial.h> 36#include <mach/serial.h>
37#include <mach/nand.h> 37#include <mach/nand.h>
38#include <mach/mmc.h> 38#include <mach/mmc.h>
39#include <mach/common.h>
40 39
41#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000 40#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
42#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 41#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index d9d40450bdc5..56c8cd01de9a 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -45,7 +45,6 @@
45#include <mach/nand.h> 45#include <mach/nand.h>
46#include <mach/mmc.h> 46#include <mach/mmc.h>
47#include <mach/emac.h> 47#include <mach/emac.h>
48#include <mach/common.h>
49 48
50#define DM644X_EVM_PHY_MASK (0x2) 49#define DM644X_EVM_PHY_MASK (0x2)
51#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 50#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index e17de6352624..8657e72debc1 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -47,7 +47,6 @@
47#include <mach/i2c.h> 47#include <mach/i2c.h>
48#include <mach/mmc.h> 48#include <mach/mmc.h>
49#include <mach/emac.h> 49#include <mach/emac.h>
50#include <mach/common.h>
51 50
52#define DM646X_EVM_PHY_MASK (0x2) 51#define DM646X_EVM_PHY_MASK (0x2)
53#define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 52#define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c
index 748a8e48541e..7acdfd8ac071 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -52,7 +52,6 @@
52#include <mach/serial.h> 52#include <mach/serial.h>
53#include <mach/psc.h> 53#include <mach/psc.h>
54#include <mach/mux.h> 54#include <mach/mux.h>
55#include <mach/common.h>
56 55
57#define SFFSDR_PHY_MASK (0x2) 56#define SFFSDR_PHY_MASK (0x2)
58#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 57#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h
index 34ddec081c40..411734422c1d 100644
--- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h
+++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h
@@ -41,9 +41,6 @@
41#define TS72XX_OPTIONS2_TS9420_BOOT 0x02 41#define TS72XX_OPTIONS2_TS9420_BOOT 0x02
42 42
43 43
44#define TS72XX_NOR_PHYS_BASE 0x60000000
45#define TS72XX_NOR2_PHYS_BASE 0x62000000
46
47#define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000 44#define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000
48#define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000 45#define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000
49#define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000 46#define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 7ee024d34829..aaf1371412af 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -112,13 +112,16 @@ static void __init ts72xx_map_io(void)
112 } 112 }
113} 113}
114 114
115/*************************************************************************
116 * NOR flash (TS-7200 only)
117 *************************************************************************/
115static struct physmap_flash_data ts72xx_flash_data = { 118static struct physmap_flash_data ts72xx_flash_data = {
116 .width = 1, 119 .width = 2,
117}; 120};
118 121
119static struct resource ts72xx_flash_resource = { 122static struct resource ts72xx_flash_resource = {
120 .start = TS72XX_NOR_PHYS_BASE, 123 .start = EP93XX_CS6_PHYS_BASE,
121 .end = TS72XX_NOR_PHYS_BASE + SZ_16M - 1, 124 .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1,
122 .flags = IORESOURCE_MEM, 125 .flags = IORESOURCE_MEM,
123}; 126};
124 127
@@ -132,6 +135,12 @@ static struct platform_device ts72xx_flash = {
132 .resource = &ts72xx_flash_resource, 135 .resource = &ts72xx_flash_resource,
133}; 136};
134 137
138static void __init ts72xx_register_flash(void)
139{
140 if (board_is_ts7200())
141 platform_device_register(&ts72xx_flash);
142}
143
135static unsigned char ts72xx_rtc_readbyte(unsigned long addr) 144static unsigned char ts72xx_rtc_readbyte(unsigned long addr)
136{ 145{
137 __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); 146 __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE);
@@ -165,8 +174,7 @@ static struct ep93xx_eth_data ts72xx_eth_data = {
165static void __init ts72xx_init_machine(void) 174static void __init ts72xx_init_machine(void)
166{ 175{
167 ep93xx_init_devices(); 176 ep93xx_init_devices();
168 if (board_is_ts7200()) 177 ts72xx_register_flash();
169 platform_device_register(&ts72xx_flash);
170 platform_device_register(&ts72xx_rtc_device); 178 platform_device_register(&ts72xx_rtc_device);
171 179
172 ep93xx_register_eth(&ts72xx_eth_data, 1); 180 ep93xx_register_eth(&ts72xx_eth_data, 1);
diff --git a/arch/arm/mach-ks8695/include/mach/hardware.h b/arch/arm/mach-ks8695/include/mach/hardware.h
index 1d640d075b7e..e0f911d9e021 100644
--- a/arch/arm/mach-ks8695/include/mach/hardware.h
+++ b/arch/arm/mach-ks8695/include/mach/hardware.h
@@ -17,6 +17,11 @@
17#include <asm/sizes.h> 17#include <asm/sizes.h>
18 18
19/* 19/*
20 * Clocks are derived from MCLK, which is 25Mhz
21 */
22#define KS8695_CLOCK_RATE 25000000
23
24/*
20 * Physical RAM address. 25 * Physical RAM address.
21 */ 26 */
22#define KS8695_SDRAM_PA 0x00000000 27#define KS8695_SDRAM_PA 0x00000000
diff --git a/arch/arm/mach-ks8695/include/mach/timex.h b/arch/arm/mach-ks8695/include/mach/timex.h
index 4682e350369b..10f716371bd3 100644
--- a/arch/arm/mach-ks8695/include/mach/timex.h
+++ b/arch/arm/mach-ks8695/include/mach/timex.h
@@ -14,7 +14,8 @@
14#ifndef __ASM_ARCH_TIMEX_H 14#ifndef __ASM_ARCH_TIMEX_H
15#define __ASM_ARCH_TIMEX_H 15#define __ASM_ARCH_TIMEX_H
16 16
17/* timers are derived from MCLK, which is 25MHz */ 17#include <mach/hardware.h>
18#define CLOCK_TICK_RATE 25000000 18
19#define CLOCK_TICK_RATE KS8695_CLOCK_RATE
19 20
20#endif 21#endif
diff --git a/arch/arm/mach-ks8695/pci.c b/arch/arm/mach-ks8695/pci.c
index f5ebcc0fcab9..78499667eb7b 100644
--- a/arch/arm/mach-ks8695/pci.c
+++ b/arch/arm/mach-ks8695/pci.c
@@ -245,6 +245,9 @@ static int ks8695_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs
245 245
246static void __init ks8695_pci_preinit(void) 246static void __init ks8695_pci_preinit(void)
247{ 247{
248 /* make software reset to avoid freeze if PCI bus was messed up */
249 __raw_writel(0x80000000, KS8695_PCI_VA + KS8695_PBCS);
250
248 /* stage 1 initialization, subid, subdevice = 0x0001 */ 251 /* stage 1 initialization, subid, subdevice = 0x0001 */
249 __raw_writel(0x00010001, KS8695_PCI_VA + KS8695_CRCSID); 252 __raw_writel(0x00010001, KS8695_PCI_VA + KS8695_CRCSID);
250 253
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index a2d7814896be..505d98cfe508 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -19,7 +19,6 @@
19 19
20#include <mach/irqs.h> 20#include <mach/irqs.h>
21#include <mach/dma.h> 21#include <mach/dma.h>
22#include <mach/irqs.h>
23#include <mach/mux.h> 22#include <mach/mux.h>
24#include <mach/cpu.h> 23#include <mach/cpu.h>
25#include <mach/mcbsp.h> 24#include <mach/mcbsp.h>
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index d3cc145814d0..cf3dd771a678 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -25,6 +25,7 @@
25#include <linux/spi/spi.h> 25#include <linux/spi/spi.h>
26#include <linux/spi/ads7846.h> 26#include <linux/spi/ads7846.h>
27#include <linux/i2c/twl4030.h> 27#include <linux/i2c/twl4030.h>
28#include <linux/usb/otg.h>
28 29
29#include <mach/hardware.h> 30#include <mach/hardware.h>
30#include <asm/mach-types.h> 31#include <asm/mach-types.h>
@@ -307,6 +308,10 @@ static void __init omap3_evm_init(void)
307 ARRAY_SIZE(omap3evm_spi_board_info)); 308 ARRAY_SIZE(omap3evm_spi_board_info));
308 309
309 omap_serial_init(); 310 omap_serial_init();
311#ifdef CONFIG_NOP_USB_XCEIV
312 /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
313 usb_nop_xceiv_register();
314#endif
310 usb_musb_init(); 315 usb_musb_init();
311 ads7846_dev_init(); 316 ads7846_dev_init();
312} 317}
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index a5c0f0435cd6..99b6e1546311 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -19,7 +19,6 @@
19 19
20#include <mach/irqs.h> 20#include <mach/irqs.h>
21#include <mach/dma.h> 21#include <mach/dma.h>
22#include <mach/irqs.h>
23#include <mach/mux.h> 22#include <mach/mux.h>
24#include <mach/cpu.h> 23#include <mach/cpu.h>
25#include <mach/mcbsp.h> 24#include <mach/mcbsp.h>
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index d85296dc896c..739e59e8025c 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -155,20 +155,6 @@ static struct platform_device musb_device = {
155 .resource = musb_resources, 155 .resource = musb_resources,
156}; 156};
157 157
158#ifdef CONFIG_NOP_USB_XCEIV
159static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
160
161static struct platform_device nop_xceiv_device = {
162 .name = "nop_usb_xceiv",
163 .id = -1,
164 .dev = {
165 .dma_mask = &nop_xceiv_dmamask,
166 .coherent_dma_mask = DMA_BIT_MASK(32),
167 .platform_data = NULL,
168 },
169};
170#endif
171
172void __init usb_musb_init(void) 158void __init usb_musb_init(void)
173{ 159{
174 if (cpu_is_omap243x()) 160 if (cpu_is_omap243x())
@@ -183,13 +169,6 @@ void __init usb_musb_init(void)
183 */ 169 */
184 musb_plat.clock = "ick"; 170 musb_plat.clock = "ick";
185 171
186#ifdef CONFIG_NOP_USB_XCEIV
187 if (platform_device_register(&nop_xceiv_device) < 0) {
188 printk(KERN_ERR "Unable to register NOP-XCEIV device\n");
189 return;
190 }
191#endif
192
193 if (platform_device_register(&musb_device) < 0) { 172 if (platform_device_register(&musb_device) < 0) {
194 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); 173 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
195 return; 174 return;
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 63b10d9bb1d3..9cd09465a0e8 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -1141,12 +1141,16 @@ struct power_supply_info em_x270_psy_info = {
1141 1141
1142static void em_x270_battery_low(void) 1142static void em_x270_battery_low(void)
1143{ 1143{
1144#if defined(CONFIG_APM_EMULATION)
1144 apm_queue_event(APM_LOW_BATTERY); 1145 apm_queue_event(APM_LOW_BATTERY);
1146#endif
1145} 1147}
1146 1148
1147static void em_x270_battery_critical(void) 1149static void em_x270_battery_critical(void)
1148{ 1150{
1151#if defined(CONFIG_APM_EMULATION)
1149 apm_queue_event(APM_CRITICAL_SUSPEND); 1152 apm_queue_event(APM_CRITICAL_SUSPEND);
1153#endif
1150} 1154}
1151 1155
1152struct da9030_battery_info em_x270_batterty_info = { 1156struct da9030_battery_info em_x270_batterty_info = {
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index ed70f281dd09..169fcc18154e 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -128,6 +128,10 @@ static unsigned long palmld_pin_config[] __initdata = {
128 GPIO38_GPIO, /* wifi ready */ 128 GPIO38_GPIO, /* wifi ready */
129 GPIO81_GPIO, /* wifi reset */ 129 GPIO81_GPIO, /* wifi reset */
130 130
131 /* FFUART */
132 GPIO34_FFUART_RXD,
133 GPIO39_FFUART_TXD,
134
131 /* HDD */ 135 /* HDD */
132 GPIO98_GPIO, /* HDD reset */ 136 GPIO98_GPIO, /* HDD reset */
133 GPIO115_GPIO, /* HDD power */ 137 GPIO115_GPIO, /* HDD power */
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index aae64a12a734..33f726ff55e5 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -111,6 +111,10 @@ static unsigned long palmt5_pin_config[] __initdata = {
111 /* PWM */ 111 /* PWM */
112 GPIO16_PWM0_OUT, 112 GPIO16_PWM0_OUT,
113 113
114 /* FFUART */
115 GPIO34_FFUART_RXD,
116 GPIO39_FFUART_TXD,
117
114 /* MISC */ 118 /* MISC */
115 GPIO10_GPIO, /* hotsync button */ 119 GPIO10_GPIO, /* hotsync button */
116 GPIO90_GPIO, /* power detect */ 120 GPIO90_GPIO, /* power detect */
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 6c15d84bde53..83d020879581 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -127,6 +127,10 @@ static unsigned long palmtx_pin_config[] __initdata = {
127 GPIO76_LCD_PCLK, 127 GPIO76_LCD_PCLK,
128 GPIO77_LCD_BIAS, 128 GPIO77_LCD_BIAS,
129 129
130 /* FFUART */
131 GPIO34_FFUART_RXD,
132 GPIO39_FFUART_TXD,
133
130 /* MISC. */ 134 /* MISC. */
131 GPIO10_GPIO, /* hotsync button */ 135 GPIO10_GPIO, /* hotsync button */
132 GPIO12_GPIO, /* power detect */ 136 GPIO12_GPIO, /* power detect */
diff --git a/arch/arm/mach-pxa/treo680.c b/arch/arm/mach-pxa/treo680.c
index a06f19edebb3..753ec4df17b9 100644
--- a/arch/arm/mach-pxa/treo680.c
+++ b/arch/arm/mach-pxa/treo680.c
@@ -409,7 +409,7 @@ err1:
409 409
410static void treo680_irda_shutdown(struct device *dev) 410static void treo680_irda_shutdown(struct device *dev)
411{ 411{
412 gpio_free(GPIO_NR_TREO680_AMP_EN); 412 gpio_free(GPIO_NR_TREO680_IR_EN);
413} 413}
414 414
415static struct pxaficp_platform_data treo680_ficp_info = { 415static struct pxaficp_platform_data treo680_ficp_info = {
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index cefd1c0a854a..84095440a878 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -197,10 +197,12 @@ static void __init zylonite_detect_lcd_panel(void)
197 for (i = 0; i < NUM_LCD_DETECT_PINS; i++) { 197 for (i = 0; i < NUM_LCD_DETECT_PINS; i++) {
198 id = id << 1; 198 id = id << 1;
199 gpio = mfp_to_gpio(lcd_detect_pins[i]); 199 gpio = mfp_to_gpio(lcd_detect_pins[i]);
200 gpio_request(gpio, "LCD_ID_PINS");
200 gpio_direction_input(gpio); 201 gpio_direction_input(gpio);
201 202
202 if (gpio_get_value(gpio)) 203 if (gpio_get_value(gpio))
203 id = id | 0x1; 204 id = id | 0x1;
205 gpio_free(gpio);
204 } 206 }
205 207
206 /* lcd id, flush out bit 1 */ 208 /* lcd id, flush out bit 1 */
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c
index cc5a22833605..60d08f23f5e4 100644
--- a/arch/arm/mach-pxa/zylonite_pxa320.c
+++ b/arch/arm/mach-pxa/zylonite_pxa320.c
@@ -176,10 +176,12 @@ static void __init zylonite_detect_lcd_panel(void)
176 for (i = 0; i < NUM_LCD_DETECT_PINS; i++) { 176 for (i = 0; i < NUM_LCD_DETECT_PINS; i++) {
177 id = id << 1; 177 id = id << 1;
178 gpio = mfp_to_gpio(lcd_detect_pins[i]); 178 gpio = mfp_to_gpio(lcd_detect_pins[i]);
179 gpio_request(gpio, "LCD_ID_PINS");
179 gpio_direction_input(gpio); 180 gpio_direction_input(gpio);
180 181
181 if (gpio_get_value(gpio)) 182 if (gpio_get_value(gpio))
182 id = id | 0x1; 183 id = id | 0x1;
184 gpio_free(gpio);
183 } 185 }
184 186
185 /* lcd id, flush out bit 1 */ 187 /* lcd id, flush out bit 1 */
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
index 8fe192081d3a..f8b879a7973c 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio-core.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
@@ -28,7 +28,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
28 return NULL; 28 return NULL;
29 29
30 chip = &s3c24xx_gpios[pin/32]; 30 chip = &s3c24xx_gpios[pin/32];
31 return (S3C2410_GPIO_OFFSET(pin) > chip->chip.ngpio) ? chip : NULL; 31 return (S3C2410_GPIO_OFFSET(pin) < chip->chip.ngpio) ? chip : NULL;
32} 32}
33 33
34#endif /* __ASM_ARCH_GPIO_CORE_H */ 34#endif /* __ASM_ARCH_GPIO_CORE_H */
diff --git a/arch/arm/plat-s3c24xx/pwm.c b/arch/arm/plat-s3c24xx/pwm.c
index 0120b760315b..82a6d4de02a3 100644
--- a/arch/arm/plat-s3c24xx/pwm.c
+++ b/arch/arm/plat-s3c24xx/pwm.c
@@ -246,6 +246,10 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
246 246
247 tcmp = duty_ns / tin_ns; 247 tcmp = duty_ns / tin_ns;
248 tcmp = tcnt - tcmp; 248 tcmp = tcnt - tcmp;
249 /* the pwm hw only checks the compare register after a decrement,
250 so the pin never toggles if tcmp = tcnt */
251 if (tcmp == tcnt)
252 tcmp--;
249 253
250 pwm_dbg(pwm, "tin_ns=%lu, tcmp=%ld/%lu\n", tin_ns, tcmp, tcnt); 254 pwm_dbg(pwm, "tin_ns=%lu, tcmp=%ld/%lu\n", tin_ns, tcmp, tcnt);
251 255
diff --git a/arch/arm/plat-s3c64xx/pm.c b/arch/arm/plat-s3c64xx/pm.c
index 07a6516a4f3c..47632fc7eb66 100644
--- a/arch/arm/plat-s3c64xx/pm.c
+++ b/arch/arm/plat-s3c64xx/pm.c
@@ -117,8 +117,6 @@ void s3c_pm_save_core(void)
117 * this. 117 * this.
118 */ 118 */
119 119
120#include <plat/regs-gpio.h>
121
122static void s3c64xx_cpu_suspend(void) 120static void s3c64xx_cpu_suspend(void)
123{ 121{
124 unsigned long tmp; 122 unsigned long tmp;
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index 1debc1f9f987..febac1950d8e 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -153,7 +153,7 @@ static unsigned long s3c64xx_clk_arm_round_rate(struct clk *clk,
153 u32 div; 153 u32 div;
154 154
155 if (parent < rate) 155 if (parent < rate)
156 return rate; 156 return parent;
157 157
158 div = (parent / rate) - 1; 158 div = (parent / rate) - 1;
159 if (div > armclk_mask) 159 if (div > armclk_mask)
@@ -175,7 +175,7 @@ static int s3c64xx_clk_arm_set_rate(struct clk *clk, unsigned long rate)
175 div = clk_get_rate(clk->parent) / rate; 175 div = clk_get_rate(clk->parent) / rate;
176 176
177 val = __raw_readl(S3C_CLK_DIV0); 177 val = __raw_readl(S3C_CLK_DIV0);
178 val &= armclk_mask; 178 val &= ~armclk_mask;
179 val |= (div - 1); 179 val |= (div - 1);
180 __raw_writel(val, S3C_CLK_DIV0); 180 __raw_writel(val, S3C_CLK_DIV0);
181 181
diff --git a/arch/arm/plat-stmp3xxx/pinmux.c b/arch/arm/plat-stmp3xxx/pinmux.c
index d41200382208..6d6b1a468eda 100644
--- a/arch/arm/plat-stmp3xxx/pinmux.c
+++ b/arch/arm/plat-stmp3xxx/pinmux.c
@@ -22,7 +22,6 @@
22#include <linux/sysdev.h> 22#include <linux/sysdev.h>
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <linux/sysdev.h>
26#include <linux/irq.h> 25#include <linux/irq.h>
27 26
28#include <mach/hardware.h> 27#include <mach/hardware.h>
diff --git a/arch/ia64/kvm/mmio.c b/arch/ia64/kvm/mmio.c
index 21f63fffc379..9bf55afd08d0 100644
--- a/arch/ia64/kvm/mmio.c
+++ b/arch/ia64/kvm/mmio.c
@@ -247,7 +247,8 @@ void emulate_io_inst(struct kvm_vcpu *vcpu, u64 padr, u64 ma)
247 vcpu_get_fpreg(vcpu, inst.M9.f2, &v); 247 vcpu_get_fpreg(vcpu, inst.M9.f2, &v);
248 /* Write high word. FIXME: this is a kludge! */ 248 /* Write high word. FIXME: this is a kludge! */
249 v.u.bits[1] &= 0x3ffff; 249 v.u.bits[1] &= 0x3ffff;
250 mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE); 250 mmio_access(vcpu, padr + 8, (u64 *)&v.u.bits[1], 8,
251 ma, IOREQ_WRITE);
251 data = v.u.bits[0]; 252 data = v.u.bits[0];
252 size = 3; 253 size = 3;
253 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x3B) { 254 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x3B) {
@@ -265,7 +266,8 @@ void emulate_io_inst(struct kvm_vcpu *vcpu, u64 padr, u64 ma)
265 266
266 /* Write high word.FIXME: this is a kludge! */ 267 /* Write high word.FIXME: this is a kludge! */
267 v.u.bits[1] &= 0x3ffff; 268 v.u.bits[1] &= 0x3ffff;
268 mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE); 269 mmio_access(vcpu, padr + 8, (u64 *)&v.u.bits[1],
270 8, ma, IOREQ_WRITE);
269 data = v.u.bits[0]; 271 data = v.u.bits[0];
270 size = 3; 272 size = 3;
271 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x31) { 273 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x31) {
diff --git a/arch/ia64/kvm/vcpu.c b/arch/ia64/kvm/vcpu.c
index 46b02cbcc874..cc406d064a09 100644
--- a/arch/ia64/kvm/vcpu.c
+++ b/arch/ia64/kvm/vcpu.c
@@ -461,7 +461,7 @@ void setreg(unsigned long regnum, unsigned long val,
461u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg) 461u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg)
462{ 462{
463 struct kvm_pt_regs *regs = vcpu_regs(vcpu); 463 struct kvm_pt_regs *regs = vcpu_regs(vcpu);
464 u64 val; 464 unsigned long val;
465 465
466 if (!reg) 466 if (!reg)
467 return 0; 467 return 0;
@@ -469,7 +469,7 @@ u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg)
469 return val; 469 return val;
470} 470}
471 471
472void vcpu_set_gr(struct kvm_vcpu *vcpu, u64 reg, u64 value, int nat) 472void vcpu_set_gr(struct kvm_vcpu *vcpu, unsigned long reg, u64 value, int nat)
473{ 473{
474 struct kvm_pt_regs *regs = vcpu_regs(vcpu); 474 struct kvm_pt_regs *regs = vcpu_regs(vcpu);
475 long sof = (regs->cr_ifs) & 0x7f; 475 long sof = (regs->cr_ifs) & 0x7f;
@@ -1072,7 +1072,7 @@ void kvm_ttag(struct kvm_vcpu *vcpu, INST64 inst)
1072 vcpu_set_gr(vcpu, inst.M46.r1, tag, 0); 1072 vcpu_set_gr(vcpu, inst.M46.r1, tag, 0);
1073} 1073}
1074 1074
1075int vcpu_tpa(struct kvm_vcpu *vcpu, u64 vadr, u64 *padr) 1075int vcpu_tpa(struct kvm_vcpu *vcpu, u64 vadr, unsigned long *padr)
1076{ 1076{
1077 struct thash_data *data; 1077 struct thash_data *data;
1078 union ia64_isr visr, pt_isr; 1078 union ia64_isr visr, pt_isr;
diff --git a/arch/ia64/kvm/vcpu.h b/arch/ia64/kvm/vcpu.h
index 042af92ced83..360724d3ae69 100644
--- a/arch/ia64/kvm/vcpu.h
+++ b/arch/ia64/kvm/vcpu.h
@@ -686,14 +686,15 @@ static inline int highest_inservice_irq(struct kvm_vcpu *vcpu)
686 return highest_bits((int *)&(VMX(vcpu, insvc[0]))); 686 return highest_bits((int *)&(VMX(vcpu, insvc[0])));
687} 687}
688 688
689extern void vcpu_get_fpreg(struct kvm_vcpu *vcpu, u64 reg, 689extern void vcpu_get_fpreg(struct kvm_vcpu *vcpu, unsigned long reg,
690 struct ia64_fpreg *val); 690 struct ia64_fpreg *val);
691extern void vcpu_set_fpreg(struct kvm_vcpu *vcpu, u64 reg, 691extern void vcpu_set_fpreg(struct kvm_vcpu *vcpu, unsigned long reg,
692 struct ia64_fpreg *val); 692 struct ia64_fpreg *val);
693extern u64 vcpu_get_gr(struct kvm_vcpu *vcpu, u64 reg); 693extern u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg);
694extern void vcpu_set_gr(struct kvm_vcpu *vcpu, u64 reg, u64 val, int nat); 694extern void vcpu_set_gr(struct kvm_vcpu *vcpu, unsigned long reg,
695extern u64 vcpu_get_psr(struct kvm_vcpu *vcpu); 695 u64 val, int nat);
696extern void vcpu_set_psr(struct kvm_vcpu *vcpu, u64 val); 696extern unsigned long vcpu_get_psr(struct kvm_vcpu *vcpu);
697extern void vcpu_set_psr(struct kvm_vcpu *vcpu, unsigned long val);
697extern u64 vcpu_thash(struct kvm_vcpu *vcpu, u64 vadr); 698extern u64 vcpu_thash(struct kvm_vcpu *vcpu, u64 vadr);
698extern void vcpu_bsw0(struct kvm_vcpu *vcpu); 699extern void vcpu_bsw0(struct kvm_vcpu *vcpu);
699extern void thash_vhpt_insert(struct kvm_vcpu *v, u64 pte, 700extern void thash_vhpt_insert(struct kvm_vcpu *v, u64 pte,
diff --git a/arch/mn10300/include/asm/pci.h b/arch/mn10300/include/asm/pci.h
index 35d2ed6396f6..19aecc90f7a4 100644
--- a/arch/mn10300/include/asm/pci.h
+++ b/arch/mn10300/include/asm/pci.h
@@ -59,7 +59,6 @@ void pcibios_penalize_isa_irq(int irq);
59#include <linux/slab.h> 59#include <linux/slab.h>
60#include <asm/scatterlist.h> 60#include <asm/scatterlist.h>
61#include <linux/string.h> 61#include <linux/string.h>
62#include <linux/mm.h>
63#include <asm/io.h> 62#include <asm/io.h>
64 63
65struct pci_dev; 64struct pci_dev;
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index dfdf13c9fefd..fddc3ed715fa 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -34,7 +34,7 @@
34#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 34#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
35 35
36/* We don't currently support large pages. */ 36/* We don't currently support large pages. */
37#define KVM_PAGES_PER_HPAGE (1<<31) 37#define KVM_PAGES_PER_HPAGE (1UL << 31)
38 38
39struct kvm; 39struct kvm;
40struct kvm_run; 40struct kvm_run;
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 20a60d661ba8..ccf129d47d84 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -7,6 +7,7 @@
7 7
8#include <linux/device.h> 8#include <linux/device.h>
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <linux/lmb.h>
10#include <asm/bug.h> 11#include <asm/bug.h>
11#include <asm/abs_addr.h> 12#include <asm/abs_addr.h>
12 13
@@ -90,11 +91,10 @@ static void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg,
90static int dma_direct_dma_supported(struct device *dev, u64 mask) 91static int dma_direct_dma_supported(struct device *dev, u64 mask)
91{ 92{
92#ifdef CONFIG_PPC64 93#ifdef CONFIG_PPC64
93 /* Could be improved to check for memory though it better be 94 /* Could be improved so platforms can set the limit in case
94 * done via some global so platforms can set the limit in case
95 * they have limited DMA windows 95 * they have limited DMA windows
96 */ 96 */
97 return mask >= DMA_BIT_MASK(32); 97 return mask >= (lmb_end_of_DRAM() - 1);
98#else 98#else
99 return 1; 99 return 1;
100#endif 100#endif
diff --git a/arch/powerpc/kernel/mpc7450-pmu.c b/arch/powerpc/kernel/mpc7450-pmu.c
index c244133c67a6..cc466d039af6 100644
--- a/arch/powerpc/kernel/mpc7450-pmu.c
+++ b/arch/powerpc/kernel/mpc7450-pmu.c
@@ -407,7 +407,8 @@ struct power_pmu mpc7450_pmu = {
407 407
408static int init_mpc7450_pmu(void) 408static int init_mpc7450_pmu(void)
409{ 409{
410 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450")) 410 if (!cur_cpu_spec->oprofile_cpu_type ||
411 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
411 return -ENODEV; 412 return -ENODEV;
412 413
413 return register_power_pmu(&mpc7450_pmu); 414 return register_power_pmu(&mpc7450_pmu);
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c
index 809fdf94b95f..70e1f57f7dd8 100644
--- a/arch/powerpc/kernel/perf_counter.c
+++ b/arch/powerpc/kernel/perf_counter.c
@@ -518,6 +518,8 @@ void hw_perf_disable(void)
518 struct cpu_hw_counters *cpuhw; 518 struct cpu_hw_counters *cpuhw;
519 unsigned long flags; 519 unsigned long flags;
520 520
521 if (!ppmu)
522 return;
521 local_irq_save(flags); 523 local_irq_save(flags);
522 cpuhw = &__get_cpu_var(cpu_hw_counters); 524 cpuhw = &__get_cpu_var(cpu_hw_counters);
523 525
@@ -572,6 +574,8 @@ void hw_perf_enable(void)
572 int n_lim; 574 int n_lim;
573 int idx; 575 int idx;
574 576
577 if (!ppmu)
578 return;
575 local_irq_save(flags); 579 local_irq_save(flags);
576 cpuhw = &__get_cpu_var(cpu_hw_counters); 580 cpuhw = &__get_cpu_var(cpu_hw_counters);
577 if (!cpuhw->disabled) { 581 if (!cpuhw->disabled) {
@@ -737,6 +741,8 @@ int hw_perf_group_sched_in(struct perf_counter *group_leader,
737 long i, n, n0; 741 long i, n, n0;
738 struct perf_counter *sub; 742 struct perf_counter *sub;
739 743
744 if (!ppmu)
745 return 0;
740 cpuhw = &__get_cpu_var(cpu_hw_counters); 746 cpuhw = &__get_cpu_var(cpu_hw_counters);
741 n0 = cpuhw->n_counters; 747 n0 = cpuhw->n_counters;
742 n = collect_events(group_leader, ppmu->n_counter - n0, 748 n = collect_events(group_leader, ppmu->n_counter - n0,
@@ -1281,6 +1287,8 @@ void hw_perf_counter_setup(int cpu)
1281{ 1287{
1282 struct cpu_hw_counters *cpuhw = &per_cpu(cpu_hw_counters, cpu); 1288 struct cpu_hw_counters *cpuhw = &per_cpu(cpu_hw_counters, cpu);
1283 1289
1290 if (!ppmu)
1291 return;
1284 memset(cpuhw, 0, sizeof(*cpuhw)); 1292 memset(cpuhw, 0, sizeof(*cpuhw));
1285 cpuhw->mmcr[0] = MMCR0_FC; 1293 cpuhw->mmcr[0] = MMCR0_FC;
1286} 1294}
diff --git a/arch/powerpc/kernel/power4-pmu.c b/arch/powerpc/kernel/power4-pmu.c
index db90b0c5c27b..3c90a3d9173e 100644
--- a/arch/powerpc/kernel/power4-pmu.c
+++ b/arch/powerpc/kernel/power4-pmu.c
@@ -606,7 +606,8 @@ static struct power_pmu power4_pmu = {
606 606
607static int init_power4_pmu(void) 607static int init_power4_pmu(void)
608{ 608{
609 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4")) 609 if (!cur_cpu_spec->oprofile_cpu_type ||
610 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
610 return -ENODEV; 611 return -ENODEV;
611 612
612 return register_power_pmu(&power4_pmu); 613 return register_power_pmu(&power4_pmu);
diff --git a/arch/powerpc/kernel/power5+-pmu.c b/arch/powerpc/kernel/power5+-pmu.c
index f4adca8e98a4..31918af3e355 100644
--- a/arch/powerpc/kernel/power5+-pmu.c
+++ b/arch/powerpc/kernel/power5+-pmu.c
@@ -678,8 +678,9 @@ static struct power_pmu power5p_pmu = {
678 678
679static int init_power5p_pmu(void) 679static int init_power5p_pmu(void)
680{ 680{
681 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+") 681 if (!cur_cpu_spec->oprofile_cpu_type ||
682 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5++")) 682 (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+")
683 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5++")))
683 return -ENODEV; 684 return -ENODEV;
684 685
685 return register_power_pmu(&power5p_pmu); 686 return register_power_pmu(&power5p_pmu);
diff --git a/arch/powerpc/kernel/power5-pmu.c b/arch/powerpc/kernel/power5-pmu.c
index 29b2c6c0e83a..867f6f663963 100644
--- a/arch/powerpc/kernel/power5-pmu.c
+++ b/arch/powerpc/kernel/power5-pmu.c
@@ -618,7 +618,8 @@ static struct power_pmu power5_pmu = {
618 618
619static int init_power5_pmu(void) 619static int init_power5_pmu(void)
620{ 620{
621 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5")) 621 if (!cur_cpu_spec->oprofile_cpu_type ||
622 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5"))
622 return -ENODEV; 623 return -ENODEV;
623 624
624 return register_power_pmu(&power5_pmu); 625 return register_power_pmu(&power5_pmu);
diff --git a/arch/powerpc/kernel/power6-pmu.c b/arch/powerpc/kernel/power6-pmu.c
index 09ae5bf5bda7..fa21890531da 100644
--- a/arch/powerpc/kernel/power6-pmu.c
+++ b/arch/powerpc/kernel/power6-pmu.c
@@ -537,7 +537,8 @@ static struct power_pmu power6_pmu = {
537 537
538static int init_power6_pmu(void) 538static int init_power6_pmu(void)
539{ 539{
540 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6")) 540 if (!cur_cpu_spec->oprofile_cpu_type ||
541 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6"))
541 return -ENODEV; 542 return -ENODEV;
542 543
543 return register_power_pmu(&power6_pmu); 544 return register_power_pmu(&power6_pmu);
diff --git a/arch/powerpc/kernel/power7-pmu.c b/arch/powerpc/kernel/power7-pmu.c
index 5a9f5cbd40a4..388cf57ad827 100644
--- a/arch/powerpc/kernel/power7-pmu.c
+++ b/arch/powerpc/kernel/power7-pmu.c
@@ -366,7 +366,8 @@ static struct power_pmu power7_pmu = {
366 366
367static int init_power7_pmu(void) 367static int init_power7_pmu(void)
368{ 368{
369 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7")) 369 if (!cur_cpu_spec->oprofile_cpu_type ||
370 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7"))
370 return -ENODEV; 371 return -ENODEV;
371 372
372 return register_power_pmu(&power7_pmu); 373 return register_power_pmu(&power7_pmu);
diff --git a/arch/powerpc/kernel/ppc970-pmu.c b/arch/powerpc/kernel/ppc970-pmu.c
index 833097ac45dc..75dccb71a043 100644
--- a/arch/powerpc/kernel/ppc970-pmu.c
+++ b/arch/powerpc/kernel/ppc970-pmu.c
@@ -488,8 +488,9 @@ static struct power_pmu ppc970_pmu = {
488 488
489static int init_ppc970_pmu(void) 489static int init_ppc970_pmu(void)
490{ 490{
491 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970") 491 if (!cur_cpu_spec->oprofile_cpu_type ||
492 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP")) 492 (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
493 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP")))
493 return -ENODEV; 494 return -ENODEV;
494 495
495 return register_power_pmu(&ppc970_pmu); 496 return register_power_pmu(&ppc970_pmu);
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 8d15314381e0..cae14c499511 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -208,6 +208,9 @@ static noinline __init void detect_machine_type(void)
208 machine_flags |= MACHINE_FLAG_KVM; 208 machine_flags |= MACHINE_FLAG_KVM;
209 else 209 else
210 machine_flags |= MACHINE_FLAG_VM; 210 machine_flags |= MACHINE_FLAG_VM;
211
212 /* Store machine flags for setting up lowcore early */
213 S390_lowcore.machine_flags = machine_flags;
211} 214}
212 215
213static __init void early_pgm_check_handler(void) 216static __init void early_pgm_check_handler(void)
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index f04f5301b1b4..4d613415c435 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -386,7 +386,7 @@ no_timer:
386 } 386 }
387 __unset_cpu_idle(vcpu); 387 __unset_cpu_idle(vcpu);
388 __set_current_state(TASK_RUNNING); 388 __set_current_state(TASK_RUNNING);
389 remove_wait_queue(&vcpu->wq, &wait); 389 remove_wait_queue(&vcpu->arch.local_int.wq, &wait);
390 spin_unlock_bh(&vcpu->arch.local_int.lock); 390 spin_unlock_bh(&vcpu->arch.local_int.lock);
391 spin_unlock(&vcpu->arch.local_int.float_int->lock); 391 spin_unlock(&vcpu->arch.local_int.float_int->lock);
392 hrtimer_try_to_cancel(&vcpu->arch.ckc_timer); 392 hrtimer_try_to_cancel(&vcpu->arch.ckc_timer);
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 36678835034d..0ef81d6776e9 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -169,7 +169,7 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
169 unsigned long *reg) 169 unsigned long *reg)
170{ 170{
171 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; 171 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
172 struct kvm_s390_local_interrupt *li; 172 struct kvm_s390_local_interrupt *li = NULL;
173 struct kvm_s390_interrupt_info *inti; 173 struct kvm_s390_interrupt_info *inti;
174 int rc; 174 int rc;
175 u8 tmp; 175 u8 tmp;
@@ -189,9 +189,10 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
189 return 2; /* busy */ 189 return 2; /* busy */
190 190
191 spin_lock(&fi->lock); 191 spin_lock(&fi->lock);
192 li = fi->local_int[cpu_addr]; 192 if (cpu_addr < KVM_MAX_VCPUS)
193 li = fi->local_int[cpu_addr];
193 194
194 if ((cpu_addr >= KVM_MAX_VCPUS) || (li == NULL)) { 195 if (li == NULL) {
195 rc = 1; /* incorrect state */ 196 rc = 1; /* incorrect state */
196 *reg &= SIGP_STAT_INCORRECT_STATE; 197 *reg &= SIGP_STAT_INCORRECT_STATE;
197 kfree(inti); 198 kfree(inti);
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
index 2ed4e2bb3b32..a5371ec36776 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
@@ -17,11 +17,13 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
17 return x2apic_enabled(); 17 return x2apic_enabled();
18} 18}
19 19
20/* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ 20/*
21 21 * need to use more than cpu 0, because we need more vectors when
22 * MSI-X are used.
23 */
22static const struct cpumask *x2apic_target_cpus(void) 24static const struct cpumask *x2apic_target_cpus(void)
23{ 25{
24 return cpumask_of(0); 26 return cpu_online_mask;
25} 27}
26 28
27/* 29/*
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
index 0b631c6a2e00..a8989aadc99a 100644
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
@@ -27,11 +27,13 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
27 return 0; 27 return 0;
28} 28}
29 29
30/* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ 30/*
31 31 * need to use more than cpu 0, because we need more vectors when
32 * MSI-X are used.
33 */
32static const struct cpumask *x2apic_target_cpus(void) 34static const struct cpumask *x2apic_target_cpus(void)
33{ 35{
34 return cpumask_of(0); 36 return cpu_online_mask;
35} 37}
36 38
37static void x2apic_vector_allocation_domain(int cpu, struct cpumask *retmask) 39static void x2apic_vector_allocation_domain(int cpu, struct cpumask *retmask)
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index 19ccf6d0dccf..fe26ba3e3451 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -354,7 +354,7 @@ void __init efi_init(void)
354 */ 354 */
355 c16 = tmp = early_ioremap(efi.systab->fw_vendor, 2); 355 c16 = tmp = early_ioremap(efi.systab->fw_vendor, 2);
356 if (c16) { 356 if (c16) {
357 for (i = 0; i < sizeof(vendor) && *c16; ++i) 357 for (i = 0; i < sizeof(vendor) - 1 && *c16; ++i)
358 vendor[i] = *c16++; 358 vendor[i] = *c16++;
359 vendor[i] = '\0'; 359 vendor[i] = '\0';
360 } else 360 } else
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 834c9da8bf9d..9eb897603705 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -405,7 +405,7 @@ EXPORT_SYMBOL(machine_real_restart);
405#endif /* CONFIG_X86_32 */ 405#endif /* CONFIG_X86_32 */
406 406
407/* 407/*
408 * Apple MacBook5,2 (2009 MacBook) needs reboot=p 408 * Some Apple MacBook and MacBookPro's needs reboot=p to be able to reboot
409 */ 409 */
410static int __init set_pci_reboot(const struct dmi_system_id *d) 410static int __init set_pci_reboot(const struct dmi_system_id *d)
411{ 411{
@@ -426,6 +426,14 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
426 DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5,2"), 426 DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5,2"),
427 }, 427 },
428 }, 428 },
429 { /* Handle problems with rebooting on Apple MacBookPro5,1 */
430 .callback = set_pci_reboot,
431 .ident = "Apple MacBookPro5,1",
432 .matches = {
433 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
434 DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro5,1"),
435 },
436 },
429 { } 437 { }
430}; 438};
431 439
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 6e1a368d21d4..71f4368b357e 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -275,15 +275,20 @@ static unsigned long pit_calibrate_tsc(u32 latch, unsigned long ms, int loopmin)
275 * use the TSC value at the transitions to calculate a pretty 275 * use the TSC value at the transitions to calculate a pretty
276 * good value for the TSC frequencty. 276 * good value for the TSC frequencty.
277 */ 277 */
278static inline int pit_verify_msb(unsigned char val)
279{
280 /* Ignore LSB */
281 inb(0x42);
282 return inb(0x42) == val;
283}
284
278static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap) 285static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap)
279{ 286{
280 int count; 287 int count;
281 u64 tsc = 0; 288 u64 tsc = 0;
282 289
283 for (count = 0; count < 50000; count++) { 290 for (count = 0; count < 50000; count++) {
284 /* Ignore LSB */ 291 if (!pit_verify_msb(val))
285 inb(0x42);
286 if (inb(0x42) != val)
287 break; 292 break;
288 tsc = get_cycles(); 293 tsc = get_cycles();
289 } 294 }
@@ -336,8 +341,7 @@ static unsigned long quick_pit_calibrate(void)
336 * to do that is to just read back the 16-bit counter 341 * to do that is to just read back the 16-bit counter
337 * once from the PIT. 342 * once from the PIT.
338 */ 343 */
339 inb(0x42); 344 pit_verify_msb(0);
340 inb(0x42);
341 345
342 if (pit_expect_msb(0xff, &tsc, &d1)) { 346 if (pit_expect_msb(0xff, &tsc, &d1)) {
343 for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) { 347 for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) {
@@ -348,8 +352,19 @@ static unsigned long quick_pit_calibrate(void)
348 * Iterate until the error is less than 500 ppm 352 * Iterate until the error is less than 500 ppm
349 */ 353 */
350 delta -= tsc; 354 delta -= tsc;
351 if (d1+d2 < delta >> 11) 355 if (d1+d2 >= delta >> 11)
352 goto success; 356 continue;
357
358 /*
359 * Check the PIT one more time to verify that
360 * all TSC reads were stable wrt the PIT.
361 *
362 * This also guarantees serialization of the
363 * last cycle read ('d2') in pit_expect_msb.
364 */
365 if (!pit_verify_msb(0xfe - i))
366 break;
367 goto success;
353 } 368 }
354 } 369 }
355 printk("Fast TSC calibration failed\n"); 370 printk("Fast TSC calibration failed\n");
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index b263423fbe2a..95a7289e4b0c 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -441,7 +441,7 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
441 ap.ds = __USER_DS; 441 ap.ds = __USER_DS;
442 ap.es = __USER_DS; 442 ap.es = __USER_DS;
443 ap.fs = __KERNEL_PERCPU; 443 ap.fs = __KERNEL_PERCPU;
444 ap.gs = 0; 444 ap.gs = __KERNEL_STACK_CANARY;
445 445
446 ap.eflags = 0; 446 ap.eflags = 0;
447 447
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 4d6f0d293ee2..21f68e00524f 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -104,6 +104,9 @@ static s64 __kpit_elapsed(struct kvm *kvm)
104 ktime_t remaining; 104 ktime_t remaining;
105 struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state; 105 struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state;
106 106
107 if (!ps->pit_timer.period)
108 return 0;
109
107 /* 110 /*
108 * The Counter does not stop when it reaches zero. In 111 * The Counter does not stop when it reaches zero. In
109 * Modes 0, 1, 4, and 5 the Counter ``wraps around'' to 112 * Modes 0, 1, 4, and 5 the Counter ``wraps around'' to
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 7030b5f911bf..0ef5bb2b4043 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -489,16 +489,20 @@ static unsigned long *gfn_to_rmap(struct kvm *kvm, gfn_t gfn, int lpage)
489 * 489 *
490 * If rmapp bit zero is one, (then rmap & ~1) points to a struct kvm_rmap_desc 490 * If rmapp bit zero is one, (then rmap & ~1) points to a struct kvm_rmap_desc
491 * containing more mappings. 491 * containing more mappings.
492 *
493 * Returns the number of rmap entries before the spte was added or zero if
494 * the spte was not added.
495 *
492 */ 496 */
493static void rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn, int lpage) 497static int rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn, int lpage)
494{ 498{
495 struct kvm_mmu_page *sp; 499 struct kvm_mmu_page *sp;
496 struct kvm_rmap_desc *desc; 500 struct kvm_rmap_desc *desc;
497 unsigned long *rmapp; 501 unsigned long *rmapp;
498 int i; 502 int i, count = 0;
499 503
500 if (!is_rmap_pte(*spte)) 504 if (!is_rmap_pte(*spte))
501 return; 505 return count;
502 gfn = unalias_gfn(vcpu->kvm, gfn); 506 gfn = unalias_gfn(vcpu->kvm, gfn);
503 sp = page_header(__pa(spte)); 507 sp = page_header(__pa(spte));
504 sp->gfns[spte - sp->spt] = gfn; 508 sp->gfns[spte - sp->spt] = gfn;
@@ -515,8 +519,10 @@ static void rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn, int lpage)
515 } else { 519 } else {
516 rmap_printk("rmap_add: %p %llx many->many\n", spte, *spte); 520 rmap_printk("rmap_add: %p %llx many->many\n", spte, *spte);
517 desc = (struct kvm_rmap_desc *)(*rmapp & ~1ul); 521 desc = (struct kvm_rmap_desc *)(*rmapp & ~1ul);
518 while (desc->shadow_ptes[RMAP_EXT-1] && desc->more) 522 while (desc->shadow_ptes[RMAP_EXT-1] && desc->more) {
519 desc = desc->more; 523 desc = desc->more;
524 count += RMAP_EXT;
525 }
520 if (desc->shadow_ptes[RMAP_EXT-1]) { 526 if (desc->shadow_ptes[RMAP_EXT-1]) {
521 desc->more = mmu_alloc_rmap_desc(vcpu); 527 desc->more = mmu_alloc_rmap_desc(vcpu);
522 desc = desc->more; 528 desc = desc->more;
@@ -525,6 +531,7 @@ static void rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn, int lpage)
525 ; 531 ;
526 desc->shadow_ptes[i] = spte; 532 desc->shadow_ptes[i] = spte;
527 } 533 }
534 return count;
528} 535}
529 536
530static void rmap_desc_remove_entry(unsigned long *rmapp, 537static void rmap_desc_remove_entry(unsigned long *rmapp,
@@ -754,6 +761,19 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp)
754 return young; 761 return young;
755} 762}
756 763
764#define RMAP_RECYCLE_THRESHOLD 1000
765
766static void rmap_recycle(struct kvm_vcpu *vcpu, gfn_t gfn, int lpage)
767{
768 unsigned long *rmapp;
769
770 gfn = unalias_gfn(vcpu->kvm, gfn);
771 rmapp = gfn_to_rmap(vcpu->kvm, gfn, lpage);
772
773 kvm_unmap_rmapp(vcpu->kvm, rmapp);
774 kvm_flush_remote_tlbs(vcpu->kvm);
775}
776
757int kvm_age_hva(struct kvm *kvm, unsigned long hva) 777int kvm_age_hva(struct kvm *kvm, unsigned long hva)
758{ 778{
759 return kvm_handle_hva(kvm, hva, kvm_age_rmapp); 779 return kvm_handle_hva(kvm, hva, kvm_age_rmapp);
@@ -1407,24 +1427,25 @@ static int kvm_mmu_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp)
1407 */ 1427 */
1408void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages) 1428void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages)
1409{ 1429{
1430 int used_pages;
1431
1432 used_pages = kvm->arch.n_alloc_mmu_pages - kvm->arch.n_free_mmu_pages;
1433 used_pages = max(0, used_pages);
1434
1410 /* 1435 /*
1411 * If we set the number of mmu pages to be smaller be than the 1436 * If we set the number of mmu pages to be smaller be than the
1412 * number of actived pages , we must to free some mmu pages before we 1437 * number of actived pages , we must to free some mmu pages before we
1413 * change the value 1438 * change the value
1414 */ 1439 */
1415 1440
1416 if ((kvm->arch.n_alloc_mmu_pages - kvm->arch.n_free_mmu_pages) > 1441 if (used_pages > kvm_nr_mmu_pages) {
1417 kvm_nr_mmu_pages) { 1442 while (used_pages > kvm_nr_mmu_pages) {
1418 int n_used_mmu_pages = kvm->arch.n_alloc_mmu_pages
1419 - kvm->arch.n_free_mmu_pages;
1420
1421 while (n_used_mmu_pages > kvm_nr_mmu_pages) {
1422 struct kvm_mmu_page *page; 1443 struct kvm_mmu_page *page;
1423 1444
1424 page = container_of(kvm->arch.active_mmu_pages.prev, 1445 page = container_of(kvm->arch.active_mmu_pages.prev,
1425 struct kvm_mmu_page, link); 1446 struct kvm_mmu_page, link);
1426 kvm_mmu_zap_page(kvm, page); 1447 kvm_mmu_zap_page(kvm, page);
1427 n_used_mmu_pages--; 1448 used_pages--;
1428 } 1449 }
1429 kvm->arch.n_free_mmu_pages = 0; 1450 kvm->arch.n_free_mmu_pages = 0;
1430 } 1451 }
@@ -1740,6 +1761,7 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
1740{ 1761{
1741 int was_rmapped = 0; 1762 int was_rmapped = 0;
1742 int was_writeble = is_writeble_pte(*shadow_pte); 1763 int was_writeble = is_writeble_pte(*shadow_pte);
1764 int rmap_count;
1743 1765
1744 pgprintk("%s: spte %llx access %x write_fault %d" 1766 pgprintk("%s: spte %llx access %x write_fault %d"
1745 " user_fault %d gfn %lx\n", 1767 " user_fault %d gfn %lx\n",
@@ -1781,9 +1803,11 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
1781 1803
1782 page_header_update_slot(vcpu->kvm, shadow_pte, gfn); 1804 page_header_update_slot(vcpu->kvm, shadow_pte, gfn);
1783 if (!was_rmapped) { 1805 if (!was_rmapped) {
1784 rmap_add(vcpu, shadow_pte, gfn, largepage); 1806 rmap_count = rmap_add(vcpu, shadow_pte, gfn, largepage);
1785 if (!is_rmap_pte(*shadow_pte)) 1807 if (!is_rmap_pte(*shadow_pte))
1786 kvm_release_pfn_clean(pfn); 1808 kvm_release_pfn_clean(pfn);
1809 if (rmap_count > RMAP_RECYCLE_THRESHOLD)
1810 rmap_recycle(vcpu, gfn, largepage);
1787 } else { 1811 } else {
1788 if (was_writeble) 1812 if (was_writeble)
1789 kvm_release_pfn_dirty(pfn); 1813 kvm_release_pfn_dirty(pfn);
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 71510e07e69e..b1f658ad2f06 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -711,6 +711,7 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
711 svm->vmcb->control.tsc_offset += delta; 711 svm->vmcb->control.tsc_offset += delta;
712 vcpu->cpu = cpu; 712 vcpu->cpu = cpu;
713 kvm_migrate_timers(vcpu); 713 kvm_migrate_timers(vcpu);
714 svm->asid_generation = 0;
714 } 715 }
715 716
716 for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++) 717 for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++)
@@ -1031,7 +1032,6 @@ static void new_asid(struct vcpu_svm *svm, struct svm_cpu_data *svm_data)
1031 svm->vmcb->control.tlb_ctl = TLB_CONTROL_FLUSH_ALL_ASID; 1032 svm->vmcb->control.tlb_ctl = TLB_CONTROL_FLUSH_ALL_ASID;
1032 } 1033 }
1033 1034
1034 svm->vcpu.cpu = svm_data->cpu;
1035 svm->asid_generation = svm_data->asid_generation; 1035 svm->asid_generation = svm_data->asid_generation;
1036 svm->vmcb->control.asid = svm_data->next_asid++; 1036 svm->vmcb->control.asid = svm_data->next_asid++;
1037} 1037}
@@ -2300,8 +2300,8 @@ static void pre_svm_run(struct vcpu_svm *svm)
2300 struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu); 2300 struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu);
2301 2301
2302 svm->vmcb->control.tlb_ctl = TLB_CONTROL_DO_NOTHING; 2302 svm->vmcb->control.tlb_ctl = TLB_CONTROL_DO_NOTHING;
2303 if (svm->vcpu.cpu != cpu || 2303 /* FIXME: handle wraparound of asid_generation */
2304 svm->asid_generation != svm_data->asid_generation) 2304 if (svm->asid_generation != svm_data->asid_generation)
2305 new_asid(svm, svm_data); 2305 new_asid(svm, svm_data);
2306} 2306}
2307 2307
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 356a0ce85c68..29f912927a58 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3157,8 +3157,8 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
3157 struct vcpu_vmx *vmx = to_vmx(vcpu); 3157 struct vcpu_vmx *vmx = to_vmx(vcpu);
3158 enum emulation_result err = EMULATE_DONE; 3158 enum emulation_result err = EMULATE_DONE;
3159 3159
3160 preempt_enable();
3161 local_irq_enable(); 3160 local_irq_enable();
3161 preempt_enable();
3162 3162
3163 while (!guest_state_valid(vcpu)) { 3163 while (!guest_state_valid(vcpu)) {
3164 err = emulate_instruction(vcpu, kvm_run, 0, 0, 0); 3164 err = emulate_instruction(vcpu, kvm_run, 0, 0, 0);
@@ -3168,7 +3168,7 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
3168 3168
3169 if (err != EMULATE_DONE) { 3169 if (err != EMULATE_DONE) {
3170 kvm_report_emulation_failure(vcpu, "emulation failure"); 3170 kvm_report_emulation_failure(vcpu, "emulation failure");
3171 return; 3171 break;
3172 } 3172 }
3173 3173
3174 if (signal_pending(current)) 3174 if (signal_pending(current))
@@ -3177,8 +3177,8 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
3177 schedule(); 3177 schedule();
3178 } 3178 }
3179 3179
3180 local_irq_disable();
3181 preempt_disable(); 3180 preempt_disable();
3181 local_irq_disable();
3182 3182
3183 vmx->invalid_state_emulation_result = err; 3183 vmx->invalid_state_emulation_result = err;
3184} 3184}
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index fe5474aec41a..3d4529011828 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -704,11 +704,48 @@ static bool msr_mtrr_valid(unsigned msr)
704 return false; 704 return false;
705} 705}
706 706
707static bool valid_pat_type(unsigned t)
708{
709 return t < 8 && (1 << t) & 0xf3; /* 0, 1, 4, 5, 6, 7 */
710}
711
712static bool valid_mtrr_type(unsigned t)
713{
714 return t < 8 && (1 << t) & 0x73; /* 0, 1, 4, 5, 6 */
715}
716
717static bool mtrr_valid(struct kvm_vcpu *vcpu, u32 msr, u64 data)
718{
719 int i;
720
721 if (!msr_mtrr_valid(msr))
722 return false;
723
724 if (msr == MSR_IA32_CR_PAT) {
725 for (i = 0; i < 8; i++)
726 if (!valid_pat_type((data >> (i * 8)) & 0xff))
727 return false;
728 return true;
729 } else if (msr == MSR_MTRRdefType) {
730 if (data & ~0xcff)
731 return false;
732 return valid_mtrr_type(data & 0xff);
733 } else if (msr >= MSR_MTRRfix64K_00000 && msr <= MSR_MTRRfix4K_F8000) {
734 for (i = 0; i < 8 ; i++)
735 if (!valid_mtrr_type((data >> (i * 8)) & 0xff))
736 return false;
737 return true;
738 }
739
740 /* variable MTRRs */
741 return valid_mtrr_type(data & 0xff);
742}
743
707static int set_msr_mtrr(struct kvm_vcpu *vcpu, u32 msr, u64 data) 744static int set_msr_mtrr(struct kvm_vcpu *vcpu, u32 msr, u64 data)
708{ 745{
709 u64 *p = (u64 *)&vcpu->arch.mtrr_state.fixed_ranges; 746 u64 *p = (u64 *)&vcpu->arch.mtrr_state.fixed_ranges;
710 747
711 if (!msr_mtrr_valid(msr)) 748 if (!mtrr_valid(vcpu, msr, data))
712 return 1; 749 return 1;
713 750
714 if (msr == MSR_MTRRdefType) { 751 if (msr == MSR_MTRRdefType) {
@@ -1079,14 +1116,13 @@ long kvm_arch_dev_ioctl(struct file *filp,
1079 if (copy_to_user(user_msr_list, &msr_list, sizeof msr_list)) 1116 if (copy_to_user(user_msr_list, &msr_list, sizeof msr_list))
1080 goto out; 1117 goto out;
1081 r = -E2BIG; 1118 r = -E2BIG;
1082 if (n < num_msrs_to_save) 1119 if (n < msr_list.nmsrs)
1083 goto out; 1120 goto out;
1084 r = -EFAULT; 1121 r = -EFAULT;
1085 if (copy_to_user(user_msr_list->indices, &msrs_to_save, 1122 if (copy_to_user(user_msr_list->indices, &msrs_to_save,
1086 num_msrs_to_save * sizeof(u32))) 1123 num_msrs_to_save * sizeof(u32)))
1087 goto out; 1124 goto out;
1088 if (copy_to_user(user_msr_list->indices 1125 if (copy_to_user(user_msr_list->indices + num_msrs_to_save,
1089 + num_msrs_to_save * sizeof(u32),
1090 &emulated_msrs, 1126 &emulated_msrs,
1091 ARRAY_SIZE(emulated_msrs) * sizeof(u32))) 1127 ARRAY_SIZE(emulated_msrs) * sizeof(u32)))
1092 goto out; 1128 goto out;