diff options
Diffstat (limited to 'arch')
31 files changed, 144 insertions, 68 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1f254bd6c93..98922f7d2d1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -955,7 +955,8 @@ config XSCALE_PMU | |||
955 | default y | 955 | default y |
956 | 956 | ||
957 | config CPU_HAS_PMU | 957 | config CPU_HAS_PMU |
958 | depends on CPU_V6 || CPU_V7 || XSCALE_PMU | 958 | depends on (CPU_V6 || CPU_V7 || XSCALE_PMU) && \ |
959 | (!ARCH_OMAP3 || OMAP3_EMU) | ||
959 | default y | 960 | default y |
960 | bool | 961 | bool |
961 | 962 | ||
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h index f3eabf1ecec..833306ee9e7 100644 --- a/arch/arm/include/asm/mach/udc_pxa2xx.h +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h | |||
@@ -21,8 +21,8 @@ struct pxa2xx_udc_mach_info { | |||
21 | * here. Note that sometimes the signals go through inverters... | 21 | * here. Note that sometimes the signals go through inverters... |
22 | */ | 22 | */ |
23 | bool gpio_vbus_inverted; | 23 | bool gpio_vbus_inverted; |
24 | u16 gpio_vbus; /* high == vbus present */ | 24 | int gpio_vbus; /* high == vbus present */ |
25 | bool gpio_pullup_inverted; | 25 | bool gpio_pullup_inverted; |
26 | u16 gpio_pullup; /* high == pullup activated */ | 26 | int gpio_pullup; /* high == pullup activated */ |
27 | }; | 27 | }; |
28 | 28 | ||
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 6a89567ffc5..7bed3daf83b 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -91,7 +91,11 @@ extern void release_thread(struct task_struct *); | |||
91 | 91 | ||
92 | unsigned long get_wchan(struct task_struct *p); | 92 | unsigned long get_wchan(struct task_struct *p); |
93 | 93 | ||
94 | #if __LINUX_ARM_ARCH__ == 6 | ||
95 | #define cpu_relax() smp_mb() | ||
96 | #else | ||
94 | #define cpu_relax() barrier() | 97 | #define cpu_relax() barrier() |
98 | #endif | ||
95 | 99 | ||
96 | /* | 100 | /* |
97 | * Create a new kernel thread | 101 | * Create a new kernel thread |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index c45768614c8..de12536d687 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -201,7 +201,7 @@ armpmu_event_update(struct perf_event *event, | |||
201 | { | 201 | { |
202 | int shift = 64 - 32; | 202 | int shift = 64 - 32; |
203 | s64 prev_raw_count, new_raw_count; | 203 | s64 prev_raw_count, new_raw_count; |
204 | s64 delta; | 204 | u64 delta; |
205 | 205 | ||
206 | again: | 206 | again: |
207 | prev_raw_count = atomic64_read(&hwc->prev_count); | 207 | prev_raw_count = atomic64_read(&hwc->prev_count); |
diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c index d3d5877c750..b2c7f512070 100644 --- a/arch/arm/mach-mx3/mach-mx31lilly.c +++ b/arch/arm/mach-mx3/mach-mx31lilly.c | |||
@@ -115,6 +115,8 @@ static struct platform_device physmap_flash_device = { | |||
115 | 115 | ||
116 | /* USB */ | 116 | /* USB */ |
117 | 117 | ||
118 | #if defined(CONFIG_USB_ULPI) | ||
119 | |||
118 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | 120 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ |
119 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 121 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) |
120 | 122 | ||
@@ -244,10 +246,20 @@ static struct mxc_usbh_platform_data usbh2_pdata = { | |||
244 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | 246 | .flags = MXC_EHCI_POWER_PINS_ENABLED, |
245 | }; | 247 | }; |
246 | 248 | ||
247 | static struct platform_device *devices[] __initdata = { | 249 | static void lilly1131_usb_init(void) |
248 | &smsc91x_device, | 250 | { |
249 | &physmap_flash_device, | 251 | usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
250 | }; | 252 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); |
253 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
254 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
255 | |||
256 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | ||
257 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
258 | } | ||
259 | |||
260 | #else | ||
261 | static inline void lilly1131_usb_init(void) {} | ||
262 | #endif /* CONFIG_USB_ULPI */ | ||
251 | 263 | ||
252 | /* SPI */ | 264 | /* SPI */ |
253 | 265 | ||
@@ -279,6 +291,11 @@ static struct spi_board_info mc13783_dev __initdata = { | |||
279 | .platform_data = &mc13783_pdata, | 291 | .platform_data = &mc13783_pdata, |
280 | }; | 292 | }; |
281 | 293 | ||
294 | static struct platform_device *devices[] __initdata = { | ||
295 | &smsc91x_device, | ||
296 | &physmap_flash_device, | ||
297 | }; | ||
298 | |||
282 | static int mx31lilly_baseboard; | 299 | static int mx31lilly_baseboard; |
283 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); | 300 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); |
284 | 301 | ||
@@ -321,13 +338,7 @@ static void __init mx31lilly_board_init(void) | |||
321 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 338 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
322 | 339 | ||
323 | /* USB */ | 340 | /* USB */ |
324 | usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 341 | lilly1131_usb_init(); |
325 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
326 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
327 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
328 | |||
329 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | ||
330 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
331 | } | 342 | } |
332 | 343 | ||
333 | static void __init mx31lilly_timer_init(void) | 344 | static void __init mx31lilly_timer_init(void) |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index f848ba8dbc1..a04cffd691c 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -538,9 +538,7 @@ static void ads7846_dev_init(void) | |||
538 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); | 538 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); |
539 | 539 | ||
540 | gpio_direction_input(OMAP3_STALKER_TS_GPIO); | 540 | gpio_direction_input(OMAP3_STALKER_TS_GPIO); |
541 | 541 | gpio_set_debounce(OMAP3_STALKER_TS_GPIO, 310); | |
542 | omap_set_gpio_debounce(OMAP3_STALKER_TS_GPIO, 1); | ||
543 | omap_set_gpio_debounce_time(OMAP3_STALKER_TS_GPIO, 0xa); | ||
544 | } | 542 | } |
545 | 543 | ||
546 | static int ads7846_get_pendown_state(void) | 544 | static int ads7846_get_pendown_state(void) |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 02804224517..e10db7a90cb 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -1369,6 +1369,7 @@ static struct clk emif1_ick = { | |||
1369 | .ops = &clkops_omap2_dflt, | 1369 | .ops = &clkops_omap2_dflt, |
1370 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL, | 1370 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL, |
1371 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1371 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
1372 | .flags = ENABLE_ON_INIT, | ||
1372 | .clkdm_name = "l3_emif_clkdm", | 1373 | .clkdm_name = "l3_emif_clkdm", |
1373 | .parent = &ddrphy_ck, | 1374 | .parent = &ddrphy_ck, |
1374 | .recalc = &followparent_recalc, | 1375 | .recalc = &followparent_recalc, |
@@ -1379,6 +1380,7 @@ static struct clk emif2_ick = { | |||
1379 | .ops = &clkops_omap2_dflt, | 1380 | .ops = &clkops_omap2_dflt, |
1380 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL, | 1381 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL, |
1381 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1382 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
1383 | .flags = ENABLE_ON_INIT, | ||
1382 | .clkdm_name = "l3_emif_clkdm", | 1384 | .clkdm_name = "l3_emif_clkdm", |
1383 | .parent = &ddrphy_ck, | 1385 | .parent = &ddrphy_ck, |
1384 | .recalc = &followparent_recalc, | 1386 | .recalc = &followparent_recalc, |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 95c9a5f774e..b7a4133267d 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -409,10 +409,11 @@ static int _init_main_clk(struct omap_hwmod *oh) | |||
409 | return 0; | 409 | return 0; |
410 | 410 | ||
411 | oh->_clk = omap_clk_get_by_name(oh->main_clk); | 411 | oh->_clk = omap_clk_get_by_name(oh->main_clk); |
412 | if (!oh->_clk) | 412 | if (!oh->_clk) { |
413 | pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n", | 413 | pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n", |
414 | oh->name, oh->main_clk); | 414 | oh->name, oh->main_clk); |
415 | return -EINVAL; | 415 | return -EINVAL; |
416 | } | ||
416 | 417 | ||
417 | if (!oh->_clk->clkdm) | 418 | if (!oh->_clk->clkdm) |
418 | pr_warning("omap_hwmod: %s: missing clockdomain for %s.\n", | 419 | pr_warning("omap_hwmod: %s: missing clockdomain for %s.\n", |
@@ -444,10 +445,11 @@ static int _init_interface_clks(struct omap_hwmod *oh) | |||
444 | continue; | 445 | continue; |
445 | 446 | ||
446 | c = omap_clk_get_by_name(os->clk); | 447 | c = omap_clk_get_by_name(os->clk); |
447 | if (!c) | 448 | if (!c) { |
448 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", | 449 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", |
449 | oh->name, os->clk); | 450 | oh->name, os->clk); |
450 | ret = -EINVAL; | 451 | ret = -EINVAL; |
452 | } | ||
451 | os->_clk = c; | 453 | os->_clk = c; |
452 | } | 454 | } |
453 | 455 | ||
@@ -470,10 +472,11 @@ static int _init_opt_clks(struct omap_hwmod *oh) | |||
470 | 472 | ||
471 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { | 473 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { |
472 | c = omap_clk_get_by_name(oc->clk); | 474 | c = omap_clk_get_by_name(oc->clk); |
473 | if (!c) | 475 | if (!c) { |
474 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", | 476 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", |
475 | oh->name, oc->clk); | 477 | oh->name, oc->clk); |
476 | ret = -EINVAL; | 478 | ret = -EINVAL; |
479 | } | ||
477 | oc->_clk = c; | 480 | oc->_clk = c; |
478 | } | 481 | } |
479 | 482 | ||
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 2e967716cc3..b88737fd6cf 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -99,7 +99,7 @@ static void omap3_enable_io_chain(void) | |||
99 | /* Do a readback to assure write has been done */ | 99 | /* Do a readback to assure write has been done */ |
100 | prm_read_mod_reg(WKUP_MOD, PM_WKEN); | 100 | prm_read_mod_reg(WKUP_MOD, PM_WKEN); |
101 | 101 | ||
102 | while (!(prm_read_mod_reg(WKUP_MOD, PM_WKST) & | 102 | while (!(prm_read_mod_reg(WKUP_MOD, PM_WKEN) & |
103 | OMAP3430_ST_IO_CHAIN_MASK)) { | 103 | OMAP3430_ST_IO_CHAIN_MASK)) { |
104 | timeout++; | 104 | timeout++; |
105 | if (timeout > 1000) { | 105 | if (timeout > 1000) { |
@@ -108,7 +108,7 @@ static void omap3_enable_io_chain(void) | |||
108 | return; | 108 | return; |
109 | } | 109 | } |
110 | prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK, | 110 | prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK, |
111 | WKUP_MOD, PM_WKST); | 111 | WKUP_MOD, PM_WKEN); |
112 | } | 112 | } |
113 | } | 113 | } |
114 | } | 114 | } |
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c index c68f799e83c..d72d1ac3033 100644 --- a/arch/arm/mach-omap2/usb-ehci.c +++ b/arch/arm/mach-omap2/usb-ehci.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/dma-mapping.h> | ||
24 | |||
23 | #include <asm/io.h> | 25 | #include <asm/io.h> |
24 | #include <plat/mux.h> | 26 | #include <plat/mux.h> |
25 | 27 | ||
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index d60db87dde0..fa6a708b409 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -697,7 +697,7 @@ static struct i2c_board_info __initdata mioa701_pi2c_devices[] = { | |||
697 | }; | 697 | }; |
698 | 698 | ||
699 | /* Board I2C devices. */ | 699 | /* Board I2C devices. */ |
700 | static struct i2c_board_info __initdata mioa701_i2c_devices[] = { | 700 | static struct i2c_board_info mioa701_i2c_devices[] = { |
701 | { | 701 | { |
702 | I2C_BOARD_INFO("mt9m111", 0x5d), | 702 | I2C_BOARD_INFO("mt9m111", 0x5d), |
703 | }, | 703 | }, |
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index f5d1ae3db3a..d303c6929d3 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
@@ -3,8 +3,9 @@ | |||
3 | * | 3 | * |
4 | * Support for the Zipit Z2 Handheld device. | 4 | * Support for the Zipit Z2 Handheld device. |
5 | * | 5 | * |
6 | * Author: Ken McGuire | 6 | * Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.com> |
7 | * Created: Jan 25, 2009 | 7 | * |
8 | * Based on research and code by: Ken McGuire | ||
8 | * Based on mainstone.c as modified for the Zipit Z2. | 9 | * Based on mainstone.c as modified for the Zipit Z2. |
9 | * | 10 | * |
10 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
@@ -157,21 +158,14 @@ static struct mtd_partition z2_flash_parts[] = { | |||
157 | { | 158 | { |
158 | .name = "U-Boot Bootloader", | 159 | .name = "U-Boot Bootloader", |
159 | .offset = 0x0, | 160 | .offset = 0x0, |
160 | .size = 0x20000, | 161 | .size = 0x40000, |
161 | }, | 162 | }, { |
162 | { | ||
163 | .name = "Linux Kernel", | ||
164 | .offset = 0x20000, | ||
165 | .size = 0x220000, | ||
166 | }, | ||
167 | { | ||
168 | .name = "Filesystem", | ||
169 | .offset = 0x240000, | ||
170 | .size = 0x5b0000, | ||
171 | }, | ||
172 | { | ||
173 | .name = "U-Boot Environment", | 163 | .name = "U-Boot Environment", |
174 | .offset = 0x7f0000, | 164 | .offset = 0x40000, |
165 | .size = 0x60000, | ||
166 | }, { | ||
167 | .name = "Flash", | ||
168 | .offset = 0x60000, | ||
175 | .size = MTDPART_SIZ_FULL, | 169 | .size = MTDPART_SIZ_FULL, |
176 | }, | 170 | }, |
177 | }; | 171 | }; |
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index ee5e392430e..b4575ae9648 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -18,6 +18,7 @@ config REALVIEW_EB_ARM11MP | |||
18 | bool "Support ARM11MPCore tile" | 18 | bool "Support ARM11MPCore tile" |
19 | depends on MACH_REALVIEW_EB | 19 | depends on MACH_REALVIEW_EB |
20 | select CPU_V6 | 20 | select CPU_V6 |
21 | select ARCH_HAS_BARRIERS if SMP | ||
21 | help | 22 | help |
22 | Enable support for the ARM11MPCore tile on the Realview platform. | 23 | Enable support for the ARM11MPCore tile on the Realview platform. |
23 | 24 | ||
@@ -35,6 +36,7 @@ config MACH_REALVIEW_PB11MP | |||
35 | select CPU_V6 | 36 | select CPU_V6 |
36 | select ARM_GIC | 37 | select ARM_GIC |
37 | select HAVE_PATA_PLATFORM | 38 | select HAVE_PATA_PLATFORM |
39 | select ARCH_HAS_BARRIERS if SMP | ||
38 | help | 40 | help |
39 | Include support for the ARM(R) RealView MPCore Platform Baseboard. | 41 | Include support for the ARM(R) RealView MPCore Platform Baseboard. |
40 | PB11MPCore is a platform with an on-board ARM11MPCore and has | 42 | PB11MPCore is a platform with an on-board ARM11MPCore and has |
diff --git a/arch/arm/mach-realview/include/mach/barriers.h b/arch/arm/mach-realview/include/mach/barriers.h new file mode 100644 index 00000000000..0c5d749d7b5 --- /dev/null +++ b/arch/arm/mach-realview/include/mach/barriers.h | |||
@@ -0,0 +1,8 @@ | |||
1 | /* | ||
2 | * Barriers redefined for RealView ARM11MPCore platforms with L220 cache | ||
3 | * controller to work around hardware errata causing the outer_sync() | ||
4 | * operation to deadlock the system. | ||
5 | */ | ||
6 | #define mb() dsb() | ||
7 | #define rmb() dmb() | ||
8 | #define wmb() mb() | ||
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 422ccd70d5f..4425018fab8 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
34 | #include <asm/pmu.h> | 34 | #include <asm/pmu.h> |
35 | #include <asm/pgtable.h> | ||
35 | #include <asm/hardware/gic.h> | 36 | #include <asm/hardware/gic.h> |
36 | #include <asm/hardware/cache-l2x0.h> | 37 | #include <asm/hardware/cache-l2x0.h> |
37 | #include <asm/localtimer.h> | 38 | #include <asm/localtimer.h> |
@@ -457,7 +458,7 @@ static void __init realview_eb_init(void) | |||
457 | 458 | ||
458 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | 459 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") |
459 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 460 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
460 | .phys_io = REALVIEW_EB_UART0_BASE, | 461 | .phys_io = REALVIEW_EB_UART0_BASE & SECTION_MASK, |
461 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, | 462 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, |
462 | .boot_params = PHYS_OFFSET + 0x00000100, | 463 | .boot_params = PHYS_OFFSET + 0x00000100, |
463 | .fixup = realview_fixup, | 464 | .fixup = realview_fixup, |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 96568ebfa2b..099a1f125cf 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
34 | #include <asm/pmu.h> | 34 | #include <asm/pmu.h> |
35 | #include <asm/pgtable.h> | ||
35 | #include <asm/hardware/gic.h> | 36 | #include <asm/hardware/gic.h> |
36 | #include <asm/hardware/cache-l2x0.h> | 37 | #include <asm/hardware/cache-l2x0.h> |
37 | 38 | ||
@@ -351,7 +352,7 @@ static void __init realview_pb1176_init(void) | |||
351 | 352 | ||
352 | MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") | 353 | MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") |
353 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 354 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
354 | .phys_io = REALVIEW_PB1176_UART0_BASE, | 355 | .phys_io = REALVIEW_PB1176_UART0_BASE & SECTION_MASK, |
355 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, | 356 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, |
356 | .boot_params = PHYS_OFFSET + 0x00000100, | 357 | .boot_params = PHYS_OFFSET + 0x00000100, |
357 | .fixup = realview_pb1176_fixup, | 358 | .fixup = realview_pb1176_fixup, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 7fbefbbebaf..0e07a5ccb75 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
34 | #include <asm/pmu.h> | 34 | #include <asm/pmu.h> |
35 | #include <asm/pgtable.h> | ||
35 | #include <asm/hardware/gic.h> | 36 | #include <asm/hardware/gic.h> |
36 | #include <asm/hardware/cache-l2x0.h> | 37 | #include <asm/hardware/cache-l2x0.h> |
37 | #include <asm/localtimer.h> | 38 | #include <asm/localtimer.h> |
@@ -373,7 +374,7 @@ static void __init realview_pb11mp_init(void) | |||
373 | 374 | ||
374 | MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") | 375 | MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") |
375 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 376 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
376 | .phys_io = REALVIEW_PB11MP_UART0_BASE, | 377 | .phys_io = REALVIEW_PB11MP_UART0_BASE & SECTION_MASK, |
377 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, | 378 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, |
378 | .boot_params = PHYS_OFFSET + 0x00000100, | 379 | .boot_params = PHYS_OFFSET + 0x00000100, |
379 | .fixup = realview_fixup, | 380 | .fixup = realview_fixup, |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index d3c113b3dfc..ac2f06f1ca5 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/leds.h> | 31 | #include <asm/leds.h> |
32 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
33 | #include <asm/pmu.h> | 33 | #include <asm/pmu.h> |
34 | #include <asm/pgtable.h> | ||
34 | #include <asm/hardware/gic.h> | 35 | #include <asm/hardware/gic.h> |
35 | 36 | ||
36 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
@@ -323,7 +324,7 @@ static void __init realview_pba8_init(void) | |||
323 | 324 | ||
324 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | 325 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") |
325 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 326 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
326 | .phys_io = REALVIEW_PBA8_UART0_BASE, | 327 | .phys_io = REALVIEW_PBA8_UART0_BASE & SECTION_MASK, |
327 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, | 328 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, |
328 | .boot_params = PHYS_OFFSET + 0x00000100, | 329 | .boot_params = PHYS_OFFSET + 0x00000100, |
329 | .fixup = realview_fixup, | 330 | .fixup = realview_fixup, |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index a235ba30996..08fd683adc4 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
32 | #include <asm/pmu.h> | 32 | #include <asm/pmu.h> |
33 | #include <asm/smp_twd.h> | 33 | #include <asm/smp_twd.h> |
34 | #include <asm/pgtable.h> | ||
34 | #include <asm/hardware/gic.h> | 35 | #include <asm/hardware/gic.h> |
35 | #include <asm/hardware/cache-l2x0.h> | 36 | #include <asm/hardware/cache-l2x0.h> |
36 | 37 | ||
@@ -409,7 +410,7 @@ static void __init realview_pbx_init(void) | |||
409 | 410 | ||
410 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") | 411 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") |
411 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 412 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
412 | .phys_io = REALVIEW_PBX_UART0_BASE, | 413 | .phys_io = REALVIEW_PBX_UART0_BASE & SECTION_MASK, |
413 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, | 414 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, |
414 | .boot_params = PHYS_OFFSET + 0x00000100, | 415 | .boot_params = PHYS_OFFSET + 0x00000100, |
415 | .fixup = realview_pbx_fixup, | 416 | .fixup = realview_pbx_fixup, |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 9b11eedba65..6353459bb56 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/amba/clcd.h> | 10 | #include <linux/amba/clcd.h> |
11 | 11 | ||
12 | #include <asm/clkdev.h> | 12 | #include <asm/clkdev.h> |
13 | #include <asm/pgtable.h> | ||
13 | #include <asm/hardware/arm_timer.h> | 14 | #include <asm/hardware/arm_timer.h> |
14 | #include <asm/hardware/cache-l2x0.h> | 15 | #include <asm/hardware/cache-l2x0.h> |
15 | #include <asm/hardware/gic.h> | 16 | #include <asm/hardware/gic.h> |
@@ -236,7 +237,7 @@ static void ct_ca9x4_init(void) | |||
236 | } | 237 | } |
237 | 238 | ||
238 | MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") | 239 | MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") |
239 | .phys_io = V2M_UART0, | 240 | .phys_io = V2M_UART0 & SECTION_MASK, |
240 | .io_pg_offst = (__MMIO_P2V(V2M_UART0) >> 18) & 0xfffc, | 241 | .io_pg_offst = (__MMIO_P2V(V2M_UART0) >> 18) & 0xfffc, |
241 | .boot_params = PHYS_OFFSET + 0x00000100, | 242 | .boot_params = PHYS_OFFSET + 0x00000100, |
242 | .map_io = ct_ca9x4_map_io, | 243 | .map_io = ct_ca9x4_map_io, |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 346ae14824a..101105e5261 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -735,6 +735,25 @@ config NEEDS_SYSCALL_FOR_CMPXCHG | |||
735 | Forget about fast user space cmpxchg support. | 735 | Forget about fast user space cmpxchg support. |
736 | It is just not possible. | 736 | It is just not possible. |
737 | 737 | ||
738 | config DMA_CACHE_RWFO | ||
739 | bool "Enable read/write for ownership DMA cache maintenance" | ||
740 | depends on CPU_V6 && SMP | ||
741 | default y | ||
742 | help | ||
743 | The Snoop Control Unit on ARM11MPCore does not detect the | ||
744 | cache maintenance operations and the dma_{map,unmap}_area() | ||
745 | functions may leave stale cache entries on other CPUs. By | ||
746 | enabling this option, Read or Write For Ownership in the ARMv6 | ||
747 | DMA cache maintenance functions is performed. These LDR/STR | ||
748 | instructions change the cache line state to shared or modified | ||
749 | so that the cache operation has the desired effect. | ||
750 | |||
751 | Note that the workaround is only valid on processors that do | ||
752 | not perform speculative loads into the D-cache. For such | ||
753 | processors, if cache maintenance operations are not broadcast | ||
754 | in hardware, other workarounds are needed (e.g. cache | ||
755 | maintenance broadcasting in software via FIQ). | ||
756 | |||
738 | config OUTER_CACHE | 757 | config OUTER_CACHE |
739 | bool | 758 | bool |
740 | 759 | ||
@@ -794,6 +813,8 @@ config ARM_L1_CACHE_SHIFT | |||
794 | 813 | ||
795 | config ARM_DMA_MEM_BUFFERABLE | 814 | config ARM_DMA_MEM_BUFFERABLE |
796 | bool "Use non-cacheable memory for DMA" if CPU_V6 && !CPU_V7 | 815 | bool "Use non-cacheable memory for DMA" if CPU_V6 && !CPU_V7 |
816 | depends on !(MACH_REALVIEW_PB1176 || REALVIEW_EB_ARM11MP || \ | ||
817 | MACH_REALVIEW_PB11MP) | ||
797 | default y if CPU_V6 || CPU_V7 | 818 | default y if CPU_V6 || CPU_V7 |
798 | help | 819 | help |
799 | Historically, the kernel has used strongly ordered mappings to | 820 | Historically, the kernel has used strongly ordered mappings to |
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index e46ecd84713..86aa689ef1a 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
@@ -211,8 +211,9 @@ v6_dma_inv_range: | |||
211 | mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line | 211 | mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line |
212 | #endif | 212 | #endif |
213 | 1: | 213 | 1: |
214 | #ifdef CONFIG_SMP | 214 | #ifdef CONFIG_DMA_CACHE_RWFO |
215 | str r0, [r0] @ write for ownership | 215 | ldr r2, [r0] @ read for ownership |
216 | str r2, [r0] @ write for ownership | ||
216 | #endif | 217 | #endif |
217 | #ifdef HARVARD_CACHE | 218 | #ifdef HARVARD_CACHE |
218 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D line | 219 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D line |
@@ -234,7 +235,7 @@ v6_dma_inv_range: | |||
234 | v6_dma_clean_range: | 235 | v6_dma_clean_range: |
235 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | 236 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 |
236 | 1: | 237 | 1: |
237 | #ifdef CONFIG_SMP | 238 | #ifdef CONFIG_DMA_CACHE_RWFO |
238 | ldr r2, [r0] @ read for ownership | 239 | ldr r2, [r0] @ read for ownership |
239 | #endif | 240 | #endif |
240 | #ifdef HARVARD_CACHE | 241 | #ifdef HARVARD_CACHE |
@@ -257,7 +258,7 @@ v6_dma_clean_range: | |||
257 | ENTRY(v6_dma_flush_range) | 258 | ENTRY(v6_dma_flush_range) |
258 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | 259 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 |
259 | 1: | 260 | 1: |
260 | #ifdef CONFIG_SMP | 261 | #ifdef CONFIG_DMA_CACHE_RWFO |
261 | ldr r2, [r0] @ read for ownership | 262 | ldr r2, [r0] @ read for ownership |
262 | str r2, [r0] @ write for ownership | 263 | str r2, [r0] @ write for ownership |
263 | #endif | 264 | #endif |
@@ -283,9 +284,13 @@ ENTRY(v6_dma_map_area) | |||
283 | add r1, r1, r0 | 284 | add r1, r1, r0 |
284 | teq r2, #DMA_FROM_DEVICE | 285 | teq r2, #DMA_FROM_DEVICE |
285 | beq v6_dma_inv_range | 286 | beq v6_dma_inv_range |
287 | #ifndef CONFIG_DMA_CACHE_RWFO | ||
288 | b v6_dma_clean_range | ||
289 | #else | ||
286 | teq r2, #DMA_TO_DEVICE | 290 | teq r2, #DMA_TO_DEVICE |
287 | beq v6_dma_clean_range | 291 | beq v6_dma_clean_range |
288 | b v6_dma_flush_range | 292 | b v6_dma_flush_range |
293 | #endif | ||
289 | ENDPROC(v6_dma_map_area) | 294 | ENDPROC(v6_dma_map_area) |
290 | 295 | ||
291 | /* | 296 | /* |
@@ -295,6 +300,11 @@ ENDPROC(v6_dma_map_area) | |||
295 | * - dir - DMA direction | 300 | * - dir - DMA direction |
296 | */ | 301 | */ |
297 | ENTRY(v6_dma_unmap_area) | 302 | ENTRY(v6_dma_unmap_area) |
303 | #ifndef CONFIG_DMA_CACHE_RWFO | ||
304 | add r1, r1, r0 | ||
305 | teq r2, #DMA_TO_DEVICE | ||
306 | bne v6_dma_inv_range | ||
307 | #endif | ||
298 | mov pc, lr | 308 | mov pc, lr |
299 | ENDPROC(v6_dma_unmap_area) | 309 | ENDPROC(v6_dma_unmap_area) |
300 | 310 | ||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 13fa536d82e..9e7742f0a10 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -24,15 +24,6 @@ | |||
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | #include <asm/sizes.h> | 25 | #include <asm/sizes.h> |
26 | 26 | ||
27 | /* Sanity check size */ | ||
28 | #if (CONSISTENT_DMA_SIZE % SZ_2M) | ||
29 | #error "CONSISTENT_DMA_SIZE must be multiple of 2MiB" | ||
30 | #endif | ||
31 | |||
32 | #define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT) | ||
33 | #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT) | ||
34 | #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT) | ||
35 | |||
36 | static u64 get_coherent_dma_mask(struct device *dev) | 27 | static u64 get_coherent_dma_mask(struct device *dev) |
37 | { | 28 | { |
38 | u64 mask = ISA_DMA_THRESHOLD; | 29 | u64 mask = ISA_DMA_THRESHOLD; |
@@ -123,6 +114,15 @@ static void __dma_free_buffer(struct page *page, size_t size) | |||
123 | } | 114 | } |
124 | 115 | ||
125 | #ifdef CONFIG_MMU | 116 | #ifdef CONFIG_MMU |
117 | /* Sanity check size */ | ||
118 | #if (CONSISTENT_DMA_SIZE % SZ_2M) | ||
119 | #error "CONSISTENT_DMA_SIZE must be multiple of 2MiB" | ||
120 | #endif | ||
121 | |||
122 | #define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT) | ||
123 | #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT) | ||
124 | #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT) | ||
125 | |||
126 | /* | 126 | /* |
127 | * These are the page tables (2MB each) covering uncached, DMA consistent allocations | 127 | * These are the page tables (2MB each) covering uncached, DMA consistent allocations |
128 | */ | 128 | */ |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index c64875f11fa..44bafdab2dc 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -541,11 +541,11 @@ void omap_dm_timer_stop(struct omap_dm_timer *timer) | |||
541 | * timer is stopped | 541 | * timer is stopped |
542 | */ | 542 | */ |
543 | udelay(3500000 / clk_get_rate(timer->fclk) + 1); | 543 | udelay(3500000 / clk_get_rate(timer->fclk) + 1); |
544 | /* Ack possibly pending interrupt */ | ||
545 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, | ||
546 | OMAP_TIMER_INT_OVERFLOW); | ||
547 | #endif | 544 | #endif |
548 | } | 545 | } |
546 | /* Ack possibly pending interrupt */ | ||
547 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, | ||
548 | OMAP_TIMER_INT_OVERFLOW); | ||
549 | } | 549 | } |
550 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); | 550 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); |
551 | 551 | ||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 393e9219a5b..9b7e3545f32 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -673,6 +673,7 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio, | |||
673 | if (cpu_is_omap34xx() || cpu_is_omap44xx()) | 673 | if (cpu_is_omap34xx() || cpu_is_omap44xx()) |
674 | clk_disable(bank->dbck); | 674 | clk_disable(bank->dbck); |
675 | } | 675 | } |
676 | bank->dbck_enable_mask = val; | ||
676 | 677 | ||
677 | __raw_writel(val, reg); | 678 | __raw_writel(val, reg); |
678 | } | 679 | } |
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index e43983ba59c..8ce0de247c7 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c | |||
@@ -140,8 +140,10 @@ static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags) | |||
140 | return ERR_PTR(-ENOMEM); | 140 | return ERR_PTR(-ENOMEM); |
141 | 141 | ||
142 | err = sg_alloc_table(sgt, nr_entries, GFP_KERNEL); | 142 | err = sg_alloc_table(sgt, nr_entries, GFP_KERNEL); |
143 | if (err) | 143 | if (err) { |
144 | kfree(sgt); | ||
144 | return ERR_PTR(err); | 145 | return ERR_PTR(err); |
146 | } | ||
145 | 147 | ||
146 | pr_debug("%s: sgt:%p(%d entries)\n", __func__, sgt, nr_entries); | 148 | pr_debug("%s: sgt:%p(%d entries)\n", __func__, sgt, nr_entries); |
147 | 149 | ||
diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile index 6187edfbcb7..a17cc0c6a6b 100644 --- a/arch/arm/plat-pxa/Makefile +++ b/arch/arm/plat-pxa/Makefile | |||
@@ -2,8 +2,9 @@ | |||
2 | # Makefile for code common across different PXA processor families | 2 | # Makefile for code common across different PXA processor families |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := dma.o pmu.o | 5 | obj-y := dma.o |
6 | 6 | ||
7 | obj-$(CONFIG_ARCH_PXA) += pmu.o | ||
7 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o | 8 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o |
8 | obj-$(CONFIG_PXA3xx) += mfp.o | 9 | obj-$(CONFIG_PXA3xx) += mfp.o |
9 | obj-$(CONFIG_ARCH_MMP) += mfp.o | 10 | obj-$(CONFIG_ARCH_MMP) += mfp.o |
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index 5dfd916e9ea..7b3cdc6c6d9 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c | |||
@@ -121,7 +121,7 @@ static inline void down_spin(struct spinaphore *ss) | |||
121 | ia64_invala(); | 121 | ia64_invala(); |
122 | 122 | ||
123 | for (;;) { | 123 | for (;;) { |
124 | asm volatile ("ld4.c.nc %0=[%1]" : "=r"(serve) : "r"(&ss->serve) : "memory"); | 124 | asm volatile ("ld8.c.nc %0=[%1]" : "=r"(serve) : "r"(&ss->serve) : "memory"); |
125 | if (time_before(t, serve)) | 125 | if (time_before(t, serve)) |
126 | return; | 126 | return; |
127 | cpu_relax(); | 127 | cpu_relax(); |
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index 93a11d7edfa..e696144d2be 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <fcntl.h> | 11 | #include <fcntl.h> |
12 | #include <string.h> | 12 | #include <string.h> |
13 | #include <sys/stat.h> | ||
13 | #include <sys/mman.h> | 14 | #include <sys/mman.h> |
14 | #include <sys/param.h> | 15 | #include <sys/param.h> |
15 | #include "init.h" | 16 | #include "init.h" |
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index 611df11ba15..c2897b7b4a3 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c | |||
@@ -102,8 +102,8 @@ static const u64 amd_perfmon_event_map[] = | |||
102 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, | 102 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, |
103 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0080, | 103 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0080, |
104 | [PERF_COUNT_HW_CACHE_MISSES] = 0x0081, | 104 | [PERF_COUNT_HW_CACHE_MISSES] = 0x0081, |
105 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4, | 105 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c2, |
106 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5, | 106 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c3, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | static u64 amd_pmu_event_map(int hw_event) | 109 | static u64 amd_pmu_event_map(int hw_event) |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 142d70c74b0..725ef4d17cd 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -526,6 +526,7 @@ asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *eregs) | |||
526 | dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) | 526 | dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) |
527 | { | 527 | { |
528 | struct task_struct *tsk = current; | 528 | struct task_struct *tsk = current; |
529 | int user_icebp = 0; | ||
529 | unsigned long dr6; | 530 | unsigned long dr6; |
530 | int si_code; | 531 | int si_code; |
531 | 532 | ||
@@ -534,6 +535,14 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) | |||
534 | /* Filter out all the reserved bits which are preset to 1 */ | 535 | /* Filter out all the reserved bits which are preset to 1 */ |
535 | dr6 &= ~DR6_RESERVED; | 536 | dr6 &= ~DR6_RESERVED; |
536 | 537 | ||
538 | /* | ||
539 | * If dr6 has no reason to give us about the origin of this trap, | ||
540 | * then it's very likely the result of an icebp/int01 trap. | ||
541 | * User wants a sigtrap for that. | ||
542 | */ | ||
543 | if (!dr6 && user_mode(regs)) | ||
544 | user_icebp = 1; | ||
545 | |||
537 | /* Catch kmemcheck conditions first of all! */ | 546 | /* Catch kmemcheck conditions first of all! */ |
538 | if ((dr6 & DR_STEP) && kmemcheck_trap(regs)) | 547 | if ((dr6 & DR_STEP) && kmemcheck_trap(regs)) |
539 | return; | 548 | return; |
@@ -575,7 +584,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) | |||
575 | regs->flags &= ~X86_EFLAGS_TF; | 584 | regs->flags &= ~X86_EFLAGS_TF; |
576 | } | 585 | } |
577 | si_code = get_si_code(tsk->thread.debugreg6); | 586 | si_code = get_si_code(tsk->thread.debugreg6); |
578 | if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS)) | 587 | if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS) || user_icebp) |
579 | send_sigtrap(tsk, regs, error_code, si_code); | 588 | send_sigtrap(tsk, regs, error_code, si_code); |
580 | preempt_conditional_cli(regs); | 589 | preempt_conditional_cli(regs); |
581 | 590 | ||