aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/common/sa1111.c9
-rw-r--r--arch/arm/mach-msm/dma.c1
-rw-r--r--arch/arm/mach-nomadik/clock.c11
-rw-r--r--arch/arm/mach-nomadik/clock.h2
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c8
-rw-r--r--arch/arm/mach-pxa/palmtc.c4
-rw-r--r--arch/arm/mach-pxa/spitz.c3
-rw-r--r--arch/arm/mach-ux500/Makefile3
-rw-r--r--arch/arm/mach-ux500/clock.c104
-rw-r--r--arch/arm/mach-ux500/clock.h22
-rw-r--r--arch/arm/mach-ux500/cpu.c6
-rw-r--r--arch/arm/mm/copypage-feroceon.c4
-rw-r--r--arch/arm/mm/copypage-v4wb.c4
-rw-r--r--arch/arm/mm/copypage-v4wt.c4
-rw-r--r--arch/arm/mm/copypage-xsc3.c4
-rw-r--r--arch/arm/mm/fault.c3
-rw-r--r--arch/arm/mm/highmem.c11
-rw-r--r--arch/arm/mm/init.c6
-rw-r--r--arch/arm/plat-nomadik/timer.c26
-rw-r--r--arch/arm/vfp/vfphw.S2
-rw-r--r--arch/frv/kernel/gdb-stub.c6
-rw-r--r--arch/ia64/kvm/kvm-ia64.c1
-rw-r--r--arch/microblaze/include/asm/page.h2
-rw-r--r--arch/microblaze/kernel/dma.c1
-rw-r--r--arch/microblaze/pci/pci-common.c1
-rw-r--r--arch/mn10300/unit-asb2305/pci-asb2305.c1
-rw-r--r--arch/powerpc/kernel/pci-common.c1
-rw-r--r--arch/powerpc/kvm/e500.c2
-rw-r--r--arch/powerpc/oprofile/op_model_cell.c2
-rw-r--r--arch/s390/appldata/appldata_os.c2
-rw-r--r--arch/s390/defconfig23
-rw-r--r--arch/s390/kernel/module.c6
-rw-r--r--arch/s390/kvm/kvm-s390.c2
-rw-r--r--arch/s390/kvm/sigp.c2
-rw-r--r--arch/s390/mm/extmem.c19
-rw-r--r--arch/x86/include/asm/msr-index.h1
-rw-r--r--arch/x86/include/asm/suspend_32.h2
-rw-r--r--arch/x86/include/asm/suspend_64.h2
-rw-r--r--arch/x86/kvm/mmu.c5
-rw-r--r--arch/x86/kvm/svm.c96
-rw-r--r--arch/x86/pci/i386.c2
-rw-r--r--arch/x86/power/cpu.c4
42 files changed, 362 insertions, 58 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index a52a27c1d9be..6f80665f477e 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -951,8 +951,6 @@ static int sa1111_resume(struct platform_device *dev)
951 if (!save) 951 if (!save)
952 return 0; 952 return 0;
953 953
954 spin_lock_irqsave(&sachip->lock, flags);
955
956 /* 954 /*
957 * Ensure that the SA1111 is still here. 955 * Ensure that the SA1111 is still here.
958 * FIXME: shouldn't do this here. 956 * FIXME: shouldn't do this here.
@@ -969,6 +967,13 @@ static int sa1111_resume(struct platform_device *dev)
969 * First of all, wake up the chip. 967 * First of all, wake up the chip.
970 */ 968 */
971 sa1111_wake(sachip); 969 sa1111_wake(sachip);
970
971 /*
972 * Only lock for write ops. Also, sa1111_wake must be called with
973 * released spinlock!
974 */
975 spin_lock_irqsave(&sachip->lock, flags);
976
972 sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN0); 977 sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN0);
973 sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN1); 978 sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN1);
974 979
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c
index d029d1f5f9e2..02cae5e2951c 100644
--- a/arch/arm/mach-msm/dma.c
+++ b/arch/arm/mach-msm/dma.c
@@ -17,6 +17,7 @@
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/completion.h>
20#include <mach/dma.h> 21#include <mach/dma.h>
21 22
22#define MSM_DMOV_CHANNEL_COUNT 16 23#define MSM_DMOV_CHANNEL_COUNT 16
diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c
index 2c471fc451d7..f035f4185274 100644
--- a/arch/arm/mach-nomadik/clock.c
+++ b/arch/arm/mach-nomadik/clock.c
@@ -32,7 +32,10 @@ void clk_disable(struct clk *clk)
32} 32}
33EXPORT_SYMBOL(clk_disable); 33EXPORT_SYMBOL(clk_disable);
34 34
35/* We have a fixed clock alone, for now */ 35static struct clk clk_24 = {
36 .rate = 2400000,
37};
38
36static struct clk clk_48 = { 39static struct clk clk_48 = {
37 .rate = 48 * 1000 * 1000, 40 .rate = 48 * 1000 * 1000,
38}; 41};
@@ -50,6 +53,8 @@ static struct clk clk_default;
50 } 53 }
51 54
52static struct clk_lookup lookups[] = { 55static struct clk_lookup lookups[] = {
56 CLK(&clk_24, "mtu0"),
57 CLK(&clk_24, "mtu1"),
53 CLK(&clk_48, "uart0"), 58 CLK(&clk_48, "uart0"),
54 CLK(&clk_48, "uart1"), 59 CLK(&clk_48, "uart1"),
55 CLK(&clk_default, "gpio.0"), 60 CLK(&clk_default, "gpio.0"),
@@ -59,10 +64,8 @@ static struct clk_lookup lookups[] = {
59 CLK(&clk_default, "rng"), 64 CLK(&clk_default, "rng"),
60}; 65};
61 66
62static int __init clk_init(void) 67int __init clk_init(void)
63{ 68{
64 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 69 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
65 return 0; 70 return 0;
66} 71}
67
68arch_initcall(clk_init);
diff --git a/arch/arm/mach-nomadik/clock.h b/arch/arm/mach-nomadik/clock.h
index 5563985a2cc7..78da2e7c3985 100644
--- a/arch/arm/mach-nomadik/clock.h
+++ b/arch/arm/mach-nomadik/clock.h
@@ -11,3 +11,5 @@
11struct clk { 11struct clk {
12 unsigned long rate; 12 unsigned long rate;
13}; 13};
14
15int __init clk_init(void);
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 91c3c901b469..ac58e3b03b1a 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -31,6 +31,8 @@
31#include <asm/cacheflush.h> 31#include <asm/cacheflush.h>
32#include <asm/hardware/cache-l2x0.h> 32#include <asm/hardware/cache-l2x0.h>
33 33
34#include "clock.h"
35
34#define __MEM_4K_RESOURCE(x) \ 36#define __MEM_4K_RESOURCE(x) \
35 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} 37 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
36 38
@@ -143,6 +145,12 @@ void __init cpu8815_init_irq(void)
143 /* This modified VIC cell has two register blocks, at 0 and 0x20 */ 145 /* This modified VIC cell has two register blocks, at 0 and 0x20 */
144 vic_init(io_p2v(NOMADIK_IC_BASE + 0x00), IRQ_VIC_START + 0, ~0, 0); 146 vic_init(io_p2v(NOMADIK_IC_BASE + 0x00), IRQ_VIC_START + 0, ~0, 0);
145 vic_init(io_p2v(NOMADIK_IC_BASE + 0x20), IRQ_VIC_START + 32, ~0, 0); 147 vic_init(io_p2v(NOMADIK_IC_BASE + 0x20), IRQ_VIC_START + 32, ~0, 0);
148
149 /*
150 * Init clocks here so that they are available for system timer
151 * initialization.
152 */
153 clk_init();
146} 154}
147 155
148/* 156/*
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 033b567e50bb..ce1104d1bc17 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -263,11 +263,11 @@ const struct matrix_keymap_data palmtc_keymap_data = {
263 .keymap_size = ARRAY_SIZE(palmtc_matrix_keys), 263 .keymap_size = ARRAY_SIZE(palmtc_matrix_keys),
264}; 264};
265 265
266const static unsigned int palmtc_keypad_row_gpios[] = { 266static const unsigned int palmtc_keypad_row_gpios[] = {
267 0, 9, 10, 11 267 0, 9, 10, 11
268}; 268};
269 269
270const static unsigned int palmtc_keypad_col_gpios[] = { 270static const unsigned int palmtc_keypad_col_gpios[] = {
271 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 79, 80 271 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 79, 80
272}; 272};
273 273
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 4d2413ed0ffa..c1048a35f187 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -818,6 +818,9 @@ static struct i2c_board_info akita_i2c_board_info[] = {
818 .type = "max7310", 818 .type = "max7310",
819 .addr = 0x18, 819 .addr = 0x18,
820 .platform_data = &akita_ioexp, 820 .platform_data = &akita_ioexp,
821 }, {
822 .type = "wm8750",
823 .addr = 0x1b,
821 }, 824 },
822}; 825};
823 826
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index c7bc4199e3a8..4556aea9c3c5 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -7,4 +7,5 @@ obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o devices-db5500.o
7obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o 7obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
8obj-$(CONFIG_MACH_U8500_MOP) += board-mop500.o 8obj-$(CONFIG_MACH_U8500_MOP) += board-mop500.o
9obj-$(CONFIG_MACH_U5500) += board-u5500.o 9obj-$(CONFIG_MACH_U5500) += board-u5500.o
10obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o 10obj-$(CONFIG_SMP) += platsmp.o headsmp.o
11obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 6544855af2f1..fe84b9021c7a 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -16,6 +16,7 @@
16 16
17#include <asm/clkdev.h> 17#include <asm/clkdev.h>
18 18
19#include <plat/mtu.h>
19#include <mach/hardware.h> 20#include <mach/hardware.h>
20#include "clock.h" 21#include "clock.h"
21 22
@@ -59,6 +60,9 @@
59#define PRCM_DMACLK_MGT 0x074 60#define PRCM_DMACLK_MGT 0x074
60#define PRCM_B2R2CLK_MGT 0x078 61#define PRCM_B2R2CLK_MGT 0x078
61#define PRCM_TVCLK_MGT 0x07C 62#define PRCM_TVCLK_MGT 0x07C
63#define PRCM_TCR 0x1C8
64#define PRCM_TCR_STOPPED (1 << 16)
65#define PRCM_TCR_DOZE_MODE (1 << 17)
62#define PRCM_UNIPROCLK_MGT 0x278 66#define PRCM_UNIPROCLK_MGT 0x278
63#define PRCM_SSPCLK_MGT 0x280 67#define PRCM_SSPCLK_MGT 0x280
64#define PRCM_RNGCLK_MGT 0x284 68#define PRCM_RNGCLK_MGT 0x284
@@ -120,10 +124,95 @@ void clk_disable(struct clk *clk)
120} 124}
121EXPORT_SYMBOL(clk_disable); 125EXPORT_SYMBOL(clk_disable);
122 126
127/*
128 * The MTU has a separate, rather complex muxing setup
129 * with alternative parents (peripheral cluster or
130 * ULP or fixed 32768 Hz) depending on settings
131 */
132static unsigned long clk_mtu_get_rate(struct clk *clk)
133{
134 void __iomem *addr = __io_address(U8500_PRCMU_BASE)
135 + PRCM_TCR;
136 u32 tcr = readl(addr);
137 int mtu = (int) clk->data;
138 /*
139 * One of these is selected eventually
140 * TODO: Replace the constant with a reference
141 * to the ULP source once this is modeled.
142 */
143 unsigned long clk32k = 32768;
144 unsigned long mturate;
145 unsigned long retclk;
146
147 /* Get the rate from the parent as a default */
148 if (clk->parent_periph)
149 mturate = clk_get_rate(clk->parent_periph);
150 else if (clk->parent_cluster)
151 mturate = clk_get_rate(clk->parent_cluster);
152 else
153 /* We need to be connected SOMEWHERE */
154 BUG();
155
156 /*
157 * Are we in doze mode?
158 * In this mode the parent peripheral or the fixed 32768 Hz
159 * clock is fed into the block.
160 */
161 if (!(tcr & PRCM_TCR_DOZE_MODE)) {
162 /*
163 * Here we're using the clock input from the APE ULP
164 * clock domain. But first: are the timers stopped?
165 */
166 if (tcr & PRCM_TCR_STOPPED) {
167 clk32k = 0;
168 mturate = 0;
169 } else {
170 /* Else default mode: 0 and 2.4 MHz */
171 clk32k = 0;
172 if (cpu_is_u5500())
173 /* DB5500 divides by 8 */
174 mturate /= 8;
175 else if (cpu_is_u8500ed()) {
176 /*
177 * This clocking setting must not be used
178 * in the ED chip, it is simply not
179 * connected anywhere!
180 */
181 mturate = 0;
182 BUG();
183 } else
184 /*
185 * In this mode the ulp38m4 clock is divided
186 * by a factor 16, on the DB8500 typically
187 * 38400000 / 16 ~ 2.4 MHz.
188 * TODO: Replace the constant with a reference
189 * to the ULP source once this is modeled.
190 */
191 mturate = 38400000 / 16;
192 }
193 }
194
195 /* Return the clock selected for this MTU */
196 if (tcr & (1 << mtu))
197 retclk = clk32k;
198 else
199 retclk = mturate;
200
201 pr_info("MTU%d clock rate: %lu Hz\n", mtu, retclk);
202 return retclk;
203}
204
123unsigned long clk_get_rate(struct clk *clk) 205unsigned long clk_get_rate(struct clk *clk)
124{ 206{
125 unsigned long rate; 207 unsigned long rate;
126 208
209 /*
210 * If there is a custom getrate callback for this clock,
211 * it will take precedence.
212 */
213 if (clk->get_rate)
214 return clk->get_rate(clk);
215
127 if (clk->ops && clk->ops->get_rate) 216 if (clk->ops && clk->ops->get_rate)
128 return clk->ops->get_rate(clk); 217 return clk->ops->get_rate(clk);
129 218
@@ -341,8 +430,9 @@ static DEFINE_PRCC_CLK(5, usb_v1, 0, 0, NULL);
341 430
342/* Peripheral Cluster #6 */ 431/* Peripheral Cluster #6 */
343 432
344static DEFINE_PRCC_CLK(6, mtu1_v1, 8, -1, NULL); 433/* MTU ID in data */
345static DEFINE_PRCC_CLK(6, mtu0_v1, 7, -1, NULL); 434static DEFINE_PRCC_CLK_CUSTOM(6, mtu1_v1, 8, -1, NULL, clk_mtu_get_rate, 1);
435static DEFINE_PRCC_CLK_CUSTOM(6, mtu0_v1, 7, -1, NULL, clk_mtu_get_rate, 0);
346static DEFINE_PRCC_CLK(6, cfgreg_v1, 6, 6, NULL); 436static DEFINE_PRCC_CLK(6, cfgreg_v1, 6, 6, NULL);
347static DEFINE_PRCC_CLK(6, dmc_ed, 6, 6, NULL); 437static DEFINE_PRCC_CLK(6, dmc_ed, 6, 6, NULL);
348static DEFINE_PRCC_CLK(6, hash1, 5, -1, NULL); 438static DEFINE_PRCC_CLK(6, hash1, 5, -1, NULL);
@@ -357,8 +447,9 @@ static DEFINE_PRCC_CLK(6, rng_v1, 0, 0, &clk_rngclk);
357/* Peripheral Cluster #7 */ 447/* Peripheral Cluster #7 */
358 448
359static DEFINE_PRCC_CLK(7, tzpc0_ed, 4, -1, NULL); 449static DEFINE_PRCC_CLK(7, tzpc0_ed, 4, -1, NULL);
360static DEFINE_PRCC_CLK(7, mtu1_ed, 3, -1, NULL); 450/* MTU ID in data */
361static DEFINE_PRCC_CLK(7, mtu0_ed, 2, -1, NULL); 451static DEFINE_PRCC_CLK_CUSTOM(7, mtu1_ed, 3, -1, NULL, clk_mtu_get_rate, 1);
452static DEFINE_PRCC_CLK_CUSTOM(7, mtu0_ed, 2, -1, NULL, clk_mtu_get_rate, 0);
362static DEFINE_PRCC_CLK(7, wdg_ed, 1, -1, NULL); 453static DEFINE_PRCC_CLK(7, wdg_ed, 1, -1, NULL);
363static DEFINE_PRCC_CLK(7, cfgreg_ed, 0, -1, NULL); 454static DEFINE_PRCC_CLK(7, cfgreg_ed, 0, -1, NULL);
364 455
@@ -503,15 +594,17 @@ static struct clk_lookup u8500_v1_clks[] = {
503 CLK(uiccclk, "uicc", NULL), 594 CLK(uiccclk, "uicc", NULL),
504}; 595};
505 596
506static int __init clk_init(void) 597int __init clk_init(void)
507{ 598{
508 if (cpu_is_u8500ed()) { 599 if (cpu_is_u8500ed()) {
509 clk_prcmu_ops.enable = clk_prcmu_ed_enable; 600 clk_prcmu_ops.enable = clk_prcmu_ed_enable;
510 clk_prcmu_ops.disable = clk_prcmu_ed_disable; 601 clk_prcmu_ops.disable = clk_prcmu_ed_disable;
602 clk_per6clk.rate = 100000000;
511 } else if (cpu_is_u5500()) { 603 } else if (cpu_is_u5500()) {
512 /* Clock tree for U5500 not implemented yet */ 604 /* Clock tree for U5500 not implemented yet */
513 clk_prcc_ops.enable = clk_prcc_ops.disable = NULL; 605 clk_prcc_ops.enable = clk_prcc_ops.disable = NULL;
514 clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL; 606 clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL;
607 clk_per6clk.rate = 26000000;
515 } 608 }
516 609
517 clkdev_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks)); 610 clkdev_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks));
@@ -522,4 +615,3 @@ static int __init clk_init(void)
522 615
523 return 0; 616 return 0;
524} 617}
525arch_initcall(clk_init);
diff --git a/arch/arm/mach-ux500/clock.h b/arch/arm/mach-ux500/clock.h
index e4f99b65026f..a05802501527 100644
--- a/arch/arm/mach-ux500/clock.h
+++ b/arch/arm/mach-ux500/clock.h
@@ -28,6 +28,9 @@ struct clkops {
28 * @ops: pointer to clkops struct used to control this clock 28 * @ops: pointer to clkops struct used to control this clock
29 * @name: name, for debugging 29 * @name: name, for debugging
30 * @enabled: refcount. positive if enabled, zero if disabled 30 * @enabled: refcount. positive if enabled, zero if disabled
31 * @get_rate: custom callback for getting the clock rate
32 * @data: custom per-clock data for example for the get_rate
33 * callback
31 * @rate: fixed rate for clocks which don't implement 34 * @rate: fixed rate for clocks which don't implement
32 * ops->getrate 35 * ops->getrate
33 * @prcmu_cg_off: address offset of the combined enable/disable register 36 * @prcmu_cg_off: address offset of the combined enable/disable register
@@ -67,6 +70,8 @@ struct clk {
67 const struct clkops *ops; 70 const struct clkops *ops;
68 const char *name; 71 const char *name;
69 unsigned int enabled; 72 unsigned int enabled;
73 unsigned long (*get_rate)(struct clk *);
74 void *data;
70 75
71 unsigned long rate; 76 unsigned long rate;
72 struct list_head list; 77 struct list_head list;
@@ -117,9 +122,26 @@ struct clk clk_##_name = { \
117 .parent_periph = _kernclk \ 122 .parent_periph = _kernclk \
118 } 123 }
119 124
125#define DEFINE_PRCC_CLK_CUSTOM(_pclust, _name, _bus_en, _kernel_en, _kernclk, _callback, _data) \
126struct clk clk_##_name = { \
127 .name = #_name, \
128 .ops = &clk_prcc_ops, \
129 .cluster = _pclust, \
130 .prcc_bus = _bus_en, \
131 .prcc_kernel = _kernel_en, \
132 .parent_cluster = &clk_per##_pclust##clk, \
133 .parent_periph = _kernclk, \
134 .get_rate = _callback, \
135 .data = (void *) _data \
136 }
137
138
120#define CLK(_clk, _devname, _conname) \ 139#define CLK(_clk, _devname, _conname) \
121 { \ 140 { \
122 .clk = &clk_##_clk, \ 141 .clk = &clk_##_clk, \
123 .dev_id = _devname, \ 142 .dev_id = _devname, \
124 .con_id = _conname, \ 143 .con_id = _conname, \
125 } 144 }
145
146int __init clk_db8500_ed_fixup(void);
147int __init clk_init(void);
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index d81ad023963c..e0fd747e447a 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -62,6 +62,12 @@ void __init ux500_init_irq(void)
62{ 62{
63 gic_dist_init(0, __io_address(UX500_GIC_DIST_BASE), 29); 63 gic_dist_init(0, __io_address(UX500_GIC_DIST_BASE), 29);
64 gic_cpu_init(0, __io_address(UX500_GIC_CPU_BASE)); 64 gic_cpu_init(0, __io_address(UX500_GIC_CPU_BASE));
65
66 /*
67 * Init clocks here so that they are available for system timer
68 * initialization.
69 */
70 clk_init();
65} 71}
66 72
67#ifdef CONFIG_CACHE_L2X0 73#ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c
index 5eb4fd93893d..ac163de7dc01 100644
--- a/arch/arm/mm/copypage-feroceon.c
+++ b/arch/arm/mm/copypage-feroceon.c
@@ -18,7 +18,7 @@ feroceon_copy_user_page(void *kto, const void *kfrom)
18{ 18{
19 asm("\ 19 asm("\
20 stmfd sp!, {r4-r9, lr} \n\ 20 stmfd sp!, {r4-r9, lr} \n\
21 mov ip, %0 \n\ 21 mov ip, %2 \n\
221: mov lr, r1 \n\ 221: mov lr, r1 \n\
23 ldmia r1!, {r2 - r9} \n\ 23 ldmia r1!, {r2 - r9} \n\
24 pld [lr, #32] \n\ 24 pld [lr, #32] \n\
@@ -64,7 +64,7 @@ feroceon_copy_user_page(void *kto, const void *kfrom)
64 mcr p15, 0, ip, c7, c10, 4 @ drain WB\n\ 64 mcr p15, 0, ip, c7, c10, 4 @ drain WB\n\
65 ldmfd sp!, {r4-r9, pc}" 65 ldmfd sp!, {r4-r9, pc}"
66 : 66 :
67 : "I" (PAGE_SIZE)); 67 : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE));
68} 68}
69 69
70void feroceon_copy_user_highpage(struct page *to, struct page *from, 70void feroceon_copy_user_highpage(struct page *to, struct page *from,
diff --git a/arch/arm/mm/copypage-v4wb.c b/arch/arm/mm/copypage-v4wb.c
index 7c2eb55cd4a9..cb589cbb2b6c 100644
--- a/arch/arm/mm/copypage-v4wb.c
+++ b/arch/arm/mm/copypage-v4wb.c
@@ -27,7 +27,7 @@ v4wb_copy_user_page(void *kto, const void *kfrom)
27{ 27{
28 asm("\ 28 asm("\
29 stmfd sp!, {r4, lr} @ 2\n\ 29 stmfd sp!, {r4, lr} @ 2\n\
30 mov r2, %0 @ 1\n\ 30 mov r2, %2 @ 1\n\
31 ldmia r1!, {r3, r4, ip, lr} @ 4\n\ 31 ldmia r1!, {r3, r4, ip, lr} @ 4\n\
321: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\ 321: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\
33 stmia r0!, {r3, r4, ip, lr} @ 4\n\ 33 stmia r0!, {r3, r4, ip, lr} @ 4\n\
@@ -44,7 +44,7 @@ v4wb_copy_user_page(void *kto, const void *kfrom)
44 mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB\n\ 44 mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB\n\
45 ldmfd sp!, {r4, pc} @ 3" 45 ldmfd sp!, {r4, pc} @ 3"
46 : 46 :
47 : "I" (PAGE_SIZE / 64)); 47 : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64));
48} 48}
49 49
50void v4wb_copy_user_highpage(struct page *to, struct page *from, 50void v4wb_copy_user_highpage(struct page *to, struct page *from,
diff --git a/arch/arm/mm/copypage-v4wt.c b/arch/arm/mm/copypage-v4wt.c
index 172e6a55458e..30c7d048a324 100644
--- a/arch/arm/mm/copypage-v4wt.c
+++ b/arch/arm/mm/copypage-v4wt.c
@@ -25,7 +25,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom)
25{ 25{
26 asm("\ 26 asm("\
27 stmfd sp!, {r4, lr} @ 2\n\ 27 stmfd sp!, {r4, lr} @ 2\n\
28 mov r2, %0 @ 1\n\ 28 mov r2, %2 @ 1\n\
29 ldmia r1!, {r3, r4, ip, lr} @ 4\n\ 29 ldmia r1!, {r3, r4, ip, lr} @ 4\n\
301: stmia r0!, {r3, r4, ip, lr} @ 4\n\ 301: stmia r0!, {r3, r4, ip, lr} @ 4\n\
31 ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\ 31 ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\
@@ -40,7 +40,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom)
40 mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\ 40 mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\
41 ldmfd sp!, {r4, pc} @ 3" 41 ldmfd sp!, {r4, pc} @ 3"
42 : 42 :
43 : "I" (PAGE_SIZE / 64)); 43 : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64));
44} 44}
45 45
46void v4wt_copy_user_highpage(struct page *to, struct page *from, 46void v4wt_copy_user_highpage(struct page *to, struct page *from,
diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c
index 747ad4140fc7..f9cde0702f1e 100644
--- a/arch/arm/mm/copypage-xsc3.c
+++ b/arch/arm/mm/copypage-xsc3.c
@@ -34,7 +34,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom)
34{ 34{
35 asm("\ 35 asm("\
36 stmfd sp!, {r4, r5, lr} \n\ 36 stmfd sp!, {r4, r5, lr} \n\
37 mov lr, %0 \n\ 37 mov lr, %2 \n\
38 \n\ 38 \n\
39 pld [r1, #0] \n\ 39 pld [r1, #0] \n\
40 pld [r1, #32] \n\ 40 pld [r1, #32] \n\
@@ -67,7 +67,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom)
67 \n\ 67 \n\
68 ldmfd sp!, {r4, r5, pc}" 68 ldmfd sp!, {r4, r5, pc}"
69 : 69 :
70 : "I" (PAGE_SIZE / 64 - 1)); 70 : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64 - 1));
71} 71}
72 72
73void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, 73void xsc3_mc_copy_user_highpage(struct page *to, struct page *from,
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 92f5801f99c1..cbfb2edcf7d1 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -393,6 +393,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
393 if (addr < TASK_SIZE) 393 if (addr < TASK_SIZE)
394 return do_page_fault(addr, fsr, regs); 394 return do_page_fault(addr, fsr, regs);
395 395
396 if (user_mode(regs))
397 goto bad_area;
398
396 index = pgd_index(addr); 399 index = pgd_index(addr);
397 400
398 /* 401 /*
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
index 77b030f5ec09..086816b205b8 100644
--- a/arch/arm/mm/highmem.c
+++ b/arch/arm/mm/highmem.c
@@ -48,7 +48,16 @@ void *kmap_atomic(struct page *page, enum km_type type)
48 48
49 debug_kmap_atomic(type); 49 debug_kmap_atomic(type);
50 50
51 kmap = kmap_high_get(page); 51#ifdef CONFIG_DEBUG_HIGHMEM
52 /*
53 * There is no cache coherency issue when non VIVT, so force the
54 * dedicated kmap usage for better debugging purposes in that case.
55 */
56 if (!cache_is_vivt())
57 kmap = NULL;
58 else
59#endif
60 kmap = kmap_high_get(page);
52 if (kmap) 61 if (kmap)
53 return kmap; 62 return kmap;
54 63
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 1ba6cf5a2c02..f6a999465323 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -678,10 +678,10 @@ void __init mem_init(void)
678void free_initmem(void) 678void free_initmem(void)
679{ 679{
680#ifdef CONFIG_HAVE_TCM 680#ifdef CONFIG_HAVE_TCM
681 extern char *__tcm_start, *__tcm_end; 681 extern char __tcm_start, __tcm_end;
682 682
683 totalram_pages += free_area(__phys_to_pfn(__pa(__tcm_start)), 683 totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
684 __phys_to_pfn(__pa(__tcm_end)), 684 __phys_to_pfn(__pa(&__tcm_end)),
685 "TCM link"); 685 "TCM link");
686#endif 686#endif
687 687
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c
index 0ff3798769ab..08aaa4a7f65f 100644
--- a/arch/arm/plat-nomadik/timer.c
+++ b/arch/arm/plat-nomadik/timer.c
@@ -13,7 +13,9 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/clockchips.h> 15#include <linux/clockchips.h>
16#include <linux/clk.h>
16#include <linux/jiffies.h> 17#include <linux/jiffies.h>
18#include <linux/err.h>
17#include <asm/mach/time.h> 19#include <asm/mach/time.h>
18 20
19#include <plat/mtu.h> 21#include <plat/mtu.h>
@@ -124,13 +126,25 @@ static struct irqaction nmdk_timer_irq = {
124void __init nmdk_timer_init(void) 126void __init nmdk_timer_init(void)
125{ 127{
126 unsigned long rate; 128 unsigned long rate;
127 u32 cr = MTU_CRn_32BITS;; 129 struct clk *clk0;
130 struct clk *clk1;
131 u32 cr;
132
133 clk0 = clk_get_sys("mtu0", NULL);
134 BUG_ON(IS_ERR(clk0));
135
136 clk1 = clk_get_sys("mtu1", NULL);
137 BUG_ON(IS_ERR(clk1));
138
139 clk_enable(clk0);
140 clk_enable(clk1);
128 141
129 /* 142 /*
130 * Tick rate is 2.4MHz for Nomadik and 110MHz for ux500: 143 * Tick rate is 2.4MHz for Nomadik and 110MHz for ux500:
131 * use a divide-by-16 counter if it's more than 16MHz 144 * use a divide-by-16 counter if it's more than 16MHz
132 */ 145 */
133 rate = CLOCK_TICK_RATE; 146 cr = MTU_CRn_32BITS;;
147 rate = clk_get_rate(clk0);
134 if (rate > 16 << 20) { 148 if (rate > 16 << 20) {
135 rate /= 16; 149 rate /= 16;
136 cr |= MTU_CRn_PRESCALE_16; 150 cr |= MTU_CRn_PRESCALE_16;
@@ -153,6 +167,14 @@ void __init nmdk_timer_init(void)
153 nmdk_clksrc.name); 167 nmdk_clksrc.name);
154 168
155 /* Timer 1 is used for events, fix according to rate */ 169 /* Timer 1 is used for events, fix according to rate */
170 cr = MTU_CRn_32BITS;
171 rate = clk_get_rate(clk1);
172 if (rate > 16 << 20) {
173 rate /= 16;
174 cr |= MTU_CRn_PRESCALE_16;
175 } else {
176 cr |= MTU_CRn_PRESCALE_1;
177 }
156 writel(cr | MTU_CRn_ONESHOT, mtu_base + MTU_CR(1)); /* off, currently */ 178 writel(cr | MTU_CRn_ONESHOT, mtu_base + MTU_CR(1)); /* off, currently */
157 nmdk_clkevt.mult = div_sc(rate, NSEC_PER_SEC, nmdk_clkevt.shift); 179 nmdk_clkevt.mult = div_sc(rate, NSEC_PER_SEC, nmdk_clkevt.shift);
158 nmdk_clkevt.max_delta_ns = 180 nmdk_clkevt.max_delta_ns =
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index 66dc2d03b7fc..d66cead97d28 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -277,7 +277,7 @@ ENTRY(vfp_put_double)
277#ifdef CONFIG_VFPv3 277#ifdef CONFIG_VFPv3
278 @ d16 - d31 registers 278 @ d16 - d31 registers
279 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 279 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
2801: mcrr p11, 3, r1, r2, c\dr @ fmdrr r1, r2, d\dr 2801: mcrr p11, 3, r0, r1, c\dr @ fmdrr r0, r1, d\dr
281 mov pc, lr 281 mov pc, lr
282 .org 1b + 8 282 .org 1b + 8
283 .endr 283 .endr
diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c
index 84d103c33c9c..a4dba6b20bd0 100644
--- a/arch/frv/kernel/gdb-stub.c
+++ b/arch/frv/kernel/gdb-stub.c
@@ -1789,6 +1789,12 @@ void gdbstub(int sigval)
1789 flush_cache = 1; 1789 flush_cache = 1;
1790 break; 1790 break;
1791 1791
1792 /* pNN: Read value of reg N and return it */
1793 case 'p':
1794 /* return no value, indicating that we don't support
1795 * this command and that gdb should use 'g' instead */
1796 break;
1797
1792 /* PNN,=RRRRRRRR: Write value R to reg N return OK */ 1798 /* PNN,=RRRRRRRR: Write value R to reg N return OK */
1793 case 'P': 1799 case 'P':
1794 ptr = &input_buffer[1]; 1800 ptr = &input_buffer[1];
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index d5f4e9161201..21b701374f72 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -144,6 +144,7 @@ int kvm_arch_hardware_enable(void *garbage)
144 VP_INIT_ENV : VP_INIT_ENV_INITALIZE, 144 VP_INIT_ENV : VP_INIT_ENV_INITALIZE,
145 __pa(kvm_vm_buffer), KVM_VM_BUFFER_BASE, &tmp_base); 145 __pa(kvm_vm_buffer), KVM_VM_BUFFER_BASE, &tmp_base);
146 if (status != 0) { 146 if (status != 0) {
147 spin_unlock(&vp_lock);
147 printk(KERN_WARNING"kvm: Failed to Enable VT Support!!!!\n"); 148 printk(KERN_WARNING"kvm: Failed to Enable VT Support!!!!\n");
148 return -EINVAL; 149 return -EINVAL;
149 } 150 }
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h
index de493f86d28f..464ff32bee3d 100644
--- a/arch/microblaze/include/asm/page.h
+++ b/arch/microblaze/include/asm/page.h
@@ -34,6 +34,8 @@
34/* MS be sure that SLAB allocates aligned objects */ 34/* MS be sure that SLAB allocates aligned objects */
35#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES 35#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
36 36
37#define ARCH_SLAB_MINALIGN L1_CACHE_BYTES
38
37#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1))) 39#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))
38#define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1))) 40#define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1)))
39 41
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
index 9dcd90b5df55..79c74659f204 100644
--- a/arch/microblaze/kernel/dma.c
+++ b/arch/microblaze/kernel/dma.c
@@ -90,7 +90,6 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
90 /* FIXME this part of code is untested */ 90 /* FIXME this part of code is untested */
91 for_each_sg(sgl, sg, nents, i) { 91 for_each_sg(sgl, sg, nents, i) {
92 sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev); 92 sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev);
93 sg->dma_length = sg->length;
94 __dma_sync_page(page_to_phys(sg_page(sg)), sg->offset, 93 __dma_sync_page(page_to_phys(sg_page(sg)), sg->offset,
95 sg->length, direction); 94 sg->length, direction);
96 } 95 }
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 9cb782b8e036..23be25fec4d6 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -1277,6 +1277,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1277 printk(KERN_WARNING "PCI: Cannot allocate resource region " 1277 printk(KERN_WARNING "PCI: Cannot allocate resource region "
1278 "%d of PCI bridge %d, will remap\n", i, bus->number); 1278 "%d of PCI bridge %d, will remap\n", i, bus->number);
1279clear_resource: 1279clear_resource:
1280 res->start = res->end = 0;
1280 res->flags = 0; 1281 res->flags = 0;
1281 } 1282 }
1282 1283
diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.c b/arch/mn10300/unit-asb2305/pci-asb2305.c
index d6119b879a98..45b40ac6c464 100644
--- a/arch/mn10300/unit-asb2305/pci-asb2305.c
+++ b/arch/mn10300/unit-asb2305/pci-asb2305.c
@@ -117,6 +117,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
117 * Invalidate the resource to prevent 117 * Invalidate the resource to prevent
118 * child resource allocations in this 118 * child resource allocations in this
119 * range. */ 119 * range. */
120 r->start = r->end = 0;
120 r->flags = 0; 121 r->flags = 0;
121 } 122 }
122 } 123 }
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 6646005dffb1..5b38f6ae2b29 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1309,6 +1309,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1309 printk(KERN_WARNING "PCI: Cannot allocate resource region " 1309 printk(KERN_WARNING "PCI: Cannot allocate resource region "
1310 "%d of PCI bridge %d, will remap\n", i, bus->number); 1310 "%d of PCI bridge %d, will remap\n", i, bus->number);
1311clear_resource: 1311clear_resource:
1312 res->start = res->end = 0;
1312 res->flags = 0; 1313 res->flags = 0;
1313 } 1314 }
1314 1315
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
index bc2b4004eb26..e8a00b0c4449 100644
--- a/arch/powerpc/kvm/e500.c
+++ b/arch/powerpc/kvm/e500.c
@@ -164,7 +164,7 @@ static int __init kvmppc_e500_init(void)
164 return kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE); 164 return kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
165} 165}
166 166
167static void __init kvmppc_e500_exit(void) 167static void __exit kvmppc_e500_exit(void)
168{ 168{
169 kvmppc_booke_exit(); 169 kvmppc_booke_exit();
170} 170}
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index 2c9e52267292..7fd90d02d8c6 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -1077,7 +1077,7 @@ static int calculate_lfsr(int n)
1077 index = ENTRIES-1; 1077 index = ENTRIES-1;
1078 1078
1079 /* make sure index is valid */ 1079 /* make sure index is valid */
1080 if ((index > ENTRIES) || (index < 0)) 1080 if ((index >= ENTRIES) || (index < 0))
1081 index = ENTRIES-1; 1081 index = ENTRIES-1;
1082 1082
1083 return initial_lfsr[index]; 1083 return initial_lfsr[index];
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c
index 55c80ffd42b9..92f1cb745d69 100644
--- a/arch/s390/appldata/appldata_os.c
+++ b/arch/s390/appldata/appldata_os.c
@@ -181,7 +181,7 @@ static int __init appldata_os_init(void)
181 goto out; 181 goto out;
182 } 182 }
183 183
184 appldata_os_data = kzalloc(max_size, GFP_DMA); 184 appldata_os_data = kzalloc(max_size, GFP_KERNEL | GFP_DMA);
185 if (appldata_os_data == NULL) { 185 if (appldata_os_data == NULL) {
186 rc = -ENOMEM; 186 rc = -ENOMEM;
187 goto out; 187 goto out;
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index bcd6884985ad..253f158db668 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.34-rc3 3# Linux kernel version: 2.6.35-rc1
4# Fri Apr 9 09:57:10 2010 4# Fri Jun 4 11:32:40 2010
5# 5#
6CONFIG_SCHED_MC=y 6CONFIG_SCHED_MC=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,11 +35,13 @@ CONFIG_CONSTRUCTORS=y
35CONFIG_EXPERIMENTAL=y 35CONFIG_EXPERIMENTAL=y
36CONFIG_LOCK_KERNEL=y 36CONFIG_LOCK_KERNEL=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 37CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_CROSS_COMPILE=""
38CONFIG_LOCALVERSION="" 39CONFIG_LOCALVERSION=""
39CONFIG_LOCALVERSION_AUTO=y 40CONFIG_LOCALVERSION_AUTO=y
40CONFIG_HAVE_KERNEL_GZIP=y 41CONFIG_HAVE_KERNEL_GZIP=y
41CONFIG_HAVE_KERNEL_BZIP2=y 42CONFIG_HAVE_KERNEL_BZIP2=y
42CONFIG_HAVE_KERNEL_LZMA=y 43CONFIG_HAVE_KERNEL_LZMA=y
44CONFIG_HAVE_KERNEL_LZO=y
43CONFIG_KERNEL_GZIP=y 45CONFIG_KERNEL_GZIP=y
44# CONFIG_KERNEL_BZIP2 is not set 46# CONFIG_KERNEL_BZIP2 is not set
45# CONFIG_KERNEL_LZMA is not set 47# CONFIG_KERNEL_LZMA is not set
@@ -77,6 +79,7 @@ CONFIG_CGROUP_NS=y
77# CONFIG_CGROUP_CPUACCT is not set 79# CONFIG_CGROUP_CPUACCT is not set
78# CONFIG_RESOURCE_COUNTERS is not set 80# CONFIG_RESOURCE_COUNTERS is not set
79# CONFIG_CGROUP_SCHED is not set 81# CONFIG_CGROUP_SCHED is not set
82# CONFIG_BLK_CGROUP is not set
80CONFIG_SYSFS_DEPRECATED=y 83CONFIG_SYSFS_DEPRECATED=y
81CONFIG_SYSFS_DEPRECATED_V2=y 84CONFIG_SYSFS_DEPRECATED_V2=y
82# CONFIG_RELAY is not set 85# CONFIG_RELAY is not set
@@ -157,7 +160,6 @@ CONFIG_STOP_MACHINE=y
157CONFIG_BLOCK=y 160CONFIG_BLOCK=y
158CONFIG_BLK_DEV_BSG=y 161CONFIG_BLK_DEV_BSG=y
159# CONFIG_BLK_DEV_INTEGRITY is not set 162# CONFIG_BLK_DEV_INTEGRITY is not set
160# CONFIG_BLK_CGROUP is not set
161CONFIG_BLOCK_COMPAT=y 163CONFIG_BLOCK_COMPAT=y
162 164
163# 165#
@@ -166,7 +168,6 @@ CONFIG_BLOCK_COMPAT=y
166CONFIG_IOSCHED_NOOP=y 168CONFIG_IOSCHED_NOOP=y
167CONFIG_IOSCHED_DEADLINE=y 169CONFIG_IOSCHED_DEADLINE=y
168CONFIG_IOSCHED_CFQ=y 170CONFIG_IOSCHED_CFQ=y
169# CONFIG_CFQ_GROUP_IOSCHED is not set
170CONFIG_DEFAULT_DEADLINE=y 171CONFIG_DEFAULT_DEADLINE=y
171# CONFIG_DEFAULT_CFQ is not set 172# CONFIG_DEFAULT_CFQ is not set
172# CONFIG_DEFAULT_NOOP is not set 173# CONFIG_DEFAULT_NOOP is not set
@@ -247,7 +248,6 @@ CONFIG_64BIT=y
247CONFIG_SMP=y 248CONFIG_SMP=y
248CONFIG_NR_CPUS=32 249CONFIG_NR_CPUS=32
249CONFIG_HOTPLUG_CPU=y 250CONFIG_HOTPLUG_CPU=y
250# CONFIG_SCHED_BOOK is not set
251CONFIG_COMPAT=y 251CONFIG_COMPAT=y
252CONFIG_SYSVIPC_COMPAT=y 252CONFIG_SYSVIPC_COMPAT=y
253CONFIG_AUDIT_ARCH=y 253CONFIG_AUDIT_ARCH=y
@@ -320,7 +320,6 @@ CONFIG_COMPAT_BINFMT_ELF=y
320# CONFIG_HAVE_AOUT is not set 320# CONFIG_HAVE_AOUT is not set
321CONFIG_BINFMT_MISC=m 321CONFIG_BINFMT_MISC=m
322CONFIG_FORCE_MAX_ZONEORDER=9 322CONFIG_FORCE_MAX_ZONEORDER=9
323# CONFIG_PROCESS_DEBUG is not set
324CONFIG_PFAULT=y 323CONFIG_PFAULT=y
325# CONFIG_SHARED_KERNEL is not set 324# CONFIG_SHARED_KERNEL is not set
326# CONFIG_CMM is not set 325# CONFIG_CMM is not set
@@ -457,6 +456,7 @@ CONFIG_NF_CONNTRACK=m
457# CONFIG_IP6_NF_IPTABLES is not set 456# CONFIG_IP6_NF_IPTABLES is not set
458# CONFIG_IP_DCCP is not set 457# CONFIG_IP_DCCP is not set
459CONFIG_IP_SCTP=m 458CONFIG_IP_SCTP=m
459# CONFIG_NET_SCTPPROBE is not set
460# CONFIG_SCTP_DBG_MSG is not set 460# CONFIG_SCTP_DBG_MSG is not set
461# CONFIG_SCTP_DBG_OBJCNT is not set 461# CONFIG_SCTP_DBG_OBJCNT is not set
462# CONFIG_SCTP_HMAC_NONE is not set 462# CONFIG_SCTP_HMAC_NONE is not set
@@ -465,6 +465,7 @@ CONFIG_SCTP_HMAC_MD5=y
465# CONFIG_RDS is not set 465# CONFIG_RDS is not set
466# CONFIG_TIPC is not set 466# CONFIG_TIPC is not set
467# CONFIG_ATM is not set 467# CONFIG_ATM is not set
468# CONFIG_L2TP is not set
468# CONFIG_BRIDGE is not set 469# CONFIG_BRIDGE is not set
469# CONFIG_VLAN_8021Q is not set 470# CONFIG_VLAN_8021Q is not set
470# CONFIG_DECNET is not set 471# CONFIG_DECNET is not set
@@ -525,6 +526,7 @@ CONFIG_NET_ACT_NAT=m
525# CONFIG_NET_CLS_IND is not set 526# CONFIG_NET_CLS_IND is not set
526CONFIG_NET_SCH_FIFO=y 527CONFIG_NET_SCH_FIFO=y
527# CONFIG_DCB is not set 528# CONFIG_DCB is not set
529CONFIG_RPS=y
528 530
529# 531#
530# Network testing 532# Network testing
@@ -546,6 +548,7 @@ CONFIG_CAN_VCAN=m
546# CONFIG_WIMAX is not set 548# CONFIG_WIMAX is not set
547# CONFIG_RFKILL is not set 549# CONFIG_RFKILL is not set
548# CONFIG_NET_9P is not set 550# CONFIG_NET_9P is not set
551# CONFIG_CAIF is not set
549# CONFIG_PCMCIA is not set 552# CONFIG_PCMCIA is not set
550CONFIG_CCW=y 553CONFIG_CCW=y
551 554
@@ -728,6 +731,7 @@ CONFIG_VIRTIO_NET=m
728# Character devices 731# Character devices
729# 732#
730CONFIG_DEVKMEM=y 733CONFIG_DEVKMEM=y
734# CONFIG_N_GSM is not set
731CONFIG_UNIX98_PTYS=y 735CONFIG_UNIX98_PTYS=y
732# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 736# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
733CONFIG_LEGACY_PTYS=y 737CONFIG_LEGACY_PTYS=y
@@ -775,6 +779,7 @@ CONFIG_S390_TAPE_34XX=m
775# CONFIG_MONREADER is not set 779# CONFIG_MONREADER is not set
776CONFIG_MONWRITER=m 780CONFIG_MONWRITER=m
777CONFIG_S390_VMUR=m 781CONFIG_S390_VMUR=m
782# CONFIG_RAMOOPS is not set
778 783
779# 784#
780# PPS support 785# PPS support
@@ -788,10 +793,6 @@ CONFIG_S390_VMUR=m
788# CONFIG_NEW_LEDS is not set 793# CONFIG_NEW_LEDS is not set
789CONFIG_ACCESSIBILITY=y 794CONFIG_ACCESSIBILITY=y
790# CONFIG_AUXDISPLAY is not set 795# CONFIG_AUXDISPLAY is not set
791
792#
793# TI VLYNQ
794#
795# CONFIG_STAGING is not set 796# CONFIG_STAGING is not set
796 797
797# 798#
@@ -976,6 +977,7 @@ CONFIG_DEBUG_MEMORY_INIT=y
976# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 977# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
977CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y 978CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
978# CONFIG_LKDTM is not set 979# CONFIG_LKDTM is not set
980# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
979# CONFIG_FAULT_INJECTION is not set 981# CONFIG_FAULT_INJECTION is not set
980# CONFIG_LATENCYTOP is not set 982# CONFIG_LATENCYTOP is not set
981CONFIG_SYSCTL_SYSCALL_CHECK=y 983CONFIG_SYSCTL_SYSCALL_CHECK=y
@@ -1010,6 +1012,7 @@ CONFIG_BRANCH_PROFILE_NONE=y
1010CONFIG_KPROBE_EVENT=y 1012CONFIG_KPROBE_EVENT=y
1011# CONFIG_RING_BUFFER_BENCHMARK is not set 1013# CONFIG_RING_BUFFER_BENCHMARK is not set
1012# CONFIG_DYNAMIC_DEBUG is not set 1014# CONFIG_DYNAMIC_DEBUG is not set
1015# CONFIG_ATOMIC64_SELFTEST is not set
1013CONFIG_SAMPLES=y 1016CONFIG_SAMPLES=y
1014# CONFIG_SAMPLE_TRACEPOINTS is not set 1017# CONFIG_SAMPLE_TRACEPOINTS is not set
1015# CONFIG_SAMPLE_TRACE_EVENTS is not set 1018# CONFIG_SAMPLE_TRACE_EVENTS is not set
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
index 639380a0c45c..22cfd634c355 100644
--- a/arch/s390/kernel/module.c
+++ b/arch/s390/kernel/module.c
@@ -55,8 +55,10 @@ void *module_alloc(unsigned long size)
55/* Free memory returned from module_alloc */ 55/* Free memory returned from module_alloc */
56void module_free(struct module *mod, void *module_region) 56void module_free(struct module *mod, void *module_region)
57{ 57{
58 vfree(mod->arch.syminfo); 58 if (mod) {
59 mod->arch.syminfo = NULL; 59 vfree(mod->arch.syminfo);
60 mod->arch.syminfo = NULL;
61 }
60 vfree(module_region); 62 vfree(module_region);
61} 63}
62 64
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 8093e6f47f49..ae3705816878 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -761,7 +761,7 @@ static int __init kvm_s390_init(void)
761 * to hold the maximum amount of facilites. On the other hand, we 761 * to hold the maximum amount of facilites. On the other hand, we
762 * only set facilities that are known to work in KVM. 762 * only set facilities that are known to work in KVM.
763 */ 763 */
764 facilities = (unsigned long long *) get_zeroed_page(GFP_DMA); 764 facilities = (unsigned long long *) get_zeroed_page(GFP_KERNEL|GFP_DMA);
765 if (!facilities) { 765 if (!facilities) {
766 kvm_exit(); 766 kvm_exit();
767 return -ENOMEM; 767 return -ENOMEM;
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index eff3c5989b46..702276f5e2fa 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -113,7 +113,7 @@ static int __inject_sigp_stop(struct kvm_s390_local_interrupt *li, int action)
113{ 113{
114 struct kvm_s390_interrupt_info *inti; 114 struct kvm_s390_interrupt_info *inti;
115 115
116 inti = kzalloc(sizeof(*inti), GFP_KERNEL); 116 inti = kzalloc(sizeof(*inti), GFP_ATOMIC);
117 if (!inti) 117 if (!inti)
118 return -ENOMEM; 118 return -ENOMEM;
119 inti->type = KVM_S390_SIGP_STOP; 119 inti->type = KVM_S390_SIGP_STOP;
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c
index 6409fd57eb04..3cc95dd0a3a6 100644
--- a/arch/s390/mm/extmem.c
+++ b/arch/s390/mm/extmem.c
@@ -105,7 +105,7 @@ static int
105dcss_set_subcodes(void) 105dcss_set_subcodes(void)
106{ 106{
107#ifdef CONFIG_64BIT 107#ifdef CONFIG_64BIT
108 char *name = kmalloc(8 * sizeof(char), GFP_DMA); 108 char *name = kmalloc(8 * sizeof(char), GFP_KERNEL | GFP_DMA);
109 unsigned long rx, ry; 109 unsigned long rx, ry;
110 int rc; 110 int rc;
111 111
@@ -252,12 +252,13 @@ dcss_diag_translate_rc (int vm_rc) {
252static int 252static int
253query_segment_type (struct dcss_segment *seg) 253query_segment_type (struct dcss_segment *seg)
254{ 254{
255 struct qin64 *qin = kmalloc (sizeof(struct qin64), GFP_DMA);
256 struct qout64 *qout = kmalloc (sizeof(struct qout64), GFP_DMA);
257
258 int diag_cc, rc, i;
259 unsigned long dummy, vmrc; 255 unsigned long dummy, vmrc;
256 int diag_cc, rc, i;
257 struct qout64 *qout;
258 struct qin64 *qin;
260 259
260 qin = kmalloc(sizeof(*qin), GFP_KERNEL | GFP_DMA);
261 qout = kmalloc(sizeof(*qout), GFP_KERNEL | GFP_DMA);
261 if ((qin == NULL) || (qout == NULL)) { 262 if ((qin == NULL) || (qout == NULL)) {
262 rc = -ENOMEM; 263 rc = -ENOMEM;
263 goto out_free; 264 goto out_free;
@@ -286,7 +287,7 @@ query_segment_type (struct dcss_segment *seg)
286 copy data for the new format. */ 287 copy data for the new format. */
287 if (segext_scode == DCSS_SEGEXT) { 288 if (segext_scode == DCSS_SEGEXT) {
288 struct qout64_old *qout_old; 289 struct qout64_old *qout_old;
289 qout_old = kzalloc(sizeof(struct qout64_old), GFP_DMA); 290 qout_old = kzalloc(sizeof(*qout_old), GFP_KERNEL | GFP_DMA);
290 if (qout_old == NULL) { 291 if (qout_old == NULL) {
291 rc = -ENOMEM; 292 rc = -ENOMEM;
292 goto out_free; 293 goto out_free;
@@ -407,11 +408,11 @@ segment_overlaps_others (struct dcss_segment *seg)
407static int 408static int
408__segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long *end) 409__segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long *end)
409{ 410{
410 struct dcss_segment *seg = kmalloc(sizeof(struct dcss_segment),
411 GFP_DMA);
412 int rc, diag_cc;
413 unsigned long start_addr, end_addr, dummy; 411 unsigned long start_addr, end_addr, dummy;
412 struct dcss_segment *seg;
413 int rc, diag_cc;
414 414
415 seg = kmalloc(sizeof(*seg), GFP_KERNEL | GFP_DMA);
415 if (seg == NULL) { 416 if (seg == NULL) {
416 rc = -ENOMEM; 417 rc = -ENOMEM;
417 goto out; 418 goto out;
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index b49d8ca228f6..8c7ae4318629 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -110,6 +110,7 @@
110#define MSR_AMD64_PATCH_LOADER 0xc0010020 110#define MSR_AMD64_PATCH_LOADER 0xc0010020
111#define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140 111#define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140
112#define MSR_AMD64_OSVW_STATUS 0xc0010141 112#define MSR_AMD64_OSVW_STATUS 0xc0010141
113#define MSR_AMD64_DC_CFG 0xc0011022
113#define MSR_AMD64_IBSFETCHCTL 0xc0011030 114#define MSR_AMD64_IBSFETCHCTL 0xc0011030
114#define MSR_AMD64_IBSFETCHLINAD 0xc0011031 115#define MSR_AMD64_IBSFETCHLINAD 0xc0011031
115#define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032 116#define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032
diff --git a/arch/x86/include/asm/suspend_32.h b/arch/x86/include/asm/suspend_32.h
index 48dcfa62ea07..fd921c3a6841 100644
--- a/arch/x86/include/asm/suspend_32.h
+++ b/arch/x86/include/asm/suspend_32.h
@@ -15,6 +15,8 @@ static inline int arch_prepare_suspend(void) { return 0; }
15struct saved_context { 15struct saved_context {
16 u16 es, fs, gs, ss; 16 u16 es, fs, gs, ss;
17 unsigned long cr0, cr2, cr3, cr4; 17 unsigned long cr0, cr2, cr3, cr4;
18 u64 misc_enable;
19 bool misc_enable_saved;
18 struct desc_ptr gdt; 20 struct desc_ptr gdt;
19 struct desc_ptr idt; 21 struct desc_ptr idt;
20 u16 ldt; 22 u16 ldt;
diff --git a/arch/x86/include/asm/suspend_64.h b/arch/x86/include/asm/suspend_64.h
index 06284f42b759..8d942afae681 100644
--- a/arch/x86/include/asm/suspend_64.h
+++ b/arch/x86/include/asm/suspend_64.h
@@ -27,6 +27,8 @@ struct saved_context {
27 u16 ds, es, fs, gs, ss; 27 u16 ds, es, fs, gs, ss;
28 unsigned long gs_base, gs_kernel_base, fs_base; 28 unsigned long gs_base, gs_kernel_base, fs_base;
29 unsigned long cr0, cr2, cr3, cr4, cr8; 29 unsigned long cr0, cr2, cr3, cr4, cr8;
30 u64 misc_enable;
31 bool misc_enable_saved;
30 unsigned long efer; 32 unsigned long efer;
31 u16 gdt_pad; 33 u16 gdt_pad;
32 u16 gdt_limit; 34 u16 gdt_limit;
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 81563e76e28f..a6f695d76928 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1815,6 +1815,9 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
1815 1815
1816 spte |= PT_WRITABLE_MASK; 1816 spte |= PT_WRITABLE_MASK;
1817 1817
1818 if (!tdp_enabled && !(pte_access & ACC_WRITE_MASK))
1819 spte &= ~PT_USER_MASK;
1820
1818 /* 1821 /*
1819 * Optimization: for pte sync, if spte was writable the hash 1822 * Optimization: for pte sync, if spte was writable the hash
1820 * lookup is unnecessary (and expensive). Write protection 1823 * lookup is unnecessary (and expensive). Write protection
@@ -1870,6 +1873,8 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
1870 1873
1871 child = page_header(pte & PT64_BASE_ADDR_MASK); 1874 child = page_header(pte & PT64_BASE_ADDR_MASK);
1872 mmu_page_remove_parent_pte(child, sptep); 1875 mmu_page_remove_parent_pte(child, sptep);
1876 __set_spte(sptep, shadow_trap_nonpresent_pte);
1877 kvm_flush_remote_tlbs(vcpu->kvm);
1873 } else if (pfn != spte_to_pfn(*sptep)) { 1878 } else if (pfn != spte_to_pfn(*sptep)) {
1874 pgprintk("hfn old %lx new %lx\n", 1879 pgprintk("hfn old %lx new %lx\n",
1875 spte_to_pfn(*sptep), pfn); 1880 spte_to_pfn(*sptep), pfn);
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 96dc232bfc56..ce438e0fdd26 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -28,6 +28,7 @@
28#include <linux/ftrace_event.h> 28#include <linux/ftrace_event.h>
29#include <linux/slab.h> 29#include <linux/slab.h>
30 30
31#include <asm/tlbflush.h>
31#include <asm/desc.h> 32#include <asm/desc.h>
32 33
33#include <asm/virtext.h> 34#include <asm/virtext.h>
@@ -56,6 +57,8 @@ MODULE_LICENSE("GPL");
56 57
57#define DEBUGCTL_RESERVED_BITS (~(0x3fULL)) 58#define DEBUGCTL_RESERVED_BITS (~(0x3fULL))
58 59
60static bool erratum_383_found __read_mostly;
61
59static const u32 host_save_user_msrs[] = { 62static const u32 host_save_user_msrs[] = {
60#ifdef CONFIG_X86_64 63#ifdef CONFIG_X86_64
61 MSR_STAR, MSR_LSTAR, MSR_CSTAR, MSR_SYSCALL_MASK, MSR_KERNEL_GS_BASE, 64 MSR_STAR, MSR_LSTAR, MSR_CSTAR, MSR_SYSCALL_MASK, MSR_KERNEL_GS_BASE,
@@ -374,6 +377,31 @@ static void svm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
374 svm->vmcb->control.event_inj_err = error_code; 377 svm->vmcb->control.event_inj_err = error_code;
375} 378}
376 379
380static void svm_init_erratum_383(void)
381{
382 u32 low, high;
383 int err;
384 u64 val;
385
386 /* Only Fam10h is affected */
387 if (boot_cpu_data.x86 != 0x10)
388 return;
389
390 /* Use _safe variants to not break nested virtualization */
391 val = native_read_msr_safe(MSR_AMD64_DC_CFG, &err);
392 if (err)
393 return;
394
395 val |= (1ULL << 47);
396
397 low = lower_32_bits(val);
398 high = upper_32_bits(val);
399
400 native_write_msr_safe(MSR_AMD64_DC_CFG, low, high);
401
402 erratum_383_found = true;
403}
404
377static int has_svm(void) 405static int has_svm(void)
378{ 406{
379 const char *msg; 407 const char *msg;
@@ -429,6 +457,8 @@ static int svm_hardware_enable(void *garbage)
429 457
430 wrmsrl(MSR_VM_HSAVE_PA, page_to_pfn(sd->save_area) << PAGE_SHIFT); 458 wrmsrl(MSR_VM_HSAVE_PA, page_to_pfn(sd->save_area) << PAGE_SHIFT);
431 459
460 svm_init_erratum_383();
461
432 return 0; 462 return 0;
433} 463}
434 464
@@ -1410,8 +1440,59 @@ static int nm_interception(struct vcpu_svm *svm)
1410 return 1; 1440 return 1;
1411} 1441}
1412 1442
1413static int mc_interception(struct vcpu_svm *svm) 1443static bool is_erratum_383(void)
1414{ 1444{
1445 int err, i;
1446 u64 value;
1447
1448 if (!erratum_383_found)
1449 return false;
1450
1451 value = native_read_msr_safe(MSR_IA32_MC0_STATUS, &err);
1452 if (err)
1453 return false;
1454
1455 /* Bit 62 may or may not be set for this mce */
1456 value &= ~(1ULL << 62);
1457
1458 if (value != 0xb600000000010015ULL)
1459 return false;
1460
1461 /* Clear MCi_STATUS registers */
1462 for (i = 0; i < 6; ++i)
1463 native_write_msr_safe(MSR_IA32_MCx_STATUS(i), 0, 0);
1464
1465 value = native_read_msr_safe(MSR_IA32_MCG_STATUS, &err);
1466 if (!err) {
1467 u32 low, high;
1468
1469 value &= ~(1ULL << 2);
1470 low = lower_32_bits(value);
1471 high = upper_32_bits(value);
1472
1473 native_write_msr_safe(MSR_IA32_MCG_STATUS, low, high);
1474 }
1475
1476 /* Flush tlb to evict multi-match entries */
1477 __flush_tlb_all();
1478
1479 return true;
1480}
1481
1482static void svm_handle_mce(struct vcpu_svm *svm)
1483{
1484 if (is_erratum_383()) {
1485 /*
1486 * Erratum 383 triggered. Guest state is corrupt so kill the
1487 * guest.
1488 */
1489 pr_err("KVM: Guest triggered AMD Erratum 383\n");
1490
1491 set_bit(KVM_REQ_TRIPLE_FAULT, &svm->vcpu.requests);
1492
1493 return;
1494 }
1495
1415 /* 1496 /*
1416 * On an #MC intercept the MCE handler is not called automatically in 1497 * On an #MC intercept the MCE handler is not called automatically in
1417 * the host. So do it by hand here. 1498 * the host. So do it by hand here.
@@ -1420,6 +1501,11 @@ static int mc_interception(struct vcpu_svm *svm)
1420 "int $0x12\n"); 1501 "int $0x12\n");
1421 /* not sure if we ever come back to this point */ 1502 /* not sure if we ever come back to this point */
1422 1503
1504 return;
1505}
1506
1507static int mc_interception(struct vcpu_svm *svm)
1508{
1423 return 1; 1509 return 1;
1424} 1510}
1425 1511
@@ -3088,6 +3174,14 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
3088 vcpu->arch.regs_avail &= ~(1 << VCPU_EXREG_PDPTR); 3174 vcpu->arch.regs_avail &= ~(1 << VCPU_EXREG_PDPTR);
3089 vcpu->arch.regs_dirty &= ~(1 << VCPU_EXREG_PDPTR); 3175 vcpu->arch.regs_dirty &= ~(1 << VCPU_EXREG_PDPTR);
3090 } 3176 }
3177
3178 /*
3179 * We need to handle MC intercepts here before the vcpu has a chance to
3180 * change the physical cpu
3181 */
3182 if (unlikely(svm->vmcb->control.exit_code ==
3183 SVM_EXIT_EXCP_BASE + MC_VECTOR))
3184 svm_handle_mce(svm);
3091} 3185}
3092 3186
3093#undef R 3187#undef R
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 97da2ba9344b..6fdb3ec30c31 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -96,6 +96,7 @@ EXPORT_SYMBOL(pcibios_align_resource);
96 * the fact the PCI specs explicitly allow address decoders to be 96 * the fact the PCI specs explicitly allow address decoders to be
97 * shared between expansion ROMs and other resource regions, it's 97 * shared between expansion ROMs and other resource regions, it's
98 * at least dangerous) 98 * at least dangerous)
99 * - bad resource sizes or overlaps with other regions
99 * 100 *
100 * Our solution: 101 * Our solution:
101 * (1) Allocate resources for all buses behind PCI-to-PCI bridges. 102 * (1) Allocate resources for all buses behind PCI-to-PCI bridges.
@@ -136,6 +137,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
136 * child resource allocations in this 137 * child resource allocations in this
137 * range. 138 * range.
138 */ 139 */
140 r->start = r->end = 0;
139 r->flags = 0; 141 r->flags = 0;
140 } 142 }
141 } 143 }
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 0a979f3e5b8a..1290ba54b350 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -105,6 +105,8 @@ static void __save_processor_state(struct saved_context *ctxt)
105 ctxt->cr4 = read_cr4(); 105 ctxt->cr4 = read_cr4();
106 ctxt->cr8 = read_cr8(); 106 ctxt->cr8 = read_cr8();
107#endif 107#endif
108 ctxt->misc_enable_saved = !rdmsrl_safe(MSR_IA32_MISC_ENABLE,
109 &ctxt->misc_enable);
108} 110}
109 111
110/* Needed by apm.c */ 112/* Needed by apm.c */
@@ -152,6 +154,8 @@ static void fix_processor_context(void)
152 */ 154 */
153static void __restore_processor_state(struct saved_context *ctxt) 155static void __restore_processor_state(struct saved_context *ctxt)
154{ 156{
157 if (ctxt->misc_enable_saved)
158 wrmsrl(MSR_IA32_MISC_ENABLE, ctxt->misc_enable);
155 /* 159 /*
156 * control registers 160 * control registers
157 */ 161 */