diff options
Diffstat (limited to 'arch/arm')
89 files changed, 768 insertions, 491 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 15a177573b7..6344543974f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -2,6 +2,7 @@ config ARM | |||
2 | bool | 2 | bool |
3 | default y | 3 | default y |
4 | select HAVE_AOUT | 4 | select HAVE_AOUT |
5 | select HAVE_DMA_API_DEBUG | ||
5 | select HAVE_IDE | 6 | select HAVE_IDE |
6 | select HAVE_MEMBLOCK | 7 | select HAVE_MEMBLOCK |
7 | select RTC_LIB | 8 | select RTC_LIB |
@@ -34,6 +35,9 @@ config ARM | |||
34 | config HAVE_PWM | 35 | config HAVE_PWM |
35 | bool | 36 | bool |
36 | 37 | ||
38 | config MIGHT_HAVE_PCI | ||
39 | bool | ||
40 | |||
37 | config SYS_SUPPORTS_APM_EMULATION | 41 | config SYS_SUPPORTS_APM_EMULATION |
38 | bool | 42 | bool |
39 | 43 | ||
@@ -221,7 +225,7 @@ config ARCH_INTEGRATOR | |||
221 | bool "ARM Ltd. Integrator family" | 225 | bool "ARM Ltd. Integrator family" |
222 | select ARM_AMBA | 226 | select ARM_AMBA |
223 | select ARCH_HAS_CPUFREQ | 227 | select ARCH_HAS_CPUFREQ |
224 | select COMMON_CLKDEV | 228 | select CLKDEV_LOOKUP |
225 | select ICST | 229 | select ICST |
226 | select GENERIC_CLOCKEVENTS | 230 | select GENERIC_CLOCKEVENTS |
227 | select PLAT_VERSATILE | 231 | select PLAT_VERSATILE |
@@ -231,7 +235,7 @@ config ARCH_INTEGRATOR | |||
231 | config ARCH_REALVIEW | 235 | config ARCH_REALVIEW |
232 | bool "ARM Ltd. RealView family" | 236 | bool "ARM Ltd. RealView family" |
233 | select ARM_AMBA | 237 | select ARM_AMBA |
234 | select COMMON_CLKDEV | 238 | select CLKDEV_LOOKUP |
235 | select ICST | 239 | select ICST |
236 | select GENERIC_CLOCKEVENTS | 240 | select GENERIC_CLOCKEVENTS |
237 | select ARCH_WANT_OPTIONAL_GPIOLIB | 241 | select ARCH_WANT_OPTIONAL_GPIOLIB |
@@ -245,7 +249,7 @@ config ARCH_VERSATILE | |||
245 | bool "ARM Ltd. Versatile family" | 249 | bool "ARM Ltd. Versatile family" |
246 | select ARM_AMBA | 250 | select ARM_AMBA |
247 | select ARM_VIC | 251 | select ARM_VIC |
248 | select COMMON_CLKDEV | 252 | select CLKDEV_LOOKUP |
249 | select ICST | 253 | select ICST |
250 | select GENERIC_CLOCKEVENTS | 254 | select GENERIC_CLOCKEVENTS |
251 | select ARCH_WANT_OPTIONAL_GPIOLIB | 255 | select ARCH_WANT_OPTIONAL_GPIOLIB |
@@ -259,7 +263,7 @@ config ARCH_VEXPRESS | |||
259 | select ARCH_WANT_OPTIONAL_GPIOLIB | 263 | select ARCH_WANT_OPTIONAL_GPIOLIB |
260 | select ARM_AMBA | 264 | select ARM_AMBA |
261 | select ARM_TIMER_SP804 | 265 | select ARM_TIMER_SP804 |
262 | select COMMON_CLKDEV | 266 | select CLKDEV_LOOKUP |
263 | select GENERIC_CLOCKEVENTS | 267 | select GENERIC_CLOCKEVENTS |
264 | select HAVE_CLK | 268 | select HAVE_CLK |
265 | select ICST | 269 | select ICST |
@@ -280,7 +284,7 @@ config ARCH_BCMRING | |||
280 | depends on MMU | 284 | depends on MMU |
281 | select CPU_V6 | 285 | select CPU_V6 |
282 | select ARM_AMBA | 286 | select ARM_AMBA |
283 | select COMMON_CLKDEV | 287 | select CLKDEV_LOOKUP |
284 | select GENERIC_CLOCKEVENTS | 288 | select GENERIC_CLOCKEVENTS |
285 | select ARCH_WANT_OPTIONAL_GPIOLIB | 289 | select ARCH_WANT_OPTIONAL_GPIOLIB |
286 | help | 290 | help |
@@ -298,6 +302,7 @@ config ARCH_CNS3XXX | |||
298 | select CPU_V6 | 302 | select CPU_V6 |
299 | select GENERIC_CLOCKEVENTS | 303 | select GENERIC_CLOCKEVENTS |
300 | select ARM_GIC | 304 | select ARM_GIC |
305 | select MIGHT_HAVE_PCI | ||
301 | select PCI_DOMAINS if PCI | 306 | select PCI_DOMAINS if PCI |
302 | help | 307 | help |
303 | Support for Cavium Networks CNS3XXX platform. | 308 | Support for Cavium Networks CNS3XXX platform. |
@@ -327,7 +332,7 @@ config ARCH_EP93XX | |||
327 | select CPU_ARM920T | 332 | select CPU_ARM920T |
328 | select ARM_AMBA | 333 | select ARM_AMBA |
329 | select ARM_VIC | 334 | select ARM_VIC |
330 | select COMMON_CLKDEV | 335 | select CLKDEV_LOOKUP |
331 | select ARCH_REQUIRE_GPIOLIB | 336 | select ARCH_REQUIRE_GPIOLIB |
332 | select ARCH_HAS_HOLES_MEMORYMODEL | 337 | select ARCH_HAS_HOLES_MEMORYMODEL |
333 | select ARCH_USES_GETTIMEOFFSET | 338 | select ARCH_USES_GETTIMEOFFSET |
@@ -347,14 +352,14 @@ config ARCH_MXC | |||
347 | bool "Freescale MXC/iMX-based" | 352 | bool "Freescale MXC/iMX-based" |
348 | select GENERIC_CLOCKEVENTS | 353 | select GENERIC_CLOCKEVENTS |
349 | select ARCH_REQUIRE_GPIOLIB | 354 | select ARCH_REQUIRE_GPIOLIB |
350 | select COMMON_CLKDEV | 355 | select CLKDEV_LOOKUP |
351 | help | 356 | help |
352 | Support for Freescale MXC/iMX-based family of processors | 357 | Support for Freescale MXC/iMX-based family of processors |
353 | 358 | ||
354 | config ARCH_STMP3XXX | 359 | config ARCH_STMP3XXX |
355 | bool "Freescale STMP3xxx" | 360 | bool "Freescale STMP3xxx" |
356 | select CPU_ARM926T | 361 | select CPU_ARM926T |
357 | select COMMON_CLKDEV | 362 | select CLKDEV_LOOKUP |
358 | select ARCH_REQUIRE_GPIOLIB | 363 | select ARCH_REQUIRE_GPIOLIB |
359 | select GENERIC_CLOCKEVENTS | 364 | select GENERIC_CLOCKEVENTS |
360 | select USB_ARCH_HAS_EHCI | 365 | select USB_ARCH_HAS_EHCI |
@@ -433,6 +438,7 @@ config ARCH_IXP4XX | |||
433 | select CPU_XSCALE | 438 | select CPU_XSCALE |
434 | select GENERIC_GPIO | 439 | select GENERIC_GPIO |
435 | select GENERIC_CLOCKEVENTS | 440 | select GENERIC_CLOCKEVENTS |
441 | select MIGHT_HAVE_PCI | ||
436 | select DMABOUNCE if PCI | 442 | select DMABOUNCE if PCI |
437 | help | 443 | help |
438 | Support for Intel's IXP4XX (XScale) family of processors. | 444 | Support for Intel's IXP4XX (XScale) family of processors. |
@@ -472,7 +478,7 @@ config ARCH_LPC32XX | |||
472 | select HAVE_IDE | 478 | select HAVE_IDE |
473 | select ARM_AMBA | 479 | select ARM_AMBA |
474 | select USB_ARCH_HAS_OHCI | 480 | select USB_ARCH_HAS_OHCI |
475 | select COMMON_CLKDEV | 481 | select CLKDEV_LOOKUP |
476 | select GENERIC_TIME | 482 | select GENERIC_TIME |
477 | select GENERIC_CLOCKEVENTS | 483 | select GENERIC_CLOCKEVENTS |
478 | help | 484 | help |
@@ -506,7 +512,7 @@ config ARCH_MMP | |||
506 | bool "Marvell PXA168/910/MMP2" | 512 | bool "Marvell PXA168/910/MMP2" |
507 | depends on MMU | 513 | depends on MMU |
508 | select ARCH_REQUIRE_GPIOLIB | 514 | select ARCH_REQUIRE_GPIOLIB |
509 | select COMMON_CLKDEV | 515 | select CLKDEV_LOOKUP |
510 | select GENERIC_CLOCKEVENTS | 516 | select GENERIC_CLOCKEVENTS |
511 | select TICK_ONESHOT | 517 | select TICK_ONESHOT |
512 | select PLAT_PXA | 518 | select PLAT_PXA |
@@ -539,7 +545,7 @@ config ARCH_W90X900 | |||
539 | bool "Nuvoton W90X900 CPU" | 545 | bool "Nuvoton W90X900 CPU" |
540 | select CPU_ARM926T | 546 | select CPU_ARM926T |
541 | select ARCH_REQUIRE_GPIOLIB | 547 | select ARCH_REQUIRE_GPIOLIB |
542 | select COMMON_CLKDEV | 548 | select CLKDEV_LOOKUP |
543 | select GENERIC_CLOCKEVENTS | 549 | select GENERIC_CLOCKEVENTS |
544 | help | 550 | help |
545 | Support for Nuvoton (Winbond logic dept.) ARM9 processor, | 551 | Support for Nuvoton (Winbond logic dept.) ARM9 processor, |
@@ -553,7 +559,7 @@ config ARCH_W90X900 | |||
553 | config ARCH_NUC93X | 559 | config ARCH_NUC93X |
554 | bool "Nuvoton NUC93X CPU" | 560 | bool "Nuvoton NUC93X CPU" |
555 | select CPU_ARM926T | 561 | select CPU_ARM926T |
556 | select COMMON_CLKDEV | 562 | select CLKDEV_LOOKUP |
557 | help | 563 | help |
558 | Support for Nuvoton (Winbond logic dept.) NUC93X MCU,The NUC93X is a | 564 | Support for Nuvoton (Winbond logic dept.) NUC93X MCU,The NUC93X is a |
559 | low-power and high performance MPEG-4/JPEG multimedia controller chip. | 565 | low-power and high performance MPEG-4/JPEG multimedia controller chip. |
@@ -564,7 +570,7 @@ config ARCH_TEGRA | |||
564 | select GENERIC_CLOCKEVENTS | 570 | select GENERIC_CLOCKEVENTS |
565 | select GENERIC_GPIO | 571 | select GENERIC_GPIO |
566 | select HAVE_CLK | 572 | select HAVE_CLK |
567 | select COMMON_CLKDEV | 573 | select CLKDEV_LOOKUP |
568 | select ARCH_HAS_BARRIERS if CACHE_L2X0 | 574 | select ARCH_HAS_BARRIERS if CACHE_L2X0 |
569 | select ARCH_HAS_CPUFREQ | 575 | select ARCH_HAS_CPUFREQ |
570 | help | 576 | help |
@@ -574,7 +580,7 @@ config ARCH_TEGRA | |||
574 | config ARCH_PNX4008 | 580 | config ARCH_PNX4008 |
575 | bool "Philips Nexperia PNX4008 Mobile" | 581 | bool "Philips Nexperia PNX4008 Mobile" |
576 | select CPU_ARM926T | 582 | select CPU_ARM926T |
577 | select COMMON_CLKDEV | 583 | select CLKDEV_LOOKUP |
578 | select ARCH_USES_GETTIMEOFFSET | 584 | select ARCH_USES_GETTIMEOFFSET |
579 | help | 585 | help |
580 | This enables support for Philips PNX4008 mobile platform. | 586 | This enables support for Philips PNX4008 mobile platform. |
@@ -584,7 +590,7 @@ config ARCH_PXA | |||
584 | depends on MMU | 590 | depends on MMU |
585 | select ARCH_MTD_XIP | 591 | select ARCH_MTD_XIP |
586 | select ARCH_HAS_CPUFREQ | 592 | select ARCH_HAS_CPUFREQ |
587 | select COMMON_CLKDEV | 593 | select CLKDEV_LOOKUP |
588 | select ARCH_REQUIRE_GPIOLIB | 594 | select ARCH_REQUIRE_GPIOLIB |
589 | select GENERIC_CLOCKEVENTS | 595 | select GENERIC_CLOCKEVENTS |
590 | select TICK_ONESHOT | 596 | select TICK_ONESHOT |
@@ -761,7 +767,7 @@ config ARCH_TCC_926 | |||
761 | bool "Telechips TCC ARM926-based systems" | 767 | bool "Telechips TCC ARM926-based systems" |
762 | select CPU_ARM926T | 768 | select CPU_ARM926T |
763 | select HAVE_CLK | 769 | select HAVE_CLK |
764 | select COMMON_CLKDEV | 770 | select CLKDEV_LOOKUP |
765 | select GENERIC_CLOCKEVENTS | 771 | select GENERIC_CLOCKEVENTS |
766 | help | 772 | help |
767 | Support for Telechips TCC ARM926-based systems. | 773 | Support for Telechips TCC ARM926-based systems. |
@@ -785,7 +791,7 @@ config ARCH_U300 | |||
785 | select ARM_AMBA | 791 | select ARM_AMBA |
786 | select ARM_VIC | 792 | select ARM_VIC |
787 | select GENERIC_CLOCKEVENTS | 793 | select GENERIC_CLOCKEVENTS |
788 | select COMMON_CLKDEV | 794 | select CLKDEV_LOOKUP |
789 | select GENERIC_GPIO | 795 | select GENERIC_GPIO |
790 | help | 796 | help |
791 | Support for ST-Ericsson U300 series mobile platforms. | 797 | Support for ST-Ericsson U300 series mobile platforms. |
@@ -795,7 +801,7 @@ config ARCH_U8500 | |||
795 | select CPU_V7 | 801 | select CPU_V7 |
796 | select ARM_AMBA | 802 | select ARM_AMBA |
797 | select GENERIC_CLOCKEVENTS | 803 | select GENERIC_CLOCKEVENTS |
798 | select COMMON_CLKDEV | 804 | select CLKDEV_LOOKUP |
799 | select ARCH_REQUIRE_GPIOLIB | 805 | select ARCH_REQUIRE_GPIOLIB |
800 | help | 806 | help |
801 | Support for ST-Ericsson's Ux500 architecture | 807 | Support for ST-Ericsson's Ux500 architecture |
@@ -805,7 +811,7 @@ config ARCH_NOMADIK | |||
805 | select ARM_AMBA | 811 | select ARM_AMBA |
806 | select ARM_VIC | 812 | select ARM_VIC |
807 | select CPU_ARM926T | 813 | select CPU_ARM926T |
808 | select COMMON_CLKDEV | 814 | select CLKDEV_LOOKUP |
809 | select GENERIC_CLOCKEVENTS | 815 | select GENERIC_CLOCKEVENTS |
810 | select ARCH_REQUIRE_GPIOLIB | 816 | select ARCH_REQUIRE_GPIOLIB |
811 | help | 817 | help |
@@ -817,7 +823,7 @@ config ARCH_DAVINCI | |||
817 | select ARCH_REQUIRE_GPIOLIB | 823 | select ARCH_REQUIRE_GPIOLIB |
818 | select ZONE_DMA | 824 | select ZONE_DMA |
819 | select HAVE_IDE | 825 | select HAVE_IDE |
820 | select COMMON_CLKDEV | 826 | select CLKDEV_LOOKUP |
821 | select GENERIC_ALLOCATOR | 827 | select GENERIC_ALLOCATOR |
822 | select ARCH_HAS_HOLES_MEMORYMODEL | 828 | select ARCH_HAS_HOLES_MEMORYMODEL |
823 | help | 829 | help |
@@ -837,7 +843,7 @@ config PLAT_SPEAR | |||
837 | bool "ST SPEAr" | 843 | bool "ST SPEAr" |
838 | select ARM_AMBA | 844 | select ARM_AMBA |
839 | select ARCH_REQUIRE_GPIOLIB | 845 | select ARCH_REQUIRE_GPIOLIB |
840 | select COMMON_CLKDEV | 846 | select CLKDEV_LOOKUP |
841 | select GENERIC_CLOCKEVENTS | 847 | select GENERIC_CLOCKEVENTS |
842 | select HAVE_CLK | 848 | select HAVE_CLK |
843 | help | 849 | help |
@@ -1017,6 +1023,11 @@ config CPU_HAS_PMU | |||
1017 | default y | 1023 | default y |
1018 | bool | 1024 | bool |
1019 | 1025 | ||
1026 | config MULTI_IRQ_HANDLER | ||
1027 | bool | ||
1028 | help | ||
1029 | Allow each machine to specify it's own IRQ handler at run time. | ||
1030 | |||
1020 | if !MMU | 1031 | if !MMU |
1021 | source "arch/arm/Kconfig-nommu" | 1032 | source "arch/arm/Kconfig-nommu" |
1022 | endif | 1033 | endif |
@@ -1164,7 +1175,7 @@ config ISA_DMA_API | |||
1164 | bool | 1175 | bool |
1165 | 1176 | ||
1166 | config PCI | 1177 | config PCI |
1167 | bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695 || MACH_ARMCORE || ARCH_CNS3XXX | 1178 | bool "PCI support" if MIGHT_HAVE_PCI |
1168 | help | 1179 | help |
1169 | Find out whether you have a PCI motherboard. PCI is the name of a | 1180 | Find out whether you have a PCI motherboard. PCI is the name of a |
1170 | bus system, i.e. the way the CPU talks to the other stuff inside | 1181 | bus system, i.e. the way the CPU talks to the other stuff inside |
@@ -1311,7 +1322,7 @@ config HZ | |||
1311 | default 100 | 1322 | default 100 |
1312 | 1323 | ||
1313 | config THUMB2_KERNEL | 1324 | config THUMB2_KERNEL |
1314 | bool "Compile the kernel in Thumb-2 mode" | 1325 | bool "Compile the kernel in Thumb-2 mode (EXPERIMENTAL)" |
1315 | depends on CPU_V7 && EXPERIMENTAL | 1326 | depends on CPU_V7 && EXPERIMENTAL |
1316 | select AEABI | 1327 | select AEABI |
1317 | select ARM_ASM_UNIFIED | 1328 | select ARM_ASM_UNIFIED |
@@ -1525,6 +1536,7 @@ config SECCOMP | |||
1525 | 1536 | ||
1526 | config CC_STACKPROTECTOR | 1537 | config CC_STACKPROTECTOR |
1527 | bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)" | 1538 | bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)" |
1539 | depends on EXPERIMENTAL | ||
1528 | help | 1540 | help |
1529 | This option turns on the -fstack-protector GCC feature. This | 1541 | This option turns on the -fstack-protector GCC feature. This |
1530 | feature puts, at the beginning of functions, a canary value on | 1542 | feature puts, at the beginning of functions, a canary value on |
@@ -1708,7 +1720,7 @@ config CPU_FREQ_S3C | |||
1708 | Internal configuration node for common cpufreq on Samsung SoC | 1720 | Internal configuration node for common cpufreq on Samsung SoC |
1709 | 1721 | ||
1710 | config CPU_FREQ_S3C24XX | 1722 | config CPU_FREQ_S3C24XX |
1711 | bool "CPUfreq driver for Samsung S3C24XX series CPUs" | 1723 | bool "CPUfreq driver for Samsung S3C24XX series CPUs (EXPERIMENTAL)" |
1712 | depends on ARCH_S3C2410 && CPU_FREQ && EXPERIMENTAL | 1724 | depends on ARCH_S3C2410 && CPU_FREQ && EXPERIMENTAL |
1713 | select CPU_FREQ_S3C | 1725 | select CPU_FREQ_S3C |
1714 | help | 1726 | help |
@@ -1720,7 +1732,7 @@ config CPU_FREQ_S3C24XX | |||
1720 | If in doubt, say N. | 1732 | If in doubt, say N. |
1721 | 1733 | ||
1722 | config CPU_FREQ_S3C24XX_PLL | 1734 | config CPU_FREQ_S3C24XX_PLL |
1723 | bool "Support CPUfreq changing of PLL frequency" | 1735 | bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)" |
1724 | depends on CPU_FREQ_S3C24XX && EXPERIMENTAL | 1736 | depends on CPU_FREQ_S3C24XX && EXPERIMENTAL |
1725 | help | 1737 | help |
1726 | Compile in support for changing the PLL frequency from the | 1738 | Compile in support for changing the PLL frequency from the |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 2fd0b99afc4..a5775a56f0b 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -31,7 +31,7 @@ config FRAME_POINTER | |||
31 | reported is severely limited. | 31 | reported is severely limited. |
32 | 32 | ||
33 | config ARM_UNWIND | 33 | config ARM_UNWIND |
34 | bool "Enable stack unwinding support" | 34 | bool "Enable stack unwinding support (EXPERIMENTAL)" |
35 | depends on AEABI && EXPERIMENTAL | 35 | depends on AEABI && EXPERIMENTAL |
36 | default y | 36 | default y |
37 | help | 37 | help |
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 0a34c818692..778655f0257 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig | |||
@@ -37,7 +37,3 @@ config SHARP_PARAM | |||
37 | 37 | ||
38 | config SHARP_SCOOP | 38 | config SHARP_SCOOP |
39 | bool | 39 | bool |
40 | |||
41 | config COMMON_CLKDEV | ||
42 | bool | ||
43 | select HAVE_CLK | ||
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index e6e8664a941..799e140274f 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -16,4 +16,3 @@ obj-$(CONFIG_SHARP_SCOOP) += scoop.o | |||
16 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | 16 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o |
17 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o | 17 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o |
18 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o | 18 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o |
19 | obj-$(CONFIG_COMMON_CLKDEV) += clkdev.o | ||
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c deleted file mode 100644 index e2b2bb66e09..00000000000 --- a/arch/arm/common/clkdev.c +++ /dev/null | |||
@@ -1,179 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/common/clkdev.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Helper for the clk API to assist looking up a struct clk. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/device.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/mutex.h> | ||
20 | #include <linux/clk.h> | ||
21 | #include <linux/slab.h> | ||
22 | |||
23 | #include <asm/clkdev.h> | ||
24 | #include <mach/clkdev.h> | ||
25 | |||
26 | static LIST_HEAD(clocks); | ||
27 | static DEFINE_MUTEX(clocks_mutex); | ||
28 | |||
29 | /* | ||
30 | * Find the correct struct clk for the device and connection ID. | ||
31 | * We do slightly fuzzy matching here: | ||
32 | * An entry with a NULL ID is assumed to be a wildcard. | ||
33 | * If an entry has a device ID, it must match | ||
34 | * If an entry has a connection ID, it must match | ||
35 | * Then we take the most specific entry - with the following | ||
36 | * order of precedence: dev+con > dev only > con only. | ||
37 | */ | ||
38 | static struct clk *clk_find(const char *dev_id, const char *con_id) | ||
39 | { | ||
40 | struct clk_lookup *p; | ||
41 | struct clk *clk = NULL; | ||
42 | int match, best = 0; | ||
43 | |||
44 | list_for_each_entry(p, &clocks, node) { | ||
45 | match = 0; | ||
46 | if (p->dev_id) { | ||
47 | if (!dev_id || strcmp(p->dev_id, dev_id)) | ||
48 | continue; | ||
49 | match += 2; | ||
50 | } | ||
51 | if (p->con_id) { | ||
52 | if (!con_id || strcmp(p->con_id, con_id)) | ||
53 | continue; | ||
54 | match += 1; | ||
55 | } | ||
56 | |||
57 | if (match > best) { | ||
58 | clk = p->clk; | ||
59 | if (match != 3) | ||
60 | best = match; | ||
61 | else | ||
62 | break; | ||
63 | } | ||
64 | } | ||
65 | return clk; | ||
66 | } | ||
67 | |||
68 | struct clk *clk_get_sys(const char *dev_id, const char *con_id) | ||
69 | { | ||
70 | struct clk *clk; | ||
71 | |||
72 | mutex_lock(&clocks_mutex); | ||
73 | clk = clk_find(dev_id, con_id); | ||
74 | if (clk && !__clk_get(clk)) | ||
75 | clk = NULL; | ||
76 | mutex_unlock(&clocks_mutex); | ||
77 | |||
78 | return clk ? clk : ERR_PTR(-ENOENT); | ||
79 | } | ||
80 | EXPORT_SYMBOL(clk_get_sys); | ||
81 | |||
82 | struct clk *clk_get(struct device *dev, const char *con_id) | ||
83 | { | ||
84 | const char *dev_id = dev ? dev_name(dev) : NULL; | ||
85 | |||
86 | return clk_get_sys(dev_id, con_id); | ||
87 | } | ||
88 | EXPORT_SYMBOL(clk_get); | ||
89 | |||
90 | void clk_put(struct clk *clk) | ||
91 | { | ||
92 | __clk_put(clk); | ||
93 | } | ||
94 | EXPORT_SYMBOL(clk_put); | ||
95 | |||
96 | void clkdev_add(struct clk_lookup *cl) | ||
97 | { | ||
98 | mutex_lock(&clocks_mutex); | ||
99 | list_add_tail(&cl->node, &clocks); | ||
100 | mutex_unlock(&clocks_mutex); | ||
101 | } | ||
102 | EXPORT_SYMBOL(clkdev_add); | ||
103 | |||
104 | void __init clkdev_add_table(struct clk_lookup *cl, size_t num) | ||
105 | { | ||
106 | mutex_lock(&clocks_mutex); | ||
107 | while (num--) { | ||
108 | list_add_tail(&cl->node, &clocks); | ||
109 | cl++; | ||
110 | } | ||
111 | mutex_unlock(&clocks_mutex); | ||
112 | } | ||
113 | |||
114 | #define MAX_DEV_ID 20 | ||
115 | #define MAX_CON_ID 16 | ||
116 | |||
117 | struct clk_lookup_alloc { | ||
118 | struct clk_lookup cl; | ||
119 | char dev_id[MAX_DEV_ID]; | ||
120 | char con_id[MAX_CON_ID]; | ||
121 | }; | ||
122 | |||
123 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | ||
124 | const char *dev_fmt, ...) | ||
125 | { | ||
126 | struct clk_lookup_alloc *cla; | ||
127 | |||
128 | cla = kzalloc(sizeof(*cla), GFP_KERNEL); | ||
129 | if (!cla) | ||
130 | return NULL; | ||
131 | |||
132 | cla->cl.clk = clk; | ||
133 | if (con_id) { | ||
134 | strlcpy(cla->con_id, con_id, sizeof(cla->con_id)); | ||
135 | cla->cl.con_id = cla->con_id; | ||
136 | } | ||
137 | |||
138 | if (dev_fmt) { | ||
139 | va_list ap; | ||
140 | |||
141 | va_start(ap, dev_fmt); | ||
142 | vscnprintf(cla->dev_id, sizeof(cla->dev_id), dev_fmt, ap); | ||
143 | cla->cl.dev_id = cla->dev_id; | ||
144 | va_end(ap); | ||
145 | } | ||
146 | |||
147 | return &cla->cl; | ||
148 | } | ||
149 | EXPORT_SYMBOL(clkdev_alloc); | ||
150 | |||
151 | int clk_add_alias(const char *alias, const char *alias_dev_name, char *id, | ||
152 | struct device *dev) | ||
153 | { | ||
154 | struct clk *r = clk_get(dev, id); | ||
155 | struct clk_lookup *l; | ||
156 | |||
157 | if (IS_ERR(r)) | ||
158 | return PTR_ERR(r); | ||
159 | |||
160 | l = clkdev_alloc(r, alias, alias_dev_name); | ||
161 | clk_put(r); | ||
162 | if (!l) | ||
163 | return -ENODEV; | ||
164 | clkdev_add(l); | ||
165 | return 0; | ||
166 | } | ||
167 | EXPORT_SYMBOL(clk_add_alias); | ||
168 | |||
169 | /* | ||
170 | * clkdev_drop - remove a clock dynamically allocated | ||
171 | */ | ||
172 | void clkdev_drop(struct clk_lookup *cl) | ||
173 | { | ||
174 | mutex_lock(&clocks_mutex); | ||
175 | list_del(&cl->node); | ||
176 | mutex_unlock(&clocks_mutex); | ||
177 | kfree(cl); | ||
178 | } | ||
179 | EXPORT_SYMBOL(clkdev_drop); | ||
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index cc0a932bbea..e5681636626 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -328,7 +328,7 @@ static inline void unmap_single(struct device *dev, dma_addr_t dma_addr, | |||
328 | * substitute the safe buffer for the unsafe one. | 328 | * substitute the safe buffer for the unsafe one. |
329 | * (basically move the buffer from an unsafe area to a safe one) | 329 | * (basically move the buffer from an unsafe area to a safe one) |
330 | */ | 330 | */ |
331 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 331 | dma_addr_t __dma_map_single(struct device *dev, void *ptr, size_t size, |
332 | enum dma_data_direction dir) | 332 | enum dma_data_direction dir) |
333 | { | 333 | { |
334 | dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", | 334 | dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", |
@@ -338,7 +338,7 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
338 | 338 | ||
339 | return map_single(dev, ptr, size, dir); | 339 | return map_single(dev, ptr, size, dir); |
340 | } | 340 | } |
341 | EXPORT_SYMBOL(dma_map_single); | 341 | EXPORT_SYMBOL(__dma_map_single); |
342 | 342 | ||
343 | /* | 343 | /* |
344 | * see if a mapped address was really a "safe" buffer and if so, copy | 344 | * see if a mapped address was really a "safe" buffer and if so, copy |
@@ -346,7 +346,7 @@ EXPORT_SYMBOL(dma_map_single); | |||
346 | * the safe buffer. (basically return things back to the way they | 346 | * the safe buffer. (basically return things back to the way they |
347 | * should be) | 347 | * should be) |
348 | */ | 348 | */ |
349 | void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | 349 | void __dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, |
350 | enum dma_data_direction dir) | 350 | enum dma_data_direction dir) |
351 | { | 351 | { |
352 | dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", | 352 | dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", |
@@ -354,9 +354,9 @@ void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
354 | 354 | ||
355 | unmap_single(dev, dma_addr, size, dir); | 355 | unmap_single(dev, dma_addr, size, dir); |
356 | } | 356 | } |
357 | EXPORT_SYMBOL(dma_unmap_single); | 357 | EXPORT_SYMBOL(__dma_unmap_single); |
358 | 358 | ||
359 | dma_addr_t dma_map_page(struct device *dev, struct page *page, | 359 | dma_addr_t __dma_map_page(struct device *dev, struct page *page, |
360 | unsigned long offset, size_t size, enum dma_data_direction dir) | 360 | unsigned long offset, size_t size, enum dma_data_direction dir) |
361 | { | 361 | { |
362 | dev_dbg(dev, "%s(page=%p,off=%#lx,size=%zx,dir=%x)\n", | 362 | dev_dbg(dev, "%s(page=%p,off=%#lx,size=%zx,dir=%x)\n", |
@@ -372,7 +372,7 @@ dma_addr_t dma_map_page(struct device *dev, struct page *page, | |||
372 | 372 | ||
373 | return map_single(dev, page_address(page) + offset, size, dir); | 373 | return map_single(dev, page_address(page) + offset, size, dir); |
374 | } | 374 | } |
375 | EXPORT_SYMBOL(dma_map_page); | 375 | EXPORT_SYMBOL(__dma_map_page); |
376 | 376 | ||
377 | /* | 377 | /* |
378 | * see if a mapped address was really a "safe" buffer and if so, copy | 378 | * see if a mapped address was really a "safe" buffer and if so, copy |
@@ -380,7 +380,7 @@ EXPORT_SYMBOL(dma_map_page); | |||
380 | * the safe buffer. (basically return things back to the way they | 380 | * the safe buffer. (basically return things back to the way they |
381 | * should be) | 381 | * should be) |
382 | */ | 382 | */ |
383 | void dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size, | 383 | void __dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size, |
384 | enum dma_data_direction dir) | 384 | enum dma_data_direction dir) |
385 | { | 385 | { |
386 | dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", | 386 | dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", |
@@ -388,7 +388,7 @@ void dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
388 | 388 | ||
389 | unmap_single(dev, dma_addr, size, dir); | 389 | unmap_single(dev, dma_addr, size, dir); |
390 | } | 390 | } |
391 | EXPORT_SYMBOL(dma_unmap_page); | 391 | EXPORT_SYMBOL(__dma_unmap_page); |
392 | 392 | ||
393 | int dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr, | 393 | int dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr, |
394 | unsigned long off, size_t sz, enum dma_data_direction dir) | 394 | unsigned long off, size_t sz, enum dma_data_direction dir) |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 72d3389e9c1..bc2d2d75f70 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
21 | #include <asm/domain.h> | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Endian independent macros for shifting bytes within registers. | 24 | * Endian independent macros for shifting bytes within registers. |
@@ -222,12 +223,12 @@ | |||
222 | */ | 223 | */ |
223 | #ifdef CONFIG_THUMB2_KERNEL | 224 | #ifdef CONFIG_THUMB2_KERNEL |
224 | 225 | ||
225 | .macro usraccoff, instr, reg, ptr, inc, off, cond, abort | 226 | .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=T() |
226 | 9999: | 227 | 9999: |
227 | .if \inc == 1 | 228 | .if \inc == 1 |
228 | \instr\cond\()bt \reg, [\ptr, #\off] | 229 | \instr\cond\()b\()\t\().w \reg, [\ptr, #\off] |
229 | .elseif \inc == 4 | 230 | .elseif \inc == 4 |
230 | \instr\cond\()t \reg, [\ptr, #\off] | 231 | \instr\cond\()\t\().w \reg, [\ptr, #\off] |
231 | .else | 232 | .else |
232 | .error "Unsupported inc macro argument" | 233 | .error "Unsupported inc macro argument" |
233 | .endif | 234 | .endif |
@@ -262,13 +263,13 @@ | |||
262 | 263 | ||
263 | #else /* !CONFIG_THUMB2_KERNEL */ | 264 | #else /* !CONFIG_THUMB2_KERNEL */ |
264 | 265 | ||
265 | .macro usracc, instr, reg, ptr, inc, cond, rept, abort | 266 | .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=T() |
266 | .rept \rept | 267 | .rept \rept |
267 | 9999: | 268 | 9999: |
268 | .if \inc == 1 | 269 | .if \inc == 1 |
269 | \instr\cond\()bt \reg, [\ptr], #\inc | 270 | \instr\cond\()b\()\t \reg, [\ptr], #\inc |
270 | .elseif \inc == 4 | 271 | .elseif \inc == 4 |
271 | \instr\cond\()t \reg, [\ptr], #\inc | 272 | \instr\cond\()\t \reg, [\ptr], #\inc |
272 | .else | 273 | .else |
273 | .error "Unsupported inc macro argument" | 274 | .error "Unsupported inc macro argument" |
274 | .endif | 275 | .endif |
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index 9d6122096fb..75fe66bc02b 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h | |||
@@ -23,4 +23,6 @@ | |||
23 | #define ARCH_SLAB_MINALIGN 8 | 23 | #define ARCH_SLAB_MINALIGN 8 |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #define __read_mostly __attribute__((__section__(".data..read_mostly"))) | ||
27 | |||
26 | #endif | 28 | #endif |
diff --git a/arch/arm/include/asm/clkdev.h b/arch/arm/include/asm/clkdev.h index b56c1389b6f..765d3322236 100644 --- a/arch/arm/include/asm/clkdev.h +++ b/arch/arm/include/asm/clkdev.h | |||
@@ -12,23 +12,13 @@ | |||
12 | #ifndef __ASM_CLKDEV_H | 12 | #ifndef __ASM_CLKDEV_H |
13 | #define __ASM_CLKDEV_H | 13 | #define __ASM_CLKDEV_H |
14 | 14 | ||
15 | struct clk; | 15 | #include <linux/slab.h> |
16 | struct device; | ||
17 | 16 | ||
18 | struct clk_lookup { | 17 | #include <mach/clkdev.h> |
19 | struct list_head node; | ||
20 | const char *dev_id; | ||
21 | const char *con_id; | ||
22 | struct clk *clk; | ||
23 | }; | ||
24 | 18 | ||
25 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | 19 | static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size) |
26 | const char *dev_fmt, ...); | 20 | { |
27 | 21 | return kzalloc(size, GFP_KERNEL); | |
28 | void clkdev_add(struct clk_lookup *cl); | 22 | } |
29 | void clkdev_drop(struct clk_lookup *cl); | ||
30 | |||
31 | void clkdev_add_table(struct clk_lookup *, size_t); | ||
32 | int clk_add_alias(const char *, const char *, char *, struct device *); | ||
33 | 23 | ||
34 | #endif | 24 | #endif |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index c568da7dcae..4fff837363e 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -5,24 +5,29 @@ | |||
5 | 5 | ||
6 | #include <linux/mm_types.h> | 6 | #include <linux/mm_types.h> |
7 | #include <linux/scatterlist.h> | 7 | #include <linux/scatterlist.h> |
8 | #include <linux/dma-debug.h> | ||
8 | 9 | ||
9 | #include <asm-generic/dma-coherent.h> | 10 | #include <asm-generic/dma-coherent.h> |
10 | #include <asm/memory.h> | 11 | #include <asm/memory.h> |
11 | 12 | ||
13 | #ifdef __arch_page_to_dma | ||
14 | #error Please update to __arch_pfn_to_dma | ||
15 | #endif | ||
16 | |||
12 | /* | 17 | /* |
13 | * page_to_dma/dma_to_virt/virt_to_dma are architecture private functions | 18 | * dma_to_pfn/pfn_to_dma/dma_to_virt/virt_to_dma are architecture private |
14 | * used internally by the DMA-mapping API to provide DMA addresses. They | 19 | * functions used internally by the DMA-mapping API to provide DMA |
15 | * must not be used by drivers. | 20 | * addresses. They must not be used by drivers. |
16 | */ | 21 | */ |
17 | #ifndef __arch_page_to_dma | 22 | #ifndef __arch_pfn_to_dma |
18 | static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) | 23 | static inline dma_addr_t pfn_to_dma(struct device *dev, unsigned long pfn) |
19 | { | 24 | { |
20 | return (dma_addr_t)__pfn_to_bus(page_to_pfn(page)); | 25 | return (dma_addr_t)__pfn_to_bus(pfn); |
21 | } | 26 | } |
22 | 27 | ||
23 | static inline struct page *dma_to_page(struct device *dev, dma_addr_t addr) | 28 | static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) |
24 | { | 29 | { |
25 | return pfn_to_page(__bus_to_pfn(addr)); | 30 | return __bus_to_pfn(addr); |
26 | } | 31 | } |
27 | 32 | ||
28 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) | 33 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) |
@@ -35,14 +40,14 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) | |||
35 | return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); | 40 | return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); |
36 | } | 41 | } |
37 | #else | 42 | #else |
38 | static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) | 43 | static inline dma_addr_t pfn_to_dma(struct device *dev, unsigned long pfn) |
39 | { | 44 | { |
40 | return __arch_page_to_dma(dev, page); | 45 | return __arch_pfn_to_dma(dev, pfn); |
41 | } | 46 | } |
42 | 47 | ||
43 | static inline struct page *dma_to_page(struct device *dev, dma_addr_t addr) | 48 | static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) |
44 | { | 49 | { |
45 | return __arch_dma_to_page(dev, addr); | 50 | return __arch_dma_to_pfn(dev, addr); |
46 | } | 51 | } |
47 | 52 | ||
48 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) | 53 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) |
@@ -293,13 +298,13 @@ extern int dma_needs_bounce(struct device*, dma_addr_t, size_t); | |||
293 | /* | 298 | /* |
294 | * The DMA API, implemented by dmabounce.c. See below for descriptions. | 299 | * The DMA API, implemented by dmabounce.c. See below for descriptions. |
295 | */ | 300 | */ |
296 | extern dma_addr_t dma_map_single(struct device *, void *, size_t, | 301 | extern dma_addr_t __dma_map_single(struct device *, void *, size_t, |
297 | enum dma_data_direction); | 302 | enum dma_data_direction); |
298 | extern void dma_unmap_single(struct device *, dma_addr_t, size_t, | 303 | extern void __dma_unmap_single(struct device *, dma_addr_t, size_t, |
299 | enum dma_data_direction); | 304 | enum dma_data_direction); |
300 | extern dma_addr_t dma_map_page(struct device *, struct page *, | 305 | extern dma_addr_t __dma_map_page(struct device *, struct page *, |
301 | unsigned long, size_t, enum dma_data_direction); | 306 | unsigned long, size_t, enum dma_data_direction); |
302 | extern void dma_unmap_page(struct device *, dma_addr_t, size_t, | 307 | extern void __dma_unmap_page(struct device *, dma_addr_t, size_t, |
303 | enum dma_data_direction); | 308 | enum dma_data_direction); |
304 | 309 | ||
305 | /* | 310 | /* |
@@ -323,6 +328,34 @@ static inline int dmabounce_sync_for_device(struct device *d, dma_addr_t addr, | |||
323 | } | 328 | } |
324 | 329 | ||
325 | 330 | ||
331 | static inline dma_addr_t __dma_map_single(struct device *dev, void *cpu_addr, | ||
332 | size_t size, enum dma_data_direction dir) | ||
333 | { | ||
334 | __dma_single_cpu_to_dev(cpu_addr, size, dir); | ||
335 | return virt_to_dma(dev, cpu_addr); | ||
336 | } | ||
337 | |||
338 | static inline dma_addr_t __dma_map_page(struct device *dev, struct page *page, | ||
339 | unsigned long offset, size_t size, enum dma_data_direction dir) | ||
340 | { | ||
341 | __dma_page_cpu_to_dev(page, offset, size, dir); | ||
342 | return pfn_to_dma(dev, page_to_pfn(page)) + offset; | ||
343 | } | ||
344 | |||
345 | static inline void __dma_unmap_single(struct device *dev, dma_addr_t handle, | ||
346 | size_t size, enum dma_data_direction dir) | ||
347 | { | ||
348 | __dma_single_dev_to_cpu(dma_to_virt(dev, handle), size, dir); | ||
349 | } | ||
350 | |||
351 | static inline void __dma_unmap_page(struct device *dev, dma_addr_t handle, | ||
352 | size_t size, enum dma_data_direction dir) | ||
353 | { | ||
354 | __dma_page_dev_to_cpu(pfn_to_page(dma_to_pfn(dev, handle)), | ||
355 | handle & ~PAGE_MASK, size, dir); | ||
356 | } | ||
357 | #endif /* CONFIG_DMABOUNCE */ | ||
358 | |||
326 | /** | 359 | /** |
327 | * dma_map_single - map a single buffer for streaming DMA | 360 | * dma_map_single - map a single buffer for streaming DMA |
328 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices | 361 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices |
@@ -340,11 +373,16 @@ static inline int dmabounce_sync_for_device(struct device *d, dma_addr_t addr, | |||
340 | static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, | 373 | static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, |
341 | size_t size, enum dma_data_direction dir) | 374 | size_t size, enum dma_data_direction dir) |
342 | { | 375 | { |
376 | dma_addr_t addr; | ||
377 | |||
343 | BUG_ON(!valid_dma_direction(dir)); | 378 | BUG_ON(!valid_dma_direction(dir)); |
344 | 379 | ||
345 | __dma_single_cpu_to_dev(cpu_addr, size, dir); | 380 | addr = __dma_map_single(dev, cpu_addr, size, dir); |
381 | debug_dma_map_page(dev, virt_to_page(cpu_addr), | ||
382 | (unsigned long)cpu_addr & ~PAGE_MASK, size, | ||
383 | dir, addr, true); | ||
346 | 384 | ||
347 | return virt_to_dma(dev, cpu_addr); | 385 | return addr; |
348 | } | 386 | } |
349 | 387 | ||
350 | /** | 388 | /** |
@@ -364,11 +402,14 @@ static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, | |||
364 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | 402 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, |
365 | unsigned long offset, size_t size, enum dma_data_direction dir) | 403 | unsigned long offset, size_t size, enum dma_data_direction dir) |
366 | { | 404 | { |
405 | dma_addr_t addr; | ||
406 | |||
367 | BUG_ON(!valid_dma_direction(dir)); | 407 | BUG_ON(!valid_dma_direction(dir)); |
368 | 408 | ||
369 | __dma_page_cpu_to_dev(page, offset, size, dir); | 409 | addr = __dma_map_page(dev, page, offset, size, dir); |
410 | debug_dma_map_page(dev, page, offset, size, dir, addr, false); | ||
370 | 411 | ||
371 | return page_to_dma(dev, page) + offset; | 412 | return addr; |
372 | } | 413 | } |
373 | 414 | ||
374 | /** | 415 | /** |
@@ -388,7 +429,8 @@ static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | |||
388 | static inline void dma_unmap_single(struct device *dev, dma_addr_t handle, | 429 | static inline void dma_unmap_single(struct device *dev, dma_addr_t handle, |
389 | size_t size, enum dma_data_direction dir) | 430 | size_t size, enum dma_data_direction dir) |
390 | { | 431 | { |
391 | __dma_single_dev_to_cpu(dma_to_virt(dev, handle), size, dir); | 432 | debug_dma_unmap_page(dev, handle, size, dir, true); |
433 | __dma_unmap_single(dev, handle, size, dir); | ||
392 | } | 434 | } |
393 | 435 | ||
394 | /** | 436 | /** |
@@ -408,10 +450,9 @@ static inline void dma_unmap_single(struct device *dev, dma_addr_t handle, | |||
408 | static inline void dma_unmap_page(struct device *dev, dma_addr_t handle, | 450 | static inline void dma_unmap_page(struct device *dev, dma_addr_t handle, |
409 | size_t size, enum dma_data_direction dir) | 451 | size_t size, enum dma_data_direction dir) |
410 | { | 452 | { |
411 | __dma_page_dev_to_cpu(dma_to_page(dev, handle), handle & ~PAGE_MASK, | 453 | debug_dma_unmap_page(dev, handle, size, dir, false); |
412 | size, dir); | 454 | __dma_unmap_page(dev, handle, size, dir); |
413 | } | 455 | } |
414 | #endif /* CONFIG_DMABOUNCE */ | ||
415 | 456 | ||
416 | /** | 457 | /** |
417 | * dma_sync_single_range_for_cpu | 458 | * dma_sync_single_range_for_cpu |
@@ -437,6 +478,8 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev, | |||
437 | { | 478 | { |
438 | BUG_ON(!valid_dma_direction(dir)); | 479 | BUG_ON(!valid_dma_direction(dir)); |
439 | 480 | ||
481 | debug_dma_sync_single_for_cpu(dev, handle + offset, size, dir); | ||
482 | |||
440 | if (!dmabounce_sync_for_cpu(dev, handle, offset, size, dir)) | 483 | if (!dmabounce_sync_for_cpu(dev, handle, offset, size, dir)) |
441 | return; | 484 | return; |
442 | 485 | ||
@@ -449,6 +492,8 @@ static inline void dma_sync_single_range_for_device(struct device *dev, | |||
449 | { | 492 | { |
450 | BUG_ON(!valid_dma_direction(dir)); | 493 | BUG_ON(!valid_dma_direction(dir)); |
451 | 494 | ||
495 | debug_dma_sync_single_for_device(dev, handle + offset, size, dir); | ||
496 | |||
452 | if (!dmabounce_sync_for_device(dev, handle, offset, size, dir)) | 497 | if (!dmabounce_sync_for_device(dev, handle, offset, size, dir)) |
453 | return; | 498 | return; |
454 | 499 | ||
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h index cc7ef408071..af18ceaacf5 100644 --- a/arch/arm/include/asm/domain.h +++ b/arch/arm/include/asm/domain.h | |||
@@ -45,13 +45,17 @@ | |||
45 | */ | 45 | */ |
46 | #define DOMAIN_NOACCESS 0 | 46 | #define DOMAIN_NOACCESS 0 |
47 | #define DOMAIN_CLIENT 1 | 47 | #define DOMAIN_CLIENT 1 |
48 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
48 | #define DOMAIN_MANAGER 3 | 49 | #define DOMAIN_MANAGER 3 |
50 | #else | ||
51 | #define DOMAIN_MANAGER 1 | ||
52 | #endif | ||
49 | 53 | ||
50 | #define domain_val(dom,type) ((type) << (2*(dom))) | 54 | #define domain_val(dom,type) ((type) << (2*(dom))) |
51 | 55 | ||
52 | #ifndef __ASSEMBLY__ | 56 | #ifndef __ASSEMBLY__ |
53 | 57 | ||
54 | #ifdef CONFIG_MMU | 58 | #ifdef CONFIG_CPU_USE_DOMAINS |
55 | #define set_domain(x) \ | 59 | #define set_domain(x) \ |
56 | do { \ | 60 | do { \ |
57 | __asm__ __volatile__( \ | 61 | __asm__ __volatile__( \ |
@@ -74,5 +78,28 @@ | |||
74 | #define modify_domain(dom,type) do { } while (0) | 78 | #define modify_domain(dom,type) do { } while (0) |
75 | #endif | 79 | #endif |
76 | 80 | ||
81 | /* | ||
82 | * Generate the T (user) versions of the LDR/STR and related | ||
83 | * instructions (inline assembly) | ||
84 | */ | ||
85 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
86 | #define T(instr) #instr "t" | ||
87 | #else | ||
88 | #define T(instr) #instr | ||
77 | #endif | 89 | #endif |
78 | #endif /* !__ASSEMBLY__ */ | 90 | |
91 | #else /* __ASSEMBLY__ */ | ||
92 | |||
93 | /* | ||
94 | * Generate the T (user) versions of the LDR/STR and related | ||
95 | * instructions | ||
96 | */ | ||
97 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
98 | #define T(instr) instr ## t | ||
99 | #else | ||
100 | #define T(instr) instr | ||
101 | #endif | ||
102 | |||
103 | #endif /* __ASSEMBLY__ */ | ||
104 | |||
105 | #endif /* !__ASM_PROC_DOMAIN_H */ | ||
diff --git a/arch/arm/include/asm/entry-macro-multi.S b/arch/arm/include/asm/entry-macro-multi.S new file mode 100644 index 00000000000..ec0bbf79c71 --- /dev/null +++ b/arch/arm/include/asm/entry-macro-multi.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Interrupt handling. Preserves r7, r8, r9 | ||
3 | */ | ||
4 | .macro arch_irq_handler_default | ||
5 | get_irqnr_preamble r5, lr | ||
6 | 1: get_irqnr_and_base r0, r6, r5, lr | ||
7 | movne r1, sp | ||
8 | @ | ||
9 | @ routine called with r0 = irq number, r1 = struct pt_regs * | ||
10 | @ | ||
11 | adrne lr, BSYM(1b) | ||
12 | bne asm_do_IRQ | ||
13 | |||
14 | #ifdef CONFIG_SMP | ||
15 | /* | ||
16 | * XXX | ||
17 | * | ||
18 | * this macro assumes that irqstat (r6) and base (r5) are | ||
19 | * preserved from get_irqnr_and_base above | ||
20 | */ | ||
21 | ALT_SMP(test_for_ipi r0, r6, r5, lr) | ||
22 | ALT_UP_B(9997f) | ||
23 | movne r1, sp | ||
24 | adrne lr, BSYM(1b) | ||
25 | bne do_IPI | ||
26 | |||
27 | #ifdef CONFIG_LOCAL_TIMERS | ||
28 | test_for_ltirq r0, r6, r5, lr | ||
29 | movne r0, sp | ||
30 | adrne lr, BSYM(1b) | ||
31 | bne do_local_timer | ||
32 | #endif | ||
33 | #endif | ||
34 | 9997: | ||
35 | .endm | ||
36 | |||
37 | .macro arch_irq_handler, symbol_name | ||
38 | .align 5 | ||
39 | .global \symbol_name | ||
40 | \symbol_name: | ||
41 | mov r4, lr | ||
42 | arch_irq_handler_default | ||
43 | mov pc, r4 | ||
44 | .endm | ||
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index 540a044153a..b33fe7065b3 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
@@ -13,12 +13,13 @@ | |||
13 | #include <linux/preempt.h> | 13 | #include <linux/preempt.h> |
14 | #include <linux/uaccess.h> | 14 | #include <linux/uaccess.h> |
15 | #include <asm/errno.h> | 15 | #include <asm/errno.h> |
16 | #include <asm/domain.h> | ||
16 | 17 | ||
17 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 18 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ |
18 | __asm__ __volatile__( \ | 19 | __asm__ __volatile__( \ |
19 | "1: ldrt %1, [%2]\n" \ | 20 | "1: " T(ldr) " %1, [%2]\n" \ |
20 | " " insn "\n" \ | 21 | " " insn "\n" \ |
21 | "2: strt %0, [%2]\n" \ | 22 | "2: " T(str) " %0, [%2]\n" \ |
22 | " mov %0, #0\n" \ | 23 | " mov %0, #0\n" \ |
23 | "3:\n" \ | 24 | "3:\n" \ |
24 | " .pushsection __ex_table,\"a\"\n" \ | 25 | " .pushsection __ex_table,\"a\"\n" \ |
@@ -97,10 +98,10 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
97 | pagefault_disable(); /* implies preempt_disable() */ | 98 | pagefault_disable(); /* implies preempt_disable() */ |
98 | 99 | ||
99 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" | 100 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" |
100 | "1: ldrt %0, [%3]\n" | 101 | "1: " T(ldr) " %0, [%3]\n" |
101 | " teq %0, %1\n" | 102 | " teq %0, %1\n" |
102 | " it eq @ explicit IT needed for the 2b label\n" | 103 | " it eq @ explicit IT needed for the 2b label\n" |
103 | "2: streqt %2, [%3]\n" | 104 | "2: " T(streq) " %2, [%3]\n" |
104 | "3:\n" | 105 | "3:\n" |
105 | " .pushsection __ex_table,\"a\"\n" | 106 | " .pushsection __ex_table,\"a\"\n" |
106 | " .align 3\n" | 107 | " .align 3\n" |
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index d97a964207f..3a0893a76a3 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -37,12 +37,21 @@ struct machine_desc { | |||
37 | struct meminfo *); | 37 | struct meminfo *); |
38 | void (*reserve)(void);/* reserve mem blocks */ | 38 | void (*reserve)(void);/* reserve mem blocks */ |
39 | void (*map_io)(void);/* IO mapping function */ | 39 | void (*map_io)(void);/* IO mapping function */ |
40 | void (*init_early)(void); | ||
40 | void (*init_irq)(void); | 41 | void (*init_irq)(void); |
41 | struct sys_timer *timer; /* system tick timer */ | 42 | struct sys_timer *timer; /* system tick timer */ |
42 | void (*init_machine)(void); | 43 | void (*init_machine)(void); |
44 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
45 | void (*handle_irq)(struct pt_regs *); | ||
46 | #endif | ||
43 | }; | 47 | }; |
44 | 48 | ||
45 | /* | 49 | /* |
50 | * Current machine - only accessible during boot. | ||
51 | */ | ||
52 | extern struct machine_desc *machine_desc; | ||
53 | |||
54 | /* | ||
46 | * Set of macros to define architecture features. This is built into | 55 | * Set of macros to define architecture features. This is built into |
47 | * a table by the linker. | 56 | * a table by the linker. |
48 | */ | 57 | */ |
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index 2bc47fb94d5..22ac140edd9 100644 --- a/arch/arm/include/asm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h | |||
@@ -17,11 +17,13 @@ struct seq_file; | |||
17 | /* | 17 | /* |
18 | * This is internal. Do not use it. | 18 | * This is internal. Do not use it. |
19 | */ | 19 | */ |
20 | extern unsigned int arch_nr_irqs; | ||
21 | extern void (*init_arch_irq)(void); | ||
22 | extern void init_FIQ(void); | 20 | extern void init_FIQ(void); |
23 | extern int show_fiq_list(struct seq_file *, int); | 21 | extern int show_fiq_list(struct seq_file *, int); |
24 | 22 | ||
23 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
24 | extern void (*handle_arch_irq)(struct pt_regs *); | ||
25 | #endif | ||
26 | |||
25 | /* | 27 | /* |
26 | * This is for easy migration, but should be changed in the source | 28 | * This is for easy migration, but should be changed in the source |
27 | */ | 29 | */ |
diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h index 35d408f6dcc..883f6be5117 100644 --- a/arch/arm/include/asm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h | |||
@@ -43,7 +43,6 @@ struct sys_timer { | |||
43 | #endif | 43 | #endif |
44 | }; | 44 | }; |
45 | 45 | ||
46 | extern struct sys_timer *system_timer; | ||
47 | extern void timer_tick(void); | 46 | extern void timer_tick(void); |
48 | 47 | ||
49 | #endif | 48 | #endif |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 1120f18a6b1..9ab8d7e6473 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -119,6 +119,13 @@ extern unsigned int user_debug; | |||
119 | #define vectors_high() (0) | 119 | #define vectors_high() (0) |
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | #if __LINUX_ARM_ARCH__ >= 7 || \ | ||
123 | (__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) | ||
124 | #define sev() __asm__ __volatile__ ("sev" : : : "memory") | ||
125 | #define wfe() __asm__ __volatile__ ("wfe" : : : "memory") | ||
126 | #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") | ||
127 | #endif | ||
128 | |||
122 | #if __LINUX_ARM_ARCH__ >= 7 | 129 | #if __LINUX_ARM_ARCH__ >= 7 |
123 | #define isb() __asm__ __volatile__ ("isb" : : : "memory") | 130 | #define isb() __asm__ __volatile__ ("isb" : : : "memory") |
124 | #define dsb() __asm__ __volatile__ ("dsb" : : : "memory") | 131 | #define dsb() __asm__ __volatile__ ("dsb" : : : "memory") |
diff --git a/arch/arm/include/asm/traps.h b/arch/arm/include/asm/traps.h index 491960bf426..af5d5d1388c 100644 --- a/arch/arm/include/asm/traps.h +++ b/arch/arm/include/asm/traps.h | |||
@@ -27,4 +27,6 @@ static inline int in_exception_text(unsigned long ptr) | |||
27 | extern void __init early_trap_init(void); | 27 | extern void __init early_trap_init(void); |
28 | extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame); | 28 | extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame); |
29 | 29 | ||
30 | extern void *vectors_page; | ||
31 | |||
30 | #endif | 32 | #endif |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 33e4a48fe10..b293616a1a1 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -227,7 +227,7 @@ do { \ | |||
227 | 227 | ||
228 | #define __get_user_asm_byte(x,addr,err) \ | 228 | #define __get_user_asm_byte(x,addr,err) \ |
229 | __asm__ __volatile__( \ | 229 | __asm__ __volatile__( \ |
230 | "1: ldrbt %1,[%2]\n" \ | 230 | "1: " T(ldrb) " %1,[%2],#0\n" \ |
231 | "2:\n" \ | 231 | "2:\n" \ |
232 | " .pushsection .fixup,\"ax\"\n" \ | 232 | " .pushsection .fixup,\"ax\"\n" \ |
233 | " .align 2\n" \ | 233 | " .align 2\n" \ |
@@ -263,7 +263,7 @@ do { \ | |||
263 | 263 | ||
264 | #define __get_user_asm_word(x,addr,err) \ | 264 | #define __get_user_asm_word(x,addr,err) \ |
265 | __asm__ __volatile__( \ | 265 | __asm__ __volatile__( \ |
266 | "1: ldrt %1,[%2]\n" \ | 266 | "1: " T(ldr) " %1,[%2],#0\n" \ |
267 | "2:\n" \ | 267 | "2:\n" \ |
268 | " .pushsection .fixup,\"ax\"\n" \ | 268 | " .pushsection .fixup,\"ax\"\n" \ |
269 | " .align 2\n" \ | 269 | " .align 2\n" \ |
@@ -308,7 +308,7 @@ do { \ | |||
308 | 308 | ||
309 | #define __put_user_asm_byte(x,__pu_addr,err) \ | 309 | #define __put_user_asm_byte(x,__pu_addr,err) \ |
310 | __asm__ __volatile__( \ | 310 | __asm__ __volatile__( \ |
311 | "1: strbt %1,[%2]\n" \ | 311 | "1: " T(strb) " %1,[%2],#0\n" \ |
312 | "2:\n" \ | 312 | "2:\n" \ |
313 | " .pushsection .fixup,\"ax\"\n" \ | 313 | " .pushsection .fixup,\"ax\"\n" \ |
314 | " .align 2\n" \ | 314 | " .align 2\n" \ |
@@ -341,7 +341,7 @@ do { \ | |||
341 | 341 | ||
342 | #define __put_user_asm_word(x,__pu_addr,err) \ | 342 | #define __put_user_asm_word(x,__pu_addr,err) \ |
343 | __asm__ __volatile__( \ | 343 | __asm__ __volatile__( \ |
344 | "1: strt %1,[%2]\n" \ | 344 | "1: " T(str) " %1,[%2],#0\n" \ |
345 | "2:\n" \ | 345 | "2:\n" \ |
346 | " .pushsection .fixup,\"ax\"\n" \ | 346 | " .pushsection .fixup,\"ax\"\n" \ |
347 | " .align 2\n" \ | 347 | " .align 2\n" \ |
@@ -366,10 +366,10 @@ do { \ | |||
366 | 366 | ||
367 | #define __put_user_asm_dword(x,__pu_addr,err) \ | 367 | #define __put_user_asm_dword(x,__pu_addr,err) \ |
368 | __asm__ __volatile__( \ | 368 | __asm__ __volatile__( \ |
369 | ARM( "1: strt " __reg_oper1 ", [%1], #4\n" ) \ | 369 | ARM( "1: " T(str) " " __reg_oper1 ", [%1], #4\n" ) \ |
370 | ARM( "2: strt " __reg_oper0 ", [%1]\n" ) \ | 370 | ARM( "2: " T(str) " " __reg_oper0 ", [%1]\n" ) \ |
371 | THUMB( "1: strt " __reg_oper1 ", [%1]\n" ) \ | 371 | THUMB( "1: " T(str) " " __reg_oper1 ", [%1]\n" ) \ |
372 | THUMB( "2: strt " __reg_oper0 ", [%1, #4]\n" ) \ | 372 | THUMB( "2: " T(str) " " __reg_oper0 ", [%1, #4]\n" ) \ |
373 | "3:\n" \ | 373 | "3:\n" \ |
374 | " .pushsection .fixup,\"ax\"\n" \ | 374 | " .pushsection .fixup,\"ax\"\n" \ |
375 | " .align 2\n" \ | 375 | " .align 2\n" \ |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 659937b0a89..0e106795702 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -42,6 +42,8 @@ obj-$(CONFIG_KGDB) += kgdb.o | |||
42 | obj-$(CONFIG_ARM_UNWIND) += unwind.o | 42 | obj-$(CONFIG_ARM_UNWIND) += unwind.o |
43 | obj-$(CONFIG_HAVE_TCM) += tcm.o | 43 | obj-$(CONFIG_HAVE_TCM) += tcm.o |
44 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 44 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
45 | obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o | ||
46 | CFLAGS_swp_emulate.o := -Wa,-march=armv7-a | ||
45 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o | 47 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o |
46 | 48 | ||
47 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o | 49 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 7f22a11a510..8e2dacdbdcc 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -25,42 +25,22 @@ | |||
25 | #include <asm/tls.h> | 25 | #include <asm/tls.h> |
26 | 26 | ||
27 | #include "entry-header.S" | 27 | #include "entry-header.S" |
28 | #include <asm/entry-macro-multi.S> | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * Interrupt handling. Preserves r7, r8, r9 | 31 | * Interrupt handling. Preserves r7, r8, r9 |
31 | */ | 32 | */ |
32 | .macro irq_handler | 33 | .macro irq_handler |
33 | get_irqnr_preamble r5, lr | 34 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
34 | 1: get_irqnr_and_base r0, r6, r5, lr | 35 | ldr r5, =handle_arch_irq |
35 | movne r1, sp | 36 | mov r0, sp |
36 | @ | 37 | ldr r5, [r5] |
37 | @ routine called with r0 = irq number, r1 = struct pt_regs * | 38 | adr lr, BSYM(9997f) |
38 | @ | 39 | teq r5, #0 |
39 | adrne lr, BSYM(1b) | 40 | movne pc, r5 |
40 | bne asm_do_IRQ | ||
41 | |||
42 | #ifdef CONFIG_SMP | ||
43 | /* | ||
44 | * XXX | ||
45 | * | ||
46 | * this macro assumes that irqstat (r6) and base (r5) are | ||
47 | * preserved from get_irqnr_and_base above | ||
48 | */ | ||
49 | ALT_SMP(test_for_ipi r0, r6, r5, lr) | ||
50 | ALT_UP_B(9997f) | ||
51 | movne r1, sp | ||
52 | adrne lr, BSYM(1b) | ||
53 | bne do_IPI | ||
54 | |||
55 | #ifdef CONFIG_LOCAL_TIMERS | ||
56 | test_for_ltirq r0, r6, r5, lr | ||
57 | movne r0, sp | ||
58 | adrne lr, BSYM(1b) | ||
59 | bne do_local_timer | ||
60 | #endif | 41 | #endif |
42 | arch_irq_handler_default | ||
61 | 9997: | 43 | 9997: |
62 | #endif | ||
63 | |||
64 | .endm | 44 | .endm |
65 | 45 | ||
66 | #ifdef CONFIG_KPROBES | 46 | #ifdef CONFIG_KPROBES |
@@ -735,7 +715,7 @@ ENTRY(__switch_to) | |||
735 | THUMB( stmia ip!, {r4 - sl, fp} ) @ Store most regs on stack | 715 | THUMB( stmia ip!, {r4 - sl, fp} ) @ Store most regs on stack |
736 | THUMB( str sp, [ip], #4 ) | 716 | THUMB( str sp, [ip], #4 ) |
737 | THUMB( str lr, [ip], #4 ) | 717 | THUMB( str lr, [ip], #4 ) |
738 | #ifdef CONFIG_MMU | 718 | #ifdef CONFIG_CPU_USE_DOMAINS |
739 | ldr r6, [r2, #TI_CPU_DOMAIN] | 719 | ldr r6, [r2, #TI_CPU_DOMAIN] |
740 | #endif | 720 | #endif |
741 | set_tls r3, r4, r5 | 721 | set_tls r3, r4, r5 |
@@ -744,7 +724,7 @@ ENTRY(__switch_to) | |||
744 | ldr r8, =__stack_chk_guard | 724 | ldr r8, =__stack_chk_guard |
745 | ldr r7, [r7, #TSK_STACK_CANARY] | 725 | ldr r7, [r7, #TSK_STACK_CANARY] |
746 | #endif | 726 | #endif |
747 | #ifdef CONFIG_MMU | 727 | #ifdef CONFIG_CPU_USE_DOMAINS |
748 | mcr p15, 0, r6, c3, c0, 0 @ Set domain register | 728 | mcr p15, 0, r6, c3, c0, 0 @ Set domain register |
749 | #endif | 729 | #endif |
750 | mov r5, r0 | 730 | mov r5, r0 |
@@ -1245,3 +1225,9 @@ cr_alignment: | |||
1245 | .space 4 | 1225 | .space 4 |
1246 | cr_no_alignment: | 1226 | cr_no_alignment: |
1247 | .space 4 | 1227 | .space 4 |
1228 | |||
1229 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
1230 | .globl handle_arch_irq | ||
1231 | handle_arch_irq: | ||
1232 | .space 4 | ||
1233 | #endif | ||
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index 47837b85c07..e72dc34eea1 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/fiq.h> | 45 | #include <asm/fiq.h> |
46 | #include <asm/irq.h> | 46 | #include <asm/irq.h> |
47 | #include <asm/system.h> | 47 | #include <asm/system.h> |
48 | #include <asm/traps.h> | ||
48 | 49 | ||
49 | static unsigned long no_fiq_insn; | 50 | static unsigned long no_fiq_insn; |
50 | 51 | ||
@@ -78,7 +79,11 @@ int show_fiq_list(struct seq_file *p, int prec) | |||
78 | 79 | ||
79 | void set_fiq_handler(void *start, unsigned int length) | 80 | void set_fiq_handler(void *start, unsigned int length) |
80 | { | 81 | { |
82 | #if defined(CONFIG_CPU_USE_DOMAINS) | ||
81 | memcpy((void *)0xffff001c, start, length); | 83 | memcpy((void *)0xffff001c, start, length); |
84 | #else | ||
85 | memcpy(vectors_page + 0x1c, start, length); | ||
86 | #endif | ||
82 | flush_icache_range(0xffff001c, 0xffff001c + length); | 87 | flush_icache_range(0xffff001c, 0xffff001c + length); |
83 | if (!vectors_high()) | 88 | if (!vectors_high()) |
84 | flush_icache_range(0x1c, 0x1c + length); | 89 | flush_icache_range(0x1c, 0x1c + length); |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 6276f01df9e..c1269944cc5 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | 38 | ||
39 | #include <asm/system.h> | 39 | #include <asm/system.h> |
40 | #include <asm/mach/arch.h> | ||
40 | #include <asm/mach/irq.h> | 41 | #include <asm/mach/irq.h> |
41 | #include <asm/mach/time.h> | 42 | #include <asm/mach/time.h> |
42 | 43 | ||
@@ -47,8 +48,6 @@ | |||
47 | #define irq_finish(irq) do { } while (0) | 48 | #define irq_finish(irq) do { } while (0) |
48 | #endif | 49 | #endif |
49 | 50 | ||
50 | unsigned int arch_nr_irqs; | ||
51 | void (*init_arch_irq)(void) __initdata = NULL; | ||
52 | unsigned long irq_err_count; | 51 | unsigned long irq_err_count; |
53 | 52 | ||
54 | int show_interrupts(struct seq_file *p, void *v) | 53 | int show_interrupts(struct seq_file *p, void *v) |
@@ -165,13 +164,13 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
165 | 164 | ||
166 | void __init init_IRQ(void) | 165 | void __init init_IRQ(void) |
167 | { | 166 | { |
168 | init_arch_irq(); | 167 | machine_desc->init_irq(); |
169 | } | 168 | } |
170 | 169 | ||
171 | #ifdef CONFIG_SPARSE_IRQ | 170 | #ifdef CONFIG_SPARSE_IRQ |
172 | int __init arch_probe_nr_irqs(void) | 171 | int __init arch_probe_nr_irqs(void) |
173 | { | 172 | { |
174 | nr_irqs = arch_nr_irqs ? arch_nr_irqs : NR_IRQS; | 173 | nr_irqs = machine_desc->nr_irqs ? machine_desc->nr_irqs : NR_IRQS; |
175 | return nr_irqs; | 174 | return nr_irqs; |
176 | } | 175 | } |
177 | #endif | 176 | #endif |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 336f14e0e5c..3455ad33de4 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -75,9 +75,9 @@ extern void reboot_setup(char *str); | |||
75 | 75 | ||
76 | unsigned int processor_id; | 76 | unsigned int processor_id; |
77 | EXPORT_SYMBOL(processor_id); | 77 | EXPORT_SYMBOL(processor_id); |
78 | unsigned int __machine_arch_type; | 78 | unsigned int __machine_arch_type __read_mostly; |
79 | EXPORT_SYMBOL(__machine_arch_type); | 79 | EXPORT_SYMBOL(__machine_arch_type); |
80 | unsigned int cacheid; | 80 | unsigned int cacheid __read_mostly; |
81 | EXPORT_SYMBOL(cacheid); | 81 | EXPORT_SYMBOL(cacheid); |
82 | 82 | ||
83 | unsigned int __atags_pointer __initdata; | 83 | unsigned int __atags_pointer __initdata; |
@@ -91,24 +91,24 @@ EXPORT_SYMBOL(system_serial_low); | |||
91 | unsigned int system_serial_high; | 91 | unsigned int system_serial_high; |
92 | EXPORT_SYMBOL(system_serial_high); | 92 | EXPORT_SYMBOL(system_serial_high); |
93 | 93 | ||
94 | unsigned int elf_hwcap; | 94 | unsigned int elf_hwcap __read_mostly; |
95 | EXPORT_SYMBOL(elf_hwcap); | 95 | EXPORT_SYMBOL(elf_hwcap); |
96 | 96 | ||
97 | 97 | ||
98 | #ifdef MULTI_CPU | 98 | #ifdef MULTI_CPU |
99 | struct processor processor; | 99 | struct processor processor __read_mostly; |
100 | #endif | 100 | #endif |
101 | #ifdef MULTI_TLB | 101 | #ifdef MULTI_TLB |
102 | struct cpu_tlb_fns cpu_tlb; | 102 | struct cpu_tlb_fns cpu_tlb __read_mostly; |
103 | #endif | 103 | #endif |
104 | #ifdef MULTI_USER | 104 | #ifdef MULTI_USER |
105 | struct cpu_user_fns cpu_user; | 105 | struct cpu_user_fns cpu_user __read_mostly; |
106 | #endif | 106 | #endif |
107 | #ifdef MULTI_CACHE | 107 | #ifdef MULTI_CACHE |
108 | struct cpu_cache_fns cpu_cache; | 108 | struct cpu_cache_fns cpu_cache __read_mostly; |
109 | #endif | 109 | #endif |
110 | #ifdef CONFIG_OUTER_CACHE | 110 | #ifdef CONFIG_OUTER_CACHE |
111 | struct outer_cache_fns outer_cache; | 111 | struct outer_cache_fns outer_cache __read_mostly; |
112 | EXPORT_SYMBOL(outer_cache); | 112 | EXPORT_SYMBOL(outer_cache); |
113 | #endif | 113 | #endif |
114 | 114 | ||
@@ -126,6 +126,7 @@ EXPORT_SYMBOL(elf_platform); | |||
126 | static const char *cpu_name; | 126 | static const char *cpu_name; |
127 | static const char *machine_name; | 127 | static const char *machine_name; |
128 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; | 128 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; |
129 | struct machine_desc *machine_desc __initdata; | ||
129 | 130 | ||
130 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; | 131 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; |
131 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; | 132 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; |
@@ -708,13 +709,11 @@ static struct init_tags { | |||
708 | { 0, ATAG_NONE } | 709 | { 0, ATAG_NONE } |
709 | }; | 710 | }; |
710 | 711 | ||
711 | static void (*init_machine)(void) __initdata; | ||
712 | |||
713 | static int __init customize_machine(void) | 712 | static int __init customize_machine(void) |
714 | { | 713 | { |
715 | /* customizes platform devices, or adds new ones */ | 714 | /* customizes platform devices, or adds new ones */ |
716 | if (init_machine) | 715 | if (machine_desc->init_machine) |
717 | init_machine(); | 716 | machine_desc->init_machine(); |
718 | return 0; | 717 | return 0; |
719 | } | 718 | } |
720 | arch_initcall(customize_machine); | 719 | arch_initcall(customize_machine); |
@@ -809,6 +808,7 @@ void __init setup_arch(char **cmdline_p) | |||
809 | 808 | ||
810 | setup_processor(); | 809 | setup_processor(); |
811 | mdesc = setup_machine(machine_arch_type); | 810 | mdesc = setup_machine(machine_arch_type); |
811 | machine_desc = mdesc; | ||
812 | machine_name = mdesc->name; | 812 | machine_name = mdesc->name; |
813 | 813 | ||
814 | if (mdesc->soft_reboot) | 814 | if (mdesc->soft_reboot) |
@@ -868,13 +868,9 @@ void __init setup_arch(char **cmdline_p) | |||
868 | cpu_init(); | 868 | cpu_init(); |
869 | tcm_init(); | 869 | tcm_init(); |
870 | 870 | ||
871 | /* | 871 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
872 | * Set up various architecture-specific pointers | 872 | handle_arch_irq = mdesc->handle_irq; |
873 | */ | 873 | #endif |
874 | arch_nr_irqs = mdesc->nr_irqs; | ||
875 | init_arch_irq = mdesc->init_irq; | ||
876 | system_timer = mdesc->timer; | ||
877 | init_machine = mdesc->init_machine; | ||
878 | 874 | ||
879 | #ifdef CONFIG_VT | 875 | #ifdef CONFIG_VT |
880 | #if defined(CONFIG_VGA_CONSOLE) | 876 | #if defined(CONFIG_VGA_CONSOLE) |
@@ -884,6 +880,9 @@ void __init setup_arch(char **cmdline_p) | |||
884 | #endif | 880 | #endif |
885 | #endif | 881 | #endif |
886 | early_trap_init(); | 882 | early_trap_init(); |
883 | |||
884 | if (mdesc->init_early) | ||
885 | mdesc->init_early(); | ||
887 | } | 886 | } |
888 | 887 | ||
889 | 888 | ||
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c new file mode 100644 index 00000000000..7a576092291 --- /dev/null +++ b/arch/arm/kernel/swp_emulate.c | |||
@@ -0,0 +1,267 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/swp_emulate.c | ||
3 | * | ||
4 | * Copyright (C) 2009 ARM Limited | ||
5 | * __user_* functions adapted from include/asm/uaccess.h | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Implements emulation of the SWP/SWPB instructions using load-exclusive and | ||
12 | * store-exclusive for processors that have them disabled (or future ones that | ||
13 | * might not implement them). | ||
14 | * | ||
15 | * Syntax of SWP{B} instruction: SWP{B}<c> <Rt>, <Rt2>, [<Rn>] | ||
16 | * Where: Rt = destination | ||
17 | * Rt2 = source | ||
18 | * Rn = address | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/proc_fs.h> | ||
24 | #include <linux/sched.h> | ||
25 | #include <linux/syscalls.h> | ||
26 | #include <linux/perf_event.h> | ||
27 | |||
28 | #include <asm/traps.h> | ||
29 | #include <asm/uaccess.h> | ||
30 | |||
31 | /* | ||
32 | * Error-checking SWP macros implemented using ldrex{b}/strex{b} | ||
33 | */ | ||
34 | #define __user_swpX_asm(data, addr, res, temp, B) \ | ||
35 | __asm__ __volatile__( \ | ||
36 | " mov %2, %1\n" \ | ||
37 | "0: ldrex"B" %1, [%3]\n" \ | ||
38 | "1: strex"B" %0, %2, [%3]\n" \ | ||
39 | " cmp %0, #0\n" \ | ||
40 | " movne %0, %4\n" \ | ||
41 | "2:\n" \ | ||
42 | " .section .fixup,\"ax\"\n" \ | ||
43 | " .align 2\n" \ | ||
44 | "3: mov %0, %5\n" \ | ||
45 | " b 2b\n" \ | ||
46 | " .previous\n" \ | ||
47 | " .section __ex_table,\"a\"\n" \ | ||
48 | " .align 3\n" \ | ||
49 | " .long 0b, 3b\n" \ | ||
50 | " .long 1b, 3b\n" \ | ||
51 | " .previous" \ | ||
52 | : "=&r" (res), "+r" (data), "=&r" (temp) \ | ||
53 | : "r" (addr), "i" (-EAGAIN), "i" (-EFAULT) \ | ||
54 | : "cc", "memory") | ||
55 | |||
56 | #define __user_swp_asm(data, addr, res, temp) \ | ||
57 | __user_swpX_asm(data, addr, res, temp, "") | ||
58 | #define __user_swpb_asm(data, addr, res, temp) \ | ||
59 | __user_swpX_asm(data, addr, res, temp, "b") | ||
60 | |||
61 | /* | ||
62 | * Macros/defines for extracting register numbers from instruction. | ||
63 | */ | ||
64 | #define EXTRACT_REG_NUM(instruction, offset) \ | ||
65 | (((instruction) & (0xf << (offset))) >> (offset)) | ||
66 | #define RN_OFFSET 16 | ||
67 | #define RT_OFFSET 12 | ||
68 | #define RT2_OFFSET 0 | ||
69 | /* | ||
70 | * Bit 22 of the instruction encoding distinguishes between | ||
71 | * the SWP and SWPB variants (bit set means SWPB). | ||
72 | */ | ||
73 | #define TYPE_SWPB (1 << 22) | ||
74 | |||
75 | static unsigned long swpcounter; | ||
76 | static unsigned long swpbcounter; | ||
77 | static unsigned long abtcounter; | ||
78 | static pid_t previous_pid; | ||
79 | |||
80 | #ifdef CONFIG_PROC_FS | ||
81 | static int proc_read_status(char *page, char **start, off_t off, int count, | ||
82 | int *eof, void *data) | ||
83 | { | ||
84 | char *p = page; | ||
85 | int len; | ||
86 | |||
87 | p += sprintf(p, "Emulated SWP:\t\t%lu\n", swpcounter); | ||
88 | p += sprintf(p, "Emulated SWPB:\t\t%lu\n", swpbcounter); | ||
89 | p += sprintf(p, "Aborted SWP{B}:\t\t%lu\n", abtcounter); | ||
90 | if (previous_pid != 0) | ||
91 | p += sprintf(p, "Last process:\t\t%d\n", previous_pid); | ||
92 | |||
93 | len = (p - page) - off; | ||
94 | if (len < 0) | ||
95 | len = 0; | ||
96 | |||
97 | *eof = (len <= count) ? 1 : 0; | ||
98 | *start = page + off; | ||
99 | |||
100 | return len; | ||
101 | } | ||
102 | #endif | ||
103 | |||
104 | /* | ||
105 | * Set up process info to signal segmentation fault - called on access error. | ||
106 | */ | ||
107 | static void set_segfault(struct pt_regs *regs, unsigned long addr) | ||
108 | { | ||
109 | siginfo_t info; | ||
110 | |||
111 | if (find_vma(current->mm, addr) == NULL) | ||
112 | info.si_code = SEGV_MAPERR; | ||
113 | else | ||
114 | info.si_code = SEGV_ACCERR; | ||
115 | |||
116 | info.si_signo = SIGSEGV; | ||
117 | info.si_errno = 0; | ||
118 | info.si_addr = (void *) instruction_pointer(regs); | ||
119 | |||
120 | pr_debug("SWP{B} emulation: access caused memory abort!\n"); | ||
121 | arm_notify_die("Illegal memory access", regs, &info, 0, 0); | ||
122 | |||
123 | abtcounter++; | ||
124 | } | ||
125 | |||
126 | static int emulate_swpX(unsigned int address, unsigned int *data, | ||
127 | unsigned int type) | ||
128 | { | ||
129 | unsigned int res = 0; | ||
130 | |||
131 | if ((type != TYPE_SWPB) && (address & 0x3)) { | ||
132 | /* SWP to unaligned address not permitted */ | ||
133 | pr_debug("SWP instruction on unaligned pointer!\n"); | ||
134 | return -EFAULT; | ||
135 | } | ||
136 | |||
137 | while (1) { | ||
138 | unsigned long temp; | ||
139 | |||
140 | /* | ||
141 | * Barrier required between accessing protected resource and | ||
142 | * releasing a lock for it. Legacy code might not have done | ||
143 | * this, and we cannot determine that this is not the case | ||
144 | * being emulated, so insert always. | ||
145 | */ | ||
146 | smp_mb(); | ||
147 | |||
148 | if (type == TYPE_SWPB) | ||
149 | __user_swpb_asm(*data, address, res, temp); | ||
150 | else | ||
151 | __user_swp_asm(*data, address, res, temp); | ||
152 | |||
153 | if (likely(res != -EAGAIN) || signal_pending(current)) | ||
154 | break; | ||
155 | |||
156 | cond_resched(); | ||
157 | } | ||
158 | |||
159 | if (res == 0) { | ||
160 | /* | ||
161 | * Barrier also required between aquiring a lock for a | ||
162 | * protected resource and accessing the resource. Inserted for | ||
163 | * same reason as above. | ||
164 | */ | ||
165 | smp_mb(); | ||
166 | |||
167 | if (type == TYPE_SWPB) | ||
168 | swpbcounter++; | ||
169 | else | ||
170 | swpcounter++; | ||
171 | } | ||
172 | |||
173 | return res; | ||
174 | } | ||
175 | |||
176 | /* | ||
177 | * swp_handler logs the id of calling process, dissects the instruction, sanity | ||
178 | * checks the memory location, calls emulate_swpX for the actual operation and | ||
179 | * deals with fixup/error handling before returning | ||
180 | */ | ||
181 | static int swp_handler(struct pt_regs *regs, unsigned int instr) | ||
182 | { | ||
183 | unsigned int address, destreg, data, type; | ||
184 | unsigned int res = 0; | ||
185 | |||
186 | perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, regs->ARM_pc); | ||
187 | |||
188 | if (current->pid != previous_pid) { | ||
189 | pr_debug("\"%s\" (%ld) uses deprecated SWP{B} instruction\n", | ||
190 | current->comm, (unsigned long)current->pid); | ||
191 | previous_pid = current->pid; | ||
192 | } | ||
193 | |||
194 | address = regs->uregs[EXTRACT_REG_NUM(instr, RN_OFFSET)]; | ||
195 | data = regs->uregs[EXTRACT_REG_NUM(instr, RT2_OFFSET)]; | ||
196 | destreg = EXTRACT_REG_NUM(instr, RT_OFFSET); | ||
197 | |||
198 | type = instr & TYPE_SWPB; | ||
199 | |||
200 | pr_debug("addr in r%d->0x%08x, dest is r%d, source in r%d->0x%08x)\n", | ||
201 | EXTRACT_REG_NUM(instr, RN_OFFSET), address, | ||
202 | destreg, EXTRACT_REG_NUM(instr, RT2_OFFSET), data); | ||
203 | |||
204 | /* Check access in reasonable access range for both SWP and SWPB */ | ||
205 | if (!access_ok(VERIFY_WRITE, (address & ~3), 4)) { | ||
206 | pr_debug("SWP{B} emulation: access to %p not allowed!\n", | ||
207 | (void *)address); | ||
208 | res = -EFAULT; | ||
209 | } else { | ||
210 | res = emulate_swpX(address, &data, type); | ||
211 | } | ||
212 | |||
213 | if (res == 0) { | ||
214 | /* | ||
215 | * On successful emulation, revert the adjustment to the PC | ||
216 | * made in kernel/traps.c in order to resume execution at the | ||
217 | * instruction following the SWP{B}. | ||
218 | */ | ||
219 | regs->ARM_pc += 4; | ||
220 | regs->uregs[destreg] = data; | ||
221 | } else if (res == -EFAULT) { | ||
222 | /* | ||
223 | * Memory errors do not mean emulation failed. | ||
224 | * Set up signal info to return SEGV, then return OK | ||
225 | */ | ||
226 | set_segfault(regs, address); | ||
227 | } | ||
228 | |||
229 | return 0; | ||
230 | } | ||
231 | |||
232 | /* | ||
233 | * Only emulate SWP/SWPB executed in ARM state/User mode. | ||
234 | * The kernel must be SWP free and SWP{B} does not exist in Thumb/ThumbEE. | ||
235 | */ | ||
236 | static struct undef_hook swp_hook = { | ||
237 | .instr_mask = 0x0fb00ff0, | ||
238 | .instr_val = 0x01000090, | ||
239 | .cpsr_mask = MODE_MASK | PSR_T_BIT | PSR_J_BIT, | ||
240 | .cpsr_val = USR_MODE, | ||
241 | .fn = swp_handler | ||
242 | }; | ||
243 | |||
244 | /* | ||
245 | * Register handler and create status file in /proc/cpu | ||
246 | * Invoked as late_initcall, since not needed before init spawned. | ||
247 | */ | ||
248 | static int __init swp_emulation_init(void) | ||
249 | { | ||
250 | #ifdef CONFIG_PROC_FS | ||
251 | struct proc_dir_entry *res; | ||
252 | |||
253 | res = create_proc_entry("cpu/swp_emulation", S_IRUGO, NULL); | ||
254 | |||
255 | if (!res) | ||
256 | return -ENOMEM; | ||
257 | |||
258 | res->read_proc = proc_read_status; | ||
259 | #endif /* CONFIG_PROC_FS */ | ||
260 | |||
261 | printk(KERN_NOTICE "Registering SWP/SWPB emulation handler\n"); | ||
262 | register_undef_hook(&swp_hook); | ||
263 | |||
264 | return 0; | ||
265 | } | ||
266 | |||
267 | late_initcall(swp_emulation_init); | ||
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 38c261f9951..f1e2eb19a67 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -30,12 +30,13 @@ | |||
30 | #include <asm/leds.h> | 30 | #include <asm/leds.h> |
31 | #include <asm/thread_info.h> | 31 | #include <asm/thread_info.h> |
32 | #include <asm/stacktrace.h> | 32 | #include <asm/stacktrace.h> |
33 | #include <asm/mach/arch.h> | ||
33 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
34 | 35 | ||
35 | /* | 36 | /* |
36 | * Our system timer. | 37 | * Our system timer. |
37 | */ | 38 | */ |
38 | struct sys_timer *system_timer; | 39 | static struct sys_timer *system_timer; |
39 | 40 | ||
40 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) | 41 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) |
41 | /* this needs a better home */ | 42 | /* this needs a better home */ |
@@ -160,6 +161,7 @@ device_initcall(timer_init_sysfs); | |||
160 | 161 | ||
161 | void __init time_init(void) | 162 | void __init time_init(void) |
162 | { | 163 | { |
164 | system_timer = machine_desc->timer; | ||
163 | system_timer->init(); | 165 | system_timer->init(); |
164 | } | 166 | } |
165 | 167 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 446aee97436..e02f4f7537c 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -37,6 +37,8 @@ | |||
37 | 37 | ||
38 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; | 38 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; |
39 | 39 | ||
40 | void *vectors_page; | ||
41 | |||
40 | #ifdef CONFIG_DEBUG_USER | 42 | #ifdef CONFIG_DEBUG_USER |
41 | unsigned int user_debug; | 43 | unsigned int user_debug; |
42 | 44 | ||
@@ -756,7 +758,11 @@ static void __init kuser_get_tls_init(unsigned long vectors) | |||
756 | 758 | ||
757 | void __init early_trap_init(void) | 759 | void __init early_trap_init(void) |
758 | { | 760 | { |
761 | #if defined(CONFIG_CPU_USE_DOMAINS) | ||
759 | unsigned long vectors = CONFIG_VECTORS_BASE; | 762 | unsigned long vectors = CONFIG_VECTORS_BASE; |
763 | #else | ||
764 | unsigned long vectors = (unsigned long)vectors_page; | ||
765 | #endif | ||
760 | extern char __stubs_start[], __stubs_end[]; | 766 | extern char __stubs_start[], __stubs_end[]; |
761 | extern char __vectors_start[], __vectors_end[]; | 767 | extern char __vectors_start[], __vectors_end[]; |
762 | extern char __kuser_helper_start[], __kuser_helper_end[]; | 768 | extern char __kuser_helper_start[], __kuser_helper_end[]; |
@@ -780,10 +786,10 @@ void __init early_trap_init(void) | |||
780 | * Copy signal return handlers into the vector page, and | 786 | * Copy signal return handlers into the vector page, and |
781 | * set sigreturn to be a pointer to these. | 787 | * set sigreturn to be a pointer to these. |
782 | */ | 788 | */ |
783 | memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes, | 789 | memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE), |
784 | sizeof(sigreturn_codes)); | 790 | sigreturn_codes, sizeof(sigreturn_codes)); |
785 | memcpy((void *)KERN_RESTART_CODE, syscall_restart_code, | 791 | memcpy((void *)(vectors + KERN_RESTART_CODE - CONFIG_VECTORS_BASE), |
786 | sizeof(syscall_restart_code)); | 792 | syscall_restart_code, sizeof(syscall_restart_code)); |
787 | 793 | ||
788 | flush_icache_range(vectors, vectors + PAGE_SIZE); | 794 | flush_icache_range(vectors, vectors + PAGE_SIZE); |
789 | modify_domain(DOMAIN_USER, DOMAIN_CLIENT); | 795 | modify_domain(DOMAIN_USER, DOMAIN_CLIENT); |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index cead8893b46..1581f6d18cc 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -167,6 +167,7 @@ SECTIONS | |||
167 | 167 | ||
168 | NOSAVE_DATA | 168 | NOSAVE_DATA |
169 | CACHELINE_ALIGNED_DATA(32) | 169 | CACHELINE_ALIGNED_DATA(32) |
170 | READ_MOSTLY_DATA(32) | ||
170 | 171 | ||
171 | /* | 172 | /* |
172 | * The exception fixup table (might need resorting at runtime) | 173 | * The exception fixup table (might need resorting at runtime) |
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S index b1631a7dbe7..1b049cd7a49 100644 --- a/arch/arm/lib/getuser.S +++ b/arch/arm/lib/getuser.S | |||
@@ -28,20 +28,21 @@ | |||
28 | */ | 28 | */ |
29 | #include <linux/linkage.h> | 29 | #include <linux/linkage.h> |
30 | #include <asm/errno.h> | 30 | #include <asm/errno.h> |
31 | #include <asm/domain.h> | ||
31 | 32 | ||
32 | ENTRY(__get_user_1) | 33 | ENTRY(__get_user_1) |
33 | 1: ldrbt r2, [r0] | 34 | 1: T(ldrb) r2, [r0] |
34 | mov r0, #0 | 35 | mov r0, #0 |
35 | mov pc, lr | 36 | mov pc, lr |
36 | ENDPROC(__get_user_1) | 37 | ENDPROC(__get_user_1) |
37 | 38 | ||
38 | ENTRY(__get_user_2) | 39 | ENTRY(__get_user_2) |
39 | #ifdef CONFIG_THUMB2_KERNEL | 40 | #ifdef CONFIG_THUMB2_KERNEL |
40 | 2: ldrbt r2, [r0] | 41 | 2: T(ldrb) r2, [r0] |
41 | 3: ldrbt r3, [r0, #1] | 42 | 3: T(ldrb) r3, [r0, #1] |
42 | #else | 43 | #else |
43 | 2: ldrbt r2, [r0], #1 | 44 | 2: T(ldrb) r2, [r0], #1 |
44 | 3: ldrbt r3, [r0] | 45 | 3: T(ldrb) r3, [r0] |
45 | #endif | 46 | #endif |
46 | #ifndef __ARMEB__ | 47 | #ifndef __ARMEB__ |
47 | orr r2, r2, r3, lsl #8 | 48 | orr r2, r2, r3, lsl #8 |
@@ -53,7 +54,7 @@ ENTRY(__get_user_2) | |||
53 | ENDPROC(__get_user_2) | 54 | ENDPROC(__get_user_2) |
54 | 55 | ||
55 | ENTRY(__get_user_4) | 56 | ENTRY(__get_user_4) |
56 | 4: ldrt r2, [r0] | 57 | 4: T(ldr) r2, [r0] |
57 | mov r0, #0 | 58 | mov r0, #0 |
58 | mov pc, lr | 59 | mov pc, lr |
59 | ENDPROC(__get_user_4) | 60 | ENDPROC(__get_user_4) |
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S index 5a01a23c6c0..c023fc11e86 100644 --- a/arch/arm/lib/putuser.S +++ b/arch/arm/lib/putuser.S | |||
@@ -28,9 +28,10 @@ | |||
28 | */ | 28 | */ |
29 | #include <linux/linkage.h> | 29 | #include <linux/linkage.h> |
30 | #include <asm/errno.h> | 30 | #include <asm/errno.h> |
31 | #include <asm/domain.h> | ||
31 | 32 | ||
32 | ENTRY(__put_user_1) | 33 | ENTRY(__put_user_1) |
33 | 1: strbt r2, [r0] | 34 | 1: T(strb) r2, [r0] |
34 | mov r0, #0 | 35 | mov r0, #0 |
35 | mov pc, lr | 36 | mov pc, lr |
36 | ENDPROC(__put_user_1) | 37 | ENDPROC(__put_user_1) |
@@ -39,19 +40,19 @@ ENTRY(__put_user_2) | |||
39 | mov ip, r2, lsr #8 | 40 | mov ip, r2, lsr #8 |
40 | #ifdef CONFIG_THUMB2_KERNEL | 41 | #ifdef CONFIG_THUMB2_KERNEL |
41 | #ifndef __ARMEB__ | 42 | #ifndef __ARMEB__ |
42 | 2: strbt r2, [r0] | 43 | 2: T(strb) r2, [r0] |
43 | 3: strbt ip, [r0, #1] | 44 | 3: T(strb) ip, [r0, #1] |
44 | #else | 45 | #else |
45 | 2: strbt ip, [r0] | 46 | 2: T(strb) ip, [r0] |
46 | 3: strbt r2, [r0, #1] | 47 | 3: T(strb) r2, [r0, #1] |
47 | #endif | 48 | #endif |
48 | #else /* !CONFIG_THUMB2_KERNEL */ | 49 | #else /* !CONFIG_THUMB2_KERNEL */ |
49 | #ifndef __ARMEB__ | 50 | #ifndef __ARMEB__ |
50 | 2: strbt r2, [r0], #1 | 51 | 2: T(strb) r2, [r0], #1 |
51 | 3: strbt ip, [r0] | 52 | 3: T(strb) ip, [r0] |
52 | #else | 53 | #else |
53 | 2: strbt ip, [r0], #1 | 54 | 2: T(strb) ip, [r0], #1 |
54 | 3: strbt r2, [r0] | 55 | 3: T(strb) r2, [r0] |
55 | #endif | 56 | #endif |
56 | #endif /* CONFIG_THUMB2_KERNEL */ | 57 | #endif /* CONFIG_THUMB2_KERNEL */ |
57 | mov r0, #0 | 58 | mov r0, #0 |
@@ -59,18 +60,18 @@ ENTRY(__put_user_2) | |||
59 | ENDPROC(__put_user_2) | 60 | ENDPROC(__put_user_2) |
60 | 61 | ||
61 | ENTRY(__put_user_4) | 62 | ENTRY(__put_user_4) |
62 | 4: strt r2, [r0] | 63 | 4: T(str) r2, [r0] |
63 | mov r0, #0 | 64 | mov r0, #0 |
64 | mov pc, lr | 65 | mov pc, lr |
65 | ENDPROC(__put_user_4) | 66 | ENDPROC(__put_user_4) |
66 | 67 | ||
67 | ENTRY(__put_user_8) | 68 | ENTRY(__put_user_8) |
68 | #ifdef CONFIG_THUMB2_KERNEL | 69 | #ifdef CONFIG_THUMB2_KERNEL |
69 | 5: strt r2, [r0] | 70 | 5: T(str) r2, [r0] |
70 | 6: strt r3, [r0, #4] | 71 | 6: T(str) r3, [r0, #4] |
71 | #else | 72 | #else |
72 | 5: strt r2, [r0], #4 | 73 | 5: T(str) r2, [r0], #4 |
73 | 6: strt r3, [r0] | 74 | 6: T(str) r3, [r0] |
74 | #endif | 75 | #endif |
75 | mov r0, #0 | 76 | mov r0, #0 |
76 | mov pc, lr | 77 | mov pc, lr |
diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S index fee9f6f88ad..d0ece2aeb70 100644 --- a/arch/arm/lib/uaccess.S +++ b/arch/arm/lib/uaccess.S | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <asm/assembler.h> | 15 | #include <asm/assembler.h> |
16 | #include <asm/errno.h> | 16 | #include <asm/errno.h> |
17 | #include <asm/domain.h> | ||
17 | 18 | ||
18 | .text | 19 | .text |
19 | 20 | ||
@@ -31,11 +32,11 @@ | |||
31 | rsb ip, ip, #4 | 32 | rsb ip, ip, #4 |
32 | cmp ip, #2 | 33 | cmp ip, #2 |
33 | ldrb r3, [r1], #1 | 34 | ldrb r3, [r1], #1 |
34 | USER( strbt r3, [r0], #1) @ May fault | 35 | USER( T(strb) r3, [r0], #1) @ May fault |
35 | ldrgeb r3, [r1], #1 | 36 | ldrgeb r3, [r1], #1 |
36 | USER( strgebt r3, [r0], #1) @ May fault | 37 | USER( T(strgeb) r3, [r0], #1) @ May fault |
37 | ldrgtb r3, [r1], #1 | 38 | ldrgtb r3, [r1], #1 |
38 | USER( strgtbt r3, [r0], #1) @ May fault | 39 | USER( T(strgtb) r3, [r0], #1) @ May fault |
39 | sub r2, r2, ip | 40 | sub r2, r2, ip |
40 | b .Lc2u_dest_aligned | 41 | b .Lc2u_dest_aligned |
41 | 42 | ||
@@ -58,7 +59,7 @@ ENTRY(__copy_to_user) | |||
58 | addmi ip, r2, #4 | 59 | addmi ip, r2, #4 |
59 | bmi .Lc2u_0nowords | 60 | bmi .Lc2u_0nowords |
60 | ldr r3, [r1], #4 | 61 | ldr r3, [r1], #4 |
61 | USER( strt r3, [r0], #4) @ May fault | 62 | USER( T(str) r3, [r0], #4) @ May fault |
62 | mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | 63 | mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction |
63 | rsb ip, ip, #0 | 64 | rsb ip, ip, #0 |
64 | movs ip, ip, lsr #32 - PAGE_SHIFT | 65 | movs ip, ip, lsr #32 - PAGE_SHIFT |
@@ -87,18 +88,18 @@ USER( strt r3, [r0], #4) @ May fault | |||
87 | stmneia r0!, {r3 - r4} @ Shouldnt fault | 88 | stmneia r0!, {r3 - r4} @ Shouldnt fault |
88 | tst ip, #4 | 89 | tst ip, #4 |
89 | ldrne r3, [r1], #4 | 90 | ldrne r3, [r1], #4 |
90 | strnet r3, [r0], #4 @ Shouldnt fault | 91 | T(strne) r3, [r0], #4 @ Shouldnt fault |
91 | ands ip, ip, #3 | 92 | ands ip, ip, #3 |
92 | beq .Lc2u_0fupi | 93 | beq .Lc2u_0fupi |
93 | .Lc2u_0nowords: teq ip, #0 | 94 | .Lc2u_0nowords: teq ip, #0 |
94 | beq .Lc2u_finished | 95 | beq .Lc2u_finished |
95 | .Lc2u_nowords: cmp ip, #2 | 96 | .Lc2u_nowords: cmp ip, #2 |
96 | ldrb r3, [r1], #1 | 97 | ldrb r3, [r1], #1 |
97 | USER( strbt r3, [r0], #1) @ May fault | 98 | USER( T(strb) r3, [r0], #1) @ May fault |
98 | ldrgeb r3, [r1], #1 | 99 | ldrgeb r3, [r1], #1 |
99 | USER( strgebt r3, [r0], #1) @ May fault | 100 | USER( T(strgeb) r3, [r0], #1) @ May fault |
100 | ldrgtb r3, [r1], #1 | 101 | ldrgtb r3, [r1], #1 |
101 | USER( strgtbt r3, [r0], #1) @ May fault | 102 | USER( T(strgtb) r3, [r0], #1) @ May fault |
102 | b .Lc2u_finished | 103 | b .Lc2u_finished |
103 | 104 | ||
104 | .Lc2u_not_enough: | 105 | .Lc2u_not_enough: |
@@ -119,7 +120,7 @@ USER( strgtbt r3, [r0], #1) @ May fault | |||
119 | mov r3, r7, pull #8 | 120 | mov r3, r7, pull #8 |
120 | ldr r7, [r1], #4 | 121 | ldr r7, [r1], #4 |
121 | orr r3, r3, r7, push #24 | 122 | orr r3, r3, r7, push #24 |
122 | USER( strt r3, [r0], #4) @ May fault | 123 | USER( T(str) r3, [r0], #4) @ May fault |
123 | mov ip, r0, lsl #32 - PAGE_SHIFT | 124 | mov ip, r0, lsl #32 - PAGE_SHIFT |
124 | rsb ip, ip, #0 | 125 | rsb ip, ip, #0 |
125 | movs ip, ip, lsr #32 - PAGE_SHIFT | 126 | movs ip, ip, lsr #32 - PAGE_SHIFT |
@@ -154,18 +155,18 @@ USER( strt r3, [r0], #4) @ May fault | |||
154 | movne r3, r7, pull #8 | 155 | movne r3, r7, pull #8 |
155 | ldrne r7, [r1], #4 | 156 | ldrne r7, [r1], #4 |
156 | orrne r3, r3, r7, push #24 | 157 | orrne r3, r3, r7, push #24 |
157 | strnet r3, [r0], #4 @ Shouldnt fault | 158 | T(strne) r3, [r0], #4 @ Shouldnt fault |
158 | ands ip, ip, #3 | 159 | ands ip, ip, #3 |
159 | beq .Lc2u_1fupi | 160 | beq .Lc2u_1fupi |
160 | .Lc2u_1nowords: mov r3, r7, get_byte_1 | 161 | .Lc2u_1nowords: mov r3, r7, get_byte_1 |
161 | teq ip, #0 | 162 | teq ip, #0 |
162 | beq .Lc2u_finished | 163 | beq .Lc2u_finished |
163 | cmp ip, #2 | 164 | cmp ip, #2 |
164 | USER( strbt r3, [r0], #1) @ May fault | 165 | USER( T(strb) r3, [r0], #1) @ May fault |
165 | movge r3, r7, get_byte_2 | 166 | movge r3, r7, get_byte_2 |
166 | USER( strgebt r3, [r0], #1) @ May fault | 167 | USER( T(strgeb) r3, [r0], #1) @ May fault |
167 | movgt r3, r7, get_byte_3 | 168 | movgt r3, r7, get_byte_3 |
168 | USER( strgtbt r3, [r0], #1) @ May fault | 169 | USER( T(strgtb) r3, [r0], #1) @ May fault |
169 | b .Lc2u_finished | 170 | b .Lc2u_finished |
170 | 171 | ||
171 | .Lc2u_2fupi: subs r2, r2, #4 | 172 | .Lc2u_2fupi: subs r2, r2, #4 |
@@ -174,7 +175,7 @@ USER( strgtbt r3, [r0], #1) @ May fault | |||
174 | mov r3, r7, pull #16 | 175 | mov r3, r7, pull #16 |
175 | ldr r7, [r1], #4 | 176 | ldr r7, [r1], #4 |
176 | orr r3, r3, r7, push #16 | 177 | orr r3, r3, r7, push #16 |
177 | USER( strt r3, [r0], #4) @ May fault | 178 | USER( T(str) r3, [r0], #4) @ May fault |
178 | mov ip, r0, lsl #32 - PAGE_SHIFT | 179 | mov ip, r0, lsl #32 - PAGE_SHIFT |
179 | rsb ip, ip, #0 | 180 | rsb ip, ip, #0 |
180 | movs ip, ip, lsr #32 - PAGE_SHIFT | 181 | movs ip, ip, lsr #32 - PAGE_SHIFT |
@@ -209,18 +210,18 @@ USER( strt r3, [r0], #4) @ May fault | |||
209 | movne r3, r7, pull #16 | 210 | movne r3, r7, pull #16 |
210 | ldrne r7, [r1], #4 | 211 | ldrne r7, [r1], #4 |
211 | orrne r3, r3, r7, push #16 | 212 | orrne r3, r3, r7, push #16 |
212 | strnet r3, [r0], #4 @ Shouldnt fault | 213 | T(strne) r3, [r0], #4 @ Shouldnt fault |
213 | ands ip, ip, #3 | 214 | ands ip, ip, #3 |
214 | beq .Lc2u_2fupi | 215 | beq .Lc2u_2fupi |
215 | .Lc2u_2nowords: mov r3, r7, get_byte_2 | 216 | .Lc2u_2nowords: mov r3, r7, get_byte_2 |
216 | teq ip, #0 | 217 | teq ip, #0 |
217 | beq .Lc2u_finished | 218 | beq .Lc2u_finished |
218 | cmp ip, #2 | 219 | cmp ip, #2 |
219 | USER( strbt r3, [r0], #1) @ May fault | 220 | USER( T(strb) r3, [r0], #1) @ May fault |
220 | movge r3, r7, get_byte_3 | 221 | movge r3, r7, get_byte_3 |
221 | USER( strgebt r3, [r0], #1) @ May fault | 222 | USER( T(strgeb) r3, [r0], #1) @ May fault |
222 | ldrgtb r3, [r1], #0 | 223 | ldrgtb r3, [r1], #0 |
223 | USER( strgtbt r3, [r0], #1) @ May fault | 224 | USER( T(strgtb) r3, [r0], #1) @ May fault |
224 | b .Lc2u_finished | 225 | b .Lc2u_finished |
225 | 226 | ||
226 | .Lc2u_3fupi: subs r2, r2, #4 | 227 | .Lc2u_3fupi: subs r2, r2, #4 |
@@ -229,7 +230,7 @@ USER( strgtbt r3, [r0], #1) @ May fault | |||
229 | mov r3, r7, pull #24 | 230 | mov r3, r7, pull #24 |
230 | ldr r7, [r1], #4 | 231 | ldr r7, [r1], #4 |
231 | orr r3, r3, r7, push #8 | 232 | orr r3, r3, r7, push #8 |
232 | USER( strt r3, [r0], #4) @ May fault | 233 | USER( T(str) r3, [r0], #4) @ May fault |
233 | mov ip, r0, lsl #32 - PAGE_SHIFT | 234 | mov ip, r0, lsl #32 - PAGE_SHIFT |
234 | rsb ip, ip, #0 | 235 | rsb ip, ip, #0 |
235 | movs ip, ip, lsr #32 - PAGE_SHIFT | 236 | movs ip, ip, lsr #32 - PAGE_SHIFT |
@@ -264,18 +265,18 @@ USER( strt r3, [r0], #4) @ May fault | |||
264 | movne r3, r7, pull #24 | 265 | movne r3, r7, pull #24 |
265 | ldrne r7, [r1], #4 | 266 | ldrne r7, [r1], #4 |
266 | orrne r3, r3, r7, push #8 | 267 | orrne r3, r3, r7, push #8 |
267 | strnet r3, [r0], #4 @ Shouldnt fault | 268 | T(strne) r3, [r0], #4 @ Shouldnt fault |
268 | ands ip, ip, #3 | 269 | ands ip, ip, #3 |
269 | beq .Lc2u_3fupi | 270 | beq .Lc2u_3fupi |
270 | .Lc2u_3nowords: mov r3, r7, get_byte_3 | 271 | .Lc2u_3nowords: mov r3, r7, get_byte_3 |
271 | teq ip, #0 | 272 | teq ip, #0 |
272 | beq .Lc2u_finished | 273 | beq .Lc2u_finished |
273 | cmp ip, #2 | 274 | cmp ip, #2 |
274 | USER( strbt r3, [r0], #1) @ May fault | 275 | USER( T(strb) r3, [r0], #1) @ May fault |
275 | ldrgeb r3, [r1], #1 | 276 | ldrgeb r3, [r1], #1 |
276 | USER( strgebt r3, [r0], #1) @ May fault | 277 | USER( T(strgeb) r3, [r0], #1) @ May fault |
277 | ldrgtb r3, [r1], #0 | 278 | ldrgtb r3, [r1], #0 |
278 | USER( strgtbt r3, [r0], #1) @ May fault | 279 | USER( T(strgtb) r3, [r0], #1) @ May fault |
279 | b .Lc2u_finished | 280 | b .Lc2u_finished |
280 | ENDPROC(__copy_to_user) | 281 | ENDPROC(__copy_to_user) |
281 | 282 | ||
@@ -294,11 +295,11 @@ ENDPROC(__copy_to_user) | |||
294 | .Lcfu_dest_not_aligned: | 295 | .Lcfu_dest_not_aligned: |
295 | rsb ip, ip, #4 | 296 | rsb ip, ip, #4 |
296 | cmp ip, #2 | 297 | cmp ip, #2 |
297 | USER( ldrbt r3, [r1], #1) @ May fault | 298 | USER( T(ldrb) r3, [r1], #1) @ May fault |
298 | strb r3, [r0], #1 | 299 | strb r3, [r0], #1 |
299 | USER( ldrgebt r3, [r1], #1) @ May fault | 300 | USER( T(ldrgeb) r3, [r1], #1) @ May fault |
300 | strgeb r3, [r0], #1 | 301 | strgeb r3, [r0], #1 |
301 | USER( ldrgtbt r3, [r1], #1) @ May fault | 302 | USER( T(ldrgtb) r3, [r1], #1) @ May fault |
302 | strgtb r3, [r0], #1 | 303 | strgtb r3, [r0], #1 |
303 | sub r2, r2, ip | 304 | sub r2, r2, ip |
304 | b .Lcfu_dest_aligned | 305 | b .Lcfu_dest_aligned |
@@ -321,7 +322,7 @@ ENTRY(__copy_from_user) | |||
321 | .Lcfu_0fupi: subs r2, r2, #4 | 322 | .Lcfu_0fupi: subs r2, r2, #4 |
322 | addmi ip, r2, #4 | 323 | addmi ip, r2, #4 |
323 | bmi .Lcfu_0nowords | 324 | bmi .Lcfu_0nowords |
324 | USER( ldrt r3, [r1], #4) | 325 | USER( T(ldr) r3, [r1], #4) |
325 | str r3, [r0], #4 | 326 | str r3, [r0], #4 |
326 | mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | 327 | mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction |
327 | rsb ip, ip, #0 | 328 | rsb ip, ip, #0 |
@@ -350,18 +351,18 @@ USER( ldrt r3, [r1], #4) | |||
350 | ldmneia r1!, {r3 - r4} @ Shouldnt fault | 351 | ldmneia r1!, {r3 - r4} @ Shouldnt fault |
351 | stmneia r0!, {r3 - r4} | 352 | stmneia r0!, {r3 - r4} |
352 | tst ip, #4 | 353 | tst ip, #4 |
353 | ldrnet r3, [r1], #4 @ Shouldnt fault | 354 | T(ldrne) r3, [r1], #4 @ Shouldnt fault |
354 | strne r3, [r0], #4 | 355 | strne r3, [r0], #4 |
355 | ands ip, ip, #3 | 356 | ands ip, ip, #3 |
356 | beq .Lcfu_0fupi | 357 | beq .Lcfu_0fupi |
357 | .Lcfu_0nowords: teq ip, #0 | 358 | .Lcfu_0nowords: teq ip, #0 |
358 | beq .Lcfu_finished | 359 | beq .Lcfu_finished |
359 | .Lcfu_nowords: cmp ip, #2 | 360 | .Lcfu_nowords: cmp ip, #2 |
360 | USER( ldrbt r3, [r1], #1) @ May fault | 361 | USER( T(ldrb) r3, [r1], #1) @ May fault |
361 | strb r3, [r0], #1 | 362 | strb r3, [r0], #1 |
362 | USER( ldrgebt r3, [r1], #1) @ May fault | 363 | USER( T(ldrgeb) r3, [r1], #1) @ May fault |
363 | strgeb r3, [r0], #1 | 364 | strgeb r3, [r0], #1 |
364 | USER( ldrgtbt r3, [r1], #1) @ May fault | 365 | USER( T(ldrgtb) r3, [r1], #1) @ May fault |
365 | strgtb r3, [r0], #1 | 366 | strgtb r3, [r0], #1 |
366 | b .Lcfu_finished | 367 | b .Lcfu_finished |
367 | 368 | ||
@@ -374,7 +375,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fault | |||
374 | 375 | ||
375 | .Lcfu_src_not_aligned: | 376 | .Lcfu_src_not_aligned: |
376 | bic r1, r1, #3 | 377 | bic r1, r1, #3 |
377 | USER( ldrt r7, [r1], #4) @ May fault | 378 | USER( T(ldr) r7, [r1], #4) @ May fault |
378 | cmp ip, #2 | 379 | cmp ip, #2 |
379 | bgt .Lcfu_3fupi | 380 | bgt .Lcfu_3fupi |
380 | beq .Lcfu_2fupi | 381 | beq .Lcfu_2fupi |
@@ -382,7 +383,7 @@ USER( ldrt r7, [r1], #4) @ May fault | |||
382 | addmi ip, r2, #4 | 383 | addmi ip, r2, #4 |
383 | bmi .Lcfu_1nowords | 384 | bmi .Lcfu_1nowords |
384 | mov r3, r7, pull #8 | 385 | mov r3, r7, pull #8 |
385 | USER( ldrt r7, [r1], #4) @ May fault | 386 | USER( T(ldr) r7, [r1], #4) @ May fault |
386 | orr r3, r3, r7, push #24 | 387 | orr r3, r3, r7, push #24 |
387 | str r3, [r0], #4 | 388 | str r3, [r0], #4 |
388 | mov ip, r1, lsl #32 - PAGE_SHIFT | 389 | mov ip, r1, lsl #32 - PAGE_SHIFT |
@@ -417,7 +418,7 @@ USER( ldrt r7, [r1], #4) @ May fault | |||
417 | stmneia r0!, {r3 - r4} | 418 | stmneia r0!, {r3 - r4} |
418 | tst ip, #4 | 419 | tst ip, #4 |
419 | movne r3, r7, pull #8 | 420 | movne r3, r7, pull #8 |
420 | USER( ldrnet r7, [r1], #4) @ May fault | 421 | USER( T(ldrne) r7, [r1], #4) @ May fault |
421 | orrne r3, r3, r7, push #24 | 422 | orrne r3, r3, r7, push #24 |
422 | strne r3, [r0], #4 | 423 | strne r3, [r0], #4 |
423 | ands ip, ip, #3 | 424 | ands ip, ip, #3 |
@@ -437,7 +438,7 @@ USER( ldrnet r7, [r1], #4) @ May fault | |||
437 | addmi ip, r2, #4 | 438 | addmi ip, r2, #4 |
438 | bmi .Lcfu_2nowords | 439 | bmi .Lcfu_2nowords |
439 | mov r3, r7, pull #16 | 440 | mov r3, r7, pull #16 |
440 | USER( ldrt r7, [r1], #4) @ May fault | 441 | USER( T(ldr) r7, [r1], #4) @ May fault |
441 | orr r3, r3, r7, push #16 | 442 | orr r3, r3, r7, push #16 |
442 | str r3, [r0], #4 | 443 | str r3, [r0], #4 |
443 | mov ip, r1, lsl #32 - PAGE_SHIFT | 444 | mov ip, r1, lsl #32 - PAGE_SHIFT |
@@ -473,7 +474,7 @@ USER( ldrt r7, [r1], #4) @ May fault | |||
473 | stmneia r0!, {r3 - r4} | 474 | stmneia r0!, {r3 - r4} |
474 | tst ip, #4 | 475 | tst ip, #4 |
475 | movne r3, r7, pull #16 | 476 | movne r3, r7, pull #16 |
476 | USER( ldrnet r7, [r1], #4) @ May fault | 477 | USER( T(ldrne) r7, [r1], #4) @ May fault |
477 | orrne r3, r3, r7, push #16 | 478 | orrne r3, r3, r7, push #16 |
478 | strne r3, [r0], #4 | 479 | strne r3, [r0], #4 |
479 | ands ip, ip, #3 | 480 | ands ip, ip, #3 |
@@ -485,7 +486,7 @@ USER( ldrnet r7, [r1], #4) @ May fault | |||
485 | strb r3, [r0], #1 | 486 | strb r3, [r0], #1 |
486 | movge r3, r7, get_byte_3 | 487 | movge r3, r7, get_byte_3 |
487 | strgeb r3, [r0], #1 | 488 | strgeb r3, [r0], #1 |
488 | USER( ldrgtbt r3, [r1], #0) @ May fault | 489 | USER( T(ldrgtb) r3, [r1], #0) @ May fault |
489 | strgtb r3, [r0], #1 | 490 | strgtb r3, [r0], #1 |
490 | b .Lcfu_finished | 491 | b .Lcfu_finished |
491 | 492 | ||
@@ -493,7 +494,7 @@ USER( ldrgtbt r3, [r1], #0) @ May fault | |||
493 | addmi ip, r2, #4 | 494 | addmi ip, r2, #4 |
494 | bmi .Lcfu_3nowords | 495 | bmi .Lcfu_3nowords |
495 | mov r3, r7, pull #24 | 496 | mov r3, r7, pull #24 |
496 | USER( ldrt r7, [r1], #4) @ May fault | 497 | USER( T(ldr) r7, [r1], #4) @ May fault |
497 | orr r3, r3, r7, push #8 | 498 | orr r3, r3, r7, push #8 |
498 | str r3, [r0], #4 | 499 | str r3, [r0], #4 |
499 | mov ip, r1, lsl #32 - PAGE_SHIFT | 500 | mov ip, r1, lsl #32 - PAGE_SHIFT |
@@ -528,7 +529,7 @@ USER( ldrt r7, [r1], #4) @ May fault | |||
528 | stmneia r0!, {r3 - r4} | 529 | stmneia r0!, {r3 - r4} |
529 | tst ip, #4 | 530 | tst ip, #4 |
530 | movne r3, r7, pull #24 | 531 | movne r3, r7, pull #24 |
531 | USER( ldrnet r7, [r1], #4) @ May fault | 532 | USER( T(ldrne) r7, [r1], #4) @ May fault |
532 | orrne r3, r3, r7, push #8 | 533 | orrne r3, r3, r7, push #8 |
533 | strne r3, [r0], #4 | 534 | strne r3, [r0], #4 |
534 | ands ip, ip, #3 | 535 | ands ip, ip, #3 |
@@ -538,9 +539,9 @@ USER( ldrnet r7, [r1], #4) @ May fault | |||
538 | beq .Lcfu_finished | 539 | beq .Lcfu_finished |
539 | cmp ip, #2 | 540 | cmp ip, #2 |
540 | strb r3, [r0], #1 | 541 | strb r3, [r0], #1 |
541 | USER( ldrgebt r3, [r1], #1) @ May fault | 542 | USER( T(ldrgeb) r3, [r1], #1) @ May fault |
542 | strgeb r3, [r0], #1 | 543 | strgeb r3, [r0], #1 |
543 | USER( ldrgtbt r3, [r1], #1) @ May fault | 544 | USER( T(ldrgtb) r3, [r1], #1) @ May fault |
544 | strgtb r3, [r0], #1 | 545 | strgtb r3, [r0], #1 |
545 | b .Lcfu_finished | 546 | b .Lcfu_finished |
546 | ENDPROC(__copy_from_user) | 547 | ENDPROC(__copy_from_user) |
diff --git a/arch/arm/mach-bcmring/clock.c b/arch/arm/mach-bcmring/clock.c index 14bafc38f2d..ad237a42d26 100644 --- a/arch/arm/mach-bcmring/clock.c +++ b/arch/arm/mach-bcmring/clock.c | |||
@@ -21,13 +21,12 @@ | |||
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/clkdev.h> | ||
24 | #include <mach/csp/hw_cfg.h> | 25 | #include <mach/csp/hw_cfg.h> |
25 | #include <mach/csp/chipcHw_def.h> | 26 | #include <mach/csp/chipcHw_def.h> |
26 | #include <mach/csp/chipcHw_reg.h> | 27 | #include <mach/csp/chipcHw_reg.h> |
27 | #include <mach/csp/chipcHw_inline.h> | 28 | #include <mach/csp/chipcHw_inline.h> |
28 | 29 | ||
29 | #include <asm/clkdev.h> | ||
30 | |||
31 | #include "clock.h" | 30 | #include "clock.h" |
32 | 31 | ||
33 | #define clk_is_primary(x) ((x)->type & CLK_TYPE_PRIMARY) | 32 | #define clk_is_primary(x) ((x)->type & CLK_TYPE_PRIMARY) |
diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-bcmring/core.c index d3f959e92b2..ed96ef40047 100644 --- a/arch/arm/mach-bcmring/core.c +++ b/arch/arm/mach-bcmring/core.c | |||
@@ -30,10 +30,10 @@ | |||
30 | #include <linux/amba/bus.h> | 30 | #include <linux/amba/bus.h> |
31 | #include <linux/clocksource.h> | 31 | #include <linux/clocksource.h> |
32 | #include <linux/clockchips.h> | 32 | #include <linux/clockchips.h> |
33 | #include <linux/clkdev.h> | ||
33 | 34 | ||
34 | #include <mach/csp/mm_addr.h> | 35 | #include <mach/csp/mm_addr.h> |
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
36 | #include <asm/clkdev.h> | ||
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
39 | #include <asm/hardware/arm_timer.h> | 39 | #include <asm/hardware/arm_timer.h> |
diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig index 9ebfcc46feb..29b13f249aa 100644 --- a/arch/arm/mach-cns3xxx/Kconfig +++ b/arch/arm/mach-cns3xxx/Kconfig | |||
@@ -3,6 +3,7 @@ menu "CNS3XXX platform type" | |||
3 | 3 | ||
4 | config MACH_CNS3420VB | 4 | config MACH_CNS3420VB |
5 | bool "Support for CNS3420 Validation Board" | 5 | bool "Support for CNS3420 Validation Board" |
6 | select MIGHT_HAVE_PCI | ||
6 | help | 7 | help |
7 | Include support for the Cavium Networks CNS3420 MPCore Platform | 8 | Include support for the Cavium Networks CNS3420 MPCore Platform |
8 | Baseboard. | 9 | Baseboard. |
diff --git a/arch/arm/mach-davinci/clock.h b/arch/arm/mach-davinci/clock.h index 11099980b58..0dd22031ec6 100644 --- a/arch/arm/mach-davinci/clock.h +++ b/arch/arm/mach-davinci/clock.h | |||
@@ -68,7 +68,7 @@ | |||
68 | #ifndef __ASSEMBLER__ | 68 | #ifndef __ASSEMBLER__ |
69 | 69 | ||
70 | #include <linux/list.h> | 70 | #include <linux/list.h> |
71 | #include <asm/clkdev.h> | 71 | #include <linux/clkdev.h> |
72 | 72 | ||
73 | #define PLLSTAT_GOSTAT BIT(0) | 73 | #define PLLSTAT_GOSTAT BIT(0) |
74 | #define PLLCMD_GOSET BIT(0) | 74 | #define PLLCMD_GOSET BIT(0) |
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index ef06c66a6f1..ca4de710509 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -19,10 +19,10 @@ | |||
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/clkdev.h> | ||
22 | 23 | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | 25 | ||
25 | #include <asm/clkdev.h> | ||
26 | #include <asm/div64.h> | 26 | #include <asm/div64.h> |
27 | 27 | ||
28 | 28 | ||
diff --git a/arch/arm/mach-imx/clock-imx1.c b/arch/arm/mach-imx/clock-imx1.c index daca30b2d5b..3938a563b28 100644 --- a/arch/arm/mach-imx/clock-imx1.c +++ b/arch/arm/mach-imx/clock-imx1.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | 25 | #include <linux/clkdev.h> | |
26 | #include <asm/clkdev.h> | ||
27 | 26 | ||
28 | #include <mach/clock.h> | 27 | #include <mach/clock.h> |
29 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-imx/clock-imx21.c b/arch/arm/mach-imx/clock-imx21.c index cf15ea516a7..d7056559715 100644 --- a/arch/arm/mach-imx/clock-imx21.c +++ b/arch/arm/mach-imx/clock-imx21.c | |||
@@ -21,11 +21,11 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/clkdev.h> | ||
24 | 25 | ||
25 | #include <mach/clock.h> | 26 | #include <mach/clock.h> |
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <mach/common.h> | 28 | #include <mach/common.h> |
28 | #include <asm/clkdev.h> | ||
29 | #include <asm/div64.h> | 29 | #include <asm/div64.h> |
30 | 30 | ||
31 | #define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off))) | 31 | #define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off))) |
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c index 98a25bada78..ca1017b9028 100644 --- a/arch/arm/mach-imx/clock-imx27.c +++ b/arch/arm/mach-imx/clock-imx27.c | |||
@@ -21,8 +21,8 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/clkdev.h> | ||
24 | 25 | ||
25 | #include <asm/clkdev.h> | ||
26 | #include <asm/div64.h> | 26 | #include <asm/div64.h> |
27 | 27 | ||
28 | #include <mach/clock.h> | 28 | #include <mach/clock.h> |
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index 27db275b367..769b0f10c83 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig | |||
@@ -4,6 +4,7 @@ menu "Integrator Options" | |||
4 | 4 | ||
5 | config ARCH_INTEGRATOR_AP | 5 | config ARCH_INTEGRATOR_AP |
6 | bool "Support Integrator/AP and Integrator/PP2 platforms" | 6 | bool "Support Integrator/AP and Integrator/PP2 platforms" |
7 | select MIGHT_HAVE_PCI | ||
7 | help | 8 | help |
8 | Include support for the ARM(R) Integrator/AP and | 9 | Include support for the ARM(R) Integrator/AP and |
9 | Integrator/PP2 platforms. | 10 | Integrator/PP2 platforms. |
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 8f4fb6d638f..b8e884b450d 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -21,9 +21,8 @@ | |||
21 | #include <linux/amba/bus.h> | 21 | #include <linux/amba/bus.h> |
22 | #include <linux/amba/serial.h> | 22 | #include <linux/amba/serial.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/clkdev.h> | ||
24 | 25 | ||
25 | #include <asm/clkdev.h> | ||
26 | #include <mach/clkdev.h> | ||
27 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
28 | #include <mach/platform.h> | 27 | #include <mach/platform.h> |
29 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index fd684bf205e..5db574f8ae3 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -22,9 +22,8 @@ | |||
22 | #include <linux/amba/clcd.h> | 22 | #include <linux/amba/clcd.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/clkdev.h> | ||
25 | 26 | ||
26 | #include <asm/clkdev.h> | ||
27 | #include <mach/clkdev.h> | ||
28 | #include <asm/hardware/icst.h> | 27 | #include <asm/hardware/icst.h> |
29 | #include <mach/lm.h> | 28 | #include <mach/lm.h> |
30 | #include <mach/impd1.h> | 29 | #include <mach/impd1.h> |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 6258c90d020..9403d2fa13a 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -21,9 +21,8 @@ | |||
21 | #include <linux/amba/mmci.h> | 21 | #include <linux/amba/mmci.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/gfp.h> | 23 | #include <linux/gfp.h> |
24 | #include <linux/clkdev.h> | ||
24 | 25 | ||
25 | #include <asm/clkdev.h> | ||
26 | #include <mach/clkdev.h> | ||
27 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
28 | #include <mach/platform.h> | 27 | #include <mach/platform.h> |
29 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h index 7415e433865..3ad45531886 100644 --- a/arch/arm/mach-iop13xx/include/mach/memory.h +++ b/arch/arm/mach-iop13xx/include/mach/memory.h | |||
@@ -58,13 +58,13 @@ static inline unsigned long __lbus_to_virt(dma_addr_t x) | |||
58 | __dma; \ | 58 | __dma; \ |
59 | }) | 59 | }) |
60 | 60 | ||
61 | #define __arch_page_to_dma(dev, page) \ | 61 | #define __arch_pfn_to_dma(dev, pfn) \ |
62 | ({ \ | 62 | ({ \ |
63 | /* __is_lbus_virt() can never be true for RAM pages */ \ | 63 | /* __is_lbus_virt() can never be true for RAM pages */ \ |
64 | (dma_addr_t)page_to_phys(page); \ | 64 | (dma_addr_t)__pfn_to_phys(pfn); \ |
65 | }) | 65 | }) |
66 | 66 | ||
67 | #define __arch_dma_to_page(dev, addr) phys_to_page(addr) | 67 | #define __arch_dma_to_pfn(dev, addr) __phys_to_pfn(addr) |
68 | 68 | ||
69 | #endif /* CONFIG_ARCH_IOP13XX */ | 69 | #endif /* CONFIG_ARCH_IOP13XX */ |
70 | #endif /* !ASSEMBLY */ | 70 | #endif /* !ASSEMBLY */ |
diff --git a/arch/arm/mach-ks8695/Kconfig b/arch/arm/mach-ks8695/Kconfig index fe0c82e30b2..f5c39a8c2b0 100644 --- a/arch/arm/mach-ks8695/Kconfig +++ b/arch/arm/mach-ks8695/Kconfig | |||
@@ -4,6 +4,7 @@ menu "Kendin/Micrel KS8695 Implementations" | |||
4 | 4 | ||
5 | config MACH_KS8695 | 5 | config MACH_KS8695 |
6 | bool "KS8695 development board" | 6 | bool "KS8695 development board" |
7 | select MIGHT_HAVE_PCI | ||
7 | help | 8 | help |
8 | Say 'Y' here if you want your kernel to run on the original | 9 | Say 'Y' here if you want your kernel to run on the original |
9 | Kendin-Micrel KS8695 development board. | 10 | Kendin-Micrel KS8695 development board. |
diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h index ffa19aae6e0..bace9a681ad 100644 --- a/arch/arm/mach-ks8695/include/mach/memory.h +++ b/arch/arm/mach-ks8695/include/mach/memory.h | |||
@@ -35,17 +35,17 @@ extern struct bus_type platform_bus_type; | |||
35 | __phys_to_virt(x) : __bus_to_virt(x)); }) | 35 | __phys_to_virt(x) : __bus_to_virt(x)); }) |
36 | #define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \ | 36 | #define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \ |
37 | (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); }) | 37 | (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); }) |
38 | #define __arch_page_to_dma(dev, x) \ | 38 | #define __arch_pfn_to_dma(dev, pfn) \ |
39 | ({ dma_addr_t __dma = page_to_phys(page); \ | 39 | ({ dma_addr_t __dma = __pfn_to_phys(pfn); \ |
40 | if (!is_lbus_device(dev)) \ | 40 | if (!is_lbus_device(dev)) \ |
41 | __dma = __dma - PHYS_OFFSET + KS8695_PCIMEM_PA; \ | 41 | __dma = __dma - PHYS_OFFSET + KS8695_PCIMEM_PA; \ |
42 | __dma; }) | 42 | __dma; }) |
43 | 43 | ||
44 | #define __arch_dma_to_page(dev, x) \ | 44 | #define __arch_dma_to_pfn(dev, x) \ |
45 | ({ dma_addr_t __dma = x; \ | 45 | ({ dma_addr_t __dma = x; \ |
46 | if (!is_lbus_device(dev)) \ | 46 | if (!is_lbus_device(dev)) \ |
47 | __dma += PHYS_OFFSET - KS8695_PCIMEM_PA; \ | 47 | __dma += PHYS_OFFSET - KS8695_PCIMEM_PA; \ |
48 | phys_to_page(__dma); \ | 48 | __phys_to_pfn(__dma); \ |
49 | }) | 49 | }) |
50 | 50 | ||
51 | #endif | 51 | #endif |
diff --git a/arch/arm/mach-lpc32xx/clock.c b/arch/arm/mach-lpc32xx/clock.c index 32d63796430..da0e6498110 100644 --- a/arch/arm/mach-lpc32xx/clock.c +++ b/arch/arm/mach-lpc32xx/clock.c | |||
@@ -90,10 +90,9 @@ | |||
90 | #include <linux/clk.h> | 90 | #include <linux/clk.h> |
91 | #include <linux/amba/bus.h> | 91 | #include <linux/amba/bus.h> |
92 | #include <linux/amba/clcd.h> | 92 | #include <linux/amba/clcd.h> |
93 | #include <linux/clkdev.h> | ||
93 | 94 | ||
94 | #include <mach/hardware.h> | 95 | #include <mach/hardware.h> |
95 | #include <asm/clkdev.h> | ||
96 | #include <mach/clkdev.h> | ||
97 | #include <mach/platform.h> | 96 | #include <mach/platform.h> |
98 | #include "clock.h" | 97 | #include "clock.h" |
99 | #include "common.h" | 98 | #include "common.h" |
diff --git a/arch/arm/mach-mmp/clock.h b/arch/arm/mach-mmp/clock.h index 016ae94691c..9b027d7491f 100644 --- a/arch/arm/mach-mmp/clock.h +++ b/arch/arm/mach-mmp/clock.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/clkdev.h> | 9 | #include <linux/clkdev.h> |
10 | 10 | ||
11 | struct clkops { | 11 | struct clkops { |
12 | void (*enable)(struct clk *); | 12 | void (*enable)(struct clk *); |
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index 9e4a5578c2f..00dcb08019e 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -21,8 +21,7 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | #include <linux/clkdev.h> | |
25 | #include <asm/clkdev.h> | ||
26 | 25 | ||
27 | #include <mach/clock.h> | 26 | #include <mach/clock.h> |
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c index 109e98f323e..1cd8b40b767 100644 --- a/arch/arm/mach-mx3/clock-imx31.c +++ b/arch/arm/mach-mx3/clock-imx31.c | |||
@@ -23,8 +23,8 @@ | |||
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/clkdev.h> | ||
26 | 27 | ||
27 | #include <asm/clkdev.h> | ||
28 | #include <asm/div64.h> | 28 | #include <asm/div64.h> |
29 | 29 | ||
30 | #include <mach/clock.h> | 30 | #include <mach/clock.h> |
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index 61e4a318980..819dd809615 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -21,8 +21,7 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | #include <linux/clkdev.h> | |
25 | #include <asm/clkdev.h> | ||
26 | 25 | ||
27 | #include <mach/clock.h> | 26 | #include <mach/clock.h> |
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c index 8ac36d88292..5975edb47de 100644 --- a/arch/arm/mach-mx5/clock-mx51.c +++ b/arch/arm/mach-mx5/clock-mx51.c | |||
@@ -14,8 +14,8 @@ | |||
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/clkdev.h> | ||
17 | 18 | ||
18 | #include <asm/clkdev.h> | ||
19 | #include <asm/div64.h> | 19 | #include <asm/div64.h> |
20 | 20 | ||
21 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-mxc91231/clock.c b/arch/arm/mach-mxc91231/clock.c index 5c85075d8a5..9fab505f1eb 100644 --- a/arch/arm/mach-mxc91231/clock.c +++ b/arch/arm/mach-mxc91231/clock.c | |||
@@ -2,12 +2,12 @@ | |||
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/io.h> | 4 | #include <linux/io.h> |
5 | #include <linux/clkdev.h> | ||
5 | 6 | ||
6 | #include <mach/clock.h> | 7 | #include <mach/clock.h> |
7 | #include <mach/hardware.h> | 8 | #include <mach/hardware.h> |
8 | #include <mach/common.h> | 9 | #include <mach/common.h> |
9 | 10 | ||
10 | #include <asm/clkdev.h> | ||
11 | #include <asm/bug.h> | 11 | #include <asm/bug.h> |
12 | #include <asm/div64.h> | 12 | #include <asm/div64.h> |
13 | 13 | ||
diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c index 89f793adf77..48a59f24e10 100644 --- a/arch/arm/mach-nomadik/clock.c +++ b/arch/arm/mach-nomadik/clock.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/clk.h> | 9 | #include <linux/clk.h> |
10 | #include <asm/clkdev.h> | 10 | #include <linux/clkdev.h> |
11 | #include "clock.h" | 11 | #include "clock.h" |
12 | 12 | ||
13 | /* | 13 | /* |
diff --git a/arch/arm/mach-nuc93x/clock.h b/arch/arm/mach-nuc93x/clock.h index 18e51be4816..4de1f1da9dc 100644 --- a/arch/arm/mach-nuc93x/clock.h +++ b/arch/arm/mach-nuc93x/clock.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * the Free Software Foundation; either version 2 of the License. | 10 | * the Free Software Foundation; either version 2 of the License. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <asm/clkdev.h> | 13 | #include <linux/clkdev.h> |
14 | 14 | ||
15 | void nuc93x_clk_enable(struct clk *clk, int enable); | 15 | void nuc93x_clk_enable(struct clk *clk, int enable); |
16 | void clks_register(struct clk_lookup *clks, size_t num); | 16 | void clks_register(struct clk_lookup *clks, size_t num); |
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index b8c7fb9d792..84ef70476b5 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -17,9 +17,9 @@ | |||
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/clkdev.h> | ||
20 | 21 | ||
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/clkdev.h> | ||
23 | 23 | ||
24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
25 | #include <plat/usb.h> | 25 | #include <plat/usb.h> |
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index ed8d330522f..ebb888f5936 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c | |||
@@ -26,10 +26,10 @@ | |||
26 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <linux/clkdev.h> | ||
29 | 30 | ||
30 | #include <plat/cpu.h> | 31 | #include <plat/cpu.h> |
31 | #include <plat/clock.h> | 32 | #include <plat/clock.h> |
32 | #include <asm/clkdev.h> | ||
33 | 33 | ||
34 | #include "clock.h" | 34 | #include "clock.h" |
35 | #include "prm.h" | 35 | #include "prm.h" |
diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c index 9d1975fa4d9..a4a3819c96c 100644 --- a/arch/arm/mach-pnx4008/clock.c +++ b/arch/arm/mach-pnx4008/clock.c | |||
@@ -21,8 +21,7 @@ | |||
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | #include <linux/clkdev.h> | |
25 | #include <asm/clkdev.h> | ||
26 | 25 | ||
27 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
28 | #include <mach/clock.h> | 27 | #include <mach/clock.h> |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index dd235ecc9d6..716a2e159c2 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -94,6 +94,7 @@ config MACH_ARMCORE | |||
94 | select PXA27x | 94 | select PXA27x |
95 | select IWMMXT | 95 | select IWMMXT |
96 | select PXA25x | 96 | select PXA25x |
97 | select MIGHT_HAVE_PCI | ||
97 | 98 | ||
98 | config MACH_EM_X270 | 99 | config MACH_EM_X270 |
99 | bool "CompuLab EM-x270 platform" | 100 | bool "CompuLab EM-x270 platform" |
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c index abba0089a2a..4e4a84be96b 100644 --- a/arch/arm/mach-pxa/clock.c +++ b/arch/arm/mach-pxa/clock.c | |||
@@ -11,8 +11,8 @@ | |||
11 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/clkdev.h> | ||
14 | 15 | ||
15 | #include <asm/clkdev.h> | ||
16 | #include <mach/pxa2xx-regs.h> | 16 | #include <mach/pxa2xx-regs.h> |
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | 18 | ||
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h index d8488742b80..12cc0e87e6c 100644 --- a/arch/arm/mach-pxa/clock.h +++ b/arch/arm/mach-pxa/clock.h | |||
@@ -1,4 +1,4 @@ | |||
1 | #include <asm/clkdev.h> | 1 | #include <linux/clkdev.h> |
2 | 2 | ||
3 | struct clkops { | 3 | struct clkops { |
4 | void (*enable)(struct clk *); | 4 | void (*enable)(struct clk *); |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 07c08151dfe..3d915b1ccdb 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -30,8 +30,8 @@ | |||
30 | #include <linux/ata_platform.h> | 30 | #include <linux/ata_platform.h> |
31 | #include <linux/amba/mmci.h> | 31 | #include <linux/amba/mmci.h> |
32 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
33 | #include <linux/clkdev.h> | ||
33 | 34 | ||
34 | #include <asm/clkdev.h> | ||
35 | #include <asm/system.h> | 35 | #include <asm/system.h> |
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
@@ -47,7 +47,6 @@ | |||
47 | 47 | ||
48 | #include <asm/hardware/gic.h> | 48 | #include <asm/hardware/gic.h> |
49 | 49 | ||
50 | #include <mach/clkdev.h> | ||
51 | #include <mach/platform.h> | 50 | #include <mach/platform.h> |
52 | #include <mach/irqs.h> | 51 | #include <mach/irqs.h> |
53 | #include <plat/timer-sp.h> | 52 | #include <plat/timer-sp.h> |
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig index cef6a65637b..e824a85c89a 100644 --- a/arch/arm/mach-s3c2412/Kconfig +++ b/arch/arm/mach-s3c2412/Kconfig | |||
@@ -52,7 +52,7 @@ config MACH_JIVE | |||
52 | Say Y here if you are using the Logitech Jive. | 52 | Say Y here if you are using the Logitech Jive. |
53 | 53 | ||
54 | config MACH_JIVE_SHOW_BOOTLOADER | 54 | config MACH_JIVE_SHOW_BOOTLOADER |
55 | bool "Allow access to bootloader partitions in MTD" | 55 | bool "Allow access to bootloader partitions in MTD (EXPERIMENTAL)" |
56 | depends on MACH_JIVE && EXPERIMENTAL | 56 | depends on MACH_JIVE && EXPERIMENTAL |
57 | 57 | ||
58 | config MACH_SMDK2413 | 58 | config MACH_SMDK2413 |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 51dcd59eda6..63293335724 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -6,7 +6,7 @@ config ARCH_SH7367 | |||
6 | bool "SH-Mobile G3 (SH7367)" | 6 | bool "SH-Mobile G3 (SH7367)" |
7 | select CPU_V6 | 7 | select CPU_V6 |
8 | select HAVE_CLK | 8 | select HAVE_CLK |
9 | select COMMON_CLKDEV | 9 | select CLKDEV_LOOKUP |
10 | select SH_CLK_CPG | 10 | select SH_CLK_CPG |
11 | select GENERIC_CLOCKEVENTS | 11 | select GENERIC_CLOCKEVENTS |
12 | 12 | ||
@@ -14,7 +14,7 @@ config ARCH_SH7377 | |||
14 | bool "SH-Mobile G4 (SH7377)" | 14 | bool "SH-Mobile G4 (SH7377)" |
15 | select CPU_V7 | 15 | select CPU_V7 |
16 | select HAVE_CLK | 16 | select HAVE_CLK |
17 | select COMMON_CLKDEV | 17 | select CLKDEV_LOOKUP |
18 | select SH_CLK_CPG | 18 | select SH_CLK_CPG |
19 | select GENERIC_CLOCKEVENTS | 19 | select GENERIC_CLOCKEVENTS |
20 | 20 | ||
@@ -22,7 +22,7 @@ config ARCH_SH7372 | |||
22 | bool "SH-Mobile AP4 (SH7372)" | 22 | bool "SH-Mobile AP4 (SH7372)" |
23 | select CPU_V7 | 23 | select CPU_V7 |
24 | select HAVE_CLK | 24 | select HAVE_CLK |
25 | select COMMON_CLKDEV | 25 | select CLKDEV_LOOKUP |
26 | select SH_CLK_CPG | 26 | select SH_CLK_CPG |
27 | select GENERIC_CLOCKEVENTS | 27 | select GENERIC_CLOCKEVENTS |
28 | 28 | ||
diff --git a/arch/arm/mach-shmobile/clock-sh7367.c b/arch/arm/mach-shmobile/clock-sh7367.c index 9f78729098f..6b186aefcbd 100644 --- a/arch/arm/mach-shmobile/clock-sh7367.c +++ b/arch/arm/mach-shmobile/clock-sh7367.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
23 | #include <linux/clkdev.h> | ||
23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
24 | #include <asm/clkdev.h> | ||
25 | 25 | ||
26 | /* SH7367 registers */ | 26 | /* SH7367 registers */ |
27 | #define RTFRQCR 0xe6150000 | 27 | #define RTFRQCR 0xe6150000 |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 3aa02606943..d98deb497c2 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
23 | #include <linux/clkdev.h> | ||
23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
24 | #include <asm/clkdev.h> | ||
25 | 25 | ||
26 | /* SH7372 registers */ | 26 | /* SH7372 registers */ |
27 | #define FRQCRA 0xe6150000 | 27 | #define FRQCRA 0xe6150000 |
diff --git a/arch/arm/mach-shmobile/clock-sh7377.c b/arch/arm/mach-shmobile/clock-sh7377.c index f91395aeb9a..95942466e63 100644 --- a/arch/arm/mach-shmobile/clock-sh7377.c +++ b/arch/arm/mach-shmobile/clock-sh7377.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
23 | #include <linux/clkdev.h> | ||
23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
24 | #include <asm/clkdev.h> | ||
25 | 25 | ||
26 | /* SH7377 registers */ | 26 | /* SH7377 registers */ |
27 | #define RTFRQCR 0xe6150000 | 27 | #define RTFRQCR 0xe6150000 |
diff --git a/arch/arm/mach-tcc8k/clock.c b/arch/arm/mach-tcc8k/clock.c index ba32a15127a..3970a9cdce2 100644 --- a/arch/arm/mach-tcc8k/clock.c +++ b/arch/arm/mach-tcc8k/clock.c | |||
@@ -12,8 +12,7 @@ | |||
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | 15 | #include <linux/clkdev.h> | |
16 | #include <asm/clkdev.h> | ||
17 | 16 | ||
18 | #include <mach/clock.h> | 17 | #include <mach/clock.h> |
19 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c index ae19f95585b..77948e0f490 100644 --- a/arch/arm/mach-tegra/clock.c +++ b/arch/arm/mach-tegra/clock.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/seq_file.h> | 26 | #include <linux/seq_file.h> |
27 | #include <linux/regulator/consumer.h> | 27 | #include <linux/regulator/consumer.h> |
28 | #include <asm/clkdev.h> | 28 | #include <linux/clkdev.h> |
29 | 29 | ||
30 | #include "clock.h" | 30 | #include "clock.h" |
31 | #include "board.h" | 31 | #include "board.h" |
diff --git a/arch/arm/mach-tegra/clock.h b/arch/arm/mach-tegra/clock.h index 94fd859770f..083a4cfc6cf 100644 --- a/arch/arm/mach-tegra/clock.h +++ b/arch/arm/mach-tegra/clock.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define __MACH_TEGRA_CLOCK_H | 21 | #define __MACH_TEGRA_CLOCK_H |
22 | 22 | ||
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <asm/clkdev.h> | 24 | #include <linux/clkdev.h> |
25 | 25 | ||
26 | #define DIV_BUS (1 << 0) | 26 | #define DIV_BUS (1 << 0) |
27 | #define DIV_U71 (1 << 1) | 27 | #define DIV_U71 (1 << 1) |
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index ae3b308e22a..f0dae6d8ba5 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c | |||
@@ -24,8 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/hrtimer.h> | 26 | #include <linux/hrtimer.h> |
27 | 27 | #include <linux/clkdev.h> | |
28 | #include <asm/clkdev.h> | ||
29 | 28 | ||
30 | #include <mach/iomap.h> | 29 | #include <mach/iomap.h> |
31 | 30 | ||
diff --git a/arch/arm/mach-u300/clock.c b/arch/arm/mach-u300/clock.c index 7458fc6df5c..fabcc49abe8 100644 --- a/arch/arm/mach-u300/clock.c +++ b/arch/arm/mach-u300/clock.c | |||
@@ -25,8 +25,8 @@ | |||
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | #include <linux/clkdev.h> | ||
28 | 29 | ||
29 | #include <asm/clkdev.h> | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <mach/syscon.h> | 31 | #include <mach/syscon.h> |
32 | 32 | ||
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 1675047daf2..531de5c6364 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -13,8 +13,7 @@ | |||
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | 16 | #include <linux/clkdev.h> | |
17 | #include <asm/clkdev.h> | ||
18 | 17 | ||
19 | #include <plat/mtu.h> | 18 | #include <plat/mtu.h> |
20 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index c781f30c836..3f7b5e9d83c 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig | |||
@@ -4,6 +4,7 @@ menu "Versatile platform type" | |||
4 | config ARCH_VERSATILE_PB | 4 | config ARCH_VERSATILE_PB |
5 | bool "Support Versatile/PB platform" | 5 | bool "Support Versatile/PB platform" |
6 | select CPU_ARM926T | 6 | select CPU_ARM926T |
7 | select MIGHT_HAVE_PCI | ||
7 | default y | 8 | default y |
8 | help | 9 | help |
9 | Include support for the ARM(R) Versatile/PB platform. | 10 | Include support for the ARM(R) Versatile/PB platform. |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index e38acb0f89c..8c1ca1d6353 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -31,8 +31,8 @@ | |||
31 | #include <linux/amba/pl022.h> | 31 | #include <linux/amba/pl022.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/gfp.h> | 33 | #include <linux/gfp.h> |
34 | #include <linux/clkdev.h> | ||
34 | 35 | ||
35 | #include <asm/clkdev.h> | ||
36 | #include <asm/system.h> | 36 | #include <asm/system.h> |
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #include <asm/leds.h> | 38 | #include <asm/leds.h> |
@@ -46,7 +46,6 @@ | |||
46 | #include <asm/mach/irq.h> | 46 | #include <asm/mach/irq.h> |
47 | #include <asm/mach/time.h> | 47 | #include <asm/mach/time.h> |
48 | #include <asm/mach/map.h> | 48 | #include <asm/mach/map.h> |
49 | #include <mach/clkdev.h> | ||
50 | #include <mach/hardware.h> | 49 | #include <mach/hardware.h> |
51 | #include <mach/platform.h> | 50 | #include <mach/platform.h> |
52 | #include <plat/timer-sp.h> | 51 | #include <plat/timer-sp.h> |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index fd25ccd7272..f4455e3ed6a 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -8,8 +8,8 @@ | |||
8 | #include <linux/platform_device.h> | 8 | #include <linux/platform_device.h> |
9 | #include <linux/amba/bus.h> | 9 | #include <linux/amba/bus.h> |
10 | #include <linux/amba/clcd.h> | 10 | #include <linux/amba/clcd.h> |
11 | #include <linux/clkdev.h> | ||
11 | 12 | ||
12 | #include <asm/clkdev.h> | ||
13 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
14 | #include <asm/hardware/arm_timer.h> | 14 | #include <asm/hardware/arm_timer.h> |
15 | #include <asm/hardware/cache-l2x0.h> | 15 | #include <asm/hardware/cache-l2x0.h> |
@@ -18,7 +18,6 @@ | |||
18 | #include <asm/pmu.h> | 18 | #include <asm/pmu.h> |
19 | #include <asm/smp_twd.h> | 19 | #include <asm/smp_twd.h> |
20 | 20 | ||
21 | #include <mach/clkdev.h> | ||
22 | #include <mach/ct-ca9x4.h> | 21 | #include <mach/ct-ca9x4.h> |
23 | 22 | ||
24 | #include <plat/timer-sp.h> | 23 | #include <plat/timer-sp.h> |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 7eaa232180a..d374a78986e 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -11,15 +11,14 @@ | |||
11 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
12 | #include <linux/sysdev.h> | 12 | #include <linux/sysdev.h> |
13 | #include <linux/usb/isp1760.h> | 13 | #include <linux/usb/isp1760.h> |
14 | #include <linux/clkdev.h> | ||
14 | 15 | ||
15 | #include <asm/clkdev.h> | ||
16 | #include <asm/sizes.h> | 16 | #include <asm/sizes.h> |
17 | #include <asm/mach/flash.h> | 17 | #include <asm/mach/flash.h> |
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/mach/time.h> | 19 | #include <asm/mach/time.h> |
20 | #include <asm/hardware/arm_timer.h> | 20 | #include <asm/hardware/arm_timer.h> |
21 | 21 | ||
22 | #include <mach/clkdev.h> | ||
23 | #include <mach/motherboard.h> | 22 | #include <mach/motherboard.h> |
24 | 23 | ||
25 | #include <plat/timer-sp.h> | 24 | #include <plat/timer-sp.h> |
diff --git a/arch/arm/mach-w90x900/clock.h b/arch/arm/mach-w90x900/clock.h index c56ddab3d91..b88a1b16b2e 100644 --- a/arch/arm/mach-w90x900/clock.h +++ b/arch/arm/mach-w90x900/clock.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * the Free Software Foundation; either version 2 of the License. | 10 | * the Free Software Foundation; either version 2 of the License. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <asm/clkdev.h> | 13 | #include <linux/clkdev.h> |
14 | 14 | ||
15 | void nuc900_clk_enable(struct clk *clk, int enable); | 15 | void nuc900_clk_enable(struct clk *clk, int enable); |
16 | void nuc900_subclk_enable(struct clk *clk, int enable); | 16 | void nuc900_subclk_enable(struct clk *clk, int enable); |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 4414a01e1e8..8493ed04797 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -599,6 +599,14 @@ config CPU_CP15_MPU | |||
599 | help | 599 | help |
600 | Processor has the CP15 register, which has MPU related registers. | 600 | Processor has the CP15 register, which has MPU related registers. |
601 | 601 | ||
602 | config CPU_USE_DOMAINS | ||
603 | bool | ||
604 | depends on MMU | ||
605 | default y if !CPU_32v6K | ||
606 | help | ||
607 | This option enables or disables the use of domain switching | ||
608 | via the set_fs() function. | ||
609 | |||
602 | # | 610 | # |
603 | # CPU supports 36-bit I/O | 611 | # CPU supports 36-bit I/O |
604 | # | 612 | # |
@@ -628,6 +636,33 @@ config ARM_THUMBEE | |||
628 | Say Y here if you have a CPU with the ThumbEE extension and code to | 636 | Say Y here if you have a CPU with the ThumbEE extension and code to |
629 | make use of it. Say N for code that can run on CPUs without ThumbEE. | 637 | make use of it. Say N for code that can run on CPUs without ThumbEE. |
630 | 638 | ||
639 | config SWP_EMULATE | ||
640 | bool "Emulate SWP/SWPB instructions" | ||
641 | depends on CPU_V7 | ||
642 | select HAVE_PROC_CPU if PROC_FS | ||
643 | default y if SMP | ||
644 | help | ||
645 | ARMv6 architecture deprecates use of the SWP/SWPB instructions. | ||
646 | ARMv7 multiprocessing extensions introduce the ability to disable | ||
647 | these instructions, triggering an undefined instruction exception | ||
648 | when executed. Say Y here to enable software emulation of these | ||
649 | instructions for userspace (not kernel) using LDREX/STREX. | ||
650 | Also creates /proc/cpu/swp_emulation for statistics. | ||
651 | |||
652 | In some older versions of glibc [<=2.8] SWP is used during futex | ||
653 | trylock() operations with the assumption that the code will not | ||
654 | be preempted. This invalid assumption may be more likely to fail | ||
655 | with SWP emulation enabled, leading to deadlock of the user | ||
656 | application. | ||
657 | |||
658 | NOTE: when accessing uncached shared regions, LDREX/STREX rely | ||
659 | on an external transaction monitoring block called a global | ||
660 | monitor to maintain update atomicity. If your system does not | ||
661 | implement a global monitor, this option can cause programs that | ||
662 | perform SWP operations to uncached memory to deadlock. | ||
663 | |||
664 | If unsure, say Y. | ||
665 | |||
631 | config CPU_BIG_ENDIAN | 666 | config CPU_BIG_ENDIAN |
632 | bool "Build big-endian kernel" | 667 | bool "Build big-endian kernel" |
633 | depends on ARCH_SUPPORTS_BIG_ENDIAN | 668 | depends on ARCH_SUPPORTS_BIG_ENDIAN |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index ac6a36142fc..e24fe6d9c71 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -311,7 +311,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, | |||
311 | addr = page_address(page); | 311 | addr = page_address(page); |
312 | 312 | ||
313 | if (addr) | 313 | if (addr) |
314 | *handle = page_to_dma(dev, page); | 314 | *handle = pfn_to_dma(dev, page_to_pfn(page)); |
315 | 315 | ||
316 | return addr; | 316 | return addr; |
317 | } | 317 | } |
@@ -406,7 +406,7 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr | |||
406 | if (!arch_is_coherent()) | 406 | if (!arch_is_coherent()) |
407 | __dma_free_remap(cpu_addr, size); | 407 | __dma_free_remap(cpu_addr, size); |
408 | 408 | ||
409 | __dma_free_buffer(dma_to_page(dev, handle), size); | 409 | __dma_free_buffer(pfn_to_page(dma_to_pfn(dev, handle)), size); |
410 | } | 410 | } |
411 | EXPORT_SYMBOL(dma_free_coherent); | 411 | EXPORT_SYMBOL(dma_free_coherent); |
412 | 412 | ||
@@ -554,17 +554,20 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
554 | struct scatterlist *s; | 554 | struct scatterlist *s; |
555 | int i, j; | 555 | int i, j; |
556 | 556 | ||
557 | BUG_ON(!valid_dma_direction(dir)); | ||
558 | |||
557 | for_each_sg(sg, s, nents, i) { | 559 | for_each_sg(sg, s, nents, i) { |
558 | s->dma_address = dma_map_page(dev, sg_page(s), s->offset, | 560 | s->dma_address = __dma_map_page(dev, sg_page(s), s->offset, |
559 | s->length, dir); | 561 | s->length, dir); |
560 | if (dma_mapping_error(dev, s->dma_address)) | 562 | if (dma_mapping_error(dev, s->dma_address)) |
561 | goto bad_mapping; | 563 | goto bad_mapping; |
562 | } | 564 | } |
565 | debug_dma_map_sg(dev, sg, nents, nents, dir); | ||
563 | return nents; | 566 | return nents; |
564 | 567 | ||
565 | bad_mapping: | 568 | bad_mapping: |
566 | for_each_sg(sg, s, i, j) | 569 | for_each_sg(sg, s, i, j) |
567 | dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir); | 570 | __dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir); |
568 | return 0; | 571 | return 0; |
569 | } | 572 | } |
570 | EXPORT_SYMBOL(dma_map_sg); | 573 | EXPORT_SYMBOL(dma_map_sg); |
@@ -585,8 +588,10 @@ void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
585 | struct scatterlist *s; | 588 | struct scatterlist *s; |
586 | int i; | 589 | int i; |
587 | 590 | ||
591 | debug_dma_unmap_sg(dev, sg, nents, dir); | ||
592 | |||
588 | for_each_sg(sg, s, nents, i) | 593 | for_each_sg(sg, s, nents, i) |
589 | dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir); | 594 | __dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir); |
590 | } | 595 | } |
591 | EXPORT_SYMBOL(dma_unmap_sg); | 596 | EXPORT_SYMBOL(dma_unmap_sg); |
592 | 597 | ||
@@ -611,6 +616,8 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | |||
611 | __dma_page_dev_to_cpu(sg_page(s), s->offset, | 616 | __dma_page_dev_to_cpu(sg_page(s), s->offset, |
612 | s->length, dir); | 617 | s->length, dir); |
613 | } | 618 | } |
619 | |||
620 | debug_dma_sync_sg_for_cpu(dev, sg, nents, dir); | ||
614 | } | 621 | } |
615 | EXPORT_SYMBOL(dma_sync_sg_for_cpu); | 622 | EXPORT_SYMBOL(dma_sync_sg_for_cpu); |
616 | 623 | ||
@@ -635,5 +642,16 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
635 | __dma_page_cpu_to_dev(sg_page(s), s->offset, | 642 | __dma_page_cpu_to_dev(sg_page(s), s->offset, |
636 | s->length, dir); | 643 | s->length, dir); |
637 | } | 644 | } |
645 | |||
646 | debug_dma_sync_sg_for_device(dev, sg, nents, dir); | ||
638 | } | 647 | } |
639 | EXPORT_SYMBOL(dma_sync_sg_for_device); | 648 | EXPORT_SYMBOL(dma_sync_sg_for_device); |
649 | |||
650 | #define PREALLOC_DMA_DEBUG_ENTRIES 4096 | ||
651 | |||
652 | static int __init dma_debug_do_init(void) | ||
653 | { | ||
654 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); | ||
655 | return 0; | ||
656 | } | ||
657 | fs_initcall(dma_debug_do_init); | ||
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 55c17a6fb22..ab506272b2d 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -204,12 +204,8 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, | |||
204 | /* | 204 | /* |
205 | * Don't allow RAM to be mapped - this causes problems with ARMv6+ | 205 | * Don't allow RAM to be mapped - this causes problems with ARMv6+ |
206 | */ | 206 | */ |
207 | if (pfn_valid(pfn)) { | 207 | if (WARN_ON(pfn_valid(pfn))) |
208 | printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory. This leads\n" | 208 | return NULL; |
209 | "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n" | ||
210 | "will fail in the next kernel release. Please fix your driver.\n"); | ||
211 | WARN_ON(1); | ||
212 | } | ||
213 | 209 | ||
214 | type = get_mem_type(mtype); | 210 | type = get_mem_type(mtype); |
215 | if (!type) | 211 | if (!type) |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 72ad3e1f56c..79c01f540cb 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/smp_plat.h> | 24 | #include <asm/smp_plat.h> |
25 | #include <asm/tlb.h> | 25 | #include <asm/tlb.h> |
26 | #include <asm/highmem.h> | 26 | #include <asm/highmem.h> |
27 | #include <asm/traps.h> | ||
27 | 28 | ||
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
@@ -914,12 +915,11 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
914 | { | 915 | { |
915 | struct map_desc map; | 916 | struct map_desc map; |
916 | unsigned long addr; | 917 | unsigned long addr; |
917 | void *vectors; | ||
918 | 918 | ||
919 | /* | 919 | /* |
920 | * Allocate the vector page early. | 920 | * Allocate the vector page early. |
921 | */ | 921 | */ |
922 | vectors = early_alloc(PAGE_SIZE); | 922 | vectors_page = early_alloc(PAGE_SIZE); |
923 | 923 | ||
924 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) | 924 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) |
925 | pmd_clear(pmd_off_k(addr)); | 925 | pmd_clear(pmd_off_k(addr)); |
@@ -959,7 +959,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
959 | * location (0xffff0000). If we aren't using high-vectors, also | 959 | * location (0xffff0000). If we aren't using high-vectors, also |
960 | * create a mapping at the low-vectors virtual address. | 960 | * create a mapping at the low-vectors virtual address. |
961 | */ | 961 | */ |
962 | map.pfn = __phys_to_pfn(virt_to_phys(vectors)); | 962 | map.pfn = __phys_to_pfn(virt_to_phys(vectors_page)); |
963 | map.virtual = 0xffff0000; | 963 | map.virtual = 0xffff0000; |
964 | map.length = PAGE_SIZE; | 964 | map.length = PAGE_SIZE; |
965 | map.type = MT_HIGH_VECTORS; | 965 | map.type = MT_HIGH_VECTORS; |
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 7d63beaf974..337f10256cd 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -99,6 +99,10 @@ | |||
99 | * 110x 0 1 0 r/w r/o | 99 | * 110x 0 1 0 r/w r/o |
100 | * 11x0 0 1 0 r/w r/o | 100 | * 11x0 0 1 0 r/w r/o |
101 | * 1111 0 1 1 r/w r/w | 101 | * 1111 0 1 1 r/w r/w |
102 | * | ||
103 | * If !CONFIG_CPU_USE_DOMAINS, the following permissions are changed: | ||
104 | * 110x 1 1 1 r/o r/o | ||
105 | * 11x0 1 1 1 r/o r/o | ||
102 | */ | 106 | */ |
103 | .macro armv6_mt_table pfx | 107 | .macro armv6_mt_table pfx |
104 | \pfx\()_mt_table: | 108 | \pfx\()_mt_table: |
@@ -138,8 +142,11 @@ | |||
138 | 142 | ||
139 | tst r1, #L_PTE_USER | 143 | tst r1, #L_PTE_USER |
140 | orrne r3, r3, #PTE_EXT_AP1 | 144 | orrne r3, r3, #PTE_EXT_AP1 |
145 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
146 | @ allow kernel read/write access to read-only user pages | ||
141 | tstne r3, #PTE_EXT_APX | 147 | tstne r3, #PTE_EXT_APX |
142 | bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 | 148 | bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 |
149 | #endif | ||
143 | 150 | ||
144 | tst r1, #L_PTE_EXEC | 151 | tst r1, #L_PTE_EXEC |
145 | orreq r3, r3, #PTE_EXT_XN | 152 | orreq r3, r3, #PTE_EXT_XN |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 53cbe222515..2b5b20baf80 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -148,8 +148,11 @@ ENTRY(cpu_v7_set_pte_ext) | |||
148 | 148 | ||
149 | tst r1, #L_PTE_USER | 149 | tst r1, #L_PTE_USER |
150 | orrne r3, r3, #PTE_EXT_AP1 | 150 | orrne r3, r3, #PTE_EXT_AP1 |
151 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
152 | @ allow kernel read/write access to read-only user pages | ||
151 | tstne r3, #PTE_EXT_APX | 153 | tstne r3, #PTE_EXT_APX |
152 | bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 | 154 | bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 |
155 | #endif | ||
153 | 156 | ||
154 | tst r1, #L_PTE_EXEC | 157 | tst r1, #L_PTE_EXEC |
155 | orreq r3, r3, #PTE_EXT_XN | 158 | orreq r3, r3, #PTE_EXT_XN |
@@ -273,8 +276,6 @@ __v7_setup: | |||
273 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) | 276 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) |
274 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) | 277 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) |
275 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 278 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 |
276 | mov r10, #0x1f @ domains 0, 1 = manager | ||
277 | mcr p15, 0, r10, c3, c0, 0 @ load domain access register | ||
278 | /* | 279 | /* |
279 | * Memory region attributes with SCTLR.TRE=1 | 280 | * Memory region attributes with SCTLR.TRE=1 |
280 | * | 281 | * |
@@ -313,6 +314,10 @@ __v7_setup: | |||
313 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 314 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
314 | orr r6, r6, #1 << 25 @ big-endian page tables | 315 | orr r6, r6, #1 << 25 @ big-endian page tables |
315 | #endif | 316 | #endif |
317 | #ifdef CONFIG_SWP_EMULATE | ||
318 | orr r5, r5, #(1 << 10) @ set SW bit in "clear" | ||
319 | bic r6, r6, #(1 << 10) @ clear it in "mmuset" | ||
320 | #endif | ||
316 | mrc p15, 0, r0, c1, c0, 0 @ read control register | 321 | mrc p15, 0, r0, c1, c0, 0 @ read control register |
317 | bic r0, r0, r5 @ clear bits them | 322 | bic r0, r0, r5 @ clear bits them |
318 | orr r0, r0, r6 @ set them | 323 | orr r0, r0, r6 @ set them |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 92c5bb7909f..c9408434a85 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -11,13 +11,13 @@ choice | |||
11 | 11 | ||
12 | config ARCH_OMAP1 | 12 | config ARCH_OMAP1 |
13 | bool "TI OMAP1" | 13 | bool "TI OMAP1" |
14 | select COMMON_CLKDEV | 14 | select CLKDEV_LOOKUP |
15 | help | 15 | help |
16 | "Systems based on omap7xx, omap15xx or omap16xx" | 16 | "Systems based on omap7xx, omap15xx or omap16xx" |
17 | 17 | ||
18 | config ARCH_OMAP2PLUS | 18 | config ARCH_OMAP2PLUS |
19 | bool "TI OMAP2/3/4" | 19 | bool "TI OMAP2/3/4" |
20 | select COMMON_CLKDEV | 20 | select CLKDEV_LOOKUP |
21 | help | 21 | help |
22 | "Systems based on OMAP2, OMAP3 or OMAP4" | 22 | "Systems based on OMAP2, OMAP3 or OMAP4" |
23 | 23 | ||
diff --git a/arch/arm/plat-omap/include/plat/clkdev_omap.h b/arch/arm/plat-omap/include/plat/clkdev_omap.h index bb937f3fabe..4b2028ab4d2 100644 --- a/arch/arm/plat-omap/include/plat/clkdev_omap.h +++ b/arch/arm/plat-omap/include/plat/clkdev_omap.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H | 8 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H |
9 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H | 9 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H |
10 | 10 | ||
11 | #include <asm/clkdev.h> | 11 | #include <linux/clkdev.h> |
12 | 12 | ||
13 | struct omap_clk { | 13 | struct omap_clk { |
14 | u16 cpu; | 14 | u16 cpu; |
diff --git a/arch/arm/plat-omap/include/plat/memory.h b/arch/arm/plat-omap/include/plat/memory.h index d5306bee44b..f8d922fb558 100644 --- a/arch/arm/plat-omap/include/plat/memory.h +++ b/arch/arm/plat-omap/include/plat/memory.h | |||
@@ -61,17 +61,17 @@ | |||
61 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) | 61 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) |
62 | #define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev_name(dev), "ohci", 4) == 0)) | 62 | #define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev_name(dev), "ohci", 4) == 0)) |
63 | 63 | ||
64 | #define __arch_page_to_dma(dev, page) \ | 64 | #define __arch_pfn_to_dma(dev, pfn) \ |
65 | ({ dma_addr_t __dma = page_to_phys(page); \ | 65 | ({ dma_addr_t __dma = __pfn_to_phys(pfn); \ |
66 | if (is_lbus_device(dev)) \ | 66 | if (is_lbus_device(dev)) \ |
67 | __dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \ | 67 | __dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \ |
68 | __dma; }) | 68 | __dma; }) |
69 | 69 | ||
70 | #define __arch_dma_to_page(dev, addr) \ | 70 | #define __arch_dma_to_pfn(dev, addr) \ |
71 | ({ dma_addr_t __dma = addr; \ | 71 | ({ dma_addr_t __dma = addr; \ |
72 | if (is_lbus_device(dev)) \ | 72 | if (is_lbus_device(dev)) \ |
73 | __dma += PHYS_OFFSET - OMAP1510_LB_OFFSET; \ | 73 | __dma += PHYS_OFFSET - OMAP1510_LB_OFFSET; \ |
74 | phys_to_page(__dma); \ | 74 | __phys_to_pfn(__dma); \ |
75 | }) | 75 | }) |
76 | 76 | ||
77 | #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ | 77 | #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ |
diff --git a/arch/arm/plat-spear/include/plat/clock.h b/arch/arm/plat-spear/include/plat/clock.h index 298bafc0a52..2572260f990 100644 --- a/arch/arm/plat-spear/include/plat/clock.h +++ b/arch/arm/plat-spear/include/plat/clock.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #define __PLAT_CLOCK_H | 15 | #define __PLAT_CLOCK_H |
16 | 16 | ||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <asm/clkdev.h> | 18 | #include <linux/clkdev.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | 20 | ||
21 | /* clk structure flags */ | 21 | /* clk structure flags */ |
diff --git a/arch/arm/plat-stmp3xxx/clock.c b/arch/arm/plat-stmp3xxx/clock.c index e593a2a801c..2e712e17ce7 100644 --- a/arch/arm/plat-stmp3xxx/clock.c +++ b/arch/arm/plat-stmp3xxx/clock.c | |||
@@ -25,9 +25,9 @@ | |||
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/clkdev.h> | ||
28 | 29 | ||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/clkdev.h> | ||
31 | #include <mach/platform.h> | 31 | #include <mach/platform.h> |
32 | #include <mach/regs-clkctrl.h> | 32 | #include <mach/regs-clkctrl.h> |
33 | 33 | ||