diff options
432 files changed, 4215 insertions, 4356 deletions
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt index 771d48d3b335..208a2d465b92 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.txt | |||
@@ -51,15 +51,14 @@ ffc00000 ffefffff DMA memory mapping region. Memory returned | |||
51 | ff000000 ffbfffff Reserved for future expansion of DMA | 51 | ff000000 ffbfffff Reserved for future expansion of DMA |
52 | mapping region. | 52 | mapping region. |
53 | 53 | ||
54 | VMALLOC_END feffffff Free for platform use, recommended. | ||
55 | VMALLOC_END must be aligned to a 2MB | ||
56 | boundary. | ||
57 | |||
58 | VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. | 54 | VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. |
59 | Memory returned by vmalloc/ioremap will | 55 | Memory returned by vmalloc/ioremap will |
60 | be dynamically placed in this region. | 56 | be dynamically placed in this region. |
61 | VMALLOC_START may be based upon the value | 57 | Machine specific static mappings are also |
62 | of the high_memory variable. | 58 | located here through iotable_init(). |
59 | VMALLOC_START is based upon the value | ||
60 | of the high_memory variable, and VMALLOC_END | ||
61 | is equal to 0xff000000. | ||
63 | 62 | ||
64 | PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region. | 63 | PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region. |
65 | This maps the platforms RAM, and typically | 64 | This maps the platforms RAM, and typically |
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt index 52916b4aa1fe..9b4b82a721b6 100644 --- a/Documentation/devicetree/bindings/arm/gic.txt +++ b/Documentation/devicetree/bindings/arm/gic.txt | |||
@@ -42,6 +42,10 @@ Optional | |||
42 | - interrupts : Interrupt source of the parent interrupt controller. Only | 42 | - interrupts : Interrupt source of the parent interrupt controller. Only |
43 | present on secondary GICs. | 43 | present on secondary GICs. |
44 | 44 | ||
45 | - cpu-offset : per-cpu offset within the distributor and cpu interface | ||
46 | regions, used when the GIC doesn't have banked registers. The offset is | ||
47 | cpu-offset * cpu-nr. | ||
48 | |||
45 | Example: | 49 | Example: |
46 | 50 | ||
47 | intc: interrupt-controller@fff11000 { | 51 | intc: interrupt-controller@fff11000 { |
diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/arm/vic.txt new file mode 100644 index 000000000000..266716b23437 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vic.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * ARM Vectored Interrupt Controller | ||
2 | |||
3 | One or more Vectored Interrupt Controllers (VIC's) can be connected in an ARM | ||
4 | system for interrupt routing. For multiple controllers they can either be | ||
5 | nested or have the outputs wire-OR'd together. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible : should be one of | ||
10 | "arm,pl190-vic" | ||
11 | "arm,pl192-vic" | ||
12 | - interrupt-controller : Identifies the node as an interrupt controller | ||
13 | - #interrupt-cells : The number of cells to define the interrupts. Must be 1 as | ||
14 | the VIC has no configuration options for interrupt sources. The cell is a u32 | ||
15 | and defines the interrupt number. | ||
16 | - reg : The register bank for the VIC. | ||
17 | |||
18 | Optional properties: | ||
19 | |||
20 | - interrupts : Interrupt source for parent controllers if the VIC is nested. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | vic0: interrupt-controller@60000 { | ||
25 | compatible = "arm,pl192-vic"; | ||
26 | interrupt-controller; | ||
27 | #interrupt-cells = <1>; | ||
28 | reg = <0x60000 0x1000>; | ||
29 | }; | ||
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 7945b0bd35e2..e2a4b5287361 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -1100,6 +1100,15 @@ emulate them efficiently. The fields in each entry are defined as follows: | |||
1100 | eax, ebx, ecx, edx: the values returned by the cpuid instruction for | 1100 | eax, ebx, ecx, edx: the values returned by the cpuid instruction for |
1101 | this function/index combination | 1101 | this function/index combination |
1102 | 1102 | ||
1103 | The TSC deadline timer feature (CPUID leaf 1, ecx[24]) is always returned | ||
1104 | as false, since the feature depends on KVM_CREATE_IRQCHIP for local APIC | ||
1105 | support. Instead it is reported via | ||
1106 | |||
1107 | ioctl(KVM_CHECK_EXTENSION, KVM_CAP_TSC_DEADLINE_TIMER) | ||
1108 | |||
1109 | if that returns true and you use KVM_CREATE_IRQCHIP, or if you emulate the | ||
1110 | feature in userspace, then you can enable the feature for KVM_SET_CPUID2. | ||
1111 | |||
1103 | 4.47 KVM_PPC_GET_PVINFO | 1112 | 4.47 KVM_PPC_GET_PVINFO |
1104 | 1113 | ||
1105 | Capability: KVM_CAP_PPC_GET_PVINFO | 1114 | Capability: KVM_CAP_PPC_GET_PVINFO |
@@ -1151,6 +1160,13 @@ following flags are specified: | |||
1151 | /* Depends on KVM_CAP_IOMMU */ | 1160 | /* Depends on KVM_CAP_IOMMU */ |
1152 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 1161 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
1153 | 1162 | ||
1163 | The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure | ||
1164 | isolation of the device. Usages not specifying this flag are deprecated. | ||
1165 | |||
1166 | Only PCI header type 0 devices with PCI BAR resources are supported by | ||
1167 | device assignment. The user requesting this ioctl must have read/write | ||
1168 | access to the PCI sysfs resource files associated with the device. | ||
1169 | |||
1154 | 4.49 KVM_DEASSIGN_PCI_DEVICE | 1170 | 4.49 KVM_DEASSIGN_PCI_DEVICE |
1155 | 1171 | ||
1156 | Capability: KVM_CAP_DEVICE_DEASSIGNMENT | 1172 | Capability: KVM_CAP_DEVICE_DEASSIGNMENT |
diff --git a/MAINTAINERS b/MAINTAINERS index 5a601eab03ae..5a70c1809b76 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2693,7 +2693,7 @@ FIREWIRE SUBSYSTEM | |||
2693 | M: Stefan Richter <stefanr@s5r6.in-berlin.de> | 2693 | M: Stefan Richter <stefanr@s5r6.in-berlin.de> |
2694 | L: linux1394-devel@lists.sourceforge.net | 2694 | L: linux1394-devel@lists.sourceforge.net |
2695 | W: http://ieee1394.wiki.kernel.org/ | 2695 | W: http://ieee1394.wiki.kernel.org/ |
2696 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git | 2696 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git |
2697 | S: Maintained | 2697 | S: Maintained |
2698 | F: drivers/firewire/ | 2698 | F: drivers/firewire/ |
2699 | F: include/linux/firewire*.h | 2699 | F: include/linux/firewire*.h |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 849e3ad93707..444822526a07 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -258,6 +258,7 @@ config ARCH_INTEGRATOR | |||
258 | select ARCH_HAS_CPUFREQ | 258 | select ARCH_HAS_CPUFREQ |
259 | select CLKDEV_LOOKUP | 259 | select CLKDEV_LOOKUP |
260 | select HAVE_MACH_CLKDEV | 260 | select HAVE_MACH_CLKDEV |
261 | select HAVE_TCM | ||
261 | select ICST | 262 | select ICST |
262 | select GENERIC_CLOCKEVENTS | 263 | select GENERIC_CLOCKEVENTS |
263 | select PLAT_VERSATILE | 264 | select PLAT_VERSATILE |
@@ -341,10 +342,12 @@ config ARCH_HIGHBANK | |||
341 | select ARM_AMBA | 342 | select ARM_AMBA |
342 | select ARM_GIC | 343 | select ARM_GIC |
343 | select ARM_TIMER_SP804 | 344 | select ARM_TIMER_SP804 |
345 | select CACHE_L2X0 | ||
344 | select CLKDEV_LOOKUP | 346 | select CLKDEV_LOOKUP |
345 | select CPU_V7 | 347 | select CPU_V7 |
346 | select GENERIC_CLOCKEVENTS | 348 | select GENERIC_CLOCKEVENTS |
347 | select HAVE_ARM_SCU | 349 | select HAVE_ARM_SCU |
350 | select HAVE_SMP | ||
348 | select USE_OF | 351 | select USE_OF |
349 | help | 352 | help |
350 | Support for the Calxeda Highbank SoC based boards. | 353 | Support for the Calxeda Highbank SoC based boards. |
@@ -362,6 +365,7 @@ config ARCH_CNS3XXX | |||
362 | select CPU_V6K | 365 | select CPU_V6K |
363 | select GENERIC_CLOCKEVENTS | 366 | select GENERIC_CLOCKEVENTS |
364 | select ARM_GIC | 367 | select ARM_GIC |
368 | select MIGHT_HAVE_CACHE_L2X0 | ||
365 | select MIGHT_HAVE_PCI | 369 | select MIGHT_HAVE_PCI |
366 | select PCI_DOMAINS if PCI | 370 | select PCI_DOMAINS if PCI |
367 | help | 371 | help |
@@ -382,6 +386,7 @@ config ARCH_PRIMA2 | |||
382 | select GENERIC_CLOCKEVENTS | 386 | select GENERIC_CLOCKEVENTS |
383 | select CLKDEV_LOOKUP | 387 | select CLKDEV_LOOKUP |
384 | select GENERIC_IRQ_CHIP | 388 | select GENERIC_IRQ_CHIP |
389 | select MIGHT_HAVE_CACHE_L2X0 | ||
385 | select USE_OF | 390 | select USE_OF |
386 | select ZONE_DMA | 391 | select ZONE_DMA |
387 | help | 392 | help |
@@ -634,6 +639,8 @@ config ARCH_TEGRA | |||
634 | select GENERIC_GPIO | 639 | select GENERIC_GPIO |
635 | select HAVE_CLK | 640 | select HAVE_CLK |
636 | select HAVE_SCHED_CLOCK | 641 | select HAVE_SCHED_CLOCK |
642 | select HAVE_SMP | ||
643 | select MIGHT_HAVE_CACHE_L2X0 | ||
637 | select ARCH_HAS_CPUFREQ | 644 | select ARCH_HAS_CPUFREQ |
638 | help | 645 | help |
639 | This enables support for NVIDIA Tegra based systems (Tegra APX, | 646 | This enables support for NVIDIA Tegra based systems (Tegra APX, |
@@ -703,7 +710,9 @@ config ARCH_SHMOBILE | |||
703 | select HAVE_CLK | 710 | select HAVE_CLK |
704 | select CLKDEV_LOOKUP | 711 | select CLKDEV_LOOKUP |
705 | select HAVE_MACH_CLKDEV | 712 | select HAVE_MACH_CLKDEV |
713 | select HAVE_SMP | ||
706 | select GENERIC_CLOCKEVENTS | 714 | select GENERIC_CLOCKEVENTS |
715 | select MIGHT_HAVE_CACHE_L2X0 | ||
707 | select NO_IOPORT | 716 | select NO_IOPORT |
708 | select SPARSE_IRQ | 717 | select SPARSE_IRQ |
709 | select MULTI_IRQ_HANDLER | 718 | select MULTI_IRQ_HANDLER |
@@ -895,6 +904,8 @@ config ARCH_U8500 | |||
895 | select CLKDEV_LOOKUP | 904 | select CLKDEV_LOOKUP |
896 | select ARCH_REQUIRE_GPIOLIB | 905 | select ARCH_REQUIRE_GPIOLIB |
897 | select ARCH_HAS_CPUFREQ | 906 | select ARCH_HAS_CPUFREQ |
907 | select HAVE_SMP | ||
908 | select MIGHT_HAVE_CACHE_L2X0 | ||
898 | help | 909 | help |
899 | Support for ST-Ericsson's Ux500 architecture | 910 | Support for ST-Ericsson's Ux500 architecture |
900 | 911 | ||
@@ -905,6 +916,7 @@ config ARCH_NOMADIK | |||
905 | select CPU_ARM926T | 916 | select CPU_ARM926T |
906 | select CLKDEV_LOOKUP | 917 | select CLKDEV_LOOKUP |
907 | select GENERIC_CLOCKEVENTS | 918 | select GENERIC_CLOCKEVENTS |
919 | select MIGHT_HAVE_CACHE_L2X0 | ||
908 | select ARCH_REQUIRE_GPIOLIB | 920 | select ARCH_REQUIRE_GPIOLIB |
909 | help | 921 | help |
910 | Support for the Nomadik platform by ST-Ericsson | 922 | Support for the Nomadik platform by ST-Ericsson |
@@ -964,6 +976,7 @@ config ARCH_ZYNQ | |||
964 | select ARM_GIC | 976 | select ARM_GIC |
965 | select ARM_AMBA | 977 | select ARM_AMBA |
966 | select ICST | 978 | select ICST |
979 | select MIGHT_HAVE_CACHE_L2X0 | ||
967 | select USE_OF | 980 | select USE_OF |
968 | help | 981 | help |
969 | Support for Xilinx Zynq ARM Cortex A9 Platform | 982 | Support for Xilinx Zynq ARM Cortex A9 Platform |
@@ -1114,6 +1127,11 @@ config ARM_TIMER_SP804 | |||
1114 | 1127 | ||
1115 | source arch/arm/mm/Kconfig | 1128 | source arch/arm/mm/Kconfig |
1116 | 1129 | ||
1130 | config ARM_NR_BANKS | ||
1131 | int | ||
1132 | default 16 if ARCH_EP93XX | ||
1133 | default 8 | ||
1134 | |||
1117 | config IWMMXT | 1135 | config IWMMXT |
1118 | bool "Enable iWMMXt support" | 1136 | bool "Enable iWMMXt support" |
1119 | depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 | 1137 | depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 |
@@ -1234,7 +1252,7 @@ config PL310_ERRATA_588369 | |||
1234 | 1252 | ||
1235 | config ARM_ERRATA_720789 | 1253 | config ARM_ERRATA_720789 |
1236 | bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" | 1254 | bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" |
1237 | depends on CPU_V7 && SMP | 1255 | depends on CPU_V7 |
1238 | help | 1256 | help |
1239 | This option enables the workaround for the 720789 Cortex-A9 (prior to | 1257 | This option enables the workaround for the 720789 Cortex-A9 (prior to |
1240 | r2p0) erratum. A faulty ASID can be sent to the other CPUs for the | 1258 | r2p0) erratum. A faulty ASID can be sent to the other CPUs for the |
@@ -1270,7 +1288,7 @@ config ARM_ERRATA_743622 | |||
1270 | 1288 | ||
1271 | config ARM_ERRATA_751472 | 1289 | config ARM_ERRATA_751472 |
1272 | bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" | 1290 | bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" |
1273 | depends on CPU_V7 && SMP | 1291 | depends on CPU_V7 |
1274 | help | 1292 | help |
1275 | This option enables the workaround for the 751472 Cortex-A9 (prior | 1293 | This option enables the workaround for the 751472 Cortex-A9 (prior |
1276 | to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the | 1294 | to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the |
@@ -1423,14 +1441,20 @@ menu "Kernel Features" | |||
1423 | 1441 | ||
1424 | source "kernel/time/Kconfig" | 1442 | source "kernel/time/Kconfig" |
1425 | 1443 | ||
1444 | config HAVE_SMP | ||
1445 | bool | ||
1446 | help | ||
1447 | This option should be selected by machines which have an SMP- | ||
1448 | capable CPU. | ||
1449 | |||
1450 | The only effect of this option is to make the SMP-related | ||
1451 | options available to the user for configuration. | ||
1452 | |||
1426 | config SMP | 1453 | config SMP |
1427 | bool "Symmetric Multi-Processing" | 1454 | bool "Symmetric Multi-Processing" |
1428 | depends on CPU_V6K || CPU_V7 | 1455 | depends on CPU_V6K || CPU_V7 |
1429 | depends on GENERIC_CLOCKEVENTS | 1456 | depends on GENERIC_CLOCKEVENTS |
1430 | depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \ | 1457 | depends on HAVE_SMP |
1431 | MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ | ||
1432 | ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ | ||
1433 | ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || ARCH_HIGHBANK || SOC_IMX6Q | ||
1434 | depends on MMU | 1458 | depends on MMU |
1435 | select USE_GENERIC_SMP_HELPERS | 1459 | select USE_GENERIC_SMP_HELPERS |
1436 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP | 1460 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP |
@@ -1548,6 +1572,16 @@ config LOCAL_TIMERS | |||
1548 | accounting to be spread across the timer interval, preventing a | 1572 | accounting to be spread across the timer interval, preventing a |
1549 | "thundering herd" at every timer tick. | 1573 | "thundering herd" at every timer tick. |
1550 | 1574 | ||
1575 | config ARCH_NR_GPIO | ||
1576 | int | ||
1577 | default 1024 if ARCH_SHMOBILE || ARCH_TEGRA | ||
1578 | default 350 if ARCH_U8500 | ||
1579 | default 0 | ||
1580 | help | ||
1581 | Maximum number of GPIOs in the system. | ||
1582 | |||
1583 | If unsure, leave the default value. | ||
1584 | |||
1551 | source kernel/Kconfig.preempt | 1585 | source kernel/Kconfig.preempt |
1552 | 1586 | ||
1553 | config HZ | 1587 | config HZ |
@@ -1960,7 +1994,7 @@ endchoice | |||
1960 | 1994 | ||
1961 | config XIP_KERNEL | 1995 | config XIP_KERNEL |
1962 | bool "Kernel Execute-In-Place from ROM" | 1996 | bool "Kernel Execute-In-Place from ROM" |
1963 | depends on !ZBOOT_ROM | 1997 | depends on !ZBOOT_ROM && !ARM_LPAE |
1964 | help | 1998 | help |
1965 | Execute-In-Place allows the kernel to run from non-volatile storage | 1999 | Execute-In-Place allows the kernel to run from non-volatile storage |
1966 | directly addressable by the CPU, such as NOR flash. This saves RAM | 2000 | directly addressable by the CPU, such as NOR flash. This saves RAM |
@@ -1990,7 +2024,7 @@ config XIP_PHYS_ADDR | |||
1990 | 2024 | ||
1991 | config KEXEC | 2025 | config KEXEC |
1992 | bool "Kexec system call (EXPERIMENTAL)" | 2026 | bool "Kexec system call (EXPERIMENTAL)" |
1993 | depends on EXPERIMENTAL | 2027 | depends on EXPERIMENTAL && (!SMP || HOTPLUG_CPU) |
1994 | help | 2028 | help |
1995 | kexec is a system call that implements the ability to shutdown your | 2029 | kexec is a system call that implements the ability to shutdown your |
1996 | current kernel, and to start another kernel. It is like a reboot | 2030 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 21f56ff32797..cf0a64ce4b83 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -126,7 +126,8 @@ ccflags-y := -fpic -fno-builtin -I$(obj) | |||
126 | asflags-y := -Wa,-march=all | 126 | asflags-y := -Wa,-march=all |
127 | 127 | ||
128 | # Supply kernel BSS size to the decompressor via a linker symbol. | 128 | # Supply kernel BSS size to the decompressor via a linker symbol. |
129 | KBSS_SZ = $(shell size $(obj)/../../../../vmlinux | awk 'END{print $$3}') | 129 | KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \ |
130 | awk 'END{print $$3}') | ||
130 | LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ) | 131 | LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ) |
131 | # Supply ZRELADDR to the decompressor via a linker symbol. | 132 | # Supply ZRELADDR to the decompressor via a linker symbol. |
132 | ifneq ($(CONFIG_AUTO_ZRELADDR),y) | 133 | ifneq ($(CONFIG_AUTO_ZRELADDR),y) |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index c2effc917254..c5d60250d43d 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -659,6 +659,7 @@ __armv7_mmu_cache_on: | |||
659 | mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer | 659 | mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer |
660 | mcrne p15, 0, r1, c3, c0, 0 @ load domain access control | 660 | mcrne p15, 0, r1, c3, c0, 0 @ load domain access control |
661 | #endif | 661 | #endif |
662 | mcr p15, 0, r0, c7, c5, 4 @ ISB | ||
662 | mcr p15, 0, r0, c1, c0, 0 @ load control register | 663 | mcr p15, 0, r0, c1, c0, 0 @ load control register |
663 | mrc p15, 0, r0, c1, c0, 0 @ and read it back | 664 | mrc p15, 0, r0, c1, c0, 0 @ and read it back |
664 | mov r0, #0 | 665 | mov r0, #0 |
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 74df9ca2be31..81a933eb0903 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig | |||
@@ -1,8 +1,14 @@ | |||
1 | config ARM_GIC | 1 | config ARM_GIC |
2 | select IRQ_DOMAIN | 2 | select IRQ_DOMAIN |
3 | select MULTI_IRQ_HANDLER | ||
4 | bool | ||
5 | |||
6 | config GIC_NON_BANKED | ||
3 | bool | 7 | bool |
4 | 8 | ||
5 | config ARM_VIC | 9 | config ARM_VIC |
10 | select IRQ_DOMAIN | ||
11 | select MULTI_IRQ_HANDLER | ||
6 | bool | 12 | bool |
7 | 13 | ||
8 | config ARM_VIC_NR | 14 | config ARM_VIC_NR |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 410a546060a2..b2dc2dd7f1df 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -40,13 +40,36 @@ | |||
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | 41 | ||
42 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
43 | #include <asm/exception.h> | ||
43 | #include <asm/mach/irq.h> | 44 | #include <asm/mach/irq.h> |
44 | #include <asm/hardware/gic.h> | 45 | #include <asm/hardware/gic.h> |
45 | 46 | ||
46 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); | 47 | union gic_base { |
48 | void __iomem *common_base; | ||
49 | void __percpu __iomem **percpu_base; | ||
50 | }; | ||
47 | 51 | ||
48 | /* Address of GIC 0 CPU interface */ | 52 | struct gic_chip_data { |
49 | void __iomem *gic_cpu_base_addr __read_mostly; | 53 | unsigned int irq_offset; |
54 | union gic_base dist_base; | ||
55 | union gic_base cpu_base; | ||
56 | #ifdef CONFIG_CPU_PM | ||
57 | u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)]; | ||
58 | u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)]; | ||
59 | u32 saved_spi_target[DIV_ROUND_UP(1020, 4)]; | ||
60 | u32 __percpu *saved_ppi_enable; | ||
61 | u32 __percpu *saved_ppi_conf; | ||
62 | #endif | ||
63 | #ifdef CONFIG_IRQ_DOMAIN | ||
64 | struct irq_domain domain; | ||
65 | #endif | ||
66 | unsigned int gic_irqs; | ||
67 | #ifdef CONFIG_GIC_NON_BANKED | ||
68 | void __iomem *(*get_base)(union gic_base *); | ||
69 | #endif | ||
70 | }; | ||
71 | |||
72 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); | ||
50 | 73 | ||
51 | /* | 74 | /* |
52 | * Supported arch specific GIC irq extension. | 75 | * Supported arch specific GIC irq extension. |
@@ -67,16 +90,48 @@ struct irq_chip gic_arch_extn = { | |||
67 | 90 | ||
68 | static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; | 91 | static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; |
69 | 92 | ||
93 | #ifdef CONFIG_GIC_NON_BANKED | ||
94 | static void __iomem *gic_get_percpu_base(union gic_base *base) | ||
95 | { | ||
96 | return *__this_cpu_ptr(base->percpu_base); | ||
97 | } | ||
98 | |||
99 | static void __iomem *gic_get_common_base(union gic_base *base) | ||
100 | { | ||
101 | return base->common_base; | ||
102 | } | ||
103 | |||
104 | static inline void __iomem *gic_data_dist_base(struct gic_chip_data *data) | ||
105 | { | ||
106 | return data->get_base(&data->dist_base); | ||
107 | } | ||
108 | |||
109 | static inline void __iomem *gic_data_cpu_base(struct gic_chip_data *data) | ||
110 | { | ||
111 | return data->get_base(&data->cpu_base); | ||
112 | } | ||
113 | |||
114 | static inline void gic_set_base_accessor(struct gic_chip_data *data, | ||
115 | void __iomem *(*f)(union gic_base *)) | ||
116 | { | ||
117 | data->get_base = f; | ||
118 | } | ||
119 | #else | ||
120 | #define gic_data_dist_base(d) ((d)->dist_base.common_base) | ||
121 | #define gic_data_cpu_base(d) ((d)->cpu_base.common_base) | ||
122 | #define gic_set_base_accessor(d,f) | ||
123 | #endif | ||
124 | |||
70 | static inline void __iomem *gic_dist_base(struct irq_data *d) | 125 | static inline void __iomem *gic_dist_base(struct irq_data *d) |
71 | { | 126 | { |
72 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); | 127 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
73 | return gic_data->dist_base; | 128 | return gic_data_dist_base(gic_data); |
74 | } | 129 | } |
75 | 130 | ||
76 | static inline void __iomem *gic_cpu_base(struct irq_data *d) | 131 | static inline void __iomem *gic_cpu_base(struct irq_data *d) |
77 | { | 132 | { |
78 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); | 133 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
79 | return gic_data->cpu_base; | 134 | return gic_data_cpu_base(gic_data); |
80 | } | 135 | } |
81 | 136 | ||
82 | static inline unsigned int gic_irq(struct irq_data *d) | 137 | static inline unsigned int gic_irq(struct irq_data *d) |
@@ -215,6 +270,32 @@ static int gic_set_wake(struct irq_data *d, unsigned int on) | |||
215 | #define gic_set_wake NULL | 270 | #define gic_set_wake NULL |
216 | #endif | 271 | #endif |
217 | 272 | ||
273 | asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) | ||
274 | { | ||
275 | u32 irqstat, irqnr; | ||
276 | struct gic_chip_data *gic = &gic_data[0]; | ||
277 | void __iomem *cpu_base = gic_data_cpu_base(gic); | ||
278 | |||
279 | do { | ||
280 | irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK); | ||
281 | irqnr = irqstat & ~0x1c00; | ||
282 | |||
283 | if (likely(irqnr > 15 && irqnr < 1021)) { | ||
284 | irqnr = irq_domain_to_irq(&gic->domain, irqnr); | ||
285 | handle_IRQ(irqnr, regs); | ||
286 | continue; | ||
287 | } | ||
288 | if (irqnr < 16) { | ||
289 | writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI); | ||
290 | #ifdef CONFIG_SMP | ||
291 | handle_IPI(irqnr, regs); | ||
292 | #endif | ||
293 | continue; | ||
294 | } | ||
295 | break; | ||
296 | } while (1); | ||
297 | } | ||
298 | |||
218 | static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | 299 | static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) |
219 | { | 300 | { |
220 | struct gic_chip_data *chip_data = irq_get_handler_data(irq); | 301 | struct gic_chip_data *chip_data = irq_get_handler_data(irq); |
@@ -225,7 +306,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
225 | chained_irq_enter(chip, desc); | 306 | chained_irq_enter(chip, desc); |
226 | 307 | ||
227 | raw_spin_lock(&irq_controller_lock); | 308 | raw_spin_lock(&irq_controller_lock); |
228 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); | 309 | status = readl_relaxed(gic_data_cpu_base(chip_data) + GIC_CPU_INTACK); |
229 | raw_spin_unlock(&irq_controller_lock); | 310 | raw_spin_unlock(&irq_controller_lock); |
230 | 311 | ||
231 | gic_irq = (status & 0x3ff); | 312 | gic_irq = (status & 0x3ff); |
@@ -270,7 +351,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic) | |||
270 | u32 cpumask; | 351 | u32 cpumask; |
271 | unsigned int gic_irqs = gic->gic_irqs; | 352 | unsigned int gic_irqs = gic->gic_irqs; |
272 | struct irq_domain *domain = &gic->domain; | 353 | struct irq_domain *domain = &gic->domain; |
273 | void __iomem *base = gic->dist_base; | 354 | void __iomem *base = gic_data_dist_base(gic); |
274 | u32 cpu = 0; | 355 | u32 cpu = 0; |
275 | 356 | ||
276 | #ifdef CONFIG_SMP | 357 | #ifdef CONFIG_SMP |
@@ -330,8 +411,8 @@ static void __init gic_dist_init(struct gic_chip_data *gic) | |||
330 | 411 | ||
331 | static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) | 412 | static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) |
332 | { | 413 | { |
333 | void __iomem *dist_base = gic->dist_base; | 414 | void __iomem *dist_base = gic_data_dist_base(gic); |
334 | void __iomem *base = gic->cpu_base; | 415 | void __iomem *base = gic_data_cpu_base(gic); |
335 | int i; | 416 | int i; |
336 | 417 | ||
337 | /* | 418 | /* |
@@ -368,7 +449,7 @@ static void gic_dist_save(unsigned int gic_nr) | |||
368 | BUG(); | 449 | BUG(); |
369 | 450 | ||
370 | gic_irqs = gic_data[gic_nr].gic_irqs; | 451 | gic_irqs = gic_data[gic_nr].gic_irqs; |
371 | dist_base = gic_data[gic_nr].dist_base; | 452 | dist_base = gic_data_dist_base(&gic_data[gic_nr]); |
372 | 453 | ||
373 | if (!dist_base) | 454 | if (!dist_base) |
374 | return; | 455 | return; |
@@ -403,7 +484,7 @@ static void gic_dist_restore(unsigned int gic_nr) | |||
403 | BUG(); | 484 | BUG(); |
404 | 485 | ||
405 | gic_irqs = gic_data[gic_nr].gic_irqs; | 486 | gic_irqs = gic_data[gic_nr].gic_irqs; |
406 | dist_base = gic_data[gic_nr].dist_base; | 487 | dist_base = gic_data_dist_base(&gic_data[gic_nr]); |
407 | 488 | ||
408 | if (!dist_base) | 489 | if (!dist_base) |
409 | return; | 490 | return; |
@@ -439,8 +520,8 @@ static void gic_cpu_save(unsigned int gic_nr) | |||
439 | if (gic_nr >= MAX_GIC_NR) | 520 | if (gic_nr >= MAX_GIC_NR) |
440 | BUG(); | 521 | BUG(); |
441 | 522 | ||
442 | dist_base = gic_data[gic_nr].dist_base; | 523 | dist_base = gic_data_dist_base(&gic_data[gic_nr]); |
443 | cpu_base = gic_data[gic_nr].cpu_base; | 524 | cpu_base = gic_data_cpu_base(&gic_data[gic_nr]); |
444 | 525 | ||
445 | if (!dist_base || !cpu_base) | 526 | if (!dist_base || !cpu_base) |
446 | return; | 527 | return; |
@@ -465,8 +546,8 @@ static void gic_cpu_restore(unsigned int gic_nr) | |||
465 | if (gic_nr >= MAX_GIC_NR) | 546 | if (gic_nr >= MAX_GIC_NR) |
466 | BUG(); | 547 | BUG(); |
467 | 548 | ||
468 | dist_base = gic_data[gic_nr].dist_base; | 549 | dist_base = gic_data_dist_base(&gic_data[gic_nr]); |
469 | cpu_base = gic_data[gic_nr].cpu_base; | 550 | cpu_base = gic_data_cpu_base(&gic_data[gic_nr]); |
470 | 551 | ||
471 | if (!dist_base || !cpu_base) | 552 | if (!dist_base || !cpu_base) |
472 | return; | 553 | return; |
@@ -491,6 +572,11 @@ static int gic_notifier(struct notifier_block *self, unsigned long cmd, void *v) | |||
491 | int i; | 572 | int i; |
492 | 573 | ||
493 | for (i = 0; i < MAX_GIC_NR; i++) { | 574 | for (i = 0; i < MAX_GIC_NR; i++) { |
575 | #ifdef CONFIG_GIC_NON_BANKED | ||
576 | /* Skip over unused GICs */ | ||
577 | if (!gic_data[i].get_base) | ||
578 | continue; | ||
579 | #endif | ||
494 | switch (cmd) { | 580 | switch (cmd) { |
495 | case CPU_PM_ENTER: | 581 | case CPU_PM_ENTER: |
496 | gic_cpu_save(i); | 582 | gic_cpu_save(i); |
@@ -564,8 +650,9 @@ const struct irq_domain_ops gic_irq_domain_ops = { | |||
564 | #endif | 650 | #endif |
565 | }; | 651 | }; |
566 | 652 | ||
567 | void __init gic_init(unsigned int gic_nr, int irq_start, | 653 | void __init gic_init_bases(unsigned int gic_nr, int irq_start, |
568 | void __iomem *dist_base, void __iomem *cpu_base) | 654 | void __iomem *dist_base, void __iomem *cpu_base, |
655 | u32 percpu_offset) | ||
569 | { | 656 | { |
570 | struct gic_chip_data *gic; | 657 | struct gic_chip_data *gic; |
571 | struct irq_domain *domain; | 658 | struct irq_domain *domain; |
@@ -575,8 +662,36 @@ void __init gic_init(unsigned int gic_nr, int irq_start, | |||
575 | 662 | ||
576 | gic = &gic_data[gic_nr]; | 663 | gic = &gic_data[gic_nr]; |
577 | domain = &gic->domain; | 664 | domain = &gic->domain; |
578 | gic->dist_base = dist_base; | 665 | #ifdef CONFIG_GIC_NON_BANKED |
579 | gic->cpu_base = cpu_base; | 666 | if (percpu_offset) { /* Frankein-GIC without banked registers... */ |
667 | unsigned int cpu; | ||
668 | |||
669 | gic->dist_base.percpu_base = alloc_percpu(void __iomem *); | ||
670 | gic->cpu_base.percpu_base = alloc_percpu(void __iomem *); | ||
671 | if (WARN_ON(!gic->dist_base.percpu_base || | ||
672 | !gic->cpu_base.percpu_base)) { | ||
673 | free_percpu(gic->dist_base.percpu_base); | ||
674 | free_percpu(gic->cpu_base.percpu_base); | ||
675 | return; | ||
676 | } | ||
677 | |||
678 | for_each_possible_cpu(cpu) { | ||
679 | unsigned long offset = percpu_offset * cpu_logical_map(cpu); | ||
680 | *per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset; | ||
681 | *per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset; | ||
682 | } | ||
683 | |||
684 | gic_set_base_accessor(gic, gic_get_percpu_base); | ||
685 | } else | ||
686 | #endif | ||
687 | { /* Normal, sane GIC... */ | ||
688 | WARN(percpu_offset, | ||
689 | "GIC_NON_BANKED not enabled, ignoring %08x offset!", | ||
690 | percpu_offset); | ||
691 | gic->dist_base.common_base = dist_base; | ||
692 | gic->cpu_base.common_base = cpu_base; | ||
693 | gic_set_base_accessor(gic, gic_get_common_base); | ||
694 | } | ||
580 | 695 | ||
581 | /* | 696 | /* |
582 | * For primary GICs, skip over SGIs. | 697 | * For primary GICs, skip over SGIs. |
@@ -584,8 +699,6 @@ void __init gic_init(unsigned int gic_nr, int irq_start, | |||
584 | */ | 699 | */ |
585 | domain->hwirq_base = 32; | 700 | domain->hwirq_base = 32; |
586 | if (gic_nr == 0) { | 701 | if (gic_nr == 0) { |
587 | gic_cpu_base_addr = cpu_base; | ||
588 | |||
589 | if ((irq_start & 31) > 0) { | 702 | if ((irq_start & 31) > 0) { |
590 | domain->hwirq_base = 16; | 703 | domain->hwirq_base = 16; |
591 | if (irq_start != -1) | 704 | if (irq_start != -1) |
@@ -597,7 +710,7 @@ void __init gic_init(unsigned int gic_nr, int irq_start, | |||
597 | * Find out how many interrupts are supported. | 710 | * Find out how many interrupts are supported. |
598 | * The GIC only supports up to 1020 interrupt sources. | 711 | * The GIC only supports up to 1020 interrupt sources. |
599 | */ | 712 | */ |
600 | gic_irqs = readl_relaxed(dist_base + GIC_DIST_CTR) & 0x1f; | 713 | gic_irqs = readl_relaxed(gic_data_dist_base(gic) + GIC_DIST_CTR) & 0x1f; |
601 | gic_irqs = (gic_irqs + 1) * 32; | 714 | gic_irqs = (gic_irqs + 1) * 32; |
602 | if (gic_irqs > 1020) | 715 | if (gic_irqs > 1020) |
603 | gic_irqs = 1020; | 716 | gic_irqs = 1020; |
@@ -645,7 +758,7 @@ void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) | |||
645 | dsb(); | 758 | dsb(); |
646 | 759 | ||
647 | /* this always happens on GIC0 */ | 760 | /* this always happens on GIC0 */ |
648 | writel_relaxed(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT); | 761 | writel_relaxed(map << 16 | irq, gic_data_dist_base(&gic_data[0]) + GIC_DIST_SOFTINT); |
649 | } | 762 | } |
650 | #endif | 763 | #endif |
651 | 764 | ||
@@ -656,6 +769,7 @@ int __init gic_of_init(struct device_node *node, struct device_node *parent) | |||
656 | { | 769 | { |
657 | void __iomem *cpu_base; | 770 | void __iomem *cpu_base; |
658 | void __iomem *dist_base; | 771 | void __iomem *dist_base; |
772 | u32 percpu_offset; | ||
659 | int irq; | 773 | int irq; |
660 | struct irq_domain *domain = &gic_data[gic_cnt].domain; | 774 | struct irq_domain *domain = &gic_data[gic_cnt].domain; |
661 | 775 | ||
@@ -668,9 +782,12 @@ int __init gic_of_init(struct device_node *node, struct device_node *parent) | |||
668 | cpu_base = of_iomap(node, 1); | 782 | cpu_base = of_iomap(node, 1); |
669 | WARN(!cpu_base, "unable to map gic cpu registers\n"); | 783 | WARN(!cpu_base, "unable to map gic cpu registers\n"); |
670 | 784 | ||
785 | if (of_property_read_u32(node, "cpu-offset", &percpu_offset)) | ||
786 | percpu_offset = 0; | ||
787 | |||
671 | domain->of_node = of_node_get(node); | 788 | domain->of_node = of_node_get(node); |
672 | 789 | ||
673 | gic_init(gic_cnt, -1, dist_base, cpu_base); | 790 | gic_init_bases(gic_cnt, -1, dist_base, cpu_base, percpu_offset); |
674 | 791 | ||
675 | if (parent) { | 792 | if (parent) { |
676 | irq = irq_of_parse_and_map(node, 0); | 793 | irq = irq_of_parse_and_map(node, 0); |
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index f407a6b35d3d..d8e44a43047c 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c | |||
@@ -221,17 +221,6 @@ | |||
221 | */ | 221 | */ |
222 | #define MCODE_BUFF_PER_REQ 256 | 222 | #define MCODE_BUFF_PER_REQ 256 |
223 | 223 | ||
224 | /* | ||
225 | * Mark a _pl330_req as free. | ||
226 | * We do it by writing DMAEND as the first instruction | ||
227 | * because no valid request is going to have DMAEND as | ||
228 | * its first instruction to execute. | ||
229 | */ | ||
230 | #define MARK_FREE(req) do { \ | ||
231 | _emit_END(0, (req)->mc_cpu); \ | ||
232 | (req)->mc_len = 0; \ | ||
233 | } while (0) | ||
234 | |||
235 | /* If the _pl330_req is available to the client */ | 224 | /* If the _pl330_req is available to the client */ |
236 | #define IS_FREE(req) (*((u8 *)((req)->mc_cpu)) == CMD_DMAEND) | 225 | #define IS_FREE(req) (*((u8 *)((req)->mc_cpu)) == CMD_DMAEND) |
237 | 226 | ||
@@ -301,8 +290,10 @@ struct pl330_thread { | |||
301 | struct pl330_dmac *dmac; | 290 | struct pl330_dmac *dmac; |
302 | /* Only two at a time */ | 291 | /* Only two at a time */ |
303 | struct _pl330_req req[2]; | 292 | struct _pl330_req req[2]; |
304 | /* Index of the last submitted request */ | 293 | /* Index of the last enqueued request */ |
305 | unsigned lstenq; | 294 | unsigned lstenq; |
295 | /* Index of the last submitted request or -1 if the DMA is stopped */ | ||
296 | int req_running; | ||
306 | }; | 297 | }; |
307 | 298 | ||
308 | enum pl330_dmac_state { | 299 | enum pl330_dmac_state { |
@@ -778,6 +769,22 @@ static inline void _execute_DBGINSN(struct pl330_thread *thrd, | |||
778 | writel(0, regs + DBGCMD); | 769 | writel(0, regs + DBGCMD); |
779 | } | 770 | } |
780 | 771 | ||
772 | /* | ||
773 | * Mark a _pl330_req as free. | ||
774 | * We do it by writing DMAEND as the first instruction | ||
775 | * because no valid request is going to have DMAEND as | ||
776 | * its first instruction to execute. | ||
777 | */ | ||
778 | static void mark_free(struct pl330_thread *thrd, int idx) | ||
779 | { | ||
780 | struct _pl330_req *req = &thrd->req[idx]; | ||
781 | |||
782 | _emit_END(0, req->mc_cpu); | ||
783 | req->mc_len = 0; | ||
784 | |||
785 | thrd->req_running = -1; | ||
786 | } | ||
787 | |||
781 | static inline u32 _state(struct pl330_thread *thrd) | 788 | static inline u32 _state(struct pl330_thread *thrd) |
782 | { | 789 | { |
783 | void __iomem *regs = thrd->dmac->pinfo->base; | 790 | void __iomem *regs = thrd->dmac->pinfo->base; |
@@ -836,31 +843,6 @@ static inline u32 _state(struct pl330_thread *thrd) | |||
836 | } | 843 | } |
837 | } | 844 | } |
838 | 845 | ||
839 | /* If the request 'req' of thread 'thrd' is currently active */ | ||
840 | static inline bool _req_active(struct pl330_thread *thrd, | ||
841 | struct _pl330_req *req) | ||
842 | { | ||
843 | void __iomem *regs = thrd->dmac->pinfo->base; | ||
844 | u32 buf = req->mc_bus, pc = readl(regs + CPC(thrd->id)); | ||
845 | |||
846 | if (IS_FREE(req)) | ||
847 | return false; | ||
848 | |||
849 | return (pc >= buf && pc <= buf + req->mc_len) ? true : false; | ||
850 | } | ||
851 | |||
852 | /* Returns 0 if the thread is inactive, ID of active req + 1 otherwise */ | ||
853 | static inline unsigned _thrd_active(struct pl330_thread *thrd) | ||
854 | { | ||
855 | if (_req_active(thrd, &thrd->req[0])) | ||
856 | return 1; /* First req active */ | ||
857 | |||
858 | if (_req_active(thrd, &thrd->req[1])) | ||
859 | return 2; /* Second req active */ | ||
860 | |||
861 | return 0; | ||
862 | } | ||
863 | |||
864 | static void _stop(struct pl330_thread *thrd) | 846 | static void _stop(struct pl330_thread *thrd) |
865 | { | 847 | { |
866 | void __iomem *regs = thrd->dmac->pinfo->base; | 848 | void __iomem *regs = thrd->dmac->pinfo->base; |
@@ -892,17 +874,22 @@ static bool _trigger(struct pl330_thread *thrd) | |||
892 | struct _arg_GO go; | 874 | struct _arg_GO go; |
893 | unsigned ns; | 875 | unsigned ns; |
894 | u8 insn[6] = {0, 0, 0, 0, 0, 0}; | 876 | u8 insn[6] = {0, 0, 0, 0, 0, 0}; |
877 | int idx; | ||
895 | 878 | ||
896 | /* Return if already ACTIVE */ | 879 | /* Return if already ACTIVE */ |
897 | if (_state(thrd) != PL330_STATE_STOPPED) | 880 | if (_state(thrd) != PL330_STATE_STOPPED) |
898 | return true; | 881 | return true; |
899 | 882 | ||
900 | if (!IS_FREE(&thrd->req[1 - thrd->lstenq])) | 883 | idx = 1 - thrd->lstenq; |
901 | req = &thrd->req[1 - thrd->lstenq]; | 884 | if (!IS_FREE(&thrd->req[idx])) |
902 | else if (!IS_FREE(&thrd->req[thrd->lstenq])) | 885 | req = &thrd->req[idx]; |
903 | req = &thrd->req[thrd->lstenq]; | 886 | else { |
904 | else | 887 | idx = thrd->lstenq; |
905 | req = NULL; | 888 | if (!IS_FREE(&thrd->req[idx])) |
889 | req = &thrd->req[idx]; | ||
890 | else | ||
891 | req = NULL; | ||
892 | } | ||
906 | 893 | ||
907 | /* Return if no request */ | 894 | /* Return if no request */ |
908 | if (!req || !req->r) | 895 | if (!req || !req->r) |
@@ -933,6 +920,8 @@ static bool _trigger(struct pl330_thread *thrd) | |||
933 | /* Only manager can execute GO */ | 920 | /* Only manager can execute GO */ |
934 | _execute_DBGINSN(thrd, insn, true); | 921 | _execute_DBGINSN(thrd, insn, true); |
935 | 922 | ||
923 | thrd->req_running = idx; | ||
924 | |||
936 | return true; | 925 | return true; |
937 | } | 926 | } |
938 | 927 | ||
@@ -1382,8 +1371,8 @@ static void pl330_dotask(unsigned long data) | |||
1382 | 1371 | ||
1383 | thrd->req[0].r = NULL; | 1372 | thrd->req[0].r = NULL; |
1384 | thrd->req[1].r = NULL; | 1373 | thrd->req[1].r = NULL; |
1385 | MARK_FREE(&thrd->req[0]); | 1374 | mark_free(thrd, 0); |
1386 | MARK_FREE(&thrd->req[1]); | 1375 | mark_free(thrd, 1); |
1387 | 1376 | ||
1388 | /* Clear the reset flag */ | 1377 | /* Clear the reset flag */ |
1389 | pl330->dmac_tbd.reset_chan &= ~(1 << i); | 1378 | pl330->dmac_tbd.reset_chan &= ~(1 << i); |
@@ -1461,14 +1450,12 @@ int pl330_update(const struct pl330_info *pi) | |||
1461 | 1450 | ||
1462 | thrd = &pl330->channels[id]; | 1451 | thrd = &pl330->channels[id]; |
1463 | 1452 | ||
1464 | active = _thrd_active(thrd); | 1453 | active = thrd->req_running; |
1465 | if (!active) /* Aborted */ | 1454 | if (active == -1) /* Aborted */ |
1466 | continue; | 1455 | continue; |
1467 | 1456 | ||
1468 | active -= 1; | ||
1469 | |||
1470 | rqdone = &thrd->req[active]; | 1457 | rqdone = &thrd->req[active]; |
1471 | MARK_FREE(rqdone); | 1458 | mark_free(thrd, active); |
1472 | 1459 | ||
1473 | /* Get going again ASAP */ | 1460 | /* Get going again ASAP */ |
1474 | _start(thrd); | 1461 | _start(thrd); |
@@ -1480,13 +1467,19 @@ int pl330_update(const struct pl330_info *pi) | |||
1480 | 1467 | ||
1481 | /* Now that we are in no hurry, do the callbacks */ | 1468 | /* Now that we are in no hurry, do the callbacks */ |
1482 | while (!list_empty(&pl330->req_done)) { | 1469 | while (!list_empty(&pl330->req_done)) { |
1470 | struct pl330_req *r; | ||
1471 | |||
1483 | rqdone = container_of(pl330->req_done.next, | 1472 | rqdone = container_of(pl330->req_done.next, |
1484 | struct _pl330_req, rqd); | 1473 | struct _pl330_req, rqd); |
1485 | 1474 | ||
1486 | list_del_init(&rqdone->rqd); | 1475 | list_del_init(&rqdone->rqd); |
1487 | 1476 | ||
1477 | /* Detach the req */ | ||
1478 | r = rqdone->r; | ||
1479 | rqdone->r = NULL; | ||
1480 | |||
1488 | spin_unlock_irqrestore(&pl330->lock, flags); | 1481 | spin_unlock_irqrestore(&pl330->lock, flags); |
1489 | _callback(rqdone->r, PL330_ERR_NONE); | 1482 | _callback(r, PL330_ERR_NONE); |
1490 | spin_lock_irqsave(&pl330->lock, flags); | 1483 | spin_lock_irqsave(&pl330->lock, flags); |
1491 | } | 1484 | } |
1492 | 1485 | ||
@@ -1509,7 +1502,7 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) | |||
1509 | struct pl330_thread *thrd = ch_id; | 1502 | struct pl330_thread *thrd = ch_id; |
1510 | struct pl330_dmac *pl330; | 1503 | struct pl330_dmac *pl330; |
1511 | unsigned long flags; | 1504 | unsigned long flags; |
1512 | int ret = 0, active; | 1505 | int ret = 0, active = thrd->req_running; |
1513 | 1506 | ||
1514 | if (!thrd || thrd->free || thrd->dmac->state == DYING) | 1507 | if (!thrd || thrd->free || thrd->dmac->state == DYING) |
1515 | return -EINVAL; | 1508 | return -EINVAL; |
@@ -1525,28 +1518,24 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) | |||
1525 | 1518 | ||
1526 | thrd->req[0].r = NULL; | 1519 | thrd->req[0].r = NULL; |
1527 | thrd->req[1].r = NULL; | 1520 | thrd->req[1].r = NULL; |
1528 | MARK_FREE(&thrd->req[0]); | 1521 | mark_free(thrd, 0); |
1529 | MARK_FREE(&thrd->req[1]); | 1522 | mark_free(thrd, 1); |
1530 | break; | 1523 | break; |
1531 | 1524 | ||
1532 | case PL330_OP_ABORT: | 1525 | case PL330_OP_ABORT: |
1533 | active = _thrd_active(thrd); | ||
1534 | |||
1535 | /* Make sure the channel is stopped */ | 1526 | /* Make sure the channel is stopped */ |
1536 | _stop(thrd); | 1527 | _stop(thrd); |
1537 | 1528 | ||
1538 | /* ABORT is only for the active req */ | 1529 | /* ABORT is only for the active req */ |
1539 | if (!active) | 1530 | if (active == -1) |
1540 | break; | 1531 | break; |
1541 | 1532 | ||
1542 | active--; | ||
1543 | |||
1544 | thrd->req[active].r = NULL; | 1533 | thrd->req[active].r = NULL; |
1545 | MARK_FREE(&thrd->req[active]); | 1534 | mark_free(thrd, active); |
1546 | 1535 | ||
1547 | /* Start the next */ | 1536 | /* Start the next */ |
1548 | case PL330_OP_START: | 1537 | case PL330_OP_START: |
1549 | if (!_thrd_active(thrd) && !_start(thrd)) | 1538 | if ((active == -1) && !_start(thrd)) |
1550 | ret = -EIO; | 1539 | ret = -EIO; |
1551 | break; | 1540 | break; |
1552 | 1541 | ||
@@ -1587,14 +1576,13 @@ int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus) | |||
1587 | else | 1576 | else |
1588 | pstatus->faulting = false; | 1577 | pstatus->faulting = false; |
1589 | 1578 | ||
1590 | active = _thrd_active(thrd); | 1579 | active = thrd->req_running; |
1591 | 1580 | ||
1592 | if (!active) { | 1581 | if (active == -1) { |
1593 | /* Indicate that the thread is not running */ | 1582 | /* Indicate that the thread is not running */ |
1594 | pstatus->top_req = NULL; | 1583 | pstatus->top_req = NULL; |
1595 | pstatus->wait_req = NULL; | 1584 | pstatus->wait_req = NULL; |
1596 | } else { | 1585 | } else { |
1597 | active--; | ||
1598 | pstatus->top_req = thrd->req[active].r; | 1586 | pstatus->top_req = thrd->req[active].r; |
1599 | pstatus->wait_req = !IS_FREE(&thrd->req[1 - active]) | 1587 | pstatus->wait_req = !IS_FREE(&thrd->req[1 - active]) |
1600 | ? thrd->req[1 - active].r : NULL; | 1588 | ? thrd->req[1 - active].r : NULL; |
@@ -1659,9 +1647,9 @@ void *pl330_request_channel(const struct pl330_info *pi) | |||
1659 | thrd->free = false; | 1647 | thrd->free = false; |
1660 | thrd->lstenq = 1; | 1648 | thrd->lstenq = 1; |
1661 | thrd->req[0].r = NULL; | 1649 | thrd->req[0].r = NULL; |
1662 | MARK_FREE(&thrd->req[0]); | 1650 | mark_free(thrd, 0); |
1663 | thrd->req[1].r = NULL; | 1651 | thrd->req[1].r = NULL; |
1664 | MARK_FREE(&thrd->req[1]); | 1652 | mark_free(thrd, 1); |
1665 | break; | 1653 | break; |
1666 | } | 1654 | } |
1667 | } | 1655 | } |
@@ -1767,14 +1755,14 @@ static inline void _reset_thread(struct pl330_thread *thrd) | |||
1767 | thrd->req[0].mc_bus = pl330->mcode_bus | 1755 | thrd->req[0].mc_bus = pl330->mcode_bus |
1768 | + (thrd->id * pi->mcbufsz); | 1756 | + (thrd->id * pi->mcbufsz); |
1769 | thrd->req[0].r = NULL; | 1757 | thrd->req[0].r = NULL; |
1770 | MARK_FREE(&thrd->req[0]); | 1758 | mark_free(thrd, 0); |
1771 | 1759 | ||
1772 | thrd->req[1].mc_cpu = thrd->req[0].mc_cpu | 1760 | thrd->req[1].mc_cpu = thrd->req[0].mc_cpu |
1773 | + pi->mcbufsz / 2; | 1761 | + pi->mcbufsz / 2; |
1774 | thrd->req[1].mc_bus = thrd->req[0].mc_bus | 1762 | thrd->req[1].mc_bus = thrd->req[0].mc_bus |
1775 | + pi->mcbufsz / 2; | 1763 | + pi->mcbufsz / 2; |
1776 | thrd->req[1].r = NULL; | 1764 | thrd->req[1].r = NULL; |
1777 | MARK_FREE(&thrd->req[1]); | 1765 | mark_free(thrd, 1); |
1778 | } | 1766 | } |
1779 | 1767 | ||
1780 | static int dmac_alloc_threads(struct pl330_dmac *pl330) | 1768 | static int dmac_alloc_threads(struct pl330_dmac *pl330) |
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index 2393b5bc96fa..8794a34eae61 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -143,7 +143,6 @@ static int sp804_set_next_event(unsigned long next, | |||
143 | } | 143 | } |
144 | 144 | ||
145 | static struct clock_event_device sp804_clockevent = { | 145 | static struct clock_event_device sp804_clockevent = { |
146 | .shift = 32, | ||
147 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 146 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
148 | .set_mode = sp804_set_mode, | 147 | .set_mode = sp804_set_mode, |
149 | .set_next_event = sp804_set_next_event, | 148 | .set_next_event = sp804_set_next_event, |
@@ -169,13 +168,9 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int irq, | |||
169 | 168 | ||
170 | clkevt_base = base; | 169 | clkevt_base = base; |
171 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); | 170 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); |
172 | |||
173 | evt->name = name; | 171 | evt->name = name; |
174 | evt->irq = irq; | 172 | evt->irq = irq; |
175 | evt->mult = div_sc(rate, NSEC_PER_SEC, evt->shift); | ||
176 | evt->max_delta_ns = clockevent_delta2ns(0xffffffff, evt); | ||
177 | evt->min_delta_ns = clockevent_delta2ns(0xf, evt); | ||
178 | 173 | ||
179 | setup_irq(irq, &sp804_timer_irq); | 174 | setup_irq(irq, &sp804_timer_irq); |
180 | clockevents_register_device(evt); | 175 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); |
181 | } | 176 | } |
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index 01f18a421b17..dcb004a804c7 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -19,17 +19,22 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/export.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/list.h> | 24 | #include <linux/list.h> |
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/irqdomain.h> | ||
27 | #include <linux/of.h> | ||
28 | #include <linux/of_address.h> | ||
29 | #include <linux/of_irq.h> | ||
25 | #include <linux/syscore_ops.h> | 30 | #include <linux/syscore_ops.h> |
26 | #include <linux/device.h> | 31 | #include <linux/device.h> |
27 | #include <linux/amba/bus.h> | 32 | #include <linux/amba/bus.h> |
28 | 33 | ||
34 | #include <asm/exception.h> | ||
29 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
30 | #include <asm/hardware/vic.h> | 36 | #include <asm/hardware/vic.h> |
31 | 37 | ||
32 | #ifdef CONFIG_PM | ||
33 | /** | 38 | /** |
34 | * struct vic_device - VIC PM device | 39 | * struct vic_device - VIC PM device |
35 | * @irq: The IRQ number for the base of the VIC. | 40 | * @irq: The IRQ number for the base of the VIC. |
@@ -40,6 +45,7 @@ | |||
40 | * @int_enable: Save for VIC_INT_ENABLE. | 45 | * @int_enable: Save for VIC_INT_ENABLE. |
41 | * @soft_int: Save for VIC_INT_SOFT. | 46 | * @soft_int: Save for VIC_INT_SOFT. |
42 | * @protect: Save for VIC_PROTECT. | 47 | * @protect: Save for VIC_PROTECT. |
48 | * @domain: The IRQ domain for the VIC. | ||
43 | */ | 49 | */ |
44 | struct vic_device { | 50 | struct vic_device { |
45 | void __iomem *base; | 51 | void __iomem *base; |
@@ -50,13 +56,13 @@ struct vic_device { | |||
50 | u32 int_enable; | 56 | u32 int_enable; |
51 | u32 soft_int; | 57 | u32 soft_int; |
52 | u32 protect; | 58 | u32 protect; |
59 | struct irq_domain domain; | ||
53 | }; | 60 | }; |
54 | 61 | ||
55 | /* we cannot allocate memory when VICs are initially registered */ | 62 | /* we cannot allocate memory when VICs are initially registered */ |
56 | static struct vic_device vic_devices[CONFIG_ARM_VIC_NR]; | 63 | static struct vic_device vic_devices[CONFIG_ARM_VIC_NR]; |
57 | 64 | ||
58 | static int vic_id; | 65 | static int vic_id; |
59 | #endif /* CONFIG_PM */ | ||
60 | 66 | ||
61 | /** | 67 | /** |
62 | * vic_init2 - common initialisation code | 68 | * vic_init2 - common initialisation code |
@@ -156,39 +162,50 @@ static int __init vic_pm_init(void) | |||
156 | return 0; | 162 | return 0; |
157 | } | 163 | } |
158 | late_initcall(vic_pm_init); | 164 | late_initcall(vic_pm_init); |
165 | #endif /* CONFIG_PM */ | ||
159 | 166 | ||
160 | /** | 167 | /** |
161 | * vic_pm_register - Register a VIC for later power management control | 168 | * vic_register() - Register a VIC. |
162 | * @base: The base address of the VIC. | 169 | * @base: The base address of the VIC. |
163 | * @irq: The base IRQ for the VIC. | 170 | * @irq: The base IRQ for the VIC. |
164 | * @resume_sources: bitmask of interrupts allowed for resume sources. | 171 | * @resume_sources: bitmask of interrupts allowed for resume sources. |
172 | * @node: The device tree node associated with the VIC. | ||
165 | * | 173 | * |
166 | * Register the VIC with the system device tree so that it can be notified | 174 | * Register the VIC with the system device tree so that it can be notified |
167 | * of suspend and resume requests and ensure that the correct actions are | 175 | * of suspend and resume requests and ensure that the correct actions are |
168 | * taken to re-instate the settings on resume. | 176 | * taken to re-instate the settings on resume. |
177 | * | ||
178 | * This also configures the IRQ domain for the VIC. | ||
169 | */ | 179 | */ |
170 | static void __init vic_pm_register(void __iomem *base, unsigned int irq, u32 resume_sources) | 180 | static void __init vic_register(void __iomem *base, unsigned int irq, |
181 | u32 resume_sources, struct device_node *node) | ||
171 | { | 182 | { |
172 | struct vic_device *v; | 183 | struct vic_device *v; |
173 | 184 | ||
174 | if (vic_id >= ARRAY_SIZE(vic_devices)) | 185 | if (vic_id >= ARRAY_SIZE(vic_devices)) { |
175 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); | 186 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); |
176 | else { | 187 | return; |
177 | v = &vic_devices[vic_id]; | ||
178 | v->base = base; | ||
179 | v->resume_sources = resume_sources; | ||
180 | v->irq = irq; | ||
181 | vic_id++; | ||
182 | } | 188 | } |
189 | |||
190 | v = &vic_devices[vic_id]; | ||
191 | v->base = base; | ||
192 | v->resume_sources = resume_sources; | ||
193 | v->irq = irq; | ||
194 | vic_id++; | ||
195 | |||
196 | v->domain.irq_base = irq; | ||
197 | v->domain.nr_irq = 32; | ||
198 | #ifdef CONFIG_OF_IRQ | ||
199 | v->domain.of_node = of_node_get(node); | ||
200 | #endif /* CONFIG_OF */ | ||
201 | v->domain.ops = &irq_domain_simple_ops; | ||
202 | irq_domain_add(&v->domain); | ||
183 | } | 203 | } |
184 | #else | ||
185 | static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { } | ||
186 | #endif /* CONFIG_PM */ | ||
187 | 204 | ||
188 | static void vic_ack_irq(struct irq_data *d) | 205 | static void vic_ack_irq(struct irq_data *d) |
189 | { | 206 | { |
190 | void __iomem *base = irq_data_get_irq_chip_data(d); | 207 | void __iomem *base = irq_data_get_irq_chip_data(d); |
191 | unsigned int irq = d->irq & 31; | 208 | unsigned int irq = d->hwirq; |
192 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | 209 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); |
193 | /* moreover, clear the soft-triggered, in case it was the reason */ | 210 | /* moreover, clear the soft-triggered, in case it was the reason */ |
194 | writel(1 << irq, base + VIC_INT_SOFT_CLEAR); | 211 | writel(1 << irq, base + VIC_INT_SOFT_CLEAR); |
@@ -197,14 +214,14 @@ static void vic_ack_irq(struct irq_data *d) | |||
197 | static void vic_mask_irq(struct irq_data *d) | 214 | static void vic_mask_irq(struct irq_data *d) |
198 | { | 215 | { |
199 | void __iomem *base = irq_data_get_irq_chip_data(d); | 216 | void __iomem *base = irq_data_get_irq_chip_data(d); |
200 | unsigned int irq = d->irq & 31; | 217 | unsigned int irq = d->hwirq; |
201 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | 218 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); |
202 | } | 219 | } |
203 | 220 | ||
204 | static void vic_unmask_irq(struct irq_data *d) | 221 | static void vic_unmask_irq(struct irq_data *d) |
205 | { | 222 | { |
206 | void __iomem *base = irq_data_get_irq_chip_data(d); | 223 | void __iomem *base = irq_data_get_irq_chip_data(d); |
207 | unsigned int irq = d->irq & 31; | 224 | unsigned int irq = d->hwirq; |
208 | writel(1 << irq, base + VIC_INT_ENABLE); | 225 | writel(1 << irq, base + VIC_INT_ENABLE); |
209 | } | 226 | } |
210 | 227 | ||
@@ -226,7 +243,7 @@ static struct vic_device *vic_from_irq(unsigned int irq) | |||
226 | static int vic_set_wake(struct irq_data *d, unsigned int on) | 243 | static int vic_set_wake(struct irq_data *d, unsigned int on) |
227 | { | 244 | { |
228 | struct vic_device *v = vic_from_irq(d->irq); | 245 | struct vic_device *v = vic_from_irq(d->irq); |
229 | unsigned int off = d->irq & 31; | 246 | unsigned int off = d->hwirq; |
230 | u32 bit = 1 << off; | 247 | u32 bit = 1 << off; |
231 | 248 | ||
232 | if (!v) | 249 | if (!v) |
@@ -301,7 +318,7 @@ static void __init vic_set_irq_sources(void __iomem *base, | |||
301 | * and 020 within the page. We call this "second block". | 318 | * and 020 within the page. We call this "second block". |
302 | */ | 319 | */ |
303 | static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | 320 | static void __init vic_init_st(void __iomem *base, unsigned int irq_start, |
304 | u32 vic_sources) | 321 | u32 vic_sources, struct device_node *node) |
305 | { | 322 | { |
306 | unsigned int i; | 323 | unsigned int i; |
307 | int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0; | 324 | int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0; |
@@ -328,17 +345,12 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | |||
328 | } | 345 | } |
329 | 346 | ||
330 | vic_set_irq_sources(base, irq_start, vic_sources); | 347 | vic_set_irq_sources(base, irq_start, vic_sources); |
348 | vic_register(base, irq_start, 0, node); | ||
331 | } | 349 | } |
332 | 350 | ||
333 | /** | 351 | static void __init __vic_init(void __iomem *base, unsigned int irq_start, |
334 | * vic_init - initialise a vectored interrupt controller | 352 | u32 vic_sources, u32 resume_sources, |
335 | * @base: iomem base address | 353 | struct device_node *node) |
336 | * @irq_start: starting interrupt number, must be muliple of 32 | ||
337 | * @vic_sources: bitmask of interrupt sources to allow | ||
338 | * @resume_sources: bitmask of interrupt sources to allow for resume | ||
339 | */ | ||
340 | void __init vic_init(void __iomem *base, unsigned int irq_start, | ||
341 | u32 vic_sources, u32 resume_sources) | ||
342 | { | 354 | { |
343 | unsigned int i; | 355 | unsigned int i; |
344 | u32 cellid = 0; | 356 | u32 cellid = 0; |
@@ -356,7 +368,7 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
356 | 368 | ||
357 | switch(vendor) { | 369 | switch(vendor) { |
358 | case AMBA_VENDOR_ST: | 370 | case AMBA_VENDOR_ST: |
359 | vic_init_st(base, irq_start, vic_sources); | 371 | vic_init_st(base, irq_start, vic_sources, node); |
360 | return; | 372 | return; |
361 | default: | 373 | default: |
362 | printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n"); | 374 | printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n"); |
@@ -375,5 +387,81 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
375 | 387 | ||
376 | vic_set_irq_sources(base, irq_start, vic_sources); | 388 | vic_set_irq_sources(base, irq_start, vic_sources); |
377 | 389 | ||
378 | vic_pm_register(base, irq_start, resume_sources); | 390 | vic_register(base, irq_start, resume_sources, node); |
391 | } | ||
392 | |||
393 | /** | ||
394 | * vic_init() - initialise a vectored interrupt controller | ||
395 | * @base: iomem base address | ||
396 | * @irq_start: starting interrupt number, must be muliple of 32 | ||
397 | * @vic_sources: bitmask of interrupt sources to allow | ||
398 | * @resume_sources: bitmask of interrupt sources to allow for resume | ||
399 | */ | ||
400 | void __init vic_init(void __iomem *base, unsigned int irq_start, | ||
401 | u32 vic_sources, u32 resume_sources) | ||
402 | { | ||
403 | __vic_init(base, irq_start, vic_sources, resume_sources, NULL); | ||
404 | } | ||
405 | |||
406 | #ifdef CONFIG_OF | ||
407 | int __init vic_of_init(struct device_node *node, struct device_node *parent) | ||
408 | { | ||
409 | void __iomem *regs; | ||
410 | int irq_base; | ||
411 | |||
412 | if (WARN(parent, "non-root VICs are not supported")) | ||
413 | return -EINVAL; | ||
414 | |||
415 | regs = of_iomap(node, 0); | ||
416 | if (WARN_ON(!regs)) | ||
417 | return -EIO; | ||
418 | |||
419 | irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id()); | ||
420 | if (WARN_ON(irq_base < 0)) | ||
421 | goto out_unmap; | ||
422 | |||
423 | __vic_init(regs, irq_base, ~0, ~0, node); | ||
424 | |||
425 | return 0; | ||
426 | |||
427 | out_unmap: | ||
428 | iounmap(regs); | ||
429 | |||
430 | return -EIO; | ||
431 | } | ||
432 | #endif /* CONFIG OF */ | ||
433 | |||
434 | /* | ||
435 | * Handle each interrupt in a single VIC. Returns non-zero if we've | ||
436 | * handled at least one interrupt. This does a single read of the | ||
437 | * status register and handles all interrupts in order from LSB first. | ||
438 | */ | ||
439 | static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs) | ||
440 | { | ||
441 | u32 stat, irq; | ||
442 | int handled = 0; | ||
443 | |||
444 | stat = readl_relaxed(vic->base + VIC_IRQ_STATUS); | ||
445 | while (stat) { | ||
446 | irq = ffs(stat) - 1; | ||
447 | handle_IRQ(irq_domain_to_irq(&vic->domain, irq), regs); | ||
448 | stat &= ~(1 << irq); | ||
449 | handled = 1; | ||
450 | } | ||
451 | |||
452 | return handled; | ||
453 | } | ||
454 | |||
455 | /* | ||
456 | * Keep iterating over all registered VIC's until there are no pending | ||
457 | * interrupts. | ||
458 | */ | ||
459 | asmlinkage void __exception_irq_entry vic_handle_irq(struct pt_regs *regs) | ||
460 | { | ||
461 | int i, handled; | ||
462 | |||
463 | do { | ||
464 | for (i = 0, handled = 0; i < vic_id; ++i) | ||
465 | handled |= handle_one_vic(&vic_devices[i], regs); | ||
466 | } while (handled); | ||
379 | } | 467 | } |
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig index 11a4192197c8..cf497ce41dfe 100644 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ b/arch/arm/configs/imx_v4_v5_defconfig | |||
@@ -18,9 +18,10 @@ CONFIG_ARCH_MXC=y | |||
18 | CONFIG_ARCH_IMX_V4_V5=y | 18 | CONFIG_ARCH_IMX_V4_V5=y |
19 | CONFIG_ARCH_MX1ADS=y | 19 | CONFIG_ARCH_MX1ADS=y |
20 | CONFIG_MACH_SCB9328=y | 20 | CONFIG_MACH_SCB9328=y |
21 | CONFIG_MACH_APF9328=y | ||
21 | CONFIG_MACH_MX21ADS=y | 22 | CONFIG_MACH_MX21ADS=y |
22 | CONFIG_MACH_MX25_3DS=y | 23 | CONFIG_MACH_MX25_3DS=y |
23 | CONFIG_MACH_EUKREA_CPUIMX25=y | 24 | CONFIG_MACH_EUKREA_CPUIMX25SD=y |
24 | CONFIG_MACH_MX27ADS=y | 25 | CONFIG_MACH_MX27ADS=y |
25 | CONFIG_MACH_PCM038=y | 26 | CONFIG_MACH_PCM038=y |
26 | CONFIG_MACH_CPUIMX27=y | 27 | CONFIG_MACH_CPUIMX27=y |
@@ -72,17 +73,16 @@ CONFIG_MTD_CFI_GEOMETRY=y | |||
72 | CONFIG_MTD_CFI_INTELEXT=y | 73 | CONFIG_MTD_CFI_INTELEXT=y |
73 | CONFIG_MTD_PHYSMAP=y | 74 | CONFIG_MTD_PHYSMAP=y |
74 | CONFIG_MTD_NAND=y | 75 | CONFIG_MTD_NAND=y |
76 | CONFIG_MTD_NAND_MXC=y | ||
75 | CONFIG_MTD_UBI=y | 77 | CONFIG_MTD_UBI=y |
76 | CONFIG_MISC_DEVICES=y | 78 | CONFIG_MISC_DEVICES=y |
77 | CONFIG_EEPROM_AT24=y | 79 | CONFIG_EEPROM_AT24=y |
78 | CONFIG_EEPROM_AT25=y | 80 | CONFIG_EEPROM_AT25=y |
79 | CONFIG_NETDEVICES=y | 81 | CONFIG_NETDEVICES=y |
80 | CONFIG_NET_ETHERNET=y | ||
81 | CONFIG_SMC91X=y | ||
82 | CONFIG_DM9000=y | 82 | CONFIG_DM9000=y |
83 | CONFIG_SMC91X=y | ||
83 | CONFIG_SMC911X=y | 84 | CONFIG_SMC911X=y |
84 | # CONFIG_NETDEV_1000 is not set | 85 | CONFIG_SMSC_PHY=y |
85 | # CONFIG_NETDEV_10000 is not set | ||
86 | # CONFIG_INPUT_MOUSEDEV is not set | 86 | # CONFIG_INPUT_MOUSEDEV is not set |
87 | CONFIG_INPUT_EVDEV=y | 87 | CONFIG_INPUT_EVDEV=y |
88 | # CONFIG_INPUT_KEYBOARD is not set | 88 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -100,6 +100,7 @@ CONFIG_I2C_CHARDEV=y | |||
100 | CONFIG_I2C_IMX=y | 100 | CONFIG_I2C_IMX=y |
101 | CONFIG_SPI=y | 101 | CONFIG_SPI=y |
102 | CONFIG_SPI_IMX=y | 102 | CONFIG_SPI_IMX=y |
103 | CONFIG_SPI_SPIDEV=y | ||
103 | CONFIG_W1=y | 104 | CONFIG_W1=y |
104 | CONFIG_W1_MASTER_MXC=y | 105 | CONFIG_W1_MASTER_MXC=y |
105 | CONFIG_W1_SLAVE_THERM=y | 106 | CONFIG_W1_SLAVE_THERM=y |
@@ -139,6 +140,7 @@ CONFIG_MMC=y | |||
139 | CONFIG_MMC_MXC=y | 140 | CONFIG_MMC_MXC=y |
140 | CONFIG_NEW_LEDS=y | 141 | CONFIG_NEW_LEDS=y |
141 | CONFIG_LEDS_CLASS=y | 142 | CONFIG_LEDS_CLASS=y |
143 | CONFIG_LEDS_GPIO=y | ||
142 | CONFIG_LEDS_MC13783=y | 144 | CONFIG_LEDS_MC13783=y |
143 | CONFIG_LEDS_TRIGGERS=y | 145 | CONFIG_LEDS_TRIGGERS=y |
144 | CONFIG_LEDS_TRIGGER_TIMER=y | 146 | CONFIG_LEDS_TRIGGER_TIMER=y |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 29035e86a59d..b6e65dedfd71 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -187,6 +187,17 @@ | |||
187 | #endif | 187 | #endif |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * Instruction barrier | ||
191 | */ | ||
192 | .macro instr_sync | ||
193 | #if __LINUX_ARM_ARCH__ >= 7 | ||
194 | isb | ||
195 | #elif __LINUX_ARM_ARCH__ == 6 | ||
196 | mcr p15, 0, r0, c7, c5, 4 | ||
197 | #endif | ||
198 | .endm | ||
199 | |||
200 | /* | ||
190 | * SMP data memory barrier | 201 | * SMP data memory barrier |
191 | */ | 202 | */ |
192 | .macro smp_dmb mode | 203 | .macro smp_dmb mode |
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h index 9abe7a07d5ac..fac79dceb736 100644 --- a/arch/arm/include/asm/bug.h +++ b/arch/arm/include/asm/bug.h | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #define __BUG(__file, __line, __value) \ | 33 | #define __BUG(__file, __line, __value) \ |
34 | do { \ | 34 | do { \ |
35 | BUILD_BUG_ON(sizeof(struct bug_entry) != 12); \ | ||
36 | asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n" \ | 35 | asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n" \ |
37 | ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \ | 36 | ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \ |
38 | "2:\t.asciz " #__file "\n" \ | 37 | "2:\t.asciz " #__file "\n" \ |
diff --git a/arch/arm/include/asm/cti.h b/arch/arm/include/asm/cti.h new file mode 100644 index 000000000000..a0ada3ea4358 --- /dev/null +++ b/arch/arm/include/asm/cti.h | |||
@@ -0,0 +1,179 @@ | |||
1 | #ifndef __ASMARM_CTI_H | ||
2 | #define __ASMARM_CTI_H | ||
3 | |||
4 | #include <asm/io.h> | ||
5 | |||
6 | /* The registers' definition is from section 3.2 of | ||
7 | * Embedded Cross Trigger Revision: r0p0 | ||
8 | */ | ||
9 | #define CTICONTROL 0x000 | ||
10 | #define CTISTATUS 0x004 | ||
11 | #define CTILOCK 0x008 | ||
12 | #define CTIPROTECTION 0x00C | ||
13 | #define CTIINTACK 0x010 | ||
14 | #define CTIAPPSET 0x014 | ||
15 | #define CTIAPPCLEAR 0x018 | ||
16 | #define CTIAPPPULSE 0x01c | ||
17 | #define CTIINEN 0x020 | ||
18 | #define CTIOUTEN 0x0A0 | ||
19 | #define CTITRIGINSTATUS 0x130 | ||
20 | #define CTITRIGOUTSTATUS 0x134 | ||
21 | #define CTICHINSTATUS 0x138 | ||
22 | #define CTICHOUTSTATUS 0x13c | ||
23 | #define CTIPERIPHID0 0xFE0 | ||
24 | #define CTIPERIPHID1 0xFE4 | ||
25 | #define CTIPERIPHID2 0xFE8 | ||
26 | #define CTIPERIPHID3 0xFEC | ||
27 | #define CTIPCELLID0 0xFF0 | ||
28 | #define CTIPCELLID1 0xFF4 | ||
29 | #define CTIPCELLID2 0xFF8 | ||
30 | #define CTIPCELLID3 0xFFC | ||
31 | |||
32 | /* The below are from section 3.6.4 of | ||
33 | * CoreSight v1.0 Architecture Specification | ||
34 | */ | ||
35 | #define LOCKACCESS 0xFB0 | ||
36 | #define LOCKSTATUS 0xFB4 | ||
37 | |||
38 | /* write this value to LOCKACCESS will unlock the module, and | ||
39 | * other value will lock the module | ||
40 | */ | ||
41 | #define LOCKCODE 0xC5ACCE55 | ||
42 | |||
43 | /** | ||
44 | * struct cti - cross trigger interface struct | ||
45 | * @base: mapped virtual address for the cti base | ||
46 | * @irq: irq number for the cti | ||
47 | * @trig_out_for_irq: triger out number which will cause | ||
48 | * the @irq happen | ||
49 | * | ||
50 | * cti struct used to operate cti registers. | ||
51 | */ | ||
52 | struct cti { | ||
53 | void __iomem *base; | ||
54 | int irq; | ||
55 | int trig_out_for_irq; | ||
56 | }; | ||
57 | |||
58 | /** | ||
59 | * cti_init - initialize the cti instance | ||
60 | * @cti: cti instance | ||
61 | * @base: mapped virtual address for the cti base | ||
62 | * @irq: irq number for the cti | ||
63 | * @trig_out: triger out number which will cause | ||
64 | * the @irq happen | ||
65 | * | ||
66 | * called by machine code to pass the board dependent | ||
67 | * @base, @irq and @trig_out to cti. | ||
68 | */ | ||
69 | static inline void cti_init(struct cti *cti, | ||
70 | void __iomem *base, int irq, int trig_out) | ||
71 | { | ||
72 | cti->base = base; | ||
73 | cti->irq = irq; | ||
74 | cti->trig_out_for_irq = trig_out; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * cti_map_trigger - use the @chan to map @trig_in to @trig_out | ||
79 | * @cti: cti instance | ||
80 | * @trig_in: trigger in number | ||
81 | * @trig_out: trigger out number | ||
82 | * @channel: channel number | ||
83 | * | ||
84 | * This function maps one trigger in of @trig_in to one trigger | ||
85 | * out of @trig_out using the channel @chan. | ||
86 | */ | ||
87 | static inline void cti_map_trigger(struct cti *cti, | ||
88 | int trig_in, int trig_out, int chan) | ||
89 | { | ||
90 | void __iomem *base = cti->base; | ||
91 | unsigned long val; | ||
92 | |||
93 | val = __raw_readl(base + CTIINEN + trig_in * 4); | ||
94 | val |= BIT(chan); | ||
95 | __raw_writel(val, base + CTIINEN + trig_in * 4); | ||
96 | |||
97 | val = __raw_readl(base + CTIOUTEN + trig_out * 4); | ||
98 | val |= BIT(chan); | ||
99 | __raw_writel(val, base + CTIOUTEN + trig_out * 4); | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * cti_enable - enable the cti module | ||
104 | * @cti: cti instance | ||
105 | * | ||
106 | * enable the cti module | ||
107 | */ | ||
108 | static inline void cti_enable(struct cti *cti) | ||
109 | { | ||
110 | __raw_writel(0x1, cti->base + CTICONTROL); | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * cti_disable - disable the cti module | ||
115 | * @cti: cti instance | ||
116 | * | ||
117 | * enable the cti module | ||
118 | */ | ||
119 | static inline void cti_disable(struct cti *cti) | ||
120 | { | ||
121 | __raw_writel(0, cti->base + CTICONTROL); | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * cti_irq_ack - clear the cti irq | ||
126 | * @cti: cti instance | ||
127 | * | ||
128 | * clear the cti irq | ||
129 | */ | ||
130 | static inline void cti_irq_ack(struct cti *cti) | ||
131 | { | ||
132 | void __iomem *base = cti->base; | ||
133 | unsigned long val; | ||
134 | |||
135 | val = __raw_readl(base + CTIINTACK); | ||
136 | val |= BIT(cti->trig_out_for_irq); | ||
137 | __raw_writel(val, base + CTIINTACK); | ||
138 | } | ||
139 | |||
140 | /** | ||
141 | * cti_unlock - unlock cti module | ||
142 | * @cti: cti instance | ||
143 | * | ||
144 | * unlock the cti module, or else any writes to the cti | ||
145 | * module is not allowed. | ||
146 | */ | ||
147 | static inline void cti_unlock(struct cti *cti) | ||
148 | { | ||
149 | void __iomem *base = cti->base; | ||
150 | unsigned long val; | ||
151 | |||
152 | val = __raw_readl(base + LOCKSTATUS); | ||
153 | |||
154 | if (val & 1) { | ||
155 | val = LOCKCODE; | ||
156 | __raw_writel(val, base + LOCKACCESS); | ||
157 | } | ||
158 | } | ||
159 | |||
160 | /** | ||
161 | * cti_lock - lock cti module | ||
162 | * @cti: cti instance | ||
163 | * | ||
164 | * lock the cti module, so any writes to the cti | ||
165 | * module will be not allowed. | ||
166 | */ | ||
167 | static inline void cti_lock(struct cti *cti) | ||
168 | { | ||
169 | void __iomem *base = cti->base; | ||
170 | unsigned long val; | ||
171 | |||
172 | val = __raw_readl(base + LOCKSTATUS); | ||
173 | |||
174 | if (!(val & 1)) { | ||
175 | val = ~LOCKCODE; | ||
176 | __raw_writel(val, base + LOCKACCESS); | ||
177 | } | ||
178 | } | ||
179 | #endif | ||
diff --git a/arch/arm/include/asm/edac.h b/arch/arm/include/asm/edac.h new file mode 100644 index 000000000000..0df7a2c1fc3d --- /dev/null +++ b/arch/arm/include/asm/edac.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Calxeda, Inc. | ||
3 | * Based on PPC version Copyright 2007 MontaVista Software, Inc. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #ifndef ASM_EDAC_H | ||
18 | #define ASM_EDAC_H | ||
19 | /* | ||
20 | * ECC atomic, DMA, SMP and interrupt safe scrub function. | ||
21 | * Implements the per arch atomic_scrub() that EDAC use for software | ||
22 | * ECC scrubbing. It reads memory and then writes back the original | ||
23 | * value, allowing the hardware to detect and correct memory errors. | ||
24 | */ | ||
25 | static inline void atomic_scrub(void *va, u32 size) | ||
26 | { | ||
27 | #if __LINUX_ARM_ARCH__ >= 6 | ||
28 | unsigned int *virt_addr = va; | ||
29 | unsigned int temp, temp2; | ||
30 | unsigned int i; | ||
31 | |||
32 | for (i = 0; i < size / sizeof(*virt_addr); i++, virt_addr++) { | ||
33 | /* Very carefully read and write to memory atomically | ||
34 | * so we are interrupt, DMA and SMP safe. | ||
35 | */ | ||
36 | __asm__ __volatile__("\n" | ||
37 | "1: ldrex %0, [%2]\n" | ||
38 | " strex %1, %0, [%2]\n" | ||
39 | " teq %1, #0\n" | ||
40 | " bne 1b\n" | ||
41 | : "=&r"(temp), "=&r"(temp2) | ||
42 | : "r"(virt_addr) | ||
43 | : "cc"); | ||
44 | } | ||
45 | #endif | ||
46 | } | ||
47 | |||
48 | #endif | ||
diff --git a/arch/arm/include/asm/entry-macro-vic2.S b/arch/arm/include/asm/entry-macro-vic2.S deleted file mode 100644 index 3ceb85e43850..000000000000 --- a/arch/arm/include/asm/entry-macro-vic2.S +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* arch/arm/include/asm/entry-macro-vic2.S | ||
2 | * | ||
3 | * Originally arch/arm/mach-s3c6400/include/mach/entry-macro.S | ||
4 | * | ||
5 | * Copyright 2008 Openmoko, Inc. | ||
6 | * Copyright 2008 Simtec Electronics | ||
7 | * http://armlinux.simtec.co.uk/ | ||
8 | * Ben Dooks <ben@simtec.co.uk> | ||
9 | * | ||
10 | * Low-level IRQ helper macros for a device with two VICs | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | /* This should be included from <mach/entry-macro.S> with the necessary | ||
18 | * defines for virtual addresses and IRQ bases for the two vics. | ||
19 | * | ||
20 | * The code needs the following defined: | ||
21 | * IRQ_VIC0_BASE IRQ number of VIC0's first IRQ | ||
22 | * IRQ_VIC1_BASE IRQ number of VIC1's first IRQ | ||
23 | * VA_VIC0 Virtual address of VIC0 | ||
24 | * VA_VIC1 Virtual address of VIC1 | ||
25 | * | ||
26 | * Note, code assumes VIC0's virtual address is an ARM immediate constant | ||
27 | * away from VIC1. | ||
28 | */ | ||
29 | |||
30 | #include <asm/hardware/vic.h> | ||
31 | |||
32 | .macro disable_fiq | ||
33 | .endm | ||
34 | |||
35 | .macro get_irqnr_preamble, base, tmp | ||
36 | ldr \base, =VA_VIC0 | ||
37 | .endm | ||
38 | |||
39 | .macro arch_ret_to_user, tmp1, tmp2 | ||
40 | .endm | ||
41 | |||
42 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
43 | |||
44 | @ check the vic0 | ||
45 | mov \irqnr, #IRQ_VIC0_BASE + 31 | ||
46 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
47 | teq \irqstat, #0 | ||
48 | |||
49 | @ otherwise try vic1 | ||
50 | addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) | ||
51 | addeq \irqnr, \irqnr, #(IRQ_VIC1_BASE - IRQ_VIC0_BASE) | ||
52 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
53 | teqeq \irqstat, #0 | ||
54 | |||
55 | clzne \irqstat, \irqstat | ||
56 | subne \irqnr, \irqnr, \irqstat | ||
57 | .endm | ||
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 11ad0bfbb0ad..7151753b0989 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef _ARCH_ARM_GPIO_H | 1 | #ifndef _ARCH_ARM_GPIO_H |
2 | #define _ARCH_ARM_GPIO_H | 2 | #define _ARCH_ARM_GPIO_H |
3 | 3 | ||
4 | #if CONFIG_ARCH_NR_GPIO > 0 | ||
5 | #define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO | ||
6 | #endif | ||
7 | |||
4 | /* not all ARM platforms necessarily support this API ... */ | 8 | /* not all ARM platforms necessarily support this API ... */ |
5 | #include <mach/gpio.h> | 9 | #include <mach/gpio.h> |
6 | 10 | ||
diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index ddf07a92a6c8..436e60b2cf7a 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h | |||
@@ -27,23 +27,6 @@ u64 smp_irq_stat_cpu(unsigned int cpu); | |||
27 | 27 | ||
28 | #define arch_irq_stat_cpu smp_irq_stat_cpu | 28 | #define arch_irq_stat_cpu smp_irq_stat_cpu |
29 | 29 | ||
30 | #if NR_IRQS > 512 | ||
31 | #define HARDIRQ_BITS 10 | ||
32 | #elif NR_IRQS > 256 | ||
33 | #define HARDIRQ_BITS 9 | ||
34 | #else | ||
35 | #define HARDIRQ_BITS 8 | ||
36 | #endif | ||
37 | |||
38 | /* | ||
39 | * The hardirq mask has to be large enough to have space | ||
40 | * for potentially all IRQ sources in the system nesting | ||
41 | * on a single CPU: | ||
42 | */ | ||
43 | #if (1 << HARDIRQ_BITS) < NR_IRQS | ||
44 | # error HARDIRQ_BITS is too low! | ||
45 | #endif | ||
46 | |||
47 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 | 30 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 |
48 | 31 | ||
49 | #endif /* __ASM_HARDIRQ_H */ | 32 | #endif /* __ASM_HARDIRQ_H */ |
diff --git a/arch/arm/include/asm/hardware/entry-macro-gic.S b/arch/arm/include/asm/hardware/entry-macro-gic.S deleted file mode 100644 index 74ebc803904d..000000000000 --- a/arch/arm/include/asm/hardware/entry-macro-gic.S +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/entry-macro-gic.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for GIC | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <asm/hardware/gic.h> | ||
12 | |||
13 | #ifndef HAVE_GET_IRQNR_PREAMBLE | ||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | ldr \base, =gic_cpu_base_addr | ||
16 | ldr \base, [\base] | ||
17 | .endm | ||
18 | #endif | ||
19 | |||
20 | /* | ||
21 | * The interrupt numbering scheme is defined in the | ||
22 | * interrupt controller spec. To wit: | ||
23 | * | ||
24 | * Interrupts 0-15 are IPI | ||
25 | * 16-31 are local. We allow 30 to be used for the watchdog. | ||
26 | * 32-1020 are global | ||
27 | * 1021-1022 are reserved | ||
28 | * 1023 is "spurious" (no interrupt) | ||
29 | * | ||
30 | * A simple read from the controller will tell us the number of the highest | ||
31 | * priority enabled interrupt. We then just need to check whether it is in the | ||
32 | * valid range for an IRQ (30-1020 inclusive). | ||
33 | */ | ||
34 | |||
35 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
36 | |||
37 | ldr \irqstat, [\base, #GIC_CPU_INTACK] | ||
38 | /* bits 12-10 = src CPU, 9-0 = int # */ | ||
39 | |||
40 | ldr \tmp, =1021 | ||
41 | bic \irqnr, \irqstat, #0x1c00 | ||
42 | cmp \irqnr, #15 | ||
43 | cmpcc \irqnr, \irqnr | ||
44 | cmpne \irqnr, \tmp | ||
45 | cmpcs \irqnr, \irqnr | ||
46 | .endm | ||
47 | |||
48 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
49 | * register) is preserved from the macro above. | ||
50 | * If there is an IPI, we immediately signal end of interrupt on the | ||
51 | * controller, since this requires the original irqstat value which | ||
52 | * we won't easily be able to recreate later. | ||
53 | */ | ||
54 | |||
55 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
56 | bic \irqnr, \irqstat, #0x1c00 | ||
57 | cmp \irqnr, #16 | ||
58 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
59 | cmpcs \irqnr, \irqnr | ||
60 | .endm | ||
diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h index 3e91f22046f5..4bdfe0018696 100644 --- a/arch/arm/include/asm/hardware/gic.h +++ b/arch/arm/include/asm/hardware/gic.h | |||
@@ -36,30 +36,22 @@ | |||
36 | #include <linux/irqdomain.h> | 36 | #include <linux/irqdomain.h> |
37 | struct device_node; | 37 | struct device_node; |
38 | 38 | ||
39 | extern void __iomem *gic_cpu_base_addr; | ||
40 | extern struct irq_chip gic_arch_extn; | 39 | extern struct irq_chip gic_arch_extn; |
41 | 40 | ||
42 | void gic_init(unsigned int, int, void __iomem *, void __iomem *); | 41 | void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *, |
42 | u32 offset); | ||
43 | int gic_of_init(struct device_node *node, struct device_node *parent); | 43 | int gic_of_init(struct device_node *node, struct device_node *parent); |
44 | void gic_secondary_init(unsigned int); | 44 | void gic_secondary_init(unsigned int); |
45 | void gic_handle_irq(struct pt_regs *regs); | ||
45 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); | 46 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); |
46 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); | 47 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); |
47 | 48 | ||
48 | struct gic_chip_data { | 49 | static inline void gic_init(unsigned int nr, int start, |
49 | void __iomem *dist_base; | 50 | void __iomem *dist , void __iomem *cpu) |
50 | void __iomem *cpu_base; | 51 | { |
51 | #ifdef CONFIG_CPU_PM | 52 | gic_init_bases(nr, start, dist, cpu, 0); |
52 | u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)]; | 53 | } |
53 | u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)]; | 54 | |
54 | u32 saved_spi_target[DIV_ROUND_UP(1020, 4)]; | ||
55 | u32 __percpu *saved_ppi_enable; | ||
56 | u32 __percpu *saved_ppi_conf; | ||
57 | #endif | ||
58 | #ifdef CONFIG_IRQ_DOMAIN | ||
59 | struct irq_domain domain; | ||
60 | #endif | ||
61 | unsigned int gic_irqs; | ||
62 | }; | ||
63 | #endif | 55 | #endif |
64 | 56 | ||
65 | #endif | 57 | #endif |
diff --git a/arch/arm/include/asm/hardware/vic.h b/arch/arm/include/asm/hardware/vic.h index 5d72550a8097..f42ebd619590 100644 --- a/arch/arm/include/asm/hardware/vic.h +++ b/arch/arm/include/asm/hardware/vic.h | |||
@@ -41,7 +41,15 @@ | |||
41 | #define VIC_PL192_VECT_ADDR 0xF00 | 41 | #define VIC_PL192_VECT_ADDR 0xF00 |
42 | 42 | ||
43 | #ifndef __ASSEMBLY__ | 43 | #ifndef __ASSEMBLY__ |
44 | #include <linux/compiler.h> | ||
45 | #include <linux/types.h> | ||
46 | |||
47 | struct device_node; | ||
48 | struct pt_regs; | ||
49 | |||
44 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources); | 50 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources); |
45 | #endif | 51 | int vic_of_init(struct device_node *node, struct device_node *parent); |
52 | void vic_handle_irq(struct pt_regs *regs); | ||
46 | 53 | ||
54 | #endif /* __ASSEMBLY__ */ | ||
47 | #endif | 55 | #endif |
diff --git a/arch/arm/include/asm/idmap.h b/arch/arm/include/asm/idmap.h new file mode 100644 index 000000000000..bf863edb517d --- /dev/null +++ b/arch/arm/include/asm/idmap.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef __ASM_IDMAP_H | ||
2 | #define __ASM_IDMAP_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <asm/pgtable.h> | ||
6 | |||
7 | /* Tag a function as requiring to be executed via an identity mapping. */ | ||
8 | #define __idmap __section(.idmap.text) noinline notrace | ||
9 | |||
10 | extern pgd_t *idmap_pgd; | ||
11 | |||
12 | void setup_mm_for_reboot(void); | ||
13 | |||
14 | #endif /* __ASM_IDMAP_H */ | ||
diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h new file mode 100644 index 000000000000..c0efdd60966f --- /dev/null +++ b/arch/arm/include/asm/opcodes.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/opcodes.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARM_OPCODES_H | ||
10 | #define __ASM_ARM_OPCODES_H | ||
11 | |||
12 | #ifndef __ASSEMBLY__ | ||
13 | extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); | ||
14 | #endif | ||
15 | |||
16 | #define ARM_OPCODE_CONDTEST_FAIL 0 | ||
17 | #define ARM_OPCODE_CONDTEST_PASS 1 | ||
18 | #define ARM_OPCODE_CONDTEST_UNCOND 2 | ||
19 | |||
20 | #endif /* __ASM_ARM_OPCODES_H */ | ||
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index ca94653f1ecb..97b440c25c58 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -151,7 +151,11 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from, | |||
151 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) | 151 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
152 | extern void copy_page(void *to, const void *from); | 152 | extern void copy_page(void *to, const void *from); |
153 | 153 | ||
154 | #ifdef CONFIG_ARM_LPAE | ||
155 | #include <asm/pgtable-3level-types.h> | ||
156 | #else | ||
154 | #include <asm/pgtable-2level-types.h> | 157 | #include <asm/pgtable-2level-types.h> |
158 | #endif | ||
155 | 159 | ||
156 | #endif /* CONFIG_MMU */ | 160 | #endif /* CONFIG_MMU */ |
157 | 161 | ||
diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h index 0f8e3827a89b..99cfe3607989 100644 --- a/arch/arm/include/asm/perf_event.h +++ b/arch/arm/include/asm/perf_event.h | |||
@@ -32,7 +32,4 @@ enum arm_perf_pmu_ids { | |||
32 | extern enum arm_perf_pmu_ids | 32 | extern enum arm_perf_pmu_ids |
33 | armpmu_get_pmu_id(void); | 33 | armpmu_get_pmu_id(void); |
34 | 34 | ||
35 | extern int | ||
36 | armpmu_get_max_events(void); | ||
37 | |||
38 | #endif /* __ARM_PERF_EVENT_H__ */ | 35 | #endif /* __ARM_PERF_EVENT_H__ */ |
diff --git a/arch/arm/include/asm/pgalloc.h b/arch/arm/include/asm/pgalloc.h index 3e08fd3fbb6b..943504f53f57 100644 --- a/arch/arm/include/asm/pgalloc.h +++ b/arch/arm/include/asm/pgalloc.h | |||
@@ -25,12 +25,34 @@ | |||
25 | #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) | 25 | #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) |
26 | #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) | 26 | #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) |
27 | 27 | ||
28 | #ifdef CONFIG_ARM_LPAE | ||
29 | |||
30 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | ||
31 | { | ||
32 | return (pmd_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT); | ||
33 | } | ||
34 | |||
35 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | ||
36 | { | ||
37 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | ||
38 | free_page((unsigned long)pmd); | ||
39 | } | ||
40 | |||
41 | static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) | ||
42 | { | ||
43 | set_pud(pud, __pud(__pa(pmd) | PMD_TYPE_TABLE)); | ||
44 | } | ||
45 | |||
46 | #else /* !CONFIG_ARM_LPAE */ | ||
47 | |||
28 | /* | 48 | /* |
29 | * Since we have only two-level page tables, these are trivial | 49 | * Since we have only two-level page tables, these are trivial |
30 | */ | 50 | */ |
31 | #define pmd_alloc_one(mm,addr) ({ BUG(); ((pmd_t *)2); }) | 51 | #define pmd_alloc_one(mm,addr) ({ BUG(); ((pmd_t *)2); }) |
32 | #define pmd_free(mm, pmd) do { } while (0) | 52 | #define pmd_free(mm, pmd) do { } while (0) |
33 | #define pgd_populate(mm,pmd,pte) BUG() | 53 | #define pud_populate(mm,pmd,pte) BUG() |
54 | |||
55 | #endif /* CONFIG_ARM_LPAE */ | ||
34 | 56 | ||
35 | extern pgd_t *pgd_alloc(struct mm_struct *mm); | 57 | extern pgd_t *pgd_alloc(struct mm_struct *mm); |
36 | extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); | 58 | extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); |
@@ -109,7 +131,9 @@ static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte, | |||
109 | { | 131 | { |
110 | pmdval_t pmdval = (pte + PTE_HWTABLE_OFF) | prot; | 132 | pmdval_t pmdval = (pte + PTE_HWTABLE_OFF) | prot; |
111 | pmdp[0] = __pmd(pmdval); | 133 | pmdp[0] = __pmd(pmdval); |
134 | #ifndef CONFIG_ARM_LPAE | ||
112 | pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); | 135 | pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); |
136 | #endif | ||
113 | flush_pmd_entry(pmdp); | 137 | flush_pmd_entry(pmdp); |
114 | } | 138 | } |
115 | 139 | ||
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h index 470457e1cfc5..2317a71c8f8e 100644 --- a/arch/arm/include/asm/pgtable-2level.h +++ b/arch/arm/include/asm/pgtable-2level.h | |||
@@ -140,4 +140,45 @@ | |||
140 | #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2) /* 1011 */ | 140 | #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2) /* 1011 */ |
141 | #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2) | 141 | #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2) |
142 | 142 | ||
143 | #ifndef __ASSEMBLY__ | ||
144 | |||
145 | /* | ||
146 | * The "pud_xxx()" functions here are trivial when the pmd is folded into | ||
147 | * the pud: the pud entry is never bad, always exists, and can't be set or | ||
148 | * cleared. | ||
149 | */ | ||
150 | #define pud_none(pud) (0) | ||
151 | #define pud_bad(pud) (0) | ||
152 | #define pud_present(pud) (1) | ||
153 | #define pud_clear(pudp) do { } while (0) | ||
154 | #define set_pud(pud,pudp) do { } while (0) | ||
155 | |||
156 | static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | ||
157 | { | ||
158 | return (pmd_t *)pud; | ||
159 | } | ||
160 | |||
161 | #define pmd_bad(pmd) (pmd_val(pmd) & 2) | ||
162 | |||
163 | #define copy_pmd(pmdpd,pmdps) \ | ||
164 | do { \ | ||
165 | pmdpd[0] = pmdps[0]; \ | ||
166 | pmdpd[1] = pmdps[1]; \ | ||
167 | flush_pmd_entry(pmdpd); \ | ||
168 | } while (0) | ||
169 | |||
170 | #define pmd_clear(pmdp) \ | ||
171 | do { \ | ||
172 | pmdp[0] = __pmd(0); \ | ||
173 | pmdp[1] = __pmd(0); \ | ||
174 | clean_pmd_entry(pmdp); \ | ||
175 | } while (0) | ||
176 | |||
177 | /* we don't need complex calculations here as the pmd is folded into the pgd */ | ||
178 | #define pmd_addr_end(addr,end) (end) | ||
179 | |||
180 | #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext) | ||
181 | |||
182 | #endif /* __ASSEMBLY__ */ | ||
183 | |||
143 | #endif /* _ASM_PGTABLE_2LEVEL_H */ | 184 | #endif /* _ASM_PGTABLE_2LEVEL_H */ |
diff --git a/arch/arm/include/asm/pgtable-3level-hwdef.h b/arch/arm/include/asm/pgtable-3level-hwdef.h new file mode 100644 index 000000000000..d7952824c5c4 --- /dev/null +++ b/arch/arm/include/asm/pgtable-3level-hwdef.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/pgtable-3level-hwdef.h | ||
3 | * | ||
4 | * Copyright (C) 2011 ARM Ltd. | ||
5 | * Author: Catalin Marinas <catalin.marinas@arm.com> | ||
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 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef _ASM_PGTABLE_3LEVEL_HWDEF_H | ||
21 | #define _ASM_PGTABLE_3LEVEL_HWDEF_H | ||
22 | |||
23 | /* | ||
24 | * Hardware page table definitions. | ||
25 | * | ||
26 | * + Level 1/2 descriptor | ||
27 | * - common | ||
28 | */ | ||
29 | #define PMD_TYPE_MASK (_AT(pmdval_t, 3) << 0) | ||
30 | #define PMD_TYPE_FAULT (_AT(pmdval_t, 0) << 0) | ||
31 | #define PMD_TYPE_TABLE (_AT(pmdval_t, 3) << 0) | ||
32 | #define PMD_TYPE_SECT (_AT(pmdval_t, 1) << 0) | ||
33 | #define PMD_BIT4 (_AT(pmdval_t, 0)) | ||
34 | #define PMD_DOMAIN(x) (_AT(pmdval_t, 0)) | ||
35 | |||
36 | /* | ||
37 | * - section | ||
38 | */ | ||
39 | #define PMD_SECT_BUFFERABLE (_AT(pmdval_t, 1) << 2) | ||
40 | #define PMD_SECT_CACHEABLE (_AT(pmdval_t, 1) << 3) | ||
41 | #define PMD_SECT_S (_AT(pmdval_t, 3) << 8) | ||
42 | #define PMD_SECT_AF (_AT(pmdval_t, 1) << 10) | ||
43 | #define PMD_SECT_nG (_AT(pmdval_t, 1) << 11) | ||
44 | #define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) | ||
45 | #define PMD_SECT_AP_WRITE (_AT(pmdval_t, 0)) | ||
46 | #define PMD_SECT_AP_READ (_AT(pmdval_t, 0)) | ||
47 | #define PMD_SECT_TEX(x) (_AT(pmdval_t, 0)) | ||
48 | |||
49 | /* | ||
50 | * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). | ||
51 | */ | ||
52 | #define PMD_SECT_UNCACHED (_AT(pmdval_t, 0) << 2) /* strongly ordered */ | ||
53 | #define PMD_SECT_BUFFERED (_AT(pmdval_t, 1) << 2) /* normal non-cacheable */ | ||
54 | #define PMD_SECT_WT (_AT(pmdval_t, 2) << 2) /* normal inner write-through */ | ||
55 | #define PMD_SECT_WB (_AT(pmdval_t, 3) << 2) /* normal inner write-back */ | ||
56 | #define PMD_SECT_WBWA (_AT(pmdval_t, 7) << 2) /* normal inner write-alloc */ | ||
57 | |||
58 | /* | ||
59 | * + Level 3 descriptor (PTE) | ||
60 | */ | ||
61 | #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0) | ||
62 | #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0) | ||
63 | #define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0) | ||
64 | #define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ | ||
65 | #define PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ | ||
66 | #define PTE_EXT_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ | ||
67 | #define PTE_EXT_AF (_AT(pteval_t, 1) << 10) /* Access Flag */ | ||
68 | #define PTE_EXT_NG (_AT(pteval_t, 1) << 11) /* nG */ | ||
69 | #define PTE_EXT_XN (_AT(pteval_t, 1) << 54) /* XN */ | ||
70 | |||
71 | /* | ||
72 | * 40-bit physical address supported. | ||
73 | */ | ||
74 | #define PHYS_MASK_SHIFT (40) | ||
75 | #define PHYS_MASK ((1ULL << PHYS_MASK_SHIFT) - 1) | ||
76 | |||
77 | #endif | ||
diff --git a/arch/arm/include/asm/pgtable-3level-types.h b/arch/arm/include/asm/pgtable-3level-types.h new file mode 100644 index 000000000000..921aa30259c4 --- /dev/null +++ b/arch/arm/include/asm/pgtable-3level-types.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/pgtable-3level-types.h | ||
3 | * | ||
4 | * Copyright (C) 2011 ARM Ltd. | ||
5 | * Author: Catalin Marinas <catalin.marinas@arm.com> | ||
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 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef _ASM_PGTABLE_3LEVEL_TYPES_H | ||
21 | #define _ASM_PGTABLE_3LEVEL_TYPES_H | ||
22 | |||
23 | #include <asm/types.h> | ||
24 | |||
25 | typedef u64 pteval_t; | ||
26 | typedef u64 pmdval_t; | ||
27 | typedef u64 pgdval_t; | ||
28 | |||
29 | #undef STRICT_MM_TYPECHECKS | ||
30 | |||
31 | #ifdef STRICT_MM_TYPECHECKS | ||
32 | |||
33 | /* | ||
34 | * These are used to make use of C type-checking.. | ||
35 | */ | ||
36 | typedef struct { pteval_t pte; } pte_t; | ||
37 | typedef struct { pmdval_t pmd; } pmd_t; | ||
38 | typedef struct { pgdval_t pgd; } pgd_t; | ||
39 | typedef struct { pteval_t pgprot; } pgprot_t; | ||
40 | |||
41 | #define pte_val(x) ((x).pte) | ||
42 | #define pmd_val(x) ((x).pmd) | ||
43 | #define pgd_val(x) ((x).pgd) | ||
44 | #define pgprot_val(x) ((x).pgprot) | ||
45 | |||
46 | #define __pte(x) ((pte_t) { (x) } ) | ||
47 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
48 | #define __pgd(x) ((pgd_t) { (x) } ) | ||
49 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
50 | |||
51 | #else /* !STRICT_MM_TYPECHECKS */ | ||
52 | |||
53 | typedef pteval_t pte_t; | ||
54 | typedef pmdval_t pmd_t; | ||
55 | typedef pgdval_t pgd_t; | ||
56 | typedef pteval_t pgprot_t; | ||
57 | |||
58 | #define pte_val(x) (x) | ||
59 | #define pmd_val(x) (x) | ||
60 | #define pgd_val(x) (x) | ||
61 | #define pgprot_val(x) (x) | ||
62 | |||
63 | #define __pte(x) (x) | ||
64 | #define __pmd(x) (x) | ||
65 | #define __pgd(x) (x) | ||
66 | #define __pgprot(x) (x) | ||
67 | |||
68 | #endif /* STRICT_MM_TYPECHECKS */ | ||
69 | |||
70 | #endif /* _ASM_PGTABLE_3LEVEL_TYPES_H */ | ||
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h new file mode 100644 index 000000000000..759af70f9a0a --- /dev/null +++ b/arch/arm/include/asm/pgtable-3level.h | |||
@@ -0,0 +1,155 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/pgtable-3level.h | ||
3 | * | ||
4 | * Copyright (C) 2011 ARM Ltd. | ||
5 | * Author: Catalin Marinas <catalin.marinas@arm.com> | ||
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 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef _ASM_PGTABLE_3LEVEL_H | ||
21 | #define _ASM_PGTABLE_3LEVEL_H | ||
22 | |||
23 | /* | ||
24 | * With LPAE, there are 3 levels of page tables. Each level has 512 entries of | ||
25 | * 8 bytes each, occupying a 4K page. The first level table covers a range of | ||
26 | * 512GB, each entry representing 1GB. Since we are limited to 4GB input | ||
27 | * address range, only 4 entries in the PGD are used. | ||
28 | * | ||
29 | * There are enough spare bits in a page table entry for the kernel specific | ||
30 | * state. | ||
31 | */ | ||
32 | #define PTRS_PER_PTE 512 | ||
33 | #define PTRS_PER_PMD 512 | ||
34 | #define PTRS_PER_PGD 4 | ||
35 | |||
36 | #define PTE_HWTABLE_PTRS (PTRS_PER_PTE) | ||
37 | #define PTE_HWTABLE_OFF (0) | ||
38 | #define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64)) | ||
39 | |||
40 | /* | ||
41 | * PGDIR_SHIFT determines the size a top-level page table entry can map. | ||
42 | */ | ||
43 | #define PGDIR_SHIFT 30 | ||
44 | |||
45 | /* | ||
46 | * PMD_SHIFT determines the size a middle-level page table entry can map. | ||
47 | */ | ||
48 | #define PMD_SHIFT 21 | ||
49 | |||
50 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
51 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
52 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
53 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
54 | |||
55 | /* | ||
56 | * section address mask and size definitions. | ||
57 | */ | ||
58 | #define SECTION_SHIFT 21 | ||
59 | #define SECTION_SIZE (1UL << SECTION_SHIFT) | ||
60 | #define SECTION_MASK (~(SECTION_SIZE-1)) | ||
61 | |||
62 | #define USER_PTRS_PER_PGD (PAGE_OFFSET / PGDIR_SIZE) | ||
63 | |||
64 | /* | ||
65 | * "Linux" PTE definitions for LPAE. | ||
66 | * | ||
67 | * These bits overlap with the hardware bits but the naming is preserved for | ||
68 | * consistency with the classic page table format. | ||
69 | */ | ||
70 | #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Valid */ | ||
71 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ | ||
72 | #define L_PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ | ||
73 | #define L_PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ | ||
74 | #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ | ||
75 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ | ||
76 | #define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ | ||
77 | #define L_PTE_YOUNG (_AT(pteval_t, 1) << 10) /* AF */ | ||
78 | #define L_PTE_XN (_AT(pteval_t, 1) << 54) /* XN */ | ||
79 | #define L_PTE_DIRTY (_AT(pteval_t, 1) << 55) /* unused */ | ||
80 | #define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56) /* unused */ | ||
81 | |||
82 | /* | ||
83 | * To be used in assembly code with the upper page attributes. | ||
84 | */ | ||
85 | #define L_PTE_XN_HIGH (1 << (54 - 32)) | ||
86 | #define L_PTE_DIRTY_HIGH (1 << (55 - 32)) | ||
87 | |||
88 | /* | ||
89 | * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). | ||
90 | */ | ||
91 | #define L_PTE_MT_UNCACHED (_AT(pteval_t, 0) << 2) /* strongly ordered */ | ||
92 | #define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 1) << 2) /* normal non-cacheable */ | ||
93 | #define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 2) << 2) /* normal inner write-through */ | ||
94 | #define L_PTE_MT_WRITEBACK (_AT(pteval_t, 3) << 2) /* normal inner write-back */ | ||
95 | #define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 7) << 2) /* normal inner write-alloc */ | ||
96 | #define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 4) << 2) /* device */ | ||
97 | #define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 4) << 2) /* device */ | ||
98 | #define L_PTE_MT_DEV_WC (_AT(pteval_t, 1) << 2) /* normal non-cacheable */ | ||
99 | #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 3) << 2) /* normal inner write-back */ | ||
100 | #define L_PTE_MT_MASK (_AT(pteval_t, 7) << 2) | ||
101 | |||
102 | /* | ||
103 | * Software PGD flags. | ||
104 | */ | ||
105 | #define L_PGD_SWAPPER (_AT(pgdval_t, 1) << 55) /* swapper_pg_dir entry */ | ||
106 | |||
107 | #ifndef __ASSEMBLY__ | ||
108 | |||
109 | #define pud_none(pud) (!pud_val(pud)) | ||
110 | #define pud_bad(pud) (!(pud_val(pud) & 2)) | ||
111 | #define pud_present(pud) (pud_val(pud)) | ||
112 | |||
113 | #define pud_clear(pudp) \ | ||
114 | do { \ | ||
115 | *pudp = __pud(0); \ | ||
116 | clean_pmd_entry(pudp); \ | ||
117 | } while (0) | ||
118 | |||
119 | #define set_pud(pudp, pud) \ | ||
120 | do { \ | ||
121 | *pudp = pud; \ | ||
122 | flush_pmd_entry(pudp); \ | ||
123 | } while (0) | ||
124 | |||
125 | static inline pmd_t *pud_page_vaddr(pud_t pud) | ||
126 | { | ||
127 | return __va(pud_val(pud) & PHYS_MASK & (s32)PAGE_MASK); | ||
128 | } | ||
129 | |||
130 | /* Find an entry in the second-level page table.. */ | ||
131 | #define pmd_index(addr) (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) | ||
132 | static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | ||
133 | { | ||
134 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(addr); | ||
135 | } | ||
136 | |||
137 | #define pmd_bad(pmd) (!(pmd_val(pmd) & 2)) | ||
138 | |||
139 | #define copy_pmd(pmdpd,pmdps) \ | ||
140 | do { \ | ||
141 | *pmdpd = *pmdps; \ | ||
142 | flush_pmd_entry(pmdpd); \ | ||
143 | } while (0) | ||
144 | |||
145 | #define pmd_clear(pmdp) \ | ||
146 | do { \ | ||
147 | *pmdp = __pmd(0); \ | ||
148 | clean_pmd_entry(pmdp); \ | ||
149 | } while (0) | ||
150 | |||
151 | #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext))) | ||
152 | |||
153 | #endif /* __ASSEMBLY__ */ | ||
154 | |||
155 | #endif /* _ASM_PGTABLE_3LEVEL_H */ | ||
diff --git a/arch/arm/include/asm/pgtable-hwdef.h b/arch/arm/include/asm/pgtable-hwdef.h index 183111164ce9..8426229ba292 100644 --- a/arch/arm/include/asm/pgtable-hwdef.h +++ b/arch/arm/include/asm/pgtable-hwdef.h | |||
@@ -10,6 +10,10 @@ | |||
10 | #ifndef _ASMARM_PGTABLE_HWDEF_H | 10 | #ifndef _ASMARM_PGTABLE_HWDEF_H |
11 | #define _ASMARM_PGTABLE_HWDEF_H | 11 | #define _ASMARM_PGTABLE_HWDEF_H |
12 | 12 | ||
13 | #ifdef CONFIG_ARM_LPAE | ||
14 | #include <asm/pgtable-3level-hwdef.h> | ||
15 | #else | ||
13 | #include <asm/pgtable-2level-hwdef.h> | 16 | #include <asm/pgtable-2level-hwdef.h> |
17 | #endif | ||
14 | 18 | ||
15 | #endif | 19 | #endif |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 9451dce3a553..f66626d71e7d 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -11,20 +11,24 @@ | |||
11 | #define _ASMARM_PGTABLE_H | 11 | #define _ASMARM_PGTABLE_H |
12 | 12 | ||
13 | #include <linux/const.h> | 13 | #include <linux/const.h> |
14 | #include <asm-generic/4level-fixup.h> | ||
15 | #include <asm/proc-fns.h> | 14 | #include <asm/proc-fns.h> |
16 | 15 | ||
17 | #ifndef CONFIG_MMU | 16 | #ifndef CONFIG_MMU |
18 | 17 | ||
18 | #include <asm-generic/4level-fixup.h> | ||
19 | #include "pgtable-nommu.h" | 19 | #include "pgtable-nommu.h" |
20 | 20 | ||
21 | #else | 21 | #else |
22 | 22 | ||
23 | #include <asm-generic/pgtable-nopud.h> | ||
23 | #include <asm/memory.h> | 24 | #include <asm/memory.h> |
24 | #include <mach/vmalloc.h> | ||
25 | #include <asm/pgtable-hwdef.h> | 25 | #include <asm/pgtable-hwdef.h> |
26 | 26 | ||
27 | #ifdef CONFIG_ARM_LPAE | ||
28 | #include <asm/pgtable-3level.h> | ||
29 | #else | ||
27 | #include <asm/pgtable-2level.h> | 30 | #include <asm/pgtable-2level.h> |
31 | #endif | ||
28 | 32 | ||
29 | /* | 33 | /* |
30 | * Just any arbitrary offset to the start of the vmalloc VM area: the | 34 | * Just any arbitrary offset to the start of the vmalloc VM area: the |
@@ -33,15 +37,10 @@ | |||
33 | * any out-of-bounds memory accesses will hopefully be caught. | 37 | * any out-of-bounds memory accesses will hopefully be caught. |
34 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | 38 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced |
35 | * area for the same reason. ;) | 39 | * area for the same reason. ;) |
36 | * | ||
37 | * Note that platforms may override VMALLOC_START, but they must provide | ||
38 | * VMALLOC_END. VMALLOC_END defines the (exclusive) limit of this space, | ||
39 | * which may not overlap IO space. | ||
40 | */ | 40 | */ |
41 | #ifndef VMALLOC_START | ||
42 | #define VMALLOC_OFFSET (8*1024*1024) | 41 | #define VMALLOC_OFFSET (8*1024*1024) |
43 | #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) | 42 | #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) |
44 | #endif | 43 | #define VMALLOC_END 0xff000000UL |
45 | 44 | ||
46 | #define LIBRARY_TEXT_START 0x0c000000 | 45 | #define LIBRARY_TEXT_START 0x0c000000 |
47 | 46 | ||
@@ -163,39 +162,8 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
163 | /* to find an entry in a kernel page-table-directory */ | 162 | /* to find an entry in a kernel page-table-directory */ |
164 | #define pgd_offset_k(addr) pgd_offset(&init_mm, addr) | 163 | #define pgd_offset_k(addr) pgd_offset(&init_mm, addr) |
165 | 164 | ||
166 | /* | ||
167 | * The "pgd_xxx()" functions here are trivial for a folded two-level | ||
168 | * setup: the pgd is never bad, and a pmd always exists (as it's folded | ||
169 | * into the pgd entry) | ||
170 | */ | ||
171 | #define pgd_none(pgd) (0) | ||
172 | #define pgd_bad(pgd) (0) | ||
173 | #define pgd_present(pgd) (1) | ||
174 | #define pgd_clear(pgdp) do { } while (0) | ||
175 | #define set_pgd(pgd,pgdp) do { } while (0) | ||
176 | #define set_pud(pud,pudp) do { } while (0) | ||
177 | |||
178 | |||
179 | /* Find an entry in the second-level page table.. */ | ||
180 | #define pmd_offset(dir, addr) ((pmd_t *)(dir)) | ||
181 | |||
182 | #define pmd_none(pmd) (!pmd_val(pmd)) | 165 | #define pmd_none(pmd) (!pmd_val(pmd)) |
183 | #define pmd_present(pmd) (pmd_val(pmd)) | 166 | #define pmd_present(pmd) (pmd_val(pmd)) |
184 | #define pmd_bad(pmd) (pmd_val(pmd) & 2) | ||
185 | |||
186 | #define copy_pmd(pmdpd,pmdps) \ | ||
187 | do { \ | ||
188 | pmdpd[0] = pmdps[0]; \ | ||
189 | pmdpd[1] = pmdps[1]; \ | ||
190 | flush_pmd_entry(pmdpd); \ | ||
191 | } while (0) | ||
192 | |||
193 | #define pmd_clear(pmdp) \ | ||
194 | do { \ | ||
195 | pmdp[0] = __pmd(0); \ | ||
196 | pmdp[1] = __pmd(0); \ | ||
197 | clean_pmd_entry(pmdp); \ | ||
198 | } while (0) | ||
199 | 167 | ||
200 | static inline pte_t *pmd_page_vaddr(pmd_t pmd) | 168 | static inline pte_t *pmd_page_vaddr(pmd_t pmd) |
201 | { | 169 | { |
@@ -204,10 +172,6 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) | |||
204 | 172 | ||
205 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) | 173 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) |
206 | 174 | ||
207 | /* we don't need complex calculations here as the pmd is folded into the pgd */ | ||
208 | #define pmd_addr_end(addr,end) (end) | ||
209 | |||
210 | |||
211 | #ifndef CONFIG_HIGHPTE | 175 | #ifndef CONFIG_HIGHPTE |
212 | #define __pte_map(pmd) pmd_page_vaddr(*(pmd)) | 176 | #define __pte_map(pmd) pmd_page_vaddr(*(pmd)) |
213 | #define __pte_unmap(pte) do { } while (0) | 177 | #define __pte_unmap(pte) do { } while (0) |
@@ -229,7 +193,6 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) | |||
229 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) | 193 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) |
230 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page), prot) | 194 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page), prot) |
231 | 195 | ||
232 | #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext) | ||
233 | #define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0) | 196 | #define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0) |
234 | 197 | ||
235 | #if __LINUX_ARM_ARCH__ < 6 | 198 | #if __LINUX_ARM_ARCH__ < 6 |
@@ -336,6 +299,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
336 | * We provide our own arch_get_unmapped_area to cope with VIPT caches. | 299 | * We provide our own arch_get_unmapped_area to cope with VIPT caches. |
337 | */ | 300 | */ |
338 | #define HAVE_ARCH_UNMAPPED_AREA | 301 | #define HAVE_ARCH_UNMAPPED_AREA |
302 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN | ||
339 | 303 | ||
340 | /* | 304 | /* |
341 | * remap a physical page `pfn' of size `size' with page protection `prot' | 305 | * remap a physical page `pfn' of size `size' with page protection `prot' |
@@ -346,9 +310,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
346 | 310 | ||
347 | #define pgtable_cache_init() do { } while (0) | 311 | #define pgtable_cache_init() do { } while (0) |
348 | 312 | ||
349 | void identity_mapping_add(pgd_t *, unsigned long, unsigned long); | ||
350 | void identity_mapping_del(pgd_t *, unsigned long, unsigned long); | ||
351 | |||
352 | #endif /* !__ASSEMBLY__ */ | 313 | #endif /* !__ASSEMBLY__ */ |
353 | 314 | ||
354 | #endif /* CONFIG_MMU */ | 315 | #endif /* CONFIG_MMU */ |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 0bda22c094a6..b5a5be2536c1 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -27,13 +27,22 @@ enum arm_pmu_type { | |||
27 | /* | 27 | /* |
28 | * struct arm_pmu_platdata - ARM PMU platform data | 28 | * struct arm_pmu_platdata - ARM PMU platform data |
29 | * | 29 | * |
30 | * @handle_irq: an optional handler which will be called from the interrupt and | 30 | * @handle_irq: an optional handler which will be called from the |
31 | * passed the address of the low level handler, and can be used to implement | 31 | * interrupt and passed the address of the low level handler, |
32 | * any platform specific handling before or after calling it. | 32 | * and can be used to implement any platform specific handling |
33 | * before or after calling it. | ||
34 | * @enable_irq: an optional handler which will be called after | ||
35 | * request_irq and be used to handle some platform specific | ||
36 | * irq enablement | ||
37 | * @disable_irq: an optional handler which will be called before | ||
38 | * free_irq and be used to handle some platform specific | ||
39 | * irq disablement | ||
33 | */ | 40 | */ |
34 | struct arm_pmu_platdata { | 41 | struct arm_pmu_platdata { |
35 | irqreturn_t (*handle_irq)(int irq, void *dev, | 42 | irqreturn_t (*handle_irq)(int irq, void *dev, |
36 | irq_handler_t pmu_handler); | 43 | irq_handler_t pmu_handler); |
44 | void (*enable_irq)(int irq); | ||
45 | void (*disable_irq)(int irq); | ||
37 | }; | 46 | }; |
38 | 47 | ||
39 | #ifdef CONFIG_CPU_HAS_PMU | 48 | #ifdef CONFIG_CPU_HAS_PMU |
diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h index 9e92cb205e65..f3628fb3d2b3 100644 --- a/arch/arm/include/asm/proc-fns.h +++ b/arch/arm/include/asm/proc-fns.h | |||
@@ -65,7 +65,11 @@ extern struct processor { | |||
65 | * Set a possibly extended PTE. Non-extended PTEs should | 65 | * Set a possibly extended PTE. Non-extended PTEs should |
66 | * ignore 'ext'. | 66 | * ignore 'ext'. |
67 | */ | 67 | */ |
68 | #ifdef CONFIG_ARM_LPAE | ||
69 | void (*set_pte_ext)(pte_t *ptep, pte_t pte); | ||
70 | #else | ||
68 | void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext); | 71 | void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext); |
72 | #endif | ||
69 | 73 | ||
70 | /* Suspend/resume */ | 74 | /* Suspend/resume */ |
71 | unsigned int suspend_size; | 75 | unsigned int suspend_size; |
@@ -79,7 +83,11 @@ extern void cpu_proc_fin(void); | |||
79 | extern int cpu_do_idle(void); | 83 | extern int cpu_do_idle(void); |
80 | extern void cpu_dcache_clean_area(void *, int); | 84 | extern void cpu_dcache_clean_area(void *, int); |
81 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); | 85 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); |
86 | #ifdef CONFIG_ARM_LPAE | ||
87 | extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte); | ||
88 | #else | ||
82 | extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); | 89 | extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); |
90 | #endif | ||
83 | extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); | 91 | extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); |
84 | 92 | ||
85 | /* These three are private to arch/arm/kernel/suspend.c */ | 93 | /* These three are private to arch/arm/kernel/suspend.c */ |
@@ -107,6 +115,18 @@ extern void cpu_resume(void); | |||
107 | 115 | ||
108 | #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) | 116 | #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) |
109 | 117 | ||
118 | #ifdef CONFIG_ARM_LPAE | ||
119 | #define cpu_get_pgd() \ | ||
120 | ({ \ | ||
121 | unsigned long pg, pg2; \ | ||
122 | __asm__("mrrc p15, 0, %0, %1, c2" \ | ||
123 | : "=r" (pg), "=r" (pg2) \ | ||
124 | : \ | ||
125 | : "cc"); \ | ||
126 | pg &= ~(PTRS_PER_PGD*sizeof(pgd_t)-1); \ | ||
127 | (pgd_t *)phys_to_virt(pg); \ | ||
128 | }) | ||
129 | #else | ||
110 | #define cpu_get_pgd() \ | 130 | #define cpu_get_pgd() \ |
111 | ({ \ | 131 | ({ \ |
112 | unsigned long pg; \ | 132 | unsigned long pg; \ |
@@ -115,6 +135,7 @@ extern void cpu_resume(void); | |||
115 | pg &= ~0x3fff; \ | 135 | pg &= ~0x3fff; \ |
116 | (pgd_t *)phys_to_virt(pg); \ | 136 | (pgd_t *)phys_to_virt(pg); \ |
117 | }) | 137 | }) |
138 | #endif | ||
118 | 139 | ||
119 | #endif | 140 | #endif |
120 | 141 | ||
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index b2d9df5667af..ce280b8d613c 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -123,6 +123,8 @@ static inline void prefetch(const void *ptr) | |||
123 | 123 | ||
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #define HAVE_ARCH_PICK_MMAP_LAYOUT | ||
127 | |||
126 | #endif | 128 | #endif |
127 | 129 | ||
128 | #endif /* __ASM_ARM_PROCESSOR_H */ | 130 | #endif /* __ASM_ARM_PROCESSOR_H */ |
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h index c8e6ddf3e860..e3f757263438 100644 --- a/arch/arm/include/asm/sched_clock.h +++ b/arch/arm/include/asm/sched_clock.h | |||
@@ -8,113 +8,7 @@ | |||
8 | #ifndef ASM_SCHED_CLOCK | 8 | #ifndef ASM_SCHED_CLOCK |
9 | #define ASM_SCHED_CLOCK | 9 | #define ASM_SCHED_CLOCK |
10 | 10 | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | |||
14 | struct clock_data { | ||
15 | u64 epoch_ns; | ||
16 | u32 epoch_cyc; | ||
17 | u32 epoch_cyc_copy; | ||
18 | u32 mult; | ||
19 | u32 shift; | ||
20 | }; | ||
21 | |||
22 | #define DEFINE_CLOCK_DATA(name) struct clock_data name | ||
23 | |||
24 | static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift) | ||
25 | { | ||
26 | return (cyc * mult) >> shift; | ||
27 | } | ||
28 | |||
29 | /* | ||
30 | * Atomically update the sched_clock epoch. Your update callback will | ||
31 | * be called from a timer before the counter wraps - read the current | ||
32 | * counter value, and call this function to safely move the epochs | ||
33 | * forward. Only use this from the update callback. | ||
34 | */ | ||
35 | static inline void update_sched_clock(struct clock_data *cd, u32 cyc, u32 mask) | ||
36 | { | ||
37 | unsigned long flags; | ||
38 | u64 ns = cd->epoch_ns + | ||
39 | cyc_to_ns((cyc - cd->epoch_cyc) & mask, cd->mult, cd->shift); | ||
40 | |||
41 | /* | ||
42 | * Write epoch_cyc and epoch_ns in a way that the update is | ||
43 | * detectable in cyc_to_fixed_sched_clock(). | ||
44 | */ | ||
45 | raw_local_irq_save(flags); | ||
46 | cd->epoch_cyc = cyc; | ||
47 | smp_wmb(); | ||
48 | cd->epoch_ns = ns; | ||
49 | smp_wmb(); | ||
50 | cd->epoch_cyc_copy = cyc; | ||
51 | raw_local_irq_restore(flags); | ||
52 | } | ||
53 | |||
54 | /* | ||
55 | * If your clock rate is known at compile time, using this will allow | ||
56 | * you to optimize the mult/shift loads away. This is paired with | ||
57 | * init_fixed_sched_clock() to ensure that your mult/shift are correct. | ||
58 | */ | ||
59 | static inline unsigned long long cyc_to_fixed_sched_clock(struct clock_data *cd, | ||
60 | u32 cyc, u32 mask, u32 mult, u32 shift) | ||
61 | { | ||
62 | u64 epoch_ns; | ||
63 | u32 epoch_cyc; | ||
64 | |||
65 | /* | ||
66 | * Load the epoch_cyc and epoch_ns atomically. We do this by | ||
67 | * ensuring that we always write epoch_cyc, epoch_ns and | ||
68 | * epoch_cyc_copy in strict order, and read them in strict order. | ||
69 | * If epoch_cyc and epoch_cyc_copy are not equal, then we're in | ||
70 | * the middle of an update, and we should repeat the load. | ||
71 | */ | ||
72 | do { | ||
73 | epoch_cyc = cd->epoch_cyc; | ||
74 | smp_rmb(); | ||
75 | epoch_ns = cd->epoch_ns; | ||
76 | smp_rmb(); | ||
77 | } while (epoch_cyc != cd->epoch_cyc_copy); | ||
78 | |||
79 | return epoch_ns + cyc_to_ns((cyc - epoch_cyc) & mask, mult, shift); | ||
80 | } | ||
81 | |||
82 | /* | ||
83 | * Otherwise, you need to use this, which will obtain the mult/shift | ||
84 | * from the clock_data structure. Use init_sched_clock() with this. | ||
85 | */ | ||
86 | static inline unsigned long long cyc_to_sched_clock(struct clock_data *cd, | ||
87 | u32 cyc, u32 mask) | ||
88 | { | ||
89 | return cyc_to_fixed_sched_clock(cd, cyc, mask, cd->mult, cd->shift); | ||
90 | } | ||
91 | |||
92 | /* | ||
93 | * Initialize the clock data - calculate the appropriate multiplier | ||
94 | * and shift. Also setup a timer to ensure that the epoch is refreshed | ||
95 | * at the appropriate time interval, which will call your update | ||
96 | * handler. | ||
97 | */ | ||
98 | void init_sched_clock(struct clock_data *, void (*)(void), | ||
99 | unsigned int, unsigned long); | ||
100 | |||
101 | /* | ||
102 | * Use this initialization function rather than init_sched_clock() if | ||
103 | * you're using cyc_to_fixed_sched_clock, which will warn if your | ||
104 | * constants are incorrect. | ||
105 | */ | ||
106 | static inline void init_fixed_sched_clock(struct clock_data *cd, | ||
107 | void (*update)(void), unsigned int bits, unsigned long rate, | ||
108 | u32 mult, u32 shift) | ||
109 | { | ||
110 | init_sched_clock(cd, update, bits, rate); | ||
111 | if (cd->mult != mult || cd->shift != shift) { | ||
112 | pr_crit("sched_clock: wrong multiply/shift: %u>>%u vs calculated %u>>%u\n" | ||
113 | "sched_clock: fix multiply/shift to avoid scheduler hiccups\n", | ||
114 | mult, shift, cd->mult, cd->shift); | ||
115 | } | ||
116 | } | ||
117 | |||
118 | extern void sched_clock_postinit(void); | 11 | extern void sched_clock_postinit(void); |
12 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); | ||
119 | 13 | ||
120 | #endif | 14 | #endif |
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index 915696dd9c7c..23ebc0c82a39 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -192,11 +192,7 @@ static const struct tagtable __tagtable_##fn __tag = { tag, fn } | |||
192 | /* | 192 | /* |
193 | * Memory map description | 193 | * Memory map description |
194 | */ | 194 | */ |
195 | #ifdef CONFIG_ARCH_EP93XX | 195 | #define NR_BANKS CONFIG_ARM_NR_BANKS |
196 | # define NR_BANKS 16 | ||
197 | #else | ||
198 | # define NR_BANKS 8 | ||
199 | #endif | ||
200 | 196 | ||
201 | struct membank { | 197 | struct membank { |
202 | phys_addr_t start; | 198 | phys_addr_t start; |
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index 9997ad20eff1..32ee164a2f6b 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h | |||
@@ -24,12 +24,13 @@ | |||
24 | 24 | ||
25 | #if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 | 25 | #if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 |
26 | 26 | ||
27 | static inline __attribute_const__ __u16 __arch_swab16(__u16 x) | 27 | static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) |
28 | { | 28 | { |
29 | __asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x)); | 29 | __asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x)); |
30 | return x; | 30 | return x; |
31 | } | 31 | } |
32 | #define __arch_swab16 __arch_swab16 | 32 | #define __arch_swahb32 __arch_swahb32 |
33 | #define __arch_swab16(x) ((__u16)__arch_swahb32(x)) | ||
33 | 34 | ||
34 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | 35 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) |
35 | { | 36 | { |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 03775b14be87..e4c96cc6ec0c 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -80,6 +80,14 @@ struct siginfo; | |||
80 | void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, | 80 | void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, |
81 | unsigned long err, unsigned long trap); | 81 | unsigned long err, unsigned long trap); |
82 | 82 | ||
83 | #ifdef CONFIG_ARM_LPAE | ||
84 | #define FAULT_CODE_ALIGNMENT 33 | ||
85 | #define FAULT_CODE_DEBUG 34 | ||
86 | #else | ||
87 | #define FAULT_CODE_ALIGNMENT 1 | ||
88 | #define FAULT_CODE_DEBUG 2 | ||
89 | #endif | ||
90 | |||
83 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | 91 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, |
84 | struct pt_regs *), | 92 | struct pt_regs *), |
85 | int sig, int code, const char *name); | 93 | int sig, int code, const char *name); |
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index 265f908c4a6e..5d3ed7e38561 100644 --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h | |||
@@ -202,8 +202,18 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | |||
202 | tlb_remove_page(tlb, pte); | 202 | tlb_remove_page(tlb, pte); |
203 | } | 203 | } |
204 | 204 | ||
205 | static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, | ||
206 | unsigned long addr) | ||
207 | { | ||
208 | #ifdef CONFIG_ARM_LPAE | ||
209 | tlb_add_flush(tlb, addr); | ||
210 | tlb_remove_page(tlb, virt_to_page(pmdp)); | ||
211 | #endif | ||
212 | } | ||
213 | |||
205 | #define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr) | 214 | #define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr) |
206 | #define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp) | 215 | #define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr) |
216 | #define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp) | ||
207 | 217 | ||
208 | #define tlb_migrate_finish(mm) do { } while (0) | 218 | #define tlb_migrate_finish(mm) do { } while (0) |
209 | 219 | ||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 16eed6aebfa4..43b740d0e374 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -13,7 +13,7 @@ CFLAGS_REMOVE_return_address.o = -pg | |||
13 | 13 | ||
14 | # Object file lists. | 14 | # Object file lists. |
15 | 15 | ||
16 | obj-y := elf.o entry-armv.o entry-common.o irq.o \ | 16 | obj-y := elf.o entry-armv.o entry-common.o irq.o opcodes.o \ |
17 | process.o ptrace.o return_address.o setup.o signal.o \ | 17 | process.o ptrace.o return_address.o setup.o signal.o \ |
18 | sys_arm.o stacktrace.o time.o traps.o | 18 | sys_arm.o stacktrace.o time.o traps.o |
19 | 19 | ||
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index b145f16c91bc..3a456c6c7005 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -36,12 +36,11 @@ | |||
36 | #ifdef CONFIG_MULTI_IRQ_HANDLER | 36 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
37 | ldr r1, =handle_arch_irq | 37 | ldr r1, =handle_arch_irq |
38 | mov r0, sp | 38 | mov r0, sp |
39 | ldr r1, [r1] | ||
40 | adr lr, BSYM(9997f) | 39 | adr lr, BSYM(9997f) |
41 | teq r1, #0 | 40 | ldr pc, [r1] |
42 | movne pc, r1 | 41 | #else |
43 | #endif | ||
44 | arch_irq_handler_default | 42 | arch_irq_handler_default |
43 | #endif | ||
45 | 9997: | 44 | 9997: |
46 | .endm | 45 | .endm |
47 | 46 | ||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 08c82fd844a8..14e277d2ff91 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -39,8 +39,14 @@ | |||
39 | #error KERNEL_RAM_VADDR must start at 0xXXXX8000 | 39 | #error KERNEL_RAM_VADDR must start at 0xXXXX8000 |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #ifdef CONFIG_ARM_LPAE | ||
43 | /* LPAE requires an additional page for the PGD */ | ||
44 | #define PG_DIR_SIZE 0x5000 | ||
45 | #define PMD_ORDER 3 | ||
46 | #else | ||
42 | #define PG_DIR_SIZE 0x4000 | 47 | #define PG_DIR_SIZE 0x4000 |
43 | #define PMD_ORDER 2 | 48 | #define PMD_ORDER 2 |
49 | #endif | ||
44 | 50 | ||
45 | .globl swapper_pg_dir | 51 | .globl swapper_pg_dir |
46 | .equ swapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE | 52 | .equ swapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE |
@@ -164,17 +170,36 @@ __create_page_tables: | |||
164 | teq r0, r6 | 170 | teq r0, r6 |
165 | bne 1b | 171 | bne 1b |
166 | 172 | ||
173 | #ifdef CONFIG_ARM_LPAE | ||
174 | /* | ||
175 | * Build the PGD table (first level) to point to the PMD table. A PGD | ||
176 | * entry is 64-bit wide. | ||
177 | */ | ||
178 | mov r0, r4 | ||
179 | add r3, r4, #0x1000 @ first PMD table address | ||
180 | orr r3, r3, #3 @ PGD block type | ||
181 | mov r6, #4 @ PTRS_PER_PGD | ||
182 | mov r7, #1 << (55 - 32) @ L_PGD_SWAPPER | ||
183 | 1: str r3, [r0], #4 @ set bottom PGD entry bits | ||
184 | str r7, [r0], #4 @ set top PGD entry bits | ||
185 | add r3, r3, #0x1000 @ next PMD table | ||
186 | subs r6, r6, #1 | ||
187 | bne 1b | ||
188 | |||
189 | add r4, r4, #0x1000 @ point to the PMD tables | ||
190 | #endif | ||
191 | |||
167 | ldr r7, [r10, #PROCINFO_MM_MMUFLAGS] @ mm_mmuflags | 192 | ldr r7, [r10, #PROCINFO_MM_MMUFLAGS] @ mm_mmuflags |
168 | 193 | ||
169 | /* | 194 | /* |
170 | * Create identity mapping to cater for __enable_mmu. | 195 | * Create identity mapping to cater for __enable_mmu. |
171 | * This identity mapping will be removed by paging_init(). | 196 | * This identity mapping will be removed by paging_init(). |
172 | */ | 197 | */ |
173 | adr r0, __enable_mmu_loc | 198 | adr r0, __turn_mmu_on_loc |
174 | ldmia r0, {r3, r5, r6} | 199 | ldmia r0, {r3, r5, r6} |
175 | sub r0, r0, r3 @ virt->phys offset | 200 | sub r0, r0, r3 @ virt->phys offset |
176 | add r5, r5, r0 @ phys __enable_mmu | 201 | add r5, r5, r0 @ phys __turn_mmu_on |
177 | add r6, r6, r0 @ phys __enable_mmu_end | 202 | add r6, r6, r0 @ phys __turn_mmu_on_end |
178 | mov r5, r5, lsr #SECTION_SHIFT | 203 | mov r5, r5, lsr #SECTION_SHIFT |
179 | mov r6, r6, lsr #SECTION_SHIFT | 204 | mov r6, r6, lsr #SECTION_SHIFT |
180 | 205 | ||
@@ -219,8 +244,8 @@ __create_page_tables: | |||
219 | #endif | 244 | #endif |
220 | 245 | ||
221 | /* | 246 | /* |
222 | * Then map boot params address in r2 or | 247 | * Then map boot params address in r2 or the first 1MB (2MB with LPAE) |
223 | * the first 1MB of ram if boot params address is not specified. | 248 | * of ram if boot params address is not specified. |
224 | */ | 249 | */ |
225 | mov r0, r2, lsr #SECTION_SHIFT | 250 | mov r0, r2, lsr #SECTION_SHIFT |
226 | movs r0, r0, lsl #SECTION_SHIFT | 251 | movs r0, r0, lsl #SECTION_SHIFT |
@@ -251,7 +276,15 @@ __create_page_tables: | |||
251 | mov r3, r7, lsr #SECTION_SHIFT | 276 | mov r3, r7, lsr #SECTION_SHIFT |
252 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags | 277 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
253 | orr r3, r7, r3, lsl #SECTION_SHIFT | 278 | orr r3, r7, r3, lsl #SECTION_SHIFT |
279 | #ifdef CONFIG_ARM_LPAE | ||
280 | mov r7, #1 << (54 - 32) @ XN | ||
281 | #else | ||
282 | orr r3, r3, #PMD_SECT_XN | ||
283 | #endif | ||
254 | 1: str r3, [r0], #4 | 284 | 1: str r3, [r0], #4 |
285 | #ifdef CONFIG_ARM_LPAE | ||
286 | str r7, [r0], #4 | ||
287 | #endif | ||
255 | add r3, r3, #1 << SECTION_SHIFT | 288 | add r3, r3, #1 << SECTION_SHIFT |
256 | cmp r0, r6 | 289 | cmp r0, r6 |
257 | blo 1b | 290 | blo 1b |
@@ -283,14 +316,17 @@ __create_page_tables: | |||
283 | str r3, [r0] | 316 | str r3, [r0] |
284 | #endif | 317 | #endif |
285 | #endif | 318 | #endif |
319 | #ifdef CONFIG_ARM_LPAE | ||
320 | sub r4, r4, #0x1000 @ point to the PGD table | ||
321 | #endif | ||
286 | mov pc, lr | 322 | mov pc, lr |
287 | ENDPROC(__create_page_tables) | 323 | ENDPROC(__create_page_tables) |
288 | .ltorg | 324 | .ltorg |
289 | .align | 325 | .align |
290 | __enable_mmu_loc: | 326 | __turn_mmu_on_loc: |
291 | .long . | 327 | .long . |
292 | .long __enable_mmu | 328 | .long __turn_mmu_on |
293 | .long __enable_mmu_end | 329 | .long __turn_mmu_on_end |
294 | 330 | ||
295 | #if defined(CONFIG_SMP) | 331 | #if defined(CONFIG_SMP) |
296 | __CPUINIT | 332 | __CPUINIT |
@@ -374,12 +410,17 @@ __enable_mmu: | |||
374 | #ifdef CONFIG_CPU_ICACHE_DISABLE | 410 | #ifdef CONFIG_CPU_ICACHE_DISABLE |
375 | bic r0, r0, #CR_I | 411 | bic r0, r0, #CR_I |
376 | #endif | 412 | #endif |
413 | #ifdef CONFIG_ARM_LPAE | ||
414 | mov r5, #0 | ||
415 | mcrr p15, 0, r4, r5, c2 @ load TTBR0 | ||
416 | #else | ||
377 | mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ | 417 | mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ |
378 | domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ | 418 | domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ |
379 | domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \ | 419 | domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \ |
380 | domain_val(DOMAIN_IO, DOMAIN_CLIENT)) | 420 | domain_val(DOMAIN_IO, DOMAIN_CLIENT)) |
381 | mcr p15, 0, r5, c3, c0, 0 @ load domain access register | 421 | mcr p15, 0, r5, c3, c0, 0 @ load domain access register |
382 | mcr p15, 0, r4, c2, c0, 0 @ load page table pointer | 422 | mcr p15, 0, r4, c2, c0, 0 @ load page table pointer |
423 | #endif | ||
383 | b __turn_mmu_on | 424 | b __turn_mmu_on |
384 | ENDPROC(__enable_mmu) | 425 | ENDPROC(__enable_mmu) |
385 | 426 | ||
@@ -398,15 +439,19 @@ ENDPROC(__enable_mmu) | |||
398 | * other registers depend on the function called upon completion | 439 | * other registers depend on the function called upon completion |
399 | */ | 440 | */ |
400 | .align 5 | 441 | .align 5 |
401 | __turn_mmu_on: | 442 | .pushsection .idmap.text, "ax" |
443 | ENTRY(__turn_mmu_on) | ||
402 | mov r0, r0 | 444 | mov r0, r0 |
445 | instr_sync | ||
403 | mcr p15, 0, r0, c1, c0, 0 @ write control reg | 446 | mcr p15, 0, r0, c1, c0, 0 @ write control reg |
404 | mrc p15, 0, r3, c0, c0, 0 @ read id reg | 447 | mrc p15, 0, r3, c0, c0, 0 @ read id reg |
448 | instr_sync | ||
405 | mov r3, r3 | 449 | mov r3, r3 |
406 | mov r3, r13 | 450 | mov r3, r13 |
407 | mov pc, r3 | 451 | mov pc, r3 |
408 | __enable_mmu_end: | 452 | __turn_mmu_on_end: |
409 | ENDPROC(__turn_mmu_on) | 453 | ENDPROC(__turn_mmu_on) |
454 | .popsection | ||
410 | 455 | ||
411 | 456 | ||
412 | #ifdef CONFIG_SMP_ON_UP | 457 | #ifdef CONFIG_SMP_ON_UP |
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 814a52a9dc39..d6a95ef9131d 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
@@ -1016,10 +1016,10 @@ static int __init arch_hw_breakpoint_init(void) | |||
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | /* Register debug fault handler. */ | 1018 | /* Register debug fault handler. */ |
1019 | hook_fault_code(2, hw_breakpoint_pending, SIGTRAP, TRAP_HWBKPT, | 1019 | hook_fault_code(FAULT_CODE_DEBUG, hw_breakpoint_pending, SIGTRAP, |
1020 | "watchpoint debug exception"); | 1020 | TRAP_HWBKPT, "watchpoint debug exception"); |
1021 | hook_ifault_code(2, hw_breakpoint_pending, SIGTRAP, TRAP_HWBKPT, | 1021 | hook_ifault_code(FAULT_CODE_DEBUG, hw_breakpoint_pending, SIGTRAP, |
1022 | "breakpoint debug exception"); | 1022 | TRAP_HWBKPT, "breakpoint debug exception"); |
1023 | 1023 | ||
1024 | /* Register hotplug notifier. */ | 1024 | /* Register hotplug notifier. */ |
1025 | register_cpu_notifier(&dbg_reset_nb); | 1025 | register_cpu_notifier(&dbg_reset_nb); |
diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/kernel/kprobes-test.c index e17cdd6d90d8..1862d8f2fd44 100644 --- a/arch/arm/kernel/kprobes-test.c +++ b/arch/arm/kernel/kprobes-test.c | |||
@@ -202,6 +202,8 @@ | |||
202 | #include <linux/slab.h> | 202 | #include <linux/slab.h> |
203 | #include <linux/kprobes.h> | 203 | #include <linux/kprobes.h> |
204 | 204 | ||
205 | #include <asm/opcodes.h> | ||
206 | |||
205 | #include "kprobes.h" | 207 | #include "kprobes.h" |
206 | #include "kprobes-test.h" | 208 | #include "kprobes-test.h" |
207 | 209 | ||
@@ -1050,65 +1052,9 @@ static int test_instance; | |||
1050 | 1052 | ||
1051 | static unsigned long test_check_cc(int cc, unsigned long cpsr) | 1053 | static unsigned long test_check_cc(int cc, unsigned long cpsr) |
1052 | { | 1054 | { |
1053 | unsigned long temp; | 1055 | int ret = arm_check_condition(cc << 28, cpsr); |
1054 | |||
1055 | switch (cc) { | ||
1056 | case 0x0: /* eq */ | ||
1057 | return cpsr & PSR_Z_BIT; | ||
1058 | |||
1059 | case 0x1: /* ne */ | ||
1060 | return (~cpsr) & PSR_Z_BIT; | ||
1061 | |||
1062 | case 0x2: /* cs */ | ||
1063 | return cpsr & PSR_C_BIT; | ||
1064 | |||
1065 | case 0x3: /* cc */ | ||
1066 | return (~cpsr) & PSR_C_BIT; | ||
1067 | |||
1068 | case 0x4: /* mi */ | ||
1069 | return cpsr & PSR_N_BIT; | ||
1070 | |||
1071 | case 0x5: /* pl */ | ||
1072 | return (~cpsr) & PSR_N_BIT; | ||
1073 | |||
1074 | case 0x6: /* vs */ | ||
1075 | return cpsr & PSR_V_BIT; | ||
1076 | |||
1077 | case 0x7: /* vc */ | ||
1078 | return (~cpsr) & PSR_V_BIT; | ||
1079 | 1056 | ||
1080 | case 0x8: /* hi */ | 1057 | return (ret != ARM_OPCODE_CONDTEST_FAIL); |
1081 | cpsr &= ~(cpsr >> 1); /* PSR_C_BIT &= ~PSR_Z_BIT */ | ||
1082 | return cpsr & PSR_C_BIT; | ||
1083 | |||
1084 | case 0x9: /* ls */ | ||
1085 | cpsr &= ~(cpsr >> 1); /* PSR_C_BIT &= ~PSR_Z_BIT */ | ||
1086 | return (~cpsr) & PSR_C_BIT; | ||
1087 | |||
1088 | case 0xa: /* ge */ | ||
1089 | cpsr ^= (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */ | ||
1090 | return (~cpsr) & PSR_N_BIT; | ||
1091 | |||
1092 | case 0xb: /* lt */ | ||
1093 | cpsr ^= (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */ | ||
1094 | return cpsr & PSR_N_BIT; | ||
1095 | |||
1096 | case 0xc: /* gt */ | ||
1097 | temp = cpsr ^ (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */ | ||
1098 | temp |= (cpsr << 1); /* PSR_N_BIT |= PSR_Z_BIT */ | ||
1099 | return (~temp) & PSR_N_BIT; | ||
1100 | |||
1101 | case 0xd: /* le */ | ||
1102 | temp = cpsr ^ (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */ | ||
1103 | temp |= (cpsr << 1); /* PSR_N_BIT |= PSR_Z_BIT */ | ||
1104 | return temp & PSR_N_BIT; | ||
1105 | |||
1106 | case 0xe: /* al */ | ||
1107 | case 0xf: /* unconditional */ | ||
1108 | return true; | ||
1109 | } | ||
1110 | BUG(); | ||
1111 | return false; | ||
1112 | } | 1058 | } |
1113 | 1059 | ||
1114 | static int is_last_scenario; | 1060 | static int is_last_scenario; |
@@ -1128,7 +1074,9 @@ static unsigned long test_context_cpsr(int scenario) | |||
1128 | 1074 | ||
1129 | if (!test_case_is_thumb) { | 1075 | if (!test_case_is_thumb) { |
1130 | /* Testing ARM code */ | 1076 | /* Testing ARM code */ |
1131 | probe_should_run = test_check_cc(current_instruction >> 28, cpsr) != 0; | 1077 | int cc = current_instruction >> 28; |
1078 | |||
1079 | probe_should_run = test_check_cc(cc, cpsr) != 0; | ||
1132 | if (scenario == 15) | 1080 | if (scenario == 15) |
1133 | is_last_scenario = true; | 1081 | is_last_scenario = true; |
1134 | 1082 | ||
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 29620b632ed9..764bd456d84f 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -12,12 +12,11 @@ | |||
12 | #include <asm/mmu_context.h> | 12 | #include <asm/mmu_context.h> |
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
15 | #include <asm/system.h> | ||
15 | 16 | ||
16 | extern const unsigned char relocate_new_kernel[]; | 17 | extern const unsigned char relocate_new_kernel[]; |
17 | extern const unsigned int relocate_new_kernel_size; | 18 | extern const unsigned int relocate_new_kernel_size; |
18 | 19 | ||
19 | extern void setup_mm_for_reboot(void); | ||
20 | |||
21 | extern unsigned long kexec_start_address; | 20 | extern unsigned long kexec_start_address; |
22 | extern unsigned long kexec_indirection_page; | 21 | extern unsigned long kexec_indirection_page; |
23 | extern unsigned long kexec_mach_type; | 22 | extern unsigned long kexec_mach_type; |
@@ -111,14 +110,6 @@ void machine_kexec(struct kimage *image) | |||
111 | 110 | ||
112 | if (kexec_reinit) | 111 | if (kexec_reinit) |
113 | kexec_reinit(); | 112 | kexec_reinit(); |
114 | local_irq_disable(); | 113 | |
115 | local_fiq_disable(); | 114 | soft_restart(reboot_code_buffer_phys); |
116 | setup_mm_for_reboot(); | ||
117 | flush_cache_all(); | ||
118 | outer_flush_all(); | ||
119 | outer_disable(); | ||
120 | cpu_proc_fin(); | ||
121 | outer_inv_all(); | ||
122 | flush_cache_all(); | ||
123 | cpu_reset(reboot_code_buffer_phys); | ||
124 | } | 115 | } |
diff --git a/arch/arm/kernel/opcodes.c b/arch/arm/kernel/opcodes.c new file mode 100644 index 000000000000..f8179c6a817f --- /dev/null +++ b/arch/arm/kernel/opcodes.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/opcodes.c | ||
3 | * | ||
4 | * A32 condition code lookup feature moved from nwfpe/fpopcode.c | ||
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 | |||
11 | #include <linux/module.h> | ||
12 | #include <asm/opcodes.h> | ||
13 | |||
14 | #define ARM_OPCODE_CONDITION_UNCOND 0xf | ||
15 | |||
16 | /* | ||
17 | * condition code lookup table | ||
18 | * index into the table is test code: EQ, NE, ... LT, GT, AL, NV | ||
19 | * | ||
20 | * bit position in short is condition code: NZCV | ||
21 | */ | ||
22 | static const unsigned short cc_map[16] = { | ||
23 | 0xF0F0, /* EQ == Z set */ | ||
24 | 0x0F0F, /* NE */ | ||
25 | 0xCCCC, /* CS == C set */ | ||
26 | 0x3333, /* CC */ | ||
27 | 0xFF00, /* MI == N set */ | ||
28 | 0x00FF, /* PL */ | ||
29 | 0xAAAA, /* VS == V set */ | ||
30 | 0x5555, /* VC */ | ||
31 | 0x0C0C, /* HI == C set && Z clear */ | ||
32 | 0xF3F3, /* LS == C clear || Z set */ | ||
33 | 0xAA55, /* GE == (N==V) */ | ||
34 | 0x55AA, /* LT == (N!=V) */ | ||
35 | 0x0A05, /* GT == (!Z && (N==V)) */ | ||
36 | 0xF5FA, /* LE == (Z || (N!=V)) */ | ||
37 | 0xFFFF, /* AL always */ | ||
38 | 0 /* NV */ | ||
39 | }; | ||
40 | |||
41 | /* | ||
42 | * Returns: | ||
43 | * ARM_OPCODE_CONDTEST_FAIL - if condition fails | ||
44 | * ARM_OPCODE_CONDTEST_PASS - if condition passes (including AL) | ||
45 | * ARM_OPCODE_CONDTEST_UNCOND - if NV condition, or separate unconditional | ||
46 | * opcode space from v5 onwards | ||
47 | * | ||
48 | * Code that tests whether a conditional instruction would pass its condition | ||
49 | * check should check that return value == ARM_OPCODE_CONDTEST_PASS. | ||
50 | * | ||
51 | * Code that tests if a condition means that the instruction would be executed | ||
52 | * (regardless of conditional or unconditional) should instead check that the | ||
53 | * return value != ARM_OPCODE_CONDTEST_FAIL. | ||
54 | */ | ||
55 | asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr) | ||
56 | { | ||
57 | u32 cc_bits = opcode >> 28; | ||
58 | u32 psr_cond = psr >> 28; | ||
59 | unsigned int ret; | ||
60 | |||
61 | if (cc_bits != ARM_OPCODE_CONDITION_UNCOND) { | ||
62 | if ((cc_map[cc_bits] >> (psr_cond)) & 1) | ||
63 | ret = ARM_OPCODE_CONDTEST_PASS; | ||
64 | else | ||
65 | ret = ARM_OPCODE_CONDTEST_FAIL; | ||
66 | } else { | ||
67 | ret = ARM_OPCODE_CONDTEST_UNCOND; | ||
68 | } | ||
69 | |||
70 | return ret; | ||
71 | } | ||
72 | EXPORT_SYMBOL_GPL(arm_check_condition); | ||
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 88b0941ce51e..5bb91bf3d47f 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -59,8 +59,7 @@ armpmu_get_pmu_id(void) | |||
59 | } | 59 | } |
60 | EXPORT_SYMBOL_GPL(armpmu_get_pmu_id); | 60 | EXPORT_SYMBOL_GPL(armpmu_get_pmu_id); |
61 | 61 | ||
62 | int | 62 | int perf_num_counters(void) |
63 | armpmu_get_max_events(void) | ||
64 | { | 63 | { |
65 | int max_events = 0; | 64 | int max_events = 0; |
66 | 65 | ||
@@ -69,12 +68,6 @@ armpmu_get_max_events(void) | |||
69 | 68 | ||
70 | return max_events; | 69 | return max_events; |
71 | } | 70 | } |
72 | EXPORT_SYMBOL_GPL(armpmu_get_max_events); | ||
73 | |||
74 | int perf_num_counters(void) | ||
75 | { | ||
76 | return armpmu_get_max_events(); | ||
77 | } | ||
78 | EXPORT_SYMBOL_GPL(perf_num_counters); | 71 | EXPORT_SYMBOL_GPL(perf_num_counters); |
79 | 72 | ||
80 | #define HW_OP_UNSUPPORTED 0xFFFF | 73 | #define HW_OP_UNSUPPORTED 0xFFFF |
@@ -380,6 +373,8 @@ armpmu_release_hardware(struct arm_pmu *armpmu) | |||
380 | { | 373 | { |
381 | int i, irq, irqs; | 374 | int i, irq, irqs; |
382 | struct platform_device *pmu_device = armpmu->plat_device; | 375 | struct platform_device *pmu_device = armpmu->plat_device; |
376 | struct arm_pmu_platdata *plat = | ||
377 | dev_get_platdata(&pmu_device->dev); | ||
383 | 378 | ||
384 | irqs = min(pmu_device->num_resources, num_possible_cpus()); | 379 | irqs = min(pmu_device->num_resources, num_possible_cpus()); |
385 | 380 | ||
@@ -387,8 +382,11 @@ armpmu_release_hardware(struct arm_pmu *armpmu) | |||
387 | if (!cpumask_test_and_clear_cpu(i, &armpmu->active_irqs)) | 382 | if (!cpumask_test_and_clear_cpu(i, &armpmu->active_irqs)) |
388 | continue; | 383 | continue; |
389 | irq = platform_get_irq(pmu_device, i); | 384 | irq = platform_get_irq(pmu_device, i); |
390 | if (irq >= 0) | 385 | if (irq >= 0) { |
386 | if (plat && plat->disable_irq) | ||
387 | plat->disable_irq(irq); | ||
391 | free_irq(irq, armpmu); | 388 | free_irq(irq, armpmu); |
389 | } | ||
392 | } | 390 | } |
393 | 391 | ||
394 | release_pmu(armpmu->type); | 392 | release_pmu(armpmu->type); |
@@ -448,7 +446,8 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu) | |||
448 | irq); | 446 | irq); |
449 | armpmu_release_hardware(armpmu); | 447 | armpmu_release_hardware(armpmu); |
450 | return err; | 448 | return err; |
451 | } | 449 | } else if (plat && plat->enable_irq) |
450 | plat->enable_irq(irq); | ||
452 | 451 | ||
453 | cpumask_set_cpu(i, &armpmu->active_irqs); | 452 | cpumask_set_cpu(i, &armpmu->active_irqs); |
454 | } | 453 | } |
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c index e63d8115c01b..533be9930ec2 100644 --- a/arch/arm/kernel/perf_event_v6.c +++ b/arch/arm/kernel/perf_event_v6.c | |||
@@ -65,13 +65,15 @@ enum armv6_counters { | |||
65 | * accesses/misses in hardware. | 65 | * accesses/misses in hardware. |
66 | */ | 66 | */ |
67 | static const unsigned armv6_perf_map[PERF_COUNT_HW_MAX] = { | 67 | static const unsigned armv6_perf_map[PERF_COUNT_HW_MAX] = { |
68 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV6_PERFCTR_CPU_CYCLES, | 68 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV6_PERFCTR_CPU_CYCLES, |
69 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV6_PERFCTR_INSTR_EXEC, | 69 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV6_PERFCTR_INSTR_EXEC, |
70 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 70 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, |
71 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 71 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, |
72 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6_PERFCTR_BR_EXEC, | 72 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6_PERFCTR_BR_EXEC, |
73 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV6_PERFCTR_BR_MISPREDICT, | 73 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV6_PERFCTR_BR_MISPREDICT, |
74 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, | 74 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
75 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV6_PERFCTR_IBUF_STALL, | ||
76 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV6_PERFCTR_LSU_FULL_STALL, | ||
75 | }; | 77 | }; |
76 | 78 | ||
77 | static const unsigned armv6_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 79 | static const unsigned armv6_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -218,13 +220,15 @@ enum armv6mpcore_perf_types { | |||
218 | * accesses/misses in hardware. | 220 | * accesses/misses in hardware. |
219 | */ | 221 | */ |
220 | static const unsigned armv6mpcore_perf_map[PERF_COUNT_HW_MAX] = { | 222 | static const unsigned armv6mpcore_perf_map[PERF_COUNT_HW_MAX] = { |
221 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV6MPCORE_PERFCTR_CPU_CYCLES, | 223 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV6MPCORE_PERFCTR_CPU_CYCLES, |
222 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_INSTR_EXEC, | 224 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_INSTR_EXEC, |
223 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 225 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, |
224 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 226 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, |
225 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_BR_EXEC, | 227 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_BR_EXEC, |
226 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV6MPCORE_PERFCTR_BR_MISPREDICT, | 228 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV6MPCORE_PERFCTR_BR_MISPREDICT, |
227 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, | 229 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
230 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV6MPCORE_PERFCTR_IBUF_STALL, | ||
231 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV6MPCORE_PERFCTR_LSU_FULL_STALL, | ||
228 | }; | 232 | }; |
229 | 233 | ||
230 | static const unsigned armv6mpcore_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 234 | static const unsigned armv6mpcore_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 1ef6d0034b85..460bbbb6b885 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -28,165 +28,87 @@ static struct arm_pmu armv7pmu; | |||
28 | * they are not available. | 28 | * they are not available. |
29 | */ | 29 | */ |
30 | enum armv7_perf_types { | 30 | enum armv7_perf_types { |
31 | ARMV7_PERFCTR_PMNC_SW_INCR = 0x00, | 31 | ARMV7_PERFCTR_PMNC_SW_INCR = 0x00, |
32 | ARMV7_PERFCTR_IFETCH_MISS = 0x01, | 32 | ARMV7_PERFCTR_L1_ICACHE_REFILL = 0x01, |
33 | ARMV7_PERFCTR_ITLB_MISS = 0x02, | 33 | ARMV7_PERFCTR_ITLB_REFILL = 0x02, |
34 | ARMV7_PERFCTR_DCACHE_REFILL = 0x03, /* L1 */ | 34 | ARMV7_PERFCTR_L1_DCACHE_REFILL = 0x03, |
35 | ARMV7_PERFCTR_DCACHE_ACCESS = 0x04, /* L1 */ | 35 | ARMV7_PERFCTR_L1_DCACHE_ACCESS = 0x04, |
36 | ARMV7_PERFCTR_DTLB_REFILL = 0x05, | 36 | ARMV7_PERFCTR_DTLB_REFILL = 0x05, |
37 | ARMV7_PERFCTR_DREAD = 0x06, | 37 | ARMV7_PERFCTR_MEM_READ = 0x06, |
38 | ARMV7_PERFCTR_DWRITE = 0x07, | 38 | ARMV7_PERFCTR_MEM_WRITE = 0x07, |
39 | ARMV7_PERFCTR_INSTR_EXECUTED = 0x08, | 39 | ARMV7_PERFCTR_INSTR_EXECUTED = 0x08, |
40 | ARMV7_PERFCTR_EXC_TAKEN = 0x09, | 40 | ARMV7_PERFCTR_EXC_TAKEN = 0x09, |
41 | ARMV7_PERFCTR_EXC_EXECUTED = 0x0A, | 41 | ARMV7_PERFCTR_EXC_EXECUTED = 0x0A, |
42 | ARMV7_PERFCTR_CID_WRITE = 0x0B, | 42 | ARMV7_PERFCTR_CID_WRITE = 0x0B, |
43 | /* ARMV7_PERFCTR_PC_WRITE is equivalent to HW_BRANCH_INSTRUCTIONS. | 43 | |
44 | /* | ||
45 | * ARMV7_PERFCTR_PC_WRITE is equivalent to HW_BRANCH_INSTRUCTIONS. | ||
44 | * It counts: | 46 | * It counts: |
45 | * - all branch instructions, | 47 | * - all (taken) branch instructions, |
46 | * - instructions that explicitly write the PC, | 48 | * - instructions that explicitly write the PC, |
47 | * - exception generating instructions. | 49 | * - exception generating instructions. |
48 | */ | 50 | */ |
49 | ARMV7_PERFCTR_PC_WRITE = 0x0C, | 51 | ARMV7_PERFCTR_PC_WRITE = 0x0C, |
50 | ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D, | 52 | ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D, |
51 | ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E, | 53 | ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E, |
52 | ARMV7_PERFCTR_UNALIGNED_ACCESS = 0x0F, | 54 | ARMV7_PERFCTR_MEM_UNALIGNED_ACCESS = 0x0F, |
55 | ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10, | ||
56 | ARMV7_PERFCTR_CLOCK_CYCLES = 0x11, | ||
57 | ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12, | ||
53 | 58 | ||
54 | /* These events are defined by the PMUv2 supplement (ARM DDI 0457A). */ | 59 | /* These events are defined by the PMUv2 supplement (ARM DDI 0457A). */ |
55 | ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10, | 60 | ARMV7_PERFCTR_MEM_ACCESS = 0x13, |
56 | ARMV7_PERFCTR_CLOCK_CYCLES = 0x11, | 61 | ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14, |
57 | ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12, | 62 | ARMV7_PERFCTR_L1_DCACHE_WB = 0x15, |
58 | ARMV7_PERFCTR_MEM_ACCESS = 0x13, | 63 | ARMV7_PERFCTR_L2_CACHE_ACCESS = 0x16, |
59 | ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14, | 64 | ARMV7_PERFCTR_L2_CACHE_REFILL = 0x17, |
60 | ARMV7_PERFCTR_L1_DCACHE_WB = 0x15, | 65 | ARMV7_PERFCTR_L2_CACHE_WB = 0x18, |
61 | ARMV7_PERFCTR_L2_DCACHE_ACCESS = 0x16, | 66 | ARMV7_PERFCTR_BUS_ACCESS = 0x19, |
62 | ARMV7_PERFCTR_L2_DCACHE_REFILL = 0x17, | 67 | ARMV7_PERFCTR_MEM_ERROR = 0x1A, |
63 | ARMV7_PERFCTR_L2_DCACHE_WB = 0x18, | 68 | ARMV7_PERFCTR_INSTR_SPEC = 0x1B, |
64 | ARMV7_PERFCTR_BUS_ACCESS = 0x19, | 69 | ARMV7_PERFCTR_TTBR_WRITE = 0x1C, |
65 | ARMV7_PERFCTR_MEMORY_ERROR = 0x1A, | 70 | ARMV7_PERFCTR_BUS_CYCLES = 0x1D, |
66 | ARMV7_PERFCTR_INSTR_SPEC = 0x1B, | 71 | |
67 | ARMV7_PERFCTR_TTBR_WRITE = 0x1C, | 72 | ARMV7_PERFCTR_CPU_CYCLES = 0xFF |
68 | ARMV7_PERFCTR_BUS_CYCLES = 0x1D, | ||
69 | |||
70 | ARMV7_PERFCTR_CPU_CYCLES = 0xFF | ||
71 | }; | 73 | }; |
72 | 74 | ||
73 | /* ARMv7 Cortex-A8 specific event types */ | 75 | /* ARMv7 Cortex-A8 specific event types */ |
74 | enum armv7_a8_perf_types { | 76 | enum armv7_a8_perf_types { |
75 | ARMV7_PERFCTR_WRITE_BUFFER_FULL = 0x40, | 77 | ARMV7_A8_PERFCTR_L2_CACHE_ACCESS = 0x43, |
76 | ARMV7_PERFCTR_L2_STORE_MERGED = 0x41, | 78 | ARMV7_A8_PERFCTR_L2_CACHE_REFILL = 0x44, |
77 | ARMV7_PERFCTR_L2_STORE_BUFF = 0x42, | 79 | ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS = 0x50, |
78 | ARMV7_PERFCTR_L2_ACCESS = 0x43, | 80 | ARMV7_A8_PERFCTR_STALL_ISIDE = 0x56, |
79 | ARMV7_PERFCTR_L2_CACH_MISS = 0x44, | ||
80 | ARMV7_PERFCTR_AXI_READ_CYCLES = 0x45, | ||
81 | ARMV7_PERFCTR_AXI_WRITE_CYCLES = 0x46, | ||
82 | ARMV7_PERFCTR_MEMORY_REPLAY = 0x47, | ||
83 | ARMV7_PERFCTR_UNALIGNED_ACCESS_REPLAY = 0x48, | ||
84 | ARMV7_PERFCTR_L1_DATA_MISS = 0x49, | ||
85 | ARMV7_PERFCTR_L1_INST_MISS = 0x4A, | ||
86 | ARMV7_PERFCTR_L1_DATA_COLORING = 0x4B, | ||
87 | ARMV7_PERFCTR_L1_NEON_DATA = 0x4C, | ||
88 | ARMV7_PERFCTR_L1_NEON_CACH_DATA = 0x4D, | ||
89 | ARMV7_PERFCTR_L2_NEON = 0x4E, | ||
90 | ARMV7_PERFCTR_L2_NEON_HIT = 0x4F, | ||
91 | ARMV7_PERFCTR_L1_INST = 0x50, | ||
92 | ARMV7_PERFCTR_PC_RETURN_MIS_PRED = 0x51, | ||
93 | ARMV7_PERFCTR_PC_BRANCH_FAILED = 0x52, | ||
94 | ARMV7_PERFCTR_PC_BRANCH_TAKEN = 0x53, | ||
95 | ARMV7_PERFCTR_PC_BRANCH_EXECUTED = 0x54, | ||
96 | ARMV7_PERFCTR_OP_EXECUTED = 0x55, | ||
97 | ARMV7_PERFCTR_CYCLES_INST_STALL = 0x56, | ||
98 | ARMV7_PERFCTR_CYCLES_INST = 0x57, | ||
99 | ARMV7_PERFCTR_CYCLES_NEON_DATA_STALL = 0x58, | ||
100 | ARMV7_PERFCTR_CYCLES_NEON_INST_STALL = 0x59, | ||
101 | ARMV7_PERFCTR_NEON_CYCLES = 0x5A, | ||
102 | |||
103 | ARMV7_PERFCTR_PMU0_EVENTS = 0x70, | ||
104 | ARMV7_PERFCTR_PMU1_EVENTS = 0x71, | ||
105 | ARMV7_PERFCTR_PMU_EVENTS = 0x72, | ||
106 | }; | 81 | }; |
107 | 82 | ||
108 | /* ARMv7 Cortex-A9 specific event types */ | 83 | /* ARMv7 Cortex-A9 specific event types */ |
109 | enum armv7_a9_perf_types { | 84 | enum armv7_a9_perf_types { |
110 | ARMV7_PERFCTR_JAVA_HW_BYTECODE_EXEC = 0x40, | 85 | ARMV7_A9_PERFCTR_INSTR_CORE_RENAME = 0x68, |
111 | ARMV7_PERFCTR_JAVA_SW_BYTECODE_EXEC = 0x41, | 86 | ARMV7_A9_PERFCTR_STALL_ICACHE = 0x60, |
112 | ARMV7_PERFCTR_JAZELLE_BRANCH_EXEC = 0x42, | 87 | ARMV7_A9_PERFCTR_STALL_DISPATCH = 0x66, |
113 | |||
114 | ARMV7_PERFCTR_COHERENT_LINE_MISS = 0x50, | ||
115 | ARMV7_PERFCTR_COHERENT_LINE_HIT = 0x51, | ||
116 | |||
117 | ARMV7_PERFCTR_ICACHE_DEP_STALL_CYCLES = 0x60, | ||
118 | ARMV7_PERFCTR_DCACHE_DEP_STALL_CYCLES = 0x61, | ||
119 | ARMV7_PERFCTR_TLB_MISS_DEP_STALL_CYCLES = 0x62, | ||
120 | ARMV7_PERFCTR_STREX_EXECUTED_PASSED = 0x63, | ||
121 | ARMV7_PERFCTR_STREX_EXECUTED_FAILED = 0x64, | ||
122 | ARMV7_PERFCTR_DATA_EVICTION = 0x65, | ||
123 | ARMV7_PERFCTR_ISSUE_STAGE_NO_INST = 0x66, | ||
124 | ARMV7_PERFCTR_ISSUE_STAGE_EMPTY = 0x67, | ||
125 | ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE = 0x68, | ||
126 | |||
127 | ARMV7_PERFCTR_PREDICTABLE_FUNCT_RETURNS = 0x6E, | ||
128 | |||
129 | ARMV7_PERFCTR_MAIN_UNIT_EXECUTED_INST = 0x70, | ||
130 | ARMV7_PERFCTR_SECOND_UNIT_EXECUTED_INST = 0x71, | ||
131 | ARMV7_PERFCTR_LD_ST_UNIT_EXECUTED_INST = 0x72, | ||
132 | ARMV7_PERFCTR_FP_EXECUTED_INST = 0x73, | ||
133 | ARMV7_PERFCTR_NEON_EXECUTED_INST = 0x74, | ||
134 | |||
135 | ARMV7_PERFCTR_PLD_FULL_DEP_STALL_CYCLES = 0x80, | ||
136 | ARMV7_PERFCTR_DATA_WR_DEP_STALL_CYCLES = 0x81, | ||
137 | ARMV7_PERFCTR_ITLB_MISS_DEP_STALL_CYCLES = 0x82, | ||
138 | ARMV7_PERFCTR_DTLB_MISS_DEP_STALL_CYCLES = 0x83, | ||
139 | ARMV7_PERFCTR_MICRO_ITLB_MISS_DEP_STALL_CYCLES = 0x84, | ||
140 | ARMV7_PERFCTR_MICRO_DTLB_MISS_DEP_STALL_CYCLES = 0x85, | ||
141 | ARMV7_PERFCTR_DMB_DEP_STALL_CYCLES = 0x86, | ||
142 | |||
143 | ARMV7_PERFCTR_INTGR_CLK_ENABLED_CYCLES = 0x8A, | ||
144 | ARMV7_PERFCTR_DATA_ENGINE_CLK_EN_CYCLES = 0x8B, | ||
145 | |||
146 | ARMV7_PERFCTR_ISB_INST = 0x90, | ||
147 | ARMV7_PERFCTR_DSB_INST = 0x91, | ||
148 | ARMV7_PERFCTR_DMB_INST = 0x92, | ||
149 | ARMV7_PERFCTR_EXT_INTERRUPTS = 0x93, | ||
150 | |||
151 | ARMV7_PERFCTR_PLE_CACHE_LINE_RQST_COMPLETED = 0xA0, | ||
152 | ARMV7_PERFCTR_PLE_CACHE_LINE_RQST_SKIPPED = 0xA1, | ||
153 | ARMV7_PERFCTR_PLE_FIFO_FLUSH = 0xA2, | ||
154 | ARMV7_PERFCTR_PLE_RQST_COMPLETED = 0xA3, | ||
155 | ARMV7_PERFCTR_PLE_FIFO_OVERFLOW = 0xA4, | ||
156 | ARMV7_PERFCTR_PLE_RQST_PROG = 0xA5 | ||
157 | }; | 88 | }; |
158 | 89 | ||
159 | /* ARMv7 Cortex-A5 specific event types */ | 90 | /* ARMv7 Cortex-A5 specific event types */ |
160 | enum armv7_a5_perf_types { | 91 | enum armv7_a5_perf_types { |
161 | ARMV7_PERFCTR_IRQ_TAKEN = 0x86, | 92 | ARMV7_A5_PERFCTR_PREFETCH_LINEFILL = 0xc2, |
162 | ARMV7_PERFCTR_FIQ_TAKEN = 0x87, | 93 | ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3, |
163 | |||
164 | ARMV7_PERFCTR_EXT_MEM_RQST = 0xc0, | ||
165 | ARMV7_PERFCTR_NC_EXT_MEM_RQST = 0xc1, | ||
166 | ARMV7_PERFCTR_PREFETCH_LINEFILL = 0xc2, | ||
167 | ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3, | ||
168 | ARMV7_PERFCTR_ENTER_READ_ALLOC = 0xc4, | ||
169 | ARMV7_PERFCTR_READ_ALLOC = 0xc5, | ||
170 | |||
171 | ARMV7_PERFCTR_STALL_SB_FULL = 0xc9, | ||
172 | }; | 94 | }; |
173 | 95 | ||
174 | /* ARMv7 Cortex-A15 specific event types */ | 96 | /* ARMv7 Cortex-A15 specific event types */ |
175 | enum armv7_a15_perf_types { | 97 | enum armv7_a15_perf_types { |
176 | ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS = 0x40, | 98 | ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ = 0x40, |
177 | ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS = 0x41, | 99 | ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE = 0x41, |
178 | ARMV7_PERFCTR_L1_DCACHE_READ_REFILL = 0x42, | 100 | ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ = 0x42, |
179 | ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL = 0x43, | 101 | ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_WRITE = 0x43, |
180 | 102 | ||
181 | ARMV7_PERFCTR_L1_DTLB_READ_REFILL = 0x4C, | 103 | ARMV7_A15_PERFCTR_DTLB_REFILL_L1_READ = 0x4C, |
182 | ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL = 0x4D, | 104 | ARMV7_A15_PERFCTR_DTLB_REFILL_L1_WRITE = 0x4D, |
183 | 105 | ||
184 | ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS = 0x50, | 106 | ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_READ = 0x50, |
185 | ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS = 0x51, | 107 | ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_WRITE = 0x51, |
186 | ARMV7_PERFCTR_L2_DCACHE_READ_REFILL = 0x52, | 108 | ARMV7_A15_PERFCTR_L2_CACHE_REFILL_READ = 0x52, |
187 | ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL = 0x53, | 109 | ARMV7_A15_PERFCTR_L2_CACHE_REFILL_WRITE = 0x53, |
188 | 110 | ||
189 | ARMV7_PERFCTR_SPEC_PC_WRITE = 0x76, | 111 | ARMV7_A15_PERFCTR_PC_WRITE_SPEC = 0x76, |
190 | }; | 112 | }; |
191 | 113 | ||
192 | /* | 114 | /* |
@@ -197,13 +119,15 @@ enum armv7_a15_perf_types { | |||
197 | * accesses/misses in hardware. | 119 | * accesses/misses in hardware. |
198 | */ | 120 | */ |
199 | static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] = { | 121 | static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] = { |
200 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 122 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
201 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, | 123 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, |
202 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 124 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
203 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 125 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
204 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, | 126 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, |
205 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 127 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
206 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, | 128 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
129 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A8_PERFCTR_STALL_ISIDE, | ||
130 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, | ||
207 | }; | 131 | }; |
208 | 132 | ||
209 | static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 133 | static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -217,12 +141,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
217 | * combined. | 141 | * combined. |
218 | */ | 142 | */ |
219 | [C(OP_READ)] = { | 143 | [C(OP_READ)] = { |
220 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, | 144 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
221 | [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, | 145 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
222 | }, | 146 | }, |
223 | [C(OP_WRITE)] = { | 147 | [C(OP_WRITE)] = { |
224 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, | 148 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
225 | [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, | 149 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
226 | }, | 150 | }, |
227 | [C(OP_PREFETCH)] = { | 151 | [C(OP_PREFETCH)] = { |
228 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 152 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -231,12 +155,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
231 | }, | 155 | }, |
232 | [C(L1I)] = { | 156 | [C(L1I)] = { |
233 | [C(OP_READ)] = { | 157 | [C(OP_READ)] = { |
234 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_INST, | 158 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, |
235 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_INST_MISS, | 159 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
236 | }, | 160 | }, |
237 | [C(OP_WRITE)] = { | 161 | [C(OP_WRITE)] = { |
238 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_INST, | 162 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, |
239 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_INST_MISS, | 163 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
240 | }, | 164 | }, |
241 | [C(OP_PREFETCH)] = { | 165 | [C(OP_PREFETCH)] = { |
242 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 166 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -245,12 +169,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
245 | }, | 169 | }, |
246 | [C(LL)] = { | 170 | [C(LL)] = { |
247 | [C(OP_READ)] = { | 171 | [C(OP_READ)] = { |
248 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_ACCESS, | 172 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L2_CACHE_ACCESS, |
249 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACH_MISS, | 173 | [C(RESULT_MISS)] = ARMV7_A8_PERFCTR_L2_CACHE_REFILL, |
250 | }, | 174 | }, |
251 | [C(OP_WRITE)] = { | 175 | [C(OP_WRITE)] = { |
252 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_ACCESS, | 176 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L2_CACHE_ACCESS, |
253 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACH_MISS, | 177 | [C(RESULT_MISS)] = ARMV7_A8_PERFCTR_L2_CACHE_REFILL, |
254 | }, | 178 | }, |
255 | [C(OP_PREFETCH)] = { | 179 | [C(OP_PREFETCH)] = { |
256 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 180 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -274,11 +198,11 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
274 | [C(ITLB)] = { | 198 | [C(ITLB)] = { |
275 | [C(OP_READ)] = { | 199 | [C(OP_READ)] = { |
276 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 200 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
277 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 201 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
278 | }, | 202 | }, |
279 | [C(OP_WRITE)] = { | 203 | [C(OP_WRITE)] = { |
280 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 204 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
281 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 205 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
282 | }, | 206 | }, |
283 | [C(OP_PREFETCH)] = { | 207 | [C(OP_PREFETCH)] = { |
284 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 208 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -287,14 +211,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
287 | }, | 211 | }, |
288 | [C(BPU)] = { | 212 | [C(BPU)] = { |
289 | [C(OP_READ)] = { | 213 | [C(OP_READ)] = { |
290 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, | 214 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
291 | [C(RESULT_MISS)] | 215 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
292 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
293 | }, | 216 | }, |
294 | [C(OP_WRITE)] = { | 217 | [C(OP_WRITE)] = { |
295 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, | 218 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
296 | [C(RESULT_MISS)] | 219 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
297 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
298 | }, | 220 | }, |
299 | [C(OP_PREFETCH)] = { | 221 | [C(OP_PREFETCH)] = { |
300 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 222 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -321,14 +243,15 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
321 | * Cortex-A9 HW events mapping | 243 | * Cortex-A9 HW events mapping |
322 | */ | 244 | */ |
323 | static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] = { | 245 | static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] = { |
324 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 246 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
325 | [PERF_COUNT_HW_INSTRUCTIONS] = | 247 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_A9_PERFCTR_INSTR_CORE_RENAME, |
326 | ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE, | 248 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
327 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_DCACHE_ACCESS, | 249 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
328 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_DCACHE_REFILL, | 250 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, |
329 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, | 251 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
330 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 252 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
331 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, | 253 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A9_PERFCTR_STALL_ICACHE, |
254 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV7_A9_PERFCTR_STALL_DISPATCH, | ||
332 | }; | 255 | }; |
333 | 256 | ||
334 | static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 257 | static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -342,12 +265,12 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
342 | * combined. | 265 | * combined. |
343 | */ | 266 | */ |
344 | [C(OP_READ)] = { | 267 | [C(OP_READ)] = { |
345 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, | 268 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
346 | [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, | 269 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
347 | }, | 270 | }, |
348 | [C(OP_WRITE)] = { | 271 | [C(OP_WRITE)] = { |
349 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, | 272 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
350 | [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, | 273 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
351 | }, | 274 | }, |
352 | [C(OP_PREFETCH)] = { | 275 | [C(OP_PREFETCH)] = { |
353 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 276 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -357,11 +280,11 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
357 | [C(L1I)] = { | 280 | [C(L1I)] = { |
358 | [C(OP_READ)] = { | 281 | [C(OP_READ)] = { |
359 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 282 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
360 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 283 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
361 | }, | 284 | }, |
362 | [C(OP_WRITE)] = { | 285 | [C(OP_WRITE)] = { |
363 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 286 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
364 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 287 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
365 | }, | 288 | }, |
366 | [C(OP_PREFETCH)] = { | 289 | [C(OP_PREFETCH)] = { |
367 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 290 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -399,11 +322,11 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
399 | [C(ITLB)] = { | 322 | [C(ITLB)] = { |
400 | [C(OP_READ)] = { | 323 | [C(OP_READ)] = { |
401 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 324 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
402 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 325 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
403 | }, | 326 | }, |
404 | [C(OP_WRITE)] = { | 327 | [C(OP_WRITE)] = { |
405 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 328 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
406 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 329 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
407 | }, | 330 | }, |
408 | [C(OP_PREFETCH)] = { | 331 | [C(OP_PREFETCH)] = { |
409 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 332 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -412,14 +335,12 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
412 | }, | 335 | }, |
413 | [C(BPU)] = { | 336 | [C(BPU)] = { |
414 | [C(OP_READ)] = { | 337 | [C(OP_READ)] = { |
415 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, | 338 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
416 | [C(RESULT_MISS)] | 339 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
417 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
418 | }, | 340 | }, |
419 | [C(OP_WRITE)] = { | 341 | [C(OP_WRITE)] = { |
420 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, | 342 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
421 | [C(RESULT_MISS)] | 343 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
422 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
423 | }, | 344 | }, |
424 | [C(OP_PREFETCH)] = { | 345 | [C(OP_PREFETCH)] = { |
425 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 346 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -446,13 +367,15 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
446 | * Cortex-A5 HW events mapping | 367 | * Cortex-A5 HW events mapping |
447 | */ | 368 | */ |
448 | static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] = { | 369 | static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] = { |
449 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 370 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
450 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, | 371 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, |
451 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 372 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
452 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 373 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
453 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, | 374 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, |
454 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 375 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
455 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, | 376 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
377 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED, | ||
378 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, | ||
456 | }; | 379 | }; |
457 | 380 | ||
458 | static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 381 | static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -460,42 +383,34 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
460 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { | 383 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { |
461 | [C(L1D)] = { | 384 | [C(L1D)] = { |
462 | [C(OP_READ)] = { | 385 | [C(OP_READ)] = { |
463 | [C(RESULT_ACCESS)] | 386 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
464 | = ARMV7_PERFCTR_DCACHE_ACCESS, | 387 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
465 | [C(RESULT_MISS)] | ||
466 | = ARMV7_PERFCTR_DCACHE_REFILL, | ||
467 | }, | 388 | }, |
468 | [C(OP_WRITE)] = { | 389 | [C(OP_WRITE)] = { |
469 | [C(RESULT_ACCESS)] | 390 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
470 | = ARMV7_PERFCTR_DCACHE_ACCESS, | 391 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
471 | [C(RESULT_MISS)] | ||
472 | = ARMV7_PERFCTR_DCACHE_REFILL, | ||
473 | }, | 392 | }, |
474 | [C(OP_PREFETCH)] = { | 393 | [C(OP_PREFETCH)] = { |
475 | [C(RESULT_ACCESS)] | 394 | [C(RESULT_ACCESS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL, |
476 | = ARMV7_PERFCTR_PREFETCH_LINEFILL, | 395 | [C(RESULT_MISS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP, |
477 | [C(RESULT_MISS)] | ||
478 | = ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP, | ||
479 | }, | 396 | }, |
480 | }, | 397 | }, |
481 | [C(L1I)] = { | 398 | [C(L1I)] = { |
482 | [C(OP_READ)] = { | 399 | [C(OP_READ)] = { |
483 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 400 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, |
484 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 401 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
485 | }, | 402 | }, |
486 | [C(OP_WRITE)] = { | 403 | [C(OP_WRITE)] = { |
487 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 404 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, |
488 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 405 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
489 | }, | 406 | }, |
490 | /* | 407 | /* |
491 | * The prefetch counters don't differentiate between the I | 408 | * The prefetch counters don't differentiate between the I |
492 | * side and the D side. | 409 | * side and the D side. |
493 | */ | 410 | */ |
494 | [C(OP_PREFETCH)] = { | 411 | [C(OP_PREFETCH)] = { |
495 | [C(RESULT_ACCESS)] | 412 | [C(RESULT_ACCESS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL, |
496 | = ARMV7_PERFCTR_PREFETCH_LINEFILL, | 413 | [C(RESULT_MISS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP, |
497 | [C(RESULT_MISS)] | ||
498 | = ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP, | ||
499 | }, | 414 | }, |
500 | }, | 415 | }, |
501 | [C(LL)] = { | 416 | [C(LL)] = { |
@@ -529,11 +444,11 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
529 | [C(ITLB)] = { | 444 | [C(ITLB)] = { |
530 | [C(OP_READ)] = { | 445 | [C(OP_READ)] = { |
531 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 446 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
532 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 447 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
533 | }, | 448 | }, |
534 | [C(OP_WRITE)] = { | 449 | [C(OP_WRITE)] = { |
535 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 450 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
536 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 451 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
537 | }, | 452 | }, |
538 | [C(OP_PREFETCH)] = { | 453 | [C(OP_PREFETCH)] = { |
539 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 454 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -543,13 +458,11 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
543 | [C(BPU)] = { | 458 | [C(BPU)] = { |
544 | [C(OP_READ)] = { | 459 | [C(OP_READ)] = { |
545 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | 460 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
546 | [C(RESULT_MISS)] | 461 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
547 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
548 | }, | 462 | }, |
549 | [C(OP_WRITE)] = { | 463 | [C(OP_WRITE)] = { |
550 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | 464 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
551 | [C(RESULT_MISS)] | 465 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
552 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
553 | }, | 466 | }, |
554 | [C(OP_PREFETCH)] = { | 467 | [C(OP_PREFETCH)] = { |
555 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 468 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -562,13 +475,15 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
562 | * Cortex-A15 HW events mapping | 475 | * Cortex-A15 HW events mapping |
563 | */ | 476 | */ |
564 | static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = { | 477 | static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = { |
565 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 478 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
566 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, | 479 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, |
567 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 480 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, |
568 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 481 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, |
569 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_SPEC_PC_WRITE, | 482 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_A15_PERFCTR_PC_WRITE_SPEC, |
570 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 483 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
571 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES, | 484 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES, |
485 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED, | ||
486 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, | ||
572 | }; | 487 | }; |
573 | 488 | ||
574 | static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 489 | static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
@@ -576,16 +491,12 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
576 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { | 491 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { |
577 | [C(L1D)] = { | 492 | [C(L1D)] = { |
578 | [C(OP_READ)] = { | 493 | [C(OP_READ)] = { |
579 | [C(RESULT_ACCESS)] | 494 | [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ, |
580 | = ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS, | 495 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ, |
581 | [C(RESULT_MISS)] | ||
582 | = ARMV7_PERFCTR_L1_DCACHE_READ_REFILL, | ||
583 | }, | 496 | }, |
584 | [C(OP_WRITE)] = { | 497 | [C(OP_WRITE)] = { |
585 | [C(RESULT_ACCESS)] | 498 | [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE, |
586 | = ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS, | 499 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_WRITE, |
587 | [C(RESULT_MISS)] | ||
588 | = ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL, | ||
589 | }, | 500 | }, |
590 | [C(OP_PREFETCH)] = { | 501 | [C(OP_PREFETCH)] = { |
591 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 502 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -601,11 +512,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
601 | */ | 512 | */ |
602 | [C(OP_READ)] = { | 513 | [C(OP_READ)] = { |
603 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 514 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, |
604 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 515 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
605 | }, | 516 | }, |
606 | [C(OP_WRITE)] = { | 517 | [C(OP_WRITE)] = { |
607 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 518 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, |
608 | [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, | 519 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
609 | }, | 520 | }, |
610 | [C(OP_PREFETCH)] = { | 521 | [C(OP_PREFETCH)] = { |
611 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 522 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -614,16 +525,12 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
614 | }, | 525 | }, |
615 | [C(LL)] = { | 526 | [C(LL)] = { |
616 | [C(OP_READ)] = { | 527 | [C(OP_READ)] = { |
617 | [C(RESULT_ACCESS)] | 528 | [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_READ, |
618 | = ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS, | 529 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L2_CACHE_REFILL_READ, |
619 | [C(RESULT_MISS)] | ||
620 | = ARMV7_PERFCTR_L2_DCACHE_READ_REFILL, | ||
621 | }, | 530 | }, |
622 | [C(OP_WRITE)] = { | 531 | [C(OP_WRITE)] = { |
623 | [C(RESULT_ACCESS)] | 532 | [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_WRITE, |
624 | = ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS, | 533 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L2_CACHE_REFILL_WRITE, |
625 | [C(RESULT_MISS)] | ||
626 | = ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL, | ||
627 | }, | 534 | }, |
628 | [C(OP_PREFETCH)] = { | 535 | [C(OP_PREFETCH)] = { |
629 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 536 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -633,13 +540,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
633 | [C(DTLB)] = { | 540 | [C(DTLB)] = { |
634 | [C(OP_READ)] = { | 541 | [C(OP_READ)] = { |
635 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 542 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
636 | [C(RESULT_MISS)] | 543 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_DTLB_REFILL_L1_READ, |
637 | = ARMV7_PERFCTR_L1_DTLB_READ_REFILL, | ||
638 | }, | 544 | }, |
639 | [C(OP_WRITE)] = { | 545 | [C(OP_WRITE)] = { |
640 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 546 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
641 | [C(RESULT_MISS)] | 547 | [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_DTLB_REFILL_L1_WRITE, |
642 | = ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL, | ||
643 | }, | 548 | }, |
644 | [C(OP_PREFETCH)] = { | 549 | [C(OP_PREFETCH)] = { |
645 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 550 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -649,11 +554,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
649 | [C(ITLB)] = { | 554 | [C(ITLB)] = { |
650 | [C(OP_READ)] = { | 555 | [C(OP_READ)] = { |
651 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 556 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
652 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 557 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
653 | }, | 558 | }, |
654 | [C(OP_WRITE)] = { | 559 | [C(OP_WRITE)] = { |
655 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 560 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
656 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, | 561 | [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, |
657 | }, | 562 | }, |
658 | [C(OP_PREFETCH)] = { | 563 | [C(OP_PREFETCH)] = { |
659 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 564 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -663,13 +568,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
663 | [C(BPU)] = { | 568 | [C(BPU)] = { |
664 | [C(OP_READ)] = { | 569 | [C(OP_READ)] = { |
665 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | 570 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
666 | [C(RESULT_MISS)] | 571 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
667 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
668 | }, | 572 | }, |
669 | [C(OP_WRITE)] = { | 573 | [C(OP_WRITE)] = { |
670 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | 574 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, |
671 | [C(RESULT_MISS)] | 575 | [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
672 | = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
673 | }, | 576 | }, |
674 | [C(OP_PREFETCH)] = { | 577 | [C(OP_PREFETCH)] = { |
675 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 578 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c index e0cca10a8411..3b99d8269829 100644 --- a/arch/arm/kernel/perf_event_xscale.c +++ b/arch/arm/kernel/perf_event_xscale.c | |||
@@ -48,13 +48,15 @@ enum xscale_counters { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | static const unsigned xscale_perf_map[PERF_COUNT_HW_MAX] = { | 50 | static const unsigned xscale_perf_map[PERF_COUNT_HW_MAX] = { |
51 | [PERF_COUNT_HW_CPU_CYCLES] = XSCALE_PERFCTR_CCNT, | 51 | [PERF_COUNT_HW_CPU_CYCLES] = XSCALE_PERFCTR_CCNT, |
52 | [PERF_COUNT_HW_INSTRUCTIONS] = XSCALE_PERFCTR_INSTRUCTION, | 52 | [PERF_COUNT_HW_INSTRUCTIONS] = XSCALE_PERFCTR_INSTRUCTION, |
53 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, | 53 | [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, |
54 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, | 54 | [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, |
55 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = XSCALE_PERFCTR_BRANCH, | 55 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = XSCALE_PERFCTR_BRANCH, |
56 | [PERF_COUNT_HW_BRANCH_MISSES] = XSCALE_PERFCTR_BRANCH_MISS, | 56 | [PERF_COUNT_HW_BRANCH_MISSES] = XSCALE_PERFCTR_BRANCH_MISS, |
57 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, | 57 | [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, |
58 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = XSCALE_PERFCTR_ICACHE_NO_DELIVER, | ||
59 | [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, | ||
58 | }; | 60 | }; |
59 | 61 | ||
60 | static const unsigned xscale_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | 62 | static const unsigned xscale_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 17859ce4e7be..b29776aa6586 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -92,17 +92,23 @@ static int __init hlt_setup(char *__unused) | |||
92 | __setup("nohlt", nohlt_setup); | 92 | __setup("nohlt", nohlt_setup); |
93 | __setup("hlt", hlt_setup); | 93 | __setup("hlt", hlt_setup); |
94 | 94 | ||
95 | void soft_restart(unsigned long addr) | 95 | extern void call_with_stack(void (*fn)(void *), void *arg, void *sp); |
96 | typedef void (*phys_reset_t)(unsigned long); | ||
97 | |||
98 | /* | ||
99 | * A temporary stack to use for CPU reset. This is static so that we | ||
100 | * don't clobber it with the identity mapping. When running with this | ||
101 | * stack, any references to the current task *will not work* so you | ||
102 | * should really do as little as possible before jumping to your reset | ||
103 | * code. | ||
104 | */ | ||
105 | static u64 soft_restart_stack[16]; | ||
106 | |||
107 | static void __soft_restart(void *addr) | ||
96 | { | 108 | { |
97 | /* Disable interrupts first */ | 109 | phys_reset_t phys_reset; |
98 | local_irq_disable(); | ||
99 | local_fiq_disable(); | ||
100 | 110 | ||
101 | /* | 111 | /* Take out a flat memory mapping. */ |
102 | * Tell the mm system that we are going to reboot - | ||
103 | * we may need it to insert some 1:1 mappings so that | ||
104 | * soft boot works. | ||
105 | */ | ||
106 | setup_mm_for_reboot(); | 112 | setup_mm_for_reboot(); |
107 | 113 | ||
108 | /* Clean and invalidate caches */ | 114 | /* Clean and invalidate caches */ |
@@ -114,7 +120,31 @@ void soft_restart(unsigned long addr) | |||
114 | /* Push out any further dirty data, and ensure cache is empty */ | 120 | /* Push out any further dirty data, and ensure cache is empty */ |
115 | flush_cache_all(); | 121 | flush_cache_all(); |
116 | 122 | ||
117 | cpu_reset(addr); | 123 | /* Switch to the identity mapping. */ |
124 | phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); | ||
125 | phys_reset((unsigned long)addr); | ||
126 | |||
127 | /* Should never get here. */ | ||
128 | BUG(); | ||
129 | } | ||
130 | |||
131 | void soft_restart(unsigned long addr) | ||
132 | { | ||
133 | u64 *stack = soft_restart_stack + ARRAY_SIZE(soft_restart_stack); | ||
134 | |||
135 | /* Disable interrupts first */ | ||
136 | local_irq_disable(); | ||
137 | local_fiq_disable(); | ||
138 | |||
139 | /* Disable the L2 if we're the last man standing. */ | ||
140 | if (num_online_cpus() == 1) | ||
141 | outer_disable(); | ||
142 | |||
143 | /* Change to the new stack and continue with the reset. */ | ||
144 | call_with_stack(__soft_restart, (void *)addr, (void *)stack); | ||
145 | |||
146 | /* Should never get here. */ | ||
147 | BUG(); | ||
118 | } | 148 | } |
119 | 149 | ||
120 | static void null_restart(char mode, const char *cmd) | 150 | static void null_restart(char mode, const char *cmd) |
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c index 9a46370fe9da..5416c7c12528 100644 --- a/arch/arm/kernel/sched_clock.c +++ b/arch/arm/kernel/sched_clock.c | |||
@@ -14,61 +14,153 @@ | |||
14 | 14 | ||
15 | #include <asm/sched_clock.h> | 15 | #include <asm/sched_clock.h> |
16 | 16 | ||
17 | struct clock_data { | ||
18 | u64 epoch_ns; | ||
19 | u32 epoch_cyc; | ||
20 | u32 epoch_cyc_copy; | ||
21 | u32 mult; | ||
22 | u32 shift; | ||
23 | }; | ||
24 | |||
17 | static void sched_clock_poll(unsigned long wrap_ticks); | 25 | static void sched_clock_poll(unsigned long wrap_ticks); |
18 | static DEFINE_TIMER(sched_clock_timer, sched_clock_poll, 0, 0); | 26 | static DEFINE_TIMER(sched_clock_timer, sched_clock_poll, 0, 0); |
19 | static void (*sched_clock_update_fn)(void); | 27 | |
28 | static struct clock_data cd = { | ||
29 | .mult = NSEC_PER_SEC / HZ, | ||
30 | }; | ||
31 | |||
32 | static u32 __read_mostly sched_clock_mask = 0xffffffff; | ||
33 | |||
34 | static u32 notrace jiffy_sched_clock_read(void) | ||
35 | { | ||
36 | return (u32)(jiffies - INITIAL_JIFFIES); | ||
37 | } | ||
38 | |||
39 | static u32 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read; | ||
40 | |||
41 | static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift) | ||
42 | { | ||
43 | return (cyc * mult) >> shift; | ||
44 | } | ||
45 | |||
46 | static unsigned long long cyc_to_sched_clock(u32 cyc, u32 mask) | ||
47 | { | ||
48 | u64 epoch_ns; | ||
49 | u32 epoch_cyc; | ||
50 | |||
51 | /* | ||
52 | * Load the epoch_cyc and epoch_ns atomically. We do this by | ||
53 | * ensuring that we always write epoch_cyc, epoch_ns and | ||
54 | * epoch_cyc_copy in strict order, and read them in strict order. | ||
55 | * If epoch_cyc and epoch_cyc_copy are not equal, then we're in | ||
56 | * the middle of an update, and we should repeat the load. | ||
57 | */ | ||
58 | do { | ||
59 | epoch_cyc = cd.epoch_cyc; | ||
60 | smp_rmb(); | ||
61 | epoch_ns = cd.epoch_ns; | ||
62 | smp_rmb(); | ||
63 | } while (epoch_cyc != cd.epoch_cyc_copy); | ||
64 | |||
65 | return epoch_ns + cyc_to_ns((cyc - epoch_cyc) & mask, cd.mult, cd.shift); | ||
66 | } | ||
67 | |||
68 | /* | ||
69 | * Atomically update the sched_clock epoch. | ||
70 | */ | ||
71 | static void notrace update_sched_clock(void) | ||
72 | { | ||
73 | unsigned long flags; | ||
74 | u32 cyc; | ||
75 | u64 ns; | ||
76 | |||
77 | cyc = read_sched_clock(); | ||
78 | ns = cd.epoch_ns + | ||
79 | cyc_to_ns((cyc - cd.epoch_cyc) & sched_clock_mask, | ||
80 | cd.mult, cd.shift); | ||
81 | /* | ||
82 | * Write epoch_cyc and epoch_ns in a way that the update is | ||
83 | * detectable in cyc_to_fixed_sched_clock(). | ||
84 | */ | ||
85 | raw_local_irq_save(flags); | ||
86 | cd.epoch_cyc = cyc; | ||
87 | smp_wmb(); | ||
88 | cd.epoch_ns = ns; | ||
89 | smp_wmb(); | ||
90 | cd.epoch_cyc_copy = cyc; | ||
91 | raw_local_irq_restore(flags); | ||
92 | } | ||
20 | 93 | ||
21 | static void sched_clock_poll(unsigned long wrap_ticks) | 94 | static void sched_clock_poll(unsigned long wrap_ticks) |
22 | { | 95 | { |
23 | mod_timer(&sched_clock_timer, round_jiffies(jiffies + wrap_ticks)); | 96 | mod_timer(&sched_clock_timer, round_jiffies(jiffies + wrap_ticks)); |
24 | sched_clock_update_fn(); | 97 | update_sched_clock(); |
25 | } | 98 | } |
26 | 99 | ||
27 | void __init init_sched_clock(struct clock_data *cd, void (*update)(void), | 100 | void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) |
28 | unsigned int clock_bits, unsigned long rate) | ||
29 | { | 101 | { |
30 | unsigned long r, w; | 102 | unsigned long r, w; |
31 | u64 res, wrap; | 103 | u64 res, wrap; |
32 | char r_unit; | 104 | char r_unit; |
33 | 105 | ||
34 | sched_clock_update_fn = update; | 106 | BUG_ON(bits > 32); |
107 | WARN_ON(!irqs_disabled()); | ||
108 | WARN_ON(read_sched_clock != jiffy_sched_clock_read); | ||
109 | read_sched_clock = read; | ||
110 | sched_clock_mask = (1 << bits) - 1; | ||
35 | 111 | ||
36 | /* calculate the mult/shift to convert counter ticks to ns. */ | 112 | /* calculate the mult/shift to convert counter ticks to ns. */ |
37 | clocks_calc_mult_shift(&cd->mult, &cd->shift, rate, NSEC_PER_SEC, 0); | 113 | clocks_calc_mult_shift(&cd.mult, &cd.shift, rate, NSEC_PER_SEC, 0); |
38 | 114 | ||
39 | r = rate; | 115 | r = rate; |
40 | if (r >= 4000000) { | 116 | if (r >= 4000000) { |
41 | r /= 1000000; | 117 | r /= 1000000; |
42 | r_unit = 'M'; | 118 | r_unit = 'M'; |
43 | } else { | 119 | } else if (r >= 1000) { |
44 | r /= 1000; | 120 | r /= 1000; |
45 | r_unit = 'k'; | 121 | r_unit = 'k'; |
46 | } | 122 | } else |
123 | r_unit = ' '; | ||
47 | 124 | ||
48 | /* calculate how many ns until we wrap */ | 125 | /* calculate how many ns until we wrap */ |
49 | wrap = cyc_to_ns((1ULL << clock_bits) - 1, cd->mult, cd->shift); | 126 | wrap = cyc_to_ns((1ULL << bits) - 1, cd.mult, cd.shift); |
50 | do_div(wrap, NSEC_PER_MSEC); | 127 | do_div(wrap, NSEC_PER_MSEC); |
51 | w = wrap; | 128 | w = wrap; |
52 | 129 | ||
53 | /* calculate the ns resolution of this counter */ | 130 | /* calculate the ns resolution of this counter */ |
54 | res = cyc_to_ns(1ULL, cd->mult, cd->shift); | 131 | res = cyc_to_ns(1ULL, cd.mult, cd.shift); |
55 | pr_info("sched_clock: %u bits at %lu%cHz, resolution %lluns, wraps every %lums\n", | 132 | pr_info("sched_clock: %u bits at %lu%cHz, resolution %lluns, wraps every %lums\n", |
56 | clock_bits, r, r_unit, res, w); | 133 | bits, r, r_unit, res, w); |
57 | 134 | ||
58 | /* | 135 | /* |
59 | * Start the timer to keep sched_clock() properly updated and | 136 | * Start the timer to keep sched_clock() properly updated and |
60 | * sets the initial epoch. | 137 | * sets the initial epoch. |
61 | */ | 138 | */ |
62 | sched_clock_timer.data = msecs_to_jiffies(w - (w / 10)); | 139 | sched_clock_timer.data = msecs_to_jiffies(w - (w / 10)); |
63 | update(); | 140 | update_sched_clock(); |
64 | 141 | ||
65 | /* | 142 | /* |
66 | * Ensure that sched_clock() starts off at 0ns | 143 | * Ensure that sched_clock() starts off at 0ns |
67 | */ | 144 | */ |
68 | cd->epoch_ns = 0; | 145 | cd.epoch_ns = 0; |
146 | |||
147 | pr_debug("Registered %pF as sched_clock source\n", read); | ||
148 | } | ||
149 | |||
150 | unsigned long long notrace sched_clock(void) | ||
151 | { | ||
152 | u32 cyc = read_sched_clock(); | ||
153 | return cyc_to_sched_clock(cyc, sched_clock_mask); | ||
69 | } | 154 | } |
70 | 155 | ||
71 | void __init sched_clock_postinit(void) | 156 | void __init sched_clock_postinit(void) |
72 | { | 157 | { |
158 | /* | ||
159 | * If no sched_clock function has been provided at that point, | ||
160 | * make it the final one one. | ||
161 | */ | ||
162 | if (read_sched_clock == jiffy_sched_clock_read) | ||
163 | setup_sched_clock(jiffy_sched_clock_read, 32, HZ); | ||
164 | |||
73 | sched_clock_poll(sched_clock_timer.data); | 165 | sched_clock_poll(sched_clock_timer.data); |
74 | } | 166 | } |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 8b13930cdb0a..095d6611c84e 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/memblock.h> | 31 | #include <linux/memblock.h> |
32 | #include <linux/bug.h> | 32 | #include <linux/bug.h> |
33 | #include <linux/compiler.h> | 33 | #include <linux/compiler.h> |
34 | #include <linux/sort.h> | ||
34 | 35 | ||
35 | #include <asm/unified.h> | 36 | #include <asm/unified.h> |
36 | #include <asm/cpu.h> | 37 | #include <asm/cpu.h> |
@@ -890,6 +891,12 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr) | |||
890 | return mdesc; | 891 | return mdesc; |
891 | } | 892 | } |
892 | 893 | ||
894 | static int __init meminfo_cmp(const void *_a, const void *_b) | ||
895 | { | ||
896 | const struct membank *a = _a, *b = _b; | ||
897 | long cmp = bank_pfn_start(a) - bank_pfn_start(b); | ||
898 | return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; | ||
899 | } | ||
893 | 900 | ||
894 | void __init setup_arch(char **cmdline_p) | 901 | void __init setup_arch(char **cmdline_p) |
895 | { | 902 | { |
@@ -922,6 +929,7 @@ void __init setup_arch(char **cmdline_p) | |||
922 | 929 | ||
923 | parse_early_param(); | 930 | parse_early_param(); |
924 | 931 | ||
932 | sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); | ||
925 | sanity_check_meminfo(); | 933 | sanity_check_meminfo(); |
926 | arm_memblock_init(&meminfo, mdesc); | 934 | arm_memblock_init(&meminfo, mdesc); |
927 | 935 | ||
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index 020e99c845e7..1f268bda4552 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S | |||
@@ -54,14 +54,18 @@ ENDPROC(cpu_suspend_abort) | |||
54 | * r0 = control register value | 54 | * r0 = control register value |
55 | */ | 55 | */ |
56 | .align 5 | 56 | .align 5 |
57 | .pushsection .idmap.text,"ax" | ||
57 | ENTRY(cpu_resume_mmu) | 58 | ENTRY(cpu_resume_mmu) |
58 | ldr r3, =cpu_resume_after_mmu | 59 | ldr r3, =cpu_resume_after_mmu |
60 | instr_sync | ||
59 | mcr p15, 0, r0, c1, c0, 0 @ turn on MMU, I-cache, etc | 61 | mcr p15, 0, r0, c1, c0, 0 @ turn on MMU, I-cache, etc |
60 | mrc p15, 0, r0, c0, c0, 0 @ read id reg | 62 | mrc p15, 0, r0, c0, c0, 0 @ read id reg |
63 | instr_sync | ||
61 | mov r0, r0 | 64 | mov r0, r0 |
62 | mov r0, r0 | 65 | mov r0, r0 |
63 | mov pc, r3 @ jump to virtual address | 66 | mov pc, r3 @ jump to virtual address |
64 | ENDPROC(cpu_resume_mmu) | 67 | ENDPROC(cpu_resume_mmu) |
68 | .popsection | ||
65 | cpu_resume_after_mmu: | 69 | cpu_resume_after_mmu: |
66 | bl cpu_init @ restore the und/abt/irq banked regs | 70 | bl cpu_init @ restore the und/abt/irq banked regs |
67 | mov r0, #0 @ return zero on success | 71 | mov r0, #0 @ return zero on success |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index ef5640b9e218..57db122a4f62 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/cpu.h> | 31 | #include <asm/cpu.h> |
32 | #include <asm/cputype.h> | 32 | #include <asm/cputype.h> |
33 | #include <asm/exception.h> | 33 | #include <asm/exception.h> |
34 | #include <asm/idmap.h> | ||
34 | #include <asm/topology.h> | 35 | #include <asm/topology.h> |
35 | #include <asm/mmu_context.h> | 36 | #include <asm/mmu_context.h> |
36 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
@@ -61,7 +62,6 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
61 | { | 62 | { |
62 | struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); | 63 | struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); |
63 | struct task_struct *idle = ci->idle; | 64 | struct task_struct *idle = ci->idle; |
64 | pgd_t *pgd; | ||
65 | int ret; | 65 | int ret; |
66 | 66 | ||
67 | /* | 67 | /* |
@@ -84,29 +84,11 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * Allocate initial page tables to allow the new CPU to | ||
88 | * enable the MMU safely. This essentially means a set | ||
89 | * of our "standard" page tables, with the addition of | ||
90 | * a 1:1 mapping for the physical address of the kernel. | ||
91 | */ | ||
92 | pgd = pgd_alloc(&init_mm); | ||
93 | if (!pgd) | ||
94 | return -ENOMEM; | ||
95 | |||
96 | if (PHYS_OFFSET != PAGE_OFFSET) { | ||
97 | #ifndef CONFIG_HOTPLUG_CPU | ||
98 | identity_mapping_add(pgd, __pa(__init_begin), __pa(__init_end)); | ||
99 | #endif | ||
100 | identity_mapping_add(pgd, __pa(_stext), __pa(_etext)); | ||
101 | identity_mapping_add(pgd, __pa(_sdata), __pa(_edata)); | ||
102 | } | ||
103 | |||
104 | /* | ||
105 | * We need to tell the secondary core where to find | 87 | * We need to tell the secondary core where to find |
106 | * its stack and the page tables. | 88 | * its stack and the page tables. |
107 | */ | 89 | */ |
108 | secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; | 90 | secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; |
109 | secondary_data.pgdir = virt_to_phys(pgd); | 91 | secondary_data.pgdir = virt_to_phys(idmap_pgd); |
110 | secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir); | 92 | secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir); |
111 | __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); | 93 | __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); |
112 | outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); | 94 | outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); |
@@ -142,16 +124,6 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
142 | secondary_data.stack = NULL; | 124 | secondary_data.stack = NULL; |
143 | secondary_data.pgdir = 0; | 125 | secondary_data.pgdir = 0; |
144 | 126 | ||
145 | if (PHYS_OFFSET != PAGE_OFFSET) { | ||
146 | #ifndef CONFIG_HOTPLUG_CPU | ||
147 | identity_mapping_del(pgd, __pa(__init_begin), __pa(__init_end)); | ||
148 | #endif | ||
149 | identity_mapping_del(pgd, __pa(_stext), __pa(_etext)); | ||
150 | identity_mapping_del(pgd, __pa(_sdata), __pa(_edata)); | ||
151 | } | ||
152 | |||
153 | pgd_free(&init_mm, pgd); | ||
154 | |||
155 | return ret; | 127 | return ret; |
156 | } | 128 | } |
157 | 129 | ||
@@ -550,6 +522,10 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
550 | local_fiq_disable(); | 522 | local_fiq_disable(); |
551 | local_irq_disable(); | 523 | local_irq_disable(); |
552 | 524 | ||
525 | #ifdef CONFIG_HOTPLUG_CPU | ||
526 | platform_cpu_kill(cpu); | ||
527 | #endif | ||
528 | |||
553 | while (1) | 529 | while (1) |
554 | cpu_relax(); | 530 | cpu_relax(); |
555 | } | 531 | } |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index a8a6682d6b52..c8e938553d47 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -10,8 +10,11 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/clk.h> | ||
14 | #include <linux/cpufreq.h> | ||
13 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
14 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/err.h> | ||
15 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
16 | #include <linux/jiffies.h> | 19 | #include <linux/jiffies.h> |
17 | #include <linux/clockchips.h> | 20 | #include <linux/clockchips.h> |
@@ -25,6 +28,7 @@ | |||
25 | /* set up by the platform code */ | 28 | /* set up by the platform code */ |
26 | void __iomem *twd_base; | 29 | void __iomem *twd_base; |
27 | 30 | ||
31 | static struct clk *twd_clk; | ||
28 | static unsigned long twd_timer_rate; | 32 | static unsigned long twd_timer_rate; |
29 | 33 | ||
30 | static struct clock_event_device __percpu **twd_evt; | 34 | static struct clock_event_device __percpu **twd_evt; |
@@ -89,6 +93,52 @@ void twd_timer_stop(struct clock_event_device *clk) | |||
89 | disable_percpu_irq(clk->irq); | 93 | disable_percpu_irq(clk->irq); |
90 | } | 94 | } |
91 | 95 | ||
96 | #ifdef CONFIG_CPU_FREQ | ||
97 | |||
98 | /* | ||
99 | * Updates clockevent frequency when the cpu frequency changes. | ||
100 | * Called on the cpu that is changing frequency with interrupts disabled. | ||
101 | */ | ||
102 | static void twd_update_frequency(void *data) | ||
103 | { | ||
104 | twd_timer_rate = clk_get_rate(twd_clk); | ||
105 | |||
106 | clockevents_update_freq(*__this_cpu_ptr(twd_evt), twd_timer_rate); | ||
107 | } | ||
108 | |||
109 | static int twd_cpufreq_transition(struct notifier_block *nb, | ||
110 | unsigned long state, void *data) | ||
111 | { | ||
112 | struct cpufreq_freqs *freqs = data; | ||
113 | |||
114 | /* | ||
115 | * The twd clock events must be reprogrammed to account for the new | ||
116 | * frequency. The timer is local to a cpu, so cross-call to the | ||
117 | * changing cpu. | ||
118 | */ | ||
119 | if (state == CPUFREQ_POSTCHANGE || state == CPUFREQ_RESUMECHANGE) | ||
120 | smp_call_function_single(freqs->cpu, twd_update_frequency, | ||
121 | NULL, 1); | ||
122 | |||
123 | return NOTIFY_OK; | ||
124 | } | ||
125 | |||
126 | static struct notifier_block twd_cpufreq_nb = { | ||
127 | .notifier_call = twd_cpufreq_transition, | ||
128 | }; | ||
129 | |||
130 | static int twd_cpufreq_init(void) | ||
131 | { | ||
132 | if (!IS_ERR(twd_clk)) | ||
133 | return cpufreq_register_notifier(&twd_cpufreq_nb, | ||
134 | CPUFREQ_TRANSITION_NOTIFIER); | ||
135 | |||
136 | return 0; | ||
137 | } | ||
138 | core_initcall(twd_cpufreq_init); | ||
139 | |||
140 | #endif | ||
141 | |||
92 | static void __cpuinit twd_calibrate_rate(void) | 142 | static void __cpuinit twd_calibrate_rate(void) |
93 | { | 143 | { |
94 | unsigned long count; | 144 | unsigned long count; |
@@ -140,6 +190,35 @@ static irqreturn_t twd_handler(int irq, void *dev_id) | |||
140 | return IRQ_NONE; | 190 | return IRQ_NONE; |
141 | } | 191 | } |
142 | 192 | ||
193 | static struct clk *twd_get_clock(void) | ||
194 | { | ||
195 | struct clk *clk; | ||
196 | int err; | ||
197 | |||
198 | clk = clk_get_sys("smp_twd", NULL); | ||
199 | if (IS_ERR(clk)) { | ||
200 | pr_err("smp_twd: clock not found: %d\n", (int)PTR_ERR(clk)); | ||
201 | return clk; | ||
202 | } | ||
203 | |||
204 | err = clk_prepare(clk); | ||
205 | if (err) { | ||
206 | pr_err("smp_twd: clock failed to prepare: %d\n", err); | ||
207 | clk_put(clk); | ||
208 | return ERR_PTR(err); | ||
209 | } | ||
210 | |||
211 | err = clk_enable(clk); | ||
212 | if (err) { | ||
213 | pr_err("smp_twd: clock failed to enable: %d\n", err); | ||
214 | clk_unprepare(clk); | ||
215 | clk_put(clk); | ||
216 | return ERR_PTR(err); | ||
217 | } | ||
218 | |||
219 | return clk; | ||
220 | } | ||
221 | |||
143 | /* | 222 | /* |
144 | * Setup the local clock events for a CPU. | 223 | * Setup the local clock events for a CPU. |
145 | */ | 224 | */ |
@@ -165,7 +244,13 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
165 | } | 244 | } |
166 | } | 245 | } |
167 | 246 | ||
168 | twd_calibrate_rate(); | 247 | if (!twd_clk) |
248 | twd_clk = twd_get_clock(); | ||
249 | |||
250 | if (!IS_ERR_OR_NULL(twd_clk)) | ||
251 | twd_timer_rate = clk_get_rate(twd_clk); | ||
252 | else | ||
253 | twd_calibrate_rate(); | ||
169 | 254 | ||
170 | clk->name = "local_timer"; | 255 | clk->name = "local_timer"; |
171 | clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | | 256 | clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | |
@@ -173,15 +258,11 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
173 | clk->rating = 350; | 258 | clk->rating = 350; |
174 | clk->set_mode = twd_set_mode; | 259 | clk->set_mode = twd_set_mode; |
175 | clk->set_next_event = twd_set_next_event; | 260 | clk->set_next_event = twd_set_next_event; |
176 | clk->shift = 20; | ||
177 | clk->mult = div_sc(twd_timer_rate, NSEC_PER_SEC, clk->shift); | ||
178 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); | ||
179 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); | ||
180 | 261 | ||
181 | this_cpu_clk = __this_cpu_ptr(twd_evt); | 262 | this_cpu_clk = __this_cpu_ptr(twd_evt); |
182 | *this_cpu_clk = clk; | 263 | *this_cpu_clk = clk; |
183 | 264 | ||
184 | clockevents_register_device(clk); | 265 | clockevents_config_and_register(clk, twd_timer_rate, |
185 | 266 | 0xf, 0xffffffff); | |
186 | enable_percpu_irq(clk->irq, 0); | 267 | enable_percpu_irq(clk->irq, 0); |
187 | } | 268 | } |
diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c index 93a22d282c16..1794cc3b0f18 100644 --- a/arch/arm/kernel/suspend.c +++ b/arch/arm/kernel/suspend.c | |||
@@ -1,13 +1,12 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | 2 | ||
3 | #include <asm/idmap.h> | ||
3 | #include <asm/pgalloc.h> | 4 | #include <asm/pgalloc.h> |
4 | #include <asm/pgtable.h> | 5 | #include <asm/pgtable.h> |
5 | #include <asm/memory.h> | 6 | #include <asm/memory.h> |
6 | #include <asm/suspend.h> | 7 | #include <asm/suspend.h> |
7 | #include <asm/tlbflush.h> | 8 | #include <asm/tlbflush.h> |
8 | 9 | ||
9 | static pgd_t *suspend_pgd; | ||
10 | |||
11 | extern int __cpu_suspend(unsigned long, int (*)(unsigned long)); | 10 | extern int __cpu_suspend(unsigned long, int (*)(unsigned long)); |
12 | extern void cpu_resume_mmu(void); | 11 | extern void cpu_resume_mmu(void); |
13 | 12 | ||
@@ -21,7 +20,7 @@ void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr) | |||
21 | *save_ptr = virt_to_phys(ptr); | 20 | *save_ptr = virt_to_phys(ptr); |
22 | 21 | ||
23 | /* This must correspond to the LDM in cpu_resume() assembly */ | 22 | /* This must correspond to the LDM in cpu_resume() assembly */ |
24 | *ptr++ = virt_to_phys(suspend_pgd); | 23 | *ptr++ = virt_to_phys(idmap_pgd); |
25 | *ptr++ = sp; | 24 | *ptr++ = sp; |
26 | *ptr++ = virt_to_phys(cpu_do_resume); | 25 | *ptr++ = virt_to_phys(cpu_do_resume); |
27 | 26 | ||
@@ -42,7 +41,7 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) | |||
42 | struct mm_struct *mm = current->active_mm; | 41 | struct mm_struct *mm = current->active_mm; |
43 | int ret; | 42 | int ret; |
44 | 43 | ||
45 | if (!suspend_pgd) | 44 | if (!idmap_pgd) |
46 | return -EINVAL; | 45 | return -EINVAL; |
47 | 46 | ||
48 | /* | 47 | /* |
@@ -59,14 +58,3 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) | |||
59 | 58 | ||
60 | return ret; | 59 | return ret; |
61 | } | 60 | } |
62 | |||
63 | static int __init cpu_suspend_init(void) | ||
64 | { | ||
65 | suspend_pgd = pgd_alloc(&init_mm); | ||
66 | if (suspend_pgd) { | ||
67 | unsigned long addr = virt_to_phys(cpu_resume_mmu); | ||
68 | identity_mapping_add(suspend_pgd, addr, addr + SECTION_SIZE); | ||
69 | } | ||
70 | return suspend_pgd ? 0 : -ENOMEM; | ||
71 | } | ||
72 | core_initcall(cpu_suspend_init); | ||
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c index 5f452f8fde05..df745188f5de 100644 --- a/arch/arm/kernel/swp_emulate.c +++ b/arch/arm/kernel/swp_emulate.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
26 | #include <linux/perf_event.h> | 26 | #include <linux/perf_event.h> |
27 | 27 | ||
28 | #include <asm/opcodes.h> | ||
28 | #include <asm/traps.h> | 29 | #include <asm/traps.h> |
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | 31 | ||
@@ -185,6 +186,21 @@ static int swp_handler(struct pt_regs *regs, unsigned int instr) | |||
185 | 186 | ||
186 | perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, regs->ARM_pc); | 187 | perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, regs->ARM_pc); |
187 | 188 | ||
189 | res = arm_check_condition(instr, regs->ARM_cpsr); | ||
190 | switch (res) { | ||
191 | case ARM_OPCODE_CONDTEST_PASS: | ||
192 | break; | ||
193 | case ARM_OPCODE_CONDTEST_FAIL: | ||
194 | /* Condition failed - return to next instruction */ | ||
195 | regs->ARM_pc += 4; | ||
196 | return 0; | ||
197 | case ARM_OPCODE_CONDTEST_UNCOND: | ||
198 | /* If unconditional encoding - not a SWP, undef */ | ||
199 | return -EFAULT; | ||
200 | default: | ||
201 | return -EINVAL; | ||
202 | } | ||
203 | |||
188 | if (current->pid != previous_pid) { | 204 | if (current->pid != previous_pid) { |
189 | pr_debug("\"%s\" (%ld) uses deprecated SWP{B} instruction\n", | 205 | pr_debug("\"%s\" (%ld) uses deprecated SWP{B} instruction\n", |
190 | current->comm, (unsigned long)current->pid); | 206 | current->comm, (unsigned long)current->pid); |
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c index 30e302d33e0a..01ec453bb924 100644 --- a/arch/arm/kernel/tcm.c +++ b/arch/arm/kernel/tcm.c | |||
@@ -180,9 +180,9 @@ static int __init setup_tcm_bank(u8 type, u8 bank, u8 banks, | |||
180 | */ | 180 | */ |
181 | void __init tcm_init(void) | 181 | void __init tcm_init(void) |
182 | { | 182 | { |
183 | u32 tcm_status = read_cpuid_tcmstatus(); | 183 | u32 tcm_status; |
184 | u8 dtcm_banks = (tcm_status >> 16) & 0x03; | 184 | u8 dtcm_banks; |
185 | u8 itcm_banks = (tcm_status & 0x03); | 185 | u8 itcm_banks; |
186 | size_t dtcm_code_sz = &__edtcm_data - &__sdtcm_data; | 186 | size_t dtcm_code_sz = &__edtcm_data - &__sdtcm_data; |
187 | size_t itcm_code_sz = &__eitcm_text - &__sitcm_text; | 187 | size_t itcm_code_sz = &__eitcm_text - &__sitcm_text; |
188 | char *start; | 188 | char *start; |
@@ -191,6 +191,22 @@ void __init tcm_init(void) | |||
191 | int ret; | 191 | int ret; |
192 | int i; | 192 | int i; |
193 | 193 | ||
194 | /* | ||
195 | * Prior to ARMv5 there is no TCM, and trying to read the status | ||
196 | * register will hang the processor. | ||
197 | */ | ||
198 | if (cpu_architecture() < CPU_ARCH_ARMv5) { | ||
199 | if (dtcm_code_sz || itcm_code_sz) | ||
200 | pr_info("CPU TCM: %u bytes of DTCM and %u bytes of " | ||
201 | "ITCM code compiled in, but no TCM present " | ||
202 | "in pre-v5 CPU\n", dtcm_code_sz, itcm_code_sz); | ||
203 | return; | ||
204 | } | ||
205 | |||
206 | tcm_status = read_cpuid_tcmstatus(); | ||
207 | dtcm_banks = (tcm_status >> 16) & 0x03; | ||
208 | itcm_banks = (tcm_status & 0x03); | ||
209 | |||
194 | /* Values greater than 2 for D/ITCM banks are "reserved" */ | 210 | /* Values greater than 2 for D/ITCM banks are "reserved" */ |
195 | if (dtcm_banks > 2) | 211 | if (dtcm_banks > 2) |
196 | dtcm_banks = 0; | 212 | dtcm_banks = 0; |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 20b3041e0860..f76e75548670 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -13,6 +13,12 @@ | |||
13 | *(.proc.info.init) \ | 13 | *(.proc.info.init) \ |
14 | VMLINUX_SYMBOL(__proc_info_end) = .; | 14 | VMLINUX_SYMBOL(__proc_info_end) = .; |
15 | 15 | ||
16 | #define IDMAP_TEXT \ | ||
17 | ALIGN_FUNCTION(); \ | ||
18 | VMLINUX_SYMBOL(__idmap_text_start) = .; \ | ||
19 | *(.idmap.text) \ | ||
20 | VMLINUX_SYMBOL(__idmap_text_end) = .; | ||
21 | |||
16 | #ifdef CONFIG_HOTPLUG_CPU | 22 | #ifdef CONFIG_HOTPLUG_CPU |
17 | #define ARM_CPU_DISCARD(x) | 23 | #define ARM_CPU_DISCARD(x) |
18 | #define ARM_CPU_KEEP(x) x | 24 | #define ARM_CPU_KEEP(x) x |
@@ -92,6 +98,7 @@ SECTIONS | |||
92 | SCHED_TEXT | 98 | SCHED_TEXT |
93 | LOCK_TEXT | 99 | LOCK_TEXT |
94 | KPROBES_TEXT | 100 | KPROBES_TEXT |
101 | IDMAP_TEXT | ||
95 | #ifdef CONFIG_MMU | 102 | #ifdef CONFIG_MMU |
96 | *(.fixup) | 103 | *(.fixup) |
97 | #endif | 104 | #endif |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index cf73a7f742dd..0ade0acc1ed9 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -13,7 +13,8 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ | |||
13 | testchangebit.o testclearbit.o testsetbit.o \ | 13 | testchangebit.o testclearbit.o testsetbit.o \ |
14 | ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ | 14 | ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ |
15 | ucmpdi2.o lib1funcs.o div64.o \ | 15 | ucmpdi2.o lib1funcs.o div64.o \ |
16 | io-readsb.o io-writesb.o io-readsl.o io-writesl.o | 16 | io-readsb.o io-writesb.o io-readsl.o io-writesl.o \ |
17 | call_with_stack.o | ||
17 | 18 | ||
18 | mmu-y := clear_user.o copy_page.o getuser.o putuser.o | 19 | mmu-y := clear_user.o copy_page.o getuser.o putuser.o |
19 | 20 | ||
diff --git a/arch/arm/lib/call_with_stack.S b/arch/arm/lib/call_with_stack.S new file mode 100644 index 000000000000..916c80f13ae7 --- /dev/null +++ b/arch/arm/lib/call_with_stack.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * arch/arm/lib/call_with_stack.S | ||
3 | * | ||
4 | * Copyright (C) 2011 ARM Ltd. | ||
5 | * Written by Will Deacon <will.deacon@arm.com> | ||
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 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/linkage.h> | ||
22 | #include <asm/assembler.h> | ||
23 | |||
24 | /* | ||
25 | * void call_with_stack(void (*fn)(void *), void *arg, void *sp) | ||
26 | * | ||
27 | * Change the stack to that pointed at by sp, then invoke fn(arg) with | ||
28 | * the new stack. | ||
29 | */ | ||
30 | ENTRY(call_with_stack) | ||
31 | str sp, [r2, #-4]! | ||
32 | str lr, [r2, #-4]! | ||
33 | |||
34 | mov sp, r2 | ||
35 | mov r2, r0 | ||
36 | mov r0, r1 | ||
37 | |||
38 | adr lr, BSYM(1f) | ||
39 | mov pc, r2 | ||
40 | |||
41 | 1: ldr lr, [sp] | ||
42 | ldr sp, [sp, #4] | ||
43 | mov pc, lr | ||
44 | ENDPROC(call_with_stack) | ||
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h index 4298e7806c76..4ca09ef7ca29 100644 --- a/arch/arm/mach-at91/include/mach/io.h +++ b/arch/arm/mach-at91/include/mach/io.h | |||
@@ -30,14 +30,6 @@ | |||
30 | 30 | ||
31 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
32 | 32 | ||
33 | #ifndef CONFIG_ARCH_AT91X40 | ||
34 | #define __arch_ioremap at91_ioremap | ||
35 | #define __arch_iounmap at91_iounmap | ||
36 | #endif | ||
37 | |||
38 | void __iomem *at91_ioremap(unsigned long phys, size_t size, unsigned int type); | ||
39 | void at91_iounmap(volatile void __iomem *addr); | ||
40 | |||
41 | static inline unsigned int at91_sys_read(unsigned int reg_offset) | 33 | static inline unsigned int at91_sys_read(unsigned int reg_offset) |
42 | { | 34 | { |
43 | void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; | 35 | void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; |
diff --git a/arch/arm/mach-at91/include/mach/vmalloc.h b/arch/arm/mach-at91/include/mach/vmalloc.h deleted file mode 100644 index 8e4a1bd0ab1d..000000000000 --- a/arch/arm/mach-at91/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2003 SAN People | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_ARCH_VMALLOC_H | ||
22 | #define __ASM_ARCH_VMALLOC_H | ||
23 | |||
24 | #include <mach/hardware.h> | ||
25 | |||
26 | #define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK) | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index aa64294c7db3..cf98a8f94dc5 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -73,24 +73,6 @@ static struct map_desc at91_io_desc __initdata = { | |||
73 | .type = MT_DEVICE, | 73 | .type = MT_DEVICE, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | void __iomem *at91_ioremap(unsigned long p, size_t size, unsigned int type) | ||
77 | { | ||
78 | if (p >= AT91_BASE_SYS && p <= (AT91_BASE_SYS + SZ_16K - 1)) | ||
79 | return (void __iomem *)AT91_IO_P2V(p); | ||
80 | |||
81 | return __arm_ioremap_caller(p, size, type, __builtin_return_address(0)); | ||
82 | } | ||
83 | EXPORT_SYMBOL(at91_ioremap); | ||
84 | |||
85 | void at91_iounmap(volatile void __iomem *addr) | ||
86 | { | ||
87 | unsigned long virt = (unsigned long)addr; | ||
88 | |||
89 | if (virt >= VMALLOC_START && virt < VMALLOC_END) | ||
90 | __iounmap(addr); | ||
91 | } | ||
92 | EXPORT_SYMBOL(at91_iounmap); | ||
93 | |||
94 | #define AT91_DBGU0 0xfffff200 | 76 | #define AT91_DBGU0 0xfffff200 |
95 | #define AT91_DBGU1 0xffffee00 | 77 | #define AT91_DBGU1 0xffffee00 |
96 | 78 | ||
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c index f4d4d6d174d0..1a1a27dd5654 100644 --- a/arch/arm/mach-bcmring/dma.c +++ b/arch/arm/mach-bcmring/dma.c | |||
@@ -1615,7 +1615,7 @@ DMA_MemType_t dma_mem_type(void *addr) | |||
1615 | { | 1615 | { |
1616 | unsigned long addrVal = (unsigned long)addr; | 1616 | unsigned long addrVal = (unsigned long)addr; |
1617 | 1617 | ||
1618 | if (addrVal >= VMALLOC_END) { | 1618 | if (addrVal >= CONSISTENT_BASE) { |
1619 | /* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */ | 1619 | /* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */ |
1620 | 1620 | ||
1621 | /* dma_alloc_xxx pages are physically and virtually contiguous */ | 1621 | /* dma_alloc_xxx pages are physically and virtually contiguous */ |
diff --git a/arch/arm/mach-bcmring/include/mach/vmalloc.h b/arch/arm/mach-bcmring/include/mach/vmalloc.h deleted file mode 100644 index 7397bd7817d9..000000000000 --- a/arch/arm/mach-bcmring/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (C) 2000 Russell King. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * Move VMALLOC_END to 0xf0000000 so that the vm space can range from | ||
22 | * 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles | ||
23 | * larger physical memory designs better. | ||
24 | */ | ||
25 | #define VMALLOC_END 0xf0000000UL | ||
diff --git a/arch/arm/mach-clps711x/include/mach/vmalloc.h b/arch/arm/mach-clps711x/include/mach/vmalloc.h deleted file mode 100644 index 467b96137e47..000000000000 --- a/arch/arm/mach-clps711x/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define VMALLOC_END 0xd0000000UL | ||
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c index 9b8c3d59731b..2c5fb4c7e509 100644 --- a/arch/arm/mach-cns3xxx/cns3420vb.c +++ b/arch/arm/mach-cns3xxx/cns3420vb.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/mtd/partitions.h> | 26 | #include <linux/mtd/partitions.h> |
27 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | #include <asm/hardware/gic.h> | ||
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
31 | #include <asm/mach/time.h> | 32 | #include <asm/mach/time.h> |
@@ -201,6 +202,7 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board") | |||
201 | .map_io = cns3420_map_io, | 202 | .map_io = cns3420_map_io, |
202 | .init_irq = cns3xxx_init_irq, | 203 | .init_irq = cns3xxx_init_irq, |
203 | .timer = &cns3xxx_timer, | 204 | .timer = &cns3xxx_timer, |
205 | .handle_irq = gic_handle_irq, | ||
204 | .init_machine = cns3420_init, | 206 | .init_machine = cns3420_init, |
205 | .restart = cns3xxx_restart, | 207 | .restart = cns3xxx_restart, |
206 | MACHINE_END | 208 | MACHINE_END |
diff --git a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S index d87bfc397d39..01c57df5f716 100644 --- a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S +++ b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S | |||
@@ -8,8 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/hardware/entry-macro-gic.S> | ||
12 | |||
13 | .macro disable_fiq | 11 | .macro disable_fiq |
14 | .endm | 12 | .endm |
15 | 13 | ||
diff --git a/arch/arm/mach-cns3xxx/include/mach/vmalloc.h b/arch/arm/mach-cns3xxx/include/mach/vmalloc.h deleted file mode 100644 index 1dd231d2f772..000000000000 --- a/arch/arm/mach-cns3xxx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2000 Russell King. | ||
3 | * Copyright 2003 ARM Limited | ||
4 | * Copyright 2008 Cavium Networks | ||
5 | * | ||
6 | * This file 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 | |||
11 | #define VMALLOC_END 0xd8000000UL | ||
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index 495e31306fc0..2db78bd5c835 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | # | 4 | # |
5 | 5 | ||
6 | # Common objects | 6 | # Common objects |
7 | obj-y := time.o clock.o serial.o io.o psc.o \ | 7 | obj-y := time.o clock.o serial.o psc.o \ |
8 | dma.o usb.o common.o sram.o aemif.o | 8 | dma.o usb.o common.o sram.o aemif.o |
9 | 9 | ||
10 | obj-$(CONFIG_DAVINCI_MUX) += mux.o | 10 | obj-$(CONFIG_DAVINCI_MUX) += mux.o |
diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h index d1b954955c12..b2267d1e1a71 100644 --- a/arch/arm/mach-davinci/include/mach/io.h +++ b/arch/arm/mach-davinci/include/mach/io.h | |||
@@ -21,12 +21,4 @@ | |||
21 | #define __mem_pci(a) (a) | 21 | #define __mem_pci(a) (a) |
22 | #define __mem_isa(a) (a) | 22 | #define __mem_isa(a) (a) |
23 | 23 | ||
24 | #ifndef __ASSEMBLER__ | ||
25 | #define __arch_ioremap davinci_ioremap | ||
26 | #define __arch_iounmap davinci_iounmap | ||
27 | |||
28 | void __iomem *davinci_ioremap(unsigned long phys, size_t size, | ||
29 | unsigned int type); | ||
30 | void davinci_iounmap(volatile void __iomem *addr); | ||
31 | #endif | ||
32 | #endif /* __ASM_ARCH_IO_H */ | 24 | #endif /* __ASM_ARCH_IO_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/vmalloc.h b/arch/arm/mach-davinci/include/mach/vmalloc.h deleted file mode 100644 index d49646a8e206..000000000000 --- a/arch/arm/mach-davinci/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * DaVinci vmalloc definitions | ||
3 | * | ||
4 | * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com> | ||
5 | * | ||
6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | #include <mach/hardware.h> | ||
12 | |||
13 | /* Allow vmalloc range until the IO virtual range minus a 2M "hole" */ | ||
14 | #define VMALLOC_END (IO_VIRT - (2<<20)) | ||
diff --git a/arch/arm/mach-davinci/io.c b/arch/arm/mach-davinci/io.c deleted file mode 100644 index 8ea60a8b2495..000000000000 --- a/arch/arm/mach-davinci/io.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * DaVinci I/O mapping code | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 Texas Instruments | ||
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 | |||
11 | #include <linux/module.h> | ||
12 | #include <linux/io.h> | ||
13 | |||
14 | #include <asm/tlb.h> | ||
15 | #include <asm/mach/map.h> | ||
16 | |||
17 | #include <mach/common.h> | ||
18 | |||
19 | /* | ||
20 | * Intercept ioremap() requests for addresses in our fixed mapping regions. | ||
21 | */ | ||
22 | void __iomem *davinci_ioremap(unsigned long p, size_t size, unsigned int type) | ||
23 | { | ||
24 | struct map_desc *desc = davinci_soc_info.io_desc; | ||
25 | int desc_num = davinci_soc_info.io_desc_num; | ||
26 | int i; | ||
27 | |||
28 | for (i = 0; i < desc_num; i++, desc++) { | ||
29 | unsigned long iophys = __pfn_to_phys(desc->pfn); | ||
30 | unsigned long iosize = desc->length; | ||
31 | |||
32 | if (p >= iophys && (p + size) <= (iophys + iosize)) | ||
33 | return __io(desc->virtual + p - iophys); | ||
34 | } | ||
35 | |||
36 | return __arm_ioremap_caller(p, size, type, | ||
37 | __builtin_return_address(0)); | ||
38 | } | ||
39 | EXPORT_SYMBOL(davinci_ioremap); | ||
40 | |||
41 | void davinci_iounmap(volatile void __iomem *addr) | ||
42 | { | ||
43 | unsigned long virt = (unsigned long)addr; | ||
44 | |||
45 | if (virt >= VMALLOC_START && virt < VMALLOC_END) | ||
46 | __iounmap(addr); | ||
47 | } | ||
48 | EXPORT_SYMBOL(davinci_iounmap); | ||
diff --git a/arch/arm/mach-dove/include/mach/dove.h b/arch/arm/mach-dove/include/mach/dove.h index b20ec9af7882..ad1165d488c1 100644 --- a/arch/arm/mach-dove/include/mach/dove.h +++ b/arch/arm/mach-dove/include/mach/dove.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef __ASM_ARCH_DOVE_H | 11 | #ifndef __ASM_ARCH_DOVE_H |
12 | #define __ASM_ARCH_DOVE_H | 12 | #define __ASM_ARCH_DOVE_H |
13 | 13 | ||
14 | #include <mach/vmalloc.h> | ||
15 | |||
16 | /* | 14 | /* |
17 | * Marvell Dove address maps. | 15 | * Marvell Dove address maps. |
18 | * | 16 | * |
diff --git a/arch/arm/mach-dove/include/mach/vmalloc.h b/arch/arm/mach-dove/include/mach/vmalloc.h deleted file mode 100644 index a28792cf761e..000000000000 --- a/arch/arm/mach-dove/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-dove/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfd800000UL | ||
diff --git a/arch/arm/mach-ebsa110/include/mach/vmalloc.h b/arch/arm/mach-ebsa110/include/mach/vmalloc.h deleted file mode 100644 index ea141b7a3e03..000000000000 --- a/arch/arm/mach-ebsa110/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ebsa110/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 1998 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 | #define VMALLOC_END 0xdf000000UL | ||
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index 7b41651728cd..681e939407d4 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | 18 | ||
19 | #include <asm/hardware/vic.h> | ||
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | 22 | ||
@@ -36,6 +37,7 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board") | |||
36 | .atag_offset = 0x100, | 37 | .atag_offset = 0x100, |
37 | .map_io = ep93xx_map_io, | 38 | .map_io = ep93xx_map_io, |
38 | .init_irq = ep93xx_init_irq, | 39 | .init_irq = ep93xx_init_irq, |
40 | .handle_irq = vic_handle_irq, | ||
39 | .timer = &ep93xx_timer, | 41 | .timer = &ep93xx_timer, |
40 | .init_machine = adssphere_init_machine, | 42 | .init_machine = adssphere_init_machine, |
41 | .restart = ep93xx_restart, | 43 | .restart = ep93xx_restart, |
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index c5731c68acc0..d115653edca3 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <mach/ep93xx_spi.h> | 39 | #include <mach/ep93xx_spi.h> |
40 | #include <mach/gpio-ep93xx.h> | 40 | #include <mach/gpio-ep93xx.h> |
41 | 41 | ||
42 | #include <asm/hardware/vic.h> | ||
42 | #include <asm/mach-types.h> | 43 | #include <asm/mach-types.h> |
43 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
44 | 45 | ||
@@ -250,6 +251,7 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board") | |||
250 | .atag_offset = 0x100, | 251 | .atag_offset = 0x100, |
251 | .map_io = ep93xx_map_io, | 252 | .map_io = ep93xx_map_io, |
252 | .init_irq = ep93xx_init_irq, | 253 | .init_irq = ep93xx_init_irq, |
254 | .handle_irq = vic_handle_irq, | ||
253 | .timer = &ep93xx_timer, | 255 | .timer = &ep93xx_timer, |
254 | .init_machine = edb93xx_init_machine, | 256 | .init_machine = edb93xx_init_machine, |
255 | .restart = ep93xx_restart, | 257 | .restart = ep93xx_restart, |
@@ -262,6 +264,7 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") | |||
262 | .atag_offset = 0x100, | 264 | .atag_offset = 0x100, |
263 | .map_io = ep93xx_map_io, | 265 | .map_io = ep93xx_map_io, |
264 | .init_irq = ep93xx_init_irq, | 266 | .init_irq = ep93xx_init_irq, |
267 | .handle_irq = vic_handle_irq, | ||
265 | .timer = &ep93xx_timer, | 268 | .timer = &ep93xx_timer, |
266 | .init_machine = edb93xx_init_machine, | 269 | .init_machine = edb93xx_init_machine, |
267 | .restart = ep93xx_restart, | 270 | .restart = ep93xx_restart, |
@@ -274,6 +277,7 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") | |||
274 | .atag_offset = 0x100, | 277 | .atag_offset = 0x100, |
275 | .map_io = ep93xx_map_io, | 278 | .map_io = ep93xx_map_io, |
276 | .init_irq = ep93xx_init_irq, | 279 | .init_irq = ep93xx_init_irq, |
280 | .handle_irq = vic_handle_irq, | ||
277 | .timer = &ep93xx_timer, | 281 | .timer = &ep93xx_timer, |
278 | .init_machine = edb93xx_init_machine, | 282 | .init_machine = edb93xx_init_machine, |
279 | .restart = ep93xx_restart, | 283 | .restart = ep93xx_restart, |
@@ -286,6 +290,7 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board") | |||
286 | .atag_offset = 0x100, | 290 | .atag_offset = 0x100, |
287 | .map_io = ep93xx_map_io, | 291 | .map_io = ep93xx_map_io, |
288 | .init_irq = ep93xx_init_irq, | 292 | .init_irq = ep93xx_init_irq, |
293 | .handle_irq = vic_handle_irq, | ||
289 | .timer = &ep93xx_timer, | 294 | .timer = &ep93xx_timer, |
290 | .init_machine = edb93xx_init_machine, | 295 | .init_machine = edb93xx_init_machine, |
291 | .restart = ep93xx_restart, | 296 | .restart = ep93xx_restart, |
@@ -298,6 +303,7 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board") | |||
298 | .atag_offset = 0x100, | 303 | .atag_offset = 0x100, |
299 | .map_io = ep93xx_map_io, | 304 | .map_io = ep93xx_map_io, |
300 | .init_irq = ep93xx_init_irq, | 305 | .init_irq = ep93xx_init_irq, |
306 | .handle_irq = vic_handle_irq, | ||
301 | .timer = &ep93xx_timer, | 307 | .timer = &ep93xx_timer, |
302 | .init_machine = edb93xx_init_machine, | 308 | .init_machine = edb93xx_init_machine, |
303 | .restart = ep93xx_restart, | 309 | .restart = ep93xx_restart, |
@@ -310,6 +316,7 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") | |||
310 | .atag_offset = 0x100, | 316 | .atag_offset = 0x100, |
311 | .map_io = ep93xx_map_io, | 317 | .map_io = ep93xx_map_io, |
312 | .init_irq = ep93xx_init_irq, | 318 | .init_irq = ep93xx_init_irq, |
319 | .handle_irq = vic_handle_irq, | ||
313 | .timer = &ep93xx_timer, | 320 | .timer = &ep93xx_timer, |
314 | .init_machine = edb93xx_init_machine, | 321 | .init_machine = edb93xx_init_machine, |
315 | .restart = ep93xx_restart, | 322 | .restart = ep93xx_restart, |
@@ -322,6 +329,7 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") | |||
322 | .atag_offset = 0x100, | 329 | .atag_offset = 0x100, |
323 | .map_io = ep93xx_map_io, | 330 | .map_io = ep93xx_map_io, |
324 | .init_irq = ep93xx_init_irq, | 331 | .init_irq = ep93xx_init_irq, |
332 | .handle_irq = vic_handle_irq, | ||
325 | .timer = &ep93xx_timer, | 333 | .timer = &ep93xx_timer, |
326 | .init_machine = edb93xx_init_machine, | 334 | .init_machine = edb93xx_init_machine, |
327 | .restart = ep93xx_restart, | 335 | .restart = ep93xx_restart, |
@@ -334,6 +342,7 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") | |||
334 | .atag_offset = 0x100, | 342 | .atag_offset = 0x100, |
335 | .map_io = ep93xx_map_io, | 343 | .map_io = ep93xx_map_io, |
336 | .init_irq = ep93xx_init_irq, | 344 | .init_irq = ep93xx_init_irq, |
345 | .handle_irq = vic_handle_irq, | ||
337 | .timer = &ep93xx_timer, | 346 | .timer = &ep93xx_timer, |
338 | .init_machine = edb93xx_init_machine, | 347 | .init_machine = edb93xx_init_machine, |
339 | .restart = ep93xx_restart, | 348 | .restart = ep93xx_restart, |
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index 7b89e8a1bb7b..af46970dc58e 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | 18 | ||
19 | #include <asm/hardware/vic.h> | ||
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | 22 | ||
@@ -36,6 +37,7 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") | |||
36 | .atag_offset = 0x100, | 37 | .atag_offset = 0x100, |
37 | .map_io = ep93xx_map_io, | 38 | .map_io = ep93xx_map_io, |
38 | .init_irq = ep93xx_init_irq, | 39 | .init_irq = ep93xx_init_irq, |
40 | .handle_irq = vic_handle_irq, | ||
39 | .timer = &ep93xx_timer, | 41 | .timer = &ep93xx_timer, |
40 | .init_machine = gesbc9312_init_machine, | 42 | .init_machine = gesbc9312_init_machine, |
41 | .restart = ep93xx_restart, | 43 | .restart = ep93xx_restart, |
diff --git a/arch/arm/mach-ep93xx/include/mach/entry-macro.S b/arch/arm/mach-ep93xx/include/mach/entry-macro.S index 96b85e2c2c0b..9be6edcf9045 100644 --- a/arch/arm/mach-ep93xx/include/mach/entry-macro.S +++ b/arch/arm/mach-ep93xx/include/mach/entry-macro.S | |||
@@ -9,51 +9,9 @@ | |||
9 | * the Free Software Foundation; either version 2 of the License, or (at | 9 | * the Free Software Foundation; either version 2 of the License, or (at |
10 | * your option) any later version. | 10 | * your option) any later version. |
11 | */ | 11 | */ |
12 | #include <mach/ep93xx-regs.h> | ||
13 | 12 | ||
14 | .macro disable_fiq | 13 | .macro disable_fiq |
15 | .endm | 14 | .endm |
16 | 15 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | 16 | .macro arch_ret_to_user, tmp1, tmp2 |
21 | .endm | 17 | .endm |
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | ldr \base, =(EP93XX_AHB_VIRT_BASE) | ||
25 | orr \base, \base, #0x000b0000 | ||
26 | mov \irqnr, #0 | ||
27 | ldr \irqstat, [\base] @ lower 32 interrupts | ||
28 | cmp \irqstat, #0 | ||
29 | bne 1001f | ||
30 | |||
31 | eor \base, \base, #0x00070000 | ||
32 | ldr \irqstat, [\base] @ upper 32 interrupts | ||
33 | cmp \irqstat, #0 | ||
34 | beq 1002f | ||
35 | mov \irqnr, #0x20 | ||
36 | |||
37 | 1001: | ||
38 | movs \tmp, \irqstat, lsl #16 | ||
39 | movne \irqstat, \tmp | ||
40 | addeq \irqnr, \irqnr, #16 | ||
41 | |||
42 | movs \tmp, \irqstat, lsl #8 | ||
43 | movne \irqstat, \tmp | ||
44 | addeq \irqnr, \irqnr, #8 | ||
45 | |||
46 | movs \tmp, \irqstat, lsl #4 | ||
47 | movne \irqstat, \tmp | ||
48 | addeq \irqnr, \irqnr, #4 | ||
49 | |||
50 | movs \tmp, \irqstat, lsl #2 | ||
51 | movne \irqstat, \tmp | ||
52 | addeq \irqnr, \irqnr, #2 | ||
53 | |||
54 | movs \tmp, \irqstat, lsl #1 | ||
55 | addeq \irqnr, \irqnr, #1 | ||
56 | orrs \base, \base, #1 | ||
57 | |||
58 | 1002: | ||
59 | .endm | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/vmalloc.h b/arch/arm/mach-ep93xx/include/mach/vmalloc.h deleted file mode 100644 index 1b3f25d03d39..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe800000UL | ||
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c index 050ce9216d7c..7b98084f0c97 100644 --- a/arch/arm/mach-ep93xx/micro9.c +++ b/arch/arm/mach-ep93xx/micro9.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
20 | 20 | ||
21 | #include <asm/hardware/vic.h> | ||
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
23 | 24 | ||
@@ -80,6 +81,7 @@ MACHINE_START(MICRO9, "Contec Micro9-High") | |||
80 | .atag_offset = 0x100, | 81 | .atag_offset = 0x100, |
81 | .map_io = ep93xx_map_io, | 82 | .map_io = ep93xx_map_io, |
82 | .init_irq = ep93xx_init_irq, | 83 | .init_irq = ep93xx_init_irq, |
84 | .handle_irq = vic_handle_irq, | ||
83 | .timer = &ep93xx_timer, | 85 | .timer = &ep93xx_timer, |
84 | .init_machine = micro9_init_machine, | 86 | .init_machine = micro9_init_machine, |
85 | .restart = ep93xx_restart, | 87 | .restart = ep93xx_restart, |
@@ -92,6 +94,7 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid") | |||
92 | .atag_offset = 0x100, | 94 | .atag_offset = 0x100, |
93 | .map_io = ep93xx_map_io, | 95 | .map_io = ep93xx_map_io, |
94 | .init_irq = ep93xx_init_irq, | 96 | .init_irq = ep93xx_init_irq, |
97 | .handle_irq = vic_handle_irq, | ||
95 | .timer = &ep93xx_timer, | 98 | .timer = &ep93xx_timer, |
96 | .init_machine = micro9_init_machine, | 99 | .init_machine = micro9_init_machine, |
97 | .restart = ep93xx_restart, | 100 | .restart = ep93xx_restart, |
@@ -104,6 +107,7 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite") | |||
104 | .atag_offset = 0x100, | 107 | .atag_offset = 0x100, |
105 | .map_io = ep93xx_map_io, | 108 | .map_io = ep93xx_map_io, |
106 | .init_irq = ep93xx_init_irq, | 109 | .init_irq = ep93xx_init_irq, |
110 | .handle_irq = vic_handle_irq, | ||
107 | .timer = &ep93xx_timer, | 111 | .timer = &ep93xx_timer, |
108 | .init_machine = micro9_init_machine, | 112 | .init_machine = micro9_init_machine, |
109 | .restart = ep93xx_restart, | 113 | .restart = ep93xx_restart, |
@@ -116,6 +120,7 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim") | |||
116 | .atag_offset = 0x100, | 120 | .atag_offset = 0x100, |
117 | .map_io = ep93xx_map_io, | 121 | .map_io = ep93xx_map_io, |
118 | .init_irq = ep93xx_init_irq, | 122 | .init_irq = ep93xx_init_irq, |
123 | .handle_irq = vic_handle_irq, | ||
119 | .timer = &ep93xx_timer, | 124 | .timer = &ep93xx_timer, |
120 | .init_machine = micro9_init_machine, | 125 | .init_machine = micro9_init_machine, |
121 | .restart = ep93xx_restart, | 126 | .restart = ep93xx_restart, |
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index 188cbdb4dbda..f4e553eca21c 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <mach/fb.h> | 25 | #include <mach/fb.h> |
26 | #include <mach/gpio-ep93xx.h> | 26 | #include <mach/gpio-ep93xx.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | 31 | ||
@@ -80,6 +81,7 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") | |||
80 | .atag_offset = 0x100, | 81 | .atag_offset = 0x100, |
81 | .map_io = ep93xx_map_io, | 82 | .map_io = ep93xx_map_io, |
82 | .init_irq = ep93xx_init_irq, | 83 | .init_irq = ep93xx_init_irq, |
84 | .handle_irq = vic_handle_irq, | ||
83 | .timer = &ep93xx_timer, | 85 | .timer = &ep93xx_timer, |
84 | .init_machine = simone_init_machine, | 86 | .init_machine = simone_init_machine, |
85 | .restart = ep93xx_restart, | 87 | .restart = ep93xx_restart, |
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c index 797afdee80ab..fd846331ddff 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c +++ b/arch/arm/mach-ep93xx/snappercl15.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <mach/fb.h> | 31 | #include <mach/fb.h> |
32 | #include <mach/gpio-ep93xx.h> | 32 | #include <mach/gpio-ep93xx.h> |
33 | 33 | ||
34 | #include <asm/hardware/vic.h> | ||
34 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
36 | 37 | ||
@@ -177,6 +178,7 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15") | |||
177 | .atag_offset = 0x100, | 178 | .atag_offset = 0x100, |
178 | .map_io = ep93xx_map_io, | 179 | .map_io = ep93xx_map_io, |
179 | .init_irq = ep93xx_init_irq, | 180 | .init_irq = ep93xx_init_irq, |
181 | .handle_irq = vic_handle_irq, | ||
180 | .timer = &ep93xx_timer, | 182 | .timer = &ep93xx_timer, |
181 | .init_machine = snappercl15_init_machine, | 183 | .init_machine = snappercl15_init_machine, |
182 | .restart = ep93xx_restart, | 184 | .restart = ep93xx_restart, |
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index de9bb541b550..79f8ecf07a19 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/ts72xx.h> | 24 | #include <mach/ts72xx.h> |
25 | 25 | ||
26 | #include <asm/hardware/vic.h> | ||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
@@ -247,6 +248,7 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") | |||
247 | .atag_offset = 0x100, | 248 | .atag_offset = 0x100, |
248 | .map_io = ts72xx_map_io, | 249 | .map_io = ts72xx_map_io, |
249 | .init_irq = ep93xx_init_irq, | 250 | .init_irq = ep93xx_init_irq, |
251 | .handle_irq = vic_handle_irq, | ||
250 | .timer = &ep93xx_timer, | 252 | .timer = &ep93xx_timer, |
251 | .init_machine = ts72xx_init_machine, | 253 | .init_machine = ts72xx_init_machine, |
252 | .restart = ep93xx_restart, | 254 | .restart = ep93xx_restart, |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 724ec0f3560d..e1efbca2a539 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -17,6 +17,8 @@ choice | |||
17 | 17 | ||
18 | config ARCH_EXYNOS4 | 18 | config ARCH_EXYNOS4 |
19 | bool "SAMSUNG EXYNOS4" | 19 | bool "SAMSUNG EXYNOS4" |
20 | select HAVE_SMP | ||
21 | select MIGHT_HAVE_CACHE_L2X0 | ||
20 | help | 22 | help |
21 | Samsung EXYNOS4 SoCs based systems | 23 | Samsung EXYNOS4 SoCs based systems |
22 | 24 | ||
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 6f567a4d8519..d2acb0f948c6 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -175,11 +175,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { | |||
175 | .length = SZ_4K, | 175 | .length = SZ_4K, |
176 | .type = MT_DEVICE, | 176 | .type = MT_DEVICE, |
177 | }, { | 177 | }, { |
178 | .virtual = (unsigned long)S5P_VA_SROMC, | ||
179 | .pfn = __phys_to_pfn(EXYNOS4_PA_SROMC), | ||
180 | .length = SZ_4K, | ||
181 | .type = MT_DEVICE, | ||
182 | }, { | ||
183 | .virtual = (unsigned long)S3C_VA_USB_HSPHY, | 178 | .virtual = (unsigned long)S3C_VA_USB_HSPHY, |
184 | .pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY), | 179 | .pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY), |
185 | .length = SZ_4K, | 180 | .length = SZ_4K, |
diff --git a/arch/arm/mach-exynos/include/mach/entry-macro.S b/arch/arm/mach-exynos/include/mach/entry-macro.S index f5e9fd8e37b4..3ba4f547534b 100644 --- a/arch/arm/mach-exynos/include/mach/entry-macro.S +++ b/arch/arm/mach-exynos/include/mach/entry-macro.S | |||
@@ -9,83 +9,8 @@ | |||
9 | * warranty of any kind, whether express or implied. | 9 | * warranty of any kind, whether express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <mach/hardware.h> | ||
13 | #include <mach/map.h> | ||
14 | #include <asm/hardware/gic.h> | ||
15 | |||
16 | .macro disable_fiq | 12 | .macro disable_fiq |
17 | .endm | 13 | .endm |
18 | 14 | ||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | mov \tmp, #0 | ||
21 | |||
22 | mrc p15, 0, \base, c0, c0, 5 | ||
23 | and \base, \base, #3 | ||
24 | cmp \base, #0 | ||
25 | beq 1f | ||
26 | |||
27 | ldr \tmp, =gic_bank_offset | ||
28 | ldr \tmp, [\tmp] | ||
29 | cmp \base, #1 | ||
30 | beq 1f | ||
31 | |||
32 | cmp \base, #2 | ||
33 | addeq \tmp, \tmp, \tmp | ||
34 | addne \tmp, \tmp, \tmp, LSL #1 | ||
35 | |||
36 | 1: ldr \base, =gic_cpu_base_addr | ||
37 | ldr \base, [\base] | ||
38 | add \base, \base, \tmp | ||
39 | .endm | ||
40 | |||
41 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
42 | .endm | 16 | .endm |
43 | |||
44 | /* | ||
45 | * The interrupt numbering scheme is defined in the | ||
46 | * interrupt controller spec. To wit: | ||
47 | * | ||
48 | * Interrupts 0-15 are IPI | ||
49 | * 16-28 are reserved | ||
50 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
51 | * 32-1020 are global | ||
52 | * 1021-1022 are reserved | ||
53 | * 1023 is "spurious" (no interrupt) | ||
54 | * | ||
55 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
56 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
57 | * | ||
58 | * A simple read from the controller will tell us the number of the highest | ||
59 | * priority enabled interrupt. We then just need to check whether it is in the | ||
60 | * valid range for an IRQ (30-1020 inclusive). | ||
61 | */ | ||
62 | |||
63 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
64 | |||
65 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ | ||
66 | |||
67 | ldr \tmp, =1021 | ||
68 | |||
69 | bic \irqnr, \irqstat, #0x1c00 | ||
70 | |||
71 | cmp \irqnr, #15 | ||
72 | cmpcc \irqnr, \irqnr | ||
73 | cmpne \irqnr, \tmp | ||
74 | cmpcs \irqnr, \irqnr | ||
75 | addne \irqnr, \irqnr, #32 | ||
76 | |||
77 | .endm | ||
78 | |||
79 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
80 | * register) is preserved from the macro above. | ||
81 | * If there is an IPI, we immediately signal end of interrupt on the | ||
82 | * controller, since this requires the original irqstat value which | ||
83 | * we won't easily be able to recreate later. | ||
84 | */ | ||
85 | |||
86 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
87 | bic \irqnr, \irqstat, #0x1c00 | ||
88 | cmp \irqnr, #16 | ||
89 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
90 | cmpcs \irqnr, \irqnr | ||
91 | .endm | ||
diff --git a/arch/arm/mach-exynos/include/mach/vmalloc.h b/arch/arm/mach-exynos/include/mach/vmalloc.h deleted file mode 100644 index 284330e571d2..000000000000 --- a/arch/arm/mach-exynos/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/include/mach/vmalloc.h | ||
2 | * | ||
3 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Copyright 2010 Ben Dooks <ben-linux@fluff.org> | ||
7 | * | ||
8 | * Based on arch/arm/mach-s5p6440/include/mach/vmalloc.h | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * EXYNOS4 vmalloc definition | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_VMALLOC_H | ||
18 | #define __ASM_ARCH_VMALLOC_H __FILE__ | ||
19 | |||
20 | #define VMALLOC_END 0xF6000000UL | ||
21 | |||
22 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c index 9a2b99646d26..d726fcd3acf9 100644 --- a/arch/arm/mach-exynos/mach-armlex4210.c +++ b/arch/arm/mach-exynos/mach-armlex4210.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smsc911x.h> | 16 | #include <linux/smsc911x.h> |
17 | 17 | ||
18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | #include <asm/hardware/gic.h> | ||
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | 21 | ||
21 | #include <plat/cpu.h> | 22 | #include <plat/cpu.h> |
@@ -211,6 +212,7 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") | |||
211 | .atag_offset = 0x100, | 212 | .atag_offset = 0x100, |
212 | .init_irq = exynos4_init_irq, | 213 | .init_irq = exynos4_init_irq, |
213 | .map_io = armlex4210_map_io, | 214 | .map_io = armlex4210_map_io, |
215 | .handle_irq = gic_handle_irq, | ||
214 | .init_machine = armlex4210_machine_init, | 216 | .init_machine = armlex4210_machine_init, |
215 | .timer = &exynos4_timer, | 217 | .timer = &exynos4_timer, |
216 | .restart = exynos4_restart, | 218 | .restart = exynos4_restart, |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 5f6b97f04b70..635fb97e31ab 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <media/v4l2-mediabus.h> | 32 | #include <media/v4l2-mediabus.h> |
33 | 33 | ||
34 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
35 | #include <asm/hardware/gic.h> | ||
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
36 | 37 | ||
37 | #include <plat/adc.h> | 38 | #include <plat/adc.h> |
@@ -1334,6 +1335,7 @@ MACHINE_START(NURI, "NURI") | |||
1334 | .atag_offset = 0x100, | 1335 | .atag_offset = 0x100, |
1335 | .init_irq = exynos4_init_irq, | 1336 | .init_irq = exynos4_init_irq, |
1336 | .map_io = nuri_map_io, | 1337 | .map_io = nuri_map_io, |
1338 | .handle_irq = gic_handle_irq, | ||
1337 | .init_machine = nuri_machine_init, | 1339 | .init_machine = nuri_machine_init, |
1338 | .timer = &exynos4_timer, | 1340 | .timer = &exynos4_timer, |
1339 | .reserve = &nuri_reserve, | 1341 | .reserve = &nuri_reserve, |
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 9536b3356919..586eb995aa96 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/lcd.h> | 22 | #include <linux/lcd.h> |
23 | 23 | ||
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/hardware/gic.h> | ||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | 27 | ||
27 | #include <video/platform_lcd.h> | 28 | #include <video/platform_lcd.h> |
@@ -695,6 +696,7 @@ MACHINE_START(ORIGEN, "ORIGEN") | |||
695 | .atag_offset = 0x100, | 696 | .atag_offset = 0x100, |
696 | .init_irq = exynos4_init_irq, | 697 | .init_irq = exynos4_init_irq, |
697 | .map_io = origen_map_io, | 698 | .map_io = origen_map_io, |
699 | .handle_irq = gic_handle_irq, | ||
698 | .init_machine = origen_machine_init, | 700 | .init_machine = origen_machine_init, |
699 | .timer = &exynos4_timer, | 701 | .timer = &exynos4_timer, |
700 | .reserve = &origen_reserve, | 702 | .reserve = &origen_reserve, |
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index 375b5aa5e163..d00e4f016a68 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | 22 | ||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/hardware/gic.h> | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | 26 | ||
26 | #include <plat/backlight.h> | 27 | #include <plat/backlight.h> |
@@ -288,6 +289,7 @@ MACHINE_START(SMDK4212, "SMDK4212") | |||
288 | .atag_offset = 0x100, | 289 | .atag_offset = 0x100, |
289 | .init_irq = exynos4_init_irq, | 290 | .init_irq = exynos4_init_irq, |
290 | .map_io = smdk4x12_map_io, | 291 | .map_io = smdk4x12_map_io, |
292 | .handle_irq = gic_handle_irq, | ||
291 | .init_machine = smdk4x12_machine_init, | 293 | .init_machine = smdk4x12_machine_init, |
292 | .timer = &exynos4_timer, | 294 | .timer = &exynos4_timer, |
293 | .restart = exynos4_restart, | 295 | .restart = exynos4_restart, |
@@ -299,6 +301,7 @@ MACHINE_START(SMDK4412, "SMDK4412") | |||
299 | .atag_offset = 0x100, | 301 | .atag_offset = 0x100, |
300 | .init_irq = exynos4_init_irq, | 302 | .init_irq = exynos4_init_irq, |
301 | .map_io = smdk4x12_map_io, | 303 | .map_io = smdk4x12_map_io, |
304 | .handle_irq = gic_handle_irq, | ||
302 | .init_machine = smdk4x12_machine_init, | 305 | .init_machine = smdk4x12_machine_init, |
303 | .timer = &exynos4_timer, | 306 | .timer = &exynos4_timer, |
304 | .restart = exynos4_restart, | 307 | .restart = exynos4_restart, |
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index f2552ff5ddb0..5b365613b470 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pwm_backlight.h> | 21 | #include <linux/pwm_backlight.h> |
22 | 22 | ||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/hardware/gic.h> | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | 26 | ||
26 | #include <video/platform_lcd.h> | 27 | #include <video/platform_lcd.h> |
@@ -376,6 +377,7 @@ MACHINE_START(SMDKV310, "SMDKV310") | |||
376 | .atag_offset = 0x100, | 377 | .atag_offset = 0x100, |
377 | .init_irq = exynos4_init_irq, | 378 | .init_irq = exynos4_init_irq, |
378 | .map_io = smdkv310_map_io, | 379 | .map_io = smdkv310_map_io, |
380 | .handle_irq = gic_handle_irq, | ||
379 | .init_machine = smdkv310_machine_init, | 381 | .init_machine = smdkv310_machine_init, |
380 | .timer = &exynos4_timer, | 382 | .timer = &exynos4_timer, |
381 | .reserve = &smdkv310_reserve, | 383 | .reserve = &smdkv310_reserve, |
@@ -387,6 +389,7 @@ MACHINE_START(SMDKC210, "SMDKC210") | |||
387 | .atag_offset = 0x100, | 389 | .atag_offset = 0x100, |
388 | .init_irq = exynos4_init_irq, | 390 | .init_irq = exynos4_init_irq, |
389 | .map_io = smdkv310_map_io, | 391 | .map_io = smdkv310_map_io, |
392 | .handle_irq = gic_handle_irq, | ||
390 | .init_machine = smdkv310_machine_init, | 393 | .init_machine = smdkv310_machine_init, |
391 | .timer = &exynos4_timer, | 394 | .timer = &exynos4_timer, |
392 | .restart = exynos4_restart, | 395 | .restart = exynos4_restart, |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 0078d062616e..52aea972746a 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/i2c/atmel_mxt_ts.h> | 24 | #include <linux/i2c/atmel_mxt_ts.h> |
25 | 25 | ||
26 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | #include <asm/hardware/gic.h> | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | 29 | ||
29 | #include <plat/regs-serial.h> | 30 | #include <plat/regs-serial.h> |
@@ -1059,6 +1060,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") | |||
1059 | .atag_offset = 0x100, | 1060 | .atag_offset = 0x100, |
1060 | .init_irq = exynos4_init_irq, | 1061 | .init_irq = exynos4_init_irq, |
1061 | .map_io = universal_map_io, | 1062 | .map_io = universal_map_io, |
1063 | .handle_irq = gic_handle_irq, | ||
1062 | .init_machine = universal_machine_init, | 1064 | .init_machine = universal_machine_init, |
1063 | .timer = &exynos4_timer, | 1065 | .timer = &exynos4_timer, |
1064 | .reserve = &universal_reserve, | 1066 | .reserve = &universal_reserve, |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 69ffb2fb3875..60bc45e3e709 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include <plat/cpu.h> | 33 | #include <plat/cpu.h> |
34 | 34 | ||
35 | extern unsigned int gic_bank_offset; | ||
36 | extern void exynos4_secondary_startup(void); | 35 | extern void exynos4_secondary_startup(void); |
37 | 36 | ||
38 | #define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ | 37 | #define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ |
@@ -65,31 +64,6 @@ static void __iomem *scu_base_addr(void) | |||
65 | 64 | ||
66 | static DEFINE_SPINLOCK(boot_lock); | 65 | static DEFINE_SPINLOCK(boot_lock); |
67 | 66 | ||
68 | static void __cpuinit exynos4_gic_secondary_init(void) | ||
69 | { | ||
70 | void __iomem *dist_base = S5P_VA_GIC_DIST + | ||
71 | (gic_bank_offset * smp_processor_id()); | ||
72 | void __iomem *cpu_base = S5P_VA_GIC_CPU + | ||
73 | (gic_bank_offset * smp_processor_id()); | ||
74 | int i; | ||
75 | |||
76 | /* | ||
77 | * Deal with the banked PPI and SGI interrupts - disable all | ||
78 | * PPI interrupts, ensure all SGI interrupts are enabled. | ||
79 | */ | ||
80 | __raw_writel(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR); | ||
81 | __raw_writel(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET); | ||
82 | |||
83 | /* | ||
84 | * Set priority on PPI and SGI interrupts | ||
85 | */ | ||
86 | for (i = 0; i < 32; i += 4) | ||
87 | __raw_writel(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4); | ||
88 | |||
89 | __raw_writel(0xf0, cpu_base + GIC_CPU_PRIMASK); | ||
90 | __raw_writel(1, cpu_base + GIC_CPU_CTRL); | ||
91 | } | ||
92 | |||
93 | void __cpuinit platform_secondary_init(unsigned int cpu) | 67 | void __cpuinit platform_secondary_init(unsigned int cpu) |
94 | { | 68 | { |
95 | /* | 69 | /* |
@@ -97,7 +71,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
97 | * core (e.g. timer irq), then they will not have been enabled | 71 | * core (e.g. timer irq), then they will not have been enabled |
98 | * for us: do so | 72 | * for us: do so |
99 | */ | 73 | */ |
100 | exynos4_gic_secondary_init(); | 74 | gic_secondary_init(0); |
101 | 75 | ||
102 | /* | 76 | /* |
103 | * let the primary processor know we're out of the | 77 | * let the primary processor know we're out of the |
diff --git a/arch/arm/mach-footbridge/include/mach/vmalloc.h b/arch/arm/mach-footbridge/include/mach/vmalloc.h deleted file mode 100644 index 40ba78e5782b..000000000000 --- a/arch/arm/mach-footbridge/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-footbridge/include/mach/vmalloc.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | |||
10 | #define VMALLOC_END 0xf0000000UL | ||
diff --git a/arch/arm/mach-gemini/include/mach/vmalloc.h b/arch/arm/mach-gemini/include/mach/vmalloc.h deleted file mode 100644 index 45371eb86fcb..000000000000 --- a/arch/arm/mach-gemini/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #define VMALLOC_END 0xf0000000UL | ||
diff --git a/arch/arm/mach-h720x/include/mach/vmalloc.h b/arch/arm/mach-h720x/include/mach/vmalloc.h deleted file mode 100644 index 8520b4a4d4e6..000000000000 --- a/arch/arm/mach-h720x/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-h720x/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ARCH_ARM_VMALLOC_H | ||
6 | #define __ARCH_ARM_VMALLOC_H | ||
7 | |||
8 | #define VMALLOC_END 0xd0000000UL | ||
9 | |||
10 | #endif | ||
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 4508384f100f..804c4a55f803 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -144,6 +144,7 @@ DT_MACHINE_START(HIGHBANK, "Highbank") | |||
144 | .map_io = highbank_map_io, | 144 | .map_io = highbank_map_io, |
145 | .init_irq = highbank_init_irq, | 145 | .init_irq = highbank_init_irq, |
146 | .timer = &highbank_timer, | 146 | .timer = &highbank_timer, |
147 | .handle_irq = gic_handle_irq, | ||
147 | .init_machine = highbank_init, | 148 | .init_machine = highbank_init, |
148 | .dt_compat = highbank_match, | 149 | .dt_compat = highbank_match, |
149 | .restart = highbank_restart, | 150 | .restart = highbank_restart, |
diff --git a/arch/arm/mach-highbank/include/mach/entry-macro.S b/arch/arm/mach-highbank/include/mach/entry-macro.S index 73c11297509e..a14f9e62ca92 100644 --- a/arch/arm/mach-highbank/include/mach/entry-macro.S +++ b/arch/arm/mach-highbank/include/mach/entry-macro.S | |||
@@ -1,5 +1,3 @@ | |||
1 | #include <asm/hardware/entry-macro-gic.S> | ||
2 | |||
3 | .macro disable_fiq | 1 | .macro disable_fiq |
4 | .endm | 2 | .endm |
5 | 3 | ||
diff --git a/arch/arm/mach-highbank/include/mach/vmalloc.h b/arch/arm/mach-highbank/include/mach/vmalloc.h deleted file mode 100644 index 1969e954277a..000000000000 --- a/arch/arm/mach-highbank/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #define VMALLOC_END 0xFEE00000UL | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa974e79c..35a218cb5c7e 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -132,7 +132,7 @@ config MACH_MX25_3DS | |||
132 | select IMX_HAVE_PLATFORM_MXC_NAND | 132 | select IMX_HAVE_PLATFORM_MXC_NAND |
133 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 133 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
134 | 134 | ||
135 | config MACH_EUKREA_CPUIMX25 | 135 | config MACH_EUKREA_CPUIMX25SD |
136 | bool "Support Eukrea CPUIMX25 Platform" | 136 | bool "Support Eukrea CPUIMX25 Platform" |
137 | select SOC_IMX25 | 137 | select SOC_IMX25 |
138 | select IMX_HAVE_PLATFORM_FLEXCAN | 138 | select IMX_HAVE_PLATFORM_FLEXCAN |
@@ -148,7 +148,7 @@ config MACH_EUKREA_CPUIMX25 | |||
148 | 148 | ||
149 | choice | 149 | choice |
150 | prompt "Baseboard" | 150 | prompt "Baseboard" |
151 | depends on MACH_EUKREA_CPUIMX25 | 151 | depends on MACH_EUKREA_CPUIMX25SD |
152 | default MACH_EUKREA_MBIMXSD25_BASEBOARD | 152 | default MACH_EUKREA_MBIMXSD25_BASEBOARD |
153 | 153 | ||
154 | config MACH_EUKREA_MBIMXSD25_BASEBOARD | 154 | config MACH_EUKREA_MBIMXSD25_BASEBOARD |
@@ -542,7 +542,7 @@ config MACH_MX35_3DS | |||
542 | Include support for MX35PDK platform. This includes specific | 542 | Include support for MX35PDK platform. This includes specific |
543 | configurations for the board and its peripherals. | 543 | configurations for the board and its peripherals. |
544 | 544 | ||
545 | config MACH_EUKREA_CPUIMX35 | 545 | config MACH_EUKREA_CPUIMX35SD |
546 | bool "Support Eukrea CPUIMX35 Platform" | 546 | bool "Support Eukrea CPUIMX35 Platform" |
547 | select SOC_IMX35 | 547 | select SOC_IMX35 |
548 | select IMX_HAVE_PLATFORM_FLEXCAN | 548 | select IMX_HAVE_PLATFORM_FLEXCAN |
@@ -560,7 +560,7 @@ config MACH_EUKREA_CPUIMX35 | |||
560 | 560 | ||
561 | choice | 561 | choice |
562 | prompt "Baseboard" | 562 | prompt "Baseboard" |
563 | depends on MACH_EUKREA_CPUIMX35 | 563 | depends on MACH_EUKREA_CPUIMX35SD |
564 | default MACH_EUKREA_MBIMXSD35_BASEBOARD | 564 | default MACH_EUKREA_MBIMXSD35_BASEBOARD |
565 | 565 | ||
566 | config MACH_EUKREA_MBIMXSD35_BASEBOARD | 566 | config MACH_EUKREA_MBIMXSD35_BASEBOARD |
@@ -596,12 +596,12 @@ comment "i.MX6 family:" | |||
596 | config SOC_IMX6Q | 596 | config SOC_IMX6Q |
597 | bool "i.MX6 Quad support" | 597 | bool "i.MX6 Quad support" |
598 | select ARM_GIC | 598 | select ARM_GIC |
599 | select CACHE_L2X0 | ||
600 | select CPU_V7 | 599 | select CPU_V7 |
601 | select HAVE_ARM_SCU | 600 | select HAVE_ARM_SCU |
602 | select HAVE_IMX_GPC | 601 | select HAVE_IMX_GPC |
603 | select HAVE_IMX_MMDC | 602 | select HAVE_IMX_MMDC |
604 | select HAVE_IMX_SRC | 603 | select HAVE_IMX_SRC |
604 | select HAVE_SMP | ||
605 | select USE_OF | 605 | select USE_OF |
606 | 606 | ||
607 | help | 607 | help |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index aba73214c2a8..d97f409ce98b 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -24,7 +24,7 @@ obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o | |||
24 | 24 | ||
25 | # i.MX25 based machines | 25 | # i.MX25 based machines |
26 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o | 26 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o |
27 | obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-eukrea_cpuimx25.o | 27 | obj-$(CONFIG_MACH_EUKREA_CPUIMX25SD) += mach-eukrea_cpuimx25.o |
28 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o | 28 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o |
29 | 29 | ||
30 | # i.MX27 based machines | 30 | # i.MX27 based machines |
@@ -57,7 +57,7 @@ obj-$(CONFIG_MACH_BUG) += mach-bug.o | |||
57 | # i.MX35 based machines | 57 | # i.MX35 based machines |
58 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o | 58 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o |
59 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o | 59 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o |
60 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o | 60 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o |
61 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o | 61 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o |
62 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o | 62 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o |
63 | 63 | ||
diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c index 8116f119517d..ac8238caecb9 100644 --- a/arch/arm/mach-imx/clock-imx35.c +++ b/arch/arm/mach-imx/clock-imx35.c | |||
@@ -507,7 +507,7 @@ static struct clk_lookup lookups[] = { | |||
507 | 507 | ||
508 | int __init mx35_clocks_init() | 508 | int __init mx35_clocks_init() |
509 | { | 509 | { |
510 | unsigned int cgr2 = 3 << 26, cgr3 = 0; | 510 | unsigned int cgr2 = 3 << 26; |
511 | 511 | ||
512 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) | 512 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) |
513 | cgr2 |= 3 << 16; | 513 | cgr2 |= 3 << 16; |
@@ -521,6 +521,12 @@ int __init mx35_clocks_init() | |||
521 | __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); | 521 | __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); |
522 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), | 522 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), |
523 | CCM_BASE + CCM_CGR1); | 523 | CCM_BASE + CCM_CGR1); |
524 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | ||
525 | __raw_writel(0, CCM_BASE + CCM_CGR3); | ||
526 | |||
527 | clk_enable(&iim_clk); | ||
528 | imx_print_silicon_rev("i.MX35", mx35_revision()); | ||
529 | clk_disable(&iim_clk); | ||
524 | 530 | ||
525 | /* | 531 | /* |
526 | * Check if we came up in internal boot mode. If yes, we need some | 532 | * Check if we came up in internal boot mode. If yes, we need some |
@@ -529,17 +535,11 @@ int __init mx35_clocks_init() | |||
529 | */ | 535 | */ |
530 | if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) { | 536 | if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) { |
531 | /* Additionally turn on UART1, SCC, and IIM clocks */ | 537 | /* Additionally turn on UART1, SCC, and IIM clocks */ |
532 | cgr2 |= 3 << 16 | 3 << 4; | 538 | clk_enable(&iim_clk); |
533 | cgr3 |= 3 << 2; | 539 | clk_enable(&uart1_clk); |
540 | clk_enable(&scc_clk); | ||
534 | } | 541 | } |
535 | 542 | ||
536 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | ||
537 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); | ||
538 | |||
539 | clk_enable(&iim_clk); | ||
540 | imx_print_silicon_rev("i.MX35", mx35_revision()); | ||
541 | clk_disable(&iim_clk); | ||
542 | |||
543 | #ifdef CONFIG_MXC_USE_EPIT | 543 | #ifdef CONFIG_MXC_USE_EPIT |
544 | epit_timer_init(&epit1_clk, | 544 | epit_timer_init(&epit1_clk, |
545 | MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); | 545 | MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 012e120509e0..8ecc872b2547 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -53,12 +53,18 @@ static const struct imxi2c_platform_data | |||
53 | .bitrate = 100000, | 53 | .bitrate = 100000, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) | ||
57 | static int tsc2007_get_pendown_state(void) | ||
58 | { | ||
59 | return !gpio_get_value(TSC2007_IRQGPIO); | ||
60 | } | ||
61 | |||
56 | static struct tsc2007_platform_data tsc2007_info = { | 62 | static struct tsc2007_platform_data tsc2007_info = { |
57 | .model = 2007, | 63 | .model = 2007, |
58 | .x_plate_ohms = 180, | 64 | .x_plate_ohms = 180, |
65 | .get_pendown_state = tsc2007_get_pendown_state, | ||
59 | }; | 66 | }; |
60 | 67 | ||
61 | #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) | ||
62 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | 68 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { |
63 | { | 69 | { |
64 | I2C_BOARD_INFO("pcf8563", 0x51), | 70 | I2C_BOARD_INFO("pcf8563", 0x51), |
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index dfd18f3b50e8..350e26636a06 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig | |||
@@ -6,6 +6,8 @@ config ARCH_INTEGRATOR_AP | |||
6 | bool "Support Integrator/AP and Integrator/PP2 platforms" | 6 | bool "Support Integrator/AP and Integrator/PP2 platforms" |
7 | select CLKSRC_MMIO | 7 | select CLKSRC_MMIO |
8 | select MIGHT_HAVE_PCI | 8 | select MIGHT_HAVE_PCI |
9 | select SERIAL_AMBA_PL010 | ||
10 | select SERIAL_AMBA_PL010_CONSOLE | ||
9 | help | 11 | help |
10 | Include support for the ARM(R) Integrator/AP and | 12 | Include support for the ARM(R) Integrator/AP and |
11 | Integrator/PP2 platforms. | 13 | Integrator/PP2 platforms. |
@@ -15,6 +17,8 @@ config ARCH_INTEGRATOR_CP | |||
15 | select ARCH_CINTEGRATOR | 17 | select ARCH_CINTEGRATOR |
16 | select ARM_TIMER_SP804 | 18 | select ARM_TIMER_SP804 |
17 | select PLAT_VERSATILE_CLCD | 19 | select PLAT_VERSATILE_CLCD |
20 | select SERIAL_AMBA_PL011 | ||
21 | select SERIAL_AMBA_PL011_CONSOLE | ||
18 | help | 22 | help |
19 | Include support for the ARM(R) Integrator CP platform. | 23 | Include support for the ARM(R) Integrator CP platform. |
20 | 24 | ||
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 0a3e0974398a..019f0ab08f66 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <mach/cm.h> | 29 | #include <mach/cm.h> |
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <asm/leds.h> | 31 | #include <asm/leds.h> |
32 | #include <asm/mach-types.h> | ||
32 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
33 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
34 | 35 | ||
@@ -44,7 +45,6 @@ static struct amba_device rtc_device = { | |||
44 | .flags = IORESOURCE_MEM, | 45 | .flags = IORESOURCE_MEM, |
45 | }, | 46 | }, |
46 | .irq = { IRQ_RTCINT, NO_IRQ }, | 47 | .irq = { IRQ_RTCINT, NO_IRQ }, |
47 | .periphid = 0x00041030, | ||
48 | }; | 48 | }; |
49 | 49 | ||
50 | static struct amba_device uart0_device = { | 50 | static struct amba_device uart0_device = { |
@@ -58,7 +58,6 @@ static struct amba_device uart0_device = { | |||
58 | .flags = IORESOURCE_MEM, | 58 | .flags = IORESOURCE_MEM, |
59 | }, | 59 | }, |
60 | .irq = { IRQ_UARTINT0, NO_IRQ }, | 60 | .irq = { IRQ_UARTINT0, NO_IRQ }, |
61 | .periphid = 0x0041010, | ||
62 | }; | 61 | }; |
63 | 62 | ||
64 | static struct amba_device uart1_device = { | 63 | static struct amba_device uart1_device = { |
@@ -72,7 +71,6 @@ static struct amba_device uart1_device = { | |||
72 | .flags = IORESOURCE_MEM, | 71 | .flags = IORESOURCE_MEM, |
73 | }, | 72 | }, |
74 | .irq = { IRQ_UARTINT1, NO_IRQ }, | 73 | .irq = { IRQ_UARTINT1, NO_IRQ }, |
75 | .periphid = 0x0041010, | ||
76 | }; | 74 | }; |
77 | 75 | ||
78 | static struct amba_device kmi0_device = { | 76 | static struct amba_device kmi0_device = { |
@@ -85,7 +83,6 @@ static struct amba_device kmi0_device = { | |||
85 | .flags = IORESOURCE_MEM, | 83 | .flags = IORESOURCE_MEM, |
86 | }, | 84 | }, |
87 | .irq = { IRQ_KMIINT0, NO_IRQ }, | 85 | .irq = { IRQ_KMIINT0, NO_IRQ }, |
88 | .periphid = 0x00041050, | ||
89 | }; | 86 | }; |
90 | 87 | ||
91 | static struct amba_device kmi1_device = { | 88 | static struct amba_device kmi1_device = { |
@@ -98,7 +95,6 @@ static struct amba_device kmi1_device = { | |||
98 | .flags = IORESOURCE_MEM, | 95 | .flags = IORESOURCE_MEM, |
99 | }, | 96 | }, |
100 | .irq = { IRQ_KMIINT1, NO_IRQ }, | 97 | .irq = { IRQ_KMIINT1, NO_IRQ }, |
101 | .periphid = 0x00041050, | ||
102 | }; | 98 | }; |
103 | 99 | ||
104 | static struct amba_device *amba_devs[] __initdata = { | 100 | static struct amba_device *amba_devs[] __initdata = { |
@@ -157,6 +153,19 @@ static int __init integrator_init(void) | |||
157 | { | 153 | { |
158 | int i; | 154 | int i; |
159 | 155 | ||
156 | /* | ||
157 | * The Integrator/AP lacks necessary AMBA PrimeCell IDs, so we need to | ||
158 | * hard-code them. The Integator/CP and forward have proper cell IDs. | ||
159 | * Else we leave them undefined to the bus driver can autoprobe them. | ||
160 | */ | ||
161 | if (machine_is_integrator()) { | ||
162 | rtc_device.periphid = 0x00041030; | ||
163 | uart0_device.periphid = 0x00041010; | ||
164 | uart1_device.periphid = 0x00041010; | ||
165 | kmi0_device.periphid = 0x00041050; | ||
166 | kmi1_device.periphid = 0x00041050; | ||
167 | } | ||
168 | |||
160 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 169 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
161 | struct amba_device *d = amba_devs[i]; | 170 | struct amba_device *d = amba_devs[i]; |
162 | amba_device_register(d, &iomem_resource); | 171 | amba_device_register(d, &iomem_resource); |
diff --git a/arch/arm/mach-integrator/include/mach/vmalloc.h b/arch/arm/mach-integrator/include/mach/vmalloc.h deleted file mode 100644 index 2f5a2bafb11f..000000000000 --- a/arch/arm/mach-integrator/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-integrator/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2000 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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define VMALLOC_END 0xd0000000UL | ||
diff --git a/arch/arm/mach-iop13xx/include/mach/vmalloc.h b/arch/arm/mach-iop13xx/include/mach/vmalloc.h deleted file mode 100644 index c53456740345..000000000000 --- a/arch/arm/mach-iop13xx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _VMALLOC_H_ | ||
2 | #define _VMALLOC_H_ | ||
3 | #define VMALLOC_END 0xfa000000UL | ||
4 | #endif | ||
diff --git a/arch/arm/mach-iop32x/include/mach/io.h b/arch/arm/mach-iop32x/include/mach/io.h index 059c783ce0b2..2d88264b9863 100644 --- a/arch/arm/mach-iop32x/include/mach/io.h +++ b/arch/arm/mach-iop32x/include/mach/io.h | |||
@@ -13,15 +13,8 @@ | |||
13 | 13 | ||
14 | #include <asm/hardware/iop3xx.h> | 14 | #include <asm/hardware/iop3xx.h> |
15 | 15 | ||
16 | extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, | ||
17 | unsigned int mtype); | ||
18 | extern void __iop3xx_iounmap(void __iomem *addr); | ||
19 | |||
20 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
21 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) | 17 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) |
22 | #define __mem_pci(a) (a) | 18 | #define __mem_pci(a) (a) |
23 | 19 | ||
24 | #define __arch_ioremap __iop3xx_ioremap | ||
25 | #define __arch_iounmap __iop3xx_iounmap | ||
26 | |||
27 | #endif | 20 | #endif |
diff --git a/arch/arm/mach-iop32x/include/mach/vmalloc.h b/arch/arm/mach-iop32x/include/mach/vmalloc.h deleted file mode 100644 index c4862d48e583..000000000000 --- a/arch/arm/mach-iop32x/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop32x/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe000000UL | ||
diff --git a/arch/arm/mach-iop33x/include/mach/io.h b/arch/arm/mach-iop33x/include/mach/io.h index 39e893e97c21..a8a66fc8fbdb 100644 --- a/arch/arm/mach-iop33x/include/mach/io.h +++ b/arch/arm/mach-iop33x/include/mach/io.h | |||
@@ -13,15 +13,8 @@ | |||
13 | 13 | ||
14 | #include <asm/hardware/iop3xx.h> | 14 | #include <asm/hardware/iop3xx.h> |
15 | 15 | ||
16 | extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, | ||
17 | unsigned int mtype); | ||
18 | extern void __iop3xx_iounmap(void __iomem *addr); | ||
19 | |||
20 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
21 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) | 17 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) |
22 | #define __mem_pci(a) (a) | 18 | #define __mem_pci(a) (a) |
23 | 19 | ||
24 | #define __arch_ioremap __iop3xx_ioremap | ||
25 | #define __arch_iounmap __iop3xx_iounmap | ||
26 | |||
27 | #endif | 20 | #endif |
diff --git a/arch/arm/mach-iop33x/include/mach/vmalloc.h b/arch/arm/mach-iop33x/include/mach/vmalloc.h deleted file mode 100644 index 48331dc23704..000000000000 --- a/arch/arm/mach-iop33x/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop33x/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe000000UL | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/vmalloc.h b/arch/arm/mach-ixp2000/include/mach/vmalloc.h deleted file mode 100644 index 61c8dae24f95..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
5 | * | ||
6 | * Copyright 2002 Intel Corp. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * Just any arbitrary offset to the start of the vmalloc VM area: the | ||
14 | * current 8MB value just means that there will be a 8MB "hole" after the | ||
15 | * physical memory until the kernel virtual memory starts. That means that | ||
16 | * any out-of-bounds memory accesses will hopefully be caught. | ||
17 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | ||
18 | * area for the same reason. ;) | ||
19 | */ | ||
20 | #define VMALLOC_END 0xfb000000UL | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h index a1749d0fd896..4ce4353b9f72 100644 --- a/arch/arm/mach-ixp23xx/include/mach/io.h +++ b/arch/arm/mach-ixp23xx/include/mach/io.h | |||
@@ -20,33 +20,4 @@ | |||
20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) | 20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) |
21 | #define __mem_pci(a) (a) | 21 | #define __mem_pci(a) (a) |
22 | 22 | ||
23 | static inline void __iomem * | ||
24 | ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype) | ||
25 | { | ||
26 | if (addr >= IXP23XX_PCI_MEM_START && | ||
27 | addr <= IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) { | ||
28 | if (addr + size > IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) | ||
29 | return NULL; | ||
30 | |||
31 | return (void __iomem *) | ||
32 | ((addr - IXP23XX_PCI_MEM_START) + IXP23XX_PCI_MEM_VIRT); | ||
33 | } | ||
34 | |||
35 | return __arm_ioremap(addr, size, mtype); | ||
36 | } | ||
37 | |||
38 | static inline void | ||
39 | ixp23xx_iounmap(void __iomem *addr) | ||
40 | { | ||
41 | if ((((u32)addr) >= IXP23XX_PCI_MEM_VIRT) && | ||
42 | (((u32)addr) < IXP23XX_PCI_MEM_VIRT + IXP23XX_PCI_MEM_SIZE)) | ||
43 | return; | ||
44 | |||
45 | __iounmap(addr); | ||
46 | } | ||
47 | |||
48 | #define __arch_ioremap ixp23xx_ioremap | ||
49 | #define __arch_iounmap ixp23xx_iounmap | ||
50 | |||
51 | |||
52 | #endif | 23 | #endif |
diff --git a/arch/arm/mach-ixp23xx/include/mach/vmalloc.h b/arch/arm/mach-ixp23xx/include/mach/vmalloc.h deleted file mode 100644 index 896c56a1c00e..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (c) 2005 MontaVista Software, Inc. | ||
5 | * | ||
6 | * NPU mappings end at 0xf0000000 and we allocate 64MB for board | ||
7 | * specific static I/O. | ||
8 | */ | ||
9 | |||
10 | #define VMALLOC_END (0xec000000UL) | ||
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 04aa12103bce..3841ab4146ba 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/serial.h> | 19 | #include <linux/serial.h> |
20 | #include <linux/sched.h> | ||
21 | #include <linux/tty.h> | 20 | #include <linux/tty.h> |
22 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
23 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
@@ -403,18 +402,9 @@ void __init ixp4xx_sys_init(void) | |||
403 | /* | 402 | /* |
404 | * sched_clock() | 403 | * sched_clock() |
405 | */ | 404 | */ |
406 | static DEFINE_CLOCK_DATA(cd); | 405 | static u32 notrace ixp4xx_read_sched_clock(void) |
407 | |||
408 | unsigned long long notrace sched_clock(void) | ||
409 | { | 406 | { |
410 | u32 cyc = *IXP4XX_OSTS; | 407 | return *IXP4XX_OSTS; |
411 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
412 | } | ||
413 | |||
414 | static void notrace ixp4xx_update_sched_clock(void) | ||
415 | { | ||
416 | u32 cyc = *IXP4XX_OSTS; | ||
417 | update_sched_clock(&cd, cyc, (u32)~0); | ||
418 | } | 408 | } |
419 | 409 | ||
420 | /* | 410 | /* |
@@ -430,7 +420,7 @@ unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ; | |||
430 | EXPORT_SYMBOL(ixp4xx_timer_freq); | 420 | EXPORT_SYMBOL(ixp4xx_timer_freq); |
431 | static void __init ixp4xx_clocksource_init(void) | 421 | static void __init ixp4xx_clocksource_init(void) |
432 | { | 422 | { |
433 | init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq); | 423 | setup_sched_clock(ixp4xx_read_sched_clock, 32, ixp4xx_timer_freq); |
434 | 424 | ||
435 | clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32, | 425 | clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32, |
436 | ixp4xx_clocksource_read); | 426 | ixp4xx_clocksource_read); |
diff --git a/arch/arm/mach-ixp4xx/include/mach/vmalloc.h b/arch/arm/mach-ixp4xx/include/mach/vmalloc.h deleted file mode 100644 index 9bcd64d59854..000000000000 --- a/arch/arm/mach-ixp4xx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp4xx/include/mach/vmalloc.h | ||
3 | */ | ||
4 | #define VMALLOC_END (0xff000000UL) | ||
5 | |||
diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h index 1aaddc364f2e..49dd0cb5e166 100644 --- a/arch/arm/mach-kirkwood/include/mach/io.h +++ b/arch/arm/mach-kirkwood/include/mach/io.h | |||
@@ -19,31 +19,6 @@ static inline void __iomem *__io(unsigned long addr) | |||
19 | + KIRKWOOD_PCIE_IO_VIRT_BASE); | 19 | + KIRKWOOD_PCIE_IO_VIRT_BASE); |
20 | } | 20 | } |
21 | 21 | ||
22 | static inline void __iomem * | ||
23 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) | ||
24 | { | ||
25 | void __iomem *retval; | ||
26 | unsigned long offs = paddr - KIRKWOOD_REGS_PHYS_BASE; | ||
27 | if (mtype == MT_DEVICE && size && offs < KIRKWOOD_REGS_SIZE && | ||
28 | size <= KIRKWOOD_REGS_SIZE && offs + size <= KIRKWOOD_REGS_SIZE) { | ||
29 | retval = (void __iomem *)KIRKWOOD_REGS_VIRT_BASE + offs; | ||
30 | } else { | ||
31 | retval = __arm_ioremap(paddr, size, mtype); | ||
32 | } | ||
33 | |||
34 | return retval; | ||
35 | } | ||
36 | |||
37 | static inline void | ||
38 | __arch_iounmap(void __iomem *addr) | ||
39 | { | ||
40 | if (addr < (void __iomem *)KIRKWOOD_REGS_VIRT_BASE || | ||
41 | addr >= (void __iomem *)(KIRKWOOD_REGS_VIRT_BASE + KIRKWOOD_REGS_SIZE)) | ||
42 | __iounmap(addr); | ||
43 | } | ||
44 | |||
45 | #define __arch_ioremap __arch_ioremap | ||
46 | #define __arch_iounmap __arch_iounmap | ||
47 | #define __io(a) __io(a) | 22 | #define __io(a) __io(a) |
48 | #define __mem_pci(a) (a) | 23 | #define __mem_pci(a) (a) |
49 | 24 | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/vmalloc.h b/arch/arm/mach-kirkwood/include/mach/vmalloc.h deleted file mode 100644 index bf162ca3d2c1..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe800000UL | ||
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index 85bff6b7699e..4ea70e5f7137 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
@@ -107,7 +107,7 @@ static void __init sheevaplug_init(void) | |||
107 | kirkwood_init(); | 107 | kirkwood_init(); |
108 | 108 | ||
109 | /* setup gpio pin select */ | 109 | /* setup gpio pin select */ |
110 | if (machine_is_sheeva_esata()) | 110 | if (machine_is_esata_sheevaplug()) |
111 | kirkwood_mpp_conf(sheeva_esata_mpp_config); | 111 | kirkwood_mpp_conf(sheeva_esata_mpp_config); |
112 | else | 112 | else |
113 | kirkwood_mpp_conf(sheevaplug_mpp_config); | 113 | kirkwood_mpp_conf(sheevaplug_mpp_config); |
@@ -123,11 +123,11 @@ static void __init sheevaplug_init(void) | |||
123 | kirkwood_ge00_init(&sheevaplug_ge00_data); | 123 | kirkwood_ge00_init(&sheevaplug_ge00_data); |
124 | 124 | ||
125 | /* honor lower power consumption for plugs with out eSATA */ | 125 | /* honor lower power consumption for plugs with out eSATA */ |
126 | if (machine_is_sheeva_esata()) | 126 | if (machine_is_esata_sheevaplug()) |
127 | kirkwood_sata_init(&sheeva_esata_sata_data); | 127 | kirkwood_sata_init(&sheeva_esata_sata_data); |
128 | 128 | ||
129 | /* enable sd wp and sd cd on plugs with esata */ | 129 | /* enable sd wp and sd cd on plugs with esata */ |
130 | if (machine_is_sheeva_esata()) | 130 | if (machine_is_esata_sheevaplug()) |
131 | kirkwood_sdio_init(&sheeva_esata_mvsdio_data); | 131 | kirkwood_sdio_init(&sheeva_esata_mvsdio_data); |
132 | else | 132 | else |
133 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | 133 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); |
diff --git a/arch/arm/mach-ks8695/include/mach/vmalloc.h b/arch/arm/mach-ks8695/include/mach/vmalloc.h deleted file mode 100644 index 744ac66be3a2..000000000000 --- a/arch/arm/mach-ks8695/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ks8695/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Ben Dooks | ||
5 | * Copyright (C) 2006 Simtec Electronics <linux@simtec.co.uk> | ||
6 | * | ||
7 | * KS8695 vmalloc definition | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_VMALLOC_H | ||
15 | #define __ASM_ARCH_VMALLOC_H | ||
16 | |||
17 | #define VMALLOC_END (KS8695_IO_VA & PGDIR_MASK) | ||
18 | |||
19 | #endif | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/vmalloc.h b/arch/arm/mach-lpc32xx/include/mach/vmalloc.h deleted file mode 100644 index 720fa43a60bf..000000000000 --- a/arch/arm/mach-lpc32xx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_VMALLOC_H | ||
20 | #define __ASM_ARCH_VMALLOC_H | ||
21 | |||
22 | #define VMALLOC_END 0xF0000000UL | ||
23 | |||
24 | #endif | ||
diff --git a/arch/arm/mach-mmp/include/mach/vmalloc.h b/arch/arm/mach-mmp/include/mach/vmalloc.h deleted file mode 100644 index 1d0bac003ad0..000000000000 --- a/arch/arm/mach-mmp/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe000000UL | ||
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 4e91ee6e27c8..71fc4ee4602c 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/sched.h> | ||
29 | 28 | ||
30 | #include <asm/sched_clock.h> | 29 | #include <asm/sched_clock.h> |
31 | #include <mach/addr-map.h> | 30 | #include <mach/addr-map.h> |
@@ -42,8 +41,6 @@ | |||
42 | #define MAX_DELTA (0xfffffffe) | 41 | #define MAX_DELTA (0xfffffffe) |
43 | #define MIN_DELTA (16) | 42 | #define MIN_DELTA (16) |
44 | 43 | ||
45 | static DEFINE_CLOCK_DATA(cd); | ||
46 | |||
47 | /* | 44 | /* |
48 | * FIXME: the timer needs some delay to stablize the counter capture | 45 | * FIXME: the timer needs some delay to stablize the counter capture |
49 | */ | 46 | */ |
@@ -59,16 +56,9 @@ static inline uint32_t timer_read(void) | |||
59 | return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(1)); | 56 | return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(1)); |
60 | } | 57 | } |
61 | 58 | ||
62 | unsigned long long notrace sched_clock(void) | 59 | static u32 notrace mmp_read_sched_clock(void) |
63 | { | 60 | { |
64 | u32 cyc = timer_read(); | 61 | return timer_read(); |
65 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
66 | } | ||
67 | |||
68 | static void notrace mmp_update_sched_clock(void) | ||
69 | { | ||
70 | u32 cyc = timer_read(); | ||
71 | update_sched_clock(&cd, cyc, (u32)~0); | ||
72 | } | 62 | } |
73 | 63 | ||
74 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | 64 | static irqreturn_t timer_interrupt(int irq, void *dev_id) |
@@ -201,7 +191,7 @@ void __init timer_init(int irq) | |||
201 | { | 191 | { |
202 | timer_config(); | 192 | timer_config(); |
203 | 193 | ||
204 | init_sched_clock(&cd, mmp_update_sched_clock, 32, CLOCK_TICK_RATE); | 194 | setup_sched_clock(mmp_read_sched_clock, 32, CLOCK_TICK_RATE); |
205 | 195 | ||
206 | ckevt.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt.shift); | 196 | ckevt.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt.shift); |
207 | ckevt.max_delta_ns = clockevent_delta2ns(MAX_DELTA, &ckevt); | 197 | ckevt.max_delta_ns = clockevent_delta2ns(MAX_DELTA, &ckevt); |
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index ebde97f5d5f0..e6beaff7621e 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
@@ -67,6 +67,7 @@ config MSM_SOC_REV_A | |||
67 | bool | 67 | bool |
68 | config ARCH_MSM_SCORPIONMP | 68 | config ARCH_MSM_SCORPIONMP |
69 | bool | 69 | bool |
70 | select HAVE_SMP | ||
70 | 71 | ||
71 | config ARCH_MSM_ARM11 | 72 | config ARCH_MSM_ARM11 |
72 | bool | 73 | bool |
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c index 6dc1cbd2a595..ed3598128530 100644 --- a/arch/arm/mach-msm/board-msm8960.c +++ b/arch/arm/mach-msm/board-msm8960.c | |||
@@ -99,6 +99,7 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | |||
99 | .map_io = msm8960_map_io, | 99 | .map_io = msm8960_map_io, |
100 | .init_irq = msm8960_init_irq, | 100 | .init_irq = msm8960_init_irq, |
101 | .timer = &msm_timer, | 101 | .timer = &msm_timer, |
102 | .handle_irq = gic_handle_irq, | ||
102 | .init_machine = msm8960_sim_init, | 103 | .init_machine = msm8960_sim_init, |
103 | MACHINE_END | 104 | MACHINE_END |
104 | 105 | ||
@@ -108,6 +109,7 @@ MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") | |||
108 | .map_io = msm8960_map_io, | 109 | .map_io = msm8960_map_io, |
109 | .init_irq = msm8960_init_irq, | 110 | .init_irq = msm8960_init_irq, |
110 | .timer = &msm_timer, | 111 | .timer = &msm_timer, |
112 | .handle_irq = gic_handle_irq, | ||
111 | .init_machine = msm8960_rumi3_init, | 113 | .init_machine = msm8960_rumi3_init, |
112 | MACHINE_END | 114 | MACHINE_END |
113 | 115 | ||
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 44bf71688373..0a113424632c 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c | |||
@@ -108,6 +108,7 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | |||
108 | .reserve = msm8x60_reserve, | 108 | .reserve = msm8x60_reserve, |
109 | .map_io = msm8x60_map_io, | 109 | .map_io = msm8x60_map_io, |
110 | .init_irq = msm8x60_init_irq, | 110 | .init_irq = msm8x60_init_irq, |
111 | .handle_irq = gic_handle_irq, | ||
111 | .init_machine = msm8x60_init, | 112 | .init_machine = msm8x60_init, |
112 | .timer = &msm_timer, | 113 | .timer = &msm_timer, |
113 | MACHINE_END | 114 | MACHINE_END |
@@ -117,6 +118,7 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | |||
117 | .reserve = msm8x60_reserve, | 118 | .reserve = msm8x60_reserve, |
118 | .map_io = msm8x60_map_io, | 119 | .map_io = msm8x60_map_io, |
119 | .init_irq = msm8x60_init_irq, | 120 | .init_irq = msm8x60_init_irq, |
121 | .handle_irq = gic_handle_irq, | ||
120 | .init_machine = msm8x60_init, | 122 | .init_machine = msm8x60_init, |
121 | .timer = &msm_timer, | 123 | .timer = &msm_timer, |
122 | MACHINE_END | 124 | MACHINE_END |
@@ -126,6 +128,7 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | |||
126 | .reserve = msm8x60_reserve, | 128 | .reserve = msm8x60_reserve, |
127 | .map_io = msm8x60_map_io, | 129 | .map_io = msm8x60_map_io, |
128 | .init_irq = msm8x60_init_irq, | 130 | .init_irq = msm8x60_init_irq, |
131 | .handle_irq = gic_handle_irq, | ||
129 | .init_machine = msm8x60_init, | 132 | .init_machine = msm8x60_init, |
130 | .timer = &msm_timer, | 133 | .timer = &msm_timer, |
131 | MACHINE_END | 134 | MACHINE_END |
@@ -135,6 +138,7 @@ MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") | |||
135 | .reserve = msm8x60_reserve, | 138 | .reserve = msm8x60_reserve, |
136 | .map_io = msm8x60_map_io, | 139 | .map_io = msm8x60_map_io, |
137 | .init_irq = msm8x60_init_irq, | 140 | .init_irq = msm8x60_init_irq, |
141 | .handle_irq = gic_handle_irq, | ||
138 | .init_machine = msm8x60_init, | 142 | .init_machine = msm8x60_init, |
139 | .timer = &msm_timer, | 143 | .timer = &msm_timer, |
140 | MACHINE_END | 144 | MACHINE_END |
diff --git a/arch/arm/mach-msm/include/mach/entry-macro-qgic.S b/arch/arm/mach-msm/include/mach/entry-macro-qgic.S deleted file mode 100644 index 717076f3ca73..000000000000 --- a/arch/arm/mach-msm/include/mach/entry-macro-qgic.S +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * Low-level IRQ helper macros | ||
3 | * | ||
4 | * Copyright (c) 2010, Code Aurora Forum. All rights reserved. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <asm/hardware/entry-macro-gic.S> | ||
12 | |||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
diff --git a/arch/arm/mach-msm/include/mach/entry-macro-vic.S b/arch/arm/mach-msm/include/mach/entry-macro-vic.S deleted file mode 100644 index 70563ed11b36..000000000000 --- a/arch/arm/mach-msm/include/mach/entry-macro-vic.S +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Google, Inc. | ||
3 | * Author: Brian Swetland <swetland@google.com> | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <mach/msm_iomap.h> | ||
17 | |||
18 | .macro disable_fiq | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_preamble, base, tmp | ||
22 | @ enable imprecise aborts | ||
23 | cpsie a | ||
24 | mov \base, #MSM_VIC_BASE | ||
25 | .endm | ||
26 | |||
27 | .macro arch_ret_to_user, tmp1, tmp2 | ||
28 | .endm | ||
29 | |||
30 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
31 | @ 0xD0 has irq# or old irq# if the irq has been handled | ||
32 | @ 0xD4 has irq# or -1 if none pending *but* if you just | ||
33 | @ read 0xD4 you never get the first irq for some reason | ||
34 | ldr \irqnr, [\base, #0xD0] | ||
35 | ldr \irqnr, [\base, #0xD4] | ||
36 | cmp \irqnr, #0xffffffff | ||
37 | .endm | ||
diff --git a/arch/arm/mach-msm/include/mach/entry-macro.S b/arch/arm/mach-msm/include/mach/entry-macro.S index b16f082eeb6f..41f7003ef34f 100644 --- a/arch/arm/mach-msm/include/mach/entry-macro.S +++ b/arch/arm/mach-msm/include/mach/entry-macro.S | |||
@@ -16,8 +16,27 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #if defined(CONFIG_ARM_GIC) | 19 | .macro disable_fiq |
20 | #include <mach/entry-macro-qgic.S> | 20 | .endm |
21 | #else | 21 | |
22 | #include <mach/entry-macro-vic.S> | 22 | .macro arch_ret_to_user, tmp1, tmp2 |
23 | .endm | ||
24 | |||
25 | #if !defined(CONFIG_ARM_GIC) | ||
26 | #include <mach/msm_iomap.h> | ||
27 | |||
28 | .macro get_irqnr_preamble, base, tmp | ||
29 | @ enable imprecise aborts | ||
30 | cpsie a | ||
31 | mov \base, #MSM_VIC_BASE | ||
32 | .endm | ||
33 | |||
34 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
35 | @ 0xD0 has irq# or old irq# if the irq has been handled | ||
36 | @ 0xD4 has irq# or -1 if none pending *but* if you just | ||
37 | @ read 0xD4 you never get the first irq for some reason | ||
38 | ldr \irqnr, [\base, #0xD0] | ||
39 | ldr \irqnr, [\base, #0xD4] | ||
40 | cmp \irqnr, #0xffffffff | ||
41 | .endm | ||
23 | #endif | 42 | #endif |
diff --git a/arch/arm/mach-msm/include/mach/vmalloc.h b/arch/arm/mach-msm/include/mach/vmalloc.h deleted file mode 100644 index d138448eff16..000000000000 --- a/arch/arm/mach-msm/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* arch/arm/mach-msm/include/mach/vmalloc.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_VMALLOC_H | ||
17 | #define __ASM_ARCH_MSM_VMALLOC_H | ||
18 | |||
19 | #define VMALLOC_END 0xd0000000UL | ||
20 | |||
21 | #endif | ||
22 | |||
diff --git a/arch/arm/mach-mv78xx0/include/mach/vmalloc.h b/arch/arm/mach-mv78xx0/include/mach/vmalloc.h deleted file mode 100644 index ba26fe98e640..000000000000 --- a/arch/arm/mach-mv78xx0/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mv78xx0/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe000000UL | ||
diff --git a/arch/arm/mach-mxs/include/mach/vmalloc.h b/arch/arm/mach-mxs/include/mach/vmalloc.h deleted file mode 100644 index 103b0165ed0b..000000000000 --- a/arch/arm/mach-mxs/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Russell King. | ||
3 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef __MACH_MXS_VMALLOC_H__ | ||
17 | #define __MACH_MXS_VMALLOC_H__ | ||
18 | |||
19 | /* vmalloc ending address */ | ||
20 | #define VMALLOC_END 0xf4000000UL | ||
21 | |||
22 | #endif /* __MACH_MXS_VMALLOC_H__ */ | ||
diff --git a/arch/arm/mach-netx/include/mach/entry-macro.S b/arch/arm/mach-netx/include/mach/entry-macro.S index 844f1f9acbdf..6e9f1cbe1634 100644 --- a/arch/arm/mach-netx/include/mach/entry-macro.S +++ b/arch/arm/mach-netx/include/mach/entry-macro.S | |||
@@ -18,22 +18,9 @@ | |||
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | #include <mach/hardware.h> | ||
22 | 21 | ||
23 | .macro disable_fiq | 22 | .macro disable_fiq |
24 | .endm | 23 | .endm |
25 | 24 | ||
26 | .macro get_irqnr_preamble, base, tmp | ||
27 | ldr \base, =io_p2v(0x001ff000) | ||
28 | .endm | ||
29 | |||
30 | .macro arch_ret_to_user, tmp1, tmp2 | 25 | .macro arch_ret_to_user, tmp1, tmp2 |
31 | .endm | 26 | .endm |
32 | |||
33 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
34 | ldr \irqstat, [\base, #0] | ||
35 | clz \irqnr, \irqstat | ||
36 | rsb \irqnr, \irqnr, #31 | ||
37 | cmp \irqstat, #0 | ||
38 | .endm | ||
39 | |||
diff --git a/arch/arm/mach-netx/include/mach/vmalloc.h b/arch/arm/mach-netx/include/mach/vmalloc.h deleted file mode 100644 index 871f1ef7bff5..000000000000 --- a/arch/arm/mach-netx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #define VMALLOC_END 0xd0000000UL | ||
diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c index 5384b5a78f68..180ea899a48a 100644 --- a/arch/arm/mach-netx/nxdb500.c +++ b/arch/arm/mach-netx/nxdb500.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/hardware/vic.h> | ||
31 | #include <mach/netx-regs.h> | 32 | #include <mach/netx-regs.h> |
32 | #include <mach/eth.h> | 33 | #include <mach/eth.h> |
33 | 34 | ||
@@ -203,6 +204,7 @@ MACHINE_START(NXDB500, "Hilscher nxdb500") | |||
203 | .atag_offset = 0x100, | 204 | .atag_offset = 0x100, |
204 | .map_io = netx_map_io, | 205 | .map_io = netx_map_io, |
205 | .init_irq = netx_init_irq, | 206 | .init_irq = netx_init_irq, |
207 | .handle_irq = vic_handle_irq, | ||
206 | .timer = &netx_timer, | 208 | .timer = &netx_timer, |
207 | .init_machine = nxdb500_init, | 209 | .init_machine = nxdb500_init, |
208 | .restart = netx_restart, | 210 | .restart = netx_restart, |
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c index 2df3783ef459..58009e29b20e 100644 --- a/arch/arm/mach-netx/nxdkn.c +++ b/arch/arm/mach-netx/nxdkn.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/hardware/vic.h> | ||
31 | #include <mach/netx-regs.h> | 32 | #include <mach/netx-regs.h> |
32 | #include <mach/eth.h> | 33 | #include <mach/eth.h> |
33 | 34 | ||
@@ -96,6 +97,7 @@ MACHINE_START(NXDKN, "Hilscher nxdkn") | |||
96 | .atag_offset = 0x100, | 97 | .atag_offset = 0x100, |
97 | .map_io = netx_map_io, | 98 | .map_io = netx_map_io, |
98 | .init_irq = netx_init_irq, | 99 | .init_irq = netx_init_irq, |
100 | .handle_irq = vic_handle_irq, | ||
99 | .timer = &netx_timer, | 101 | .timer = &netx_timer, |
100 | .init_machine = nxdkn_init, | 102 | .init_machine = nxdkn_init, |
101 | .restart = netx_restart, | 103 | .restart = netx_restart, |
diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c index 26255b2ce473..122e99826ef6 100644 --- a/arch/arm/mach-netx/nxeb500hmi.c +++ b/arch/arm/mach-netx/nxeb500hmi.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/hardware/vic.h> | ||
31 | #include <mach/netx-regs.h> | 32 | #include <mach/netx-regs.h> |
32 | #include <mach/eth.h> | 33 | #include <mach/eth.h> |
33 | 34 | ||
@@ -180,6 +181,7 @@ MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi") | |||
180 | .atag_offset = 0x100, | 181 | .atag_offset = 0x100, |
181 | .map_io = netx_map_io, | 182 | .map_io = netx_map_io, |
182 | .init_irq = netx_init_irq, | 183 | .init_irq = netx_init_irq, |
184 | .handle_irq = vic_handle_irq, | ||
183 | .timer = &netx_timer, | 185 | .timer = &netx_timer, |
184 | .init_machine = nxeb500hmi_init, | 186 | .init_machine = nxeb500hmi_init, |
185 | .restart = netx_restart, | 187 | .restart = netx_restart, |
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index 68c7b79bad79..7c878bf00340 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mtd/onenand.h> | 21 | #include <linux/mtd/onenand.h> |
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <asm/hardware/vic.h> | ||
24 | #include <asm/sizes.h> | 25 | #include <asm/sizes.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -282,6 +283,7 @@ MACHINE_START(NOMADIK, "NHK8815") | |||
282 | .atag_offset = 0x100, | 283 | .atag_offset = 0x100, |
283 | .map_io = cpu8815_map_io, | 284 | .map_io = cpu8815_map_io, |
284 | .init_irq = cpu8815_init_irq, | 285 | .init_irq = cpu8815_init_irq, |
286 | .handle_irq = vic_handle_irq, | ||
285 | .timer = &nomadik_timer, | 287 | .timer = &nomadik_timer, |
286 | .init_machine = nhk8815_platform_init, | 288 | .init_machine = nhk8815_platform_init, |
287 | .restart = cpu8815_restart, | 289 | .restart = cpu8815_restart, |
diff --git a/arch/arm/mach-nomadik/include/mach/entry-macro.S b/arch/arm/mach-nomadik/include/mach/entry-macro.S index 49f1aa3bb420..98ea1c1fbbab 100644 --- a/arch/arm/mach-nomadik/include/mach/entry-macro.S +++ b/arch/arm/mach-nomadik/include/mach/entry-macro.S | |||
@@ -6,38 +6,8 @@ | |||
6 | * warranty of any kind, whether express or implied. | 6 | * warranty of any kind, whether express or implied. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <mach/hardware.h> | ||
10 | #include <mach/irqs.h> | ||
11 | |||
12 | .macro disable_fiq | 9 | .macro disable_fiq |
13 | .endm | 10 | .endm |
14 | 11 | ||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | ldr \base, =IO_ADDRESS(NOMADIK_IC_BASE) | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | 12 | .macro arch_ret_to_user, tmp1, tmp2 |
20 | .endm | 13 | .endm |
21 | |||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
23 | |||
24 | /* This stanza gets the irq mask from one of two status registers */ | ||
25 | mov \irqnr, #0 | ||
26 | ldr \irqstat, [\base, #VIC_REG_IRQSR0] @ get masked status | ||
27 | cmp \irqstat, #0 | ||
28 | bne 1001f | ||
29 | add \irqnr, \irqnr, #32 | ||
30 | ldr \irqstat, [\base, #VIC_REG_IRQSR1] @ get masked status | ||
31 | |||
32 | 1001: tst \irqstat, #15 | ||
33 | bne 1002f | ||
34 | add \irqnr, \irqnr, #4 | ||
35 | movs \irqstat, \irqstat, lsr #4 | ||
36 | bne 1001b | ||
37 | 1002: tst \irqstat, #1 | ||
38 | bne 1003f | ||
39 | add \irqnr, \irqnr, #1 | ||
40 | movs \irqstat, \irqstat, lsr #1 | ||
41 | bne 1002b | ||
42 | 1003: /* EQ will be set if no irqs pending */ | ||
43 | .endm | ||
diff --git a/arch/arm/mach-nomadik/include/mach/vmalloc.h b/arch/arm/mach-nomadik/include/mach/vmalloc.h deleted file mode 100644 index f83d574d9445..000000000000 --- a/arch/arm/mach-nomadik/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | |||
2 | #define VMALLOC_END 0xe8000000UL | ||
diff --git a/arch/arm/mach-omap1/include/mach/vmalloc.h b/arch/arm/mach-omap1/include/mach/vmalloc.h deleted file mode 100644 index 22ec4a479577..000000000000 --- a/arch/arm/mach-omap1/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2000 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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define VMALLOC_END 0xd8000000UL | ||
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 7969cfda4454..8e55b6fb3478 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -121,7 +121,6 @@ void __init omap16xx_map_io(void) | |||
121 | void omap1_init_early(void) | 121 | void omap1_init_early(void) |
122 | { | 122 | { |
123 | omap_check_revision(); | 123 | omap_check_revision(); |
124 | omap_ioremap_init(); | ||
125 | 124 | ||
126 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort | 125 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort |
127 | * on a Posted Write in the TIPB Bridge". | 126 | * on a Posted Write in the TIPB Bridge". |
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 485a21d31004..b8faffa44f9e 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/sched.h> | ||
41 | #include <linux/spinlock.h> | 40 | #include <linux/spinlock.h> |
42 | #include <linux/clk.h> | 41 | #include <linux/clk.h> |
43 | #include <linux/err.h> | 42 | #include <linux/err.h> |
@@ -190,30 +189,9 @@ static __init void omap_init_mpu_timer(unsigned long rate) | |||
190 | * --------------------------------------------------------------------------- | 189 | * --------------------------------------------------------------------------- |
191 | */ | 190 | */ |
192 | 191 | ||
193 | static DEFINE_CLOCK_DATA(cd); | 192 | static u32 notrace omap_mpu_read_sched_clock(void) |
194 | |||
195 | static inline unsigned long long notrace _omap_mpu_sched_clock(void) | ||
196 | { | ||
197 | u32 cyc = ~omap_mpu_timer_read(1); | ||
198 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
199 | } | ||
200 | |||
201 | #ifndef CONFIG_OMAP_32K_TIMER | ||
202 | unsigned long long notrace sched_clock(void) | ||
203 | { | ||
204 | return _omap_mpu_sched_clock(); | ||
205 | } | ||
206 | #else | ||
207 | static unsigned long long notrace omap_mpu_sched_clock(void) | ||
208 | { | ||
209 | return _omap_mpu_sched_clock(); | ||
210 | } | ||
211 | #endif | ||
212 | |||
213 | static void notrace mpu_update_sched_clock(void) | ||
214 | { | 193 | { |
215 | u32 cyc = ~omap_mpu_timer_read(1); | 194 | return ~omap_mpu_timer_read(1); |
216 | update_sched_clock(&cd, cyc, (u32)~0); | ||
217 | } | 195 | } |
218 | 196 | ||
219 | static void __init omap_init_clocksource(unsigned long rate) | 197 | static void __init omap_init_clocksource(unsigned long rate) |
@@ -223,7 +201,7 @@ static void __init omap_init_clocksource(unsigned long rate) | |||
223 | "%s: can't register clocksource!\n"; | 201 | "%s: can't register clocksource!\n"; |
224 | 202 | ||
225 | omap_mpu_timer_start(1, ~0, 1); | 203 | omap_mpu_timer_start(1, ~0, 1); |
226 | init_sched_clock(&cd, mpu_update_sched_clock, 32, rate); | 204 | setup_sched_clock(omap_mpu_read_sched_clock, 32, rate); |
227 | 205 | ||
228 | if (clocksource_mmio_init(&timer->read_tim, "mpu_timer2", rate, | 206 | if (clocksource_mmio_init(&timer->read_tim, "mpu_timer2", rate, |
229 | 300, 32, clocksource_mmio_readl_down)) | 207 | 300, 32, clocksource_mmio_readl_down)) |
@@ -254,30 +232,6 @@ static inline void omap_mpu_timer_init(void) | |||
254 | } | 232 | } |
255 | #endif /* CONFIG_OMAP_MPU_TIMER */ | 233 | #endif /* CONFIG_OMAP_MPU_TIMER */ |
256 | 234 | ||
257 | #if defined(CONFIG_OMAP_MPU_TIMER) && defined(CONFIG_OMAP_32K_TIMER) | ||
258 | static unsigned long long (*preferred_sched_clock)(void); | ||
259 | |||
260 | unsigned long long notrace sched_clock(void) | ||
261 | { | ||
262 | if (!preferred_sched_clock) | ||
263 | return 0; | ||
264 | |||
265 | return preferred_sched_clock(); | ||
266 | } | ||
267 | |||
268 | static inline void preferred_sched_clock_init(bool use_32k_sched_clock) | ||
269 | { | ||
270 | if (use_32k_sched_clock) | ||
271 | preferred_sched_clock = omap_32k_sched_clock; | ||
272 | else | ||
273 | preferred_sched_clock = omap_mpu_sched_clock; | ||
274 | } | ||
275 | #else | ||
276 | static inline void preferred_sched_clock_init(bool use_32k_sched_clcok) | ||
277 | { | ||
278 | } | ||
279 | #endif | ||
280 | |||
281 | static inline int omap_32k_timer_usable(void) | 235 | static inline int omap_32k_timer_usable(void) |
282 | { | 236 | { |
283 | int res = false; | 237 | int res = false; |
@@ -299,12 +253,8 @@ static inline int omap_32k_timer_usable(void) | |||
299 | */ | 253 | */ |
300 | static void __init omap1_timer_init(void) | 254 | static void __init omap1_timer_init(void) |
301 | { | 255 | { |
302 | if (omap_32k_timer_usable()) { | 256 | if (!omap_32k_timer_usable()) |
303 | preferred_sched_clock_init(1); | ||
304 | } else { | ||
305 | omap_mpu_timer_init(); | 257 | omap_mpu_timer_init(); |
306 | preferred_sched_clock_init(0); | ||
307 | } | ||
308 | } | 258 | } |
309 | 259 | ||
310 | struct sys_timer omap1_timer = { | 260 | struct sys_timer omap1_timer = { |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index e1293aa513d3..4f01533083cc 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -25,6 +25,7 @@ config ARCH_OMAP2 | |||
25 | depends on ARCH_OMAP2PLUS | 25 | depends on ARCH_OMAP2PLUS |
26 | default y | 26 | default y |
27 | select CPU_V6 | 27 | select CPU_V6 |
28 | select MULTI_IRQ_HANDLER | ||
28 | 29 | ||
29 | config ARCH_OMAP3 | 30 | config ARCH_OMAP3 |
30 | bool "TI OMAP3" | 31 | bool "TI OMAP3" |
@@ -36,13 +37,16 @@ config ARCH_OMAP3 | |||
36 | select ARCH_HAS_OPP | 37 | select ARCH_HAS_OPP |
37 | select PM_OPP if PM | 38 | select PM_OPP if PM |
38 | select ARM_CPU_SUSPEND if PM | 39 | select ARM_CPU_SUSPEND if PM |
40 | select MULTI_IRQ_HANDLER | ||
39 | 41 | ||
40 | config ARCH_OMAP4 | 42 | config ARCH_OMAP4 |
41 | bool "TI OMAP4" | 43 | bool "TI OMAP4" |
42 | default y | 44 | default y |
43 | depends on ARCH_OMAP2PLUS | 45 | depends on ARCH_OMAP2PLUS |
46 | select CACHE_L2X0 | ||
44 | select CPU_V7 | 47 | select CPU_V7 |
45 | select ARM_GIC | 48 | select ARM_GIC |
49 | select HAVE_SMP | ||
46 | select LOCAL_TIMERS if SMP | 50 | select LOCAL_TIMERS if SMP |
47 | select PL310_ERRATA_588369 | 51 | select PL310_ERRATA_588369 |
48 | select PL310_ERRATA_727915 | 52 | select PL310_ERRATA_727915 |
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 2e730242132f..7370983f809f 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -301,6 +301,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") | |||
301 | .map_io = omap243x_map_io, | 301 | .map_io = omap243x_map_io, |
302 | .init_early = omap2430_init_early, | 302 | .init_early = omap2430_init_early, |
303 | .init_irq = omap2_init_irq, | 303 | .init_irq = omap2_init_irq, |
304 | .handle_irq = omap2_intc_handle_irq, | ||
304 | .init_machine = omap_2430sdp_init, | 305 | .init_machine = omap_2430sdp_init, |
305 | .timer = &omap2_timer, | 306 | .timer = &omap2_timer, |
306 | .restart = omap_prcm_restart, | 307 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 7111677c7e6b..9996334cb687 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -728,6 +728,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") | |||
728 | .map_io = omap3_map_io, | 728 | .map_io = omap3_map_io, |
729 | .init_early = omap3430_init_early, | 729 | .init_early = omap3430_init_early, |
730 | .init_irq = omap3_init_irq, | 730 | .init_irq = omap3_init_irq, |
731 | .handle_irq = omap3_intc_handle_irq, | ||
731 | .init_machine = omap_3430sdp_init, | 732 | .init_machine = omap_3430sdp_init, |
732 | .timer = &omap3_timer, | 733 | .timer = &omap3_timer, |
733 | .restart = omap_prcm_restart, | 734 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index a01d08118a40..6ef350d1ae4f 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -215,6 +215,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") | |||
215 | .map_io = omap3_map_io, | 215 | .map_io = omap3_map_io, |
216 | .init_early = omap3630_init_early, | 216 | .init_early = omap3630_init_early, |
217 | .init_irq = omap3_init_irq, | 217 | .init_irq = omap3_init_irq, |
218 | .handle_irq = omap3_intc_handle_irq, | ||
218 | .init_machine = omap_sdp_init, | 219 | .init_machine = omap_sdp_init, |
219 | .timer = &omap3_timer, | 220 | .timer = &omap3_timer, |
220 | .restart = omap_prcm_restart, | 221 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 8a46ad8f1227..bad5d5a5ef79 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/leds_pwm.h> | 27 | #include <linux/leds_pwm.h> |
28 | 28 | ||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <asm/hardware/gic.h> | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
@@ -983,6 +984,7 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") | |||
983 | .map_io = omap4_map_io, | 984 | .map_io = omap4_map_io, |
984 | .init_early = omap4430_init_early, | 985 | .init_early = omap4430_init_early, |
985 | .init_irq = gic_init_irq, | 986 | .init_irq = gic_init_irq, |
987 | .handle_irq = gic_handle_irq, | ||
986 | .init_machine = omap_4430sdp_init, | 988 | .init_machine = omap_4430sdp_init, |
987 | .timer = &omap4_timer, | 989 | .timer = &omap4_timer, |
988 | .restart = omap_prcm_restart, | 990 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index c1d6b6338b00..c3851e8de28b 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
@@ -98,6 +98,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") | |||
98 | .map_io = omap3_map_io, | 98 | .map_io = omap3_map_io, |
99 | .init_early = am35xx_init_early, | 99 | .init_early = am35xx_init_early, |
100 | .init_irq = omap3_init_irq, | 100 | .init_irq = omap3_init_irq, |
101 | .handle_irq = omap3_intc_handle_irq, | ||
101 | .init_machine = am3517_crane_init, | 102 | .init_machine = am3517_crane_init, |
102 | .timer = &omap3_timer, | 103 | .timer = &omap3_timer, |
103 | .restart = omap_prcm_restart, | 104 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 18c079070ec3..f5a3a3f11739 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -491,6 +491,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") | |||
491 | .map_io = omap3_map_io, | 491 | .map_io = omap3_map_io, |
492 | .init_early = am35xx_init_early, | 492 | .init_early = am35xx_init_early, |
493 | .init_irq = omap3_init_irq, | 493 | .init_irq = omap3_init_irq, |
494 | .handle_irq = omap3_intc_handle_irq, | ||
494 | .init_machine = am3517_evm_init, | 495 | .init_machine = am3517_evm_init, |
495 | .timer = &omap3_timer, | 496 | .timer = &omap3_timer, |
496 | .restart = omap_prcm_restart, | 497 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 75c731c45b2d..ac773829941f 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -354,6 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") | |||
354 | .map_io = omap242x_map_io, | 354 | .map_io = omap242x_map_io, |
355 | .init_early = omap2420_init_early, | 355 | .init_early = omap2420_init_early, |
356 | .init_irq = omap2_init_irq, | 356 | .init_irq = omap2_init_irq, |
357 | .handle_irq = omap2_intc_handle_irq, | ||
357 | .init_machine = omap_apollon_init, | 358 | .init_machine = omap_apollon_init, |
358 | .timer = &omap2_timer, | 359 | .timer = &omap2_timer, |
359 | .restart = omap_prcm_restart, | 360 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index c3402cdf0bac..1545102d1f9b 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -634,6 +634,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35") | |||
634 | .map_io = omap3_map_io, | 634 | .map_io = omap3_map_io, |
635 | .init_early = omap35xx_init_early, | 635 | .init_early = omap35xx_init_early, |
636 | .init_irq = omap3_init_irq, | 636 | .init_irq = omap3_init_irq, |
637 | .handle_irq = omap3_intc_handle_irq, | ||
637 | .init_machine = cm_t35_init, | 638 | .init_machine = cm_t35_init, |
638 | .timer = &omap3_timer, | 639 | .timer = &omap3_timer, |
639 | .restart = omap_prcm_restart, | 640 | .restart = omap_prcm_restart, |
@@ -645,6 +646,7 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730") | |||
645 | .map_io = omap3_map_io, | 646 | .map_io = omap3_map_io, |
646 | .init_early = omap3630_init_early, | 647 | .init_early = omap3630_init_early, |
647 | .init_irq = omap3_init_irq, | 648 | .init_irq = omap3_init_irq, |
649 | .handle_irq = omap3_intc_handle_irq, | ||
648 | .init_machine = cm_t3730_init, | 650 | .init_machine = cm_t3730_init, |
649 | .timer = &omap3_timer, | 651 | .timer = &omap3_timer, |
650 | .restart = omap_prcm_restart, | 652 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 0b06ac3d440b..f36d694d2159 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -299,6 +299,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517") | |||
299 | .map_io = omap3_map_io, | 299 | .map_io = omap3_map_io, |
300 | .init_early = am35xx_init_early, | 300 | .init_early = am35xx_init_early, |
301 | .init_irq = omap3_init_irq, | 301 | .init_irq = omap3_init_irq, |
302 | .handle_irq = omap3_intc_handle_irq, | ||
302 | .init_machine = cm_t3517_init, | 303 | .init_machine = cm_t3517_init, |
303 | .timer = &omap3_timer, | 304 | .timer = &omap3_timer, |
304 | .restart = omap_prcm_restart, | 305 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 519e5f9d491c..e873063f4fda 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -660,6 +660,7 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") | |||
660 | .map_io = omap3_map_io, | 660 | .map_io = omap3_map_io, |
661 | .init_early = omap35xx_init_early, | 661 | .init_early = omap35xx_init_early, |
662 | .init_irq = omap3_init_irq, | 662 | .init_irq = omap3_init_irq, |
663 | .handle_irq = omap3_intc_handle_irq, | ||
663 | .init_machine = devkit8000_init, | 664 | .init_machine = devkit8000_init, |
664 | .timer = &omap3_secure_timer, | 665 | .timer = &omap3_secure_timer, |
665 | .restart = omap_prcm_restart, | 666 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index f462d8c65bc4..f8c5b2cc7c9c 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -122,6 +122,7 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)") | |||
122 | .map_io = omap243x_map_io, | 122 | .map_io = omap243x_map_io, |
123 | .init_early = omap2430_init_early, | 123 | .init_early = omap2430_init_early, |
124 | .init_irq = omap2_init_irq, | 124 | .init_irq = omap2_init_irq, |
125 | .handle_irq = omap2_intc_handle_irq, | ||
125 | .init_machine = omap_generic_init, | 126 | .init_machine = omap_generic_init, |
126 | .timer = &omap2_timer, | 127 | .timer = &omap2_timer, |
127 | .dt_compat = omap243x_boards_compat, | 128 | .dt_compat = omap243x_boards_compat, |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 34ccde484fa6..54af800d143c 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -396,6 +396,7 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board") | |||
396 | .map_io = omap242x_map_io, | 396 | .map_io = omap242x_map_io, |
397 | .init_early = omap2420_init_early, | 397 | .init_early = omap2420_init_early, |
398 | .init_irq = omap2_init_irq, | 398 | .init_irq = omap2_init_irq, |
399 | .handle_irq = omap2_intc_handle_irq, | ||
399 | .init_machine = omap_h4_init, | 400 | .init_machine = omap_h4_init, |
400 | .timer = &omap2_timer, | 401 | .timer = &omap2_timer, |
401 | .restart = omap_prcm_restart, | 402 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index e1850d555616..a59ace0ed560 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -672,6 +672,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board") | |||
672 | .map_io = omap3_map_io, | 672 | .map_io = omap3_map_io, |
673 | .init_early = omap35xx_init_early, | 673 | .init_early = omap35xx_init_early, |
674 | .init_irq = omap3_init_irq, | 674 | .init_irq = omap3_init_irq, |
675 | .handle_irq = omap3_intc_handle_irq, | ||
675 | .init_machine = igep_init, | 676 | .init_machine = igep_init, |
676 | .timer = &omap3_timer, | 677 | .timer = &omap3_timer, |
677 | .restart = omap_prcm_restart, | 678 | .restart = omap_prcm_restart, |
@@ -683,6 +684,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module") | |||
683 | .map_io = omap3_map_io, | 684 | .map_io = omap3_map_io, |
684 | .init_early = omap35xx_init_early, | 685 | .init_early = omap35xx_init_early, |
685 | .init_irq = omap3_init_irq, | 686 | .init_irq = omap3_init_irq, |
687 | .handle_irq = omap3_intc_handle_irq, | ||
686 | .init_machine = igep_init, | 688 | .init_machine = igep_init, |
687 | .timer = &omap3_timer, | 689 | .timer = &omap3_timer, |
688 | .restart = omap_prcm_restart, | 690 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 84bbdd6e5aff..2d2a61f7dcbf 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -434,6 +434,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board") | |||
434 | .map_io = omap3_map_io, | 434 | .map_io = omap3_map_io, |
435 | .init_early = omap3430_init_early, | 435 | .init_early = omap3430_init_early, |
436 | .init_irq = omap3_init_irq, | 436 | .init_irq = omap3_init_irq, |
437 | .handle_irq = omap3_intc_handle_irq, | ||
437 | .init_machine = omap_ldp_init, | 438 | .init_machine = omap_ldp_init, |
438 | .timer = &omap3_timer, | 439 | .timer = &omap3_timer, |
439 | .restart = omap_prcm_restart, | 440 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index cc1dd541224a..cef2cf1c0b8d 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -689,6 +689,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800") | |||
689 | .map_io = omap242x_map_io, | 689 | .map_io = omap242x_map_io, |
690 | .init_early = omap2420_init_early, | 690 | .init_early = omap2420_init_early, |
691 | .init_irq = omap2_init_irq, | 691 | .init_irq = omap2_init_irq, |
692 | .handle_irq = omap2_intc_handle_irq, | ||
692 | .init_machine = n8x0_init_machine, | 693 | .init_machine = n8x0_init_machine, |
693 | .timer = &omap2_timer, | 694 | .timer = &omap2_timer, |
694 | .restart = omap_prcm_restart, | 695 | .restart = omap_prcm_restart, |
@@ -700,6 +701,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810") | |||
700 | .map_io = omap242x_map_io, | 701 | .map_io = omap242x_map_io, |
701 | .init_early = omap2420_init_early, | 702 | .init_early = omap2420_init_early, |
702 | .init_irq = omap2_init_irq, | 703 | .init_irq = omap2_init_irq, |
704 | .handle_irq = omap2_intc_handle_irq, | ||
703 | .init_machine = n8x0_init_machine, | 705 | .init_machine = n8x0_init_machine, |
704 | .timer = &omap2_timer, | 706 | .timer = &omap2_timer, |
705 | .restart = omap_prcm_restart, | 707 | .restart = omap_prcm_restart, |
@@ -711,6 +713,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") | |||
711 | .map_io = omap242x_map_io, | 713 | .map_io = omap242x_map_io, |
712 | .init_early = omap2420_init_early, | 714 | .init_early = omap2420_init_early, |
713 | .init_irq = omap2_init_irq, | 715 | .init_irq = omap2_init_irq, |
716 | .handle_irq = omap2_intc_handle_irq, | ||
714 | .init_machine = n8x0_init_machine, | 717 | .init_machine = n8x0_init_machine, |
715 | .timer = &omap2_timer, | 718 | .timer = &omap2_timer, |
716 | .restart = omap_prcm_restart, | 719 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index bb6031f6dcb6..7ffcd2839e7b 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -559,6 +559,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | |||
559 | .map_io = omap3_map_io, | 559 | .map_io = omap3_map_io, |
560 | .init_early = omap3_init_early, | 560 | .init_early = omap3_init_early, |
561 | .init_irq = omap3_init_irq, | 561 | .init_irq = omap3_init_irq, |
562 | .handle_irq = omap3_intc_handle_irq, | ||
562 | .init_machine = omap3_beagle_init, | 563 | .init_machine = omap3_beagle_init, |
563 | .timer = &omap3_secure_timer, | 564 | .timer = &omap3_secure_timer, |
564 | .restart = omap_prcm_restart, | 565 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 60912e473253..003fe34c9343 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -681,6 +681,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM") | |||
681 | .map_io = omap3_map_io, | 681 | .map_io = omap3_map_io, |
682 | .init_early = omap35xx_init_early, | 682 | .init_early = omap35xx_init_early, |
683 | .init_irq = omap3_init_irq, | 683 | .init_irq = omap3_init_irq, |
684 | .handle_irq = omap3_intc_handle_irq, | ||
684 | .init_machine = omap3_evm_init, | 685 | .init_machine = omap3_evm_init, |
685 | .timer = &omap3_timer, | 686 | .timer = &omap3_timer, |
686 | .restart = omap_prcm_restart, | 687 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 7ecf04a3ff1d..4198dd017d8f 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
@@ -208,6 +208,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") | |||
208 | .map_io = omap3_map_io, | 208 | .map_io = omap3_map_io, |
209 | .init_early = omap35xx_init_early, | 209 | .init_early = omap35xx_init_early, |
210 | .init_irq = omap3_init_irq, | 210 | .init_irq = omap3_init_irq, |
211 | .handle_irq = omap3_intc_handle_irq, | ||
211 | .init_machine = omap3logic_init, | 212 | .init_machine = omap3logic_init, |
212 | .timer = &omap3_timer, | 213 | .timer = &omap3_timer, |
213 | .restart = omap_prcm_restart, | 214 | .restart = omap_prcm_restart, |
@@ -218,6 +219,7 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") | |||
218 | .map_io = omap3_map_io, | 219 | .map_io = omap3_map_io, |
219 | .init_early = omap35xx_init_early, | 220 | .init_early = omap35xx_init_early, |
220 | .init_irq = omap3_init_irq, | 221 | .init_irq = omap3_init_irq, |
222 | .handle_irq = omap3_intc_handle_irq, | ||
221 | .init_machine = omap3logic_init, | 223 | .init_machine = omap3logic_init, |
222 | .timer = &omap3_timer, | 224 | .timer = &omap3_timer, |
223 | .restart = omap_prcm_restart, | 225 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 7071a2473a6b..1644b73017fc 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -606,6 +606,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") | |||
606 | .map_io = omap3_map_io, | 606 | .map_io = omap3_map_io, |
607 | .init_early = omap35xx_init_early, | 607 | .init_early = omap35xx_init_early, |
608 | .init_irq = omap3_init_irq, | 608 | .init_irq = omap3_init_irq, |
609 | .handle_irq = omap3_intc_handle_irq, | ||
609 | .init_machine = omap3pandora_init, | 610 | .init_machine = omap3pandora_init, |
610 | .timer = &omap3_timer, | 611 | .timer = &omap3_timer, |
611 | .restart = omap_prcm_restart, | 612 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 6e47987d989b..cb089a46f62f 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -454,6 +454,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") | |||
454 | .map_io = omap3_map_io, | 454 | .map_io = omap3_map_io, |
455 | .init_early = omap35xx_init_early, | 455 | .init_early = omap35xx_init_early, |
456 | .init_irq = omap3_init_irq, | 456 | .init_irq = omap3_init_irq, |
457 | .handle_irq = omap3_intc_handle_irq, | ||
457 | .init_machine = omap3_stalker_init, | 458 | .init_machine = omap3_stalker_init, |
458 | .timer = &omap3_secure_timer, | 459 | .timer = &omap3_secure_timer, |
459 | .restart = omap_prcm_restart, | 460 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 5bb590a40f2b..a0b851aafcca 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -381,6 +381,7 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") | |||
381 | .map_io = omap3_map_io, | 381 | .map_io = omap3_map_io, |
382 | .init_early = omap3430_init_early, | 382 | .init_early = omap3430_init_early, |
383 | .init_irq = omap3_init_irq, | 383 | .init_irq = omap3_init_irq, |
384 | .handle_irq = omap3_intc_handle_irq, | ||
384 | .init_machine = omap3_touchbook_init, | 385 | .init_machine = omap3_touchbook_init, |
385 | .timer = &omap3_secure_timer, | 386 | .timer = &omap3_secure_timer, |
386 | .restart = omap_prcm_restart, | 387 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 955cbee91b46..8b06c6a60d02 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/wl12xx.h> | 30 | #include <linux/wl12xx.h> |
31 | 31 | ||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <asm/hardware/gic.h> | ||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
@@ -576,6 +577,7 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") | |||
576 | .map_io = omap4_map_io, | 577 | .map_io = omap4_map_io, |
577 | .init_early = omap4430_init_early, | 578 | .init_early = omap4430_init_early, |
578 | .init_irq = gic_init_irq, | 579 | .init_irq = gic_init_irq, |
580 | .handle_irq = gic_handle_irq, | ||
579 | .init_machine = omap4_panda_init, | 581 | .init_machine = omap4_panda_init, |
580 | .timer = &omap4_timer, | 582 | .timer = &omap4_timer, |
581 | .restart = omap_prcm_restart, | 583 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index c14d78129999..52c0cef77165 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -562,6 +562,7 @@ MACHINE_START(OVERO, "Gumstix Overo") | |||
562 | .map_io = omap3_map_io, | 562 | .map_io = omap3_map_io, |
563 | .init_early = omap35xx_init_early, | 563 | .init_early = omap35xx_init_early, |
564 | .init_irq = omap3_init_irq, | 564 | .init_irq = omap3_init_irq, |
565 | .handle_irq = omap3_intc_handle_irq, | ||
565 | .init_machine = overo_init, | 566 | .init_machine = overo_init, |
566 | .timer = &omap3_timer, | 567 | .timer = &omap3_timer, |
567 | .restart = omap_prcm_restart, | 568 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 0c67ecc244d6..8678b386c6a2 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -149,6 +149,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") | |||
149 | .map_io = omap3_map_io, | 149 | .map_io = omap3_map_io, |
150 | .init_early = omap3630_init_early, | 150 | .init_early = omap3630_init_early, |
151 | .init_irq = omap3_init_irq, | 151 | .init_irq = omap3_init_irq, |
152 | .handle_irq = omap3_intc_handle_irq, | ||
152 | .init_machine = rm680_init, | 153 | .init_machine = rm680_init, |
153 | .timer = &omap3_timer, | 154 | .timer = &omap3_timer, |
154 | .restart = omap_prcm_restart, | 155 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index c3e716ad2b51..27f01f051dff 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -127,6 +127,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") | |||
127 | .map_io = omap3_map_io, | 127 | .map_io = omap3_map_io, |
128 | .init_early = omap3430_init_early, | 128 | .init_early = omap3430_init_early, |
129 | .init_irq = omap3_init_irq, | 129 | .init_irq = omap3_init_irq, |
130 | .handle_irq = omap3_intc_handle_irq, | ||
130 | .init_machine = rx51_init, | 131 | .init_machine = rx51_init, |
131 | .timer = &omap3_timer, | 132 | .timer = &omap3_timer, |
132 | .restart = omap_prcm_restart, | 133 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c index 68d6f1c875b8..5c20bcc57f2b 100644 --- a/arch/arm/mach-omap2/board-zoom.c +++ b/arch/arm/mach-omap2/board-zoom.c | |||
@@ -135,6 +135,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") | |||
135 | .map_io = omap3_map_io, | 135 | .map_io = omap3_map_io, |
136 | .init_early = omap3430_init_early, | 136 | .init_early = omap3430_init_early, |
137 | .init_irq = omap3_init_irq, | 137 | .init_irq = omap3_init_irq, |
138 | .handle_irq = omap3_intc_handle_irq, | ||
138 | .init_machine = omap_zoom_init, | 139 | .init_machine = omap_zoom_init, |
139 | .timer = &omap3_timer, | 140 | .timer = &omap3_timer, |
140 | .restart = omap_prcm_restart, | 141 | .restart = omap_prcm_restart, |
@@ -146,6 +147,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") | |||
146 | .map_io = omap3_map_io, | 147 | .map_io = omap3_map_io, |
147 | .init_early = omap3630_init_early, | 148 | .init_early = omap3630_init_early, |
148 | .init_irq = omap3_init_irq, | 149 | .init_irq = omap3_init_irq, |
150 | .handle_irq = omap3_intc_handle_irq, | ||
149 | .init_machine = omap_zoom_init, | 151 | .init_machine = omap_zoom_init, |
150 | .timer = &omap3_timer, | 152 | .timer = &omap3_timer, |
151 | .restart = omap_prcm_restart, | 153 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 1df1b396fc3b..cda888a2e635 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -154,6 +154,8 @@ void omap_intc_restore_context(void); | |||
154 | void omap3_intc_suspend(void); | 154 | void omap3_intc_suspend(void); |
155 | void omap3_intc_prepare_idle(void); | 155 | void omap3_intc_prepare_idle(void); |
156 | void omap3_intc_resume_idle(void); | 156 | void omap3_intc_resume_idle(void); |
157 | void omap2_intc_handle_irq(struct pt_regs *regs); | ||
158 | void omap3_intc_handle_irq(struct pt_regs *regs); | ||
157 | 159 | ||
158 | /* | 160 | /* |
159 | * wfi used in low power code. Directly opcode is used instead | 161 | * wfi used in low power code. Directly opcode is used instead |
@@ -170,8 +172,6 @@ void omap3_intc_resume_idle(void); | |||
170 | extern void __iomem *l2cache_base; | 172 | extern void __iomem *l2cache_base; |
171 | #endif | 173 | #endif |
172 | 174 | ||
173 | extern void __iomem *gic_dist_base_addr; | ||
174 | |||
175 | extern void __init gic_init_irq(void); | 175 | extern void __init gic_init_irq(void); |
176 | extern void omap_smc1(u32 fn, u32 arg); | 176 | extern void omap_smc1(u32 fn, u32 arg); |
177 | 177 | ||
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 942bb4f19f9f..e20332f4abdc 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include "pm.h" | 35 | #include "pm.h" |
36 | #include "control.h" | 36 | #include "control.h" |
37 | #include "common.h" | ||
37 | 38 | ||
38 | #ifdef CONFIG_CPU_IDLE | 39 | #ifdef CONFIG_CPU_IDLE |
39 | 40 | ||
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index dce9905d64bb..bc6cf863a563 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -22,12 +22,13 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/delay.h> | ||
25 | 26 | ||
26 | #include <video/omapdss.h> | 27 | #include <video/omapdss.h> |
27 | #include <plat/omap_hwmod.h> | 28 | #include <plat/omap_hwmod.h> |
28 | #include <plat/omap_device.h> | 29 | #include <plat/omap_device.h> |
29 | #include <plat/omap-pm.h> | 30 | #include <plat/omap-pm.h> |
30 | #include <plat/common.h> | 31 | #include "common.h" |
31 | 32 | ||
32 | #include "control.h" | 33 | #include "control.h" |
33 | #include "display.h" | 34 | #include "display.h" |
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S index feb90a10945a..56964a0c4c7e 100644 --- a/arch/arm/mach-omap2/include/mach/entry-macro.S +++ b/arch/arm/mach-omap2/include/mach/entry-macro.S | |||
@@ -10,146 +10,9 @@ | |||
10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | #include <mach/hardware.h> | ||
14 | #include <mach/io.h> | ||
15 | #include <mach/irqs.h> | ||
16 | #include <asm/hardware/gic.h> | ||
17 | |||
18 | #include <plat/omap24xx.h> | ||
19 | #include <plat/omap34xx.h> | ||
20 | #include <plat/omap44xx.h> | ||
21 | |||
22 | #include <plat/multi.h> | ||
23 | |||
24 | #define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) | ||
25 | #define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) | ||
26 | #define OMAP4_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) | ||
27 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ | ||
28 | #define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */ | ||
29 | 13 | ||
30 | .macro disable_fiq | 14 | .macro disable_fiq |
31 | .endm | 15 | .endm |
32 | 16 | ||
33 | .macro arch_ret_to_user, tmp1, tmp2 | 17 | .macro arch_ret_to_user, tmp1, tmp2 |
34 | .endm | 18 | .endm |
35 | |||
36 | /* | ||
37 | * Unoptimized irq functions for multi-omap2, 3 and 4 | ||
38 | */ | ||
39 | |||
40 | #ifdef MULTI_OMAP2 | ||
41 | /* | ||
42 | * Configure the interrupt base on the first interrupt. | ||
43 | * See also omap_irq_base_init for setting omap_irq_base. | ||
44 | */ | ||
45 | .macro get_irqnr_preamble, base, tmp | ||
46 | ldr \base, =omap_irq_base @ irq base address | ||
47 | ldr \base, [\base, #0] @ irq base value | ||
48 | .endm | ||
49 | |||
50 | /* Check the pending interrupts. Note that base already set */ | ||
51 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
52 | tst \base, #0x100 @ gic address? | ||
53 | bne 4401f @ found gic | ||
54 | |||
55 | /* Handle omap2 and omap3 */ | ||
56 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | ||
57 | cmp \irqnr, #0x0 | ||
58 | bne 9998f | ||
59 | ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ | ||
60 | cmp \irqnr, #0x0 | ||
61 | bne 9998f | ||
62 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | ||
63 | cmp \irqnr, #0x0 | ||
64 | bne 9998f | ||
65 | |||
66 | /* | ||
67 | * ti816x has additional IRQ pending register. Checking this | ||
68 | * register on omap2 & omap3 has no effect (read as 0). | ||
69 | */ | ||
70 | ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ | ||
71 | cmp \irqnr, #0x0 | ||
72 | 9998: | ||
73 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | ||
74 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | ||
75 | b 9999f | ||
76 | |||
77 | /* Handle omap4 */ | ||
78 | 4401: ldr \irqstat, [\base, #GIC_CPU_INTACK] | ||
79 | ldr \tmp, =1021 | ||
80 | bic \irqnr, \irqstat, #0x1c00 | ||
81 | cmp \irqnr, #15 | ||
82 | cmpcc \irqnr, \irqnr | ||
83 | cmpne \irqnr, \tmp | ||
84 | cmpcs \irqnr, \irqnr | ||
85 | 9999: | ||
86 | .endm | ||
87 | |||
88 | #ifdef CONFIG_SMP | ||
89 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
90 | * register) is preserved from the macro above. | ||
91 | * If there is an IPI, we immediately signal end of interrupt | ||
92 | * on the controller, since this requires the original irqstat | ||
93 | * value which we won't easily be able to recreate later. | ||
94 | */ | ||
95 | |||
96 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
97 | bic \irqnr, \irqstat, #0x1c00 | ||
98 | cmp \irqnr, #16 | ||
99 | it cc | ||
100 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
101 | it cs | ||
102 | cmpcs \irqnr, \irqnr | ||
103 | .endm | ||
104 | #endif /* CONFIG_SMP */ | ||
105 | |||
106 | #else /* MULTI_OMAP2 */ | ||
107 | |||
108 | |||
109 | /* | ||
110 | * Optimized irq functions for omap2, 3 and 4 | ||
111 | */ | ||
112 | |||
113 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
114 | .macro get_irqnr_preamble, base, tmp | ||
115 | #ifdef CONFIG_ARCH_OMAP2 | ||
116 | ldr \base, =OMAP2_IRQ_BASE | ||
117 | #else | ||
118 | ldr \base, =OMAP3_IRQ_BASE | ||
119 | #endif | ||
120 | .endm | ||
121 | |||
122 | /* Check the pending interrupts. Note that base already set */ | ||
123 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
124 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | ||
125 | cmp \irqnr, #0x0 | ||
126 | bne 9999f | ||
127 | ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ | ||
128 | cmp \irqnr, #0x0 | ||
129 | bne 9999f | ||
130 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | ||
131 | cmp \irqnr, #0x0 | ||
132 | #ifdef CONFIG_SOC_OMAPTI816X | ||
133 | bne 9999f | ||
134 | ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ | ||
135 | cmp \irqnr, #0x0 | ||
136 | #endif | ||
137 | 9999: | ||
138 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | ||
139 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | ||
140 | |||
141 | .endm | ||
142 | #endif | ||
143 | |||
144 | |||
145 | #ifdef CONFIG_ARCH_OMAP4 | ||
146 | #define HAVE_GET_IRQNR_PREAMBLE | ||
147 | #include <asm/hardware/entry-macro-gic.S> | ||
148 | |||
149 | .macro get_irqnr_preamble, base, tmp | ||
150 | ldr \base, =OMAP4_IRQ_BASE | ||
151 | .endm | ||
152 | |||
153 | #endif | ||
154 | |||
155 | #endif /* MULTI_OMAP2 */ | ||
diff --git a/arch/arm/mach-omap2/include/mach/vmalloc.h b/arch/arm/mach-omap2/include/mach/vmalloc.h deleted file mode 100644 index 866319947760..000000000000 --- a/arch/arm/mach-omap2/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2000 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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define VMALLOC_END 0xf8000000UL | ||
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 33f090ce0226..3f565dd2ea8d 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -316,13 +316,9 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data) | |||
316 | return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); | 316 | return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); |
317 | } | 317 | } |
318 | 318 | ||
319 | /* See irq.c, omap4-common.c and entry-macro.S */ | ||
320 | void __iomem *omap_irq_base; | ||
321 | |||
322 | static void __init omap_common_init_early(void) | 319 | static void __init omap_common_init_early(void) |
323 | { | 320 | { |
324 | omap2_check_revision(); | 321 | omap2_check_revision(); |
325 | omap_ioremap_init(); | ||
326 | omap_init_consistent_dma_size(); | 322 | omap_init_consistent_dma_size(); |
327 | } | 323 | } |
328 | 324 | ||
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 65f1be6a182c..42b1d6591912 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | #include <asm/exception.h> | ||
18 | #include <asm/mach/irq.h> | 19 | #include <asm/mach/irq.h> |
19 | 20 | ||
20 | 21 | ||
@@ -35,6 +36,11 @@ | |||
35 | /* Number of IRQ state bits in each MIR register */ | 36 | /* Number of IRQ state bits in each MIR register */ |
36 | #define IRQ_BITS_PER_REG 32 | 37 | #define IRQ_BITS_PER_REG 32 |
37 | 38 | ||
39 | #define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) | ||
40 | #define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) | ||
41 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ | ||
42 | #define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */ | ||
43 | |||
38 | /* | 44 | /* |
39 | * OMAP2 has a number of different interrupt controllers, each interrupt | 45 | * OMAP2 has a number of different interrupt controllers, each interrupt |
40 | * controller is identified as its own "bank". Register definitions are | 46 | * controller is identified as its own "bank". Register definitions are |
@@ -143,6 +149,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) | |||
143 | 149 | ||
144 | static void __init omap_init_irq(u32 base, int nr_irqs) | 150 | static void __init omap_init_irq(u32 base, int nr_irqs) |
145 | { | 151 | { |
152 | void __iomem *omap_irq_base; | ||
146 | unsigned long nr_of_irqs = 0; | 153 | unsigned long nr_of_irqs = 0; |
147 | unsigned int nr_banks = 0; | 154 | unsigned int nr_banks = 0; |
148 | int i, j; | 155 | int i, j; |
@@ -191,6 +198,44 @@ void __init ti816x_init_irq(void) | |||
191 | omap_init_irq(OMAP34XX_IC_BASE, 128); | 198 | omap_init_irq(OMAP34XX_IC_BASE, 128); |
192 | } | 199 | } |
193 | 200 | ||
201 | static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs *regs) | ||
202 | { | ||
203 | u32 irqnr; | ||
204 | |||
205 | do { | ||
206 | irqnr = readl_relaxed(base_addr + 0x98); | ||
207 | if (irqnr) | ||
208 | goto out; | ||
209 | |||
210 | irqnr = readl_relaxed(base_addr + 0xb8); | ||
211 | if (irqnr) | ||
212 | goto out; | ||
213 | |||
214 | irqnr = readl_relaxed(base_addr + 0xd8); | ||
215 | #ifdef CONFIG_SOC_OMAPTI816X | ||
216 | if (irqnr) | ||
217 | goto out; | ||
218 | irqnr = readl_relaxed(base_addr + 0xf8); | ||
219 | #endif | ||
220 | |||
221 | out: | ||
222 | if (!irqnr) | ||
223 | break; | ||
224 | |||
225 | irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET); | ||
226 | irqnr &= ACTIVEIRQ_MASK; | ||
227 | |||
228 | if (irqnr) | ||
229 | handle_IRQ(irqnr, regs); | ||
230 | } while (irqnr); | ||
231 | } | ||
232 | |||
233 | asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs) | ||
234 | { | ||
235 | void __iomem *base_addr = OMAP2_IRQ_BASE; | ||
236 | omap_intc_handle_irq(base_addr, regs); | ||
237 | } | ||
238 | |||
194 | #ifdef CONFIG_ARCH_OMAP3 | 239 | #ifdef CONFIG_ARCH_OMAP3 |
195 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; | 240 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; |
196 | 241 | ||
@@ -263,4 +308,10 @@ void omap3_intc_resume_idle(void) | |||
263 | /* Re-enable autoidle */ | 308 | /* Re-enable autoidle */ |
264 | intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG); | 309 | intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG); |
265 | } | 310 | } |
311 | |||
312 | asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs) | ||
313 | { | ||
314 | void __iomem *base_addr = OMAP3_IRQ_BASE; | ||
315 | omap_intc_handle_irq(base_addr, regs); | ||
316 | } | ||
266 | #endif /* CONFIG_ARCH_OMAP3 */ | 317 | #endif /* CONFIG_ARCH_OMAP3 */ |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index f327d7472ca7..beecfdd56ea3 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -29,11 +29,11 @@ | |||
29 | void __iomem *l2cache_base; | 29 | void __iomem *l2cache_base; |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | void __iomem *gic_dist_base_addr; | ||
33 | |||
34 | |||
35 | void __init gic_init_irq(void) | 32 | void __init gic_init_irq(void) |
36 | { | 33 | { |
34 | void __iomem *omap_irq_base; | ||
35 | void __iomem *gic_dist_base_addr; | ||
36 | |||
37 | /* Static mapping, never released */ | 37 | /* Static mapping, never released */ |
38 | gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); | 38 | gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); |
39 | BUG_ON(!gic_dist_base_addr); | 39 | BUG_ON(!gic_dist_base_addr); |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 7f8915ad5099..eef43e2e163e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -3247,18 +3247,14 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | |||
3247 | 3247 | ||
3248 | /* 3430ES1-only hwmods */ | 3248 | /* 3430ES1-only hwmods */ |
3249 | static __initdata struct omap_hwmod *omap3430es1_hwmods[] = { | 3249 | static __initdata struct omap_hwmod *omap3430es1_hwmods[] = { |
3250 | &omap3xxx_iva_hwmod, | ||
3251 | &omap3430es1_dss_core_hwmod, | 3250 | &omap3430es1_dss_core_hwmod, |
3252 | &omap3xxx_mailbox_hwmod, | ||
3253 | NULL | 3251 | NULL |
3254 | }; | 3252 | }; |
3255 | 3253 | ||
3256 | /* 3430ES2+-only hwmods */ | 3254 | /* 3430ES2+-only hwmods */ |
3257 | static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = { | 3255 | static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = { |
3258 | &omap3xxx_iva_hwmod, | ||
3259 | &omap3xxx_dss_core_hwmod, | 3256 | &omap3xxx_dss_core_hwmod, |
3260 | &omap3xxx_usbhsotg_hwmod, | 3257 | &omap3xxx_usbhsotg_hwmod, |
3261 | &omap3xxx_mailbox_hwmod, | ||
3262 | NULL | 3258 | NULL |
3263 | }; | 3259 | }; |
3264 | 3260 | ||
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 9edcd520510f..6eeff0e0ae01 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -254,7 +254,6 @@ static struct omap_dm_timer clksrc; | |||
254 | /* | 254 | /* |
255 | * clocksource | 255 | * clocksource |
256 | */ | 256 | */ |
257 | static DEFINE_CLOCK_DATA(cd); | ||
258 | static cycle_t clocksource_read_cycles(struct clocksource *cs) | 257 | static cycle_t clocksource_read_cycles(struct clocksource *cs) |
259 | { | 258 | { |
260 | return (cycle_t)__omap_dm_timer_read_counter(&clksrc, 1); | 259 | return (cycle_t)__omap_dm_timer_read_counter(&clksrc, 1); |
@@ -268,23 +267,12 @@ static struct clocksource clocksource_gpt = { | |||
268 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 267 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
269 | }; | 268 | }; |
270 | 269 | ||
271 | static void notrace dmtimer_update_sched_clock(void) | 270 | static u32 notrace dmtimer_read_sched_clock(void) |
272 | { | 271 | { |
273 | u32 cyc; | ||
274 | |||
275 | cyc = __omap_dm_timer_read_counter(&clksrc, 1); | ||
276 | |||
277 | update_sched_clock(&cd, cyc, (u32)~0); | ||
278 | } | ||
279 | |||
280 | unsigned long long notrace sched_clock(void) | ||
281 | { | ||
282 | u32 cyc = 0; | ||
283 | |||
284 | if (clksrc.reserved) | 272 | if (clksrc.reserved) |
285 | cyc = __omap_dm_timer_read_counter(&clksrc, 1); | 273 | return __omap_dm_timer_read_counter(clksrc.io_base, 1); |
286 | 274 | ||
287 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | 275 | return 0; |
288 | } | 276 | } |
289 | 277 | ||
290 | /* Setup free-running counter for clocksource */ | 278 | /* Setup free-running counter for clocksource */ |
@@ -301,7 +289,7 @@ static void __init omap2_gp_clocksource_init(int gptimer_id, | |||
301 | 289 | ||
302 | __omap_dm_timer_load_start(&clksrc, | 290 | __omap_dm_timer_load_start(&clksrc, |
303 | OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1); | 291 | OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1); |
304 | init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate); | 292 | setup_sched_clock(dmtimer_read_sched_clock, 32, clksrc.rate); |
305 | 293 | ||
306 | if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) | 294 | if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) |
307 | pr_err("Could not register clocksource %s\n", | 295 | pr_err("Could not register clocksource %s\n", |
diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h index c5196101a237..e9d9afdc2659 100644 --- a/arch/arm/mach-orion5x/include/mach/io.h +++ b/arch/arm/mach-orion5x/include/mach/io.h | |||
@@ -15,31 +15,6 @@ | |||
15 | 15 | ||
16 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
17 | 17 | ||
18 | static inline void __iomem * | ||
19 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) | ||
20 | { | ||
21 | void __iomem *retval; | ||
22 | unsigned long offs = paddr - ORION5X_REGS_PHYS_BASE; | ||
23 | if (mtype == MT_DEVICE && size && offs < ORION5X_REGS_SIZE && | ||
24 | size <= ORION5X_REGS_SIZE && offs + size <= ORION5X_REGS_SIZE) { | ||
25 | retval = (void __iomem *)ORION5X_REGS_VIRT_BASE + offs; | ||
26 | } else { | ||
27 | retval = __arm_ioremap(paddr, size, mtype); | ||
28 | } | ||
29 | |||
30 | return retval; | ||
31 | } | ||
32 | |||
33 | static inline void | ||
34 | __arch_iounmap(void __iomem *addr) | ||
35 | { | ||
36 | if (addr < (void __iomem *)ORION5X_REGS_VIRT_BASE || | ||
37 | addr >= (void __iomem *)(ORION5X_REGS_VIRT_BASE + ORION5X_REGS_SIZE)) | ||
38 | __iounmap(addr); | ||
39 | } | ||
40 | |||
41 | #define __arch_ioremap __arch_ioremap | ||
42 | #define __arch_iounmap __arch_iounmap | ||
43 | #define __io(a) __typesafe_io(a) | 18 | #define __io(a) __typesafe_io(a) |
44 | #define __mem_pci(a) (a) | 19 | #define __mem_pci(a) (a) |
45 | 20 | ||
diff --git a/arch/arm/mach-orion5x/include/mach/vmalloc.h b/arch/arm/mach-orion5x/include/mach/vmalloc.h deleted file mode 100644 index 06b50aeff7b9..000000000000 --- a/arch/arm/mach-orion5x/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfd800000UL | ||
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 62c156b20ccd..5d6408745582 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -178,7 +178,7 @@ static struct hw_pci qnap_ts209_pci __initdata = { | |||
178 | 178 | ||
179 | static int __init qnap_ts209_pci_init(void) | 179 | static int __init qnap_ts209_pci_init(void) |
180 | { | 180 | { |
181 | if (machine_is_ts_x09()) | 181 | if (machine_is_ts209()) |
182 | pci_common_init(&qnap_ts209_pci); | 182 | pci_common_init(&qnap_ts209_pci); |
183 | 183 | ||
184 | return 0; | 184 | return 0; |
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c index 34d08347be5f..ad871bd7b1ab 100644 --- a/arch/arm/mach-picoxcell/common.c +++ b/arch/arm/mach-picoxcell/common.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/irqdomain.h> | 11 | #include <linux/irqdomain.h> |
12 | #include <linux/of.h> | 12 | #include <linux/of.h> |
13 | #include <linux/of_address.h> | 13 | #include <linux/of_address.h> |
14 | #include <linux/of_irq.h> | ||
14 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
15 | 16 | ||
16 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
@@ -33,22 +34,20 @@ static const char *picoxcell_dt_match[] = { | |||
33 | }; | 34 | }; |
34 | 35 | ||
35 | static const struct of_device_id vic_of_match[] __initconst = { | 36 | static const struct of_device_id vic_of_match[] __initconst = { |
36 | { .compatible = "arm,pl192-vic" }, | 37 | { .compatible = "arm,pl192-vic", .data = vic_of_init, }, |
37 | { /* Sentinel */ } | 38 | { /* Sentinel */ } |
38 | }; | 39 | }; |
39 | 40 | ||
40 | static void __init picoxcell_init_irq(void) | 41 | static void __init picoxcell_init_irq(void) |
41 | { | 42 | { |
42 | vic_init(IO_ADDRESS(PICOXCELL_VIC0_BASE), 0, ~0, 0); | 43 | of_irq_init(vic_of_match); |
43 | vic_init(IO_ADDRESS(PICOXCELL_VIC1_BASE), 32, ~0, 0); | ||
44 | irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC0_BASE, 0); | ||
45 | irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC1_BASE, 32); | ||
46 | } | 44 | } |
47 | 45 | ||
48 | DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") | 46 | DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") |
49 | .map_io = picoxcell_map_io, | 47 | .map_io = picoxcell_map_io, |
50 | .nr_irqs = ARCH_NR_IRQS, | 48 | .nr_irqs = ARCH_NR_IRQS, |
51 | .init_irq = picoxcell_init_irq, | 49 | .init_irq = picoxcell_init_irq, |
50 | .handle_irq = vic_handle_irq, | ||
52 | .timer = &picoxcell_timer, | 51 | .timer = &picoxcell_timer, |
53 | .init_machine = picoxcell_init_machine, | 52 | .init_machine = picoxcell_init_machine, |
54 | .dt_compat = picoxcell_dt_match, | 53 | .dt_compat = picoxcell_dt_match, |
diff --git a/arch/arm/mach-picoxcell/include/mach/entry-macro.S b/arch/arm/mach-picoxcell/include/mach/entry-macro.S index a6b09f75d9df..9b505ac00be9 100644 --- a/arch/arm/mach-picoxcell/include/mach/entry-macro.S +++ b/arch/arm/mach-picoxcell/include/mach/entry-macro.S | |||
@@ -9,11 +9,8 @@ | |||
9 | * License version 2. This program is licensed "as is" without any | 9 | * License version 2. This program is licensed "as is" without any |
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | #include <mach/hardware.h> | 12 | .macro disable_fiq |
13 | #include <mach/irqs.h> | 13 | .endm |
14 | #include <mach/map.h> | ||
15 | 14 | ||
16 | #define VA_VIC0 IO_ADDRESS(PICOXCELL_VIC0_BASE) | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
17 | #define VA_VIC1 IO_ADDRESS(PICOXCELL_VIC1_BASE) | 16 | .endm |
18 | |||
19 | #include <asm/entry-macro-vic2.S> | ||
diff --git a/arch/arm/mach-picoxcell/include/mach/vmalloc.h b/arch/arm/mach-picoxcell/include/mach/vmalloc.h deleted file mode 100644 index 0216cc4b1f0b..000000000000 --- a/arch/arm/mach-picoxcell/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | #define VMALLOC_END 0xfe000000UL | ||
diff --git a/arch/arm/mach-picoxcell/time.c b/arch/arm/mach-picoxcell/time.c index 90a554ff4499..6c89cf8ab22e 100644 --- a/arch/arm/mach-picoxcell/time.c +++ b/arch/arm/mach-picoxcell/time.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/of.h> | 11 | #include <linux/of.h> |
12 | #include <linux/of_address.h> | 12 | #include <linux/of_address.h> |
13 | #include <linux/of_irq.h> | 13 | #include <linux/of_irq.h> |
14 | #include <linux/sched.h> | ||
15 | 14 | ||
16 | #include <asm/mach/time.h> | 15 | #include <asm/mach/time.h> |
17 | #include <asm/sched_clock.h> | 16 | #include <asm/sched_clock.h> |
@@ -66,21 +65,11 @@ static void picoxcell_add_clocksource(struct device_node *source_timer) | |||
66 | dw_apb_clocksource_register(cs); | 65 | dw_apb_clocksource_register(cs); |
67 | } | 66 | } |
68 | 67 | ||
69 | static DEFINE_CLOCK_DATA(cd); | ||
70 | static void __iomem *sched_io_base; | 68 | static void __iomem *sched_io_base; |
71 | 69 | ||
72 | unsigned long long notrace sched_clock(void) | 70 | unsigned u32 notrace picoxcell_read_sched_clock(void) |
73 | { | 71 | { |
74 | cycle_t cyc = sched_io_base ? __raw_readl(sched_io_base) : 0; | 72 | return __raw_readl(sched_io_base); |
75 | |||
76 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
77 | } | ||
78 | |||
79 | static void notrace picoxcell_update_sched_clock(void) | ||
80 | { | ||
81 | cycle_t cyc = sched_io_base ? __raw_readl(sched_io_base) : 0; | ||
82 | |||
83 | update_sched_clock(&cd, cyc, (u32)~0); | ||
84 | } | 73 | } |
85 | 74 | ||
86 | static const struct of_device_id picoxcell_rtc_ids[] __initconst = { | 75 | static const struct of_device_id picoxcell_rtc_ids[] __initconst = { |
@@ -100,7 +89,7 @@ static void picoxcell_init_sched_clock(void) | |||
100 | timer_get_base_and_rate(sched_timer, &sched_io_base, &rate); | 89 | timer_get_base_and_rate(sched_timer, &sched_io_base, &rate); |
101 | of_node_put(sched_timer); | 90 | of_node_put(sched_timer); |
102 | 91 | ||
103 | init_sched_clock(&cd, picoxcell_update_sched_clock, 32, rate); | 92 | setup_sched_clock(picoxcell_read_sched_clock, 32, rate); |
104 | } | 93 | } |
105 | 94 | ||
106 | static const struct of_device_id picoxcell_timer_ids[] __initconst = { | 95 | static const struct of_device_id picoxcell_timer_ids[] __initconst = { |
diff --git a/arch/arm/mach-pnx4008/include/mach/vmalloc.h b/arch/arm/mach-pnx4008/include/mach/vmalloc.h deleted file mode 100644 index 184913c71141..000000000000 --- a/arch/arm/mach-pnx4008/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-pnx4008/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Author: Vitaly Wool <source@mvista.com> | ||
5 | * | ||
6 | * 2006 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * Just any arbitrary offset to the start of the vmalloc VM area: the | ||
14 | * current 8MB value just means that there will be a 8MB "hole" after the | ||
15 | * physical memory until the kernel virtual memory starts. That means that | ||
16 | * any out-of-bounds memory accesses will hopefully be caught. | ||
17 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | ||
18 | * area for the same reason. ;) | ||
19 | */ | ||
20 | #define VMALLOC_END 0xd0000000UL | ||
diff --git a/arch/arm/mach-prima2/include/mach/map.h b/arch/arm/mach-prima2/include/mach/map.h index 66b1ae2e553f..6f243532570c 100644 --- a/arch/arm/mach-prima2/include/mach/map.h +++ b/arch/arm/mach-prima2/include/mach/map.h | |||
@@ -9,8 +9,10 @@ | |||
9 | #ifndef __MACH_PRIMA2_MAP_H__ | 9 | #ifndef __MACH_PRIMA2_MAP_H__ |
10 | #define __MACH_PRIMA2_MAP_H__ | 10 | #define __MACH_PRIMA2_MAP_H__ |
11 | 11 | ||
12 | #include <mach/vmalloc.h> | 12 | #include <linux/const.h> |
13 | 13 | ||
14 | #define SIRFSOC_VA(x) (VMALLOC_END + ((x) & 0x00FFF000)) | 14 | #define SIRFSOC_VA_BASE _AC(0xFEC00000, UL) |
15 | |||
16 | #define SIRFSOC_VA(x) (SIRFSOC_VA_BASE + ((x) & 0x00FFF000)) | ||
15 | 17 | ||
16 | #endif | 18 | #endif |
diff --git a/arch/arm/mach-prima2/include/mach/vmalloc.h b/arch/arm/mach-prima2/include/mach/vmalloc.h deleted file mode 100644 index c9f90fec78e3..000000000000 --- a/arch/arm/mach-prima2/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/ach-prima2/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (c) 2010 – 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_VMALLOC_H | ||
10 | #define __MACH_VMALLOC_H | ||
11 | |||
12 | #include <linux/const.h> | ||
13 | |||
14 | #define VMALLOC_END _AC(0xFEC00000, UL) | ||
15 | |||
16 | #endif | ||
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S index a73bc86a3c26..260c0c17692a 100644 --- a/arch/arm/mach-pxa/include/mach/entry-macro.S +++ b/arch/arm/mach-pxa/include/mach/entry-macro.S | |||
@@ -7,45 +7,9 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | ||
11 | #include <mach/irqs.h> | ||
12 | 10 | ||
13 | .macro disable_fiq | 11 | .macro disable_fiq |
14 | .endm | 12 | .endm |
15 | 13 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | 14 | .macro arch_ret_to_user, tmp1, tmp2 |
20 | .endm | 15 | .endm |
21 | |||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
23 | mrc p15, 0, \tmp, c0, c0, 0 @ CPUID | ||
24 | mov \tmp, \tmp, lsr #13 | ||
25 | and \tmp, \tmp, #0x7 @ Core G | ||
26 | cmp \tmp, #1 | ||
27 | bhi 1002f | ||
28 | |||
29 | @ Core Generation 1 (PXA25x) | ||
30 | mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000 | ||
31 | add \base, \base, #0x00d00000 | ||
32 | ldr \irqstat, [\base, #0] @ ICIP | ||
33 | ldr \irqnr, [\base, #4] @ ICMR | ||
34 | |||
35 | ands \irqnr, \irqstat, \irqnr | ||
36 | beq 1001f | ||
37 | rsb \irqstat, \irqnr, #0 | ||
38 | and \irqstat, \irqstat, \irqnr | ||
39 | clz \irqnr, \irqstat | ||
40 | rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0)) | ||
41 | b 1001f | ||
42 | 1002: | ||
43 | @ Core Generation 2 (PXA27x) or Core Generation 3 (PXA3xx) | ||
44 | mrc p6, 0, \irqstat, c5, c0, 0 @ ICHP | ||
45 | tst \irqstat, #0x80000000 | ||
46 | beq 1001f | ||
47 | bic \irqstat, \irqstat, #0x80000000 | ||
48 | mov \irqnr, \irqstat, lsr #16 | ||
49 | add \irqnr, \irqnr, #(PXA_IRQ(0)) | ||
50 | 1001: | ||
51 | .endm | ||
diff --git a/arch/arm/mach-pxa/include/mach/vmalloc.h b/arch/arm/mach-pxa/include/mach/vmalloc.h deleted file mode 100644 index bfecfbf5f460..000000000000 --- a/arch/arm/mach-pxa/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-pxa/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Copyright: (C) 2001 MontaVista Software Inc. | ||
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 | #define VMALLOC_END (0xe8000000UL) | ||
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index de684701449c..b503049d6d26 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/clockchips.h> | 18 | #include <linux/clockchips.h> |
19 | #include <linux/sched.h> | ||
20 | 19 | ||
21 | #include <asm/div64.h> | 20 | #include <asm/div64.h> |
22 | #include <asm/mach/irq.h> | 21 | #include <asm/mach/irq.h> |
@@ -32,18 +31,10 @@ | |||
32 | * long as there is always less than 582 seconds between successive | 31 | * long as there is always less than 582 seconds between successive |
33 | * calls to sched_clock() which should always be the case in practice. | 32 | * calls to sched_clock() which should always be the case in practice. |
34 | */ | 33 | */ |
35 | static DEFINE_CLOCK_DATA(cd); | ||
36 | 34 | ||
37 | unsigned long long notrace sched_clock(void) | 35 | static u32 notrace pxa_read_sched_clock(void) |
38 | { | 36 | { |
39 | u32 cyc = OSCR; | 37 | return OSCR; |
40 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
41 | } | ||
42 | |||
43 | static void notrace pxa_update_sched_clock(void) | ||
44 | { | ||
45 | u32 cyc = OSCR; | ||
46 | update_sched_clock(&cd, cyc, (u32)~0); | ||
47 | } | 38 | } |
48 | 39 | ||
49 | 40 | ||
@@ -119,7 +110,7 @@ static void __init pxa_timer_init(void) | |||
119 | OIER = 0; | 110 | OIER = 0; |
120 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; | 111 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; |
121 | 112 | ||
122 | init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate); | 113 | setup_sched_clock(pxa_read_sched_clock, 32, clock_tick_rate); |
123 | 114 | ||
124 | clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4); | 115 | clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4); |
125 | ckevt_pxa_osmr0.max_delta_ns = | 116 | ckevt_pxa_osmr0.max_delta_ns = |
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index dba6d0c1fc17..c593be428b8f 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -12,6 +12,8 @@ config REALVIEW_EB_A9MP | |||
12 | bool "Support Multicore Cortex-A9 Tile" | 12 | bool "Support Multicore Cortex-A9 Tile" |
13 | depends on MACH_REALVIEW_EB | 13 | depends on MACH_REALVIEW_EB |
14 | select CPU_V7 | 14 | select CPU_V7 |
15 | select HAVE_SMP | ||
16 | select MIGHT_HAVE_CACHE_L2X0 | ||
15 | help | 17 | help |
16 | Enable support for the Cortex-A9MPCore tile fitted to the | 18 | Enable support for the Cortex-A9MPCore tile fitted to the |
17 | Realview(R) Emulation Baseboard platform. | 19 | Realview(R) Emulation Baseboard platform. |
@@ -21,6 +23,8 @@ config REALVIEW_EB_ARM11MP | |||
21 | depends on MACH_REALVIEW_EB | 23 | depends on MACH_REALVIEW_EB |
22 | select CPU_V6K | 24 | select CPU_V6K |
23 | select ARCH_HAS_BARRIERS if SMP | 25 | select ARCH_HAS_BARRIERS if SMP |
26 | select HAVE_SMP | ||
27 | select MIGHT_HAVE_CACHE_L2X0 | ||
24 | help | 28 | help |
25 | Enable support for the ARM11MPCore tile fitted to the Realview(R) | 29 | Enable support for the ARM11MPCore tile fitted to the Realview(R) |
26 | Emulation Baseboard platform. | 30 | Emulation Baseboard platform. |
@@ -39,6 +43,8 @@ config MACH_REALVIEW_PB11MP | |||
39 | select CPU_V6K | 43 | select CPU_V6K |
40 | select ARM_GIC | 44 | select ARM_GIC |
41 | select HAVE_PATA_PLATFORM | 45 | select HAVE_PATA_PLATFORM |
46 | select HAVE_SMP | ||
47 | select MIGHT_HAVE_CACHE_L2X0 | ||
42 | select ARCH_HAS_BARRIERS if SMP | 48 | select ARCH_HAS_BARRIERS if SMP |
43 | help | 49 | help |
44 | Include support for the ARM(R) RealView(R) Platform Baseboard for | 50 | Include support for the ARM(R) RealView(R) Platform Baseboard for |
@@ -51,6 +57,7 @@ config MACH_REALVIEW_PB1176 | |||
51 | select CPU_V6 | 57 | select CPU_V6 |
52 | select ARM_GIC | 58 | select ARM_GIC |
53 | select HAVE_TCM | 59 | select HAVE_TCM |
60 | select MIGHT_HAVE_CACHE_L2X0 | ||
54 | help | 61 | help |
55 | Include support for the ARM(R) RealView(R) Platform Baseboard for | 62 | Include support for the ARM(R) RealView(R) Platform Baseboard for |
56 | ARM1176JZF-S. | 63 | ARM1176JZF-S. |
@@ -78,6 +85,8 @@ config MACH_REALVIEW_PBX | |||
78 | bool "Support RealView(R) Platform Baseboard Explore" | 85 | bool "Support RealView(R) Platform Baseboard Explore" |
79 | select ARM_GIC | 86 | select ARM_GIC |
80 | select HAVE_PATA_PLATFORM | 87 | select HAVE_PATA_PLATFORM |
88 | select HAVE_SMP | ||
89 | select MIGHT_HAVE_CACHE_L2X0 | ||
81 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET | 90 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET |
82 | select ZONE_DMA if SPARSEMEM | 91 | select ZONE_DMA if SPARSEMEM |
83 | help | 92 | help |
diff --git a/arch/arm/mach-realview/include/mach/entry-macro.S b/arch/arm/mach-realview/include/mach/entry-macro.S index 4071164aebaa..e8a5179c2653 100644 --- a/arch/arm/mach-realview/include/mach/entry-macro.S +++ b/arch/arm/mach-realview/include/mach/entry-macro.S | |||
@@ -7,8 +7,6 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | ||
11 | #include <asm/hardware/entry-macro-gic.S> | ||
12 | 10 | ||
13 | .macro disable_fiq | 11 | .macro disable_fiq |
14 | .endm | 12 | .endm |
diff --git a/arch/arm/mach-realview/include/mach/vmalloc.h b/arch/arm/mach-realview/include/mach/vmalloc.h deleted file mode 100644 index a2a4c6861407..000000000000 --- a/arch/arm/mach-realview/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-realview/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * Copyright (C) 2000 Russell King. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #define VMALLOC_END 0xf8000000UL | ||
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 4b796241dd76..f92a920cf507 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -91,8 +91,8 @@ static struct map_desc realview_eb_io_desc[] __initdata = { | |||
91 | 91 | ||
92 | static struct map_desc realview_eb11mp_io_desc[] __initdata = { | 92 | static struct map_desc realview_eb11mp_io_desc[] __initdata = { |
93 | { | 93 | { |
94 | .virtual = IO_ADDRESS(REALVIEW_EB11MP_GIC_CPU_BASE), | 94 | .virtual = IO_ADDRESS(REALVIEW_EB11MP_SCU_BASE), |
95 | .pfn = __phys_to_pfn(REALVIEW_EB11MP_GIC_CPU_BASE), | 95 | .pfn = __phys_to_pfn(REALVIEW_EB11MP_SCU_BASE), |
96 | .length = SZ_4K, | 96 | .length = SZ_4K, |
97 | .type = MT_DEVICE, | 97 | .type = MT_DEVICE, |
98 | }, { | 98 | }, { |
@@ -469,6 +469,7 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | |||
469 | .init_early = realview_init_early, | 469 | .init_early = realview_init_early, |
470 | .init_irq = gic_init_irq, | 470 | .init_irq = gic_init_irq, |
471 | .timer = &realview_eb_timer, | 471 | .timer = &realview_eb_timer, |
472 | .handle_irq = gic_handle_irq, | ||
472 | .init_machine = realview_eb_init, | 473 | .init_machine = realview_eb_init, |
473 | #ifdef CONFIG_ZONE_DMA | 474 | #ifdef CONFIG_ZONE_DMA |
474 | .dma_zone_size = SZ_256M, | 475 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 09e630bfa446..8ec37b29e0fa 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -392,6 +392,7 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") | |||
392 | .init_early = realview_init_early, | 392 | .init_early = realview_init_early, |
393 | .init_irq = gic_init_irq, | 393 | .init_irq = gic_init_irq, |
394 | .timer = &realview_pb1176_timer, | 394 | .timer = &realview_pb1176_timer, |
395 | .handle_irq = gic_handle_irq, | ||
395 | .init_machine = realview_pb1176_init, | 396 | .init_machine = realview_pb1176_init, |
396 | #ifdef CONFIG_ZONE_DMA | 397 | #ifdef CONFIG_ZONE_DMA |
397 | .dma_zone_size = SZ_256M, | 398 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index e38e85b6472d..f035fda8b619 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -366,6 +366,7 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") | |||
366 | .init_early = realview_init_early, | 366 | .init_early = realview_init_early, |
367 | .init_irq = gic_init_irq, | 367 | .init_irq = gic_init_irq, |
368 | .timer = &realview_pb11mp_timer, | 368 | .timer = &realview_pb11mp_timer, |
369 | .handle_irq = gic_handle_irq, | ||
369 | .init_machine = realview_pb11mp_init, | 370 | .init_machine = realview_pb11mp_init, |
370 | #ifdef CONFIG_ZONE_DMA | 371 | #ifdef CONFIG_ZONE_DMA |
371 | .dma_zone_size = SZ_256M, | 372 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index 04d1e4953090..0109c8b440cc 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -316,6 +316,7 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | |||
316 | .init_early = realview_init_early, | 316 | .init_early = realview_init_early, |
317 | .init_irq = gic_init_irq, | 317 | .init_irq = gic_init_irq, |
318 | .timer = &realview_pba8_timer, | 318 | .timer = &realview_pba8_timer, |
319 | .handle_irq = gic_handle_irq, | ||
319 | .init_machine = realview_pba8_init, | 320 | .init_machine = realview_pba8_init, |
320 | #ifdef CONFIG_ZONE_DMA | 321 | #ifdef CONFIG_ZONE_DMA |
321 | .dma_zone_size = SZ_256M, | 322 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index d515452323ab..0194b3e26dc1 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -98,8 +98,8 @@ static struct map_desc realview_pbx_io_desc[] __initdata = { | |||
98 | 98 | ||
99 | static struct map_desc realview_local_io_desc[] __initdata = { | 99 | static struct map_desc realview_local_io_desc[] __initdata = { |
100 | { | 100 | { |
101 | .virtual = IO_ADDRESS(REALVIEW_PBX_TILE_GIC_CPU_BASE), | 101 | .virtual = IO_ADDRESS(REALVIEW_PBX_TILE_SCU_BASE), |
102 | .pfn = __phys_to_pfn(REALVIEW_PBX_TILE_GIC_CPU_BASE), | 102 | .pfn = __phys_to_pfn(REALVIEW_PBX_TILE_SCU_BASE), |
103 | .length = SZ_4K, | 103 | .length = SZ_4K, |
104 | .type = MT_DEVICE, | 104 | .type = MT_DEVICE, |
105 | }, { | 105 | }, { |
@@ -399,6 +399,7 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") | |||
399 | .init_early = realview_init_early, | 399 | .init_early = realview_init_early, |
400 | .init_irq = gic_init_irq, | 400 | .init_irq = gic_init_irq, |
401 | .timer = &realview_pbx_timer, | 401 | .timer = &realview_pbx_timer, |
402 | .handle_irq = gic_handle_irq, | ||
402 | .init_machine = realview_pbx_init, | 403 | .init_machine = realview_pbx_init, |
403 | #ifdef CONFIG_ZONE_DMA | 404 | #ifdef CONFIG_ZONE_DMA |
404 | .dma_zone_size = SZ_256M, | 405 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-rpc/include/mach/vmalloc.h b/arch/arm/mach-rpc/include/mach/vmalloc.h deleted file mode 100644 index fb700228637a..000000000000 --- a/arch/arm/mach-rpc/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-rpc/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 1997 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 | #define VMALLOC_END 0xdc000000UL | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/vmalloc.h b/arch/arm/mach-s3c2410/include/mach/vmalloc.h deleted file mode 100644 index 7a311e8dddba..000000000000 --- a/arch/arm/mach-s3c2410/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/vmalloc.h | ||
2 | * | ||
3 | * from arch/arm/mach-iop3xx/include/mach/vmalloc.h | ||
4 | * | ||
5 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> | ||
6 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * S3C2410 vmalloc definition | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_VMALLOC_H | ||
16 | #define __ASM_ARCH_VMALLOC_H | ||
17 | |||
18 | #define VMALLOC_END 0xF6000000UL | ||
19 | |||
20 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/entry-macro.S b/arch/arm/mach-s3c64xx/include/mach/entry-macro.S index dd362604dcce..dc2bc15142ce 100644 --- a/arch/arm/mach-s3c64xx/include/mach/entry-macro.S +++ b/arch/arm/mach-s3c64xx/include/mach/entry-macro.S | |||
@@ -12,7 +12,8 @@ | |||
12 | * warranty of any kind, whether express or implied. | 12 | * warranty of any kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <mach/map.h> | 15 | .macro disable_fiq |
16 | #include <mach/irqs.h> | 16 | .endm |
17 | 17 | ||
18 | #include <asm/entry-macro-vic2.S> | 18 | .macro arch_ret_to_user, tmp1, tmp2 |
19 | .endm | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/vmalloc.h b/arch/arm/mach-s3c64xx/include/mach/vmalloc.h deleted file mode 100644 index 23f75e556a30..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c64xx/include/mach/vmalloc.h | ||
2 | * | ||
3 | * from arch/arm/mach-iop3xx/include/mach/vmalloc.h | ||
4 | * | ||
5 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> | ||
6 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * S3C6400 vmalloc definition | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_VMALLOC_H | ||
16 | #define __ASM_ARCH_VMALLOC_H | ||
17 | |||
18 | #define VMALLOC_END 0xF6000000UL | ||
19 | |||
20 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index a2ea6e5ee465..b86f2779e4e6 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <video/platform_lcd.h> | 31 | #include <video/platform_lcd.h> |
32 | 32 | ||
33 | #include <asm/hardware/vic.h> | ||
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
35 | #include <asm/mach/irq.h> | 36 | #include <asm/mach/irq.h> |
@@ -237,6 +238,7 @@ MACHINE_START(ANW6410, "A&W6410") | |||
237 | .atag_offset = 0x100, | 238 | .atag_offset = 0x100, |
238 | 239 | ||
239 | .init_irq = s3c6410_init_irq, | 240 | .init_irq = s3c6410_init_irq, |
241 | .handle_irq = vic_handle_irq, | ||
240 | .map_io = anw6410_map_io, | 242 | .map_io = anw6410_map_io, |
241 | .init_machine = anw6410_machine_init, | 243 | .init_machine = anw6410_machine_init, |
242 | .timer = &s3c24xx_timer, | 244 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 3615d83d7b5a..f1c848aa4a1e 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/mfd/wm831x/irq.h> | 37 | #include <linux/mfd/wm831x/irq.h> |
38 | #include <linux/mfd/wm831x/gpio.h> | 38 | #include <linux/mfd/wm831x/gpio.h> |
39 | 39 | ||
40 | #include <asm/hardware/vic.h> | ||
40 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
41 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
42 | 43 | ||
@@ -712,6 +713,7 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") | |||
712 | /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */ | 713 | /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */ |
713 | .atag_offset = 0x100, | 714 | .atag_offset = 0x100, |
714 | .init_irq = s3c6410_init_irq, | 715 | .init_irq = s3c6410_init_irq, |
716 | .handle_irq = vic_handle_irq, | ||
715 | .map_io = crag6410_map_io, | 717 | .map_io = crag6410_map_io, |
716 | .init_machine = crag6410_machine_init, | 718 | .init_machine = crag6410_machine_init, |
717 | .timer = &s3c24xx_timer, | 719 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 8707bee2f0d8..521e07b8501b 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/map.h> | 30 | #include <mach/map.h> |
31 | 31 | ||
32 | #include <asm/hardware/vic.h> | ||
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | 35 | ||
@@ -268,6 +269,7 @@ MACHINE_START(HMT, "Airgoo-HMT") | |||
268 | /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */ | 269 | /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */ |
269 | .atag_offset = 0x100, | 270 | .atag_offset = 0x100, |
270 | .init_irq = s3c6410_init_irq, | 271 | .init_irq = s3c6410_init_irq, |
272 | .handle_irq = vic_handle_irq, | ||
271 | .map_io = hmt_map_io, | 273 | .map_io = hmt_map_io, |
272 | .init_machine = hmt_machine_init, | 274 | .init_machine = hmt_machine_init, |
273 | .timer = &s3c24xx_timer, | 275 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 4fba2328a04b..c34c2ab22ead 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/serial_core.h> | 24 | #include <linux/serial_core.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | 26 | ||
27 | #include <asm/hardware/vic.h> | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
@@ -346,6 +347,7 @@ MACHINE_START(MINI6410, "MINI6410") | |||
346 | /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */ | 347 | /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */ |
347 | .atag_offset = 0x100, | 348 | .atag_offset = 0x100, |
348 | .init_irq = s3c6410_init_irq, | 349 | .init_irq = s3c6410_init_irq, |
350 | .handle_irq = vic_handle_irq, | ||
349 | .map_io = mini6410_map_io, | 351 | .map_io = mini6410_map_io, |
350 | .init_machine = mini6410_machine_init, | 352 | .init_machine = mini6410_machine_init, |
351 | .timer = &s3c24xx_timer, | 353 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c index 9ec4d5710733..0efa2ba783b2 100644 --- a/arch/arm/mach-s3c64xx/mach-ncp.c +++ b/arch/arm/mach-s3c64xx/mach-ncp.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <video/platform_lcd.h> | 26 | #include <video/platform_lcd.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
30 | #include <asm/mach/irq.h> | 31 | #include <asm/mach/irq.h> |
@@ -100,6 +101,7 @@ MACHINE_START(NCP, "NCP") | |||
100 | /* Maintainer: Samsung Electronics */ | 101 | /* Maintainer: Samsung Electronics */ |
101 | .atag_offset = 0x100, | 102 | .atag_offset = 0x100, |
102 | .init_irq = s3c6410_init_irq, | 103 | .init_irq = s3c6410_init_irq, |
104 | .handle_irq = vic_handle_irq, | ||
103 | .map_io = ncp_map_io, | 105 | .map_io = ncp_map_io, |
104 | .init_machine = ncp_machine_init, | 106 | .init_machine = ncp_machine_init, |
105 | .timer = &s3c24xx_timer, | 107 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 0cb7116d7b59..be2a9a22ab74 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/serial_core.h> | 25 | #include <linux/serial_core.h> |
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
@@ -327,6 +328,7 @@ MACHINE_START(REAL6410, "REAL6410") | |||
327 | .atag_offset = 0x100, | 328 | .atag_offset = 0x100, |
328 | 329 | ||
329 | .init_irq = s3c6410_init_irq, | 330 | .init_irq = s3c6410_init_irq, |
331 | .handle_irq = vic_handle_irq, | ||
330 | .map_io = real6410_map_io, | 332 | .map_io = real6410_map_io, |
331 | .init_machine = real6410_machine_init, | 333 | .init_machine = real6410_machine_init, |
332 | .timer = &s3c24xx_timer, | 334 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index f1f57bd5ce1c..3f42431d4dda 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | 19 | ||
20 | #include <asm/hardware/vic.h> | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | 23 | ||
@@ -148,6 +149,7 @@ MACHINE_START(SMARTQ5, "SmartQ 5") | |||
148 | /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ | 149 | /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ |
149 | .atag_offset = 0x100, | 150 | .atag_offset = 0x100, |
150 | .init_irq = s3c6410_init_irq, | 151 | .init_irq = s3c6410_init_irq, |
152 | .handle_irq = vic_handle_irq, | ||
151 | .map_io = smartq_map_io, | 153 | .map_io = smartq_map_io, |
152 | .init_machine = smartq5_machine_init, | 154 | .init_machine = smartq5_machine_init, |
153 | .timer = &s3c24xx_timer, | 155 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index 63117d84182e..e5c09b6db967 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | 19 | ||
20 | #include <asm/hardware/vic.h> | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | 23 | ||
@@ -164,6 +165,7 @@ MACHINE_START(SMARTQ7, "SmartQ 7") | |||
164 | /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ | 165 | /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ |
165 | .atag_offset = 0x100, | 166 | .atag_offset = 0x100, |
166 | .init_irq = s3c6410_init_irq, | 167 | .init_irq = s3c6410_init_irq, |
168 | .handle_irq = vic_handle_irq, | ||
167 | .map_io = smartq_map_io, | 169 | .map_io = smartq_map_io, |
168 | .init_machine = smartq7_machine_init, | 170 | .init_machine = smartq7_machine_init, |
169 | .timer = &s3c24xx_timer, | 171 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index 64375d7dda5d..5f096534f4c4 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | 24 | ||
25 | #include <asm/hardware/vic.h> | ||
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
27 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
@@ -89,6 +90,7 @@ MACHINE_START(SMDK6400, "SMDK6400") | |||
89 | .atag_offset = 0x100, | 90 | .atag_offset = 0x100, |
90 | 91 | ||
91 | .init_irq = s3c6400_init_irq, | 92 | .init_irq = s3c6400_init_irq, |
93 | .handle_irq = vic_handle_irq, | ||
92 | .map_io = smdk6400_map_io, | 94 | .map_io = smdk6400_map_io, |
93 | .init_machine = smdk6400_machine_init, | 95 | .init_machine = smdk6400_machine_init, |
94 | .timer = &s3c24xx_timer, | 96 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index f239b0a53a6f..ca6fc204f0ea 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | #include <video/platform_lcd.h> | 44 | #include <video/platform_lcd.h> |
45 | 45 | ||
46 | #include <asm/hardware/vic.h> | ||
46 | #include <asm/mach/arch.h> | 47 | #include <asm/mach/arch.h> |
47 | #include <asm/mach/map.h> | 48 | #include <asm/mach/map.h> |
48 | #include <asm/mach/irq.h> | 49 | #include <asm/mach/irq.h> |
@@ -701,6 +702,7 @@ MACHINE_START(SMDK6410, "SMDK6410") | |||
701 | .atag_offset = 0x100, | 702 | .atag_offset = 0x100, |
702 | 703 | ||
703 | .init_irq = s3c6410_init_irq, | 704 | .init_irq = s3c6410_init_irq, |
705 | .handle_irq = vic_handle_irq, | ||
704 | .map_io = smdk6410_map_io, | 706 | .map_io = smdk6410_map_io, |
705 | .init_machine = smdk6410_machine_init, | 707 | .init_machine = smdk6410_machine_init, |
706 | .timer = &s3c24xx_timer, | 708 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s5p64x0/include/mach/entry-macro.S b/arch/arm/mach-s5p64x0/include/mach/entry-macro.S index 10b62b4f8211..fbb246d0a3df 100644 --- a/arch/arm/mach-s5p64x0/include/mach/entry-macro.S +++ b/arch/arm/mach-s5p64x0/include/mach/entry-macro.S | |||
@@ -10,7 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <mach/map.h> | 13 | .macro disable_fiq |
14 | #include <plat/irqs.h> | 14 | .endm |
15 | 15 | ||
16 | #include <asm/entry-macro-vic2.S> | 16 | .macro arch_ret_to_user, tmp1, tmp2 |
17 | .endm | ||
diff --git a/arch/arm/mach-s5p64x0/include/mach/vmalloc.h b/arch/arm/mach-s5p64x0/include/mach/vmalloc.h deleted file mode 100644 index 38dcc71a03cc..000000000000 --- a/arch/arm/mach-s5p64x0/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p64x0/include/mach/vmalloc.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Copyright 2010 Ben Dooks <ben-linux@fluff.org> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * S3C6400 vmalloc definition | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_VMALLOC_H | ||
16 | #define __ASM_ARCH_VMALLOC_H | ||
17 | |||
18 | #define VMALLOC_END 0xF6000000UL | ||
19 | |||
20 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index 14ace6d282e6..34d98a1dae57 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <video/platform_lcd.h> | 28 | #include <video/platform_lcd.h> |
29 | 29 | ||
30 | #include <asm/hardware/vic.h> | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
@@ -243,6 +244,7 @@ MACHINE_START(SMDK6440, "SMDK6440") | |||
243 | .atag_offset = 0x100, | 244 | .atag_offset = 0x100, |
244 | 245 | ||
245 | .init_irq = s5p6440_init_irq, | 246 | .init_irq = s5p6440_init_irq, |
247 | .handle_irq = vic_handle_irq, | ||
246 | .map_io = smdk6440_map_io, | 248 | .map_io = smdk6440_map_io, |
247 | .init_machine = smdk6440_machine_init, | 249 | .init_machine = smdk6440_machine_init, |
248 | .timer = &s5p_timer, | 250 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index 924478a19b9a..135cf5d84737 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <video/platform_lcd.h> | 28 | #include <video/platform_lcd.h> |
29 | 29 | ||
30 | #include <asm/hardware/vic.h> | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
@@ -263,6 +264,7 @@ MACHINE_START(SMDK6450, "SMDK6450") | |||
263 | .atag_offset = 0x100, | 264 | .atag_offset = 0x100, |
264 | 265 | ||
265 | .init_irq = s5p6450_init_irq, | 266 | .init_irq = s5p6450_init_irq, |
267 | .handle_irq = vic_handle_irq, | ||
266 | .map_io = smdk6450_map_io, | 268 | .map_io = smdk6450_map_io, |
267 | .init_machine = smdk6450_machine_init, | 269 | .init_machine = smdk6450_machine_init, |
268 | .timer = &s5p_timer, | 270 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pc100/include/mach/entry-macro.S b/arch/arm/mach-s5pc100/include/mach/entry-macro.S index ba76af052c81..b8c242edfa22 100644 --- a/arch/arm/mach-s5pc100/include/mach/entry-macro.S +++ b/arch/arm/mach-s5pc100/include/mach/entry-macro.S | |||
@@ -12,39 +12,14 @@ | |||
12 | * warranty of any kind, whether express or implied. | 12 | * warranty of any kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/hardware/vic.h> | ||
16 | #include <mach/map.h> | ||
17 | #include <plat/irqs.h> | ||
18 | |||
19 | .macro disable_fiq | 15 | .macro disable_fiq |
20 | .endm | 16 | .endm |
21 | 17 | ||
22 | .macro get_irqnr_preamble, base, tmp | 18 | .macro get_irqnr_preamble, base, tmp |
23 | ldr \base, =VA_VIC0 | ||
24 | .endm | 19 | .endm |
25 | 20 | ||
26 | .macro arch_ret_to_user, tmp1, tmp2 | 21 | .macro arch_ret_to_user, tmp1, tmp2 |
27 | .endm | 22 | .endm |
28 | 23 | ||
29 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
30 | |||
31 | @ check the vic0 | ||
32 | mov \irqnr, # S5P_IRQ_OFFSET + 31 | ||
33 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
34 | teq \irqstat, #0 | ||
35 | |||
36 | @ otherwise try vic1 | ||
37 | addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) | ||
38 | addeq \irqnr, \irqnr, #32 | ||
39 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
40 | teqeq \irqstat, #0 | ||
41 | |||
42 | @ otherwise try vic2 | ||
43 | addeq \tmp, \base, #(VA_VIC2 - VA_VIC0) | ||
44 | addeq \irqnr, \irqnr, #32 | ||
45 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
46 | teqeq \irqstat, #0 | ||
47 | |||
48 | clzne \irqstat, \irqstat | ||
49 | subne \irqnr, \irqnr, \irqstat | ||
50 | .endm | 25 | .endm |
diff --git a/arch/arm/mach-s5pc100/include/mach/vmalloc.h b/arch/arm/mach-s5pc100/include/mach/vmalloc.h deleted file mode 100644 index 44c8e5726d9d..000000000000 --- a/arch/arm/mach-s5pc100/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* arch/arm/mach-s5pc100/include/mach/vmalloc.h | ||
2 | * | ||
3 | * Copyright 2010 Ben Dooks <ben-linux@fluff.org> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * S3C6400 vmalloc definition | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_VMALLOC_H | ||
13 | #define __ASM_ARCH_VMALLOC_H | ||
14 | |||
15 | #define VMALLOC_END 0xF6000000UL | ||
16 | |||
17 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index ead292ce1e0d..674d22992f3c 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/pwm_backlight.h> | 26 | #include <linux/pwm_backlight.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
30 | 31 | ||
@@ -251,6 +252,7 @@ MACHINE_START(SMDKC100, "SMDKC100") | |||
251 | /* Maintainer: Byungho Min <bhmin@samsung.com> */ | 252 | /* Maintainer: Byungho Min <bhmin@samsung.com> */ |
252 | .atag_offset = 0x100, | 253 | .atag_offset = 0x100, |
253 | .init_irq = s5pc100_init_irq, | 254 | .init_irq = s5pc100_init_irq, |
255 | .handle_irq = vic_handle_irq, | ||
254 | .map_io = smdkc100_map_io, | 256 | .map_io = smdkc100_map_io, |
255 | .init_machine = smdkc100_machine_init, | 257 | .init_machine = smdkc100_machine_init, |
256 | .timer = &s3c24xx_timer, | 258 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s5pv210/include/mach/entry-macro.S b/arch/arm/mach-s5pv210/include/mach/entry-macro.S index 3aa41ac59f07..bebca1b5d0b1 100644 --- a/arch/arm/mach-s5pv210/include/mach/entry-macro.S +++ b/arch/arm/mach-s5pv210/include/mach/entry-macro.S | |||
@@ -10,45 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <asm/hardware/vic.h> | ||
14 | #include <mach/map.h> | ||
15 | #include <plat/irqs.h> | ||
16 | |||
17 | .macro disable_fiq | 13 | .macro disable_fiq |
18 | .endm | 14 | .endm |
19 | 15 | ||
20 | .macro get_irqnr_preamble, base, tmp | ||
21 | ldr \base, =VA_VIC0 | ||
22 | .endm | ||
23 | |||
24 | .macro arch_ret_to_user, tmp1, tmp2 | 16 | .macro arch_ret_to_user, tmp1, tmp2 |
25 | .endm | 17 | .endm |
26 | |||
27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
28 | |||
29 | @ check the vic0 | ||
30 | mov \irqnr, # S5P_IRQ_OFFSET + 31 | ||
31 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
32 | teq \irqstat, #0 | ||
33 | |||
34 | @ otherwise try vic1 | ||
35 | addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) | ||
36 | addeq \irqnr, \irqnr, #32 | ||
37 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
38 | teqeq \irqstat, #0 | ||
39 | |||
40 | @ otherwise try vic2 | ||
41 | addeq \tmp, \base, #(VA_VIC2 - VA_VIC0) | ||
42 | addeq \irqnr, \irqnr, #32 | ||
43 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
44 | teqeq \irqstat, #0 | ||
45 | |||
46 | @ otherwise try vic3 | ||
47 | addeq \tmp, \base, #(VA_VIC3 - VA_VIC0) | ||
48 | addeq \irqnr, \irqnr, #32 | ||
49 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
50 | teqeq \irqstat, #0 | ||
51 | |||
52 | clzne \irqstat, \irqstat | ||
53 | subne \irqnr, \irqnr, \irqstat | ||
54 | .endm | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/vmalloc.h b/arch/arm/mach-s5pv210/include/mach/vmalloc.h deleted file mode 100644 index a6c659d68a5d..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/vmalloc.h | ||
2 | * | ||
3 | * Copyright 2010 Ben Dooks <ben-linux@fluff.org> | ||
4 | * | ||
5 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
6 | * http://www.samsung.com/ | ||
7 | * | ||
8 | * Based on arch/arm/mach-s5p6442/include/mach/vmalloc.h | ||
9 | * | ||
10 | * S5PV210 vmalloc definition | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_VMALLOC_H | ||
18 | #define __ASM_ARCH_VMALLOC_H __FILE__ | ||
19 | |||
20 | #define VMALLOC_END 0xF6000000UL | ||
21 | |||
22 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index edc52968315d..6f7dfe993c12 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | 24 | ||
25 | #include <asm/hardware/vic.h> | ||
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
27 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
@@ -681,6 +682,7 @@ MACHINE_START(AQUILA, "Aquila") | |||
681 | Kyungmin Park <kyungmin.park@samsung.com> */ | 682 | Kyungmin Park <kyungmin.park@samsung.com> */ |
682 | .atag_offset = 0x100, | 683 | .atag_offset = 0x100, |
683 | .init_irq = s5pv210_init_irq, | 684 | .init_irq = s5pv210_init_irq, |
685 | .handle_irq = vic_handle_irq, | ||
684 | .map_io = aquila_map_io, | 686 | .map_io = aquila_map_io, |
685 | .init_machine = aquila_machine_init, | 687 | .init_machine = aquila_machine_init, |
686 | .timer = &s5p_timer, | 688 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index b5a1dc3ed9c1..12c693717398 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | 29 | ||
30 | #include <asm/hardware/vic.h> | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
@@ -957,6 +958,7 @@ MACHINE_START(GONI, "GONI") | |||
957 | /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */ | 958 | /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */ |
958 | .atag_offset = 0x100, | 959 | .atag_offset = 0x100, |
959 | .init_irq = s5pv210_init_irq, | 960 | .init_irq = s5pv210_init_irq, |
961 | .handle_irq = vic_handle_irq, | ||
960 | .map_io = goni_map_io, | 962 | .map_io = goni_map_io, |
961 | .init_machine = goni_machine_init, | 963 | .init_machine = goni_machine_init, |
962 | .timer = &s5p_timer, | 964 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index 553319f70e52..9405da4ae3a3 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
17 | 17 | ||
18 | #include <asm/hardware/vic.h> | ||
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
@@ -139,6 +140,7 @@ MACHINE_START(SMDKC110, "SMDKC110") | |||
139 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | 140 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ |
140 | .atag_offset = 0x100, | 141 | .atag_offset = 0x100, |
141 | .init_irq = s5pv210_init_irq, | 142 | .init_irq = s5pv210_init_irq, |
143 | .handle_irq = vic_handle_irq, | ||
142 | .map_io = smdkc110_map_io, | 144 | .map_io = smdkc110_map_io, |
143 | .init_machine = smdkc110_machine_init, | 145 | .init_machine = smdkc110_machine_init, |
144 | .timer = &s5p_timer, | 146 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 9c6de5704312..cf4da7393822 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/pwm_backlight.h> | 21 | #include <linux/pwm_backlight.h> |
22 | 22 | ||
23 | #include <asm/hardware/vic.h> | ||
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
25 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
@@ -317,6 +318,7 @@ MACHINE_START(SMDKV210, "SMDKV210") | |||
317 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | 318 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ |
318 | .atag_offset = 0x100, | 319 | .atag_offset = 0x100, |
319 | .init_irq = s5pv210_init_irq, | 320 | .init_irq = s5pv210_init_irq, |
321 | .handle_irq = vic_handle_irq, | ||
320 | .map_io = smdkv210_map_io, | 322 | .map_io = smdkv210_map_io, |
321 | .init_machine = smdkv210_machine_init, | 323 | .init_machine = smdkv210_machine_init, |
322 | .timer = &s5p_timer, | 324 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c index db6409a3abdf..74e99bc0dc9b 100644 --- a/arch/arm/mach-s5pv210/mach-torbreck.c +++ b/arch/arm/mach-s5pv210/mach-torbreck.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/serial_core.h> | 15 | #include <linux/serial_core.h> |
16 | 16 | ||
17 | #include <asm/hardware/vic.h> | ||
17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
19 | #include <asm/setup.h> | 20 | #include <asm/setup.h> |
@@ -128,6 +129,7 @@ MACHINE_START(TORBRECK, "TORBRECK") | |||
128 | /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */ | 129 | /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */ |
129 | .atag_offset = 0x100, | 130 | .atag_offset = 0x100, |
130 | .init_irq = s5pv210_init_irq, | 131 | .init_irq = s5pv210_init_irq, |
132 | .handle_irq = vic_handle_irq, | ||
131 | .map_io = torbreck_map_io, | 133 | .map_io = torbreck_map_io, |
132 | .init_machine = torbreck_machine_init, | 134 | .init_machine = torbreck_machine_init, |
133 | .timer = &s5p_timer, | 135 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-sa1100/include/mach/vmalloc.h b/arch/arm/mach-sa1100/include/mach/vmalloc.h deleted file mode 100644 index b3d002398480..000000000000 --- a/arch/arm/mach-sa1100/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-sa1100/include/mach/vmalloc.h | ||
3 | */ | ||
4 | #define VMALLOC_END (0xe8000000UL) | ||
diff --git a/arch/arm/mach-sa1100/nanoengine.c b/arch/arm/mach-sa1100/nanoengine.c index ed77f85b9951..85f6ee672225 100644 --- a/arch/arm/mach-sa1100/nanoengine.c +++ b/arch/arm/mach-sa1100/nanoengine.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
22 | #include <asm/page.h> | ||
22 | 23 | ||
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/flash.h> | 25 | #include <asm/mach/flash.h> |
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index fa6602491d54..69e33535dee6 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/sched.h> /* just for sched_clock() - funny that */ | ||
16 | #include <linux/timex.h> | 15 | #include <linux/timex.h> |
17 | #include <linux/clockchips.h> | 16 | #include <linux/clockchips.h> |
18 | 17 | ||
@@ -20,29 +19,9 @@ | |||
20 | #include <asm/sched_clock.h> | 19 | #include <asm/sched_clock.h> |
21 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
22 | 21 | ||
23 | /* | 22 | static u32 notrace sa1100_read_sched_clock(void) |
24 | * This is the SA11x0 sched_clock implementation. | ||
25 | */ | ||
26 | static DEFINE_CLOCK_DATA(cd); | ||
27 | |||
28 | /* | ||
29 | * Constants generated by clocks_calc_mult_shift(m, s, 3.6864MHz, | ||
30 | * NSEC_PER_SEC, 60). | ||
31 | * This gives a resolution of about 271ns and a wrap period of about 19min. | ||
32 | */ | ||
33 | #define SC_MULT 2275555556u | ||
34 | #define SC_SHIFT 23 | ||
35 | |||
36 | unsigned long long notrace sched_clock(void) | ||
37 | { | ||
38 | u32 cyc = OSCR; | ||
39 | return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); | ||
40 | } | ||
41 | |||
42 | static void notrace sa1100_update_sched_clock(void) | ||
43 | { | 23 | { |
44 | u32 cyc = OSCR; | 24 | return OSCR; |
45 | update_sched_clock(&cd, cyc, (u32)~0); | ||
46 | } | 25 | } |
47 | 26 | ||
48 | #define MIN_OSCR_DELTA 2 | 27 | #define MIN_OSCR_DELTA 2 |
@@ -109,8 +88,7 @@ static void __init sa1100_timer_init(void) | |||
109 | OIER = 0; | 88 | OIER = 0; |
110 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; | 89 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; |
111 | 90 | ||
112 | init_fixed_sched_clock(&cd, sa1100_update_sched_clock, 32, | 91 | setup_sched_clock(sa1100_read_sched_clock, 32, 3686400); |
113 | 3686400, SC_MULT, SC_SHIFT); | ||
114 | 92 | ||
115 | clockevents_calc_mult_shift(&ckevt_sa1100_osmr0, 3686400, 4); | 93 | clockevents_calc_mult_shift(&ckevt_sa1100_osmr0, 3686400, 4); |
116 | ckevt_sa1100_osmr0.max_delta_ns = | 94 | ckevt_sa1100_osmr0.max_delta_ns = |
diff --git a/arch/arm/mach-shark/include/mach/vmalloc.h b/arch/arm/mach-shark/include/mach/vmalloc.h deleted file mode 100644 index b10df988526d..000000000000 --- a/arch/arm/mach-shark/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/vmalloc.h | ||
3 | */ | ||
4 | #define VMALLOC_END 0xd0000000UL | ||
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 737bdc631b0d..5ca1f9d66995 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -28,7 +28,6 @@ pfc-$(CONFIG_ARCH_SH73A0) += pfc-sh73a0.o | |||
28 | obj-$(CONFIG_ARCH_SH7367) += entry-intc.o | 28 | obj-$(CONFIG_ARCH_SH7367) += entry-intc.o |
29 | obj-$(CONFIG_ARCH_SH7377) += entry-intc.o | 29 | obj-$(CONFIG_ARCH_SH7377) += entry-intc.o |
30 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | 30 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o |
31 | obj-$(CONFIG_ARCH_SH73A0) += entry-gic.o | ||
32 | 31 | ||
33 | # PM objects | 32 | # PM objects |
34 | obj-$(CONFIG_SUSPEND) += suspend.o | 33 | obj-$(CONFIG_SUSPEND) += suspend.o |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 7119b87cbfa0..a4e6ca04e319 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -466,8 +466,6 @@ static struct map_desc ag5evm_io_desc[] __initdata = { | |||
466 | static void __init ag5evm_map_io(void) | 466 | static void __init ag5evm_map_io(void) |
467 | { | 467 | { |
468 | iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc)); | 468 | iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc)); |
469 | /* DMA memory at 0xf6000000 - 0xffdfffff */ | ||
470 | init_consistent_dma_size(158 << 20); | ||
471 | 469 | ||
472 | /* setup early devices and console here as well */ | 470 | /* setup early devices and console here as well */ |
473 | sh73a0_add_early_devices(); | 471 | sh73a0_add_early_devices(); |
@@ -609,7 +607,7 @@ MACHINE_START(AG5EVM, "ag5evm") | |||
609 | .map_io = ag5evm_map_io, | 607 | .map_io = ag5evm_map_io, |
610 | .nr_irqs = NR_IRQS_LEGACY, | 608 | .nr_irqs = NR_IRQS_LEGACY, |
611 | .init_irq = sh73a0_init_irq, | 609 | .init_irq = sh73a0_init_irq, |
612 | .handle_irq = shmobile_handle_irq_gic, | 610 | .handle_irq = gic_handle_irq, |
613 | .init_machine = ag5evm_init, | 611 | .init_machine = ag5evm_init, |
614 | .timer = &ag5evm_timer, | 612 | .timer = &ag5evm_timer, |
615 | MACHINE_END | 613 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 4c865ece9ac4..6a6f9f7568c2 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -1172,8 +1172,6 @@ static struct map_desc ap4evb_io_desc[] __initdata = { | |||
1172 | static void __init ap4evb_map_io(void) | 1172 | static void __init ap4evb_map_io(void) |
1173 | { | 1173 | { |
1174 | iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc)); | 1174 | iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc)); |
1175 | /* DMA memory at 0xf6000000 - 0xffdfffff */ | ||
1176 | init_consistent_dma_size(158 << 20); | ||
1177 | 1175 | ||
1178 | /* setup early devices and console here as well */ | 1176 | /* setup early devices and console here as well */ |
1179 | sh7372_add_early_devices(); | 1177 | sh7372_add_early_devices(); |
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c index 8b620bf06221..72d557281b1f 100644 --- a/arch/arm/mach-shmobile/board-g3evm.c +++ b/arch/arm/mach-shmobile/board-g3evm.c | |||
@@ -261,8 +261,6 @@ static struct map_desc g3evm_io_desc[] __initdata = { | |||
261 | static void __init g3evm_map_io(void) | 261 | static void __init g3evm_map_io(void) |
262 | { | 262 | { |
263 | iotable_init(g3evm_io_desc, ARRAY_SIZE(g3evm_io_desc)); | 263 | iotable_init(g3evm_io_desc, ARRAY_SIZE(g3evm_io_desc)); |
264 | /* DMA memory at 0xf6000000 - 0xffdfffff */ | ||
265 | init_consistent_dma_size(158 << 20); | ||
266 | 264 | ||
267 | /* setup early devices and console here as well */ | 265 | /* setup early devices and console here as well */ |
268 | sh7367_add_early_devices(); | 266 | sh7367_add_early_devices(); |
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c index 7719ddc5f591..2220b885cff5 100644 --- a/arch/arm/mach-shmobile/board-g4evm.c +++ b/arch/arm/mach-shmobile/board-g4evm.c | |||
@@ -275,8 +275,6 @@ static struct map_desc g4evm_io_desc[] __initdata = { | |||
275 | static void __init g4evm_map_io(void) | 275 | static void __init g4evm_map_io(void) |
276 | { | 276 | { |
277 | iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); | 277 | iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); |
278 | /* DMA memory at 0xf6000000 - 0xffdfffff */ | ||
279 | init_consistent_dma_size(158 << 20); | ||
280 | 278 | ||
281 | /* setup early devices and console here as well */ | 279 | /* setup early devices and console here as well */ |
282 | sh7377_add_early_devices(); | 280 | sh7377_add_early_devices(); |
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index f44150b5ae46..857ceeec1bb0 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c | |||
@@ -551,7 +551,7 @@ MACHINE_START(KOTA2, "kota2") | |||
551 | .map_io = kota2_map_io, | 551 | .map_io = kota2_map_io, |
552 | .nr_irqs = NR_IRQS_LEGACY, | 552 | .nr_irqs = NR_IRQS_LEGACY, |
553 | .init_irq = sh73a0_init_irq, | 553 | .init_irq = sh73a0_init_irq, |
554 | .handle_irq = shmobile_handle_irq_gic, | 554 | .handle_irq = gic_handle_irq, |
555 | .init_machine = kota2_init, | 555 | .init_machine = kota2_init, |
556 | .timer = &kota2_timer, | 556 | .timer = &kota2_timer, |
557 | MACHINE_END | 557 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 9c5e598e0e3d..ed5256687397 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -1390,8 +1390,6 @@ static struct map_desc mackerel_io_desc[] __initdata = { | |||
1390 | static void __init mackerel_map_io(void) | 1390 | static void __init mackerel_map_io(void) |
1391 | { | 1391 | { |
1392 | iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc)); | 1392 | iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc)); |
1393 | /* DMA memory at 0xf6000000 - 0xffdfffff */ | ||
1394 | init_consistent_dma_size(158 << 20); | ||
1395 | 1393 | ||
1396 | /* setup early devices and console here as well */ | 1394 | /* setup early devices and console here as well */ |
1397 | sh7372_add_early_devices(); | 1395 | sh7372_add_early_devices(); |
diff --git a/arch/arm/mach-shmobile/entry-gic.S b/arch/arm/mach-shmobile/entry-gic.S deleted file mode 100644 index e20239b08c83..000000000000 --- a/arch/arm/mach-shmobile/entry-gic.S +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * ARM Interrupt demux handler using GIC | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * Copyright (C) 2011 Paul Mundt | ||
6 | * Copyright (C) 2010 - 2011 Renesas Solutions Corp. | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <asm/assembler.h> | ||
14 | #include <asm/entry-macro-multi.S> | ||
15 | #include <asm/hardware/gic.h> | ||
16 | #include <asm/hardware/entry-macro-gic.S> | ||
17 | |||
18 | arch_irq_handler shmobile_handle_irq_gic | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 834bd6cd508f..4bf82c156771 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -7,7 +7,6 @@ extern void shmobile_secondary_vector(void); | |||
7 | struct clk; | 7 | struct clk; |
8 | extern int clk_init(void); | 8 | extern int clk_init(void); |
9 | extern void shmobile_handle_irq_intc(struct pt_regs *); | 9 | extern void shmobile_handle_irq_intc(struct pt_regs *); |
10 | extern void shmobile_handle_irq_gic(struct pt_regs *); | ||
11 | extern struct platform_suspend_ops shmobile_suspend_ops; | 10 | extern struct platform_suspend_ops shmobile_suspend_ops; |
12 | struct cpuidle_driver; | 11 | struct cpuidle_driver; |
13 | extern void (*shmobile_cpuidle_modes[])(void); | 12 | extern void (*shmobile_cpuidle_modes[])(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/entry-macro.S b/arch/arm/mach-shmobile/include/mach/entry-macro.S index 8d4a416d4285..2a57b2964ee9 100644 --- a/arch/arm/mach-shmobile/include/mach/entry-macro.S +++ b/arch/arm/mach-shmobile/include/mach/entry-macro.S | |||
@@ -18,14 +18,5 @@ | |||
18 | .macro disable_fiq | 18 | .macro disable_fiq |
19 | .endm | 19 | .endm |
20 | 20 | ||
21 | .macro get_irqnr_preamble, base, tmp | ||
22 | .endm | ||
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
25 | .endm | ||
26 | |||
27 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
28 | .endm | ||
29 | |||
30 | .macro arch_ret_to_user, tmp1, tmp2 | 21 | .macro arch_ret_to_user, tmp1, tmp2 |
31 | .endm | 22 | .endm |
diff --git a/arch/arm/mach-shmobile/include/mach/gpio.h b/arch/arm/mach-shmobile/include/mach/gpio.h index 7bf0890e16ba..de795b42232a 100644 --- a/arch/arm/mach-shmobile/include/mach/gpio.h +++ b/arch/arm/mach-shmobile/include/mach/gpio.h | |||
@@ -12,8 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | |||
16 | #define ARCH_NR_GPIOS 1024 | ||
17 | #include <linux/sh_pfc.h> | 15 | #include <linux/sh_pfc.h> |
18 | 16 | ||
19 | #ifdef CONFIG_GPIOLIB | 17 | #ifdef CONFIG_GPIOLIB |
diff --git a/arch/arm/mach-shmobile/include/mach/vmalloc.h b/arch/arm/mach-shmobile/include/mach/vmalloc.h deleted file mode 100644 index 2b8fd8b942fe..000000000000 --- a/arch/arm/mach-shmobile/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_VMALLOC_H | ||
2 | #define __ASM_MACH_VMALLOC_H | ||
3 | |||
4 | /* Vmalloc at ... - 0xe5ffffff */ | ||
5 | #define VMALLOC_END 0xe6000000UL | ||
6 | |||
7 | #endif /* __ASM_MACH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/entry-macro.S b/arch/arm/mach-spear3xx/include/mach/entry-macro.S index 53da4224ba3d..de3bb41c8e9e 100644 --- a/arch/arm/mach-spear3xx/include/mach/entry-macro.S +++ b/arch/arm/mach-spear3xx/include/mach/entry-macro.S | |||
@@ -11,35 +11,8 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | .macro disable_fiq | 14 | .macro disable_fiq |
18 | .endm | 15 | .endm |
19 | 16 | ||
20 | .macro get_irqnr_preamble, base, tmp | ||
21 | .endm | ||
22 | |||
23 | .macro arch_ret_to_user, tmp1, tmp2 | 17 | .macro arch_ret_to_user, tmp1, tmp2 |
24 | .endm | 18 | .endm |
25 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
27 | ldr \base, =VA_SPEAR3XX_ML1_VIC_BASE | ||
28 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
29 | teq \irqstat, #0 | ||
30 | beq 1001f @ this will set/reset | ||
31 | @ zero register | ||
32 | /* | ||
33 | * Following code will find bit position of least significang | ||
34 | * bit set in irqstat, using following equation | ||
35 | * least significant bit set in n = (n & ~(n-1)) | ||
36 | */ | ||
37 | sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 | ||
38 | mvn \tmp, \tmp @ tmp = ~tmp | ||
39 | and \irqstat, \irqstat, \tmp @ irqstat &= tmp | ||
40 | /* Now, irqstat is = bit no. of 1st bit set in vic irq status */ | ||
41 | clz \tmp, \irqstat @ tmp = leading zeros | ||
42 | rsb \irqnr, \tmp, #0x1F @ irqnr = 32 - tmp - 1 | ||
43 | |||
44 | 1001: /* EQ will be set if no irqs pending */ | ||
45 | .endm | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/vmalloc.h b/arch/arm/mach-spear3xx/include/mach/vmalloc.h deleted file mode 100644 index df977b3c9a63..000000000000 --- a/arch/arm/mach-spear3xx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Defining Vmalloc area for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_VMALLOC_H | ||
15 | #define __MACH_VMALLOC_H | ||
16 | |||
17 | #include <plat/vmalloc.h> | ||
18 | |||
19 | #endif /* __MACH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c index 8b429f05b613..3462ab9d6122 100644 --- a/arch/arm/mach-spear3xx/spear300_evb.c +++ b/arch/arm/mach-spear3xx/spear300_evb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
@@ -67,6 +68,7 @@ MACHINE_START(SPEAR300, "ST-SPEAR300-EVB") | |||
67 | .atag_offset = 0x100, | 68 | .atag_offset = 0x100, |
68 | .map_io = spear3xx_map_io, | 69 | .map_io = spear3xx_map_io, |
69 | .init_irq = spear3xx_init_irq, | 70 | .init_irq = spear3xx_init_irq, |
71 | .handle_irq = vic_handle_irq, | ||
70 | .timer = &spear3xx_timer, | 72 | .timer = &spear3xx_timer, |
71 | .init_machine = spear300_evb_init, | 73 | .init_machine = spear300_evb_init, |
72 | .restart = spear_restart, | 74 | .restart = spear_restart, |
diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c index a11d6ead0aed..f92c4993f65a 100644 --- a/arch/arm/mach-spear3xx/spear310_evb.c +++ b/arch/arm/mach-spear3xx/spear310_evb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
@@ -73,6 +74,7 @@ MACHINE_START(SPEAR310, "ST-SPEAR310-EVB") | |||
73 | .atag_offset = 0x100, | 74 | .atag_offset = 0x100, |
74 | .map_io = spear3xx_map_io, | 75 | .map_io = spear3xx_map_io, |
75 | .init_irq = spear3xx_init_irq, | 76 | .init_irq = spear3xx_init_irq, |
77 | .handle_irq = vic_handle_irq, | ||
76 | .timer = &spear3xx_timer, | 78 | .timer = &spear3xx_timer, |
77 | .init_machine = spear310_evb_init, | 79 | .init_machine = spear310_evb_init, |
78 | .restart = spear_restart, | 80 | .restart = spear_restart, |
diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c index 4239a70686c5..105334ab7021 100644 --- a/arch/arm/mach-spear3xx/spear320_evb.c +++ b/arch/arm/mach-spear3xx/spear320_evb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
@@ -71,6 +72,7 @@ MACHINE_START(SPEAR320, "ST-SPEAR320-EVB") | |||
71 | .atag_offset = 0x100, | 72 | .atag_offset = 0x100, |
72 | .map_io = spear3xx_map_io, | 73 | .map_io = spear3xx_map_io, |
73 | .init_irq = spear3xx_init_irq, | 74 | .init_irq = spear3xx_init_irq, |
75 | .handle_irq = vic_handle_irq, | ||
74 | .timer = &spear3xx_timer, | 76 | .timer = &spear3xx_timer, |
75 | .init_machine = spear320_evb_init, | 77 | .init_machine = spear320_evb_init, |
76 | .restart = spear_restart, | 78 | .restart = spear_restart, |
diff --git a/arch/arm/mach-spear6xx/include/mach/entry-macro.S b/arch/arm/mach-spear6xx/include/mach/entry-macro.S index 8a0b0ed7b203..d490a910d925 100644 --- a/arch/arm/mach-spear6xx/include/mach/entry-macro.S +++ b/arch/arm/mach-spear6xx/include/mach/entry-macro.S | |||
@@ -11,44 +11,8 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | .macro disable_fiq | 14 | .macro disable_fiq |
18 | .endm | 15 | .endm |
19 | 16 | ||
20 | .macro get_irqnr_preamble, base, tmp | ||
21 | .endm | ||
22 | |||
23 | .macro arch_ret_to_user, tmp1, tmp2 | 17 | .macro arch_ret_to_user, tmp1, tmp2 |
24 | .endm | 18 | .endm |
25 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
27 | ldr \base, =VA_SPEAR6XX_CPU_VIC_PRI_BASE | ||
28 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
29 | mov \irqnr, #0 | ||
30 | teq \irqstat, #0 | ||
31 | bne 1001f | ||
32 | ldr \base, =VA_SPEAR6XX_CPU_VIC_SEC_BASE | ||
33 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
34 | teq \irqstat, #0 | ||
35 | beq 1002f @ this will set/reset | ||
36 | @ zero register | ||
37 | mov \irqnr, #32 | ||
38 | 1001: | ||
39 | /* | ||
40 | * Following code will find bit position of least significang | ||
41 | * bit set in irqstat, using following equation | ||
42 | * least significant bit set in n = (n & ~(n-1)) | ||
43 | */ | ||
44 | sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 | ||
45 | mvn \tmp, \tmp @ tmp = ~tmp | ||
46 | and \irqstat, \irqstat, \tmp @ irqstat &= tmp | ||
47 | /* Now, irqstat is = bit no. of 1st bit set in vic irq status */ | ||
48 | clz \tmp, \irqstat @ tmp = leading zeros | ||
49 | |||
50 | rsb \tmp, \tmp, #0x1F @ tmp = 32 - tmp - 1 | ||
51 | add \irqnr, \irqnr, \tmp | ||
52 | |||
53 | 1002: /* EQ will be set if no irqs pending */ | ||
54 | .endm | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/vmalloc.h b/arch/arm/mach-spear6xx/include/mach/vmalloc.h deleted file mode 100644 index 4a0b56cb2a91..000000000000 --- a/arch/arm/mach-spear6xx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Defining Vmalloc area for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_VMALLOC_H | ||
15 | #define __MACH_VMALLOC_H | ||
16 | |||
17 | #include <plat/vmalloc.h> | ||
18 | |||
19 | #endif /* __MACH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c index 0a16559ba264..c6e4254741cc 100644 --- a/arch/arm/mach-spear6xx/spear600_evb.c +++ b/arch/arm/mach-spear6xx/spear600_evb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
@@ -46,6 +47,7 @@ MACHINE_START(SPEAR600, "ST-SPEAR600-EVB") | |||
46 | .atag_offset = 0x100, | 47 | .atag_offset = 0x100, |
47 | .map_io = spear6xx_map_io, | 48 | .map_io = spear6xx_map_io, |
48 | .init_irq = spear6xx_init_irq, | 49 | .init_irq = spear6xx_init_irq, |
50 | .handle_irq = vic_handle_irq, | ||
49 | .timer = &spear6xx_timer, | 51 | .timer = &spear6xx_timer, |
50 | .init_machine = spear600_evb_init, | 52 | .init_machine = spear600_evb_init, |
51 | .restart = spear_restart, | 53 | .restart = spear_restart, |
diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c index aaaa17c9d21a..e417a8383dbb 100644 --- a/arch/arm/mach-tegra/board-dt.c +++ b/arch/arm/mach-tegra/board-dt.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
33 | #include <linux/i2c-tegra.h> | 33 | #include <linux/i2c-tegra.h> |
34 | 34 | ||
35 | #include <asm/hardware/gic.h> | ||
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
37 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
@@ -130,6 +131,7 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)") | |||
130 | .map_io = tegra_map_common_io, | 131 | .map_io = tegra_map_common_io, |
131 | .init_early = tegra_init_early, | 132 | .init_early = tegra_init_early, |
132 | .init_irq = tegra_init_irq, | 133 | .init_irq = tegra_init_irq, |
134 | .handle_irq = gic_handle_irq, | ||
133 | .timer = &tegra_timer, | 135 | .timer = &tegra_timer, |
134 | .init_machine = tegra_dt_init, | 136 | .init_machine = tegra_dt_init, |
135 | .restart = tegra_assert_system_reset, | 137 | .restart = tegra_assert_system_reset, |
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index 7eaa52de756c..70ee674131f9 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
34 | #include <asm/hardware/gic.h> | ||
34 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
35 | 36 | ||
36 | #include <mach/tegra_wm8903_pdata.h> | 37 | #include <mach/tegra_wm8903_pdata.h> |
@@ -187,6 +188,7 @@ MACHINE_START(HARMONY, "harmony") | |||
187 | .map_io = tegra_map_common_io, | 188 | .map_io = tegra_map_common_io, |
188 | .init_early = tegra_init_early, | 189 | .init_early = tegra_init_early, |
189 | .init_irq = tegra_init_irq, | 190 | .init_irq = tegra_init_irq, |
191 | .handle_irq = gic_handle_irq, | ||
190 | .timer = &tegra_timer, | 192 | .timer = &tegra_timer, |
191 | .init_machine = tegra_harmony_init, | 193 | .init_machine = tegra_harmony_init, |
192 | .restart = tegra_assert_system_reset, | 194 | .restart = tegra_assert_system_reset, |
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 28c97e317407..33d6205ad307 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/gpio.h> | 29 | #include <linux/gpio.h> |
30 | #include <linux/rfkill-gpio.h> | 30 | #include <linux/rfkill-gpio.h> |
31 | 31 | ||
32 | #include <asm/hardware/gic.h> | ||
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
@@ -190,6 +191,7 @@ MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ") | |||
190 | .map_io = tegra_map_common_io, | 191 | .map_io = tegra_map_common_io, |
191 | .init_early = tegra_init_early, | 192 | .init_early = tegra_init_early, |
192 | .init_irq = tegra_init_irq, | 193 | .init_irq = tegra_init_irq, |
194 | .handle_irq = gic_handle_irq, | ||
193 | .timer = &tegra_timer, | 195 | .timer = &tegra_timer, |
194 | .init_machine = tegra_paz00_init, | 196 | .init_machine = tegra_paz00_init, |
195 | .restart = tegra_assert_system_reset, | 197 | .restart = tegra_assert_system_reset, |
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c index 9b2eca1f5283..c1599eb8e0cb 100644 --- a/arch/arm/mach-tegra/board-seaboard.c +++ b/arch/arm/mach-tegra/board-seaboard.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
37 | #include <asm/hardware/gic.h> | ||
37 | 38 | ||
38 | #include "board.h" | 39 | #include "board.h" |
39 | #include "board-seaboard.h" | 40 | #include "board-seaboard.h" |
@@ -284,6 +285,7 @@ MACHINE_START(SEABOARD, "seaboard") | |||
284 | .map_io = tegra_map_common_io, | 285 | .map_io = tegra_map_common_io, |
285 | .init_early = tegra_init_early, | 286 | .init_early = tegra_init_early, |
286 | .init_irq = tegra_init_irq, | 287 | .init_irq = tegra_init_irq, |
288 | .handle_irq = gic_handle_irq, | ||
287 | .timer = &tegra_timer, | 289 | .timer = &tegra_timer, |
288 | .init_machine = tegra_seaboard_init, | 290 | .init_machine = tegra_seaboard_init, |
289 | .restart = tegra_assert_system_reset, | 291 | .restart = tegra_assert_system_reset, |
@@ -294,6 +296,7 @@ MACHINE_START(KAEN, "kaen") | |||
294 | .map_io = tegra_map_common_io, | 296 | .map_io = tegra_map_common_io, |
295 | .init_early = tegra_init_early, | 297 | .init_early = tegra_init_early, |
296 | .init_irq = tegra_init_irq, | 298 | .init_irq = tegra_init_irq, |
299 | .handle_irq = gic_handle_irq, | ||
297 | .timer = &tegra_timer, | 300 | .timer = &tegra_timer, |
298 | .init_machine = tegra_kaen_init, | 301 | .init_machine = tegra_kaen_init, |
299 | .restart = tegra_assert_system_reset, | 302 | .restart = tegra_assert_system_reset, |
@@ -304,6 +307,7 @@ MACHINE_START(WARIO, "wario") | |||
304 | .map_io = tegra_map_common_io, | 307 | .map_io = tegra_map_common_io, |
305 | .init_early = tegra_init_early, | 308 | .init_early = tegra_init_early, |
306 | .init_irq = tegra_init_irq, | 309 | .init_irq = tegra_init_irq, |
310 | .handle_irq = gic_handle_irq, | ||
307 | .timer = &tegra_timer, | 311 | .timer = &tegra_timer, |
308 | .init_machine = tegra_wario_init, | 312 | .init_machine = tegra_wario_init, |
309 | .restart = tegra_assert_system_reset, | 313 | .restart = tegra_assert_system_reset, |
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c index 1fa9e48e8ec6..c242314a1db5 100644 --- a/arch/arm/mach-tegra/board-trimslice.c +++ b/arch/arm/mach-tegra/board-trimslice.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | 28 | ||
29 | #include <asm/hardware/gic.h> | ||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
@@ -176,6 +177,7 @@ MACHINE_START(TRIMSLICE, "trimslice") | |||
176 | .map_io = tegra_map_common_io, | 177 | .map_io = tegra_map_common_io, |
177 | .init_early = tegra_init_early, | 178 | .init_early = tegra_init_early, |
178 | .init_irq = tegra_init_irq, | 179 | .init_irq = tegra_init_irq, |
180 | .handle_irq = gic_handle_irq, | ||
179 | .timer = &tegra_timer, | 181 | .timer = &tegra_timer, |
180 | .init_machine = tegra_trimslice_init, | 182 | .init_machine = tegra_trimslice_init, |
181 | .restart = tegra_assert_system_reset, | 183 | .restart = tegra_assert_system_reset, |
diff --git a/arch/arm/mach-tegra/include/mach/entry-macro.S b/arch/arm/mach-tegra/include/mach/entry-macro.S index dd165c53889d..ac11262149c7 100644 --- a/arch/arm/mach-tegra/include/mach/entry-macro.S +++ b/arch/arm/mach-tegra/include/mach/entry-macro.S | |||
@@ -12,30 +12,15 @@ | |||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | #include <mach/iomap.h> | ||
16 | #include <mach/io.h> | ||
17 | |||
18 | #if defined(CONFIG_ARM_GIC) | ||
19 | #define HAVE_GET_IRQNR_PREAMBLE | ||
20 | #include <asm/hardware/entry-macro-gic.S> | ||
21 | |||
22 | /* Uses the GIC interrupt controller built into the cpu */ | ||
23 | #define ICTRL_BASE (IO_CPU_VIRT + 0x100) | ||
24 | 15 | ||
25 | .macro disable_fiq | 16 | .macro disable_fiq |
26 | .endm | 17 | .endm |
27 | 18 | ||
28 | .macro get_irqnr_preamble, base, tmp | 19 | .macro arch_ret_to_user, tmp1, tmp2 |
29 | movw \base, #(ICTRL_BASE & 0x0000ffff) | ||
30 | movt \base, #((ICTRL_BASE & 0xffff0000) >> 16) | ||
31 | .endm | 20 | .endm |
32 | 21 | ||
33 | .macro arch_ret_to_user, tmp1, tmp2 | 22 | #if !defined(CONFIG_ARM_GIC) |
34 | .endm | ||
35 | #else | ||
36 | /* legacy interrupt controller for AP16 */ | 23 | /* legacy interrupt controller for AP16 */ |
37 | .macro disable_fiq | ||
38 | .endm | ||
39 | 24 | ||
40 | .macro get_irqnr_preamble, base, tmp | 25 | .macro get_irqnr_preamble, base, tmp |
41 | @ enable imprecise aborts | 26 | @ enable imprecise aborts |
@@ -46,9 +31,6 @@ | |||
46 | orr \base, #0x0000f000 | 31 | orr \base, #0x0000f000 |
47 | .endm | 32 | .endm |
48 | 33 | ||
49 | .macro arch_ret_to_user, tmp1, tmp2 | ||
50 | .endm | ||
51 | |||
52 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 34 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
53 | ldr \irqnr, [\base, #0x20] @ EVT_IRQ_STS | 35 | ldr \irqnr, [\base, #0x20] @ EVT_IRQ_STS |
54 | cmp \irqnr, #0x80 | 36 | cmp \irqnr, #0x80 |
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h index 35a011fbc42d..f15defffb5d2 100644 --- a/arch/arm/mach-tegra/include/mach/io.h +++ b/arch/arm/mach-tegra/include/mach/io.h | |||
@@ -71,12 +71,6 @@ | |||
71 | 71 | ||
72 | #ifndef __ASSEMBLER__ | 72 | #ifndef __ASSEMBLER__ |
73 | 73 | ||
74 | #define __arch_ioremap tegra_ioremap | ||
75 | #define __arch_iounmap tegra_iounmap | ||
76 | |||
77 | void __iomem *tegra_ioremap(unsigned long phys, size_t size, unsigned int type); | ||
78 | void tegra_iounmap(volatile void __iomem *addr); | ||
79 | |||
80 | #define IO_ADDRESS(n) (IO_TO_VIRT(n)) | 74 | #define IO_ADDRESS(n) (IO_TO_VIRT(n)) |
81 | 75 | ||
82 | #ifdef CONFIG_TEGRA_PCI | 76 | #ifdef CONFIG_TEGRA_PCI |
diff --git a/arch/arm/mach-tegra/include/mach/vmalloc.h b/arch/arm/mach-tegra/include/mach/vmalloc.h deleted file mode 100644 index fd6aa65b2dc6..000000000000 --- a/arch/arm/mach-tegra/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2010 Google, Inc. | ||
5 | * | ||
6 | * Author: | ||
7 | * Colin Cross <ccross@google.com> | ||
8 | * Erik Gilling <konkers@google.com> | ||
9 | * | ||
10 | * This software is licensed under the terms of the GNU General Public | ||
11 | * License version 2, as published by the Free Software Foundation, and | ||
12 | * may be copied, distributed, and modified under those terms. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | */ | ||
20 | |||
21 | #ifndef __MACH_TEGRA_VMALLOC_H | ||
22 | #define __MACH_TEGRA_VMALLOC_H | ||
23 | |||
24 | #include <asm/sizes.h> | ||
25 | |||
26 | #define VMALLOC_END 0xFE000000UL | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c index 5489f8b5d6ad..d23ee2db2827 100644 --- a/arch/arm/mach-tegra/io.c +++ b/arch/arm/mach-tegra/io.c | |||
@@ -60,24 +60,3 @@ void __init tegra_map_common_io(void) | |||
60 | { | 60 | { |
61 | iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc)); | 61 | iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc)); |
62 | } | 62 | } |
63 | |||
64 | /* | ||
65 | * Intercept ioremap() requests for addresses in our fixed mapping regions. | ||
66 | */ | ||
67 | void __iomem *tegra_ioremap(unsigned long p, size_t size, unsigned int type) | ||
68 | { | ||
69 | void __iomem *v = IO_ADDRESS(p); | ||
70 | if (v == NULL) | ||
71 | v = __arm_ioremap(p, size, type); | ||
72 | return v; | ||
73 | } | ||
74 | EXPORT_SYMBOL(tegra_ioremap); | ||
75 | |||
76 | void tegra_iounmap(volatile void __iomem *addr) | ||
77 | { | ||
78 | unsigned long virt = (unsigned long)addr; | ||
79 | |||
80 | if (virt >= VMALLOC_START && virt < VMALLOC_END) | ||
81 | __iounmap(addr); | ||
82 | } | ||
83 | EXPORT_SYMBOL(tegra_iounmap); | ||
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index e2272d263a83..732c724008b1 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/sched.h> | ||
23 | #include <linux/time.h> | 22 | #include <linux/time.h> |
24 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
25 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
@@ -106,25 +105,9 @@ static struct clock_event_device tegra_clockevent = { | |||
106 | .set_mode = tegra_timer_set_mode, | 105 | .set_mode = tegra_timer_set_mode, |
107 | }; | 106 | }; |
108 | 107 | ||
109 | static DEFINE_CLOCK_DATA(cd); | 108 | static u32 notrace tegra_read_sched_clock(void) |
110 | |||
111 | /* | ||
112 | * Constants generated by clocks_calc_mult_shift(m, s, 1MHz, NSEC_PER_SEC, 60). | ||
113 | * This gives a resolution of about 1us and a wrap period of about 1h11min. | ||
114 | */ | ||
115 | #define SC_MULT 4194304000u | ||
116 | #define SC_SHIFT 22 | ||
117 | |||
118 | unsigned long long notrace sched_clock(void) | ||
119 | { | ||
120 | u32 cyc = timer_readl(TIMERUS_CNTR_1US); | ||
121 | return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); | ||
122 | } | ||
123 | |||
124 | static void notrace tegra_update_sched_clock(void) | ||
125 | { | 109 | { |
126 | u32 cyc = timer_readl(TIMERUS_CNTR_1US); | 110 | return timer_readl(TIMERUS_CNTR_1US); |
127 | update_sched_clock(&cd, cyc, (u32)~0); | ||
128 | } | 111 | } |
129 | 112 | ||
130 | /* | 113 | /* |
@@ -218,8 +201,7 @@ static void __init tegra_init_timer(void) | |||
218 | WARN(1, "Unknown clock rate"); | 201 | WARN(1, "Unknown clock rate"); |
219 | } | 202 | } |
220 | 203 | ||
221 | init_fixed_sched_clock(&cd, tegra_update_sched_clock, 32, | 204 | setup_sched_clock(tegra_read_sched_clock, 32, 1000000); |
222 | 1000000, SC_MULT, SC_SHIFT); | ||
223 | 205 | ||
224 | if (clocksource_mmio_init(timer_reg_base + TIMERUS_CNTR_1US, | 206 | if (clocksource_mmio_init(timer_reg_base + TIMERUS_CNTR_1US, |
225 | "timer_us", 1000000, 300, 32, clocksource_mmio_readl_up)) { | 207 | "timer_us", 1000000, 300, 32, clocksource_mmio_readl_up)) { |
diff --git a/arch/arm/mach-u300/include/mach/entry-macro.S b/arch/arm/mach-u300/include/mach/entry-macro.S index 20731ae39d38..7181d6ac6651 100644 --- a/arch/arm/mach-u300/include/mach/entry-macro.S +++ b/arch/arm/mach-u300/include/mach/entry-macro.S | |||
@@ -8,33 +8,9 @@ | |||
8 | * Low-level IRQ helper macros for ST-Ericsson U300 | 8 | * Low-level IRQ helper macros for ST-Ericsson U300 |
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | ||
12 | #include <asm/hardware/vic.h> | ||
13 | 11 | ||
14 | .macro disable_fiq | 12 | .macro disable_fiq |
15 | .endm | 13 | .endm |
16 | 14 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
21 | .endm | 16 | .endm |
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON0_BASE | ||
25 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | ||
26 | mov \irqnr, #0 | ||
27 | teq \irqstat, #0 | ||
28 | bne 1002f | ||
29 | 1001: ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON1_BASE | ||
30 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | ||
31 | mov \irqnr, #32 | ||
32 | teq \irqstat, #0 | ||
33 | beq 1003f | ||
34 | 1002: tst \irqstat, #1 | ||
35 | bne 1003f | ||
36 | add \irqnr, \irqnr, #1 | ||
37 | movs \irqstat, \irqstat, lsr #1 | ||
38 | bne 1002b | ||
39 | 1003: /* EQ will be set if no irqs pending */ | ||
40 | .endm | ||
diff --git a/arch/arm/mach-u300/include/mach/vmalloc.h b/arch/arm/mach-u300/include/mach/vmalloc.h deleted file mode 100644 index ec423b92b81d..000000000000 --- a/arch/arm/mach-u300/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch/arm/mach-u300/include/mach/vmalloc.h | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2006-2009 ST-Ericsson AB | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * Virtual memory allocations | ||
9 | * End must be above the I/O registers and on an even 2MiB boundary. | ||
10 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
11 | */ | ||
12 | #define VMALLOC_END 0xfe800000UL | ||
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index 5f51bdeef0ef..bc1c7897e82d 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
10 | */ | 10 | */ |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/sched.h> | ||
13 | #include <linux/time.h> | 12 | #include <linux/time.h> |
14 | #include <linux/timex.h> | 13 | #include <linux/timex.h> |
15 | #include <linux/clockchips.h> | 14 | #include <linux/clockchips.h> |
@@ -337,18 +336,10 @@ static struct irqaction u300_timer_irq = { | |||
337 | * this wraps around for now, since it is just a relative time | 336 | * this wraps around for now, since it is just a relative time |
338 | * stamp. (Inspired by OMAP implementation.) | 337 | * stamp. (Inspired by OMAP implementation.) |
339 | */ | 338 | */ |
340 | static DEFINE_CLOCK_DATA(cd); | ||
341 | 339 | ||
342 | unsigned long long notrace sched_clock(void) | 340 | static u32 notrace u300_read_sched_clock(void) |
343 | { | 341 | { |
344 | u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); | 342 | return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); |
345 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
346 | } | ||
347 | |||
348 | static void notrace u300_update_sched_clock(void) | ||
349 | { | ||
350 | u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); | ||
351 | update_sched_clock(&cd, cyc, (u32)~0); | ||
352 | } | 343 | } |
353 | 344 | ||
354 | 345 | ||
@@ -366,7 +357,7 @@ static void __init u300_timer_init(void) | |||
366 | clk_enable(clk); | 357 | clk_enable(clk); |
367 | rate = clk_get_rate(clk); | 358 | rate = clk_get_rate(clk); |
368 | 359 | ||
369 | init_sched_clock(&cd, u300_update_sched_clock, 32, rate); | 360 | setup_sched_clock(u300_read_sched_clock, 32, rate); |
370 | 361 | ||
371 | /* | 362 | /* |
372 | * Disable the "OS" and "DD" timers - these are designed for Symbian! | 363 | * Disable the "OS" and "DD" timers - these are designed for Symbian! |
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c index a75c9b839748..def45bda2932 100644 --- a/arch/arm/mach-u300/u300.c +++ b/arch/arm/mach-u300/u300.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
21 | #include <mach/platform.h> | 21 | #include <mach/platform.h> |
22 | #include <asm/hardware/vic.h> | ||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <asm/memory.h> | 25 | #include <asm/memory.h> |
@@ -49,6 +50,7 @@ MACHINE_START(U300, MACH_U300_STRING) | |||
49 | .atag_offset = BOOT_PARAMS_OFFSET, | 50 | .atag_offset = BOOT_PARAMS_OFFSET, |
50 | .map_io = u300_map_io, | 51 | .map_io = u300_map_io, |
51 | .init_irq = u300_init_irq, | 52 | .init_irq = u300_init_irq, |
53 | .handle_irq = vic_handle_irq, | ||
52 | .timer = &u300_timer, | 54 | .timer = &u300_timer, |
53 | .init_machine = u300_init_machine, | 55 | .init_machine = u300_init_machine, |
54 | .restart = u300_restart, | 56 | .restart = u300_restart, |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index bdd7b80dd7ad..de1f5f8f7330 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/leds.h> | 33 | #include <linux/leds.h> |
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/hardware/gic.h> | ||
36 | 37 | ||
37 | #include <plat/i2c.h> | 38 | #include <plat/i2c.h> |
38 | #include <plat/ste_dma40.h> | 39 | #include <plat/ste_dma40.h> |
@@ -695,6 +696,7 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
695 | .init_irq = ux500_init_irq, | 696 | .init_irq = ux500_init_irq, |
696 | /* we re-use nomadik timer here */ | 697 | /* we re-use nomadik timer here */ |
697 | .timer = &ux500_timer, | 698 | .timer = &ux500_timer, |
699 | .handle_irq = gic_handle_irq, | ||
698 | .init_machine = mop500_init_machine, | 700 | .init_machine = mop500_init_machine, |
699 | MACHINE_END | 701 | MACHINE_END |
700 | 702 | ||
@@ -703,6 +705,7 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | |||
703 | .map_io = u8500_map_io, | 705 | .map_io = u8500_map_io, |
704 | .init_irq = ux500_init_irq, | 706 | .init_irq = ux500_init_irq, |
705 | .timer = &ux500_timer, | 707 | .timer = &ux500_timer, |
708 | .handle_irq = gic_handle_irq, | ||
706 | .init_machine = hrefv60_init_machine, | 709 | .init_machine = hrefv60_init_machine, |
707 | MACHINE_END | 710 | MACHINE_END |
708 | 711 | ||
@@ -712,5 +715,6 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | |||
712 | .init_irq = ux500_init_irq, | 715 | .init_irq = ux500_init_irq, |
713 | /* we re-use nomadik timer here */ | 716 | /* we re-use nomadik timer here */ |
714 | .timer = &ux500_timer, | 717 | .timer = &ux500_timer, |
718 | .handle_irq = gic_handle_irq, | ||
715 | .init_machine = snowball_init_machine, | 719 | .init_machine = snowball_init_machine, |
716 | MACHINE_END | 720 | MACHINE_END |
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index 82025ba70c03..fe1569b67c91 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
13 | #include <linux/mfd/ab5500/ab5500.h> | 13 | #include <linux/mfd/ab5500/ab5500.h> |
14 | 14 | ||
15 | #include <asm/hardware/gic.h> | ||
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
16 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
17 | 18 | ||
@@ -149,5 +150,6 @@ MACHINE_START(U5500, "ST-Ericsson U5500 Platform") | |||
149 | .map_io = u5500_map_io, | 150 | .map_io = u5500_map_io, |
150 | .init_irq = ux500_init_irq, | 151 | .init_irq = ux500_init_irq, |
151 | .timer = &ux500_timer, | 152 | .timer = &ux500_timer, |
153 | .handle_irq = gic_handle_irq, | ||
152 | .init_machine = u5500_init_machine, | 154 | .init_machine = u5500_init_machine, |
153 | MACHINE_END | 155 | MACHINE_END |
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index 9de1af008094..5323286b265e 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c | |||
@@ -30,12 +30,11 @@ static struct map_desc u5500_uart_io_desc[] __initdata = { | |||
30 | }; | 30 | }; |
31 | 31 | ||
32 | static struct map_desc u5500_io_desc[] __initdata = { | 32 | static struct map_desc u5500_io_desc[] __initdata = { |
33 | __IO_DEV_DESC(U5500_GIC_CPU_BASE, SZ_4K), | 33 | /* SCU base also covers GIC CPU BASE and TWD with its 4K page */ |
34 | __IO_DEV_DESC(U5500_SCU_BASE, SZ_4K), | ||
34 | __IO_DEV_DESC(U5500_GIC_DIST_BASE, SZ_4K), | 35 | __IO_DEV_DESC(U5500_GIC_DIST_BASE, SZ_4K), |
35 | __IO_DEV_DESC(U5500_L2CC_BASE, SZ_4K), | 36 | __IO_DEV_DESC(U5500_L2CC_BASE, SZ_4K), |
36 | __IO_DEV_DESC(U5500_TWD_BASE, SZ_4K), | ||
37 | __IO_DEV_DESC(U5500_MTU0_BASE, SZ_4K), | 37 | __IO_DEV_DESC(U5500_MTU0_BASE, SZ_4K), |
38 | __IO_DEV_DESC(U5500_SCU_BASE, SZ_4K), | ||
39 | __IO_DEV_DESC(U5500_BACKUPRAM0_BASE, SZ_8K), | 38 | __IO_DEV_DESC(U5500_BACKUPRAM0_BASE, SZ_8K), |
40 | 39 | ||
41 | __IO_DEV_DESC(U5500_GPIO0_BASE, SZ_4K), | 40 | __IO_DEV_DESC(U5500_GPIO0_BASE, SZ_4K), |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 13e8890a8b8a..7f2729c05db3 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -35,12 +35,11 @@ static struct map_desc u8500_uart_io_desc[] __initdata = { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | static struct map_desc u8500_io_desc[] __initdata = { | 37 | static struct map_desc u8500_io_desc[] __initdata = { |
38 | __IO_DEV_DESC(U8500_GIC_CPU_BASE, SZ_4K), | 38 | /* SCU base also covers GIC CPU BASE and TWD with its 4K page */ |
39 | __IO_DEV_DESC(U8500_SCU_BASE, SZ_4K), | ||
39 | __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K), | 40 | __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K), |
40 | __IO_DEV_DESC(U8500_L2CC_BASE, SZ_4K), | 41 | __IO_DEV_DESC(U8500_L2CC_BASE, SZ_4K), |
41 | __IO_DEV_DESC(U8500_TWD_BASE, SZ_4K), | ||
42 | __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), | 42 | __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), |
43 | __IO_DEV_DESC(U8500_SCU_BASE, SZ_4K), | ||
44 | __IO_DEV_DESC(U8500_BACKUPRAM0_BASE, SZ_8K), | 43 | __IO_DEV_DESC(U8500_BACKUPRAM0_BASE, SZ_8K), |
45 | 44 | ||
46 | __IO_DEV_DESC(U8500_CLKRST1_BASE, SZ_4K), | 45 | __IO_DEV_DESC(U8500_CLKRST1_BASE, SZ_4K), |
diff --git a/arch/arm/mach-ux500/include/mach/entry-macro.S b/arch/arm/mach-ux500/include/mach/entry-macro.S index 071bba94f727..e16299e1020a 100644 --- a/arch/arm/mach-ux500/include/mach/entry-macro.S +++ b/arch/arm/mach-ux500/include/mach/entry-macro.S | |||
@@ -10,8 +10,6 @@ | |||
10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | #include <mach/hardware.h> | ||
14 | #include <asm/hardware/entry-macro-gic.S> | ||
15 | 13 | ||
16 | .macro disable_fiq | 14 | .macro disable_fiq |
17 | .endm | 15 | .endm |
diff --git a/arch/arm/mach-ux500/include/mach/gpio.h b/arch/arm/mach-ux500/include/mach/gpio.h index 7389df911b1a..c01ef66537f3 100644 --- a/arch/arm/mach-ux500/include/mach/gpio.h +++ b/arch/arm/mach-ux500/include/mach/gpio.h | |||
@@ -1,10 +1,5 @@ | |||
1 | #ifndef __ASM_ARCH_GPIO_H | 1 | #ifndef __ASM_ARCH_GPIO_H |
2 | #define __ASM_ARCH_GPIO_H | 2 | #define __ASM_ARCH_GPIO_H |
3 | 3 | ||
4 | /* | ||
5 | * 288 (#267 is the highest one actually hooked up) onchip GPIOs, plus enough | ||
6 | * room for a couple of GPIO expanders. | ||
7 | */ | ||
8 | #define ARCH_NR_GPIOS 350 | ||
9 | 4 | ||
10 | #endif /* __ASM_ARCH_GPIO_H */ | 5 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-ux500/include/mach/vmalloc.h b/arch/arm/mach-ux500/include/mach/vmalloc.h deleted file mode 100644 index a4945cb41172..000000000000 --- a/arch/arm/mach-ux500/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 ST-Ericsson | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #define VMALLOC_END 0xf0000000UL | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index b7a6a4b1a1de..cbcda61162d3 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -141,11 +141,6 @@ static struct map_desc versatile_io_desc[] __initdata = { | |||
141 | }, | 141 | }, |
142 | #ifdef CONFIG_MACH_VERSATILE_AB | 142 | #ifdef CONFIG_MACH_VERSATILE_AB |
143 | { | 143 | { |
144 | .virtual = IO_ADDRESS(VERSATILE_GPIO0_BASE), | ||
145 | .pfn = __phys_to_pfn(VERSATILE_GPIO0_BASE), | ||
146 | .length = SZ_4K, | ||
147 | .type = MT_DEVICE | ||
148 | }, { | ||
149 | .virtual = IO_ADDRESS(VERSATILE_IB2_BASE), | 144 | .virtual = IO_ADDRESS(VERSATILE_IB2_BASE), |
150 | .pfn = __phys_to_pfn(VERSATILE_IB2_BASE), | 145 | .pfn = __phys_to_pfn(VERSATILE_IB2_BASE), |
151 | .length = SZ_64M, | 146 | .length = SZ_64M, |
diff --git a/arch/arm/mach-versatile/include/mach/entry-macro.S b/arch/arm/mach-versatile/include/mach/entry-macro.S index e6f7c1663160..b6f0dbf122ee 100644 --- a/arch/arm/mach-versatile/include/mach/entry-macro.S +++ b/arch/arm/mach-versatile/include/mach/entry-macro.S | |||
@@ -7,39 +7,9 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | ||
11 | #include <mach/platform.h> | ||
12 | #include <asm/hardware/vic.h> | ||
13 | 10 | ||
14 | .macro disable_fiq | 11 | .macro disable_fiq |
15 | .endm | 12 | .endm |
16 | 13 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE) | ||
19 | .endm | ||
20 | |||
21 | .macro arch_ret_to_user, tmp1, tmp2 | 14 | .macro arch_ret_to_user, tmp1, tmp2 |
22 | .endm | 15 | .endm |
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
25 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | ||
26 | mov \irqnr, #0 | ||
27 | teq \irqstat, #0 | ||
28 | beq 1003f | ||
29 | |||
30 | 1001: tst \irqstat, #15 | ||
31 | bne 1002f | ||
32 | add \irqnr, \irqnr, #4 | ||
33 | movs \irqstat, \irqstat, lsr #4 | ||
34 | bne 1001b | ||
35 | 1002: tst \irqstat, #1 | ||
36 | bne 1003f | ||
37 | add \irqnr, \irqnr, #1 | ||
38 | movs \irqstat, \irqstat, lsr #1 | ||
39 | bne 1002b | ||
40 | 1003: /* EQ will be set if no irqs pending */ | ||
41 | |||
42 | @ clz \irqnr, \irqstat | ||
43 | @1003: /* EQ will be set if we reach MAXIRQNUM */ | ||
44 | .endm | ||
45 | |||
diff --git a/arch/arm/mach-versatile/include/mach/vmalloc.h b/arch/arm/mach-versatile/include/mach/vmalloc.h deleted file mode 100644 index 7d8e069ad51b..000000000000 --- a/arch/arm/mach-versatile/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-versatile/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * Copyright (C) 2000 Russell King. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #define VMALLOC_END 0xd8000000UL | ||
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c index f1277ac92fac..63b8dd2b9f4d 100644 --- a/arch/arm/mach-versatile/versatile_ab.c +++ b/arch/arm/mach-versatile/versatile_ab.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/hardware/vic.h> | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | 32 | ||
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -39,6 +40,7 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB") | |||
39 | .map_io = versatile_map_io, | 40 | .map_io = versatile_map_io, |
40 | .init_early = versatile_init_early, | 41 | .init_early = versatile_init_early, |
41 | .init_irq = versatile_init_irq, | 42 | .init_irq = versatile_init_irq, |
43 | .handle_irq = vic_handle_irq, | ||
42 | .timer = &versatile_timer, | 44 | .timer = &versatile_timer, |
43 | .init_machine = versatile_init, | 45 | .init_machine = versatile_init, |
44 | .restart = versatile_restart, | 46 | .restart = versatile_restart, |
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c index f48f2e4b667d..ae5ad3c8f3dd 100644 --- a/arch/arm/mach-versatile/versatile_dt.c +++ b/arch/arm/mach-versatile/versatile_dt.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/of_irq.h> | 25 | #include <linux/of_irq.h> |
26 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
27 | #include <asm/hardware/vic.h> | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | 30 | ||
@@ -45,6 +46,7 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)") | |||
45 | .map_io = versatile_map_io, | 46 | .map_io = versatile_map_io, |
46 | .init_early = versatile_init_early, | 47 | .init_early = versatile_init_early, |
47 | .init_irq = versatile_init_irq, | 48 | .init_irq = versatile_init_irq, |
49 | .handle_irq = vic_handle_irq, | ||
48 | .timer = &versatile_timer, | 50 | .timer = &versatile_timer, |
49 | .init_machine = versatile_dt_init, | 51 | .init_machine = versatile_dt_init, |
50 | .dt_compat = versatile_dt_match, | 52 | .dt_compat = versatile_dt_match, |
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index 839bea633821..7aab79b665e7 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <asm/hardware/vic.h> | ||
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | 34 | ||
@@ -107,6 +108,7 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") | |||
107 | .map_io = versatile_map_io, | 108 | .map_io = versatile_map_io, |
108 | .init_early = versatile_init_early, | 109 | .init_early = versatile_init_early, |
109 | .init_irq = versatile_init_irq, | 110 | .init_irq = versatile_init_irq, |
111 | .handle_irq = vic_handle_irq, | ||
110 | .timer = &versatile_timer, | 112 | .timer = &versatile_timer, |
111 | .init_machine = versatile_pb_init, | 113 | .init_machine = versatile_pb_init, |
112 | .restart = versatile_restart, | 114 | .restart = versatile_restart, |
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 931148487f0b..9b3d0fbaee72 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
@@ -8,5 +8,7 @@ config ARCH_VEXPRESS_CA9X4 | |||
8 | select ARM_ERRATA_720789 | 8 | select ARM_ERRATA_720789 |
9 | select ARM_ERRATA_751472 | 9 | select ARM_ERRATA_751472 |
10 | select ARM_ERRATA_753970 | 10 | select ARM_ERRATA_753970 |
11 | select HAVE_SMP | ||
12 | select MIGHT_HAVE_CACHE_L2X0 | ||
11 | 13 | ||
12 | endmenu | 14 | endmenu |
diff --git a/arch/arm/mach-vexpress/include/mach/entry-macro.S b/arch/arm/mach-vexpress/include/mach/entry-macro.S index 73c11297509e..a14f9e62ca92 100644 --- a/arch/arm/mach-vexpress/include/mach/entry-macro.S +++ b/arch/arm/mach-vexpress/include/mach/entry-macro.S | |||
@@ -1,5 +1,3 @@ | |||
1 | #include <asm/hardware/entry-macro-gic.S> | ||
2 | |||
3 | .macro disable_fiq | 1 | .macro disable_fiq |
4 | .endm | 2 | .endm |
5 | 3 | ||
diff --git a/arch/arm/mach-vexpress/include/mach/vmalloc.h b/arch/arm/mach-vexpress/include/mach/vmalloc.h deleted file mode 100644 index f43a36ef678b..000000000000 --- a/arch/arm/mach-vexpress/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * Copyright (C) 2000 Russell King. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #define VMALLOC_END 0xf8000000UL | ||
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index b9a465bd2d0f..6dd10e320ef6 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/hardware/arm_timer.h> | 23 | #include <asm/hardware/arm_timer.h> |
24 | #include <asm/hardware/timer-sp.h> | 24 | #include <asm/hardware/timer-sp.h> |
25 | #include <asm/hardware/sp810.h> | 25 | #include <asm/hardware/sp810.h> |
26 | #include <asm/hardware/gic.h> | ||
26 | 27 | ||
27 | #include <mach/ct-ca9x4.h> | 28 | #include <mach/ct-ca9x4.h> |
28 | #include <mach/motherboard.h> | 29 | #include <mach/motherboard.h> |
@@ -447,6 +448,7 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express") | |||
447 | .init_early = v2m_init_early, | 448 | .init_early = v2m_init_early, |
448 | .init_irq = v2m_init_irq, | 449 | .init_irq = v2m_init_irq, |
449 | .timer = &v2m_timer, | 450 | .timer = &v2m_timer, |
451 | .handle_irq = gic_handle_irq, | ||
450 | .init_machine = v2m_init, | 452 | .init_machine = v2m_init, |
451 | .restart = v2m_restart, | 453 | .restart = v2m_restart, |
452 | MACHINE_END | 454 | MACHINE_END |
diff --git a/arch/arm/mach-vt8500/include/mach/vmalloc.h b/arch/arm/mach-vt8500/include/mach/vmalloc.h deleted file mode 100644 index 4642290ce416..000000000000 --- a/arch/arm/mach-vt8500/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vt8500/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2000 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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define VMALLOC_END 0xd0000000UL | ||
diff --git a/arch/arm/mach-w90x900/include/mach/vmalloc.h b/arch/arm/mach-w90x900/include/mach/vmalloc.h deleted file mode 100644 index b067e44500a4..000000000000 --- a/arch/arm/mach-w90x900/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/vmalloc.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_VMALLOC_H | ||
19 | #define __ASM_ARCH_VMALLOC_H | ||
20 | |||
21 | #define VMALLOC_END (0xe0000000UL) | ||
22 | |||
23 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 73e93687b81a..ab5cfddc0d7b 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
@@ -112,6 +112,7 @@ static const char *xilinx_dt_match[] = { | |||
112 | MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") | 112 | MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") |
113 | .map_io = xilinx_map_io, | 113 | .map_io = xilinx_map_io, |
114 | .init_irq = xilinx_irq_init, | 114 | .init_irq = xilinx_irq_init, |
115 | .handle_irq = gic_handle_irq, | ||
115 | .init_machine = xilinx_init_machine, | 116 | .init_machine = xilinx_init_machine, |
116 | .timer = &xttcpss_sys_timer, | 117 | .timer = &xttcpss_sys_timer, |
117 | .dt_compat = xilinx_dt_match, | 118 | .dt_compat = xilinx_dt_match, |
diff --git a/arch/arm/mach-zynq/include/mach/entry-macro.S b/arch/arm/mach-zynq/include/mach/entry-macro.S index 3cfc01b37461..d621fb732569 100644 --- a/arch/arm/mach-zynq/include/mach/entry-macro.S +++ b/arch/arm/mach-zynq/include/mach/entry-macro.S | |||
@@ -20,9 +20,6 @@ | |||
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/hardware/entry-macro-gic.S> | ||
25 | |||
26 | .macro disable_fiq | 23 | .macro disable_fiq |
27 | .endm | 24 | .endm |
28 | 25 | ||
diff --git a/arch/arm/mach-zynq/include/mach/vmalloc.h b/arch/arm/mach-zynq/include/mach/vmalloc.h deleted file mode 100644 index 2398eff1e8b8..000000000000 --- a/arch/arm/mach-zynq/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* arch/arm/mach-zynq/include/mach/vmalloc.h | ||
2 | * | ||
3 | * Copyright (C) 2011 Xilinx | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef __MACH_VMALLOC_H__ | ||
16 | #define __MACH_VMALLOC_H__ | ||
17 | |||
18 | #define VMALLOC_END 0xE0000000UL | ||
19 | |||
20 | #endif | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 67f75a0b66d6..4cefb57d9ed2 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -629,6 +629,23 @@ config IO_36 | |||
629 | 629 | ||
630 | comment "Processor Features" | 630 | comment "Processor Features" |
631 | 631 | ||
632 | config ARM_LPAE | ||
633 | bool "Support for the Large Physical Address Extension" | ||
634 | depends on MMU && CPU_V7 | ||
635 | help | ||
636 | Say Y if you have an ARMv7 processor supporting the LPAE page | ||
637 | table format and you would like to access memory beyond the | ||
638 | 4GB limit. The resulting kernel image will not run on | ||
639 | processors without the LPA extension. | ||
640 | |||
641 | If unsure, say N. | ||
642 | |||
643 | config ARCH_PHYS_ADDR_T_64BIT | ||
644 | def_bool ARM_LPAE | ||
645 | |||
646 | config ARCH_DMA_ADDR_T_64BIT | ||
647 | bool | ||
648 | |||
632 | config ARM_THUMB | 649 | config ARM_THUMB |
633 | bool "Support Thumb user binaries" | 650 | bool "Support Thumb user binaries" |
634 | depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || CPU_V7 || CPU_FEROCEON | 651 | depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || CPU_V7 || CPU_FEROCEON |
@@ -816,14 +833,23 @@ config CACHE_FEROCEON_L2_WRITETHROUGH | |||
816 | Say Y here to use the Feroceon L2 cache in writethrough mode. | 833 | Say Y here to use the Feroceon L2 cache in writethrough mode. |
817 | Unless you specifically require this, say N for writeback mode. | 834 | Unless you specifically require this, say N for writeback mode. |
818 | 835 | ||
836 | config MIGHT_HAVE_CACHE_L2X0 | ||
837 | bool | ||
838 | help | ||
839 | This option should be selected by machines which have a L2x0 | ||
840 | or PL310 cache controller, but where its use is optional. | ||
841 | |||
842 | The only effect of this option is to make CACHE_L2X0 and | ||
843 | related options available to the user for configuration. | ||
844 | |||
845 | Boards or SoCs which always require the cache controller | ||
846 | support to be present should select CACHE_L2X0 directly | ||
847 | instead of this option, thus preventing the user from | ||
848 | inadvertently configuring a broken kernel. | ||
849 | |||
819 | config CACHE_L2X0 | 850 | config CACHE_L2X0 |
820 | bool "Enable the L2x0 outer cache controller" | 851 | bool "Enable the L2x0 outer cache controller" if MIGHT_HAVE_CACHE_L2X0 |
821 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ | 852 | default MIGHT_HAVE_CACHE_L2X0 |
822 | REALVIEW_EB_A9MP || ARCH_IMX_V6_V7 || MACH_REALVIEW_PBX || \ | ||
823 | ARCH_NOMADIK || ARCH_OMAP4 || ARCH_EXYNOS4 || ARCH_TEGRA || \ | ||
824 | ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_SHMOBILE || \ | ||
825 | ARCH_PRIMA2 || ARCH_ZYNQ || ARCH_CNS3XXX || ARCH_HIGHBANK | ||
826 | default y | ||
827 | select OUTER_CACHE | 853 | select OUTER_CACHE |
828 | select OUTER_CACHE_SYNC | 854 | select OUTER_CACHE_SYNC |
829 | help | 855 | help |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index c335c76e0d88..caf14dc059e5 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -968,7 +968,7 @@ static int __init alignment_init(void) | |||
968 | ai_usermode = safe_usermode(ai_usermode, false); | 968 | ai_usermode = safe_usermode(ai_usermode, false); |
969 | } | 969 | } |
970 | 970 | ||
971 | hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN, | 971 | hook_fault_code(FAULT_CODE_ALIGNMENT, do_alignment, SIGBUS, BUS_ADRALN, |
972 | "alignment exception"); | 972 | "alignment exception"); |
973 | 973 | ||
974 | /* | 974 | /* |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 93aac068da94..ee9bb363d606 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -22,6 +22,21 @@ unsigned int cpu_last_asid = ASID_FIRST_VERSION; | |||
22 | DEFINE_PER_CPU(struct mm_struct *, current_mm); | 22 | DEFINE_PER_CPU(struct mm_struct *, current_mm); |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #ifdef CONFIG_ARM_LPAE | ||
26 | #define cpu_set_asid(asid) { \ | ||
27 | unsigned long ttbl, ttbh; \ | ||
28 | asm volatile( \ | ||
29 | " mrrc p15, 0, %0, %1, c2 @ read TTBR0\n" \ | ||
30 | " mov %1, %2, lsl #(48 - 32) @ set ASID\n" \ | ||
31 | " mcrr p15, 0, %0, %1, c2 @ set TTBR0\n" \ | ||
32 | : "=&r" (ttbl), "=&r" (ttbh) \ | ||
33 | : "r" (asid & ~ASID_MASK)); \ | ||
34 | } | ||
35 | #else | ||
36 | #define cpu_set_asid(asid) \ | ||
37 | asm(" mcr p15, 0, %0, c13, c0, 1\n" : : "r" (asid)) | ||
38 | #endif | ||
39 | |||
25 | /* | 40 | /* |
26 | * We fork()ed a process, and we need a new context for the child | 41 | * We fork()ed a process, and we need a new context for the child |
27 | * to run in. We reserve version 0 for initial tasks so we will | 42 | * to run in. We reserve version 0 for initial tasks so we will |
@@ -37,7 +52,7 @@ void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
37 | static void flush_context(void) | 52 | static void flush_context(void) |
38 | { | 53 | { |
39 | /* set the reserved ASID before flushing the TLB */ | 54 | /* set the reserved ASID before flushing the TLB */ |
40 | asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (0)); | 55 | cpu_set_asid(0); |
41 | isb(); | 56 | isb(); |
42 | local_flush_tlb_all(); | 57 | local_flush_tlb_all(); |
43 | if (icache_is_vivt_asid_tagged()) { | 58 | if (icache_is_vivt_asid_tagged()) { |
@@ -99,7 +114,7 @@ static void reset_context(void *info) | |||
99 | set_mm_context(mm, asid); | 114 | set_mm_context(mm, asid); |
100 | 115 | ||
101 | /* set the new ASID */ | 116 | /* set the new ASID */ |
102 | asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (mm->context.id)); | 117 | cpu_set_asid(mm->context.id); |
103 | isb(); | 118 | isb(); |
104 | } | 119 | } |
105 | 120 | ||
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index aa33949fef60..bb7eac381a8e 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -27,19 +27,6 @@ | |||
27 | 27 | ||
28 | #include "fault.h" | 28 | #include "fault.h" |
29 | 29 | ||
30 | /* | ||
31 | * Fault status register encodings. We steal bit 31 for our own purposes. | ||
32 | */ | ||
33 | #define FSR_LNX_PF (1 << 31) | ||
34 | #define FSR_WRITE (1 << 11) | ||
35 | #define FSR_FS4 (1 << 10) | ||
36 | #define FSR_FS3_0 (15) | ||
37 | |||
38 | static inline int fsr_fs(unsigned int fsr) | ||
39 | { | ||
40 | return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6; | ||
41 | } | ||
42 | |||
43 | #ifdef CONFIG_MMU | 30 | #ifdef CONFIG_MMU |
44 | 31 | ||
45 | #ifdef CONFIG_KPROBES | 32 | #ifdef CONFIG_KPROBES |
@@ -123,8 +110,10 @@ void show_pte(struct mm_struct *mm, unsigned long addr) | |||
123 | 110 | ||
124 | pte = pte_offset_map(pmd, addr); | 111 | pte = pte_offset_map(pmd, addr); |
125 | printk(", *pte=%08llx", (long long)pte_val(*pte)); | 112 | printk(", *pte=%08llx", (long long)pte_val(*pte)); |
113 | #ifndef CONFIG_ARM_LPAE | ||
126 | printk(", *ppte=%08llx", | 114 | printk(", *ppte=%08llx", |
127 | (long long)pte_val(pte[PTE_HWTABLE_PTRS])); | 115 | (long long)pte_val(pte[PTE_HWTABLE_PTRS])); |
116 | #endif | ||
128 | pte_unmap(pte); | 117 | pte_unmap(pte); |
129 | } while(0); | 118 | } while(0); |
130 | 119 | ||
@@ -231,7 +220,7 @@ static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma) | |||
231 | 220 | ||
232 | static int __kprobes | 221 | static int __kprobes |
233 | __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, | 222 | __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, |
234 | struct task_struct *tsk) | 223 | unsigned int flags, struct task_struct *tsk) |
235 | { | 224 | { |
236 | struct vm_area_struct *vma; | 225 | struct vm_area_struct *vma; |
237 | int fault; | 226 | int fault; |
@@ -253,18 +242,7 @@ good_area: | |||
253 | goto out; | 242 | goto out; |
254 | } | 243 | } |
255 | 244 | ||
256 | /* | 245 | return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags); |
257 | * If for any reason at all we couldn't handle the fault, make | ||
258 | * sure we exit gracefully rather than endlessly redo the fault. | ||
259 | */ | ||
260 | fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, (fsr & FSR_WRITE) ? FAULT_FLAG_WRITE : 0); | ||
261 | if (unlikely(fault & VM_FAULT_ERROR)) | ||
262 | return fault; | ||
263 | if (fault & VM_FAULT_MAJOR) | ||
264 | tsk->maj_flt++; | ||
265 | else | ||
266 | tsk->min_flt++; | ||
267 | return fault; | ||
268 | 246 | ||
269 | check_stack: | 247 | check_stack: |
270 | if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) | 248 | if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) |
@@ -279,6 +257,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
279 | struct task_struct *tsk; | 257 | struct task_struct *tsk; |
280 | struct mm_struct *mm; | 258 | struct mm_struct *mm; |
281 | int fault, sig, code; | 259 | int fault, sig, code; |
260 | int write = fsr & FSR_WRITE; | ||
261 | unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | | ||
262 | (write ? FAULT_FLAG_WRITE : 0); | ||
282 | 263 | ||
283 | if (notify_page_fault(regs, fsr)) | 264 | if (notify_page_fault(regs, fsr)) |
284 | return 0; | 265 | return 0; |
@@ -305,6 +286,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
305 | if (!down_read_trylock(&mm->mmap_sem)) { | 286 | if (!down_read_trylock(&mm->mmap_sem)) { |
306 | if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc)) | 287 | if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc)) |
307 | goto no_context; | 288 | goto no_context; |
289 | retry: | ||
308 | down_read(&mm->mmap_sem); | 290 | down_read(&mm->mmap_sem); |
309 | } else { | 291 | } else { |
310 | /* | 292 | /* |
@@ -320,14 +302,41 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
320 | #endif | 302 | #endif |
321 | } | 303 | } |
322 | 304 | ||
323 | fault = __do_page_fault(mm, addr, fsr, tsk); | 305 | fault = __do_page_fault(mm, addr, fsr, flags, tsk); |
324 | up_read(&mm->mmap_sem); | 306 | |
307 | /* If we need to retry but a fatal signal is pending, handle the | ||
308 | * signal first. We do not need to release the mmap_sem because | ||
309 | * it would already be released in __lock_page_or_retry in | ||
310 | * mm/filemap.c. */ | ||
311 | if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) | ||
312 | return 0; | ||
313 | |||
314 | /* | ||
315 | * Major/minor page fault accounting is only done on the | ||
316 | * initial attempt. If we go through a retry, it is extremely | ||
317 | * likely that the page will be found in page cache at that point. | ||
318 | */ | ||
325 | 319 | ||
326 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, addr); | 320 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, addr); |
327 | if (fault & VM_FAULT_MAJOR) | 321 | if (flags & FAULT_FLAG_ALLOW_RETRY) { |
328 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, addr); | 322 | if (fault & VM_FAULT_MAJOR) { |
329 | else if (fault & VM_FAULT_MINOR) | 323 | tsk->maj_flt++; |
330 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, addr); | 324 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, |
325 | regs, addr); | ||
326 | } else { | ||
327 | tsk->min_flt++; | ||
328 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, | ||
329 | regs, addr); | ||
330 | } | ||
331 | if (fault & VM_FAULT_RETRY) { | ||
332 | /* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk | ||
333 | * of starvation. */ | ||
334 | flags &= ~FAULT_FLAG_ALLOW_RETRY; | ||
335 | goto retry; | ||
336 | } | ||
337 | } | ||
338 | |||
339 | up_read(&mm->mmap_sem); | ||
331 | 340 | ||
332 | /* | 341 | /* |
333 | * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR | 342 | * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR |
@@ -441,6 +450,12 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
441 | pmd = pmd_offset(pud, addr); | 450 | pmd = pmd_offset(pud, addr); |
442 | pmd_k = pmd_offset(pud_k, addr); | 451 | pmd_k = pmd_offset(pud_k, addr); |
443 | 452 | ||
453 | #ifdef CONFIG_ARM_LPAE | ||
454 | /* | ||
455 | * Only one hardware entry per PMD with LPAE. | ||
456 | */ | ||
457 | index = 0; | ||
458 | #else | ||
444 | /* | 459 | /* |
445 | * On ARM one Linux PGD entry contains two hardware entries (see page | 460 | * On ARM one Linux PGD entry contains two hardware entries (see page |
446 | * tables layout in pgtable.h). We normally guarantee that we always | 461 | * tables layout in pgtable.h). We normally guarantee that we always |
@@ -450,6 +465,7 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
450 | * for the first of pair. | 465 | * for the first of pair. |
451 | */ | 466 | */ |
452 | index = (addr >> SECTION_SHIFT) & 1; | 467 | index = (addr >> SECTION_SHIFT) & 1; |
468 | #endif | ||
453 | if (pmd_none(pmd_k[index])) | 469 | if (pmd_none(pmd_k[index])) |
454 | goto bad_area; | 470 | goto bad_area; |
455 | 471 | ||
@@ -489,55 +505,20 @@ do_bad(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
489 | return 1; | 505 | return 1; |
490 | } | 506 | } |
491 | 507 | ||
492 | static struct fsr_info { | 508 | struct fsr_info { |
493 | int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); | 509 | int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); |
494 | int sig; | 510 | int sig; |
495 | int code; | 511 | int code; |
496 | const char *name; | 512 | const char *name; |
497 | } fsr_info[] = { | ||
498 | /* | ||
499 | * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 | ||
500 | * defines these to be "precise" aborts. | ||
501 | */ | ||
502 | { do_bad, SIGSEGV, 0, "vector exception" }, | ||
503 | { do_bad, SIGBUS, BUS_ADRALN, "alignment exception" }, | ||
504 | { do_bad, SIGKILL, 0, "terminal exception" }, | ||
505 | { do_bad, SIGBUS, BUS_ADRALN, "alignment exception" }, | ||
506 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, | ||
507 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, | ||
508 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, | ||
509 | { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, | ||
510 | { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, | ||
511 | { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, | ||
512 | { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, | ||
513 | { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, | ||
514 | { do_bad, SIGBUS, 0, "external abort on translation" }, | ||
515 | { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, | ||
516 | { do_bad, SIGBUS, 0, "external abort on translation" }, | ||
517 | { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, | ||
518 | /* | ||
519 | * The following are "imprecise" aborts, which are signalled by bit | ||
520 | * 10 of the FSR, and may not be recoverable. These are only | ||
521 | * supported if the CPU abort handler supports bit 10. | ||
522 | */ | ||
523 | { do_bad, SIGBUS, 0, "unknown 16" }, | ||
524 | { do_bad, SIGBUS, 0, "unknown 17" }, | ||
525 | { do_bad, SIGBUS, 0, "unknown 18" }, | ||
526 | { do_bad, SIGBUS, 0, "unknown 19" }, | ||
527 | { do_bad, SIGBUS, 0, "lock abort" }, /* xscale */ | ||
528 | { do_bad, SIGBUS, 0, "unknown 21" }, | ||
529 | { do_bad, SIGBUS, BUS_OBJERR, "imprecise external abort" }, /* xscale */ | ||
530 | { do_bad, SIGBUS, 0, "unknown 23" }, | ||
531 | { do_bad, SIGBUS, 0, "dcache parity error" }, /* xscale */ | ||
532 | { do_bad, SIGBUS, 0, "unknown 25" }, | ||
533 | { do_bad, SIGBUS, 0, "unknown 26" }, | ||
534 | { do_bad, SIGBUS, 0, "unknown 27" }, | ||
535 | { do_bad, SIGBUS, 0, "unknown 28" }, | ||
536 | { do_bad, SIGBUS, 0, "unknown 29" }, | ||
537 | { do_bad, SIGBUS, 0, "unknown 30" }, | ||
538 | { do_bad, SIGBUS, 0, "unknown 31" } | ||
539 | }; | 513 | }; |
540 | 514 | ||
515 | /* FSR definition */ | ||
516 | #ifdef CONFIG_ARM_LPAE | ||
517 | #include "fsr-3level.c" | ||
518 | #else | ||
519 | #include "fsr-2level.c" | ||
520 | #endif | ||
521 | |||
541 | void __init | 522 | void __init |
542 | hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), | 523 | hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), |
543 | int sig, int code, const char *name) | 524 | int sig, int code, const char *name) |
@@ -573,42 +554,6 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
573 | arm_notify_die("", regs, &info, fsr, 0); | 554 | arm_notify_die("", regs, &info, fsr, 0); |
574 | } | 555 | } |
575 | 556 | ||
576 | |||
577 | static struct fsr_info ifsr_info[] = { | ||
578 | { do_bad, SIGBUS, 0, "unknown 0" }, | ||
579 | { do_bad, SIGBUS, 0, "unknown 1" }, | ||
580 | { do_bad, SIGBUS, 0, "debug event" }, | ||
581 | { do_bad, SIGSEGV, SEGV_ACCERR, "section access flag fault" }, | ||
582 | { do_bad, SIGBUS, 0, "unknown 4" }, | ||
583 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, | ||
584 | { do_bad, SIGSEGV, SEGV_ACCERR, "page access flag fault" }, | ||
585 | { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, | ||
586 | { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, | ||
587 | { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, | ||
588 | { do_bad, SIGBUS, 0, "unknown 10" }, | ||
589 | { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, | ||
590 | { do_bad, SIGBUS, 0, "external abort on translation" }, | ||
591 | { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, | ||
592 | { do_bad, SIGBUS, 0, "external abort on translation" }, | ||
593 | { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, | ||
594 | { do_bad, SIGBUS, 0, "unknown 16" }, | ||
595 | { do_bad, SIGBUS, 0, "unknown 17" }, | ||
596 | { do_bad, SIGBUS, 0, "unknown 18" }, | ||
597 | { do_bad, SIGBUS, 0, "unknown 19" }, | ||
598 | { do_bad, SIGBUS, 0, "unknown 20" }, | ||
599 | { do_bad, SIGBUS, 0, "unknown 21" }, | ||
600 | { do_bad, SIGBUS, 0, "unknown 22" }, | ||
601 | { do_bad, SIGBUS, 0, "unknown 23" }, | ||
602 | { do_bad, SIGBUS, 0, "unknown 24" }, | ||
603 | { do_bad, SIGBUS, 0, "unknown 25" }, | ||
604 | { do_bad, SIGBUS, 0, "unknown 26" }, | ||
605 | { do_bad, SIGBUS, 0, "unknown 27" }, | ||
606 | { do_bad, SIGBUS, 0, "unknown 28" }, | ||
607 | { do_bad, SIGBUS, 0, "unknown 29" }, | ||
608 | { do_bad, SIGBUS, 0, "unknown 30" }, | ||
609 | { do_bad, SIGBUS, 0, "unknown 31" }, | ||
610 | }; | ||
611 | |||
612 | void __init | 557 | void __init |
613 | hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), | 558 | hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), |
614 | int sig, int code, const char *name) | 559 | int sig, int code, const char *name) |
@@ -641,6 +586,7 @@ do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs) | |||
641 | arm_notify_die("", regs, &info, ifsr, 0); | 586 | arm_notify_die("", regs, &info, ifsr, 0); |
642 | } | 587 | } |
643 | 588 | ||
589 | #ifndef CONFIG_ARM_LPAE | ||
644 | static int __init exceptions_init(void) | 590 | static int __init exceptions_init(void) |
645 | { | 591 | { |
646 | if (cpu_architecture() >= CPU_ARCH_ARMv6) { | 592 | if (cpu_architecture() >= CPU_ARCH_ARMv6) { |
@@ -663,3 +609,4 @@ static int __init exceptions_init(void) | |||
663 | } | 609 | } |
664 | 610 | ||
665 | arch_initcall(exceptions_init); | 611 | arch_initcall(exceptions_init); |
612 | #endif | ||
diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h index 49e9e3804de4..cf08bdfbe0d6 100644 --- a/arch/arm/mm/fault.h +++ b/arch/arm/mm/fault.h | |||
@@ -1,3 +1,28 @@ | |||
1 | void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs); | 1 | #ifndef __ARCH_ARM_FAULT_H |
2 | #define __ARCH_ARM_FAULT_H | ||
3 | |||
4 | /* | ||
5 | * Fault status register encodings. We steal bit 31 for our own purposes. | ||
6 | */ | ||
7 | #define FSR_LNX_PF (1 << 31) | ||
8 | #define FSR_WRITE (1 << 11) | ||
9 | #define FSR_FS4 (1 << 10) | ||
10 | #define FSR_FS3_0 (15) | ||
11 | #define FSR_FS5_0 (0x3f) | ||
12 | |||
13 | #ifdef CONFIG_ARM_LPAE | ||
14 | static inline int fsr_fs(unsigned int fsr) | ||
15 | { | ||
16 | return fsr & FSR_FS5_0; | ||
17 | } | ||
18 | #else | ||
19 | static inline int fsr_fs(unsigned int fsr) | ||
20 | { | ||
21 | return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6; | ||
22 | } | ||
23 | #endif | ||
2 | 24 | ||
25 | void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs); | ||
3 | unsigned long search_exception_table(unsigned long addr); | 26 | unsigned long search_exception_table(unsigned long addr); |
27 | |||
28 | #endif /* __ARCH_ARM_FAULT_H */ | ||
diff --git a/arch/arm/mm/fsr-2level.c b/arch/arm/mm/fsr-2level.c new file mode 100644 index 000000000000..18ca74c0f341 --- /dev/null +++ b/arch/arm/mm/fsr-2level.c | |||
@@ -0,0 +1,78 @@ | |||
1 | static struct fsr_info fsr_info[] = { | ||
2 | /* | ||
3 | * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 | ||
4 | * defines these to be "precise" aborts. | ||
5 | */ | ||
6 | { do_bad, SIGSEGV, 0, "vector exception" }, | ||
7 | { do_bad, SIGBUS, BUS_ADRALN, "alignment exception" }, | ||
8 | { do_bad, SIGKILL, 0, "terminal exception" }, | ||
9 | { do_bad, SIGBUS, BUS_ADRALN, "alignment exception" }, | ||
10 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, | ||
11 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, | ||
12 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, | ||
13 | { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, | ||
14 | { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, | ||
15 | { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, | ||
16 | { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, | ||
17 | { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, | ||
18 | { do_bad, SIGBUS, 0, "external abort on translation" }, | ||
19 | { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, | ||
20 | { do_bad, SIGBUS, 0, "external abort on translation" }, | ||
21 | { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, | ||
22 | /* | ||
23 | * The following are "imprecise" aborts, which are signalled by bit | ||
24 | * 10 of the FSR, and may not be recoverable. These are only | ||
25 | * supported if the CPU abort handler supports bit 10. | ||
26 | */ | ||
27 | { do_bad, SIGBUS, 0, "unknown 16" }, | ||
28 | { do_bad, SIGBUS, 0, "unknown 17" }, | ||
29 | { do_bad, SIGBUS, 0, "unknown 18" }, | ||
30 | { do_bad, SIGBUS, 0, "unknown 19" }, | ||
31 | { do_bad, SIGBUS, 0, "lock abort" }, /* xscale */ | ||
32 | { do_bad, SIGBUS, 0, "unknown 21" }, | ||
33 | { do_bad, SIGBUS, BUS_OBJERR, "imprecise external abort" }, /* xscale */ | ||
34 | { do_bad, SIGBUS, 0, "unknown 23" }, | ||
35 | { do_bad, SIGBUS, 0, "dcache parity error" }, /* xscale */ | ||
36 | { do_bad, SIGBUS, 0, "unknown 25" }, | ||
37 | { do_bad, SIGBUS, 0, "unknown 26" }, | ||
38 | { do_bad, SIGBUS, 0, "unknown 27" }, | ||
39 | { do_bad, SIGBUS, 0, "unknown 28" }, | ||
40 | { do_bad, SIGBUS, 0, "unknown 29" }, | ||
41 | { do_bad, SIGBUS, 0, "unknown 30" }, | ||
42 | { do_bad, SIGBUS, 0, "unknown 31" }, | ||
43 | }; | ||
44 | |||
45 | static struct fsr_info ifsr_info[] = { | ||
46 | { do_bad, SIGBUS, 0, "unknown 0" }, | ||
47 | { do_bad, SIGBUS, 0, "unknown 1" }, | ||
48 | { do_bad, SIGBUS, 0, "debug event" }, | ||
49 | { do_bad, SIGSEGV, SEGV_ACCERR, "section access flag fault" }, | ||
50 | { do_bad, SIGBUS, 0, "unknown 4" }, | ||
51 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, | ||
52 | { do_bad, SIGSEGV, SEGV_ACCERR, "page access flag fault" }, | ||
53 | { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, | ||
54 | { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, | ||
55 | { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, | ||
56 | { do_bad, SIGBUS, 0, "unknown 10" }, | ||
57 | { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, | ||
58 | { do_bad, SIGBUS, 0, "external abort on translation" }, | ||
59 | { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, | ||
60 | { do_bad, SIGBUS, 0, "external abort on translation" }, | ||
61 | { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, | ||
62 | { do_bad, SIGBUS, 0, "unknown 16" }, | ||
63 | { do_bad, SIGBUS, 0, "unknown 17" }, | ||
64 | { do_bad, SIGBUS, 0, "unknown 18" }, | ||
65 | { do_bad, SIGBUS, 0, "unknown 19" }, | ||
66 | { do_bad, SIGBUS, 0, "unknown 20" }, | ||
67 | { do_bad, SIGBUS, 0, "unknown 21" }, | ||
68 | { do_bad, SIGBUS, 0, "unknown 22" }, | ||
69 | { do_bad, SIGBUS, 0, "unknown 23" }, | ||
70 | { do_bad, SIGBUS, 0, "unknown 24" }, | ||
71 | { do_bad, SIGBUS, 0, "unknown 25" }, | ||
72 | { do_bad, SIGBUS, 0, "unknown 26" }, | ||
73 | { do_bad, SIGBUS, 0, "unknown 27" }, | ||
74 | { do_bad, SIGBUS, 0, "unknown 28" }, | ||
75 | { do_bad, SIGBUS, 0, "unknown 29" }, | ||
76 | { do_bad, SIGBUS, 0, "unknown 30" }, | ||
77 | { do_bad, SIGBUS, 0, "unknown 31" }, | ||
78 | }; | ||
diff --git a/arch/arm/mm/fsr-3level.c b/arch/arm/mm/fsr-3level.c new file mode 100644 index 000000000000..05a4e9431836 --- /dev/null +++ b/arch/arm/mm/fsr-3level.c | |||
@@ -0,0 +1,68 @@ | |||
1 | static struct fsr_info fsr_info[] = { | ||
2 | { do_bad, SIGBUS, 0, "unknown 0" }, | ||
3 | { do_bad, SIGBUS, 0, "unknown 1" }, | ||
4 | { do_bad, SIGBUS, 0, "unknown 2" }, | ||
5 | { do_bad, SIGBUS, 0, "unknown 3" }, | ||
6 | { do_bad, SIGBUS, 0, "reserved translation fault" }, | ||
7 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "level 1 translation fault" }, | ||
8 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "level 2 translation fault" }, | ||
9 | { do_page_fault, SIGSEGV, SEGV_MAPERR, "level 3 translation fault" }, | ||
10 | { do_bad, SIGBUS, 0, "reserved access flag fault" }, | ||
11 | { do_bad, SIGSEGV, SEGV_ACCERR, "level 1 access flag fault" }, | ||
12 | { do_bad, SIGSEGV, SEGV_ACCERR, "level 2 access flag fault" }, | ||
13 | { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 3 access flag fault" }, | ||
14 | { do_bad, SIGBUS, 0, "reserved permission fault" }, | ||
15 | { do_bad, SIGSEGV, SEGV_ACCERR, "level 1 permission fault" }, | ||
16 | { do_sect_fault, SIGSEGV, SEGV_ACCERR, "level 2 permission fault" }, | ||
17 | { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 3 permission fault" }, | ||
18 | { do_bad, SIGBUS, 0, "synchronous external abort" }, | ||
19 | { do_bad, SIGBUS, 0, "asynchronous external abort" }, | ||
20 | { do_bad, SIGBUS, 0, "unknown 18" }, | ||
21 | { do_bad, SIGBUS, 0, "unknown 19" }, | ||
22 | { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" }, | ||
23 | { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" }, | ||
24 | { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" }, | ||
25 | { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" }, | ||
26 | { do_bad, SIGBUS, 0, "synchronous parity error" }, | ||
27 | { do_bad, SIGBUS, 0, "asynchronous parity error" }, | ||
28 | { do_bad, SIGBUS, 0, "unknown 26" }, | ||
29 | { do_bad, SIGBUS, 0, "unknown 27" }, | ||
30 | { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, | ||
31 | { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, | ||
32 | { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, | ||
33 | { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, | ||
34 | { do_bad, SIGBUS, 0, "unknown 32" }, | ||
35 | { do_bad, SIGBUS, BUS_ADRALN, "alignment fault" }, | ||
36 | { do_bad, SIGBUS, 0, "debug event" }, | ||
37 | { do_bad, SIGBUS, 0, "unknown 35" }, | ||
38 | { do_bad, SIGBUS, 0, "unknown 36" }, | ||
39 | { do_bad, SIGBUS, 0, "unknown 37" }, | ||
40 | { do_bad, SIGBUS, 0, "unknown 38" }, | ||
41 | { do_bad, SIGBUS, 0, "unknown 39" }, | ||
42 | { do_bad, SIGBUS, 0, "unknown 40" }, | ||
43 | { do_bad, SIGBUS, 0, "unknown 41" }, | ||
44 | { do_bad, SIGBUS, 0, "unknown 42" }, | ||
45 | { do_bad, SIGBUS, 0, "unknown 43" }, | ||
46 | { do_bad, SIGBUS, 0, "unknown 44" }, | ||
47 | { do_bad, SIGBUS, 0, "unknown 45" }, | ||
48 | { do_bad, SIGBUS, 0, "unknown 46" }, | ||
49 | { do_bad, SIGBUS, 0, "unknown 47" }, | ||
50 | { do_bad, SIGBUS, 0, "unknown 48" }, | ||
51 | { do_bad, SIGBUS, 0, "unknown 49" }, | ||
52 | { do_bad, SIGBUS, 0, "unknown 50" }, | ||
53 | { do_bad, SIGBUS, 0, "unknown 51" }, | ||
54 | { do_bad, SIGBUS, 0, "implementation fault (lockdown abort)" }, | ||
55 | { do_bad, SIGBUS, 0, "unknown 53" }, | ||
56 | { do_bad, SIGBUS, 0, "unknown 54" }, | ||
57 | { do_bad, SIGBUS, 0, "unknown 55" }, | ||
58 | { do_bad, SIGBUS, 0, "unknown 56" }, | ||
59 | { do_bad, SIGBUS, 0, "unknown 57" }, | ||
60 | { do_bad, SIGBUS, 0, "implementation fault (coprocessor abort)" }, | ||
61 | { do_bad, SIGBUS, 0, "unknown 59" }, | ||
62 | { do_bad, SIGBUS, 0, "unknown 60" }, | ||
63 | { do_bad, SIGBUS, 0, "unknown 61" }, | ||
64 | { do_bad, SIGBUS, 0, "unknown 62" }, | ||
65 | { do_bad, SIGBUS, 0, "unknown 63" }, | ||
66 | }; | ||
67 | |||
68 | #define ifsr_info fsr_info | ||
diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index 296ad2eaddb0..feacf4c76712 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c | |||
@@ -1,9 +1,38 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | 2 | ||
3 | #include <asm/cputype.h> | 3 | #include <asm/cputype.h> |
4 | #include <asm/idmap.h> | ||
4 | #include <asm/pgalloc.h> | 5 | #include <asm/pgalloc.h> |
5 | #include <asm/pgtable.h> | 6 | #include <asm/pgtable.h> |
7 | #include <asm/sections.h> | ||
6 | 8 | ||
9 | pgd_t *idmap_pgd; | ||
10 | |||
11 | #ifdef CONFIG_ARM_LPAE | ||
12 | static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end, | ||
13 | unsigned long prot) | ||
14 | { | ||
15 | pmd_t *pmd; | ||
16 | unsigned long next; | ||
17 | |||
18 | if (pud_none_or_clear_bad(pud) || (pud_val(*pud) & L_PGD_SWAPPER)) { | ||
19 | pmd = pmd_alloc_one(&init_mm, addr); | ||
20 | if (!pmd) { | ||
21 | pr_warning("Failed to allocate identity pmd.\n"); | ||
22 | return; | ||
23 | } | ||
24 | pud_populate(&init_mm, pud, pmd); | ||
25 | pmd += pmd_index(addr); | ||
26 | } else | ||
27 | pmd = pmd_offset(pud, addr); | ||
28 | |||
29 | do { | ||
30 | next = pmd_addr_end(addr, end); | ||
31 | *pmd = __pmd((addr & PMD_MASK) | prot); | ||
32 | flush_pmd_entry(pmd); | ||
33 | } while (pmd++, addr = next, addr != end); | ||
34 | } | ||
35 | #else /* !CONFIG_ARM_LPAE */ | ||
7 | static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end, | 36 | static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end, |
8 | unsigned long prot) | 37 | unsigned long prot) |
9 | { | 38 | { |
@@ -15,6 +44,7 @@ static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end, | |||
15 | pmd[1] = __pmd(addr); | 44 | pmd[1] = __pmd(addr); |
16 | flush_pmd_entry(pmd); | 45 | flush_pmd_entry(pmd); |
17 | } | 46 | } |
47 | #endif /* CONFIG_ARM_LPAE */ | ||
18 | 48 | ||
19 | static void idmap_add_pud(pgd_t *pgd, unsigned long addr, unsigned long end, | 49 | static void idmap_add_pud(pgd_t *pgd, unsigned long addr, unsigned long end, |
20 | unsigned long prot) | 50 | unsigned long prot) |
@@ -28,11 +58,11 @@ static void idmap_add_pud(pgd_t *pgd, unsigned long addr, unsigned long end, | |||
28 | } while (pud++, addr = next, addr != end); | 58 | } while (pud++, addr = next, addr != end); |
29 | } | 59 | } |
30 | 60 | ||
31 | void identity_mapping_add(pgd_t *pgd, unsigned long addr, unsigned long end) | 61 | static void identity_mapping_add(pgd_t *pgd, unsigned long addr, unsigned long end) |
32 | { | 62 | { |
33 | unsigned long prot, next; | 63 | unsigned long prot, next; |
34 | 64 | ||
35 | prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE; | 65 | prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AF; |
36 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) | 66 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) |
37 | prot |= PMD_BIT4; | 67 | prot |= PMD_BIT4; |
38 | 68 | ||
@@ -43,48 +73,41 @@ void identity_mapping_add(pgd_t *pgd, unsigned long addr, unsigned long end) | |||
43 | } while (pgd++, addr = next, addr != end); | 73 | } while (pgd++, addr = next, addr != end); |
44 | } | 74 | } |
45 | 75 | ||
46 | #ifdef CONFIG_SMP | 76 | extern char __idmap_text_start[], __idmap_text_end[]; |
47 | static void idmap_del_pmd(pud_t *pud, unsigned long addr, unsigned long end) | ||
48 | { | ||
49 | pmd_t *pmd = pmd_offset(pud, addr); | ||
50 | pmd_clear(pmd); | ||
51 | } | ||
52 | 77 | ||
53 | static void idmap_del_pud(pgd_t *pgd, unsigned long addr, unsigned long end) | 78 | static int __init init_static_idmap(void) |
54 | { | 79 | { |
55 | pud_t *pud = pud_offset(pgd, addr); | 80 | phys_addr_t idmap_start, idmap_end; |
56 | unsigned long next; | ||
57 | 81 | ||
58 | do { | 82 | idmap_pgd = pgd_alloc(&init_mm); |
59 | next = pud_addr_end(addr, end); | 83 | if (!idmap_pgd) |
60 | idmap_del_pmd(pud, addr, next); | 84 | return -ENOMEM; |
61 | } while (pud++, addr = next, addr != end); | ||
62 | } | ||
63 | 85 | ||
64 | void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end) | 86 | /* Add an identity mapping for the physical address of the section. */ |
65 | { | 87 | idmap_start = virt_to_phys((void *)__idmap_text_start); |
66 | unsigned long next; | 88 | idmap_end = virt_to_phys((void *)__idmap_text_end); |
67 | 89 | ||
68 | pgd += pgd_index(addr); | 90 | pr_info("Setting up static identity map for 0x%llx - 0x%llx\n", |
69 | do { | 91 | (long long)idmap_start, (long long)idmap_end); |
70 | next = pgd_addr_end(addr, end); | 92 | identity_mapping_add(idmap_pgd, idmap_start, idmap_end); |
71 | idmap_del_pud(pgd, addr, next); | 93 | |
72 | } while (pgd++, addr = next, addr != end); | 94 | return 0; |
73 | } | 95 | } |
74 | #endif | 96 | early_initcall(init_static_idmap); |
75 | 97 | ||
76 | /* | 98 | /* |
77 | * In order to soft-boot, we need to insert a 1:1 mapping in place of | 99 | * In order to soft-boot, we need to switch to a 1:1 mapping for the |
78 | * the user-mode pages. This will then ensure that we have predictable | 100 | * cpu_reset functions. This will then ensure that we have predictable |
79 | * results when turning the mmu off | 101 | * results when turning off the mmu. |
80 | */ | 102 | */ |
81 | void setup_mm_for_reboot(void) | 103 | void setup_mm_for_reboot(void) |
82 | { | 104 | { |
83 | /* | 105 | /* Clean and invalidate L1. */ |
84 | * We need to access to user-mode page tables here. For kernel threads | 106 | flush_cache_all(); |
85 | * we don't have any user-mode mappings so we use the context that we | 107 | |
86 | * "borrowed". | 108 | /* Switch to the identity mapping. */ |
87 | */ | 109 | cpu_switch_mm(idmap_pgd, &init_mm); |
88 | identity_mapping_add(current->active_mm->pgd, 0, TASK_SIZE); | 110 | |
111 | /* Flush the TLB. */ | ||
89 | local_flush_tlb_all(); | 112 | local_flush_tlb_all(); |
90 | } | 113 | } |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index fbdd12ea3a58..786adddf1a86 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
21 | #include <linux/gfp.h> | 21 | #include <linux/gfp.h> |
22 | #include <linux/memblock.h> | 22 | #include <linux/memblock.h> |
23 | #include <linux/sort.h> | ||
24 | 23 | ||
25 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
26 | #include <asm/prom.h> | 25 | #include <asm/prom.h> |
@@ -134,30 +133,18 @@ void show_mem(unsigned int filter) | |||
134 | } | 133 | } |
135 | 134 | ||
136 | static void __init find_limits(unsigned long *min, unsigned long *max_low, | 135 | static void __init find_limits(unsigned long *min, unsigned long *max_low, |
137 | unsigned long *max_high) | 136 | unsigned long *max_high) |
138 | { | 137 | { |
139 | struct meminfo *mi = &meminfo; | 138 | struct meminfo *mi = &meminfo; |
140 | int i; | 139 | int i; |
141 | 140 | ||
142 | *min = -1UL; | 141 | /* This assumes the meminfo array is properly sorted */ |
143 | *max_low = *max_high = 0; | 142 | *min = bank_pfn_start(&mi->bank[0]); |
144 | 143 | for_each_bank (i, mi) | |
145 | for_each_bank (i, mi) { | 144 | if (mi->bank[i].highmem) |
146 | struct membank *bank = &mi->bank[i]; | 145 | break; |
147 | unsigned long start, end; | 146 | *max_low = bank_pfn_end(&mi->bank[i - 1]); |
148 | 147 | *max_high = bank_pfn_end(&mi->bank[mi->nr_banks - 1]); | |
149 | start = bank_pfn_start(bank); | ||
150 | end = bank_pfn_end(bank); | ||
151 | |||
152 | if (*min > start) | ||
153 | *min = start; | ||
154 | if (*max_high < end) | ||
155 | *max_high = end; | ||
156 | if (bank->highmem) | ||
157 | continue; | ||
158 | if (*max_low < end) | ||
159 | *max_low = end; | ||
160 | } | ||
161 | } | 148 | } |
162 | 149 | ||
163 | static void __init arm_bootmem_init(unsigned long start_pfn, | 150 | static void __init arm_bootmem_init(unsigned long start_pfn, |
@@ -319,19 +306,10 @@ static void arm_memory_present(void) | |||
319 | } | 306 | } |
320 | #endif | 307 | #endif |
321 | 308 | ||
322 | static int __init meminfo_cmp(const void *_a, const void *_b) | ||
323 | { | ||
324 | const struct membank *a = _a, *b = _b; | ||
325 | long cmp = bank_pfn_start(a) - bank_pfn_start(b); | ||
326 | return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; | ||
327 | } | ||
328 | |||
329 | void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | 309 | void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) |
330 | { | 310 | { |
331 | int i; | 311 | int i; |
332 | 312 | ||
333 | sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); | ||
334 | |||
335 | memblock_init(); | 313 | memblock_init(); |
336 | for (i = 0; i < mi->nr_banks; i++) | 314 | for (i = 0; i < mi->nr_banks; i++) |
337 | memblock_add(mi->bank[i].start, mi->bank[i].size); | 315 | memblock_add(mi->bank[i].start, mi->bank[i].size); |
@@ -403,8 +381,6 @@ void __init bootmem_init(void) | |||
403 | */ | 381 | */ |
404 | arm_bootmem_free(min, max_low, max_high); | 382 | arm_bootmem_free(min, max_low, max_high); |
405 | 383 | ||
406 | high_memory = __va(((phys_addr_t)max_low << PAGE_SHIFT) - 1) + 1; | ||
407 | |||
408 | /* | 384 | /* |
409 | * This doesn't seem to be used by the Linux memory manager any | 385 | * This doesn't seem to be used by the Linux memory manager any |
410 | * more, but is used by ll_rw_block. If we can get rid of it, we | 386 | * more, but is used by ll_rw_block. If we can get rid of it, we |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index bdb248c4f55c..80632e8d7538 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -36,12 +36,6 @@ | |||
36 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
37 | #include "mm.h" | 37 | #include "mm.h" |
38 | 38 | ||
39 | /* | ||
40 | * Used by ioremap() and iounmap() code to mark (super)section-mapped | ||
41 | * I/O regions in vm_struct->flags field. | ||
42 | */ | ||
43 | #define VM_ARM_SECTION_MAPPING 0x80000000 | ||
44 | |||
45 | int ioremap_page(unsigned long virt, unsigned long phys, | 39 | int ioremap_page(unsigned long virt, unsigned long phys, |
46 | const struct mem_type *mtype) | 40 | const struct mem_type *mtype) |
47 | { | 41 | { |
@@ -64,7 +58,7 @@ void __check_kvm_seq(struct mm_struct *mm) | |||
64 | } while (seq != init_mm.context.kvm_seq); | 58 | } while (seq != init_mm.context.kvm_seq); |
65 | } | 59 | } |
66 | 60 | ||
67 | #ifndef CONFIG_SMP | 61 | #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) |
68 | /* | 62 | /* |
69 | * Section support is unsafe on SMP - If you iounmap and ioremap a region, | 63 | * Section support is unsafe on SMP - If you iounmap and ioremap a region, |
70 | * the other CPUs will not see this change until their next context switch. | 64 | * the other CPUs will not see this change until their next context switch. |
@@ -79,13 +73,16 @@ static void unmap_area_sections(unsigned long virt, unsigned long size) | |||
79 | { | 73 | { |
80 | unsigned long addr = virt, end = virt + (size & ~(SZ_1M - 1)); | 74 | unsigned long addr = virt, end = virt + (size & ~(SZ_1M - 1)); |
81 | pgd_t *pgd; | 75 | pgd_t *pgd; |
76 | pud_t *pud; | ||
77 | pmd_t *pmdp; | ||
82 | 78 | ||
83 | flush_cache_vunmap(addr, end); | 79 | flush_cache_vunmap(addr, end); |
84 | pgd = pgd_offset_k(addr); | 80 | pgd = pgd_offset_k(addr); |
81 | pud = pud_offset(pgd, addr); | ||
82 | pmdp = pmd_offset(pud, addr); | ||
85 | do { | 83 | do { |
86 | pmd_t pmd, *pmdp = pmd_offset(pgd, addr); | 84 | pmd_t pmd = *pmdp; |
87 | 85 | ||
88 | pmd = *pmdp; | ||
89 | if (!pmd_none(pmd)) { | 86 | if (!pmd_none(pmd)) { |
90 | /* | 87 | /* |
91 | * Clear the PMD from the page table, and | 88 | * Clear the PMD from the page table, and |
@@ -104,8 +101,8 @@ static void unmap_area_sections(unsigned long virt, unsigned long size) | |||
104 | pte_free_kernel(&init_mm, pmd_page_vaddr(pmd)); | 101 | pte_free_kernel(&init_mm, pmd_page_vaddr(pmd)); |
105 | } | 102 | } |
106 | 103 | ||
107 | addr += PGDIR_SIZE; | 104 | addr += PMD_SIZE; |
108 | pgd++; | 105 | pmdp += 2; |
109 | } while (addr < end); | 106 | } while (addr < end); |
110 | 107 | ||
111 | /* | 108 | /* |
@@ -124,6 +121,8 @@ remap_area_sections(unsigned long virt, unsigned long pfn, | |||
124 | { | 121 | { |
125 | unsigned long addr = virt, end = virt + size; | 122 | unsigned long addr = virt, end = virt + size; |
126 | pgd_t *pgd; | 123 | pgd_t *pgd; |
124 | pud_t *pud; | ||
125 | pmd_t *pmd; | ||
127 | 126 | ||
128 | /* | 127 | /* |
129 | * Remove and free any PTE-based mapping, and | 128 | * Remove and free any PTE-based mapping, and |
@@ -132,17 +131,17 @@ remap_area_sections(unsigned long virt, unsigned long pfn, | |||
132 | unmap_area_sections(virt, size); | 131 | unmap_area_sections(virt, size); |
133 | 132 | ||
134 | pgd = pgd_offset_k(addr); | 133 | pgd = pgd_offset_k(addr); |
134 | pud = pud_offset(pgd, addr); | ||
135 | pmd = pmd_offset(pud, addr); | ||
135 | do { | 136 | do { |
136 | pmd_t *pmd = pmd_offset(pgd, addr); | ||
137 | |||
138 | pmd[0] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); | 137 | pmd[0] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); |
139 | pfn += SZ_1M >> PAGE_SHIFT; | 138 | pfn += SZ_1M >> PAGE_SHIFT; |
140 | pmd[1] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); | 139 | pmd[1] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); |
141 | pfn += SZ_1M >> PAGE_SHIFT; | 140 | pfn += SZ_1M >> PAGE_SHIFT; |
142 | flush_pmd_entry(pmd); | 141 | flush_pmd_entry(pmd); |
143 | 142 | ||
144 | addr += PGDIR_SIZE; | 143 | addr += PMD_SIZE; |
145 | pgd++; | 144 | pmd += 2; |
146 | } while (addr < end); | 145 | } while (addr < end); |
147 | 146 | ||
148 | return 0; | 147 | return 0; |
@@ -154,6 +153,8 @@ remap_area_supersections(unsigned long virt, unsigned long pfn, | |||
154 | { | 153 | { |
155 | unsigned long addr = virt, end = virt + size; | 154 | unsigned long addr = virt, end = virt + size; |
156 | pgd_t *pgd; | 155 | pgd_t *pgd; |
156 | pud_t *pud; | ||
157 | pmd_t *pmd; | ||
157 | 158 | ||
158 | /* | 159 | /* |
159 | * Remove and free any PTE-based mapping, and | 160 | * Remove and free any PTE-based mapping, and |
@@ -162,6 +163,8 @@ remap_area_supersections(unsigned long virt, unsigned long pfn, | |||
162 | unmap_area_sections(virt, size); | 163 | unmap_area_sections(virt, size); |
163 | 164 | ||
164 | pgd = pgd_offset_k(virt); | 165 | pgd = pgd_offset_k(virt); |
166 | pud = pud_offset(pgd, addr); | ||
167 | pmd = pmd_offset(pud, addr); | ||
165 | do { | 168 | do { |
166 | unsigned long super_pmd_val, i; | 169 | unsigned long super_pmd_val, i; |
167 | 170 | ||
@@ -170,14 +173,12 @@ remap_area_supersections(unsigned long virt, unsigned long pfn, | |||
170 | super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20; | 173 | super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20; |
171 | 174 | ||
172 | for (i = 0; i < 8; i++) { | 175 | for (i = 0; i < 8; i++) { |
173 | pmd_t *pmd = pmd_offset(pgd, addr); | ||
174 | |||
175 | pmd[0] = __pmd(super_pmd_val); | 176 | pmd[0] = __pmd(super_pmd_val); |
176 | pmd[1] = __pmd(super_pmd_val); | 177 | pmd[1] = __pmd(super_pmd_val); |
177 | flush_pmd_entry(pmd); | 178 | flush_pmd_entry(pmd); |
178 | 179 | ||
179 | addr += PGDIR_SIZE; | 180 | addr += PMD_SIZE; |
180 | pgd++; | 181 | pmd += 2; |
181 | } | 182 | } |
182 | 183 | ||
183 | pfn += SUPERSECTION_SIZE >> PAGE_SHIFT; | 184 | pfn += SUPERSECTION_SIZE >> PAGE_SHIFT; |
@@ -195,17 +196,13 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, | |||
195 | unsigned long addr; | 196 | unsigned long addr; |
196 | struct vm_struct * area; | 197 | struct vm_struct * area; |
197 | 198 | ||
199 | #ifndef CONFIG_ARM_LPAE | ||
198 | /* | 200 | /* |
199 | * High mappings must be supersection aligned | 201 | * High mappings must be supersection aligned |
200 | */ | 202 | */ |
201 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) | 203 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) |
202 | return NULL; | 204 | return NULL; |
203 | 205 | #endif | |
204 | /* | ||
205 | * Don't allow RAM to be mapped - this causes problems with ARMv6+ | ||
206 | */ | ||
207 | if (WARN_ON(pfn_valid(pfn))) | ||
208 | return NULL; | ||
209 | 206 | ||
210 | type = get_mem_type(mtype); | 207 | type = get_mem_type(mtype); |
211 | if (!type) | 208 | if (!type) |
@@ -216,12 +213,40 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, | |||
216 | */ | 213 | */ |
217 | size = PAGE_ALIGN(offset + size); | 214 | size = PAGE_ALIGN(offset + size); |
218 | 215 | ||
216 | /* | ||
217 | * Try to reuse one of the static mapping whenever possible. | ||
218 | */ | ||
219 | read_lock(&vmlist_lock); | ||
220 | for (area = vmlist; area; area = area->next) { | ||
221 | if (!size || (sizeof(phys_addr_t) == 4 && pfn >= 0x100000)) | ||
222 | break; | ||
223 | if (!(area->flags & VM_ARM_STATIC_MAPPING)) | ||
224 | continue; | ||
225 | if ((area->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype)) | ||
226 | continue; | ||
227 | if (__phys_to_pfn(area->phys_addr) > pfn || | ||
228 | __pfn_to_phys(pfn) + size-1 > area->phys_addr + area->size-1) | ||
229 | continue; | ||
230 | /* we can drop the lock here as we know *area is static */ | ||
231 | read_unlock(&vmlist_lock); | ||
232 | addr = (unsigned long)area->addr; | ||
233 | addr += __pfn_to_phys(pfn) - area->phys_addr; | ||
234 | return (void __iomem *) (offset + addr); | ||
235 | } | ||
236 | read_unlock(&vmlist_lock); | ||
237 | |||
238 | /* | ||
239 | * Don't allow RAM to be mapped - this causes problems with ARMv6+ | ||
240 | */ | ||
241 | if (WARN_ON(pfn_valid(pfn))) | ||
242 | return NULL; | ||
243 | |||
219 | area = get_vm_area_caller(size, VM_IOREMAP, caller); | 244 | area = get_vm_area_caller(size, VM_IOREMAP, caller); |
220 | if (!area) | 245 | if (!area) |
221 | return NULL; | 246 | return NULL; |
222 | addr = (unsigned long)area->addr; | 247 | addr = (unsigned long)area->addr; |
223 | 248 | ||
224 | #ifndef CONFIG_SMP | 249 | #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) |
225 | if (DOMAIN_IO == 0 && | 250 | if (DOMAIN_IO == 0 && |
226 | (((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) || | 251 | (((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) || |
227 | cpu_is_xsc3()) && pfn >= 0x100000 && | 252 | cpu_is_xsc3()) && pfn >= 0x100000 && |
@@ -313,28 +338,34 @@ __arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached) | |||
313 | void __iounmap(volatile void __iomem *io_addr) | 338 | void __iounmap(volatile void __iomem *io_addr) |
314 | { | 339 | { |
315 | void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); | 340 | void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); |
316 | #ifndef CONFIG_SMP | 341 | struct vm_struct *vm; |
317 | struct vm_struct **p, *tmp; | ||
318 | 342 | ||
319 | /* | 343 | read_lock(&vmlist_lock); |
320 | * If this is a section based mapping we need to handle it | 344 | for (vm = vmlist; vm; vm = vm->next) { |
321 | * specially as the VM subsystem does not know how to handle | 345 | if (vm->addr > addr) |
322 | * such a beast. We need the lock here b/c we need to clear | 346 | break; |
323 | * all the mappings before the area can be reclaimed | 347 | if (!(vm->flags & VM_IOREMAP)) |
324 | * by someone else. | 348 | continue; |
325 | */ | 349 | /* If this is a static mapping we must leave it alone */ |
326 | write_lock(&vmlist_lock); | 350 | if ((vm->flags & VM_ARM_STATIC_MAPPING) && |
327 | for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { | 351 | (vm->addr <= addr) && (vm->addr + vm->size > addr)) { |
328 | if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { | 352 | read_unlock(&vmlist_lock); |
329 | if (tmp->flags & VM_ARM_SECTION_MAPPING) { | 353 | return; |
330 | unmap_area_sections((unsigned long)tmp->addr, | 354 | } |
331 | tmp->size); | 355 | #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) |
332 | } | 356 | /* |
357 | * If this is a section based mapping we need to handle it | ||
358 | * specially as the VM subsystem does not know how to handle | ||
359 | * such a beast. | ||
360 | */ | ||
361 | if ((vm->addr == addr) && | ||
362 | (vm->flags & VM_ARM_SECTION_MAPPING)) { | ||
363 | unmap_area_sections((unsigned long)vm->addr, vm->size); | ||
333 | break; | 364 | break; |
334 | } | 365 | } |
335 | } | ||
336 | write_unlock(&vmlist_lock); | ||
337 | #endif | 366 | #endif |
367 | } | ||
368 | read_unlock(&vmlist_lock); | ||
338 | 369 | ||
339 | vunmap(addr); | 370 | vunmap(addr); |
340 | } | 371 | } |
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index ad7cce3bc431..70f6d3ea4834 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -21,6 +21,20 @@ const struct mem_type *get_mem_type(unsigned int type); | |||
21 | 21 | ||
22 | extern void __flush_dcache_page(struct address_space *mapping, struct page *page); | 22 | extern void __flush_dcache_page(struct address_space *mapping, struct page *page); |
23 | 23 | ||
24 | /* | ||
25 | * ARM specific vm_struct->flags bits. | ||
26 | */ | ||
27 | |||
28 | /* (super)section-mapped I/O regions used by ioremap()/iounmap() */ | ||
29 | #define VM_ARM_SECTION_MAPPING 0x80000000 | ||
30 | |||
31 | /* permanent static mappings from iotable_init() */ | ||
32 | #define VM_ARM_STATIC_MAPPING 0x40000000 | ||
33 | |||
34 | /* mapping type (attributes) for permanent static mappings */ | ||
35 | #define VM_ARM_MTYPE(mt) ((mt) << 20) | ||
36 | #define VM_ARM_MTYPE_MASK (0x1f << 20) | ||
37 | |||
24 | #endif | 38 | #endif |
25 | 39 | ||
26 | #ifdef CONFIG_ZONE_DMA | 40 | #ifdef CONFIG_ZONE_DMA |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 44b628e4d6ea..ce8cb1970d7a 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
@@ -11,10 +11,49 @@ | |||
11 | #include <linux/random.h> | 11 | #include <linux/random.h> |
12 | #include <asm/cachetype.h> | 12 | #include <asm/cachetype.h> |
13 | 13 | ||
14 | static inline unsigned long COLOUR_ALIGN_DOWN(unsigned long addr, | ||
15 | unsigned long pgoff) | ||
16 | { | ||
17 | unsigned long base = addr & ~(SHMLBA-1); | ||
18 | unsigned long off = (pgoff << PAGE_SHIFT) & (SHMLBA-1); | ||
19 | |||
20 | if (base + off <= addr) | ||
21 | return base + off; | ||
22 | |||
23 | return base - off; | ||
24 | } | ||
25 | |||
14 | #define COLOUR_ALIGN(addr,pgoff) \ | 26 | #define COLOUR_ALIGN(addr,pgoff) \ |
15 | ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ | 27 | ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ |
16 | (((pgoff)<<PAGE_SHIFT) & (SHMLBA-1))) | 28 | (((pgoff)<<PAGE_SHIFT) & (SHMLBA-1))) |
17 | 29 | ||
30 | /* gap between mmap and stack */ | ||
31 | #define MIN_GAP (128*1024*1024UL) | ||
32 | #define MAX_GAP ((TASK_SIZE)/6*5) | ||
33 | |||
34 | static int mmap_is_legacy(void) | ||
35 | { | ||
36 | if (current->personality & ADDR_COMPAT_LAYOUT) | ||
37 | return 1; | ||
38 | |||
39 | if (rlimit(RLIMIT_STACK) == RLIM_INFINITY) | ||
40 | return 1; | ||
41 | |||
42 | return sysctl_legacy_va_layout; | ||
43 | } | ||
44 | |||
45 | static unsigned long mmap_base(unsigned long rnd) | ||
46 | { | ||
47 | unsigned long gap = rlimit(RLIMIT_STACK); | ||
48 | |||
49 | if (gap < MIN_GAP) | ||
50 | gap = MIN_GAP; | ||
51 | else if (gap > MAX_GAP) | ||
52 | gap = MAX_GAP; | ||
53 | |||
54 | return PAGE_ALIGN(TASK_SIZE - gap - rnd); | ||
55 | } | ||
56 | |||
18 | /* | 57 | /* |
19 | * We need to ensure that shared mappings are correctly aligned to | 58 | * We need to ensure that shared mappings are correctly aligned to |
20 | * avoid aliasing issues with VIPT caches. We need to ensure that | 59 | * avoid aliasing issues with VIPT caches. We need to ensure that |
@@ -68,13 +107,9 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
68 | if (len > mm->cached_hole_size) { | 107 | if (len > mm->cached_hole_size) { |
69 | start_addr = addr = mm->free_area_cache; | 108 | start_addr = addr = mm->free_area_cache; |
70 | } else { | 109 | } else { |
71 | start_addr = addr = TASK_UNMAPPED_BASE; | 110 | start_addr = addr = mm->mmap_base; |
72 | mm->cached_hole_size = 0; | 111 | mm->cached_hole_size = 0; |
73 | } | 112 | } |
74 | /* 8 bits of randomness in 20 address space bits */ | ||
75 | if ((current->flags & PF_RANDOMIZE) && | ||
76 | !(current->personality & ADDR_NO_RANDOMIZE)) | ||
77 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; | ||
78 | 113 | ||
79 | full_search: | 114 | full_search: |
80 | if (do_align) | 115 | if (do_align) |
@@ -111,6 +146,134 @@ full_search: | |||
111 | } | 146 | } |
112 | } | 147 | } |
113 | 148 | ||
149 | unsigned long | ||
150 | arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | ||
151 | const unsigned long len, const unsigned long pgoff, | ||
152 | const unsigned long flags) | ||
153 | { | ||
154 | struct vm_area_struct *vma; | ||
155 | struct mm_struct *mm = current->mm; | ||
156 | unsigned long addr = addr0; | ||
157 | int do_align = 0; | ||
158 | int aliasing = cache_is_vipt_aliasing(); | ||
159 | |||
160 | /* | ||
161 | * We only need to do colour alignment if either the I or D | ||
162 | * caches alias. | ||
163 | */ | ||
164 | if (aliasing) | ||
165 | do_align = filp || (flags & MAP_SHARED); | ||
166 | |||
167 | /* requested length too big for entire address space */ | ||
168 | if (len > TASK_SIZE) | ||
169 | return -ENOMEM; | ||
170 | |||
171 | if (flags & MAP_FIXED) { | ||
172 | if (aliasing && flags & MAP_SHARED && | ||
173 | (addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)) | ||
174 | return -EINVAL; | ||
175 | return addr; | ||
176 | } | ||
177 | |||
178 | /* requesting a specific address */ | ||
179 | if (addr) { | ||
180 | if (do_align) | ||
181 | addr = COLOUR_ALIGN(addr, pgoff); | ||
182 | else | ||
183 | addr = PAGE_ALIGN(addr); | ||
184 | vma = find_vma(mm, addr); | ||
185 | if (TASK_SIZE - len >= addr && | ||
186 | (!vma || addr + len <= vma->vm_start)) | ||
187 | return addr; | ||
188 | } | ||
189 | |||
190 | /* check if free_area_cache is useful for us */ | ||
191 | if (len <= mm->cached_hole_size) { | ||
192 | mm->cached_hole_size = 0; | ||
193 | mm->free_area_cache = mm->mmap_base; | ||
194 | } | ||
195 | |||
196 | /* either no address requested or can't fit in requested address hole */ | ||
197 | addr = mm->free_area_cache; | ||
198 | if (do_align) { | ||
199 | unsigned long base = COLOUR_ALIGN_DOWN(addr - len, pgoff); | ||
200 | addr = base + len; | ||
201 | } | ||
202 | |||
203 | /* make sure it can fit in the remaining address space */ | ||
204 | if (addr > len) { | ||
205 | vma = find_vma(mm, addr-len); | ||
206 | if (!vma || addr <= vma->vm_start) | ||
207 | /* remember the address as a hint for next time */ | ||
208 | return (mm->free_area_cache = addr-len); | ||
209 | } | ||
210 | |||
211 | if (mm->mmap_base < len) | ||
212 | goto bottomup; | ||
213 | |||
214 | addr = mm->mmap_base - len; | ||
215 | if (do_align) | ||
216 | addr = COLOUR_ALIGN_DOWN(addr, pgoff); | ||
217 | |||
218 | do { | ||
219 | /* | ||
220 | * Lookup failure means no vma is above this address, | ||
221 | * else if new region fits below vma->vm_start, | ||
222 | * return with success: | ||
223 | */ | ||
224 | vma = find_vma(mm, addr); | ||
225 | if (!vma || addr+len <= vma->vm_start) | ||
226 | /* remember the address as a hint for next time */ | ||
227 | return (mm->free_area_cache = addr); | ||
228 | |||
229 | /* remember the largest hole we saw so far */ | ||
230 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
231 | mm->cached_hole_size = vma->vm_start - addr; | ||
232 | |||
233 | /* try just below the current vma->vm_start */ | ||
234 | addr = vma->vm_start - len; | ||
235 | if (do_align) | ||
236 | addr = COLOUR_ALIGN_DOWN(addr, pgoff); | ||
237 | } while (len < vma->vm_start); | ||
238 | |||
239 | bottomup: | ||
240 | /* | ||
241 | * A failed mmap() very likely causes application failure, | ||
242 | * so fall back to the bottom-up function here. This scenario | ||
243 | * can happen with large stack limits and large mmap() | ||
244 | * allocations. | ||
245 | */ | ||
246 | mm->cached_hole_size = ~0UL; | ||
247 | mm->free_area_cache = TASK_UNMAPPED_BASE; | ||
248 | addr = arch_get_unmapped_area(filp, addr0, len, pgoff, flags); | ||
249 | /* | ||
250 | * Restore the topdown base: | ||
251 | */ | ||
252 | mm->free_area_cache = mm->mmap_base; | ||
253 | mm->cached_hole_size = ~0UL; | ||
254 | |||
255 | return addr; | ||
256 | } | ||
257 | |||
258 | void arch_pick_mmap_layout(struct mm_struct *mm) | ||
259 | { | ||
260 | unsigned long random_factor = 0UL; | ||
261 | |||
262 | /* 8 bits of randomness in 20 address space bits */ | ||
263 | if ((current->flags & PF_RANDOMIZE) && | ||
264 | !(current->personality & ADDR_NO_RANDOMIZE)) | ||
265 | random_factor = (get_random_int() % (1 << 8)) << PAGE_SHIFT; | ||
266 | |||
267 | if (mmap_is_legacy()) { | ||
268 | mm->mmap_base = TASK_UNMAPPED_BASE + random_factor; | ||
269 | mm->get_unmapped_area = arch_get_unmapped_area; | ||
270 | mm->unmap_area = arch_unmap_area; | ||
271 | } else { | ||
272 | mm->mmap_base = mmap_base(random_factor); | ||
273 | mm->get_unmapped_area = arch_get_unmapped_area_topdown; | ||
274 | mm->unmap_area = arch_unmap_area_topdown; | ||
275 | } | ||
276 | } | ||
114 | 277 | ||
115 | /* | 278 | /* |
116 | * You really shouldn't be using read() or write() on /dev/mem. This | 279 | * You really shouldn't be using read() or write() on /dev/mem. This |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index dc8c550e6cbd..94c5a0c94f5e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/nodemask.h> | 15 | #include <linux/nodemask.h> |
16 | #include <linux/memblock.h> | 16 | #include <linux/memblock.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/vmalloc.h> | ||
18 | 19 | ||
19 | #include <asm/cputype.h> | 20 | #include <asm/cputype.h> |
20 | #include <asm/sections.h> | 21 | #include <asm/sections.h> |
@@ -150,6 +151,7 @@ static int __init early_nowrite(char *__unused) | |||
150 | } | 151 | } |
151 | early_param("nowb", early_nowrite); | 152 | early_param("nowb", early_nowrite); |
152 | 153 | ||
154 | #ifndef CONFIG_ARM_LPAE | ||
153 | static int __init early_ecc(char *p) | 155 | static int __init early_ecc(char *p) |
154 | { | 156 | { |
155 | if (memcmp(p, "on", 2) == 0) | 157 | if (memcmp(p, "on", 2) == 0) |
@@ -159,6 +161,7 @@ static int __init early_ecc(char *p) | |||
159 | return 0; | 161 | return 0; |
160 | } | 162 | } |
161 | early_param("ecc", early_ecc); | 163 | early_param("ecc", early_ecc); |
164 | #endif | ||
162 | 165 | ||
163 | static int __init noalign_setup(char *__unused) | 166 | static int __init noalign_setup(char *__unused) |
164 | { | 167 | { |
@@ -228,10 +231,12 @@ static struct mem_type mem_types[] = { | |||
228 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, | 231 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, |
229 | .domain = DOMAIN_KERNEL, | 232 | .domain = DOMAIN_KERNEL, |
230 | }, | 233 | }, |
234 | #ifndef CONFIG_ARM_LPAE | ||
231 | [MT_MINICLEAN] = { | 235 | [MT_MINICLEAN] = { |
232 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_MINICACHE, | 236 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_MINICACHE, |
233 | .domain = DOMAIN_KERNEL, | 237 | .domain = DOMAIN_KERNEL, |
234 | }, | 238 | }, |
239 | #endif | ||
235 | [MT_LOW_VECTORS] = { | 240 | [MT_LOW_VECTORS] = { |
236 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 241 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
237 | L_PTE_RDONLY, | 242 | L_PTE_RDONLY, |
@@ -429,6 +434,7 @@ static void __init build_mem_type_table(void) | |||
429 | * ARMv6 and above have extended page tables. | 434 | * ARMv6 and above have extended page tables. |
430 | */ | 435 | */ |
431 | if (cpu_arch >= CPU_ARCH_ARMv6 && (cr & CR_XP)) { | 436 | if (cpu_arch >= CPU_ARCH_ARMv6 && (cr & CR_XP)) { |
437 | #ifndef CONFIG_ARM_LPAE | ||
432 | /* | 438 | /* |
433 | * Mark cache clean areas and XIP ROM read only | 439 | * Mark cache clean areas and XIP ROM read only |
434 | * from SVC mode and no access from userspace. | 440 | * from SVC mode and no access from userspace. |
@@ -436,6 +442,7 @@ static void __init build_mem_type_table(void) | |||
436 | mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; | 442 | mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; |
437 | mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; | 443 | mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; |
438 | mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; | 444 | mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; |
445 | #endif | ||
439 | 446 | ||
440 | if (is_smp()) { | 447 | if (is_smp()) { |
441 | /* | 448 | /* |
@@ -474,6 +481,18 @@ static void __init build_mem_type_table(void) | |||
474 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_BUFFERABLE; | 481 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_BUFFERABLE; |
475 | } | 482 | } |
476 | 483 | ||
484 | #ifdef CONFIG_ARM_LPAE | ||
485 | /* | ||
486 | * Do not generate access flag faults for the kernel mappings. | ||
487 | */ | ||
488 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { | ||
489 | mem_types[i].prot_pte |= PTE_EXT_AF; | ||
490 | mem_types[i].prot_sect |= PMD_SECT_AF; | ||
491 | } | ||
492 | kern_pgprot |= PTE_EXT_AF; | ||
493 | vecs_pgprot |= PTE_EXT_AF; | ||
494 | #endif | ||
495 | |||
477 | for (i = 0; i < 16; i++) { | 496 | for (i = 0; i < 16; i++) { |
478 | unsigned long v = pgprot_val(protection_map[i]); | 497 | unsigned long v = pgprot_val(protection_map[i]); |
479 | protection_map[i] = __pgprot(v | user_pgprot); | 498 | protection_map[i] = __pgprot(v | user_pgprot); |
@@ -529,13 +548,18 @@ EXPORT_SYMBOL(phys_mem_access_prot); | |||
529 | 548 | ||
530 | #define vectors_base() (vectors_high() ? 0xffff0000 : 0) | 549 | #define vectors_base() (vectors_high() ? 0xffff0000 : 0) |
531 | 550 | ||
532 | static void __init *early_alloc(unsigned long sz) | 551 | static void __init *early_alloc_aligned(unsigned long sz, unsigned long align) |
533 | { | 552 | { |
534 | void *ptr = __va(memblock_alloc(sz, sz)); | 553 | void *ptr = __va(memblock_alloc(sz, align)); |
535 | memset(ptr, 0, sz); | 554 | memset(ptr, 0, sz); |
536 | return ptr; | 555 | return ptr; |
537 | } | 556 | } |
538 | 557 | ||
558 | static void __init *early_alloc(unsigned long sz) | ||
559 | { | ||
560 | return early_alloc_aligned(sz, sz); | ||
561 | } | ||
562 | |||
539 | static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, unsigned long prot) | 563 | static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, unsigned long prot) |
540 | { | 564 | { |
541 | if (pmd_none(*pmd)) { | 565 | if (pmd_none(*pmd)) { |
@@ -572,8 +596,10 @@ static void __init alloc_init_section(pud_t *pud, unsigned long addr, | |||
572 | if (((addr | end | phys) & ~SECTION_MASK) == 0) { | 596 | if (((addr | end | phys) & ~SECTION_MASK) == 0) { |
573 | pmd_t *p = pmd; | 597 | pmd_t *p = pmd; |
574 | 598 | ||
599 | #ifndef CONFIG_ARM_LPAE | ||
575 | if (addr & SECTION_SIZE) | 600 | if (addr & SECTION_SIZE) |
576 | pmd++; | 601 | pmd++; |
602 | #endif | ||
577 | 603 | ||
578 | do { | 604 | do { |
579 | *pmd = __pmd(phys | type->prot_sect); | 605 | *pmd = __pmd(phys | type->prot_sect); |
@@ -603,6 +629,7 @@ static void alloc_init_pud(pgd_t *pgd, unsigned long addr, unsigned long end, | |||
603 | } while (pud++, addr = next, addr != end); | 629 | } while (pud++, addr = next, addr != end); |
604 | } | 630 | } |
605 | 631 | ||
632 | #ifndef CONFIG_ARM_LPAE | ||
606 | static void __init create_36bit_mapping(struct map_desc *md, | 633 | static void __init create_36bit_mapping(struct map_desc *md, |
607 | const struct mem_type *type) | 634 | const struct mem_type *type) |
608 | { | 635 | { |
@@ -662,6 +689,7 @@ static void __init create_36bit_mapping(struct map_desc *md, | |||
662 | pgd += SUPERSECTION_SIZE >> PGDIR_SHIFT; | 689 | pgd += SUPERSECTION_SIZE >> PGDIR_SHIFT; |
663 | } while (addr != end); | 690 | } while (addr != end); |
664 | } | 691 | } |
692 | #endif /* !CONFIG_ARM_LPAE */ | ||
665 | 693 | ||
666 | /* | 694 | /* |
667 | * Create the page directory entries and any necessary | 695 | * Create the page directory entries and any necessary |
@@ -685,14 +713,16 @@ static void __init create_mapping(struct map_desc *md) | |||
685 | } | 713 | } |
686 | 714 | ||
687 | if ((md->type == MT_DEVICE || md->type == MT_ROM) && | 715 | if ((md->type == MT_DEVICE || md->type == MT_ROM) && |
688 | md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) { | 716 | md->virtual >= PAGE_OFFSET && |
717 | (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) { | ||
689 | printk(KERN_WARNING "BUG: mapping for 0x%08llx" | 718 | printk(KERN_WARNING "BUG: mapping for 0x%08llx" |
690 | " at 0x%08lx overlaps vmalloc space\n", | 719 | " at 0x%08lx out of vmalloc space\n", |
691 | (long long)__pfn_to_phys((u64)md->pfn), md->virtual); | 720 | (long long)__pfn_to_phys((u64)md->pfn), md->virtual); |
692 | } | 721 | } |
693 | 722 | ||
694 | type = &mem_types[md->type]; | 723 | type = &mem_types[md->type]; |
695 | 724 | ||
725 | #ifndef CONFIG_ARM_LPAE | ||
696 | /* | 726 | /* |
697 | * Catch 36-bit addresses | 727 | * Catch 36-bit addresses |
698 | */ | 728 | */ |
@@ -700,6 +730,7 @@ static void __init create_mapping(struct map_desc *md) | |||
700 | create_36bit_mapping(md, type); | 730 | create_36bit_mapping(md, type); |
701 | return; | 731 | return; |
702 | } | 732 | } |
733 | #endif | ||
703 | 734 | ||
704 | addr = md->virtual & PAGE_MASK; | 735 | addr = md->virtual & PAGE_MASK; |
705 | phys = __pfn_to_phys(md->pfn); | 736 | phys = __pfn_to_phys(md->pfn); |
@@ -729,18 +760,33 @@ static void __init create_mapping(struct map_desc *md) | |||
729 | */ | 760 | */ |
730 | void __init iotable_init(struct map_desc *io_desc, int nr) | 761 | void __init iotable_init(struct map_desc *io_desc, int nr) |
731 | { | 762 | { |
732 | int i; | 763 | struct map_desc *md; |
764 | struct vm_struct *vm; | ||
765 | |||
766 | if (!nr) | ||
767 | return; | ||
733 | 768 | ||
734 | for (i = 0; i < nr; i++) | 769 | vm = early_alloc_aligned(sizeof(*vm) * nr, __alignof__(*vm)); |
735 | create_mapping(io_desc + i); | 770 | |
771 | for (md = io_desc; nr; md++, nr--) { | ||
772 | create_mapping(md); | ||
773 | vm->addr = (void *)(md->virtual & PAGE_MASK); | ||
774 | vm->size = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK)); | ||
775 | vm->phys_addr = __pfn_to_phys(md->pfn); | ||
776 | vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING; | ||
777 | vm->flags |= VM_ARM_MTYPE(md->type); | ||
778 | vm->caller = iotable_init; | ||
779 | vm_area_add_early(vm++); | ||
780 | } | ||
736 | } | 781 | } |
737 | 782 | ||
738 | static void * __initdata vmalloc_min = (void *)(VMALLOC_END - SZ_128M); | 783 | static void * __initdata vmalloc_min = |
784 | (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); | ||
739 | 785 | ||
740 | /* | 786 | /* |
741 | * vmalloc=size forces the vmalloc area to be exactly 'size' | 787 | * vmalloc=size forces the vmalloc area to be exactly 'size' |
742 | * bytes. This can be used to increase (or decrease) the vmalloc | 788 | * bytes. This can be used to increase (or decrease) the vmalloc |
743 | * area - the default is 128m. | 789 | * area - the default is 240m. |
744 | */ | 790 | */ |
745 | static int __init early_vmalloc(char *arg) | 791 | static int __init early_vmalloc(char *arg) |
746 | { | 792 | { |
@@ -775,6 +821,9 @@ void __init sanity_check_meminfo(void) | |||
775 | struct membank *bank = &meminfo.bank[j]; | 821 | struct membank *bank = &meminfo.bank[j]; |
776 | *bank = meminfo.bank[i]; | 822 | *bank = meminfo.bank[i]; |
777 | 823 | ||
824 | if (bank->start > ULONG_MAX) | ||
825 | highmem = 1; | ||
826 | |||
778 | #ifdef CONFIG_HIGHMEM | 827 | #ifdef CONFIG_HIGHMEM |
779 | if (__va(bank->start) >= vmalloc_min || | 828 | if (__va(bank->start) >= vmalloc_min || |
780 | __va(bank->start) < (void *)PAGE_OFFSET) | 829 | __va(bank->start) < (void *)PAGE_OFFSET) |
@@ -786,7 +835,7 @@ void __init sanity_check_meminfo(void) | |||
786 | * Split those memory banks which are partially overlapping | 835 | * Split those memory banks which are partially overlapping |
787 | * the vmalloc area greatly simplifying things later. | 836 | * the vmalloc area greatly simplifying things later. |
788 | */ | 837 | */ |
789 | if (__va(bank->start) < vmalloc_min && | 838 | if (!highmem && __va(bank->start) < vmalloc_min && |
790 | bank->size > vmalloc_min - __va(bank->start)) { | 839 | bank->size > vmalloc_min - __va(bank->start)) { |
791 | if (meminfo.nr_banks >= NR_BANKS) { | 840 | if (meminfo.nr_banks >= NR_BANKS) { |
792 | printk(KERN_CRIT "NR_BANKS too low, " | 841 | printk(KERN_CRIT "NR_BANKS too low, " |
@@ -807,6 +856,17 @@ void __init sanity_check_meminfo(void) | |||
807 | bank->highmem = highmem; | 856 | bank->highmem = highmem; |
808 | 857 | ||
809 | /* | 858 | /* |
859 | * Highmem banks not allowed with !CONFIG_HIGHMEM. | ||
860 | */ | ||
861 | if (highmem) { | ||
862 | printk(KERN_NOTICE "Ignoring RAM at %.8llx-%.8llx " | ||
863 | "(!CONFIG_HIGHMEM).\n", | ||
864 | (unsigned long long)bank->start, | ||
865 | (unsigned long long)bank->start + bank->size - 1); | ||
866 | continue; | ||
867 | } | ||
868 | |||
869 | /* | ||
810 | * Check whether this memory bank would entirely overlap | 870 | * Check whether this memory bank would entirely overlap |
811 | * the vmalloc area. | 871 | * the vmalloc area. |
812 | */ | 872 | */ |
@@ -860,6 +920,7 @@ void __init sanity_check_meminfo(void) | |||
860 | } | 920 | } |
861 | #endif | 921 | #endif |
862 | meminfo.nr_banks = j; | 922 | meminfo.nr_banks = j; |
923 | high_memory = __va(lowmem_limit - 1) + 1; | ||
863 | memblock_set_current_limit(lowmem_limit); | 924 | memblock_set_current_limit(lowmem_limit); |
864 | } | 925 | } |
865 | 926 | ||
@@ -890,14 +951,20 @@ static inline void prepare_page_table(void) | |||
890 | 951 | ||
891 | /* | 952 | /* |
892 | * Clear out all the kernel space mappings, except for the first | 953 | * Clear out all the kernel space mappings, except for the first |
893 | * memory bank, up to the end of the vmalloc region. | 954 | * memory bank, up to the vmalloc region. |
894 | */ | 955 | */ |
895 | for (addr = __phys_to_virt(end); | 956 | for (addr = __phys_to_virt(end); |
896 | addr < VMALLOC_END; addr += PMD_SIZE) | 957 | addr < VMALLOC_START; addr += PMD_SIZE) |
897 | pmd_clear(pmd_off_k(addr)); | 958 | pmd_clear(pmd_off_k(addr)); |
898 | } | 959 | } |
899 | 960 | ||
961 | #ifdef CONFIG_ARM_LPAE | ||
962 | /* the first page is reserved for pgd */ | ||
963 | #define SWAPPER_PG_DIR_SIZE (PAGE_SIZE + \ | ||
964 | PTRS_PER_PGD * PTRS_PER_PMD * sizeof(pmd_t)) | ||
965 | #else | ||
900 | #define SWAPPER_PG_DIR_SIZE (PTRS_PER_PGD * sizeof(pgd_t)) | 966 | #define SWAPPER_PG_DIR_SIZE (PTRS_PER_PGD * sizeof(pgd_t)) |
967 | #endif | ||
901 | 968 | ||
902 | /* | 969 | /* |
903 | * Reserve the special regions of memory | 970 | * Reserve the special regions of memory |
@@ -920,8 +987,8 @@ void __init arm_mm_memblock_reserve(void) | |||
920 | } | 987 | } |
921 | 988 | ||
922 | /* | 989 | /* |
923 | * Set up device the mappings. Since we clear out the page tables for all | 990 | * Set up the device mappings. Since we clear out the page tables for all |
924 | * mappings above VMALLOC_END, we will remove any debug device mappings. | 991 | * mappings above VMALLOC_START, we will remove any debug device mappings. |
925 | * This means you have to be careful how you debug this function, or any | 992 | * This means you have to be careful how you debug this function, or any |
926 | * called function. This means you can't use any function or debugging | 993 | * called function. This means you can't use any function or debugging |
927 | * method which may touch any device, otherwise the kernel _will_ crash. | 994 | * method which may touch any device, otherwise the kernel _will_ crash. |
@@ -936,7 +1003,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
936 | */ | 1003 | */ |
937 | vectors_page = early_alloc(PAGE_SIZE); | 1004 | vectors_page = early_alloc(PAGE_SIZE); |
938 | 1005 | ||
939 | for (addr = VMALLOC_END; addr; addr += PMD_SIZE) | 1006 | for (addr = VMALLOC_START; addr; addr += PMD_SIZE) |
940 | pmd_clear(pmd_off_k(addr)); | 1007 | pmd_clear(pmd_off_k(addr)); |
941 | 1008 | ||
942 | /* | 1009 | /* |
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 88417514b2c6..4fc6794cca4b 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -29,6 +29,8 @@ void __init arm_mm_memblock_reserve(void) | |||
29 | 29 | ||
30 | void __init sanity_check_meminfo(void) | 30 | void __init sanity_check_meminfo(void) |
31 | { | 31 | { |
32 | phys_addr_t end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]); | ||
33 | high_memory = __va(end - 1) + 1; | ||
32 | } | 34 | } |
33 | 35 | ||
34 | /* | 36 | /* |
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index b2027c154b2a..a3e78ccabd65 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/gfp.h> | 11 | #include <linux/gfp.h> |
12 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #include <asm/pgalloc.h> | 15 | #include <asm/pgalloc.h> |
15 | #include <asm/page.h> | 16 | #include <asm/page.h> |
@@ -17,6 +18,14 @@ | |||
17 | 18 | ||
18 | #include "mm.h" | 19 | #include "mm.h" |
19 | 20 | ||
21 | #ifdef CONFIG_ARM_LPAE | ||
22 | #define __pgd_alloc() kmalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL) | ||
23 | #define __pgd_free(pgd) kfree(pgd) | ||
24 | #else | ||
25 | #define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL, 2) | ||
26 | #define __pgd_free(pgd) free_pages((unsigned long)pgd, 2) | ||
27 | #endif | ||
28 | |||
20 | /* | 29 | /* |
21 | * need to get a 16k page for level 1 | 30 | * need to get a 16k page for level 1 |
22 | */ | 31 | */ |
@@ -27,7 +36,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
27 | pmd_t *new_pmd, *init_pmd; | 36 | pmd_t *new_pmd, *init_pmd; |
28 | pte_t *new_pte, *init_pte; | 37 | pte_t *new_pte, *init_pte; |
29 | 38 | ||
30 | new_pgd = (pgd_t *)__get_free_pages(GFP_KERNEL, 2); | 39 | new_pgd = __pgd_alloc(); |
31 | if (!new_pgd) | 40 | if (!new_pgd) |
32 | goto no_pgd; | 41 | goto no_pgd; |
33 | 42 | ||
@@ -42,10 +51,25 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
42 | 51 | ||
43 | clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t)); | 52 | clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t)); |
44 | 53 | ||
54 | #ifdef CONFIG_ARM_LPAE | ||
55 | /* | ||
56 | * Allocate PMD table for modules and pkmap mappings. | ||
57 | */ | ||
58 | new_pud = pud_alloc(mm, new_pgd + pgd_index(MODULES_VADDR), | ||
59 | MODULES_VADDR); | ||
60 | if (!new_pud) | ||
61 | goto no_pud; | ||
62 | |||
63 | new_pmd = pmd_alloc(mm, new_pud, 0); | ||
64 | if (!new_pmd) | ||
65 | goto no_pmd; | ||
66 | #endif | ||
67 | |||
45 | if (!vectors_high()) { | 68 | if (!vectors_high()) { |
46 | /* | 69 | /* |
47 | * On ARM, first page must always be allocated since it | 70 | * On ARM, first page must always be allocated since it |
48 | * contains the machine vectors. | 71 | * contains the machine vectors. The vectors are always high |
72 | * with LPAE. | ||
49 | */ | 73 | */ |
50 | new_pud = pud_alloc(mm, new_pgd, 0); | 74 | new_pud = pud_alloc(mm, new_pgd, 0); |
51 | if (!new_pud) | 75 | if (!new_pud) |
@@ -74,7 +98,7 @@ no_pte: | |||
74 | no_pmd: | 98 | no_pmd: |
75 | pud_free(mm, new_pud); | 99 | pud_free(mm, new_pud); |
76 | no_pud: | 100 | no_pud: |
77 | free_pages((unsigned long)new_pgd, 2); | 101 | __pgd_free(new_pgd); |
78 | no_pgd: | 102 | no_pgd: |
79 | return NULL; | 103 | return NULL; |
80 | } | 104 | } |
@@ -111,5 +135,24 @@ no_pud: | |||
111 | pgd_clear(pgd); | 135 | pgd_clear(pgd); |
112 | pud_free(mm, pud); | 136 | pud_free(mm, pud); |
113 | no_pgd: | 137 | no_pgd: |
114 | free_pages((unsigned long) pgd_base, 2); | 138 | #ifdef CONFIG_ARM_LPAE |
139 | /* | ||
140 | * Free modules/pkmap or identity pmd tables. | ||
141 | */ | ||
142 | for (pgd = pgd_base; pgd < pgd_base + PTRS_PER_PGD; pgd++) { | ||
143 | if (pgd_none_or_clear_bad(pgd)) | ||
144 | continue; | ||
145 | if (pgd_val(*pgd) & L_PGD_SWAPPER) | ||
146 | continue; | ||
147 | pud = pud_offset(pgd, 0); | ||
148 | if (pud_none_or_clear_bad(pud)) | ||
149 | continue; | ||
150 | pmd = pmd_offset(pud, 0); | ||
151 | pud_clear(pud); | ||
152 | pmd_free(mm, pmd); | ||
153 | pgd_clear(pgd); | ||
154 | pud_free(mm, pud); | ||
155 | } | ||
156 | #endif | ||
157 | __pgd_free(pgd_base); | ||
115 | } | 158 | } |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 67469665d47a..234951345eb3 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -95,6 +95,7 @@ ENTRY(cpu_arm1020_proc_fin) | |||
95 | * loc: location to jump to for soft reset | 95 | * loc: location to jump to for soft reset |
96 | */ | 96 | */ |
97 | .align 5 | 97 | .align 5 |
98 | .pushsection .idmap.text, "ax" | ||
98 | ENTRY(cpu_arm1020_reset) | 99 | ENTRY(cpu_arm1020_reset) |
99 | mov ip, #0 | 100 | mov ip, #0 |
100 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 101 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -107,6 +108,8 @@ ENTRY(cpu_arm1020_reset) | |||
107 | bic ip, ip, #0x1100 @ ...i...s........ | 108 | bic ip, ip, #0x1100 @ ...i...s........ |
108 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 109 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
109 | mov pc, r0 | 110 | mov pc, r0 |
111 | ENDPROC(cpu_arm1020_reset) | ||
112 | .popsection | ||
110 | 113 | ||
111 | /* | 114 | /* |
112 | * cpu_arm1020_do_idle() | 115 | * cpu_arm1020_do_idle() |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 4251421c0ed5..c244b06caac9 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -95,6 +95,7 @@ ENTRY(cpu_arm1020e_proc_fin) | |||
95 | * loc: location to jump to for soft reset | 95 | * loc: location to jump to for soft reset |
96 | */ | 96 | */ |
97 | .align 5 | 97 | .align 5 |
98 | .pushsection .idmap.text, "ax" | ||
98 | ENTRY(cpu_arm1020e_reset) | 99 | ENTRY(cpu_arm1020e_reset) |
99 | mov ip, #0 | 100 | mov ip, #0 |
100 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 101 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -107,6 +108,8 @@ ENTRY(cpu_arm1020e_reset) | |||
107 | bic ip, ip, #0x1100 @ ...i...s........ | 108 | bic ip, ip, #0x1100 @ ...i...s........ |
108 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 109 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
109 | mov pc, r0 | 110 | mov pc, r0 |
111 | ENDPROC(cpu_arm1020e_reset) | ||
112 | .popsection | ||
110 | 113 | ||
111 | /* | 114 | /* |
112 | * cpu_arm1020e_do_idle() | 115 | * cpu_arm1020e_do_idle() |
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index d283cf3d06e3..38fe22efd18f 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
@@ -84,6 +84,7 @@ ENTRY(cpu_arm1022_proc_fin) | |||
84 | * loc: location to jump to for soft reset | 84 | * loc: location to jump to for soft reset |
85 | */ | 85 | */ |
86 | .align 5 | 86 | .align 5 |
87 | .pushsection .idmap.text, "ax" | ||
87 | ENTRY(cpu_arm1022_reset) | 88 | ENTRY(cpu_arm1022_reset) |
88 | mov ip, #0 | 89 | mov ip, #0 |
89 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 90 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -96,6 +97,8 @@ ENTRY(cpu_arm1022_reset) | |||
96 | bic ip, ip, #0x1100 @ ...i...s........ | 97 | bic ip, ip, #0x1100 @ ...i...s........ |
97 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 98 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
98 | mov pc, r0 | 99 | mov pc, r0 |
100 | ENDPROC(cpu_arm1022_reset) | ||
101 | .popsection | ||
99 | 102 | ||
100 | /* | 103 | /* |
101 | * cpu_arm1022_do_idle() | 104 | * cpu_arm1022_do_idle() |
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 678a1ceafed2..3eb9c3c26c75 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
@@ -84,6 +84,7 @@ ENTRY(cpu_arm1026_proc_fin) | |||
84 | * loc: location to jump to for soft reset | 84 | * loc: location to jump to for soft reset |
85 | */ | 85 | */ |
86 | .align 5 | 86 | .align 5 |
87 | .pushsection .idmap.text, "ax" | ||
87 | ENTRY(cpu_arm1026_reset) | 88 | ENTRY(cpu_arm1026_reset) |
88 | mov ip, #0 | 89 | mov ip, #0 |
89 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 90 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -96,6 +97,8 @@ ENTRY(cpu_arm1026_reset) | |||
96 | bic ip, ip, #0x1100 @ ...i...s........ | 97 | bic ip, ip, #0x1100 @ ...i...s........ |
97 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 98 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
98 | mov pc, r0 | 99 | mov pc, r0 |
100 | ENDPROC(cpu_arm1026_reset) | ||
101 | .popsection | ||
99 | 102 | ||
100 | /* | 103 | /* |
101 | * cpu_arm1026_do_idle() | 104 | * cpu_arm1026_do_idle() |
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S index e5b974cddac3..4fbeb5b8e6c2 100644 --- a/arch/arm/mm/proc-arm6_7.S +++ b/arch/arm/mm/proc-arm6_7.S | |||
@@ -225,6 +225,7 @@ ENTRY(cpu_arm7_set_pte_ext) | |||
225 | * Params : r0 = address to jump to | 225 | * Params : r0 = address to jump to |
226 | * Notes : This sets up everything for a reset | 226 | * Notes : This sets up everything for a reset |
227 | */ | 227 | */ |
228 | .pushsection .idmap.text, "ax" | ||
228 | ENTRY(cpu_arm6_reset) | 229 | ENTRY(cpu_arm6_reset) |
229 | ENTRY(cpu_arm7_reset) | 230 | ENTRY(cpu_arm7_reset) |
230 | mov r1, #0 | 231 | mov r1, #0 |
@@ -235,6 +236,9 @@ ENTRY(cpu_arm7_reset) | |||
235 | mov r1, #0x30 | 236 | mov r1, #0x30 |
236 | mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc | 237 | mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc |
237 | mov pc, r0 | 238 | mov pc, r0 |
239 | ENDPROC(cpu_arm6_reset) | ||
240 | ENDPROC(cpu_arm7_reset) | ||
241 | .popsection | ||
238 | 242 | ||
239 | __CPUINIT | 243 | __CPUINIT |
240 | 244 | ||
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index 55f4e290665a..0ac908c7ade1 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S | |||
@@ -101,6 +101,7 @@ ENTRY(cpu_arm720_set_pte_ext) | |||
101 | * Params : r0 = address to jump to | 101 | * Params : r0 = address to jump to |
102 | * Notes : This sets up everything for a reset | 102 | * Notes : This sets up everything for a reset |
103 | */ | 103 | */ |
104 | .pushsection .idmap.text, "ax" | ||
104 | ENTRY(cpu_arm720_reset) | 105 | ENTRY(cpu_arm720_reset) |
105 | mov ip, #0 | 106 | mov ip, #0 |
106 | mcr p15, 0, ip, c7, c7, 0 @ invalidate cache | 107 | mcr p15, 0, ip, c7, c7, 0 @ invalidate cache |
@@ -112,6 +113,8 @@ ENTRY(cpu_arm720_reset) | |||
112 | bic ip, ip, #0x2100 @ ..v....s........ | 113 | bic ip, ip, #0x2100 @ ..v....s........ |
113 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 114 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
114 | mov pc, r0 | 115 | mov pc, r0 |
116 | ENDPROC(cpu_arm720_reset) | ||
117 | .popsection | ||
115 | 118 | ||
116 | __CPUINIT | 119 | __CPUINIT |
117 | 120 | ||
diff --git a/arch/arm/mm/proc-arm740.S b/arch/arm/mm/proc-arm740.S index 4506be3adda6..dc5de5d53f20 100644 --- a/arch/arm/mm/proc-arm740.S +++ b/arch/arm/mm/proc-arm740.S | |||
@@ -49,6 +49,7 @@ ENTRY(cpu_arm740_proc_fin) | |||
49 | * Params : r0 = address to jump to | 49 | * Params : r0 = address to jump to |
50 | * Notes : This sets up everything for a reset | 50 | * Notes : This sets up everything for a reset |
51 | */ | 51 | */ |
52 | .pushsection .idmap.text, "ax" | ||
52 | ENTRY(cpu_arm740_reset) | 53 | ENTRY(cpu_arm740_reset) |
53 | mov ip, #0 | 54 | mov ip, #0 |
54 | mcr p15, 0, ip, c7, c0, 0 @ invalidate cache | 55 | mcr p15, 0, ip, c7, c0, 0 @ invalidate cache |
@@ -56,6 +57,8 @@ ENTRY(cpu_arm740_reset) | |||
56 | bic ip, ip, #0x0000000c @ ............wc.. | 57 | bic ip, ip, #0x0000000c @ ............wc.. |
57 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 58 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
58 | mov pc, r0 | 59 | mov pc, r0 |
60 | ENDPROC(cpu_arm740_reset) | ||
61 | .popsection | ||
59 | 62 | ||
60 | __CPUINIT | 63 | __CPUINIT |
61 | 64 | ||
diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S index 7e0e1fe4ed4d..6ddea3e464bd 100644 --- a/arch/arm/mm/proc-arm7tdmi.S +++ b/arch/arm/mm/proc-arm7tdmi.S | |||
@@ -45,8 +45,11 @@ ENTRY(cpu_arm7tdmi_proc_fin) | |||
45 | * Params : loc(r0) address to jump to | 45 | * Params : loc(r0) address to jump to |
46 | * Purpose : Sets up everything for a reset and jump to the location for soft reset. | 46 | * Purpose : Sets up everything for a reset and jump to the location for soft reset. |
47 | */ | 47 | */ |
48 | .pushsection .idmap.text, "ax" | ||
48 | ENTRY(cpu_arm7tdmi_reset) | 49 | ENTRY(cpu_arm7tdmi_reset) |
49 | mov pc, r0 | 50 | mov pc, r0 |
51 | ENDPROC(cpu_arm7tdmi_reset) | ||
52 | .popsection | ||
50 | 53 | ||
51 | __CPUINIT | 54 | __CPUINIT |
52 | 55 | ||
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 88fb3d9e0640..cb941ae95f66 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -85,6 +85,7 @@ ENTRY(cpu_arm920_proc_fin) | |||
85 | * loc: location to jump to for soft reset | 85 | * loc: location to jump to for soft reset |
86 | */ | 86 | */ |
87 | .align 5 | 87 | .align 5 |
88 | .pushsection .idmap.text, "ax" | ||
88 | ENTRY(cpu_arm920_reset) | 89 | ENTRY(cpu_arm920_reset) |
89 | mov ip, #0 | 90 | mov ip, #0 |
90 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 91 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -97,6 +98,8 @@ ENTRY(cpu_arm920_reset) | |||
97 | bic ip, ip, #0x1100 @ ...i...s........ | 98 | bic ip, ip, #0x1100 @ ...i...s........ |
98 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 99 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
99 | mov pc, r0 | 100 | mov pc, r0 |
101 | ENDPROC(cpu_arm920_reset) | ||
102 | .popsection | ||
100 | 103 | ||
101 | /* | 104 | /* |
102 | * cpu_arm920_do_idle() | 105 | * cpu_arm920_do_idle() |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 490e18833857..4ec0e074dd55 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
@@ -87,6 +87,7 @@ ENTRY(cpu_arm922_proc_fin) | |||
87 | * loc: location to jump to for soft reset | 87 | * loc: location to jump to for soft reset |
88 | */ | 88 | */ |
89 | .align 5 | 89 | .align 5 |
90 | .pushsection .idmap.text, "ax" | ||
90 | ENTRY(cpu_arm922_reset) | 91 | ENTRY(cpu_arm922_reset) |
91 | mov ip, #0 | 92 | mov ip, #0 |
92 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 93 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -99,6 +100,8 @@ ENTRY(cpu_arm922_reset) | |||
99 | bic ip, ip, #0x1100 @ ...i...s........ | 100 | bic ip, ip, #0x1100 @ ...i...s........ |
100 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 101 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
101 | mov pc, r0 | 102 | mov pc, r0 |
103 | ENDPROC(cpu_arm922_reset) | ||
104 | .popsection | ||
102 | 105 | ||
103 | /* | 106 | /* |
104 | * cpu_arm922_do_idle() | 107 | * cpu_arm922_do_idle() |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index 51d494be057e..9dccd9a365b3 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -108,6 +108,7 @@ ENTRY(cpu_arm925_proc_fin) | |||
108 | * loc: location to jump to for soft reset | 108 | * loc: location to jump to for soft reset |
109 | */ | 109 | */ |
110 | .align 5 | 110 | .align 5 |
111 | .pushsection .idmap.text, "ax" | ||
111 | ENTRY(cpu_arm925_reset) | 112 | ENTRY(cpu_arm925_reset) |
112 | /* Send software reset to MPU and DSP */ | 113 | /* Send software reset to MPU and DSP */ |
113 | mov ip, #0xff000000 | 114 | mov ip, #0xff000000 |
@@ -115,6 +116,8 @@ ENTRY(cpu_arm925_reset) | |||
115 | orr ip, ip, #0x0000ce00 | 116 | orr ip, ip, #0x0000ce00 |
116 | mov r4, #1 | 117 | mov r4, #1 |
117 | strh r4, [ip, #0x10] | 118 | strh r4, [ip, #0x10] |
119 | ENDPROC(cpu_arm925_reset) | ||
120 | .popsection | ||
118 | 121 | ||
119 | mov ip, #0 | 122 | mov ip, #0 |
120 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 123 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 9f8fd91f918a..820259b81a1f 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -77,6 +77,7 @@ ENTRY(cpu_arm926_proc_fin) | |||
77 | * loc: location to jump to for soft reset | 77 | * loc: location to jump to for soft reset |
78 | */ | 78 | */ |
79 | .align 5 | 79 | .align 5 |
80 | .pushsection .idmap.text, "ax" | ||
80 | ENTRY(cpu_arm926_reset) | 81 | ENTRY(cpu_arm926_reset) |
81 | mov ip, #0 | 82 | mov ip, #0 |
82 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 83 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -89,6 +90,8 @@ ENTRY(cpu_arm926_reset) | |||
89 | bic ip, ip, #0x1100 @ ...i...s........ | 90 | bic ip, ip, #0x1100 @ ...i...s........ |
90 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 91 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
91 | mov pc, r0 | 92 | mov pc, r0 |
93 | ENDPROC(cpu_arm926_reset) | ||
94 | .popsection | ||
92 | 95 | ||
93 | /* | 96 | /* |
94 | * cpu_arm926_do_idle() | 97 | * cpu_arm926_do_idle() |
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S index ac750d506153..9fdc0a170974 100644 --- a/arch/arm/mm/proc-arm940.S +++ b/arch/arm/mm/proc-arm940.S | |||
@@ -48,6 +48,7 @@ ENTRY(cpu_arm940_proc_fin) | |||
48 | * Params : r0 = address to jump to | 48 | * Params : r0 = address to jump to |
49 | * Notes : This sets up everything for a reset | 49 | * Notes : This sets up everything for a reset |
50 | */ | 50 | */ |
51 | .pushsection .idmap.text, "ax" | ||
51 | ENTRY(cpu_arm940_reset) | 52 | ENTRY(cpu_arm940_reset) |
52 | mov ip, #0 | 53 | mov ip, #0 |
53 | mcr p15, 0, ip, c7, c5, 0 @ flush I cache | 54 | mcr p15, 0, ip, c7, c5, 0 @ flush I cache |
@@ -58,6 +59,8 @@ ENTRY(cpu_arm940_reset) | |||
58 | bic ip, ip, #0x00001000 @ i-cache | 59 | bic ip, ip, #0x00001000 @ i-cache |
59 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 60 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
60 | mov pc, r0 | 61 | mov pc, r0 |
62 | ENDPROC(cpu_arm940_reset) | ||
63 | .popsection | ||
61 | 64 | ||
62 | /* | 65 | /* |
63 | * cpu_arm940_do_idle() | 66 | * cpu_arm940_do_idle() |
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S index 683af3a182b7..f684cfedcca9 100644 --- a/arch/arm/mm/proc-arm946.S +++ b/arch/arm/mm/proc-arm946.S | |||
@@ -55,6 +55,7 @@ ENTRY(cpu_arm946_proc_fin) | |||
55 | * Params : r0 = address to jump to | 55 | * Params : r0 = address to jump to |
56 | * Notes : This sets up everything for a reset | 56 | * Notes : This sets up everything for a reset |
57 | */ | 57 | */ |
58 | .pushsection .idmap.text, "ax" | ||
58 | ENTRY(cpu_arm946_reset) | 59 | ENTRY(cpu_arm946_reset) |
59 | mov ip, #0 | 60 | mov ip, #0 |
60 | mcr p15, 0, ip, c7, c5, 0 @ flush I cache | 61 | mcr p15, 0, ip, c7, c5, 0 @ flush I cache |
@@ -65,6 +66,8 @@ ENTRY(cpu_arm946_reset) | |||
65 | bic ip, ip, #0x00001000 @ i-cache | 66 | bic ip, ip, #0x00001000 @ i-cache |
66 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 67 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
67 | mov pc, r0 | 68 | mov pc, r0 |
69 | ENDPROC(cpu_arm946_reset) | ||
70 | .popsection | ||
68 | 71 | ||
69 | /* | 72 | /* |
70 | * cpu_arm946_do_idle() | 73 | * cpu_arm946_do_idle() |
diff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S index 2120f9e2af7f..8881391dfb9e 100644 --- a/arch/arm/mm/proc-arm9tdmi.S +++ b/arch/arm/mm/proc-arm9tdmi.S | |||
@@ -45,8 +45,11 @@ ENTRY(cpu_arm9tdmi_proc_fin) | |||
45 | * Params : loc(r0) address to jump to | 45 | * Params : loc(r0) address to jump to |
46 | * Purpose : Sets up everything for a reset and jump to the location for soft reset. | 46 | * Purpose : Sets up everything for a reset and jump to the location for soft reset. |
47 | */ | 47 | */ |
48 | .pushsection .idmap.text, "ax" | ||
48 | ENTRY(cpu_arm9tdmi_reset) | 49 | ENTRY(cpu_arm9tdmi_reset) |
49 | mov pc, r0 | 50 | mov pc, r0 |
51 | ENDPROC(cpu_arm9tdmi_reset) | ||
52 | .popsection | ||
50 | 53 | ||
51 | __CPUINIT | 54 | __CPUINIT |
52 | 55 | ||
diff --git a/arch/arm/mm/proc-fa526.S b/arch/arm/mm/proc-fa526.S index 4c7a5710472b..272558a133a3 100644 --- a/arch/arm/mm/proc-fa526.S +++ b/arch/arm/mm/proc-fa526.S | |||
@@ -57,6 +57,7 @@ ENTRY(cpu_fa526_proc_fin) | |||
57 | * loc: location to jump to for soft reset | 57 | * loc: location to jump to for soft reset |
58 | */ | 58 | */ |
59 | .align 4 | 59 | .align 4 |
60 | .pushsection .idmap.text, "ax" | ||
60 | ENTRY(cpu_fa526_reset) | 61 | ENTRY(cpu_fa526_reset) |
61 | /* TODO: Use CP8 if possible... */ | 62 | /* TODO: Use CP8 if possible... */ |
62 | mov ip, #0 | 63 | mov ip, #0 |
@@ -73,6 +74,8 @@ ENTRY(cpu_fa526_reset) | |||
73 | nop | 74 | nop |
74 | nop | 75 | nop |
75 | mov pc, r0 | 76 | mov pc, r0 |
77 | ENDPROC(cpu_fa526_reset) | ||
78 | .popsection | ||
76 | 79 | ||
77 | /* | 80 | /* |
78 | * cpu_fa526_do_idle() | 81 | * cpu_fa526_do_idle() |
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index 8a6c2f78c1c3..ba3c500584ac 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
@@ -98,6 +98,7 @@ ENTRY(cpu_feroceon_proc_fin) | |||
98 | * loc: location to jump to for soft reset | 98 | * loc: location to jump to for soft reset |
99 | */ | 99 | */ |
100 | .align 5 | 100 | .align 5 |
101 | .pushsection .idmap.text, "ax" | ||
101 | ENTRY(cpu_feroceon_reset) | 102 | ENTRY(cpu_feroceon_reset) |
102 | mov ip, #0 | 103 | mov ip, #0 |
103 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 104 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -110,6 +111,8 @@ ENTRY(cpu_feroceon_reset) | |||
110 | bic ip, ip, #0x1100 @ ...i...s........ | 111 | bic ip, ip, #0x1100 @ ...i...s........ |
111 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 112 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
112 | mov pc, r0 | 113 | mov pc, r0 |
114 | ENDPROC(cpu_feroceon_reset) | ||
115 | .popsection | ||
113 | 116 | ||
114 | /* | 117 | /* |
115 | * cpu_feroceon_do_idle() | 118 | * cpu_feroceon_do_idle() |
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 307a4def8d3a..2d8ff3ad86d3 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -91,8 +91,9 @@ | |||
91 | #if L_PTE_SHARED != PTE_EXT_SHARED | 91 | #if L_PTE_SHARED != PTE_EXT_SHARED |
92 | #error PTE shared bit mismatch | 92 | #error PTE shared bit mismatch |
93 | #endif | 93 | #endif |
94 | #if (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ | 94 | #if !defined (CONFIG_ARM_LPAE) && \ |
95 | L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED | 95 | (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ |
96 | L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED | ||
96 | #error Invalid Linux PTE bit settings | 97 | #error Invalid Linux PTE bit settings |
97 | #endif | 98 | #endif |
98 | #endif /* CONFIG_MMU */ | 99 | #endif /* CONFIG_MMU */ |
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S index db52b0fb14a0..cdfedc5b8ad8 100644 --- a/arch/arm/mm/proc-mohawk.S +++ b/arch/arm/mm/proc-mohawk.S | |||
@@ -69,6 +69,7 @@ ENTRY(cpu_mohawk_proc_fin) | |||
69 | * (same as arm926) | 69 | * (same as arm926) |
70 | */ | 70 | */ |
71 | .align 5 | 71 | .align 5 |
72 | .pushsection .idmap.text, "ax" | ||
72 | ENTRY(cpu_mohawk_reset) | 73 | ENTRY(cpu_mohawk_reset) |
73 | mov ip, #0 | 74 | mov ip, #0 |
74 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 75 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -79,6 +80,8 @@ ENTRY(cpu_mohawk_reset) | |||
79 | bic ip, ip, #0x1100 @ ...i...s........ | 80 | bic ip, ip, #0x1100 @ ...i...s........ |
80 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 81 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
81 | mov pc, r0 | 82 | mov pc, r0 |
83 | ENDPROC(cpu_mohawk_reset) | ||
84 | .popsection | ||
82 | 85 | ||
83 | /* | 86 | /* |
84 | * cpu_mohawk_do_idle() | 87 | * cpu_mohawk_do_idle() |
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S index d50ada26edd6..775d70fba937 100644 --- a/arch/arm/mm/proc-sa110.S +++ b/arch/arm/mm/proc-sa110.S | |||
@@ -62,6 +62,7 @@ ENTRY(cpu_sa110_proc_fin) | |||
62 | * loc: location to jump to for soft reset | 62 | * loc: location to jump to for soft reset |
63 | */ | 63 | */ |
64 | .align 5 | 64 | .align 5 |
65 | .pushsection .idmap.text, "ax" | ||
65 | ENTRY(cpu_sa110_reset) | 66 | ENTRY(cpu_sa110_reset) |
66 | mov ip, #0 | 67 | mov ip, #0 |
67 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 68 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -74,6 +75,8 @@ ENTRY(cpu_sa110_reset) | |||
74 | bic ip, ip, #0x1100 @ ...i...s........ | 75 | bic ip, ip, #0x1100 @ ...i...s........ |
75 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 76 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
76 | mov pc, r0 | 77 | mov pc, r0 |
78 | ENDPROC(cpu_sa110_reset) | ||
79 | .popsection | ||
77 | 80 | ||
78 | /* | 81 | /* |
79 | * cpu_sa110_do_idle(type) | 82 | * cpu_sa110_do_idle(type) |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 7d91545d089b..3aa0da11fd84 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -70,6 +70,7 @@ ENTRY(cpu_sa1100_proc_fin) | |||
70 | * loc: location to jump to for soft reset | 70 | * loc: location to jump to for soft reset |
71 | */ | 71 | */ |
72 | .align 5 | 72 | .align 5 |
73 | .pushsection .idmap.text, "ax" | ||
73 | ENTRY(cpu_sa1100_reset) | 74 | ENTRY(cpu_sa1100_reset) |
74 | mov ip, #0 | 75 | mov ip, #0 |
75 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches | 76 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches |
@@ -82,6 +83,8 @@ ENTRY(cpu_sa1100_reset) | |||
82 | bic ip, ip, #0x1100 @ ...i...s........ | 83 | bic ip, ip, #0x1100 @ ...i...s........ |
83 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register | 84 | mcr p15, 0, ip, c1, c0, 0 @ ctrl register |
84 | mov pc, r0 | 85 | mov pc, r0 |
86 | ENDPROC(cpu_sa1100_reset) | ||
87 | .popsection | ||
85 | 88 | ||
86 | /* | 89 | /* |
87 | * cpu_sa1100_do_idle(type) | 90 | * cpu_sa1100_do_idle(type) |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index d061d2fa5506..5900cd520e84 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -55,6 +55,7 @@ ENTRY(cpu_v6_proc_fin) | |||
55 | * - loc - location to jump to for soft reset | 55 | * - loc - location to jump to for soft reset |
56 | */ | 56 | */ |
57 | .align 5 | 57 | .align 5 |
58 | .pushsection .idmap.text, "ax" | ||
58 | ENTRY(cpu_v6_reset) | 59 | ENTRY(cpu_v6_reset) |
59 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register | 60 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register |
60 | bic r1, r1, #0x1 @ ...............m | 61 | bic r1, r1, #0x1 @ ...............m |
@@ -62,6 +63,8 @@ ENTRY(cpu_v6_reset) | |||
62 | mov r1, #0 | 63 | mov r1, #0 |
63 | mcr p15, 0, r1, c7, c5, 4 @ ISB | 64 | mcr p15, 0, r1, c7, c5, 4 @ ISB |
64 | mov pc, r0 | 65 | mov pc, r0 |
66 | ENDPROC(cpu_v6_reset) | ||
67 | .popsection | ||
65 | 68 | ||
66 | /* | 69 | /* |
67 | * cpu_v6_do_idle() | 70 | * cpu_v6_do_idle() |
diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S new file mode 100644 index 000000000000..3a4b3e7b888c --- /dev/null +++ b/arch/arm/mm/proc-v7-2level.S | |||
@@ -0,0 +1,171 @@ | |||
1 | /* | ||
2 | * arch/arm/mm/proc-v7-2level.S | ||
3 | * | ||
4 | * Copyright (C) 2001 Deep Blue Solutions Ltd. | ||
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 | |||
11 | #define TTB_S (1 << 1) | ||
12 | #define TTB_RGN_NC (0 << 3) | ||
13 | #define TTB_RGN_OC_WBWA (1 << 3) | ||
14 | #define TTB_RGN_OC_WT (2 << 3) | ||
15 | #define TTB_RGN_OC_WB (3 << 3) | ||
16 | #define TTB_NOS (1 << 5) | ||
17 | #define TTB_IRGN_NC ((0 << 0) | (0 << 6)) | ||
18 | #define TTB_IRGN_WBWA ((0 << 0) | (1 << 6)) | ||
19 | #define TTB_IRGN_WT ((1 << 0) | (0 << 6)) | ||
20 | #define TTB_IRGN_WB ((1 << 0) | (1 << 6)) | ||
21 | |||
22 | /* PTWs cacheable, inner WB not shareable, outer WB not shareable */ | ||
23 | #define TTB_FLAGS_UP TTB_IRGN_WB|TTB_RGN_OC_WB | ||
24 | #define PMD_FLAGS_UP PMD_SECT_WB | ||
25 | |||
26 | /* PTWs cacheable, inner WBWA shareable, outer WBWA not shareable */ | ||
27 | #define TTB_FLAGS_SMP TTB_IRGN_WBWA|TTB_S|TTB_NOS|TTB_RGN_OC_WBWA | ||
28 | #define PMD_FLAGS_SMP PMD_SECT_WBWA|PMD_SECT_S | ||
29 | |||
30 | /* | ||
31 | * cpu_v7_switch_mm(pgd_phys, tsk) | ||
32 | * | ||
33 | * Set the translation table base pointer to be pgd_phys | ||
34 | * | ||
35 | * - pgd_phys - physical address of new TTB | ||
36 | * | ||
37 | * It is assumed that: | ||
38 | * - we are not using split page tables | ||
39 | */ | ||
40 | ENTRY(cpu_v7_switch_mm) | ||
41 | #ifdef CONFIG_MMU | ||
42 | mov r2, #0 | ||
43 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id | ||
44 | ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) | ||
45 | ALT_UP(orr r0, r0, #TTB_FLAGS_UP) | ||
46 | #ifdef CONFIG_ARM_ERRATA_430973 | ||
47 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | ||
48 | #endif | ||
49 | #ifdef CONFIG_ARM_ERRATA_754322 | ||
50 | dsb | ||
51 | #endif | ||
52 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | ||
53 | isb | ||
54 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
55 | isb | ||
56 | #ifdef CONFIG_ARM_ERRATA_754322 | ||
57 | dsb | ||
58 | #endif | ||
59 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | ||
60 | isb | ||
61 | #endif | ||
62 | mov pc, lr | ||
63 | ENDPROC(cpu_v7_switch_mm) | ||
64 | |||
65 | /* | ||
66 | * cpu_v7_set_pte_ext(ptep, pte) | ||
67 | * | ||
68 | * Set a level 2 translation table entry. | ||
69 | * | ||
70 | * - ptep - pointer to level 2 translation table entry | ||
71 | * (hardware version is stored at +2048 bytes) | ||
72 | * - pte - PTE value to store | ||
73 | * - ext - value for extended PTE bits | ||
74 | */ | ||
75 | ENTRY(cpu_v7_set_pte_ext) | ||
76 | #ifdef CONFIG_MMU | ||
77 | str r1, [r0] @ linux version | ||
78 | |||
79 | bic r3, r1, #0x000003f0 | ||
80 | bic r3, r3, #PTE_TYPE_MASK | ||
81 | orr r3, r3, r2 | ||
82 | orr r3, r3, #PTE_EXT_AP0 | 2 | ||
83 | |||
84 | tst r1, #1 << 4 | ||
85 | orrne r3, r3, #PTE_EXT_TEX(1) | ||
86 | |||
87 | eor r1, r1, #L_PTE_DIRTY | ||
88 | tst r1, #L_PTE_RDONLY | L_PTE_DIRTY | ||
89 | orrne r3, r3, #PTE_EXT_APX | ||
90 | |||
91 | tst r1, #L_PTE_USER | ||
92 | orrne r3, r3, #PTE_EXT_AP1 | ||
93 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
94 | @ allow kernel read/write access to read-only user pages | ||
95 | tstne r3, #PTE_EXT_APX | ||
96 | bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 | ||
97 | #endif | ||
98 | |||
99 | tst r1, #L_PTE_XN | ||
100 | orrne r3, r3, #PTE_EXT_XN | ||
101 | |||
102 | tst r1, #L_PTE_YOUNG | ||
103 | tstne r1, #L_PTE_PRESENT | ||
104 | moveq r3, #0 | ||
105 | |||
106 | ARM( str r3, [r0, #2048]! ) | ||
107 | THUMB( add r0, r0, #2048 ) | ||
108 | THUMB( str r3, [r0] ) | ||
109 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte | ||
110 | #endif | ||
111 | mov pc, lr | ||
112 | ENDPROC(cpu_v7_set_pte_ext) | ||
113 | |||
114 | /* | ||
115 | * Memory region attributes with SCTLR.TRE=1 | ||
116 | * | ||
117 | * n = TEX[0],C,B | ||
118 | * TR = PRRR[2n+1:2n] - memory type | ||
119 | * IR = NMRR[2n+1:2n] - inner cacheable property | ||
120 | * OR = NMRR[2n+17:2n+16] - outer cacheable property | ||
121 | * | ||
122 | * n TR IR OR | ||
123 | * UNCACHED 000 00 | ||
124 | * BUFFERABLE 001 10 00 00 | ||
125 | * WRITETHROUGH 010 10 10 10 | ||
126 | * WRITEBACK 011 10 11 11 | ||
127 | * reserved 110 | ||
128 | * WRITEALLOC 111 10 01 01 | ||
129 | * DEV_SHARED 100 01 | ||
130 | * DEV_NONSHARED 100 01 | ||
131 | * DEV_WC 001 10 | ||
132 | * DEV_CACHED 011 10 | ||
133 | * | ||
134 | * Other attributes: | ||
135 | * | ||
136 | * DS0 = PRRR[16] = 0 - device shareable property | ||
137 | * DS1 = PRRR[17] = 1 - device shareable property | ||
138 | * NS0 = PRRR[18] = 0 - normal shareable property | ||
139 | * NS1 = PRRR[19] = 1 - normal shareable property | ||
140 | * NOS = PRRR[24+n] = 1 - not outer shareable | ||
141 | */ | ||
142 | .equ PRRR, 0xff0a81a8 | ||
143 | .equ NMRR, 0x40e040e0 | ||
144 | |||
145 | /* | ||
146 | * Macro for setting up the TTBRx and TTBCR registers. | ||
147 | * - \ttb0 and \ttb1 updated with the corresponding flags. | ||
148 | */ | ||
149 | .macro v7_ttb_setup, zero, ttbr0, ttbr1, tmp | ||
150 | mcr p15, 0, \zero, c2, c0, 2 @ TTB control register | ||
151 | ALT_SMP(orr \ttbr0, \ttbr0, #TTB_FLAGS_SMP) | ||
152 | ALT_UP(orr \ttbr0, \ttbr0, #TTB_FLAGS_UP) | ||
153 | ALT_SMP(orr \ttbr1, \ttbr1, #TTB_FLAGS_SMP) | ||
154 | ALT_UP(orr \ttbr1, \ttbr1, #TTB_FLAGS_UP) | ||
155 | mcr p15, 0, \ttbr1, c2, c0, 1 @ load TTB1 | ||
156 | .endm | ||
157 | |||
158 | __CPUINIT | ||
159 | |||
160 | /* AT | ||
161 | * TFR EV X F I D LR S | ||
162 | * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM | ||
163 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced | ||
164 | * 1 0 110 0011 1100 .111 1101 < we want | ||
165 | */ | ||
166 | .align 2 | ||
167 | .type v7_crval, #object | ||
168 | v7_crval: | ||
169 | crval clear=0x0120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c | ||
170 | |||
171 | .previous | ||
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S new file mode 100644 index 000000000000..8de0f1dd1549 --- /dev/null +++ b/arch/arm/mm/proc-v7-3level.S | |||
@@ -0,0 +1,150 @@ | |||
1 | /* | ||
2 | * arch/arm/mm/proc-v7-3level.S | ||
3 | * | ||
4 | * Copyright (C) 2001 Deep Blue Solutions Ltd. | ||
5 | * Copyright (C) 2011 ARM Ltd. | ||
6 | * Author: Catalin Marinas <catalin.marinas@arm.com> | ||
7 | * based on arch/arm/mm/proc-v7-2level.S | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #define TTB_IRGN_NC (0 << 8) | ||
24 | #define TTB_IRGN_WBWA (1 << 8) | ||
25 | #define TTB_IRGN_WT (2 << 8) | ||
26 | #define TTB_IRGN_WB (3 << 8) | ||
27 | #define TTB_RGN_NC (0 << 10) | ||
28 | #define TTB_RGN_OC_WBWA (1 << 10) | ||
29 | #define TTB_RGN_OC_WT (2 << 10) | ||
30 | #define TTB_RGN_OC_WB (3 << 10) | ||
31 | #define TTB_S (3 << 12) | ||
32 | #define TTB_EAE (1 << 31) | ||
33 | |||
34 | /* PTWs cacheable, inner WB not shareable, outer WB not shareable */ | ||
35 | #define TTB_FLAGS_UP (TTB_IRGN_WB|TTB_RGN_OC_WB) | ||
36 | #define PMD_FLAGS_UP (PMD_SECT_WB) | ||
37 | |||
38 | /* PTWs cacheable, inner WBWA shareable, outer WBWA not shareable */ | ||
39 | #define TTB_FLAGS_SMP (TTB_IRGN_WBWA|TTB_S|TTB_RGN_OC_WBWA) | ||
40 | #define PMD_FLAGS_SMP (PMD_SECT_WBWA|PMD_SECT_S) | ||
41 | |||
42 | /* | ||
43 | * cpu_v7_switch_mm(pgd_phys, tsk) | ||
44 | * | ||
45 | * Set the translation table base pointer to be pgd_phys (physical address of | ||
46 | * the new TTB). | ||
47 | */ | ||
48 | ENTRY(cpu_v7_switch_mm) | ||
49 | #ifdef CONFIG_MMU | ||
50 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id | ||
51 | and r3, r1, #0xff | ||
52 | mov r3, r3, lsl #(48 - 32) @ ASID | ||
53 | mcrr p15, 0, r0, r3, c2 @ set TTB 0 | ||
54 | isb | ||
55 | #endif | ||
56 | mov pc, lr | ||
57 | ENDPROC(cpu_v7_switch_mm) | ||
58 | |||
59 | /* | ||
60 | * cpu_v7_set_pte_ext(ptep, pte) | ||
61 | * | ||
62 | * Set a level 2 translation table entry. | ||
63 | * - ptep - pointer to level 3 translation table entry | ||
64 | * - pte - PTE value to store (64-bit in r2 and r3) | ||
65 | */ | ||
66 | ENTRY(cpu_v7_set_pte_ext) | ||
67 | #ifdef CONFIG_MMU | ||
68 | tst r2, #L_PTE_PRESENT | ||
69 | beq 1f | ||
70 | tst r3, #1 << (55 - 32) @ L_PTE_DIRTY | ||
71 | orreq r2, #L_PTE_RDONLY | ||
72 | 1: strd r2, r3, [r0] | ||
73 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte | ||
74 | #endif | ||
75 | mov pc, lr | ||
76 | ENDPROC(cpu_v7_set_pte_ext) | ||
77 | |||
78 | /* | ||
79 | * Memory region attributes for LPAE (defined in pgtable-3level.h): | ||
80 | * | ||
81 | * n = AttrIndx[2:0] | ||
82 | * | ||
83 | * n MAIR | ||
84 | * UNCACHED 000 00000000 | ||
85 | * BUFFERABLE 001 01000100 | ||
86 | * DEV_WC 001 01000100 | ||
87 | * WRITETHROUGH 010 10101010 | ||
88 | * WRITEBACK 011 11101110 | ||
89 | * DEV_CACHED 011 11101110 | ||
90 | * DEV_SHARED 100 00000100 | ||
91 | * DEV_NONSHARED 100 00000100 | ||
92 | * unused 101 | ||
93 | * unused 110 | ||
94 | * WRITEALLOC 111 11111111 | ||
95 | */ | ||
96 | .equ PRRR, 0xeeaa4400 @ MAIR0 | ||
97 | .equ NMRR, 0xff000004 @ MAIR1 | ||
98 | |||
99 | /* | ||
100 | * Macro for setting up the TTBRx and TTBCR registers. | ||
101 | * - \ttbr1 updated. | ||
102 | */ | ||
103 | .macro v7_ttb_setup, zero, ttbr0, ttbr1, tmp | ||
104 | ldr \tmp, =swapper_pg_dir @ swapper_pg_dir virtual address | ||
105 | cmp \ttbr1, \tmp @ PHYS_OFFSET > PAGE_OFFSET? (branch below) | ||
106 | mrc p15, 0, \tmp, c2, c0, 2 @ TTB control register | ||
107 | orr \tmp, \tmp, #TTB_EAE | ||
108 | ALT_SMP(orr \tmp, \tmp, #TTB_FLAGS_SMP) | ||
109 | ALT_UP(orr \tmp, \tmp, #TTB_FLAGS_UP) | ||
110 | ALT_SMP(orr \tmp, \tmp, #TTB_FLAGS_SMP << 16) | ||
111 | ALT_UP(orr \tmp, \tmp, #TTB_FLAGS_UP << 16) | ||
112 | /* | ||
113 | * TTBR0/TTBR1 split (PAGE_OFFSET): | ||
114 | * 0x40000000: T0SZ = 2, T1SZ = 0 (not used) | ||
115 | * 0x80000000: T0SZ = 0, T1SZ = 1 | ||
116 | * 0xc0000000: T0SZ = 0, T1SZ = 2 | ||
117 | * | ||
118 | * Only use this feature if PHYS_OFFSET <= PAGE_OFFSET, otherwise | ||
119 | * booting secondary CPUs would end up using TTBR1 for the identity | ||
120 | * mapping set up in TTBR0. | ||
121 | */ | ||
122 | bhi 9001f @ PHYS_OFFSET > PAGE_OFFSET? | ||
123 | orr \tmp, \tmp, #(((PAGE_OFFSET >> 30) - 1) << 16) @ TTBCR.T1SZ | ||
124 | #if defined CONFIG_VMSPLIT_2G | ||
125 | /* PAGE_OFFSET == 0x80000000, T1SZ == 1 */ | ||
126 | add \ttbr1, \ttbr1, #1 << 4 @ skip two L1 entries | ||
127 | #elif defined CONFIG_VMSPLIT_3G | ||
128 | /* PAGE_OFFSET == 0xc0000000, T1SZ == 2 */ | ||
129 | add \ttbr1, \ttbr1, #4096 * (1 + 3) @ only L2 used, skip pgd+3*pmd | ||
130 | #endif | ||
131 | /* CONFIG_VMSPLIT_1G does not need TTBR1 adjustment */ | ||
132 | 9001: mcr p15, 0, \tmp, c2, c0, 2 @ TTB control register | ||
133 | mcrr p15, 1, \ttbr1, \zero, c2 @ load TTBR1 | ||
134 | .endm | ||
135 | |||
136 | __CPUINIT | ||
137 | |||
138 | /* | ||
139 | * AT | ||
140 | * TFR EV X F IHD LR S | ||
141 | * .EEE ..EE PUI. .TAT 4RVI ZWRS BLDP WCAM | ||
142 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced | ||
143 | * 11 0 110 1 0011 1100 .111 1101 < we want | ||
144 | */ | ||
145 | .align 2 | ||
146 | .type v7_crval, #object | ||
147 | v7_crval: | ||
148 | crval clear=0x0120c302, mmuset=0x30c23c7d, ucset=0x00c01c7c | ||
149 | |||
150 | .previous | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 2c559ac38142..7e9b5bf910c1 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -19,24 +19,11 @@ | |||
19 | 19 | ||
20 | #include "proc-macros.S" | 20 | #include "proc-macros.S" |
21 | 21 | ||
22 | #define TTB_S (1 << 1) | 22 | #ifdef CONFIG_ARM_LPAE |
23 | #define TTB_RGN_NC (0 << 3) | 23 | #include "proc-v7-3level.S" |
24 | #define TTB_RGN_OC_WBWA (1 << 3) | 24 | #else |
25 | #define TTB_RGN_OC_WT (2 << 3) | 25 | #include "proc-v7-2level.S" |
26 | #define TTB_RGN_OC_WB (3 << 3) | 26 | #endif |
27 | #define TTB_NOS (1 << 5) | ||
28 | #define TTB_IRGN_NC ((0 << 0) | (0 << 6)) | ||
29 | #define TTB_IRGN_WBWA ((0 << 0) | (1 << 6)) | ||
30 | #define TTB_IRGN_WT ((1 << 0) | (0 << 6)) | ||
31 | #define TTB_IRGN_WB ((1 << 0) | (1 << 6)) | ||
32 | |||
33 | /* PTWs cacheable, inner WB not shareable, outer WB not shareable */ | ||
34 | #define TTB_FLAGS_UP TTB_IRGN_WB|TTB_RGN_OC_WB | ||
35 | #define PMD_FLAGS_UP PMD_SECT_WB | ||
36 | |||
37 | /* PTWs cacheable, inner WBWA shareable, outer WBWA not shareable */ | ||
38 | #define TTB_FLAGS_SMP TTB_IRGN_WBWA|TTB_S|TTB_NOS|TTB_RGN_OC_WBWA | ||
39 | #define PMD_FLAGS_SMP PMD_SECT_WBWA|PMD_SECT_S | ||
40 | 27 | ||
41 | ENTRY(cpu_v7_proc_init) | 28 | ENTRY(cpu_v7_proc_init) |
42 | mov pc, lr | 29 | mov pc, lr |
@@ -63,6 +50,7 @@ ENDPROC(cpu_v7_proc_fin) | |||
63 | * caches disabled. | 50 | * caches disabled. |
64 | */ | 51 | */ |
65 | .align 5 | 52 | .align 5 |
53 | .pushsection .idmap.text, "ax" | ||
66 | ENTRY(cpu_v7_reset) | 54 | ENTRY(cpu_v7_reset) |
67 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register | 55 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register |
68 | bic r1, r1, #0x1 @ ...............m | 56 | bic r1, r1, #0x1 @ ...............m |
@@ -71,6 +59,7 @@ ENTRY(cpu_v7_reset) | |||
71 | isb | 59 | isb |
72 | mov pc, r0 | 60 | mov pc, r0 |
73 | ENDPROC(cpu_v7_reset) | 61 | ENDPROC(cpu_v7_reset) |
62 | .popsection | ||
74 | 63 | ||
75 | /* | 64 | /* |
76 | * cpu_v7_do_idle() | 65 | * cpu_v7_do_idle() |
@@ -97,127 +86,12 @@ ENTRY(cpu_v7_dcache_clean_area) | |||
97 | mov pc, lr | 86 | mov pc, lr |
98 | ENDPROC(cpu_v7_dcache_clean_area) | 87 | ENDPROC(cpu_v7_dcache_clean_area) |
99 | 88 | ||
100 | /* | ||
101 | * cpu_v7_switch_mm(pgd_phys, tsk) | ||
102 | * | ||
103 | * Set the translation table base pointer to be pgd_phys | ||
104 | * | ||
105 | * - pgd_phys - physical address of new TTB | ||
106 | * | ||
107 | * It is assumed that: | ||
108 | * - we are not using split page tables | ||
109 | */ | ||
110 | ENTRY(cpu_v7_switch_mm) | ||
111 | #ifdef CONFIG_MMU | ||
112 | mov r2, #0 | ||
113 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id | ||
114 | ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) | ||
115 | ALT_UP(orr r0, r0, #TTB_FLAGS_UP) | ||
116 | #ifdef CONFIG_ARM_ERRATA_430973 | ||
117 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | ||
118 | #endif | ||
119 | #ifdef CONFIG_ARM_ERRATA_754322 | ||
120 | dsb | ||
121 | #endif | ||
122 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | ||
123 | isb | ||
124 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
125 | isb | ||
126 | #ifdef CONFIG_ARM_ERRATA_754322 | ||
127 | dsb | ||
128 | #endif | ||
129 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | ||
130 | isb | ||
131 | #endif | ||
132 | mov pc, lr | ||
133 | ENDPROC(cpu_v7_switch_mm) | ||
134 | |||
135 | /* | ||
136 | * cpu_v7_set_pte_ext(ptep, pte) | ||
137 | * | ||
138 | * Set a level 2 translation table entry. | ||
139 | * | ||
140 | * - ptep - pointer to level 2 translation table entry | ||
141 | * (hardware version is stored at +2048 bytes) | ||
142 | * - pte - PTE value to store | ||
143 | * - ext - value for extended PTE bits | ||
144 | */ | ||
145 | ENTRY(cpu_v7_set_pte_ext) | ||
146 | #ifdef CONFIG_MMU | ||
147 | str r1, [r0] @ linux version | ||
148 | |||
149 | bic r3, r1, #0x000003f0 | ||
150 | bic r3, r3, #PTE_TYPE_MASK | ||
151 | orr r3, r3, r2 | ||
152 | orr r3, r3, #PTE_EXT_AP0 | 2 | ||
153 | |||
154 | tst r1, #1 << 4 | ||
155 | orrne r3, r3, #PTE_EXT_TEX(1) | ||
156 | |||
157 | eor r1, r1, #L_PTE_DIRTY | ||
158 | tst r1, #L_PTE_RDONLY | L_PTE_DIRTY | ||
159 | orrne r3, r3, #PTE_EXT_APX | ||
160 | |||
161 | tst r1, #L_PTE_USER | ||
162 | orrne r3, r3, #PTE_EXT_AP1 | ||
163 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
164 | @ allow kernel read/write access to read-only user pages | ||
165 | tstne r3, #PTE_EXT_APX | ||
166 | bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 | ||
167 | #endif | ||
168 | |||
169 | tst r1, #L_PTE_XN | ||
170 | orrne r3, r3, #PTE_EXT_XN | ||
171 | |||
172 | tst r1, #L_PTE_YOUNG | ||
173 | tstne r1, #L_PTE_PRESENT | ||
174 | moveq r3, #0 | ||
175 | |||
176 | ARM( str r3, [r0, #2048]! ) | ||
177 | THUMB( add r0, r0, #2048 ) | ||
178 | THUMB( str r3, [r0] ) | ||
179 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte | ||
180 | #endif | ||
181 | mov pc, lr | ||
182 | ENDPROC(cpu_v7_set_pte_ext) | ||
183 | |||
184 | string cpu_v7_name, "ARMv7 Processor" | 89 | string cpu_v7_name, "ARMv7 Processor" |
185 | .align | 90 | .align |
186 | 91 | ||
187 | /* | ||
188 | * Memory region attributes with SCTLR.TRE=1 | ||
189 | * | ||
190 | * n = TEX[0],C,B | ||
191 | * TR = PRRR[2n+1:2n] - memory type | ||
192 | * IR = NMRR[2n+1:2n] - inner cacheable property | ||
193 | * OR = NMRR[2n+17:2n+16] - outer cacheable property | ||
194 | * | ||
195 | * n TR IR OR | ||
196 | * UNCACHED 000 00 | ||
197 | * BUFFERABLE 001 10 00 00 | ||
198 | * WRITETHROUGH 010 10 10 10 | ||
199 | * WRITEBACK 011 10 11 11 | ||
200 | * reserved 110 | ||
201 | * WRITEALLOC 111 10 01 01 | ||
202 | * DEV_SHARED 100 01 | ||
203 | * DEV_NONSHARED 100 01 | ||
204 | * DEV_WC 001 10 | ||
205 | * DEV_CACHED 011 10 | ||
206 | * | ||
207 | * Other attributes: | ||
208 | * | ||
209 | * DS0 = PRRR[16] = 0 - device shareable property | ||
210 | * DS1 = PRRR[17] = 1 - device shareable property | ||
211 | * NS0 = PRRR[18] = 0 - normal shareable property | ||
212 | * NS1 = PRRR[19] = 1 - normal shareable property | ||
213 | * NOS = PRRR[24+n] = 1 - not outer shareable | ||
214 | */ | ||
215 | .equ PRRR, 0xff0a81a8 | ||
216 | .equ NMRR, 0x40e040e0 | ||
217 | |||
218 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | 92 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ |
219 | .globl cpu_v7_suspend_size | 93 | .globl cpu_v7_suspend_size |
220 | .equ cpu_v7_suspend_size, 4 * 7 | 94 | .equ cpu_v7_suspend_size, 4 * 8 |
221 | #ifdef CONFIG_ARM_CPU_SUSPEND | 95 | #ifdef CONFIG_ARM_CPU_SUSPEND |
222 | ENTRY(cpu_v7_do_suspend) | 96 | ENTRY(cpu_v7_do_suspend) |
223 | stmfd sp!, {r4 - r10, lr} | 97 | stmfd sp!, {r4 - r10, lr} |
@@ -226,10 +100,11 @@ ENTRY(cpu_v7_do_suspend) | |||
226 | stmia r0!, {r4 - r5} | 100 | stmia r0!, {r4 - r5} |
227 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID | 101 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID |
228 | mrc p15, 0, r7, c2, c0, 1 @ TTB 1 | 102 | mrc p15, 0, r7, c2, c0, 1 @ TTB 1 |
103 | mrc p15, 0, r11, c2, c0, 2 @ TTB control register | ||
229 | mrc p15, 0, r8, c1, c0, 0 @ Control register | 104 | mrc p15, 0, r8, c1, c0, 0 @ Control register |
230 | mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register | 105 | mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register |
231 | mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control | 106 | mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control |
232 | stmia r0, {r6 - r10} | 107 | stmia r0, {r6 - r11} |
233 | ldmfd sp!, {r4 - r10, pc} | 108 | ldmfd sp!, {r4 - r10, pc} |
234 | ENDPROC(cpu_v7_do_suspend) | 109 | ENDPROC(cpu_v7_do_suspend) |
235 | 110 | ||
@@ -241,13 +116,15 @@ ENTRY(cpu_v7_do_resume) | |||
241 | ldmia r0!, {r4 - r5} | 116 | ldmia r0!, {r4 - r5} |
242 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID | 117 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID |
243 | mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID | 118 | mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID |
244 | ldmia r0, {r6 - r10} | 119 | ldmia r0, {r6 - r11} |
245 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID | 120 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID |
121 | #ifndef CONFIG_ARM_LPAE | ||
246 | ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) | 122 | ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) |
247 | ALT_UP(orr r1, r1, #TTB_FLAGS_UP) | 123 | ALT_UP(orr r1, r1, #TTB_FLAGS_UP) |
124 | #endif | ||
248 | mcr p15, 0, r1, c2, c0, 0 @ TTB 0 | 125 | mcr p15, 0, r1, c2, c0, 0 @ TTB 0 |
249 | mcr p15, 0, r7, c2, c0, 1 @ TTB 1 | 126 | mcr p15, 0, r7, c2, c0, 1 @ TTB 1 |
250 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 127 | mcr p15, 0, r11, c2, c0, 2 @ TTB control register |
251 | mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register | 128 | mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register |
252 | teq r4, r9 @ Is it already set? | 129 | teq r4, r9 @ Is it already set? |
253 | mcrne p15, 0, r9, c1, c0, 1 @ No, so write it | 130 | mcrne p15, 0, r9, c1, c0, 1 @ No, so write it |
@@ -284,6 +161,7 @@ __v7_ca5mp_setup: | |||
284 | __v7_ca9mp_setup: | 161 | __v7_ca9mp_setup: |
285 | mov r10, #(1 << 0) @ TLB ops broadcasting | 162 | mov r10, #(1 << 0) @ TLB ops broadcasting |
286 | b 1f | 163 | b 1f |
164 | __v7_ca7mp_setup: | ||
287 | __v7_ca15mp_setup: | 165 | __v7_ca15mp_setup: |
288 | mov r10, #0 | 166 | mov r10, #0 |
289 | 1: | 167 | 1: |
@@ -363,11 +241,13 @@ __v7_setup: | |||
363 | orreq r10, r10, #1 << 6 @ set bit #6 | 241 | orreq r10, r10, #1 << 6 @ set bit #6 |
364 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register | 242 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register |
365 | #endif | 243 | #endif |
366 | #ifdef CONFIG_ARM_ERRATA_751472 | 244 | #if defined(CONFIG_ARM_ERRATA_751472) && defined(CONFIG_SMP) |
367 | cmp r6, #0x30 @ present prior to r3p0 | 245 | ALT_SMP(cmp r6, #0x30) @ present prior to r3p0 |
246 | ALT_UP_B(1f) | ||
368 | mrclt p15, 0, r10, c15, c0, 1 @ read diagnostic register | 247 | mrclt p15, 0, r10, c15, c0, 1 @ read diagnostic register |
369 | orrlt r10, r10, #1 << 11 @ set bit #11 | 248 | orrlt r10, r10, #1 << 11 @ set bit #11 |
370 | mcrlt p15, 0, r10, c15, c0, 1 @ write diagnostic register | 249 | mcrlt p15, 0, r10, c15, c0, 1 @ write diagnostic register |
250 | 1: | ||
371 | #endif | 251 | #endif |
372 | 252 | ||
373 | 3: mov r10, #0 | 253 | 3: mov r10, #0 |
@@ -377,12 +257,7 @@ __v7_setup: | |||
377 | dsb | 257 | dsb |
378 | #ifdef CONFIG_MMU | 258 | #ifdef CONFIG_MMU |
379 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs | 259 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs |
380 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register | 260 | v7_ttb_setup r10, r4, r8, r5 @ TTBCR, TTBRx setup |
381 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) | ||
382 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) | ||
383 | ALT_SMP(orr r8, r8, #TTB_FLAGS_SMP) | ||
384 | ALT_UP(orr r8, r8, #TTB_FLAGS_UP) | ||
385 | mcr p15, 0, r8, c2, c0, 1 @ load TTB1 | ||
386 | ldr r5, =PRRR @ PRRR | 261 | ldr r5, =PRRR @ PRRR |
387 | ldr r6, =NMRR @ NMRR | 262 | ldr r6, =NMRR @ NMRR |
388 | mcr p15, 0, r5, c10, c2, 0 @ write PRRR | 263 | mcr p15, 0, r5, c10, c2, 0 @ write PRRR |
@@ -404,16 +279,7 @@ __v7_setup: | |||
404 | mov pc, lr @ return to head.S:__ret | 279 | mov pc, lr @ return to head.S:__ret |
405 | ENDPROC(__v7_setup) | 280 | ENDPROC(__v7_setup) |
406 | 281 | ||
407 | /* AT | 282 | .align 2 |
408 | * TFR EV X F I D LR S | ||
409 | * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM | ||
410 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced | ||
411 | * 1 0 110 0011 1100 .111 1101 < we want | ||
412 | */ | ||
413 | .type v7_crval, #object | ||
414 | v7_crval: | ||
415 | crval clear=0x0120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c | ||
416 | |||
417 | __v7_setup_stack: | 283 | __v7_setup_stack: |
418 | .space 4 * 11 @ 11 registers | 284 | .space 4 * 11 @ 11 registers |
419 | 285 | ||
@@ -435,11 +301,11 @@ __v7_setup_stack: | |||
435 | */ | 301 | */ |
436 | .macro __v7_proc initfunc, mm_mmuflags = 0, io_mmuflags = 0, hwcaps = 0 | 302 | .macro __v7_proc initfunc, mm_mmuflags = 0, io_mmuflags = 0, hwcaps = 0 |
437 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ | 303 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ |
438 | PMD_FLAGS_SMP | \mm_mmuflags) | 304 | PMD_SECT_AF | PMD_FLAGS_SMP | \mm_mmuflags) |
439 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ | 305 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ |
440 | PMD_FLAGS_UP | \mm_mmuflags) | 306 | PMD_SECT_AF | PMD_FLAGS_UP | \mm_mmuflags) |
441 | .long PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_AP_WRITE | \ | 307 | .long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | \ |
442 | PMD_SECT_AP_READ | \io_mmuflags | 308 | PMD_SECT_AP_READ | PMD_SECT_AF | \io_mmuflags |
443 | W(b) \initfunc | 309 | W(b) \initfunc |
444 | .long cpu_arch_name | 310 | .long cpu_arch_name |
445 | .long cpu_elf_name | 311 | .long cpu_elf_name |
@@ -452,6 +318,7 @@ __v7_setup_stack: | |||
452 | .long v7_cache_fns | 318 | .long v7_cache_fns |
453 | .endm | 319 | .endm |
454 | 320 | ||
321 | #ifndef CONFIG_ARM_LPAE | ||
455 | /* | 322 | /* |
456 | * ARM Ltd. Cortex A5 processor. | 323 | * ARM Ltd. Cortex A5 processor. |
457 | */ | 324 | */ |
@@ -463,6 +330,16 @@ __v7_ca5mp_proc_info: | |||
463 | .size __v7_ca5mp_proc_info, . - __v7_ca5mp_proc_info | 330 | .size __v7_ca5mp_proc_info, . - __v7_ca5mp_proc_info |
464 | 331 | ||
465 | /* | 332 | /* |
333 | * ARM Ltd. Cortex A7 processor. | ||
334 | */ | ||
335 | .type __v7_ca7mp_proc_info, #object | ||
336 | __v7_ca7mp_proc_info: | ||
337 | .long 0x410fc070 | ||
338 | .long 0xff0ffff0 | ||
339 | __v7_proc __v7_ca7mp_setup, hwcaps = HWCAP_IDIV | ||
340 | .size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info | ||
341 | |||
342 | /* | ||
466 | * ARM Ltd. Cortex A9 processor. | 343 | * ARM Ltd. Cortex A9 processor. |
467 | */ | 344 | */ |
468 | .type __v7_ca9mp_proc_info, #object | 345 | .type __v7_ca9mp_proc_info, #object |
@@ -471,6 +348,7 @@ __v7_ca9mp_proc_info: | |||
471 | .long 0xff0ffff0 | 348 | .long 0xff0ffff0 |
472 | __v7_proc __v7_ca9mp_setup | 349 | __v7_proc __v7_ca9mp_setup |
473 | .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info | 350 | .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info |
351 | #endif /* CONFIG_ARM_LPAE */ | ||
474 | 352 | ||
475 | /* | 353 | /* |
476 | * ARM Ltd. Cortex A15 processor. | 354 | * ARM Ltd. Cortex A15 processor. |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index abf0507a08ae..b0d57869da2d 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -105,6 +105,7 @@ ENTRY(cpu_xsc3_proc_fin) | |||
105 | * loc: location to jump to for soft reset | 105 | * loc: location to jump to for soft reset |
106 | */ | 106 | */ |
107 | .align 5 | 107 | .align 5 |
108 | .pushsection .idmap.text, "ax" | ||
108 | ENTRY(cpu_xsc3_reset) | 109 | ENTRY(cpu_xsc3_reset) |
109 | mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE | 110 | mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE |
110 | msr cpsr_c, r1 @ reset CPSR | 111 | msr cpsr_c, r1 @ reset CPSR |
@@ -119,6 +120,8 @@ ENTRY(cpu_xsc3_reset) | |||
119 | @ already containing those two last instructions to survive. | 120 | @ already containing those two last instructions to survive. |
120 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs | 121 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs |
121 | mov pc, r0 | 122 | mov pc, r0 |
123 | ENDPROC(cpu_xsc3_reset) | ||
124 | .popsection | ||
122 | 125 | ||
123 | /* | 126 | /* |
124 | * cpu_xsc3_do_idle() | 127 | * cpu_xsc3_do_idle() |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 3277904bebaf..4ffebaa595ee 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -142,6 +142,7 @@ ENTRY(cpu_xscale_proc_fin) | |||
142 | * Beware PXA270 erratum E7. | 142 | * Beware PXA270 erratum E7. |
143 | */ | 143 | */ |
144 | .align 5 | 144 | .align 5 |
145 | .pushsection .idmap.text, "ax" | ||
145 | ENTRY(cpu_xscale_reset) | 146 | ENTRY(cpu_xscale_reset) |
146 | mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE | 147 | mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE |
147 | msr cpsr_c, r1 @ reset CPSR | 148 | msr cpsr_c, r1 @ reset CPSR |
@@ -160,6 +161,8 @@ ENTRY(cpu_xscale_reset) | |||
160 | @ already containing those two last instructions to survive. | 161 | @ already containing those two last instructions to survive. |
161 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs | 162 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs |
162 | mov pc, r0 | 163 | mov pc, r0 |
164 | ENDPROC(cpu_xscale_reset) | ||
165 | .popsection | ||
163 | 166 | ||
164 | /* | 167 | /* |
165 | * cpu_xscale_do_idle() | 168 | * cpu_xscale_do_idle() |
diff --git a/arch/arm/nwfpe/entry.S b/arch/arm/nwfpe/entry.S index cafa18354339..d18dde95b8aa 100644 --- a/arch/arm/nwfpe/entry.S +++ b/arch/arm/nwfpe/entry.S | |||
@@ -20,6 +20,8 @@ | |||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <asm/opcodes.h> | ||
24 | |||
23 | /* This is the kernel's entry point into the floating point emulator. | 25 | /* This is the kernel's entry point into the floating point emulator. |
24 | It is called from the kernel with code similar to this: | 26 | It is called from the kernel with code similar to this: |
25 | 27 | ||
@@ -81,11 +83,11 @@ nwfpe_enter: | |||
81 | mov r6, r0 @ save the opcode | 83 | mov r6, r0 @ save the opcode |
82 | emulate: | 84 | emulate: |
83 | ldr r1, [sp, #S_PSR] @ fetch the PSR | 85 | ldr r1, [sp, #S_PSR] @ fetch the PSR |
84 | bl checkCondition @ check the condition | 86 | bl arm_check_condition @ check the condition |
85 | cmp r0, #0 @ r0 = 0 ==> condition failed | 87 | cmp r0, #ARM_OPCODE_CONDTEST_PASS @ condition passed? |
86 | 88 | ||
87 | @ if condition code failed to match, next insn | 89 | @ if condition code failed to match, next insn |
88 | beq next @ get the next instruction; | 90 | bne next @ get the next instruction; |
89 | 91 | ||
90 | mov r0, r6 @ prepare for EmulateAll() | 92 | mov r0, r6 @ prepare for EmulateAll() |
91 | bl EmulateAll @ emulate the instruction | 93 | bl EmulateAll @ emulate the instruction |
diff --git a/arch/arm/nwfpe/fpopcode.c b/arch/arm/nwfpe/fpopcode.c index 922b81107585..ff9834673085 100644 --- a/arch/arm/nwfpe/fpopcode.c +++ b/arch/arm/nwfpe/fpopcode.c | |||
@@ -61,29 +61,3 @@ const float32 float32Constant[] = { | |||
61 | 0x41200000 /* single 10.0 */ | 61 | 0x41200000 /* single 10.0 */ |
62 | }; | 62 | }; |
63 | 63 | ||
64 | /* condition code lookup table | ||
65 | index into the table is test code: EQ, NE, ... LT, GT, AL, NV | ||
66 | bit position in short is condition code: NZCV */ | ||
67 | static const unsigned short aCC[16] = { | ||
68 | 0xF0F0, // EQ == Z set | ||
69 | 0x0F0F, // NE | ||
70 | 0xCCCC, // CS == C set | ||
71 | 0x3333, // CC | ||
72 | 0xFF00, // MI == N set | ||
73 | 0x00FF, // PL | ||
74 | 0xAAAA, // VS == V set | ||
75 | 0x5555, // VC | ||
76 | 0x0C0C, // HI == C set && Z clear | ||
77 | 0xF3F3, // LS == C clear || Z set | ||
78 | 0xAA55, // GE == (N==V) | ||
79 | 0x55AA, // LT == (N!=V) | ||
80 | 0x0A05, // GT == (!Z && (N==V)) | ||
81 | 0xF5FA, // LE == (Z || (N!=V)) | ||
82 | 0xFFFF, // AL always | ||
83 | 0 // NV | ||
84 | }; | ||
85 | |||
86 | unsigned int checkCondition(const unsigned int opcode, const unsigned int ccodes) | ||
87 | { | ||
88 | return (aCC[opcode >> 28] >> (ccodes >> 28)) & 1; | ||
89 | } | ||
diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h index 786e4c96156d..78f02dbfaa8f 100644 --- a/arch/arm/nwfpe/fpopcode.h +++ b/arch/arm/nwfpe/fpopcode.h | |||
@@ -475,9 +475,6 @@ static inline unsigned int getDestinationSize(const unsigned int opcode) | |||
475 | return (nRc); | 475 | return (nRc); |
476 | } | 476 | } |
477 | 477 | ||
478 | extern unsigned int checkCondition(const unsigned int opcode, | ||
479 | const unsigned int ccodes); | ||
480 | |||
481 | extern const float64 float64Constant[]; | 478 | extern const float64 float64Constant[]; |
482 | extern const float32 float32Constant[]; | 479 | extern const float32 float32Constant[]; |
483 | 480 | ||
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index c074e66ad224..4e0a371630b3 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
@@ -116,7 +116,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
116 | return oprofile_perf_init(ops); | 116 | return oprofile_perf_init(ops); |
117 | } | 117 | } |
118 | 118 | ||
119 | void __exit oprofile_arch_exit(void) | 119 | void oprofile_arch_exit(void) |
120 | { | 120 | { |
121 | oprofile_perf_exit(); | 121 | oprofile_perf_exit(); |
122 | } | 122 | } |
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile index f5aebfec4f2a..a99dc15a70f7 100644 --- a/arch/arm/plat-iop/Makefile +++ b/arch/arm/plat-iop/Makefile | |||
@@ -10,7 +10,6 @@ obj-$(CONFIG_ARCH_IOP32X) += i2c.o | |||
10 | obj-$(CONFIG_ARCH_IOP32X) += pci.o | 10 | obj-$(CONFIG_ARCH_IOP32X) += pci.o |
11 | obj-$(CONFIG_ARCH_IOP32X) += setup.o | 11 | obj-$(CONFIG_ARCH_IOP32X) += setup.o |
12 | obj-$(CONFIG_ARCH_IOP32X) += time.o | 12 | obj-$(CONFIG_ARCH_IOP32X) += time.o |
13 | obj-$(CONFIG_ARCH_IOP32X) += io.o | ||
14 | obj-$(CONFIG_ARCH_IOP32X) += cp6.o | 13 | obj-$(CONFIG_ARCH_IOP32X) += cp6.o |
15 | obj-$(CONFIG_ARCH_IOP32X) += adma.o | 14 | obj-$(CONFIG_ARCH_IOP32X) += adma.o |
16 | obj-$(CONFIG_ARCH_IOP32X) += pmu.o | 15 | obj-$(CONFIG_ARCH_IOP32X) += pmu.o |
@@ -22,7 +21,6 @@ obj-$(CONFIG_ARCH_IOP33X) += i2c.o | |||
22 | obj-$(CONFIG_ARCH_IOP33X) += pci.o | 21 | obj-$(CONFIG_ARCH_IOP33X) += pci.o |
23 | obj-$(CONFIG_ARCH_IOP33X) += setup.o | 22 | obj-$(CONFIG_ARCH_IOP33X) += setup.o |
24 | obj-$(CONFIG_ARCH_IOP33X) += time.o | 23 | obj-$(CONFIG_ARCH_IOP33X) += time.o |
25 | obj-$(CONFIG_ARCH_IOP33X) += io.o | ||
26 | obj-$(CONFIG_ARCH_IOP33X) += cp6.o | 24 | obj-$(CONFIG_ARCH_IOP33X) += cp6.o |
27 | obj-$(CONFIG_ARCH_IOP33X) += adma.o | 25 | obj-$(CONFIG_ARCH_IOP33X) += adma.o |
28 | obj-$(CONFIG_ARCH_IOP33X) += pmu.o | 26 | obj-$(CONFIG_ARCH_IOP33X) += pmu.o |
diff --git a/arch/arm/plat-iop/io.c b/arch/arm/plat-iop/io.c deleted file mode 100644 index e15bc17db90b..000000000000 --- a/arch/arm/plat-iop/io.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * iop3xx custom ioremap implementation | ||
3 | * Copyright (c) 2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <mach/hardware.h> | ||
23 | |||
24 | void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size, | ||
25 | unsigned int mtype) | ||
26 | { | ||
27 | void __iomem * retval; | ||
28 | |||
29 | switch (cookie) { | ||
30 | case IOP3XX_PCI_LOWER_IO_PA ... IOP3XX_PCI_UPPER_IO_PA: | ||
31 | retval = (void *) IOP3XX_PCI_IO_PHYS_TO_VIRT(cookie); | ||
32 | break; | ||
33 | case IOP3XX_PERIPHERAL_PHYS_BASE ... IOP3XX_PERIPHERAL_UPPER_PA: | ||
34 | retval = (void *) IOP3XX_PMMR_PHYS_TO_VIRT(cookie); | ||
35 | break; | ||
36 | default: | ||
37 | retval = __arm_ioremap_caller(cookie, size, mtype, | ||
38 | __builtin_return_address(0)); | ||
39 | } | ||
40 | |||
41 | return retval; | ||
42 | } | ||
43 | EXPORT_SYMBOL(__iop3xx_ioremap); | ||
44 | |||
45 | void __iop3xx_iounmap(void __iomem *addr) | ||
46 | { | ||
47 | extern void __iounmap(volatile void __iomem *addr); | ||
48 | |||
49 | switch ((u32) addr) { | ||
50 | case IOP3XX_PCI_LOWER_IO_VA ... IOP3XX_PCI_UPPER_IO_VA: | ||
51 | case IOP3XX_PERIPHERAL_VIRT_BASE ... IOP3XX_PERIPHERAL_UPPER_VA: | ||
52 | goto skip; | ||
53 | } | ||
54 | __iounmap(addr); | ||
55 | |||
56 | skip: | ||
57 | return; | ||
58 | } | ||
59 | EXPORT_SYMBOL(__iop3xx_iounmap); | ||
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 568dd0223d17..cbfbbe461788 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/time.h> | 18 | #include <linux/time.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/timex.h> | 20 | #include <linux/timex.h> |
21 | #include <linux/sched.h> | ||
22 | #include <linux/io.h> | 21 | #include <linux/io.h> |
23 | #include <linux/clocksource.h> | 22 | #include <linux/clocksource.h> |
24 | #include <linux/clockchips.h> | 23 | #include <linux/clockchips.h> |
@@ -52,21 +51,12 @@ static struct clocksource iop_clocksource = { | |||
52 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 51 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
53 | }; | 52 | }; |
54 | 53 | ||
55 | static DEFINE_CLOCK_DATA(cd); | ||
56 | |||
57 | /* | 54 | /* |
58 | * IOP sched_clock() implementation via its clocksource. | 55 | * IOP sched_clock() implementation via its clocksource. |
59 | */ | 56 | */ |
60 | unsigned long long notrace sched_clock(void) | 57 | static u32 notrace iop_read_sched_clock(void) |
61 | { | 58 | { |
62 | u32 cyc = 0xffffffffu - read_tcr1(); | 59 | return 0xffffffffu - read_tcr1(); |
63 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
64 | } | ||
65 | |||
66 | static void notrace iop_update_sched_clock(void) | ||
67 | { | ||
68 | u32 cyc = 0xffffffffu - read_tcr1(); | ||
69 | update_sched_clock(&cd, cyc, (u32)~0); | ||
70 | } | 60 | } |
71 | 61 | ||
72 | /* | 62 | /* |
@@ -152,7 +142,7 @@ void __init iop_init_time(unsigned long tick_rate) | |||
152 | { | 142 | { |
153 | u32 timer_ctl; | 143 | u32 timer_ctl; |
154 | 144 | ||
155 | init_sched_clock(&cd, iop_update_sched_clock, 32, tick_rate); | 145 | setup_sched_clock(iop_read_sched_clock, 32, tick_rate); |
156 | 146 | ||
157 | ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); | 147 | ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); |
158 | iop_tick_rate = tick_rate; | 148 | iop_tick_rate = tick_rate; |
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index b3a1f2b3ada3..b30708e28c1d 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -20,6 +20,7 @@ config ARCH_IMX_V6_V7 | |||
20 | bool "i.MX3, i.MX6" | 20 | bool "i.MX3, i.MX6" |
21 | select AUTO_ZRELADDR if !ZBOOT_ROM | 21 | select AUTO_ZRELADDR if !ZBOOT_ROM |
22 | select ARM_PATCH_PHYS_VIRT | 22 | select ARM_PATCH_PHYS_VIRT |
23 | select MIGHT_HAVE_CACHE_L2X0 | ||
23 | help | 24 | help |
24 | This enables support for systems based on the Freescale i.MX3 and i.MX6 | 25 | This enables support for systems based on the Freescale i.MX3 and i.MX6 |
25 | family. | 26 | family. |
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index b9f0f5f499a4..076db84f3e31 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -5,7 +5,6 @@ | |||
5 | # Common support | 5 | # Common support |
6 | obj-y := clock.o time.o devices.o cpu.o system.o irq-common.o | 6 | obj-y := clock.o time.o devices.o cpu.o system.o irq-common.o |
7 | 7 | ||
8 | obj-$(CONFIG_ARM_GIC) += gic.o | ||
9 | obj-$(CONFIG_MXC_TZIC) += tzic.o | 8 | obj-$(CONFIG_MXC_TZIC) += tzic.o |
10 | obj-$(CONFIG_MXC_AVIC) += avic.o | 9 | obj-$(CONFIG_MXC_AVIC) += avic.o |
11 | 10 | ||
diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index adbff706ef6f..73db34bf588a 100644 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c | |||
@@ -98,7 +98,7 @@ static int mxc_set_target(struct cpufreq_policy *policy, | |||
98 | return ret; | 98 | return ret; |
99 | } | 99 | } |
100 | 100 | ||
101 | static int __init mxc_cpufreq_init(struct cpufreq_policy *policy) | 101 | static int mxc_cpufreq_init(struct cpufreq_policy *policy) |
102 | { | 102 | { |
103 | int ret; | 103 | int ret; |
104 | int i; | 104 | int i; |
diff --git a/arch/arm/plat-mxc/gic.c b/arch/arm/plat-mxc/gic.c deleted file mode 100644 index 12f8f8109010..000000000000 --- a/arch/arm/plat-mxc/gic.c +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | #include <asm/exception.h> | ||
15 | #include <asm/localtimer.h> | ||
16 | #include <asm/hardware/gic.h> | ||
17 | #ifdef CONFIG_SMP | ||
18 | #include <asm/smp.h> | ||
19 | #endif | ||
20 | |||
21 | asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) | ||
22 | { | ||
23 | u32 irqstat, irqnr; | ||
24 | |||
25 | do { | ||
26 | irqstat = readl_relaxed(gic_cpu_base_addr + GIC_CPU_INTACK); | ||
27 | irqnr = irqstat & 0x3ff; | ||
28 | if (irqnr == 1023) | ||
29 | break; | ||
30 | |||
31 | if (irqnr > 15 && irqnr < 1021) | ||
32 | handle_IRQ(irqnr, regs); | ||
33 | #ifdef CONFIG_SMP | ||
34 | else { | ||
35 | writel_relaxed(irqstat, gic_cpu_base_addr + | ||
36 | GIC_CPU_EOI); | ||
37 | handle_IPI(irqnr, regs); | ||
38 | } | ||
39 | #endif | ||
40 | } while (1); | ||
41 | } | ||
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 18e5065df3c5..83cca9bcfc97 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -89,7 +89,6 @@ extern void imx_print_silicon_rev(const char *cpu, int srev); | |||
89 | 89 | ||
90 | void avic_handle_irq(struct pt_regs *); | 90 | void avic_handle_irq(struct pt_regs *); |
91 | void tzic_handle_irq(struct pt_regs *); | 91 | void tzic_handle_irq(struct pt_regs *); |
92 | void gic_handle_irq(struct pt_regs *); | ||
93 | 92 | ||
94 | #define imx1_handle_irq avic_handle_irq | 93 | #define imx1_handle_irq avic_handle_irq |
95 | #define imx21_handle_irq avic_handle_irq | 94 | #define imx21_handle_irq avic_handle_irq |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index ca5cf26a04b1..def5d30cb67e 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -9,19 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* Unused, we use CONFIG_MULTI_IRQ_HANDLER */ | ||
13 | |||
14 | .macro disable_fiq | 12 | .macro disable_fiq |
15 | .endm | 13 | .endm |
16 | 14 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
21 | .endm | 16 | .endm |
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | .endm | ||
25 | |||
26 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
27 | .endm | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/plat-mxc/include/mach/mx1.h index 97b19e7800bc..2b7c08d13e89 100644 --- a/arch/arm/plat-mxc/include/mach/mx1.h +++ b/arch/arm/plat-mxc/include/mach/mx1.h | |||
@@ -12,8 +12,6 @@ | |||
12 | #ifndef __MACH_MX1_H__ | 12 | #ifndef __MACH_MX1_H__ |
13 | #define __MACH_MX1_H__ | 13 | #define __MACH_MX1_H__ |
14 | 14 | ||
15 | #include <mach/vmalloc.h> | ||
16 | |||
17 | /* | 15 | /* |
18 | * Memory map | 16 | * Memory map |
19 | */ | 17 | */ |
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h index 88fd40452567..477971b00930 100644 --- a/arch/arm/plat-mxc/include/mach/uncompress.h +++ b/arch/arm/plat-mxc/include/mach/uncompress.h | |||
@@ -98,6 +98,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id) | |||
98 | case MACH_TYPE_PCM043: | 98 | case MACH_TYPE_PCM043: |
99 | case MACH_TYPE_LILLY1131: | 99 | case MACH_TYPE_LILLY1131: |
100 | case MACH_TYPE_VPR200: | 100 | case MACH_TYPE_VPR200: |
101 | case MACH_TYPE_EUKREA_CPUIMX35SD: | ||
101 | uart_base = MX3X_UART1_BASE_ADDR; | 102 | uart_base = MX3X_UART1_BASE_ADDR; |
102 | break; | 103 | break; |
103 | case MACH_TYPE_MAGX_ZN5: | 104 | case MACH_TYPE_MAGX_ZN5: |
diff --git a/arch/arm/plat-mxc/include/mach/vmalloc.h b/arch/arm/plat-mxc/include/mach/vmalloc.h deleted file mode 100644 index ef6379c474be..000000000000 --- a/arch/arm/plat-mxc/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Russell King. | ||
3 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MXC_VMALLOC_H__ | ||
17 | #define __ASM_ARCH_MXC_VMALLOC_H__ | ||
18 | |||
19 | /* vmalloc ending address */ | ||
20 | #define VMALLOC_END 0xf4000000UL | ||
21 | |||
22 | #endif /* __ASM_ARCH_MXC_VMALLOC_H__ */ | ||
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 845de59f07ed..e032717f7d02 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c | |||
@@ -77,6 +77,15 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) | |||
77 | do_div(c, period_ns); | 77 | do_div(c, period_ns); |
78 | duty_cycles = c; | 78 | duty_cycles = c; |
79 | 79 | ||
80 | /* | ||
81 | * according to imx pwm RM, the real period value should be | ||
82 | * PERIOD value in PWMPR plus 2. | ||
83 | */ | ||
84 | if (period_cycles > 2) | ||
85 | period_cycles -= 2; | ||
86 | else | ||
87 | period_cycles = 0; | ||
88 | |||
80 | writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); | 89 | writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); |
81 | writel(period_cycles, pwm->mmio_base + MX3_PWMPR); | 90 | writel(period_cycles, pwm->mmio_base + MX3_PWMPR); |
82 | 91 | ||
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 4b0fe285e83c..1c96cdb4c35e 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c | |||
@@ -108,18 +108,9 @@ static void gpt_irq_acknowledge(void) | |||
108 | 108 | ||
109 | static void __iomem *sched_clock_reg; | 109 | static void __iomem *sched_clock_reg; |
110 | 110 | ||
111 | static DEFINE_CLOCK_DATA(cd); | 111 | static u32 notrace mxc_read_sched_clock(void) |
112 | unsigned long long notrace sched_clock(void) | ||
113 | { | 112 | { |
114 | cycle_t cyc = sched_clock_reg ? __raw_readl(sched_clock_reg) : 0; | 113 | return sched_clock_reg ? __raw_readl(sched_clock_reg) : 0; |
115 | |||
116 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
117 | } | ||
118 | |||
119 | static void notrace mxc_update_sched_clock(void) | ||
120 | { | ||
121 | cycle_t cyc = sched_clock_reg ? __raw_readl(sched_clock_reg) : 0; | ||
122 | update_sched_clock(&cd, cyc, (u32)~0); | ||
123 | } | 114 | } |
124 | 115 | ||
125 | static int __init mxc_clocksource_init(struct clk *timer_clk) | 116 | static int __init mxc_clocksource_init(struct clk *timer_clk) |
@@ -129,7 +120,7 @@ static int __init mxc_clocksource_init(struct clk *timer_clk) | |||
129 | 120 | ||
130 | sched_clock_reg = reg; | 121 | sched_clock_reg = reg; |
131 | 122 | ||
132 | init_sched_clock(&cd, mxc_update_sched_clock, 32, c); | 123 | setup_sched_clock(mxc_read_sched_clock, 32, c); |
133 | return clocksource_mmio_init(reg, "mxc_timer1", c, 200, 32, | 124 | return clocksource_mmio_init(reg, "mxc_timer1", c, 200, 32, |
134 | clocksource_mmio_readl_up); | 125 | clocksource_mmio_readl_up); |
135 | } | 126 | } |
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c index 30b6433d910d..ad1b45b605a4 100644 --- a/arch/arm/plat-nomadik/timer.c +++ b/arch/arm/plat-nomadik/timer.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/jiffies.h> | 18 | #include <linux/jiffies.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/sched.h> | ||
21 | #include <asm/mach/time.h> | 20 | #include <asm/mach/time.h> |
22 | #include <asm/sched_clock.h> | 21 | #include <asm/sched_clock.h> |
23 | 22 | ||
@@ -79,23 +78,12 @@ void __iomem *mtu_base; /* Assigned by machine code */ | |||
79 | * local implementation which uses the clocksource to get some | 78 | * local implementation which uses the clocksource to get some |
80 | * better resolution when scheduling the kernel. | 79 | * better resolution when scheduling the kernel. |
81 | */ | 80 | */ |
82 | static DEFINE_CLOCK_DATA(cd); | 81 | static u32 notrace nomadik_read_sched_clock(void) |
83 | |||
84 | unsigned long long notrace sched_clock(void) | ||
85 | { | 82 | { |
86 | u32 cyc; | ||
87 | |||
88 | if (unlikely(!mtu_base)) | 83 | if (unlikely(!mtu_base)) |
89 | return 0; | 84 | return 0; |
90 | 85 | ||
91 | cyc = -readl(mtu_base + MTU_VAL(0)); | 86 | return -readl(mtu_base + MTU_VAL(0)); |
92 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
93 | } | ||
94 | |||
95 | static void notrace nomadik_update_sched_clock(void) | ||
96 | { | ||
97 | u32 cyc = -readl(mtu_base + MTU_VAL(0)); | ||
98 | update_sched_clock(&cd, cyc, (u32)~0); | ||
99 | } | 87 | } |
100 | #endif | 88 | #endif |
101 | 89 | ||
@@ -231,9 +219,11 @@ void __init nmdk_timer_init(void) | |||
231 | rate, 200, 32, clocksource_mmio_readl_down)) | 219 | rate, 200, 32, clocksource_mmio_readl_down)) |
232 | pr_err("timer: failed to initialize clock source %s\n", | 220 | pr_err("timer: failed to initialize clock source %s\n", |
233 | "mtu_0"); | 221 | "mtu_0"); |
222 | |||
234 | #ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK | 223 | #ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK |
235 | init_sched_clock(&cd, nomadik_update_sched_clock, 32, rate); | 224 | setup_sched_clock(nomadik_read_sched_clock, 32, rate); |
236 | #endif | 225 | #endif |
226 | |||
237 | /* Timer 1 is used for events */ | 227 | /* Timer 1 is used for events */ |
238 | 228 | ||
239 | clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE); | 229 | clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE); |
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index 985262242f25..3df04d944e4d 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := common.o sram.o clock.o devices.o dma.o mux.o \ | 6 | obj-y := common.o sram.o clock.o devices.o dma.o mux.o \ |
7 | usb.o fb.o io.o counter_32k.o | 7 | usb.o fb.o counter_32k.o |
8 | obj-m := | 8 | obj-m := |
9 | obj-n := | 9 | obj-n := |
10 | obj- := | 10 | obj- := |
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index d9f10a31e604..2ee6341fffdb 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/dma-mapping.h> | ||
17 | #include <linux/omapfb.h> | 18 | #include <linux/omapfb.h> |
18 | 19 | ||
19 | #include <plat/common.h> | 20 | #include <plat/common.h> |
@@ -66,3 +67,10 @@ void __init omap_reserve(void) | |||
66 | omap_vram_reserve_sdram_memblock(); | 67 | omap_vram_reserve_sdram_memblock(); |
67 | omap_dsp_reserve_sdram_memblock(); | 68 | omap_dsp_reserve_sdram_memblock(); |
68 | } | 69 | } |
70 | |||
71 | void __init omap_init_consistent_dma_size(void) | ||
72 | { | ||
73 | #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE | ||
74 | init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20); | ||
75 | #endif | ||
76 | } | ||
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index a6cbb712da51..5f0f2292b7fb 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/sched.h> | ||
21 | #include <linux/clocksource.h> | 20 | #include <linux/clocksource.h> |
22 | 21 | ||
23 | #include <asm/sched_clock.h> | 22 | #include <asm/sched_clock.h> |
@@ -37,41 +36,9 @@ static void __iomem *timer_32k_base; | |||
37 | 36 | ||
38 | #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 | 37 | #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 |
39 | 38 | ||
40 | /* | 39 | static u32 notrace omap_32k_read_sched_clock(void) |
41 | * Returns current time from boot in nsecs. It's OK for this to wrap | ||
42 | * around for now, as it's just a relative time stamp. | ||
43 | */ | ||
44 | static DEFINE_CLOCK_DATA(cd); | ||
45 | |||
46 | /* | ||
47 | * Constants generated by clocks_calc_mult_shift(m, s, 32768, NSEC_PER_SEC, 60). | ||
48 | * This gives a resolution of about 30us and a wrap period of about 36hrs. | ||
49 | */ | ||
50 | #define SC_MULT 4000000000u | ||
51 | #define SC_SHIFT 17 | ||
52 | |||
53 | static inline unsigned long long notrace _omap_32k_sched_clock(void) | ||
54 | { | ||
55 | u32 cyc = timer_32k_base ? __raw_readl(timer_32k_base) : 0; | ||
56 | return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); | ||
57 | } | ||
58 | |||
59 | #if defined(CONFIG_OMAP_32K_TIMER) && !defined(CONFIG_OMAP_MPU_TIMER) | ||
60 | unsigned long long notrace sched_clock(void) | ||
61 | { | ||
62 | return _omap_32k_sched_clock(); | ||
63 | } | ||
64 | #else | ||
65 | unsigned long long notrace omap_32k_sched_clock(void) | ||
66 | { | ||
67 | return _omap_32k_sched_clock(); | ||
68 | } | ||
69 | #endif | ||
70 | |||
71 | static void notrace omap_update_sched_clock(void) | ||
72 | { | 40 | { |
73 | u32 cyc = timer_32k_base ? __raw_readl(timer_32k_base) : 0; | 41 | return timer_32k_base ? __raw_readl(timer_32k_base) : 0; |
74 | update_sched_clock(&cd, cyc, (u32)~0); | ||
75 | } | 42 | } |
76 | 43 | ||
77 | /** | 44 | /** |
@@ -147,8 +114,7 @@ int __init omap_init_clocksource_32k(void) | |||
147 | clocksource_mmio_readl_up)) | 114 | clocksource_mmio_readl_up)) |
148 | printk(err, "32k_counter"); | 115 | printk(err, "32k_counter"); |
149 | 116 | ||
150 | init_fixed_sched_clock(&cd, omap_update_sched_clock, 32, | 117 | setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); |
151 | 32768, SC_MULT, SC_SHIFT); | ||
152 | } | 118 | } |
153 | return 0; | 119 | return 0; |
154 | } | 120 | } |
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index 257f9770b2da..b4d7ec3fbfbe 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <plat/omap_hwmod.h> | 31 | #include <plat/omap_hwmod.h> |
32 | 32 | ||
33 | extern int __init omap_init_clocksource_32k(void); | 33 | extern int __init omap_init_clocksource_32k(void); |
34 | extern unsigned long long notrace omap_32k_sched_clock(void); | ||
35 | 34 | ||
36 | extern void omap_reserve(void); | 35 | extern void omap_reserve(void); |
37 | extern int omap_dss_reset(struct omap_hwmod *); | 36 | extern int omap_dss_reset(struct omap_hwmod *); |
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h index 62f4477666cb..1234944a4da0 100644 --- a/arch/arm/plat-omap/include/plat/io.h +++ b/arch/arm/plat-omap/include/plat/io.h | |||
@@ -247,8 +247,6 @@ | |||
247 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | 247 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these |
248 | */ | 248 | */ |
249 | 249 | ||
250 | void omap_ioremap_init(void); | ||
251 | |||
252 | extern u8 omap_readb(u32 pa); | 250 | extern u8 omap_readb(u32 pa); |
253 | extern u16 omap_readw(u32 pa); | 251 | extern u16 omap_readw(u32 pa); |
254 | extern u32 omap_readl(u32 pa); | 252 | extern u32 omap_readl(u32 pa); |
@@ -260,12 +258,6 @@ struct omap_sdrc_params; | |||
260 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | 258 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, |
261 | struct omap_sdrc_params *sdrc_cs1); | 259 | struct omap_sdrc_params *sdrc_cs1); |
262 | 260 | ||
263 | #define __arch_ioremap omap_ioremap | ||
264 | #define __arch_iounmap omap_iounmap | ||
265 | |||
266 | void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type); | ||
267 | void omap_iounmap(volatile void __iomem *addr); | ||
268 | |||
269 | extern void __init omap_init_consistent_dma_size(void); | 261 | extern void __init omap_init_consistent_dma_size(void); |
270 | 262 | ||
271 | #endif | 263 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index d3a9fcd53c45..ebda7382c65b 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -436,10 +436,6 @@ | |||
436 | #define INTCPS_NR_MIR_REGS 3 | 436 | #define INTCPS_NR_MIR_REGS 3 |
437 | #define INTCPS_NR_IRQS 96 | 437 | #define INTCPS_NR_IRQS 96 |
438 | 438 | ||
439 | #ifndef __ASSEMBLY__ | ||
440 | extern void __iomem *omap_irq_base; | ||
441 | #endif | ||
442 | |||
443 | #include <mach/hardware.h> | 439 | #include <mach/hardware.h> |
444 | 440 | ||
445 | #ifdef CONFIG_FIQ | 441 | #ifdef CONFIG_FIQ |
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c deleted file mode 100644 index 333871f59995..000000000000 --- a/arch/arm/plat-omap/io.c +++ /dev/null | |||
@@ -1,159 +0,0 @@ | |||
1 | /* | ||
2 | * Common io.c file | ||
3 | * This file is created by Russell King <rmk+kernel@arm.linux.org.uk> | ||
4 | * | ||
5 | * Copyright (C) 2009 Texas Instruments | ||
6 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <linux/mm.h> | ||
15 | #include <linux/dma-mapping.h> | ||
16 | |||
17 | #include <plat/omap7xx.h> | ||
18 | #include <plat/omap1510.h> | ||
19 | #include <plat/omap16xx.h> | ||
20 | #include <plat/omap24xx.h> | ||
21 | #include <plat/omap34xx.h> | ||
22 | #include <plat/omap44xx.h> | ||
23 | |||
24 | #define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) | ||
25 | #define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst))) | ||
26 | |||
27 | static int initialized; | ||
28 | |||
29 | /* | ||
30 | * Intercept ioremap() requests for addresses in our fixed mapping regions. | ||
31 | */ | ||
32 | void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) | ||
33 | { | ||
34 | |||
35 | WARN(!initialized, "Do not use ioremap before init_early\n"); | ||
36 | |||
37 | #ifdef CONFIG_ARCH_OMAP1 | ||
38 | if (cpu_class_is_omap1()) { | ||
39 | if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE)) | ||
40 | return XLATE(p, OMAP1_IO_PHYS, OMAP1_IO_VIRT); | ||
41 | } | ||
42 | if (cpu_is_omap7xx()) { | ||
43 | if (BETWEEN(p, OMAP7XX_DSP_BASE, OMAP7XX_DSP_SIZE)) | ||
44 | return XLATE(p, OMAP7XX_DSP_BASE, OMAP7XX_DSP_START); | ||
45 | |||
46 | if (BETWEEN(p, OMAP7XX_DSPREG_BASE, OMAP7XX_DSPREG_SIZE)) | ||
47 | return XLATE(p, OMAP7XX_DSPREG_BASE, | ||
48 | OMAP7XX_DSPREG_START); | ||
49 | } | ||
50 | if (cpu_is_omap15xx()) { | ||
51 | if (BETWEEN(p, OMAP1510_DSP_BASE, OMAP1510_DSP_SIZE)) | ||
52 | return XLATE(p, OMAP1510_DSP_BASE, OMAP1510_DSP_START); | ||
53 | |||
54 | if (BETWEEN(p, OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_SIZE)) | ||
55 | return XLATE(p, OMAP1510_DSPREG_BASE, | ||
56 | OMAP1510_DSPREG_START); | ||
57 | } | ||
58 | if (cpu_is_omap16xx()) { | ||
59 | if (BETWEEN(p, OMAP16XX_DSP_BASE, OMAP16XX_DSP_SIZE)) | ||
60 | return XLATE(p, OMAP16XX_DSP_BASE, OMAP16XX_DSP_START); | ||
61 | |||
62 | if (BETWEEN(p, OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_SIZE)) | ||
63 | return XLATE(p, OMAP16XX_DSPREG_BASE, | ||
64 | OMAP16XX_DSPREG_START); | ||
65 | } | ||
66 | #endif | ||
67 | #ifdef CONFIG_ARCH_OMAP2 | ||
68 | if (cpu_is_omap24xx()) { | ||
69 | if (BETWEEN(p, L3_24XX_PHYS, L3_24XX_SIZE)) | ||
70 | return XLATE(p, L3_24XX_PHYS, L3_24XX_VIRT); | ||
71 | if (BETWEEN(p, L4_24XX_PHYS, L4_24XX_SIZE)) | ||
72 | return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT); | ||
73 | } | ||
74 | if (cpu_is_omap2420()) { | ||
75 | if (BETWEEN(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_SIZE)) | ||
76 | return XLATE(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_VIRT); | ||
77 | if (BETWEEN(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE)) | ||
78 | return XLATE(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE); | ||
79 | if (BETWEEN(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_SIZE)) | ||
80 | return XLATE(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_VIRT); | ||
81 | } | ||
82 | if (cpu_is_omap2430()) { | ||
83 | if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE)) | ||
84 | return XLATE(p, L4_WK_243X_PHYS, L4_WK_243X_VIRT); | ||
85 | if (BETWEEN(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_SIZE)) | ||
86 | return XLATE(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_VIRT); | ||
87 | if (BETWEEN(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_SIZE)) | ||
88 | return XLATE(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_VIRT); | ||
89 | if (BETWEEN(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_SIZE)) | ||
90 | return XLATE(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_VIRT); | ||
91 | } | ||
92 | #endif | ||
93 | #ifdef CONFIG_ARCH_OMAP3 | ||
94 | if (cpu_is_ti816x()) { | ||
95 | if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) | ||
96 | return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT); | ||
97 | } else if (cpu_is_omap34xx()) { | ||
98 | if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE)) | ||
99 | return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT); | ||
100 | if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) | ||
101 | return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT); | ||
102 | if (BETWEEN(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_SIZE)) | ||
103 | return XLATE(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_VIRT); | ||
104 | if (BETWEEN(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_SIZE)) | ||
105 | return XLATE(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_VIRT); | ||
106 | if (BETWEEN(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_SIZE)) | ||
107 | return XLATE(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_VIRT); | ||
108 | if (BETWEEN(p, L4_PER_34XX_PHYS, L4_PER_34XX_SIZE)) | ||
109 | return XLATE(p, L4_PER_34XX_PHYS, L4_PER_34XX_VIRT); | ||
110 | if (BETWEEN(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_SIZE)) | ||
111 | return XLATE(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_VIRT); | ||
112 | } | ||
113 | #endif | ||
114 | #ifdef CONFIG_ARCH_OMAP4 | ||
115 | if (cpu_is_omap44xx()) { | ||
116 | if (BETWEEN(p, L3_44XX_PHYS, L3_44XX_SIZE)) | ||
117 | return XLATE(p, L3_44XX_PHYS, L3_44XX_VIRT); | ||
118 | if (BETWEEN(p, L4_44XX_PHYS, L4_44XX_SIZE)) | ||
119 | return XLATE(p, L4_44XX_PHYS, L4_44XX_VIRT); | ||
120 | if (BETWEEN(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_SIZE)) | ||
121 | return XLATE(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_VIRT); | ||
122 | if (BETWEEN(p, OMAP44XX_EMIF1_PHYS, OMAP44XX_EMIF1_SIZE)) | ||
123 | return XLATE(p, OMAP44XX_EMIF1_PHYS, \ | ||
124 | OMAP44XX_EMIF1_VIRT); | ||
125 | if (BETWEEN(p, OMAP44XX_EMIF2_PHYS, OMAP44XX_EMIF2_SIZE)) | ||
126 | return XLATE(p, OMAP44XX_EMIF2_PHYS, \ | ||
127 | OMAP44XX_EMIF2_VIRT); | ||
128 | if (BETWEEN(p, OMAP44XX_DMM_PHYS, OMAP44XX_DMM_SIZE)) | ||
129 | return XLATE(p, OMAP44XX_DMM_PHYS, OMAP44XX_DMM_VIRT); | ||
130 | if (BETWEEN(p, L4_PER_44XX_PHYS, L4_PER_44XX_SIZE)) | ||
131 | return XLATE(p, L4_PER_44XX_PHYS, L4_PER_44XX_VIRT); | ||
132 | if (BETWEEN(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_SIZE)) | ||
133 | return XLATE(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_VIRT); | ||
134 | } | ||
135 | #endif | ||
136 | return __arm_ioremap_caller(p, size, type, __builtin_return_address(0)); | ||
137 | } | ||
138 | EXPORT_SYMBOL(omap_ioremap); | ||
139 | |||
140 | void omap_iounmap(volatile void __iomem *addr) | ||
141 | { | ||
142 | unsigned long virt = (unsigned long)addr; | ||
143 | |||
144 | if (virt >= VMALLOC_START && virt < VMALLOC_END) | ||
145 | __iounmap(addr); | ||
146 | } | ||
147 | EXPORT_SYMBOL(omap_iounmap); | ||
148 | |||
149 | void __init omap_init_consistent_dma_size(void) | ||
150 | { | ||
151 | #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE | ||
152 | init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20); | ||
153 | #endif | ||
154 | } | ||
155 | |||
156 | void __init omap_ioremap_init(void) | ||
157 | { | ||
158 | initialized++; | ||
159 | } | ||
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 41ab97ebe4cf..10d160888133 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c | |||
@@ -384,12 +384,16 @@ void __init orion_gpio_init(int gpio_base, int ngpio, | |||
384 | struct orion_gpio_chip *ochip; | 384 | struct orion_gpio_chip *ochip; |
385 | struct irq_chip_generic *gc; | 385 | struct irq_chip_generic *gc; |
386 | struct irq_chip_type *ct; | 386 | struct irq_chip_type *ct; |
387 | char gc_label[16]; | ||
387 | 388 | ||
388 | if (orion_gpio_chip_count == ARRAY_SIZE(orion_gpio_chips)) | 389 | if (orion_gpio_chip_count == ARRAY_SIZE(orion_gpio_chips)) |
389 | return; | 390 | return; |
390 | 391 | ||
392 | snprintf(gc_label, sizeof(gc_label), "orion_gpio%d", | ||
393 | orion_gpio_chip_count); | ||
394 | |||
391 | ochip = orion_gpio_chips + orion_gpio_chip_count; | 395 | ochip = orion_gpio_chips + orion_gpio_chip_count; |
392 | ochip->chip.label = "orion_gpio"; | 396 | ochip->chip.label = kstrdup(gc_label, GFP_KERNEL); |
393 | ochip->chip.request = orion_gpio_request; | 397 | ochip->chip.request = orion_gpio_request; |
394 | ochip->chip.direction_input = orion_gpio_direction_input; | 398 | ochip->chip.direction_input = orion_gpio_direction_input; |
395 | ochip->chip.get = orion_gpio_get; | 399 | ochip->chip.get = orion_gpio_get; |
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c index 69a61367e4b8..1ed8d1397fcf 100644 --- a/arch/arm/plat-orion/time.c +++ b/arch/arm/plat-orion/time.c | |||
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sched.h> | ||
16 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
17 | #include <linux/clockchips.h> | 16 | #include <linux/clockchips.h> |
18 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
@@ -60,24 +59,10 @@ static u32 ticks_per_jiffy; | |||
60 | * Orion's sched_clock implementation. It has a resolution of | 59 | * Orion's sched_clock implementation. It has a resolution of |
61 | * at least 7.5ns (133MHz TCLK). | 60 | * at least 7.5ns (133MHz TCLK). |
62 | */ | 61 | */ |
63 | static DEFINE_CLOCK_DATA(cd); | ||
64 | 62 | ||
65 | unsigned long long notrace sched_clock(void) | 63 | static u32 notrace orion_read_sched_clock(void) |
66 | { | 64 | { |
67 | u32 cyc = ~readl(timer_base + TIMER0_VAL_OFF); | 65 | return ~readl(timer_base + TIMER0_VAL_OFF); |
68 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
69 | } | ||
70 | |||
71 | |||
72 | static void notrace orion_update_sched_clock(void) | ||
73 | { | ||
74 | u32 cyc = ~readl(timer_base + TIMER0_VAL_OFF); | ||
75 | update_sched_clock(&cd, cyc, (u32)~0); | ||
76 | } | ||
77 | |||
78 | static void __init setup_sched_clock(unsigned long tclk) | ||
79 | { | ||
80 | init_sched_clock(&cd, orion_update_sched_clock, 32, tclk); | ||
81 | } | 66 | } |
82 | 67 | ||
83 | /* | 68 | /* |
@@ -217,7 +202,7 @@ orion_time_init(u32 _bridge_base, u32 _bridge_timer1_clr_mask, | |||
217 | /* | 202 | /* |
218 | * Set scale and timer for sched_clock. | 203 | * Set scale and timer for sched_clock. |
219 | */ | 204 | */ |
220 | setup_sched_clock(tclk); | 205 | setup_sched_clock(orion_read_sched_clock, 32, tclk); |
221 | 206 | ||
222 | /* | 207 | /* |
223 | * Setup free-running clocksource timer (interrupts | 208 | * Setup free-running clocksource timer (interrupts |
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 9b9968fa8695..8167ce66188c 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -11,6 +11,7 @@ config PLAT_S5P | |||
11 | default y | 11 | default y |
12 | select ARM_VIC if !ARCH_EXYNOS4 | 12 | select ARM_VIC if !ARCH_EXYNOS4 |
13 | select ARM_GIC if ARCH_EXYNOS4 | 13 | select ARM_GIC if ARCH_EXYNOS4 |
14 | select GIC_NON_BANKED if ARCH_EXYNOS4 | ||
14 | select NO_IOPORT | 15 | select NO_IOPORT |
15 | select ARCH_REQUIRE_GPIOLIB | 16 | select ARCH_REQUIRE_GPIOLIB |
16 | select S3C_GPIO_TRACK | 17 | select S3C_GPIO_TRACK |
diff --git a/arch/arm/plat-s5p/s5p-time.c b/arch/arm/plat-s5p/s5p-time.c index c833e7b57599..17c0a2c58dfd 100644 --- a/arch/arm/plat-s5p/s5p-time.c +++ b/arch/arm/plat-s5p/s5p-time.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
15 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
16 | #include <linux/err.h> | 15 | #include <linux/err.h> |
@@ -321,26 +320,14 @@ static void __iomem *s5p_timer_reg(void) | |||
321 | * this wraps around for now, since it is just a relative time | 320 | * this wraps around for now, since it is just a relative time |
322 | * stamp. (Inspired by U300 implementation.) | 321 | * stamp. (Inspired by U300 implementation.) |
323 | */ | 322 | */ |
324 | static DEFINE_CLOCK_DATA(cd); | 323 | static u32 notrace s5p_read_sched_clock(void) |
325 | |||
326 | unsigned long long notrace sched_clock(void) | ||
327 | { | 324 | { |
328 | void __iomem *reg = s5p_timer_reg(); | 325 | void __iomem *reg = s5p_timer_reg(); |
329 | 326 | ||
330 | if (!reg) | 327 | if (!reg) |
331 | return 0; | 328 | return 0; |
332 | 329 | ||
333 | return cyc_to_sched_clock(&cd, ~__raw_readl(reg), (u32)~0); | 330 | return ~__raw_readl(reg); |
334 | } | ||
335 | |||
336 | static void notrace s5p_update_sched_clock(void) | ||
337 | { | ||
338 | void __iomem *reg = s5p_timer_reg(); | ||
339 | |||
340 | if (!reg) | ||
341 | return; | ||
342 | |||
343 | update_sched_clock(&cd, ~__raw_readl(reg), (u32)~0); | ||
344 | } | 331 | } |
345 | 332 | ||
346 | static void __init s5p_clocksource_init(void) | 333 | static void __init s5p_clocksource_init(void) |
@@ -358,7 +345,7 @@ static void __init s5p_clocksource_init(void) | |||
358 | s5p_time_setup(timer_source.source_id, TCNT_MAX); | 345 | s5p_time_setup(timer_source.source_id, TCNT_MAX); |
359 | s5p_time_start(timer_source.source_id, PERIODIC); | 346 | s5p_time_start(timer_source.source_id, PERIODIC); |
360 | 347 | ||
361 | init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate); | 348 | setup_sched_clock(s5p_read_sched_clock, 32, clock_rate); |
362 | 349 | ||
363 | if (clocksource_mmio_init(s5p_timer_reg(), "s5p_clocksource_timer", | 350 | if (clocksource_mmio_init(s5p_timer_reg(), "s5p_clocksource_timer", |
364 | clock_rate, 250, 32, clocksource_mmio_readl_down)) | 351 | clock_rate, 250, 32, clocksource_mmio_readl_down)) |
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h index dac4760c0f0a..95509d8eb140 100644 --- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h +++ b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h | |||
@@ -202,14 +202,6 @@ extern int s3c_plltab_register(struct cpufreq_frequency_table *plls, | |||
202 | extern struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void); | 202 | extern struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void); |
203 | extern struct s3c_iotimings *s3c_cpufreq_getiotimings(void); | 203 | extern struct s3c_iotimings *s3c_cpufreq_getiotimings(void); |
204 | 204 | ||
205 | extern void s3c2410_iotiming_debugfs(struct seq_file *seq, | ||
206 | struct s3c_cpufreq_config *cfg, | ||
207 | union s3c_iobank *iob); | ||
208 | |||
209 | extern void s3c2412_iotiming_debugfs(struct seq_file *seq, | ||
210 | struct s3c_cpufreq_config *cfg, | ||
211 | union s3c_iobank *iob); | ||
212 | |||
213 | #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUGFS | 205 | #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUGFS |
214 | #define s3c_cpufreq_debugfs_call(x) x | 206 | #define s3c_cpufreq_debugfs_call(x) x |
215 | #else | 207 | #else |
@@ -226,6 +218,10 @@ extern void s3c2410_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg); | |||
226 | extern void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg); | 218 | extern void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg); |
227 | 219 | ||
228 | #ifdef CONFIG_S3C2410_IOTIMING | 220 | #ifdef CONFIG_S3C2410_IOTIMING |
221 | extern void s3c2410_iotiming_debugfs(struct seq_file *seq, | ||
222 | struct s3c_cpufreq_config *cfg, | ||
223 | union s3c_iobank *iob); | ||
224 | |||
229 | extern int s3c2410_iotiming_calc(struct s3c_cpufreq_config *cfg, | 225 | extern int s3c2410_iotiming_calc(struct s3c_cpufreq_config *cfg, |
230 | struct s3c_iotimings *iot); | 226 | struct s3c_iotimings *iot); |
231 | 227 | ||
@@ -235,6 +231,7 @@ extern int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg, | |||
235 | extern void s3c2410_iotiming_set(struct s3c_cpufreq_config *cfg, | 231 | extern void s3c2410_iotiming_set(struct s3c_cpufreq_config *cfg, |
236 | struct s3c_iotimings *iot); | 232 | struct s3c_iotimings *iot); |
237 | #else | 233 | #else |
234 | #define s3c2410_iotiming_debugfs NULL | ||
238 | #define s3c2410_iotiming_calc NULL | 235 | #define s3c2410_iotiming_calc NULL |
239 | #define s3c2410_iotiming_get NULL | 236 | #define s3c2410_iotiming_get NULL |
240 | #define s3c2410_iotiming_set NULL | 237 | #define s3c2410_iotiming_set NULL |
@@ -242,8 +239,10 @@ extern void s3c2410_iotiming_set(struct s3c_cpufreq_config *cfg, | |||
242 | 239 | ||
243 | /* S3C2412 compatible routines */ | 240 | /* S3C2412 compatible routines */ |
244 | 241 | ||
245 | extern int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg, | 242 | #ifdef CONFIG_S3C2412_IOTIMING |
246 | struct s3c_iotimings *timings); | 243 | extern void s3c2412_iotiming_debugfs(struct seq_file *seq, |
244 | struct s3c_cpufreq_config *cfg, | ||
245 | union s3c_iobank *iob); | ||
247 | 246 | ||
248 | extern int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg, | 247 | extern int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg, |
249 | struct s3c_iotimings *timings); | 248 | struct s3c_iotimings *timings); |
@@ -253,6 +252,12 @@ extern int s3c2412_iotiming_calc(struct s3c_cpufreq_config *cfg, | |||
253 | 252 | ||
254 | extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg, | 253 | extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg, |
255 | struct s3c_iotimings *iot); | 254 | struct s3c_iotimings *iot); |
255 | #else | ||
256 | #define s3c2412_iotiming_debugfs NULL | ||
257 | #define s3c2412_iotiming_calc NULL | ||
258 | #define s3c2412_iotiming_get NULL | ||
259 | #define s3c2412_iotiming_set NULL | ||
260 | #endif /* CONFIG_S3C2412_IOTIMING */ | ||
256 | 261 | ||
257 | #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUG | 262 | #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUG |
258 | #define s3c_freq_dbg(x...) printk(KERN_INFO x) | 263 | #define s3c_freq_dbg(x...) printk(KERN_INFO x) |
diff --git a/arch/arm/plat-spear/include/plat/vmalloc.h b/arch/arm/plat-spear/include/plat/vmalloc.h deleted file mode 100644 index 8c8b24d07046..000000000000 --- a/arch/arm/plat-spear/include/plat/vmalloc.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/vmalloc.h | ||
3 | * | ||
4 | * Defining Vmalloc area for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_VMALLOC_H | ||
15 | #define __PLAT_VMALLOC_H | ||
16 | |||
17 | #define VMALLOC_END 0xF0000000UL | ||
18 | |||
19 | #endif /* __PLAT_VMALLOC_H */ | ||
diff --git a/arch/arm/plat-versatile/sched-clock.c b/arch/arm/plat-versatile/sched-clock.c index 3d6a4c292cab..b33b74c87232 100644 --- a/arch/arm/plat-versatile/sched-clock.c +++ b/arch/arm/plat-versatile/sched-clock.c | |||
@@ -18,41 +18,24 @@ | |||
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | #include <linux/kernel.h> | ||
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
22 | #include <linux/sched.h> | ||
23 | 23 | ||
24 | #include <asm/sched_clock.h> | 24 | #include <asm/sched_clock.h> |
25 | #include <plat/sched_clock.h> | 25 | #include <plat/sched_clock.h> |
26 | 26 | ||
27 | static DEFINE_CLOCK_DATA(cd); | ||
28 | static void __iomem *ctr; | 27 | static void __iomem *ctr; |
29 | 28 | ||
30 | /* | 29 | static u32 notrace versatile_read_sched_clock(void) |
31 | * Constants generated by clocks_calc_mult_shift(m, s, 24MHz, NSEC_PER_SEC, 60). | ||
32 | * This gives a resolution of about 41ns and a wrap period of about 178s. | ||
33 | */ | ||
34 | #define SC_MULT 2796202667u | ||
35 | #define SC_SHIFT 26 | ||
36 | |||
37 | unsigned long long notrace sched_clock(void) | ||
38 | { | 30 | { |
39 | if (ctr) { | 31 | if (ctr) |
40 | u32 cyc = readl(ctr); | 32 | return readl(ctr); |
41 | return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, | ||
42 | SC_MULT, SC_SHIFT); | ||
43 | } else | ||
44 | return 0; | ||
45 | } | ||
46 | 33 | ||
47 | static void notrace versatile_update_sched_clock(void) | 34 | return 0; |
48 | { | ||
49 | u32 cyc = readl(ctr); | ||
50 | update_sched_clock(&cd, cyc, (u32)~0); | ||
51 | } | 35 | } |
52 | 36 | ||
53 | void __init versatile_sched_clock_init(void __iomem *reg, unsigned long rate) | 37 | void __init versatile_sched_clock_init(void __iomem *reg, unsigned long rate) |
54 | { | 38 | { |
55 | ctr = reg; | 39 | ctr = reg; |
56 | init_fixed_sched_clock(&cd, versatile_update_sched_clock, | 40 | setup_sched_clock(versatile_read_sched_clock, 32, rate); |
57 | 32, rate, SC_MULT, SC_SHIFT); | ||
58 | } | 41 | } |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index ccbe16f47227..f9c9f33f8cbe 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -16,7 +16,7 @@ | |||
16 | # are merged into mainline or have been edited in the machine database | 16 | # are merged into mainline or have been edited in the machine database |
17 | # within the last 12 months. References to machine_is_NAME() do not count! | 17 | # within the last 12 months. References to machine_is_NAME() do not count! |
18 | # | 18 | # |
19 | # Last update: Sat May 7 08:48:24 2011 | 19 | # Last update: Tue Dec 6 11:07:38 2011 |
20 | # | 20 | # |
21 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 21 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
22 | # | 22 | # |
@@ -269,7 +269,7 @@ dns323 MACH_DNS323 DNS323 1542 | |||
269 | omap3_beagle MACH_OMAP3_BEAGLE OMAP3_BEAGLE 1546 | 269 | omap3_beagle MACH_OMAP3_BEAGLE OMAP3_BEAGLE 1546 |
270 | nokia_n810 MACH_NOKIA_N810 NOKIA_N810 1548 | 270 | nokia_n810 MACH_NOKIA_N810 NOKIA_N810 1548 |
271 | pcm038 MACH_PCM038 PCM038 1551 | 271 | pcm038 MACH_PCM038 PCM038 1551 |
272 | ts_x09 MACH_TS209 TS209 1565 | 272 | ts209 MACH_TS209 TS209 1565 |
273 | at91cap9adk MACH_AT91CAP9ADK AT91CAP9ADK 1566 | 273 | at91cap9adk MACH_AT91CAP9ADK AT91CAP9ADK 1566 |
274 | mx31moboard MACH_MX31MOBOARD MX31MOBOARD 1574 | 274 | mx31moboard MACH_MX31MOBOARD MX31MOBOARD 1574 |
275 | vision_ep9307 MACH_VISION_EP9307 VISION_EP9307 1578 | 275 | vision_ep9307 MACH_VISION_EP9307 VISION_EP9307 1578 |
@@ -321,7 +321,6 @@ lb88rc8480 MACH_LB88RC8480 LB88RC8480 1769 | |||
321 | mx25_3ds MACH_MX25_3DS MX25_3DS 1771 | 321 | mx25_3ds MACH_MX25_3DS MX25_3DS 1771 |
322 | omap3530_lv_som MACH_OMAP3530_LV_SOM OMAP3530_LV_SOM 1773 | 322 | omap3530_lv_som MACH_OMAP3530_LV_SOM OMAP3530_LV_SOM 1773 |
323 | davinci_da830_evm MACH_DAVINCI_DA830_EVM DAVINCI_DA830_EVM 1781 | 323 | davinci_da830_evm MACH_DAVINCI_DA830_EVM DAVINCI_DA830_EVM 1781 |
324 | at572d940hfek MACH_AT572D940HFEB AT572D940HFEB 1783 | ||
325 | dove_db MACH_DOVE_DB DOVE_DB 1788 | 324 | dove_db MACH_DOVE_DB DOVE_DB 1788 |
326 | overo MACH_OVERO OVERO 1798 | 325 | overo MACH_OVERO OVERO 1798 |
327 | at2440evb MACH_AT2440EVB AT2440EVB 1799 | 326 | at2440evb MACH_AT2440EVB AT2440EVB 1799 |
@@ -459,7 +458,7 @@ guruplug MACH_GURUPLUG GURUPLUG 2659 | |||
459 | spear310 MACH_SPEAR310 SPEAR310 2660 | 458 | spear310 MACH_SPEAR310 SPEAR310 2660 |
460 | spear320 MACH_SPEAR320 SPEAR320 2661 | 459 | spear320 MACH_SPEAR320 SPEAR320 2661 |
461 | aquila MACH_AQUILA AQUILA 2676 | 460 | aquila MACH_AQUILA AQUILA 2676 |
462 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 | 461 | esata_sheevaplug MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 |
463 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 | 462 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 |
464 | ea2478devkit MACH_EA2478DEVKIT EA2478DEVKIT 2683 | 463 | ea2478devkit MACH_EA2478DEVKIT EA2478DEVKIT 2683 |
465 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 | 464 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 |
@@ -491,380 +490,53 @@ eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35SD EUKREA_CPUIMX35SD 2821 | |||
491 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 | 490 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 |
492 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 | 491 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 |
493 | smdkc210 MACH_SMDKC210 SMDKC210 2838 | 492 | smdkc210 MACH_SMDKC210 SMDKC210 2838 |
494 | omap3_braillo MACH_OMAP3_BRAILLO OMAP3_BRAILLO 2839 | ||
495 | spyplug MACH_SPYPLUG SPYPLUG 2840 | ||
496 | ginger MACH_GINGER GINGER 2841 | ||
497 | tny_t3530 MACH_TNY_T3530 TNY_T3530 2842 | ||
498 | pca102 MACH_PCA102 PCA102 2843 | 493 | pca102 MACH_PCA102 PCA102 2843 |
499 | spade MACH_SPADE SPADE 2844 | ||
500 | mxc25_topaz MACH_MXC25_TOPAZ MXC25_TOPAZ 2845 | ||
501 | t5325 MACH_T5325 T5325 2846 | 494 | t5325 MACH_T5325 T5325 2846 |
502 | gw2361 MACH_GW2361 GW2361 2847 | ||
503 | elog MACH_ELOG ELOG 2848 | ||
504 | income MACH_INCOME INCOME 2849 | 495 | income MACH_INCOME INCOME 2849 |
505 | bcm589x MACH_BCM589X BCM589X 2850 | ||
506 | etna MACH_ETNA ETNA 2851 | ||
507 | hawks MACH_HAWKS HAWKS 2852 | ||
508 | meson MACH_MESON MESON 2853 | ||
509 | xsbase255 MACH_XSBASE255 XSBASE255 2854 | ||
510 | pvm2030 MACH_PVM2030 PVM2030 2855 | ||
511 | mioa502 MACH_MIOA502 MIOA502 2856 | ||
512 | vvbox_sdorig2 MACH_VVBOX_SDORIG2 VVBOX_SDORIG2 2857 | 496 | vvbox_sdorig2 MACH_VVBOX_SDORIG2 VVBOX_SDORIG2 2857 |
513 | vvbox_sdlite2 MACH_VVBOX_SDLITE2 VVBOX_SDLITE2 2858 | 497 | vvbox_sdlite2 MACH_VVBOX_SDLITE2 VVBOX_SDLITE2 2858 |
514 | vvbox_sdpro4 MACH_VVBOX_SDPRO4 VVBOX_SDPRO4 2859 | 498 | vvbox_sdpro4 MACH_VVBOX_SDPRO4 VVBOX_SDPRO4 2859 |
515 | htc_spv_m700 MACH_HTC_SPV_M700 HTC_SPV_M700 2860 | ||
516 | mx257sx MACH_MX257SX MX257SX 2861 | 499 | mx257sx MACH_MX257SX MX257SX 2861 |
517 | goni MACH_GONI GONI 2862 | 500 | goni MACH_GONI GONI 2862 |
518 | msm8x55_svlte_ffa MACH_MSM8X55_SVLTE_FFA MSM8X55_SVLTE_FFA 2863 | ||
519 | msm8x55_svlte_surf MACH_MSM8X55_SVLTE_SURF MSM8X55_SVLTE_SURF 2864 | ||
520 | quickstep MACH_QUICKSTEP QUICKSTEP 2865 | ||
521 | dmw96 MACH_DMW96 DMW96 2866 | ||
522 | hammerhead MACH_HAMMERHEAD HAMMERHEAD 2867 | ||
523 | trident MACH_TRIDENT TRIDENT 2868 | ||
524 | lightning MACH_LIGHTNING LIGHTNING 2869 | ||
525 | iconnect MACH_ICONNECT ICONNECT 2870 | ||
526 | autobot MACH_AUTOBOT AUTOBOT 2871 | ||
527 | coconut MACH_COCONUT COCONUT 2872 | ||
528 | durian MACH_DURIAN DURIAN 2873 | ||
529 | cayenne MACH_CAYENNE CAYENNE 2874 | ||
530 | fuji MACH_FUJI FUJI 2875 | ||
531 | synology_6282 MACH_SYNOLOGY_6282 SYNOLOGY_6282 2876 | ||
532 | em1sy MACH_EM1SY EM1SY 2877 | ||
533 | m502 MACH_M502 M502 2878 | ||
534 | matrix518 MACH_MATRIX518 MATRIX518 2879 | ||
535 | tiny_gurnard MACH_TINY_GURNARD TINY_GURNARD 2880 | ||
536 | spear1310 MACH_SPEAR1310 SPEAR1310 2881 | ||
537 | bv07 MACH_BV07 BV07 2882 | 501 | bv07 MACH_BV07 BV07 2882 |
538 | mxt_td61 MACH_MXT_TD61 MXT_TD61 2883 | ||
539 | openrd_ultimate MACH_OPENRD_ULTIMATE OPENRD_ULTIMATE 2884 | 502 | openrd_ultimate MACH_OPENRD_ULTIMATE OPENRD_ULTIMATE 2884 |
540 | devixp MACH_DEVIXP DEVIXP 2885 | 503 | devixp MACH_DEVIXP DEVIXP 2885 |
541 | miccpt MACH_MICCPT MICCPT 2886 | 504 | miccpt MACH_MICCPT MICCPT 2886 |
542 | mic256 MACH_MIC256 MIC256 2887 | 505 | mic256 MACH_MIC256 MIC256 2887 |
543 | as1167 MACH_AS1167 AS1167 2888 | ||
544 | omap3_ibiza MACH_OMAP3_IBIZA OMAP3_IBIZA 2889 | ||
545 | u5500 MACH_U5500 U5500 2890 | 506 | u5500 MACH_U5500 U5500 2890 |
546 | davinci_picto MACH_DAVINCI_PICTO DAVINCI_PICTO 2891 | ||
547 | mecha MACH_MECHA MECHA 2892 | ||
548 | bubba3 MACH_BUBBA3 BUBBA3 2893 | ||
549 | pupitre MACH_PUPITRE PUPITRE 2894 | ||
550 | tegra_vogue MACH_TEGRA_VOGUE TEGRA_VOGUE 2896 | ||
551 | tegra_e1165 MACH_TEGRA_E1165 TEGRA_E1165 2897 | ||
552 | simplenet MACH_SIMPLENET SIMPLENET 2898 | ||
553 | ec4350tbm MACH_EC4350TBM EC4350TBM 2899 | ||
554 | pec_tc MACH_PEC_TC PEC_TC 2900 | ||
555 | pec_hc2 MACH_PEC_HC2 PEC_HC2 2901 | ||
556 | esl_mobilis_a MACH_ESL_MOBILIS_A ESL_MOBILIS_A 2902 | ||
557 | esl_mobilis_b MACH_ESL_MOBILIS_B ESL_MOBILIS_B 2903 | ||
558 | esl_wave_a MACH_ESL_WAVE_A ESL_WAVE_A 2904 | ||
559 | esl_wave_b MACH_ESL_WAVE_B ESL_WAVE_B 2905 | ||
560 | unisense_mmm MACH_UNISENSE_MMM UNISENSE_MMM 2906 | ||
561 | blueshark MACH_BLUESHARK BLUESHARK 2907 | ||
562 | e10 MACH_E10 E10 2908 | ||
563 | app3k_robin MACH_APP3K_ROBIN APP3K_ROBIN 2909 | ||
564 | pov15hd MACH_POV15HD POV15HD 2910 | ||
565 | stella MACH_STELLA STELLA 2911 | ||
566 | linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913 | 507 | linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913 |
567 | netwalker MACH_NETWALKER NETWALKER 2914 | ||
568 | acsx106 MACH_ACSX106 ACSX106 2915 | ||
569 | atlas5_c1 MACH_ATLAS5_C1 ATLAS5_C1 2916 | ||
570 | nsb3ast MACH_NSB3AST NSB3AST 2917 | ||
571 | gnet_slc MACH_GNET_SLC GNET_SLC 2918 | ||
572 | af4000 MACH_AF4000 AF4000 2919 | ||
573 | ark9431 MACH_ARK9431 ARK9431 2920 | ||
574 | fs_s5pc100 MACH_FS_S5PC100 FS_S5PC100 2921 | ||
575 | omap3505nova8 MACH_OMAP3505NOVA8 OMAP3505NOVA8 2922 | ||
576 | omap3621_edp1 MACH_OMAP3621_EDP1 OMAP3621_EDP1 2923 | ||
577 | oratisaes MACH_ORATISAES ORATISAES 2924 | ||
578 | smdkv310 MACH_SMDKV310 SMDKV310 2925 | 508 | smdkv310 MACH_SMDKV310 SMDKV310 2925 |
579 | siemens_l0 MACH_SIEMENS_L0 SIEMENS_L0 2926 | ||
580 | ventana MACH_VENTANA VENTANA 2927 | ||
581 | wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928 | 509 | wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928 |
582 | ec4350sdb MACH_EC4350SDB EC4350SDB 2929 | ||
583 | mimas MACH_MIMAS MIMAS 2930 | ||
584 | titan MACH_TITAN TITAN 2931 | ||
585 | craneboard MACH_CRANEBOARD CRANEBOARD 2932 | 510 | craneboard MACH_CRANEBOARD CRANEBOARD 2932 |
586 | es2440 MACH_ES2440 ES2440 2933 | ||
587 | najay_a9263 MACH_NAJAY_A9263 NAJAY_A9263 2934 | ||
588 | htctornado MACH_HTCTORNADO HTCTORNADO 2935 | ||
589 | dimm_mx257 MACH_DIMM_MX257 DIMM_MX257 2936 | ||
590 | jigen301 MACH_JIGEN JIGEN 2937 | ||
591 | smdk6450 MACH_SMDK6450 SMDK6450 2938 | 511 | smdk6450 MACH_SMDK6450 SMDK6450 2938 |
592 | meno_qng MACH_MENO_QNG MENO_QNG 2939 | ||
593 | ns2416 MACH_NS2416 NS2416 2940 | ||
594 | rpc353 MACH_RPC353 RPC353 2941 | ||
595 | tq6410 MACH_TQ6410 TQ6410 2942 | ||
596 | sky6410 MACH_SKY6410 SKY6410 2943 | ||
597 | dynasty MACH_DYNASTY DYNASTY 2944 | ||
598 | vivo MACH_VIVO VIVO 2945 | ||
599 | bury_bl7582 MACH_BURY_BL7582 BURY_BL7582 2946 | ||
600 | bury_bps5270 MACH_BURY_BPS5270 BURY_BPS5270 2947 | ||
601 | basi MACH_BASI BASI 2948 | ||
602 | tn200 MACH_TN200 TN200 2949 | ||
603 | c2mmi MACH_C2MMI C2MMI 2950 | ||
604 | meson_6236m MACH_MESON_6236M MESON_6236M 2951 | ||
605 | meson_8626m MACH_MESON_8626M MESON_8626M 2952 | ||
606 | tube MACH_TUBE TUBE 2953 | ||
607 | messina MACH_MESSINA MESSINA 2954 | ||
608 | mx50_arm2 MACH_MX50_ARM2 MX50_ARM2 2955 | ||
609 | cetus9263 MACH_CETUS9263 CETUS9263 2956 | ||
610 | brownstone MACH_BROWNSTONE BROWNSTONE 2957 | 512 | brownstone MACH_BROWNSTONE BROWNSTONE 2957 |
611 | vmx25 MACH_VMX25 VMX25 2958 | ||
612 | vmx51 MACH_VMX51 VMX51 2959 | ||
613 | abacus MACH_ABACUS ABACUS 2960 | ||
614 | cm4745 MACH_CM4745 CM4745 2961 | ||
615 | oratislink MACH_ORATISLINK ORATISLINK 2962 | ||
616 | davinci_dm365_dvr MACH_DAVINCI_DM365_DVR DAVINCI_DM365_DVR 2963 | ||
617 | netviz MACH_NETVIZ NETVIZ 2964 | ||
618 | flexibity MACH_FLEXIBITY FLEXIBITY 2965 | 513 | flexibity MACH_FLEXIBITY FLEXIBITY 2965 |
619 | wlan_computer MACH_WLAN_COMPUTER WLAN_COMPUTER 2966 | ||
620 | lpc24xx MACH_LPC24XX LPC24XX 2967 | ||
621 | spica MACH_SPICA SPICA 2968 | ||
622 | gpsdisplay MACH_GPSDISPLAY GPSDISPLAY 2969 | ||
623 | bipnet MACH_BIPNET BIPNET 2970 | ||
624 | overo_ctu_inertial MACH_OVERO_CTU_INERTIAL OVERO_CTU_INERTIAL 2971 | ||
625 | davinci_dm355_mmm MACH_DAVINCI_DM355_MMM DAVINCI_DM355_MMM 2972 | ||
626 | pc9260_v2 MACH_PC9260_V2 PC9260_V2 2973 | ||
627 | ptx7545 MACH_PTX7545 PTX7545 2974 | ||
628 | tm_efdc MACH_TM_EFDC TM_EFDC 2975 | ||
629 | omap3_waldo1 MACH_OMAP3_WALDO1 OMAP3_WALDO1 2977 | ||
630 | flyer MACH_FLYER FLYER 2978 | ||
631 | tornado3240 MACH_TORNADO3240 TORNADO3240 2979 | ||
632 | soli_01 MACH_SOLI_01 SOLI_01 2980 | ||
633 | omapl138_europalc MACH_OMAPL138_EUROPALC OMAPL138_EUROPALC 2981 | ||
634 | helios_v1 MACH_HELIOS_V1 HELIOS_V1 2982 | ||
635 | netspace_lite_v2 MACH_NETSPACE_LITE_V2 NETSPACE_LITE_V2 2983 | ||
636 | ssc MACH_SSC SSC 2984 | ||
637 | premierwave_en MACH_PREMIERWAVE_EN PREMIERWAVE_EN 2985 | ||
638 | wasabi MACH_WASABI WASABI 2986 | ||
639 | mx50_rdp MACH_MX50_RDP MX50_RDP 2988 | 514 | mx50_rdp MACH_MX50_RDP MX50_RDP 2988 |
640 | universal_c210 MACH_UNIVERSAL_C210 UNIVERSAL_C210 2989 | 515 | universal_c210 MACH_UNIVERSAL_C210 UNIVERSAL_C210 2989 |
641 | real6410 MACH_REAL6410 REAL6410 2990 | 516 | real6410 MACH_REAL6410 REAL6410 2990 |
642 | spx_sakura MACH_SPX_SAKURA SPX_SAKURA 2991 | ||
643 | ij3k_2440 MACH_IJ3K_2440 IJ3K_2440 2992 | ||
644 | omap3_bc10 MACH_OMAP3_BC10 OMAP3_BC10 2993 | ||
645 | thebe MACH_THEBE THEBE 2994 | ||
646 | rv082 MACH_RV082 RV082 2995 | ||
647 | armlguest MACH_ARMLGUEST ARMLGUEST 2996 | ||
648 | tjinc1000 MACH_TJINC1000 TJINC1000 2997 | ||
649 | dockstar MACH_DOCKSTAR DOCKSTAR 2998 | 517 | dockstar MACH_DOCKSTAR DOCKSTAR 2998 |
650 | ax8008 MACH_AX8008 AX8008 2999 | ||
651 | gnet_sgce MACH_GNET_SGCE GNET_SGCE 3000 | ||
652 | pxwnas_500_1000 MACH_PXWNAS_500_1000 PXWNAS_500_1000 3001 | ||
653 | ea20 MACH_EA20 EA20 3002 | ||
654 | awm2 MACH_AWM2 AWM2 3003 | ||
655 | ti8148evm MACH_TI8148EVM TI8148EVM 3004 | 518 | ti8148evm MACH_TI8148EVM TI8148EVM 3004 |
656 | seaboard MACH_SEABOARD SEABOARD 3005 | 519 | seaboard MACH_SEABOARD SEABOARD 3005 |
657 | linkstation_chlv2 MACH_LINKSTATION_CHLV2 LINKSTATION_CHLV2 3006 | ||
658 | tera_pro2_rack MACH_TERA_PRO2_RACK TERA_PRO2_RACK 3007 | ||
659 | rubys MACH_RUBYS RUBYS 3008 | ||
660 | aquarius MACH_AQUARIUS AQUARIUS 3009 | ||
661 | mx53_ard MACH_MX53_ARD MX53_ARD 3010 | 520 | mx53_ard MACH_MX53_ARD MX53_ARD 3010 |
662 | mx53_smd MACH_MX53_SMD MX53_SMD 3011 | 521 | mx53_smd MACH_MX53_SMD MX53_SMD 3011 |
663 | lswxl MACH_LSWXL LSWXL 3012 | ||
664 | dove_avng_v3 MACH_DOVE_AVNG_V3 DOVE_AVNG_V3 3013 | ||
665 | sdi_ess_9263 MACH_SDI_ESS_9263 SDI_ESS_9263 3014 | ||
666 | jocpu550 MACH_JOCPU550 JOCPU550 3015 | ||
667 | msm8x60_rumi3 MACH_MSM8X60_RUMI3 MSM8X60_RUMI3 3016 | 522 | msm8x60_rumi3 MACH_MSM8X60_RUMI3 MSM8X60_RUMI3 3016 |
668 | msm8x60_ffa MACH_MSM8X60_FFA MSM8X60_FFA 3017 | 523 | msm8x60_ffa MACH_MSM8X60_FFA MSM8X60_FFA 3017 |
669 | yanomami MACH_YANOMAMI YANOMAMI 3018 | ||
670 | gta04 MACH_GTA04 GTA04 3019 | ||
671 | cm_a510 MACH_CM_A510 CM_A510 3020 | 524 | cm_a510 MACH_CM_A510 CM_A510 3020 |
672 | omap3_rfs200 MACH_OMAP3_RFS200 OMAP3_RFS200 3021 | ||
673 | kx33xx MACH_KX33XX KX33XX 3022 | ||
674 | ptx7510 MACH_PTX7510 PTX7510 3023 | ||
675 | top9000 MACH_TOP9000 TOP9000 3024 | ||
676 | teenote MACH_TEENOTE TEENOTE 3025 | ||
677 | ts3 MACH_TS3 TS3 3026 | ||
678 | a0 MACH_A0 A0 3027 | ||
679 | fsm9xxx_surf MACH_FSM9XXX_SURF FSM9XXX_SURF 3028 | ||
680 | fsm9xxx_ffa MACH_FSM9XXX_FFA FSM9XXX_FFA 3029 | ||
681 | frrhwcdma60w MACH_FRRHWCDMA60W FRRHWCDMA60W 3030 | ||
682 | remus MACH_REMUS REMUS 3031 | ||
683 | at91cap7xdk MACH_AT91CAP7XDK AT91CAP7XDK 3032 | ||
684 | at91cap7stk MACH_AT91CAP7STK AT91CAP7STK 3033 | ||
685 | kt_sbc_sam9_1 MACH_KT_SBC_SAM9_1 KT_SBC_SAM9_1 3034 | ||
686 | armada_xp_db MACH_ARMADA_XP_DB ARMADA_XP_DB 3036 | ||
687 | spdm MACH_SPDM SPDM 3037 | ||
688 | gtib MACH_GTIB GTIB 3038 | ||
689 | dgm3240 MACH_DGM3240 DGM3240 3039 | ||
690 | htcmega MACH_HTCMEGA HTCMEGA 3041 | ||
691 | tricorder MACH_TRICORDER TRICORDER 3042 | ||
692 | tx28 MACH_TX28 TX28 3043 | 525 | tx28 MACH_TX28 TX28 3043 |
693 | bstbrd MACH_BSTBRD BSTBRD 3044 | ||
694 | pwb3090 MACH_PWB3090 PWB3090 3045 | ||
695 | idea6410 MACH_IDEA6410 IDEA6410 3046 | ||
696 | qbc9263 MACH_QBC9263 QBC9263 3047 | ||
697 | borabora MACH_BORABORA BORABORA 3048 | ||
698 | valdez MACH_VALDEZ VALDEZ 3049 | ||
699 | ls9g20 MACH_LS9G20 LS9G20 3050 | ||
700 | mios_v1 MACH_MIOS_V1 MIOS_V1 3051 | ||
701 | s5pc110_crespo MACH_S5PC110_CRESPO S5PC110_CRESPO 3052 | ||
702 | controltek9g20 MACH_CONTROLTEK9G20 CONTROLTEK9G20 3053 | ||
703 | tin307 MACH_TIN307 TIN307 3054 | ||
704 | tin510 MACH_TIN510 TIN510 3055 | ||
705 | bluecheese MACH_BLUECHEESE BLUECHEESE 3057 | ||
706 | tem3x30 MACH_TEM3X30 TEM3X30 3058 | ||
707 | harvest_desoto MACH_HARVEST_DESOTO HARVEST_DESOTO 3059 | ||
708 | msm8x60_qrdc MACH_MSM8X60_QRDC MSM8X60_QRDC 3060 | ||
709 | spear900 MACH_SPEAR900 SPEAR900 3061 | ||
710 | pcontrol_g20 MACH_PCONTROL_G20 PCONTROL_G20 3062 | 526 | pcontrol_g20 MACH_PCONTROL_G20 PCONTROL_G20 3062 |
711 | rdstor MACH_RDSTOR RDSTOR 3063 | ||
712 | usdloader MACH_USDLOADER USDLOADER 3064 | ||
713 | tsoploader MACH_TSOPLOADER TSOPLOADER 3065 | ||
714 | kronos MACH_KRONOS KRONOS 3066 | ||
715 | ffcore MACH_FFCORE FFCORE 3067 | ||
716 | mone MACH_MONE MONE 3068 | ||
717 | unit2s MACH_UNIT2S UNIT2S 3069 | ||
718 | acer_a5 MACH_ACER_A5 ACER_A5 3070 | ||
719 | etherpro_isp MACH_ETHERPRO_ISP ETHERPRO_ISP 3071 | ||
720 | stretchs7000 MACH_STRETCHS7000 STRETCHS7000 3072 | ||
721 | p87_smartsim MACH_P87_SMARTSIM P87_SMARTSIM 3073 | ||
722 | tulip MACH_TULIP TULIP 3074 | ||
723 | sunflower MACH_SUNFLOWER SUNFLOWER 3075 | ||
724 | rib MACH_RIB RIB 3076 | ||
725 | clod MACH_CLOD CLOD 3077 | ||
726 | rump MACH_RUMP RUMP 3078 | ||
727 | tenderloin MACH_TENDERLOIN TENDERLOIN 3079 | ||
728 | shortloin MACH_SHORTLOIN SHORTLOIN 3080 | ||
729 | antares MACH_ANTARES ANTARES 3082 | ||
730 | wb40n MACH_WB40N WB40N 3083 | ||
731 | herring MACH_HERRING HERRING 3084 | ||
732 | naxy400 MACH_NAXY400 NAXY400 3085 | ||
733 | naxy1200 MACH_NAXY1200 NAXY1200 3086 | ||
734 | vpr200 MACH_VPR200 VPR200 3087 | 527 | vpr200 MACH_VPR200 VPR200 3087 |
735 | bug20 MACH_BUG20 BUG20 3088 | ||
736 | goflexnet MACH_GOFLEXNET GOFLEXNET 3089 | ||
737 | torbreck MACH_TORBRECK TORBRECK 3090 | 528 | torbreck MACH_TORBRECK TORBRECK 3090 |
738 | saarb_mg1 MACH_SAARB_MG1 SAARB_MG1 3091 | ||
739 | callisto MACH_CALLISTO CALLISTO 3092 | ||
740 | multhsu MACH_MULTHSU MULTHSU 3093 | ||
741 | saluda MACH_SALUDA SALUDA 3094 | ||
742 | pemp_omap3_apollo MACH_PEMP_OMAP3_APOLLO PEMP_OMAP3_APOLLO 3095 | ||
743 | vc0718 MACH_VC0718 VC0718 3096 | ||
744 | mvblx MACH_MVBLX MVBLX 3097 | ||
745 | inhand_apeiron MACH_INHAND_APEIRON INHAND_APEIRON 3098 | ||
746 | inhand_fury MACH_INHAND_FURY INHAND_FURY 3099 | ||
747 | inhand_siren MACH_INHAND_SIREN INHAND_SIREN 3100 | ||
748 | hdnvp MACH_HDNVP HDNVP 3101 | ||
749 | softwinner MACH_SOFTWINNER SOFTWINNER 3102 | ||
750 | prima2_evb MACH_PRIMA2_EVB PRIMA2_EVB 3103 | 529 | prima2_evb MACH_PRIMA2_EVB PRIMA2_EVB 3103 |
751 | nas6210 MACH_NAS6210 NAS6210 3104 | ||
752 | unisdev MACH_UNISDEV UNISDEV 3105 | ||
753 | sbca11 MACH_SBCA11 SBCA11 3106 | ||
754 | saga MACH_SAGA SAGA 3107 | ||
755 | ns_k330 MACH_NS_K330 NS_K330 3108 | ||
756 | tanna MACH_TANNA TANNA 3109 | ||
757 | imate8502 MACH_IMATE8502 IMATE8502 3110 | ||
758 | aspen MACH_ASPEN ASPEN 3111 | ||
759 | daintree_cwac MACH_DAINTREE_CWAC DAINTREE_CWAC 3112 | ||
760 | zmx25 MACH_ZMX25 ZMX25 3113 | ||
761 | maple1 MACH_MAPLE1 MAPLE1 3114 | ||
762 | qsd8x72_surf MACH_QSD8X72_SURF QSD8X72_SURF 3115 | ||
763 | qsd8x72_ffa MACH_QSD8X72_FFA QSD8X72_FFA 3116 | ||
764 | abilene MACH_ABILENE ABILENE 3117 | ||
765 | eigen_ttr MACH_EIGEN_TTR EIGEN_TTR 3118 | ||
766 | iomega_ix2_200 MACH_IOMEGA_IX2_200 IOMEGA_IX2_200 3119 | ||
767 | coretec_vcx7400 MACH_CORETEC_VCX7400 CORETEC_VCX7400 3120 | ||
768 | santiago MACH_SANTIAGO SANTIAGO 3121 | ||
769 | mx257sol MACH_MX257SOL MX257SOL 3122 | ||
770 | strasbourg MACH_STRASBOURG STRASBOURG 3123 | ||
771 | msm8x60_fluid MACH_MSM8X60_FLUID MSM8X60_FLUID 3124 | ||
772 | smartqv5 MACH_SMARTQV5 SMARTQV5 3125 | ||
773 | smartqv3 MACH_SMARTQV3 SMARTQV3 3126 | ||
774 | smartqv7 MACH_SMARTQV7 SMARTQV7 3127 | ||
775 | paz00 MACH_PAZ00 PAZ00 3128 | 530 | paz00 MACH_PAZ00 PAZ00 3128 |
776 | acmenetusfoxg20 MACH_ACMENETUSFOXG20 ACMENETUSFOXG20 3129 | 531 | acmenetusfoxg20 MACH_ACMENETUSFOXG20 ACMENETUSFOXG20 3129 |
777 | fwbd_0404 MACH_FWBD_0404 FWBD_0404 3131 | ||
778 | hdgu MACH_HDGU HDGU 3132 | ||
779 | pyramid MACH_PYRAMID PYRAMID 3133 | ||
780 | epiphan MACH_EPIPHAN EPIPHAN 3134 | ||
781 | omap_bender MACH_OMAP_BENDER OMAP_BENDER 3135 | ||
782 | gurnard MACH_GURNARD GURNARD 3136 | ||
783 | gtl_it5100 MACH_GTL_IT5100 GTL_IT5100 3137 | ||
784 | bcm2708 MACH_BCM2708 BCM2708 3138 | ||
785 | mx51_ggc MACH_MX51_GGC MX51_GGC 3139 | ||
786 | sharespace MACH_SHARESPACE SHARESPACE 3140 | ||
787 | haba_knx_explorer MACH_HABA_KNX_EXPLORER HABA_KNX_EXPLORER 3141 | ||
788 | simtec_kirkmod MACH_SIMTEC_KIRKMOD SIMTEC_KIRKMOD 3142 | ||
789 | crux MACH_CRUX CRUX 3143 | ||
790 | mx51_bravo MACH_MX51_BRAVO MX51_BRAVO 3144 | ||
791 | charon MACH_CHARON CHARON 3145 | ||
792 | picocom3 MACH_PICOCOM3 PICOCOM3 3146 | ||
793 | picocom4 MACH_PICOCOM4 PICOCOM4 3147 | ||
794 | serrano MACH_SERRANO SERRANO 3148 | ||
795 | doubleshot MACH_DOUBLESHOT DOUBLESHOT 3149 | ||
796 | evsy MACH_EVSY EVSY 3150 | ||
797 | huashan MACH_HUASHAN HUASHAN 3151 | ||
798 | lausanne MACH_LAUSANNE LAUSANNE 3152 | ||
799 | emerald MACH_EMERALD EMERALD 3153 | ||
800 | tqma35 MACH_TQMA35 TQMA35 3154 | ||
801 | marvel MACH_MARVEL MARVEL 3155 | ||
802 | manuae MACH_MANUAE MANUAE 3156 | ||
803 | chacha MACH_CHACHA CHACHA 3157 | ||
804 | lemon MACH_LEMON LEMON 3158 | ||
805 | csc MACH_CSC CSC 3159 | ||
806 | gira_knxip_router MACH_GIRA_KNXIP_ROUTER GIRA_KNXIP_ROUTER 3160 | ||
807 | t20 MACH_T20 T20 3161 | ||
808 | hdmini MACH_HDMINI HDMINI 3162 | ||
809 | sciphone_g2 MACH_SCIPHONE_G2 SCIPHONE_G2 3163 | ||
810 | express MACH_EXPRESS EXPRESS 3164 | ||
811 | express_kt MACH_EXPRESS_KT EXPRESS_KT 3165 | ||
812 | maximasp MACH_MAXIMASP MAXIMASP 3166 | ||
813 | nitrogen_imx51 MACH_NITROGEN_IMX51 NITROGEN_IMX51 3167 | ||
814 | nitrogen_imx53 MACH_NITROGEN_IMX53 NITROGEN_IMX53 3168 | ||
815 | sunfire MACH_SUNFIRE SUNFIRE 3169 | ||
816 | arowana MACH_AROWANA AROWANA 3170 | ||
817 | tegra_daytona MACH_TEGRA_DAYTONA TEGRA_DAYTONA 3171 | ||
818 | tegra_swordfish MACH_TEGRA_SWORDFISH TEGRA_SWORDFISH 3172 | ||
819 | edison MACH_EDISON EDISON 3173 | ||
820 | svp8500v1 MACH_SVP8500V1 SVP8500V1 3174 | ||
821 | svp8500v2 MACH_SVP8500V2 SVP8500V2 3175 | ||
822 | svp5500 MACH_SVP5500 SVP5500 3176 | ||
823 | b5500 MACH_B5500 B5500 3177 | ||
824 | s5500 MACH_S5500 S5500 3178 | ||
825 | icon MACH_ICON ICON 3179 | ||
826 | elephant MACH_ELEPHANT ELEPHANT 3180 | ||
827 | shooter MACH_SHOOTER SHOOTER 3182 | ||
828 | spade_lte MACH_SPADE_LTE SPADE_LTE 3183 | ||
829 | philhwani MACH_PHILHWANI PHILHWANI 3184 | ||
830 | gsncomm MACH_GSNCOMM GSNCOMM 3185 | ||
831 | strasbourg_a2 MACH_STRASBOURG_A2 STRASBOURG_A2 3186 | ||
832 | mmm MACH_MMM MMM 3187 | ||
833 | davinci_dm365_bv MACH_DAVINCI_DM365_BV DAVINCI_DM365_BV 3188 | ||
834 | ag5evm MACH_AG5EVM AG5EVM 3189 | 532 | ag5evm MACH_AG5EVM AG5EVM 3189 |
835 | sc575plc MACH_SC575PLC SC575PLC 3190 | ||
836 | sc575hmi MACH_SC575IPC SC575IPC 3191 | ||
837 | omap3_tdm3730 MACH_OMAP3_TDM3730 OMAP3_TDM3730 3192 | ||
838 | top9000_eval MACH_TOP9000_EVAL TOP9000_EVAL 3194 | ||
839 | top9000_su MACH_TOP9000_SU TOP9000_SU 3195 | ||
840 | utm300 MACH_UTM300 UTM300 3196 | ||
841 | tsunagi MACH_TSUNAGI TSUNAGI 3197 | 533 | tsunagi MACH_TSUNAGI TSUNAGI 3197 |
842 | ts75xx MACH_TS75XX TS75XX 3198 | ||
843 | ts47xx MACH_TS47XX TS47XX 3200 | ||
844 | da850_k5 MACH_DA850_K5 DA850_K5 3201 | ||
845 | ax502 MACH_AX502 AX502 3202 | ||
846 | igep0032 MACH_IGEP0032 IGEP0032 3203 | ||
847 | antero MACH_ANTERO ANTERO 3204 | ||
848 | synergy MACH_SYNERGY SYNERGY 3205 | ||
849 | ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 | 534 | ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 |
850 | wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 | 535 | wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 |
851 | punica MACH_PUNICA PUNICA 3208 | ||
852 | trimslice MACH_TRIMSLICE TRIMSLICE 3209 | 536 | trimslice MACH_TRIMSLICE TRIMSLICE 3209 |
853 | mx27_wmultra MACH_MX27_WMULTRA MX27_WMULTRA 3210 | ||
854 | mackerel MACH_MACKEREL MACKEREL 3211 | 537 | mackerel MACH_MACKEREL MACKEREL 3211 |
855 | fa9x27 MACH_FA9X27 FA9X27 3213 | ||
856 | ns2816tb MACH_NS2816TB NS2816TB 3214 | ||
857 | ns2816_ntpad MACH_NS2816_NTPAD NS2816_NTPAD 3215 | ||
858 | ns2816_ntnb MACH_NS2816_NTNB NS2816_NTNB 3216 | ||
859 | kaen MACH_KAEN KAEN 3217 | 538 | kaen MACH_KAEN KAEN 3217 |
860 | nv1000 MACH_NV1000 NV1000 3218 | ||
861 | nuc950ts MACH_NUC950TS NUC950TS 3219 | ||
862 | nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220 | 539 | nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220 |
863 | ast2200 MACH_AST2200 AST2200 3221 | ||
864 | lead MACH_LEAD LEAD 3222 | ||
865 | unino1 MACH_UNINO1 UNINO1 3223 | ||
866 | greeco MACH_GREECO GREECO 3224 | ||
867 | verdi MACH_VERDI VERDI 3225 | ||
868 | dm6446_adbox MACH_DM6446_ADBOX DM6446_ADBOX 3226 | 540 | dm6446_adbox MACH_DM6446_ADBOX DM6446_ADBOX 3226 |
869 | quad_salsa MACH_QUAD_SALSA QUAD_SALSA 3227 | 541 | quad_salsa MACH_QUAD_SALSA QUAD_SALSA 3227 |
870 | abb_gma_1_1 MACH_ABB_GMA_1_1 ABB_GMA_1_1 3228 | 542 | abb_gma_1_1 MACH_ABB_GMA_1_1 ABB_GMA_1_1 3228 |
@@ -949,13 +621,11 @@ koi MACH_KOI KOI 3312 | |||
949 | ts4800 MACH_TS4800 TS4800 3313 | 621 | ts4800 MACH_TS4800 TS4800 3313 |
950 | tqma9263 MACH_TQMA9263 TQMA9263 3314 | 622 | tqma9263 MACH_TQMA9263 TQMA9263 3314 |
951 | holiday MACH_HOLIDAY HOLIDAY 3315 | 623 | holiday MACH_HOLIDAY HOLIDAY 3315 |
952 | dma_6410 MACH_DMA6410 DMA6410 3316 | ||
953 | pcats_overlay MACH_PCATS_OVERLAY PCATS_OVERLAY 3317 | 624 | pcats_overlay MACH_PCATS_OVERLAY PCATS_OVERLAY 3317 |
954 | hwgw6410 MACH_HWGW6410 HWGW6410 3318 | 625 | hwgw6410 MACH_HWGW6410 HWGW6410 3318 |
955 | shenzhou MACH_SHENZHOU SHENZHOU 3319 | 626 | shenzhou MACH_SHENZHOU SHENZHOU 3319 |
956 | cwme9210 MACH_CWME9210 CWME9210 3320 | 627 | cwme9210 MACH_CWME9210 CWME9210 3320 |
957 | cwme9210js MACH_CWME9210JS CWME9210JS 3321 | 628 | cwme9210js MACH_CWME9210JS CWME9210JS 3321 |
958 | pgs_v1 MACH_PGS_SITARA PGS_SITARA 3322 | ||
959 | colibri_tegra2 MACH_COLIBRI_TEGRA2 COLIBRI_TEGRA2 3323 | 629 | colibri_tegra2 MACH_COLIBRI_TEGRA2 COLIBRI_TEGRA2 3323 |
960 | w21 MACH_W21 W21 3324 | 630 | w21 MACH_W21 W21 3324 |
961 | polysat1 MACH_POLYSAT1 POLYSAT1 3325 | 631 | polysat1 MACH_POLYSAT1 POLYSAT1 3325 |
@@ -1021,13 +691,11 @@ viprinet MACH_VIPRINET VIPRINET 3385 | |||
1021 | bockw MACH_BOCKW BOCKW 3386 | 691 | bockw MACH_BOCKW BOCKW 3386 |
1022 | eva2000 MACH_EVA2000 EVA2000 3387 | 692 | eva2000 MACH_EVA2000 EVA2000 3387 |
1023 | steelyard MACH_STEELYARD STEELYARD 3388 | 693 | steelyard MACH_STEELYARD STEELYARD 3388 |
1024 | sdh001 MACH_MACH_SDH001 MACH_SDH001 3390 | ||
1025 | nsslsboard MACH_NSSLSBOARD NSSLSBOARD 3392 | 694 | nsslsboard MACH_NSSLSBOARD NSSLSBOARD 3392 |
1026 | geneva_b5 MACH_GENEVA_B5 GENEVA_B5 3393 | 695 | geneva_b5 MACH_GENEVA_B5 GENEVA_B5 3393 |
1027 | spear1340 MACH_SPEAR1340 SPEAR1340 3394 | 696 | spear1340 MACH_SPEAR1340 SPEAR1340 3394 |
1028 | rexmas MACH_REXMAS REXMAS 3395 | 697 | rexmas MACH_REXMAS REXMAS 3395 |
1029 | msm8960_cdp MACH_MSM8960_CDP MSM8960_CDP 3396 | 698 | msm8960_cdp MACH_MSM8960_CDP MSM8960_CDP 3396 |
1030 | msm8960_mdp MACH_MSM8960_MDP MSM8960_MDP 3397 | ||
1031 | msm8960_fluid MACH_MSM8960_FLUID MSM8960_FLUID 3398 | 699 | msm8960_fluid MACH_MSM8960_FLUID MSM8960_FLUID 3398 |
1032 | msm8960_apq MACH_MSM8960_APQ MSM8960_APQ 3399 | 700 | msm8960_apq MACH_MSM8960_APQ MSM8960_APQ 3399 |
1033 | helios_v2 MACH_HELIOS_V2 HELIOS_V2 3400 | 701 | helios_v2 MACH_HELIOS_V2 HELIOS_V2 3400 |
@@ -1123,6 +791,381 @@ blissc MACH_BLISSC BLISSC 3491 | |||
1123 | thales_adc MACH_THALES_ADC THALES_ADC 3492 | 791 | thales_adc MACH_THALES_ADC THALES_ADC 3492 |
1124 | ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 | 792 | ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 |
1125 | atdgp318 MACH_ATDGP318 ATDGP318 3494 | 793 | atdgp318 MACH_ATDGP318 ATDGP318 3494 |
794 | dma210u MACH_DMA210U DMA210U 3495 | ||
795 | em_t3 MACH_EM_T3 EM_T3 3496 | ||
796 | htx3250 MACH_HTX3250 HTX3250 3497 | ||
797 | g50 MACH_G50 G50 3498 | ||
798 | eco5 MACH_ECO5 ECO5 3499 | ||
799 | wintergrasp MACH_WINTERGRASP WINTERGRASP 3500 | ||
800 | puro MACH_PURO PURO 3501 | ||
801 | shooter_k MACH_SHOOTER_K SHOOTER_K 3502 | ||
802 | nspire MACH_NSPIRE NSPIRE 3503 | ||
803 | mickxx MACH_MICKXX MICKXX 3504 | ||
804 | lxmb MACH_LXMB LXMB 3505 | ||
805 | adam MACH_ADAM ADAM 3507 | ||
806 | b1004 MACH_B1004 B1004 3508 | ||
807 | oboea MACH_OBOEA OBOEA 3509 | ||
808 | a1015 MACH_A1015 A1015 3510 | ||
809 | robin_vbdt30 MACH_ROBIN_VBDT30 ROBIN_VBDT30 3511 | ||
810 | tegra_enterprise MACH_TEGRA_ENTERPRISE TEGRA_ENTERPRISE 3512 | ||
811 | rfl108200_mk10 MACH_RFL108200_MK10 RFL108200_MK10 3513 | ||
812 | rfl108300_mk16 MACH_RFL108300_MK16 RFL108300_MK16 3514 | ||
813 | rover_v7 MACH_ROVER_V7 ROVER_V7 3515 | ||
814 | miphone MACH_MIPHONE MIPHONE 3516 | ||
815 | femtobts MACH_FEMTOBTS FEMTOBTS 3517 | ||
816 | monopoli MACH_MONOPOLI MONOPOLI 3518 | ||
817 | boss MACH_BOSS BOSS 3519 | ||
818 | davinci_dm368_vtam MACH_DAVINCI_DM368_VTAM DAVINCI_DM368_VTAM 3520 | ||
819 | clcon MACH_CLCON CLCON 3521 | ||
820 | nokia_rm696 MACH_NOKIA_RM696 NOKIA_RM696 3522 | ||
821 | tahiti MACH_TAHITI TAHITI 3523 | ||
822 | fighter MACH_FIGHTER FIGHTER 3524 | ||
823 | sgh_i710 MACH_SGH_I710 SGH_I710 3525 | ||
824 | integreproscb MACH_INTEGREPROSCB INTEGREPROSCB 3526 | ||
825 | monza MACH_MONZA MONZA 3527 | ||
826 | calimain MACH_CALIMAIN CALIMAIN 3528 | ||
827 | mx6q_sabreauto MACH_MX6Q_SABREAUTO MX6Q_SABREAUTO 3529 | ||
828 | gma01x MACH_GMA01X GMA01X 3530 | ||
829 | sbc51 MACH_SBC51 SBC51 3531 | ||
830 | fit MACH_FIT FIT 3532 | ||
831 | steelhead MACH_STEELHEAD STEELHEAD 3533 | ||
832 | panther MACH_PANTHER PANTHER 3534 | ||
833 | msm8960_liquid MACH_MSM8960_LIQUID MSM8960_LIQUID 3535 | ||
834 | lexikonct MACH_LEXIKONCT LEXIKONCT 3536 | ||
835 | ns2816_stb MACH_NS2816_STB NS2816_STB 3537 | ||
836 | sei_mm2_lpc3250 MACH_SEI_MM2_LPC3250 SEI_MM2_LPC3250 3538 | ||
837 | cmimx53 MACH_CMIMX53 CMIMX53 3539 | ||
838 | sandwich MACH_SANDWICH SANDWICH 3540 | ||
839 | chief MACH_CHIEF CHIEF 3541 | ||
840 | pogo_e02 MACH_POGO_E02 POGO_E02 3542 | ||
841 | mikrap_x168 MACH_MIKRAP_X168 MIKRAP_X168 3543 | ||
842 | htcmozart MACH_HTCMOZART HTCMOZART 3544 | ||
843 | htcgold MACH_HTCGOLD HTCGOLD 3545 | ||
844 | mt72xx MACH_MT72XX MT72XX 3546 | ||
845 | mx51_ivy MACH_MX51_IVY MX51_IVY 3547 | ||
846 | mx51_lvd MACH_MX51_LVD MX51_LVD 3548 | ||
847 | omap3_wiser2 MACH_OMAP3_WISER2 OMAP3_WISER2 3549 | ||
848 | dreamplug MACH_DREAMPLUG DREAMPLUG 3550 | ||
849 | cobas_c_111 MACH_COBAS_C_111 COBAS_C_111 3551 | ||
850 | cobas_u_411 MACH_COBAS_U_411 COBAS_U_411 3552 | ||
851 | hssd MACH_HSSD HSSD 3553 | ||
852 | iom35x MACH_IOM35X IOM35X 3554 | ||
853 | psom_omap MACH_PSOM_OMAP PSOM_OMAP 3555 | ||
854 | iphone_2g MACH_IPHONE_2G IPHONE_2G 3556 | ||
855 | iphone_3g MACH_IPHONE_3G IPHONE_3G 3557 | ||
856 | ipod_touch_1g MACH_IPOD_TOUCH_1G IPOD_TOUCH_1G 3558 | ||
857 | pharos_tpc MACH_PHAROS_TPC PHAROS_TPC 3559 | ||
858 | mx53_hydra MACH_MX53_HYDRA MX53_HYDRA 3560 | ||
859 | ns2816_dev_board MACH_NS2816_DEV_BOARD NS2816_DEV_BOARD 3561 | ||
860 | iphone_3gs MACH_IPHONE_3GS IPHONE_3GS 3562 | ||
861 | iphone_4 MACH_IPHONE_4 IPHONE_4 3563 | ||
862 | ipod_touch_4g MACH_IPOD_TOUCH_4G IPOD_TOUCH_4G 3564 | ||
863 | dragon_e1100 MACH_DRAGON_E1100 DRAGON_E1100 3565 | ||
864 | topside MACH_TOPSIDE TOPSIDE 3566 | ||
865 | irisiii MACH_IRISIII IRISIII 3567 | ||
866 | deto_macarm9 MACH_DETO_MACARM9 DETO_MACARM9 3568 | ||
867 | eti_d1 MACH_ETI_D1 ETI_D1 3569 | ||
868 | som3530sdk MACH_SOM3530SDK SOM3530SDK 3570 | ||
869 | oc_engine MACH_OC_ENGINE OC_ENGINE 3571 | ||
870 | apq8064_sim MACH_APQ8064_SIM APQ8064_SIM 3572 | ||
871 | alps MACH_ALPS ALPS 3575 | ||
872 | tny_t3730 MACH_TNY_T3730 TNY_T3730 3576 | ||
873 | geryon_nfe MACH_GERYON_NFE GERYON_NFE 3577 | ||
874 | ns2816_ref_board MACH_NS2816_REF_BOARD NS2816_REF_BOARD 3578 | ||
875 | silverstone MACH_SILVERSTONE SILVERSTONE 3579 | ||
876 | mtt2440 MACH_MTT2440 MTT2440 3580 | ||
877 | ynicdb MACH_YNICDB YNICDB 3581 | ||
878 | bct MACH_BCT BCT 3582 | ||
879 | tuscan MACH_TUSCAN TUSCAN 3583 | ||
880 | xbt_sam9g45 MACH_XBT_SAM9G45 XBT_SAM9G45 3584 | ||
881 | enbw_cmc MACH_ENBW_CMC ENBW_CMC 3585 | ||
882 | ch104mx257 MACH_CH104MX257 CH104MX257 3587 | ||
883 | openpri MACH_OPENPRI OPENPRI 3588 | ||
884 | am335xevm MACH_AM335XEVM AM335XEVM 3589 | ||
885 | picodmb MACH_PICODMB PICODMB 3590 | ||
886 | waluigi MACH_WALUIGI WALUIGI 3591 | ||
887 | punicag7 MACH_PUNICAG7 PUNICAG7 3592 | ||
888 | ipad_1g MACH_IPAD_1G IPAD_1G 3593 | ||
889 | appletv_2g MACH_APPLETV_2G APPLETV_2G 3594 | ||
890 | mach_ecog45 MACH_MACH_ECOG45 MACH_ECOG45 3595 | ||
891 | ait_cam_enc_4xx MACH_AIT_CAM_ENC_4XX AIT_CAM_ENC_4XX 3596 | ||
892 | runnymede MACH_RUNNYMEDE RUNNYMEDE 3597 | ||
893 | play MACH_PLAY PLAY 3598 | ||
894 | hw90260 MACH_HW90260 HW90260 3599 | ||
895 | tagh MACH_TAGH TAGH 3600 | ||
896 | filbert MACH_FILBERT FILBERT 3601 | ||
897 | getinge_netcomv3 MACH_GETINGE_NETCOMV3 GETINGE_NETCOMV3 3602 | ||
898 | cw20 MACH_CW20 CW20 3603 | ||
899 | cinema MACH_CINEMA CINEMA 3604 | ||
900 | cinema_tea MACH_CINEMA_TEA CINEMA_TEA 3605 | ||
901 | cinema_coffee MACH_CINEMA_COFFEE CINEMA_COFFEE 3606 | ||
902 | cinema_juice MACH_CINEMA_JUICE CINEMA_JUICE 3607 | ||
903 | mx53_mirage2 MACH_MX53_MIRAGE2 MX53_MIRAGE2 3609 | ||
904 | mx53_efikasb MACH_MX53_EFIKASB MX53_EFIKASB 3610 | ||
905 | stm_b2000 MACH_STM_B2000 STM_B2000 3612 | ||
1126 | m28evk MACH_M28EVK M28EVK 3613 | 906 | m28evk MACH_M28EVK M28EVK 3613 |
907 | pda MACH_PDA PDA 3614 | ||
908 | meraki_mr58 MACH_MERAKI_MR58 MERAKI_MR58 3615 | ||
909 | kota2 MACH_KOTA2 KOTA2 3616 | ||
910 | letcool MACH_LETCOOL LETCOOL 3617 | ||
911 | mx27iat MACH_MX27IAT MX27IAT 3618 | ||
912 | apollo_td MACH_APOLLO_TD APOLLO_TD 3619 | ||
913 | arena MACH_ARENA ARENA 3620 | ||
914 | gsngateway MACH_GSNGATEWAY GSNGATEWAY 3621 | ||
915 | lf2000 MACH_LF2000 LF2000 3622 | ||
916 | bonito MACH_BONITO BONITO 3623 | ||
917 | asymptote MACH_ASYMPTOTE ASYMPTOTE 3624 | ||
918 | bst2brd MACH_BST2BRD BST2BRD 3625 | ||
919 | tx335s MACH_TX335S TX335S 3626 | ||
920 | pelco_tesla MACH_PELCO_TESLA PELCO_TESLA 3627 | ||
921 | rrhtestplat MACH_RRHTESTPLAT RRHTESTPLAT 3628 | ||
922 | vidtonic_pro MACH_VIDTONIC_PRO VIDTONIC_PRO 3629 | ||
923 | pl_apollo MACH_PL_APOLLO PL_APOLLO 3630 | ||
924 | pl_phoenix MACH_PL_PHOENIX PL_PHOENIX 3631 | ||
925 | m28cu3 MACH_M28CU3 M28CU3 3632 | ||
926 | vvbox_hd MACH_VVBOX_HD VVBOX_HD 3633 | ||
927 | coreware_sam9260_ MACH_COREWARE_SAM9260_ COREWARE_SAM9260_ 3634 | ||
928 | marmaduke MACH_MARMADUKE MARMADUKE 3635 | ||
929 | amg_xlcore_camera MACH_AMG_XLCORE_CAMERA AMG_XLCORE_CAMERA 3636 | ||
930 | omap3_egf MACH_OMAP3_EGF OMAP3_EGF 3637 | ||
1127 | smdk4212 MACH_SMDK4212 SMDK4212 3638 | 931 | smdk4212 MACH_SMDK4212 SMDK4212 3638 |
932 | dnp9200 MACH_DNP9200 DNP9200 3639 | ||
933 | tf101 MACH_TF101 TF101 3640 | ||
934 | omap3silvio MACH_OMAP3SILVIO OMAP3SILVIO 3641 | ||
935 | picasso2 MACH_PICASSO2 PICASSO2 3642 | ||
936 | vangogh2 MACH_VANGOGH2 VANGOGH2 3643 | ||
937 | olpc_xo_1_75 MACH_OLPC_XO_1_75 OLPC_XO_1_75 3644 | ||
938 | gx400 MACH_GX400 GX400 3645 | ||
939 | gs300 MACH_GS300 GS300 3646 | ||
940 | acer_a9 MACH_ACER_A9 ACER_A9 3647 | ||
941 | vivow_evm MACH_VIVOW_EVM VIVOW_EVM 3648 | ||
942 | veloce_cxq MACH_VELOCE_CXQ VELOCE_CXQ 3649 | ||
943 | veloce_cxm MACH_VELOCE_CXM VELOCE_CXM 3650 | ||
944 | p1852 MACH_P1852 P1852 3651 | ||
945 | naxy100 MACH_NAXY100 NAXY100 3652 | ||
946 | taishan MACH_TAISHAN TAISHAN 3653 | ||
947 | touchlink MACH_TOUCHLINK TOUCHLINK 3654 | ||
948 | stm32f103ze MACH_STM32F103ZE STM32F103ZE 3655 | ||
949 | mcx MACH_MCX MCX 3656 | ||
950 | stm_nmhdk_fli7610 MACH_STM_NMHDK_FLI7610 STM_NMHDK_FLI7610 3657 | ||
951 | top28x MACH_TOP28X TOP28X 3658 | ||
952 | okl4vp_microvisor MACH_OKL4VP_MICROVISOR OKL4VP_MICROVISOR 3659 | ||
953 | pop MACH_POP POP 3660 | ||
954 | layer MACH_LAYER LAYER 3661 | ||
955 | trondheim MACH_TRONDHEIM TRONDHEIM 3662 | ||
956 | eva MACH_EVA EVA 3663 | ||
957 | trust_taurus MACH_TRUST_TAURUS TRUST_TAURUS 3664 | ||
958 | ns2816_huashan MACH_NS2816_HUASHAN NS2816_HUASHAN 3665 | ||
959 | ns2816_yangcheng MACH_NS2816_YANGCHENG NS2816_YANGCHENG 3666 | ||
960 | p852 MACH_P852 P852 3667 | ||
961 | flea3 MACH_FLEA3 FLEA3 3668 | ||
962 | bowfin MACH_BOWFIN BOWFIN 3669 | ||
963 | mv88de3100 MACH_MV88DE3100 MV88DE3100 3670 | ||
964 | pia_am35x MACH_PIA_AM35X PIA_AM35X 3671 | ||
965 | cedar MACH_CEDAR CEDAR 3672 | ||
966 | picasso_e MACH_PICASSO_E PICASSO_E 3673 | ||
967 | samsung_e60 MACH_SAMSUNG_E60 SAMSUNG_E60 3674 | ||
968 | sdvr_mini MACH_SDVR_MINI SDVR_MINI 3676 | ||
969 | omap3_ij3k MACH_OMAP3_IJ3K OMAP3_IJ3K 3677 | ||
970 | modasmc1 MACH_MODASMC1 MODASMC1 3678 | ||
971 | apq8064_rumi3 MACH_APQ8064_RUMI3 APQ8064_RUMI3 3679 | ||
972 | matrix506 MACH_MATRIX506 MATRIX506 3680 | ||
973 | msm9615_mtp MACH_MSM9615_MTP MSM9615_MTP 3681 | ||
974 | dm36x_spawndc MACH_DM36X_SPAWNDC DM36X_SPAWNDC 3682 | ||
975 | sff792 MACH_SFF792 SFF792 3683 | ||
976 | am335xiaevm MACH_AM335XIAEVM AM335XIAEVM 3684 | ||
977 | g3c2440 MACH_G3C2440 G3C2440 3685 | ||
978 | tion270 MACH_TION270 TION270 3686 | ||
979 | w22q7arm02 MACH_W22Q7ARM02 W22Q7ARM02 3687 | ||
980 | omap_cat MACH_OMAP_CAT OMAP_CAT 3688 | ||
981 | at91sam9n12ek MACH_AT91SAM9N12EK AT91SAM9N12EK 3689 | ||
982 | morrison MACH_MORRISON MORRISON 3690 | ||
983 | svdu MACH_SVDU SVDU 3691 | ||
984 | lpp01 MACH_LPP01 LPP01 3692 | ||
985 | ubc283 MACH_UBC283 UBC283 3693 | ||
986 | zeppelin MACH_ZEPPELIN ZEPPELIN 3694 | ||
987 | motus MACH_MOTUS MOTUS 3695 | ||
988 | neomainboard MACH_NEOMAINBOARD NEOMAINBOARD 3696 | ||
989 | devkit3250 MACH_DEVKIT3250 DEVKIT3250 3697 | ||
990 | devkit7000 MACH_DEVKIT7000 DEVKIT7000 3698 | ||
991 | fmc_uic MACH_FMC_UIC FMC_UIC 3699 | ||
992 | fmc_dcm MACH_FMC_DCM FMC_DCM 3700 | ||
993 | batwm MACH_BATWM BATWM 3701 | ||
994 | atlas6cb MACH_ATLAS6CB ATLAS6CB 3702 | ||
995 | blue MACH_BLUE BLUE 3705 | ||
996 | colorado MACH_COLORADO COLORADO 3706 | ||
997 | popc MACH_POPC POPC 3707 | ||
998 | promwad_jade MACH_PROMWAD_JADE PROMWAD_JADE 3708 | ||
999 | amp MACH_AMP AMP 3709 | ||
1000 | gnet_amp MACH_GNET_AMP GNET_AMP 3710 | ||
1001 | toques MACH_TOQUES TOQUES 3711 | ||
1002 | dct_storm MACH_DCT_STORM DCT_STORM 3713 | ||
1003 | owl MACH_OWL OWL 3715 | ||
1004 | cogent_csb1741 MACH_COGENT_CSB1741 COGENT_CSB1741 3716 | ||
1005 | adillustra610 MACH_ADILLUSTRA610 ADILLUSTRA610 3718 | ||
1006 | ecafe_na04 MACH_ECAFE_NA04 ECAFE_NA04 3719 | ||
1007 | popct MACH_POPCT POPCT 3720 | ||
1008 | omap3_helena MACH_OMAP3_HELENA OMAP3_HELENA 3721 | ||
1009 | ach MACH_ACH ACH 3722 | ||
1010 | module_dtb MACH_MODULE_DTB MODULE_DTB 3723 | ||
1011 | oslo_elisabeth MACH_OSLO_ELISABETH OSLO_ELISABETH 3725 | ||
1012 | tt01 MACH_TT01 TT01 3726 | ||
1013 | msm8930_cdp MACH_MSM8930_CDP MSM8930_CDP 3727 | ||
1014 | msm8930_mtp MACH_MSM8930_MTP MSM8930_MTP 3728 | ||
1015 | msm8930_fluid MACH_MSM8930_FLUID MSM8930_FLUID 3729 | ||
1016 | ltu11 MACH_LTU11 LTU11 3730 | ||
1017 | am1808_spawnco MACH_AM1808_SPAWNCO AM1808_SPAWNCO 3731 | ||
1018 | flx6410 MACH_FLX6410 FLX6410 3732 | ||
1019 | mx6q_qsb MACH_MX6Q_QSB MX6Q_QSB 3733 | ||
1020 | mx53_plt424 MACH_MX53_PLT424 MX53_PLT424 3734 | ||
1021 | jasmine MACH_JASMINE JASMINE 3735 | ||
1022 | l138_owlboard_plus MACH_L138_OWLBOARD_PLUS L138_OWLBOARD_PLUS 3736 | ||
1023 | wr21 MACH_WR21 WR21 3737 | ||
1024 | peaboy MACH_PEABOY PEABOY 3739 | ||
1025 | mx28_plato MACH_MX28_PLATO MX28_PLATO 3740 | ||
1026 | kacom2 MACH_KACOM2 KACOM2 3741 | ||
1027 | slco MACH_SLCO SLCO 3742 | ||
1028 | imx51pico MACH_IMX51PICO IMX51PICO 3743 | ||
1029 | glink1 MACH_GLINK1 GLINK1 3744 | ||
1030 | diamond MACH_DIAMOND DIAMOND 3745 | ||
1031 | d9000 MACH_D9000 D9000 3746 | ||
1032 | w5300e01 MACH_W5300E01 W5300E01 3747 | ||
1033 | im6000 MACH_IM6000 IM6000 3748 | ||
1034 | mx51_fred51 MACH_MX51_FRED51 MX51_FRED51 3749 | ||
1035 | stm32f2 MACH_STM32F2 STM32F2 3750 | ||
1036 | ville MACH_VILLE VILLE 3751 | ||
1037 | ptip_murnau MACH_PTIP_MURNAU PTIP_MURNAU 3752 | ||
1038 | ptip_classic MACH_PTIP_CLASSIC PTIP_CLASSIC 3753 | ||
1039 | mx53grb MACH_MX53GRB MX53GRB 3754 | ||
1040 | gagarin MACH_GAGARIN GAGARIN 3755 | ||
1041 | nas2big MACH_NAS2BIG NAS2BIG 3757 | ||
1042 | superfemto MACH_SUPERFEMTO SUPERFEMTO 3758 | ||
1043 | teufel MACH_TEUFEL TEUFEL 3759 | ||
1044 | dinara MACH_DINARA DINARA 3760 | ||
1045 | vanquish MACH_VANQUISH VANQUISH 3761 | ||
1046 | zipabox1 MACH_ZIPABOX1 ZIPABOX1 3762 | ||
1047 | u9540 MACH_U9540 U9540 3763 | ||
1048 | jet MACH_JET JET 3764 | ||
1128 | smdk4412 MACH_SMDK4412 SMDK4412 3765 | 1049 | smdk4412 MACH_SMDK4412 SMDK4412 3765 |
1050 | elite MACH_ELITE ELITE 3766 | ||
1051 | spear320_hmi MACH_SPEAR320_HMI SPEAR320_HMI 3767 | ||
1052 | ontario MACH_ONTARIO ONTARIO 3768 | ||
1053 | mx6q_sabrelite MACH_MX6Q_SABRELITE MX6Q_SABRELITE 3769 | ||
1054 | vc200 MACH_VC200 VC200 3770 | ||
1055 | msm7625a_ffa MACH_MSM7625A_FFA MSM7625A_FFA 3771 | ||
1056 | msm7625a_surf MACH_MSM7625A_SURF MSM7625A_SURF 3772 | ||
1057 | benthossbp MACH_BENTHOSSBP BENTHOSSBP 3773 | ||
1058 | smdk5210 MACH_SMDK5210 SMDK5210 3774 | ||
1059 | empq2300 MACH_EMPQ2300 EMPQ2300 3775 | ||
1060 | minipos MACH_MINIPOS MINIPOS 3776 | ||
1061 | omap5_sevm MACH_OMAP5_SEVM OMAP5_SEVM 3777 | ||
1062 | shelter MACH_SHELTER SHELTER 3778 | ||
1063 | omap3_devkit8500 MACH_OMAP3_DEVKIT8500 OMAP3_DEVKIT8500 3779 | ||
1064 | edgetd MACH_EDGETD EDGETD 3780 | ||
1065 | copperyard MACH_COPPERYARD COPPERYARD 3781 | ||
1066 | edge MACH_EDGE EDGE 3782 | ||
1067 | edge_u MACH_EDGE_U EDGE_U 3783 | ||
1068 | edge_td MACH_EDGE_TD EDGE_TD 3784 | ||
1069 | wdss MACH_WDSS WDSS 3785 | ||
1070 | dl_pb25 MACH_DL_PB25 DL_PB25 3786 | ||
1071 | dss11 MACH_DSS11 DSS11 3787 | ||
1072 | cpa MACH_CPA CPA 3788 | ||
1073 | aptp2000 MACH_APTP2000 APTP2000 3789 | ||
1074 | marzen MACH_MARZEN MARZEN 3790 | ||
1075 | st_turbine MACH_ST_TURBINE ST_TURBINE 3791 | ||
1076 | gtl_it3300 MACH_GTL_IT3300 GTL_IT3300 3792 | ||
1077 | mx6_mule MACH_MX6_MULE MX6_MULE 3793 | ||
1078 | v7pxa_dt MACH_V7PXA_DT V7PXA_DT 3794 | ||
1079 | v7mmp_dt MACH_V7MMP_DT V7MMP_DT 3795 | ||
1080 | dragon7 MACH_DRAGON7 DRAGON7 3796 | ||
1081 | krome MACH_KROME KROME 3797 | ||
1082 | oratisdante MACH_ORATISDANTE ORATISDANTE 3798 | ||
1083 | fathom MACH_FATHOM FATHOM 3799 | ||
1084 | dns325 MACH_DNS325 DNS325 3800 | ||
1085 | sarnen MACH_SARNEN SARNEN 3801 | ||
1086 | ubisys_g1 MACH_UBISYS_G1 UBISYS_G1 3802 | ||
1087 | mx53_pf1 MACH_MX53_PF1 MX53_PF1 3803 | ||
1088 | asanti MACH_ASANTI ASANTI 3804 | ||
1089 | volta MACH_VOLTA VOLTA 3805 | ||
1090 | knight MACH_KNIGHT KNIGHT 3807 | ||
1091 | beaglebone MACH_BEAGLEBONE BEAGLEBONE 3808 | ||
1092 | becker MACH_BECKER BECKER 3809 | ||
1093 | fc360 MACH_FC360 FC360 3810 | ||
1094 | pmi2_xls MACH_PMI2_XLS PMI2_XLS 3811 | ||
1095 | taranto MACH_TARANTO TARANTO 3812 | ||
1096 | plutux MACH_PLUTUX PLUTUX 3813 | ||
1097 | ipmp_medcom MACH_IPMP_MEDCOM IPMP_MEDCOM 3814 | ||
1098 | absolut MACH_ABSOLUT ABSOLUT 3815 | ||
1099 | awpb3 MACH_AWPB3 AWPB3 3816 | ||
1100 | nfp32xx_dt MACH_NFP32XX_DT NFP32XX_DT 3817 | ||
1101 | dl_pb53 MACH_DL_PB53 DL_PB53 3818 | ||
1102 | acu_ii MACH_ACU_II ACU_II 3819 | ||
1103 | avalon MACH_AVALON AVALON 3820 | ||
1104 | sphinx MACH_SPHINX SPHINX 3821 | ||
1105 | titan_t MACH_TITAN_T TITAN_T 3822 | ||
1106 | harvest_boris MACH_HARVEST_BORIS HARVEST_BORIS 3823 | ||
1107 | mach_msm7x30_m3s MACH_MACH_MSM7X30_M3S MACH_MSM7X30_M3S 3824 | ||
1108 | smdk5250 MACH_SMDK5250 SMDK5250 3825 | ||
1109 | imxt_lite MACH_IMXT_LITE IMXT_LITE 3826 | ||
1110 | imxt_std MACH_IMXT_STD IMXT_STD 3827 | ||
1111 | imxt_log MACH_IMXT_LOG IMXT_LOG 3828 | ||
1112 | imxt_nav MACH_IMXT_NAV IMXT_NAV 3829 | ||
1113 | imxt_full MACH_IMXT_FULL IMXT_FULL 3830 | ||
1114 | ag09015 MACH_AG09015 AG09015 3831 | ||
1115 | am3517_mt_ventoux MACH_AM3517_MT_VENTOUX AM3517_MT_VENTOUX 3832 | ||
1116 | dp1arm9 MACH_DP1ARM9 DP1ARM9 3833 | ||
1117 | picasso_m MACH_PICASSO_M PICASSO_M 3834 | ||
1118 | video_gadget MACH_VIDEO_GADGET VIDEO_GADGET 3835 | ||
1119 | mtt_om3x MACH_MTT_OM3X MTT_OM3X 3836 | ||
1120 | mx6q_arm2 MACH_MX6Q_ARM2 MX6Q_ARM2 3837 | ||
1121 | picosam9g45 MACH_PICOSAM9G45 PICOSAM9G45 3838 | ||
1122 | vpm_dm365 MACH_VPM_DM365 VPM_DM365 3839 | ||
1123 | bonfire MACH_BONFIRE BONFIRE 3840 | ||
1124 | mt2p2d MACH_MT2P2D MT2P2D 3841 | ||
1125 | sigpda01 MACH_SIGPDA01 SIGPDA01 3842 | ||
1126 | cn27 MACH_CN27 CN27 3843 | ||
1127 | mx25_cwtap MACH_MX25_CWTAP MX25_CWTAP 3844 | ||
1128 | apf28 MACH_APF28 APF28 3845 | ||
1129 | pelco_maxwell MACH_PELCO_MAXWELL PELCO_MAXWELL 3846 | ||
1130 | ge_phoenix MACH_GE_PHOENIX GE_PHOENIX 3847 | ||
1131 | empc_a500 MACH_EMPC_A500 EMPC_A500 3848 | ||
1132 | ims_arm9 MACH_IMS_ARM9 IMS_ARM9 3849 | ||
1133 | mini2416 MACH_MINI2416 MINI2416 3850 | ||
1134 | mini2450 MACH_MINI2450 MINI2450 3851 | ||
1135 | mini310 MACH_MINI310 MINI310 3852 | ||
1136 | spear_hurricane MACH_SPEAR_HURRICANE SPEAR_HURRICANE 3853 | ||
1137 | mt7208 MACH_MT7208 MT7208 3854 | ||
1138 | lpc178x MACH_LPC178X LPC178X 3855 | ||
1139 | farleys MACH_FARLEYS FARLEYS 3856 | ||
1140 | efm32gg_dk3750 MACH_EFM32GG_DK3750 EFM32GG_DK3750 3857 | ||
1141 | zeus_board MACH_ZEUS_BOARD ZEUS_BOARD 3858 | ||
1142 | cc51 MACH_CC51 CC51 3859 | ||
1143 | fxi_c210 MACH_FXI_C210 FXI_C210 3860 | ||
1144 | msm8627_cdp MACH_MSM8627_CDP MSM8627_CDP 3861 | ||
1145 | msm8627_mtp MACH_MSM8627_MTP MSM8627_MTP 3862 | ||
1146 | armadillo800eva MACH_ARMADILLO800EVA ARMADILLO800EVA 3863 | ||
1147 | primou MACH_PRIMOU PRIMOU 3864 | ||
1148 | primoc MACH_PRIMOC PRIMOC 3865 | ||
1149 | primoct MACH_PRIMOCT PRIMOCT 3866 | ||
1150 | a9500 MACH_A9500 A9500 3867 | ||
1151 | pluto MACH_PLUTO PLUTO 3869 | ||
1152 | acfx100 MACH_ACFX100 ACFX100 3870 | ||
1153 | msm8625_rumi3 MACH_MSM8625_RUMI3 MSM8625_RUMI3 3871 | ||
1154 | valente MACH_VALENTE VALENTE 3872 | ||
1155 | crfs_rfeye MACH_CRFS_RFEYE CRFS_RFEYE 3873 | ||
1156 | rfeye MACH_RFEYE RFEYE 3874 | ||
1157 | phidget_sbc3 MACH_PHIDGET_SBC3 PHIDGET_SBC3 3875 | ||
1158 | tcw_mika MACH_TCW_MIKA TCW_MIKA 3876 | ||
1159 | imx28_egf MACH_IMX28_EGF IMX28_EGF 3877 | ||
1160 | valente_wx MACH_VALENTE_WX VALENTE_WX 3878 | ||
1161 | huangshans MACH_HUANGSHANS HUANGSHANS 3879 | ||
1162 | bosphorus1 MACH_BOSPHORUS1 BOSPHORUS1 3880 | ||
1163 | prima MACH_PRIMA PRIMA 3881 | ||
1164 | evita_ulk MACH_EVITA_ULK EVITA_ULK 3884 | ||
1165 | merisc600 MACH_MERISC600 MERISC600 3885 | ||
1166 | dolak MACH_DOLAK DOLAK 3886 | ||
1167 | sbc53 MACH_SBC53 SBC53 3887 | ||
1168 | elite_ulk MACH_ELITE_ULK ELITE_ULK 3888 | ||
1169 | pov2 MACH_POV2 POV2 3889 | ||
1170 | ipod_touch_2g MACH_IPOD_TOUCH_2G IPOD_TOUCH_2G 3890 | ||
1171 | da850_pqab MACH_DA850_PQAB DA850_PQAB 3891 | ||
diff --git a/arch/ia64/include/asm/cputime.h b/arch/ia64/include/asm/cputime.h index 6073b187528a..5a274af31b2b 100644 --- a/arch/ia64/include/asm/cputime.h +++ b/arch/ia64/include/asm/cputime.h | |||
@@ -60,6 +60,7 @@ typedef u64 cputime64_t; | |||
60 | */ | 60 | */ |
61 | #define cputime_to_usecs(__ct) ((__ct) / NSEC_PER_USEC) | 61 | #define cputime_to_usecs(__ct) ((__ct) / NSEC_PER_USEC) |
62 | #define usecs_to_cputime(__usecs) ((__usecs) * NSEC_PER_USEC) | 62 | #define usecs_to_cputime(__usecs) ((__usecs) * NSEC_PER_USEC) |
63 | #define usecs_to_cputime64(__usecs) usecs_to_cputime(__usecs) | ||
63 | 64 | ||
64 | /* | 65 | /* |
65 | * Convert cputime <-> seconds | 66 | * Convert cputime <-> seconds |
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index 1cf20bdfbeca..98b7c4b49c9d 100644 --- a/arch/powerpc/include/asm/cputime.h +++ b/arch/powerpc/include/asm/cputime.h | |||
@@ -150,6 +150,8 @@ static inline cputime_t usecs_to_cputime(const unsigned long us) | |||
150 | return ct; | 150 | return ct; |
151 | } | 151 | } |
152 | 152 | ||
153 | #define usecs_to_cputime64(us) usecs_to_cputime(us) | ||
154 | |||
153 | /* | 155 | /* |
154 | * Convert cputime <-> seconds | 156 | * Convert cputime <-> seconds |
155 | */ | 157 | */ |
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h index d4df013ad779..69c7377d2071 100644 --- a/arch/powerpc/include/asm/kvm_book3s.h +++ b/arch/powerpc/include/asm/kvm_book3s.h | |||
@@ -381,39 +381,6 @@ static inline bool kvmppc_critical_section(struct kvm_vcpu *vcpu) | |||
381 | } | 381 | } |
382 | #endif | 382 | #endif |
383 | 383 | ||
384 | static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r, | ||
385 | unsigned long pte_index) | ||
386 | { | ||
387 | unsigned long rb, va_low; | ||
388 | |||
389 | rb = (v & ~0x7fUL) << 16; /* AVA field */ | ||
390 | va_low = pte_index >> 3; | ||
391 | if (v & HPTE_V_SECONDARY) | ||
392 | va_low = ~va_low; | ||
393 | /* xor vsid from AVA */ | ||
394 | if (!(v & HPTE_V_1TB_SEG)) | ||
395 | va_low ^= v >> 12; | ||
396 | else | ||
397 | va_low ^= v >> 24; | ||
398 | va_low &= 0x7ff; | ||
399 | if (v & HPTE_V_LARGE) { | ||
400 | rb |= 1; /* L field */ | ||
401 | if (cpu_has_feature(CPU_FTR_ARCH_206) && | ||
402 | (r & 0xff000)) { | ||
403 | /* non-16MB large page, must be 64k */ | ||
404 | /* (masks depend on page size) */ | ||
405 | rb |= 0x1000; /* page encoding in LP field */ | ||
406 | rb |= (va_low & 0x7f) << 16; /* 7b of VA in AVA/LP field */ | ||
407 | rb |= (va_low & 0xfe); /* AVAL field (P7 doesn't seem to care) */ | ||
408 | } | ||
409 | } else { | ||
410 | /* 4kB page */ | ||
411 | rb |= (va_low & 0x7ff) << 12; /* remaining 11b of VA */ | ||
412 | } | ||
413 | rb |= (v >> 54) & 0x300; /* B field */ | ||
414 | return rb; | ||
415 | } | ||
416 | |||
417 | /* Magic register values loaded into r3 and r4 before the 'sc' assembly | 384 | /* Magic register values loaded into r3 and r4 before the 'sc' assembly |
418 | * instruction for the OSI hypercalls */ | 385 | * instruction for the OSI hypercalls */ |
419 | #define OSI_SC_MAGIC_R3 0x113724FA | 386 | #define OSI_SC_MAGIC_R3 0x113724FA |
diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h index e43fe42b9875..d0ac94f98f9e 100644 --- a/arch/powerpc/include/asm/kvm_book3s_64.h +++ b/arch/powerpc/include/asm/kvm_book3s_64.h | |||
@@ -29,4 +29,37 @@ static inline struct kvmppc_book3s_shadow_vcpu *to_svcpu(struct kvm_vcpu *vcpu) | |||
29 | 29 | ||
30 | #define SPAPR_TCE_SHIFT 12 | 30 | #define SPAPR_TCE_SHIFT 12 |
31 | 31 | ||
32 | static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r, | ||
33 | unsigned long pte_index) | ||
34 | { | ||
35 | unsigned long rb, va_low; | ||
36 | |||
37 | rb = (v & ~0x7fUL) << 16; /* AVA field */ | ||
38 | va_low = pte_index >> 3; | ||
39 | if (v & HPTE_V_SECONDARY) | ||
40 | va_low = ~va_low; | ||
41 | /* xor vsid from AVA */ | ||
42 | if (!(v & HPTE_V_1TB_SEG)) | ||
43 | va_low ^= v >> 12; | ||
44 | else | ||
45 | va_low ^= v >> 24; | ||
46 | va_low &= 0x7ff; | ||
47 | if (v & HPTE_V_LARGE) { | ||
48 | rb |= 1; /* L field */ | ||
49 | if (cpu_has_feature(CPU_FTR_ARCH_206) && | ||
50 | (r & 0xff000)) { | ||
51 | /* non-16MB large page, must be 64k */ | ||
52 | /* (masks depend on page size) */ | ||
53 | rb |= 0x1000; /* page encoding in LP field */ | ||
54 | rb |= (va_low & 0x7f) << 16; /* 7b of VA in AVA/LP field */ | ||
55 | rb |= (va_low & 0xfe); /* AVAL field (P7 doesn't seem to care) */ | ||
56 | } | ||
57 | } else { | ||
58 | /* 4kB page */ | ||
59 | rb |= (va_low & 0x7ff) << 12; /* remaining 11b of VA */ | ||
60 | } | ||
61 | rb |= (v >> 54) & 0x300; /* B field */ | ||
62 | return rb; | ||
63 | } | ||
64 | |||
32 | #endif /* __ASM_KVM_BOOK3S_64_H__ */ | 65 | #endif /* __ASM_KVM_BOOK3S_64_H__ */ |
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 0cb137a9b038..336983da9e72 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -538,7 +538,7 @@ static void kvmppc_start_thread(struct kvm_vcpu *vcpu) | |||
538 | tpaca->kvm_hstate.napping = 0; | 538 | tpaca->kvm_hstate.napping = 0; |
539 | vcpu->cpu = vc->pcpu; | 539 | vcpu->cpu = vc->pcpu; |
540 | smp_wmb(); | 540 | smp_wmb(); |
541 | #ifdef CONFIG_PPC_ICP_NATIVE | 541 | #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) |
542 | if (vcpu->arch.ptid) { | 542 | if (vcpu->arch.ptid) { |
543 | tpaca->cpu_start = 0x80; | 543 | tpaca->cpu_start = 0x80; |
544 | wmb(); | 544 | wmb(); |
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 3c791e1eb675..e2cfb9e1e20e 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c | |||
@@ -658,10 +658,12 @@ program_interrupt: | |||
658 | ulong cmd = kvmppc_get_gpr(vcpu, 3); | 658 | ulong cmd = kvmppc_get_gpr(vcpu, 3); |
659 | int i; | 659 | int i; |
660 | 660 | ||
661 | #ifdef CONFIG_KVM_BOOK3S_64_PR | ||
661 | if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) { | 662 | if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) { |
662 | r = RESUME_GUEST; | 663 | r = RESUME_GUEST; |
663 | break; | 664 | break; |
664 | } | 665 | } |
666 | #endif | ||
665 | 667 | ||
666 | run->papr_hcall.nr = cmd; | 668 | run->papr_hcall.nr = cmd; |
667 | for (i = 0; i < 9; ++i) { | 669 | for (i = 0; i < 9; ++i) { |
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c index 26d20903f2bc..8c0d45a6faf7 100644 --- a/arch/powerpc/kvm/e500.c +++ b/arch/powerpc/kvm/e500.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kvm_host.h> | 15 | #include <linux/kvm_host.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/export.h> | ||
18 | 19 | ||
19 | #include <asm/reg.h> | 20 | #include <asm/reg.h> |
20 | #include <asm/cputable.h> | 21 | #include <asm/cputable.h> |
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 081434878296..b9acaaa175d8 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h | |||
@@ -87,6 +87,8 @@ usecs_to_cputime(const unsigned int m) | |||
87 | return (cputime_t) m * 4096; | 87 | return (cputime_t) m * 4096; |
88 | } | 88 | } |
89 | 89 | ||
90 | #define usecs_to_cputime64(m) usecs_to_cputime(m) | ||
91 | |||
90 | /* | 92 | /* |
91 | * Convert cputime to milliseconds and back. | 93 | * Convert cputime to milliseconds and back. |
92 | */ | 94 | */ |
diff --git a/arch/sh/oprofile/common.c b/arch/sh/oprofile/common.c index b4c2d2b946dd..e4dd5d5a1115 100644 --- a/arch/sh/oprofile/common.c +++ b/arch/sh/oprofile/common.c | |||
@@ -49,7 +49,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
49 | return oprofile_perf_init(ops); | 49 | return oprofile_perf_init(ops); |
50 | } | 50 | } |
51 | 51 | ||
52 | void __exit oprofile_arch_exit(void) | 52 | void oprofile_arch_exit(void) |
53 | { | 53 | { |
54 | oprofile_perf_exit(); | 54 | oprofile_perf_exit(); |
55 | kfree(sh_pmu_op_name); | 55 | kfree(sh_pmu_op_name); |
@@ -60,5 +60,5 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
60 | ops->backtrace = sh_backtrace; | 60 | ops->backtrace = sh_backtrace; |
61 | return -ENODEV; | 61 | return -ENODEV; |
62 | } | 62 | } |
63 | void __exit oprofile_arch_exit(void) {} | 63 | void oprofile_arch_exit(void) {} |
64 | #endif /* CONFIG_HW_PERF_EVENTS */ | 64 | #endif /* CONFIG_HW_PERF_EVENTS */ |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 8d601b18bf9f..121f1be4da19 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -1169,7 +1169,7 @@ again: | |||
1169 | */ | 1169 | */ |
1170 | c = &unconstrained; | 1170 | c = &unconstrained; |
1171 | } else if (intel_try_alt_er(event, orig_idx)) { | 1171 | } else if (intel_try_alt_er(event, orig_idx)) { |
1172 | raw_spin_unlock(&era->lock); | 1172 | raw_spin_unlock_irqrestore(&era->lock, flags); |
1173 | goto again; | 1173 | goto again; |
1174 | } | 1174 | } |
1175 | raw_spin_unlock_irqrestore(&era->lock, flags); | 1175 | raw_spin_unlock_irqrestore(&era->lock, flags); |
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 76e3f1cd0369..405f2620392f 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c | |||
@@ -338,11 +338,15 @@ static enum hrtimer_restart pit_timer_fn(struct hrtimer *data) | |||
338 | return HRTIMER_NORESTART; | 338 | return HRTIMER_NORESTART; |
339 | } | 339 | } |
340 | 340 | ||
341 | static void create_pit_timer(struct kvm_kpit_state *ps, u32 val, int is_period) | 341 | static void create_pit_timer(struct kvm *kvm, u32 val, int is_period) |
342 | { | 342 | { |
343 | struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state; | ||
343 | struct kvm_timer *pt = &ps->pit_timer; | 344 | struct kvm_timer *pt = &ps->pit_timer; |
344 | s64 interval; | 345 | s64 interval; |
345 | 346 | ||
347 | if (!irqchip_in_kernel(kvm)) | ||
348 | return; | ||
349 | |||
346 | interval = muldiv64(val, NSEC_PER_SEC, KVM_PIT_FREQ); | 350 | interval = muldiv64(val, NSEC_PER_SEC, KVM_PIT_FREQ); |
347 | 351 | ||
348 | pr_debug("create pit timer, interval is %llu nsec\n", interval); | 352 | pr_debug("create pit timer, interval is %llu nsec\n", interval); |
@@ -394,13 +398,13 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val) | |||
394 | /* FIXME: enhance mode 4 precision */ | 398 | /* FIXME: enhance mode 4 precision */ |
395 | case 4: | 399 | case 4: |
396 | if (!(ps->flags & KVM_PIT_FLAGS_HPET_LEGACY)) { | 400 | if (!(ps->flags & KVM_PIT_FLAGS_HPET_LEGACY)) { |
397 | create_pit_timer(ps, val, 0); | 401 | create_pit_timer(kvm, val, 0); |
398 | } | 402 | } |
399 | break; | 403 | break; |
400 | case 2: | 404 | case 2: |
401 | case 3: | 405 | case 3: |
402 | if (!(ps->flags & KVM_PIT_FLAGS_HPET_LEGACY)){ | 406 | if (!(ps->flags & KVM_PIT_FLAGS_HPET_LEGACY)){ |
403 | create_pit_timer(ps, val, 1); | 407 | create_pit_timer(kvm, val, 1); |
404 | } | 408 | } |
405 | break; | 409 | break; |
406 | default: | 410 | default: |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c38efd7b792e..4c938da2ba00 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -602,7 +602,6 @@ static void update_cpuid(struct kvm_vcpu *vcpu) | |||
602 | { | 602 | { |
603 | struct kvm_cpuid_entry2 *best; | 603 | struct kvm_cpuid_entry2 *best; |
604 | struct kvm_lapic *apic = vcpu->arch.apic; | 604 | struct kvm_lapic *apic = vcpu->arch.apic; |
605 | u32 timer_mode_mask; | ||
606 | 605 | ||
607 | best = kvm_find_cpuid_entry(vcpu, 1, 0); | 606 | best = kvm_find_cpuid_entry(vcpu, 1, 0); |
608 | if (!best) | 607 | if (!best) |
@@ -615,15 +614,12 @@ static void update_cpuid(struct kvm_vcpu *vcpu) | |||
615 | best->ecx |= bit(X86_FEATURE_OSXSAVE); | 614 | best->ecx |= bit(X86_FEATURE_OSXSAVE); |
616 | } | 615 | } |
617 | 616 | ||
618 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && | 617 | if (apic) { |
619 | best->function == 0x1) { | 618 | if (best->ecx & bit(X86_FEATURE_TSC_DEADLINE_TIMER)) |
620 | best->ecx |= bit(X86_FEATURE_TSC_DEADLINE_TIMER); | 619 | apic->lapic_timer.timer_mode_mask = 3 << 17; |
621 | timer_mode_mask = 3 << 17; | 620 | else |
622 | } else | 621 | apic->lapic_timer.timer_mode_mask = 1 << 17; |
623 | timer_mode_mask = 1 << 17; | 622 | } |
624 | |||
625 | if (apic) | ||
626 | apic->lapic_timer.timer_mode_mask = timer_mode_mask; | ||
627 | } | 623 | } |
628 | 624 | ||
629 | int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) | 625 | int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) |
@@ -2135,6 +2131,9 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
2135 | case KVM_CAP_TSC_CONTROL: | 2131 | case KVM_CAP_TSC_CONTROL: |
2136 | r = kvm_has_tsc_control; | 2132 | r = kvm_has_tsc_control; |
2137 | break; | 2133 | break; |
2134 | case KVM_CAP_TSC_DEADLINE_TIMER: | ||
2135 | r = boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER); | ||
2136 | break; | ||
2138 | default: | 2137 | default: |
2139 | r = 0; | 2138 | r = 0; |
2140 | break; | 2139 | break; |
diff --git a/block/blk-map.c b/block/blk-map.c index 164cd0059706..623e1cd4cffe 100644 --- a/block/blk-map.c +++ b/block/blk-map.c | |||
@@ -311,7 +311,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf, | |||
311 | if (IS_ERR(bio)) | 311 | if (IS_ERR(bio)) |
312 | return PTR_ERR(bio); | 312 | return PTR_ERR(bio); |
313 | 313 | ||
314 | if (rq_data_dir(rq) == WRITE) | 314 | if (!reading) |
315 | bio->bi_rw |= REQ_WRITE; | 315 | bio->bi_rw |= REQ_WRITE; |
316 | 316 | ||
317 | if (do_copy) | 317 | if (do_copy) |
diff --git a/block/blk-tag.c b/block/blk-tag.c index e74d6d13838f..4af6f5cc1167 100644 --- a/block/blk-tag.c +++ b/block/blk-tag.c | |||
@@ -282,18 +282,9 @@ EXPORT_SYMBOL(blk_queue_resize_tags); | |||
282 | void blk_queue_end_tag(struct request_queue *q, struct request *rq) | 282 | void blk_queue_end_tag(struct request_queue *q, struct request *rq) |
283 | { | 283 | { |
284 | struct blk_queue_tag *bqt = q->queue_tags; | 284 | struct blk_queue_tag *bqt = q->queue_tags; |
285 | int tag = rq->tag; | 285 | unsigned tag = rq->tag; /* negative tags invalid */ |
286 | 286 | ||
287 | BUG_ON(tag == -1); | 287 | BUG_ON(tag >= bqt->real_max_depth); |
288 | |||
289 | if (unlikely(tag >= bqt->max_depth)) { | ||
290 | /* | ||
291 | * This can happen after tag depth has been reduced. | ||
292 | * But tag shouldn't be larger than real_max_depth. | ||
293 | */ | ||
294 | WARN_ON(tag >= bqt->real_max_depth); | ||
295 | return; | ||
296 | } | ||
297 | 288 | ||
298 | list_del_init(&rq->queuelist); | 289 | list_del_init(&rq->queuelist); |
299 | rq->cmd_flags &= ~REQ_QUEUED; | 290 | rq->cmd_flags &= ~REQ_QUEUED; |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 4c12869fcf77..3548705b04e4 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1655,6 +1655,8 @@ cfq_merged_requests(struct request_queue *q, struct request *rq, | |||
1655 | struct request *next) | 1655 | struct request *next) |
1656 | { | 1656 | { |
1657 | struct cfq_queue *cfqq = RQ_CFQQ(rq); | 1657 | struct cfq_queue *cfqq = RQ_CFQQ(rq); |
1658 | struct cfq_data *cfqd = q->elevator->elevator_data; | ||
1659 | |||
1658 | /* | 1660 | /* |
1659 | * reposition in fifo if next is older than rq | 1661 | * reposition in fifo if next is older than rq |
1660 | */ | 1662 | */ |
@@ -1669,6 +1671,16 @@ cfq_merged_requests(struct request_queue *q, struct request *rq, | |||
1669 | cfq_remove_request(next); | 1671 | cfq_remove_request(next); |
1670 | cfq_blkiocg_update_io_merged_stats(&(RQ_CFQG(rq))->blkg, | 1672 | cfq_blkiocg_update_io_merged_stats(&(RQ_CFQG(rq))->blkg, |
1671 | rq_data_dir(next), rq_is_sync(next)); | 1673 | rq_data_dir(next), rq_is_sync(next)); |
1674 | |||
1675 | cfqq = RQ_CFQQ(next); | ||
1676 | /* | ||
1677 | * all requests of this queue are merged to other queues, delete it | ||
1678 | * from the service tree. If it's the active_queue, | ||
1679 | * cfq_dispatch_requests() will choose to expire it or do idle | ||
1680 | */ | ||
1681 | if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY_ROOT(&cfqq->sort_list) && | ||
1682 | cfqq != cfqd->active_queue) | ||
1683 | cfq_del_cfqq_rr(cfqd, cfqq); | ||
1672 | } | 1684 | } |
1673 | 1685 | ||
1674 | static int cfq_allow_merge(struct request_queue *q, struct request *rq, | 1686 | static int cfq_allow_merge(struct request_queue *q, struct request *rq, |
diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c index 59feefe0e3e6..fb6b6d28b60e 100644 --- a/drivers/clocksource/clksrc-dbx500-prcmu.c +++ b/drivers/clocksource/clksrc-dbx500-prcmu.c | |||
@@ -58,25 +58,15 @@ static struct clocksource clocksource_dbx500_prcmu = { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | #ifdef CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK | 60 | #ifdef CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK |
61 | static DEFINE_CLOCK_DATA(cd); | ||
62 | 61 | ||
63 | unsigned long long notrace sched_clock(void) | 62 | static u32 notrace dbx500_prcmu_sched_clock_read(void) |
64 | { | 63 | { |
65 | u32 cyc; | ||
66 | |||
67 | if (unlikely(!clksrc_dbx500_timer_base)) | 64 | if (unlikely(!clksrc_dbx500_timer_base)) |
68 | return 0; | 65 | return 0; |
69 | 66 | ||
70 | cyc = clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu); | 67 | return clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu); |
71 | |||
72 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
73 | } | 68 | } |
74 | 69 | ||
75 | static void notrace clksrc_dbx500_prcmu_update_sched_clock(void) | ||
76 | { | ||
77 | u32 cyc = clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu); | ||
78 | update_sched_clock(&cd, cyc, (u32)~0); | ||
79 | } | ||
80 | #endif | 70 | #endif |
81 | 71 | ||
82 | void __init clksrc_dbx500_prcmu_init(void __iomem *base) | 72 | void __init clksrc_dbx500_prcmu_init(void __iomem *base) |
@@ -97,7 +87,7 @@ void __init clksrc_dbx500_prcmu_init(void __iomem *base) | |||
97 | clksrc_dbx500_timer_base + PRCMU_TIMER_REF); | 87 | clksrc_dbx500_timer_base + PRCMU_TIMER_REF); |
98 | } | 88 | } |
99 | #ifdef CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK | 89 | #ifdef CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK |
100 | init_sched_clock(&cd, clksrc_dbx500_prcmu_update_sched_clock, | 90 | setup_sched_clock(dbx500_prcmu_sched_clock_read, |
101 | 32, RATE_32K); | 91 | 32, RATE_32K); |
102 | #endif | 92 | #endif |
103 | clocksource_calc_mult_shift(&clocksource_dbx500_prcmu, | 93 | clocksource_calc_mult_shift(&clocksource_dbx500_prcmu, |
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index ab8f469f5cf8..5a99bb3f255a 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig | |||
@@ -124,7 +124,7 @@ config MV_XOR | |||
124 | 124 | ||
125 | config MX3_IPU | 125 | config MX3_IPU |
126 | bool "MX3x Image Processing Unit support" | 126 | bool "MX3x Image Processing Unit support" |
127 | depends on ARCH_MX3 | 127 | depends on SOC_IMX31 ||Â SOC_IMX35 |
128 | select DMA_ENGINE | 128 | select DMA_ENGINE |
129 | default y | 129 | default y |
130 | help | 130 | help |
@@ -216,7 +216,7 @@ config PCH_DMA | |||
216 | 216 | ||
217 | config IMX_SDMA | 217 | config IMX_SDMA |
218 | tristate "i.MX SDMA support" | 218 | tristate "i.MX SDMA support" |
219 | depends on ARCH_MX25 || ARCH_MX3 || ARCH_MX5 | 219 | depends on ARCH_MX25 || SOC_IMX31 ||Â SOC_IMX35 || ARCH_MX5 |
220 | select DMA_ENGINE | 220 | select DMA_ENGINE |
221 | help | 221 | help |
222 | Support the i.MX SDMA engine. This engine is integrated into | 222 | Support the i.MX SDMA engine. This engine is integrated into |
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index c681dc149d2a..b9da8900ae4e 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
@@ -756,9 +756,9 @@ intel_enable_semaphores(struct drm_device *dev) | |||
756 | if (i915_semaphores >= 0) | 756 | if (i915_semaphores >= 0) |
757 | return i915_semaphores; | 757 | return i915_semaphores; |
758 | 758 | ||
759 | /* Enable semaphores on SNB when IO remapping is off */ | 759 | /* Disable semaphores on SNB */ |
760 | if (INTEL_INFO(dev)->gen == 6) | 760 | if (INTEL_INFO(dev)->gen == 6) |
761 | return !intel_iommu_enabled; | 761 | return 0; |
762 | 762 | ||
763 | return 1; | 763 | return 1; |
764 | } | 764 | } |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d809b038ca88..daa5743ccbd6 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -7922,13 +7922,11 @@ static bool intel_enable_rc6(struct drm_device *dev) | |||
7922 | return 0; | 7922 | return 0; |
7923 | 7923 | ||
7924 | /* | 7924 | /* |
7925 | * Enable rc6 on Sandybridge if DMA remapping is disabled | 7925 | * Disable rc6 on Sandybridge |
7926 | */ | 7926 | */ |
7927 | if (INTEL_INFO(dev)->gen == 6) { | 7927 | if (INTEL_INFO(dev)->gen == 6) { |
7928 | DRM_DEBUG_DRIVER("Sandybridge: intel_iommu_enabled %s -- RC6 %sabled\n", | 7928 | DRM_DEBUG_DRIVER("Sandybridge: RC6 disabled\n"); |
7929 | intel_iommu_enabled ? "true" : "false", | 7929 | return 0; |
7930 | !intel_iommu_enabled ? "en" : "dis"); | ||
7931 | return !intel_iommu_enabled; | ||
7932 | } | 7930 | } |
7933 | DRM_DEBUG_DRIVER("RC6 enabled\n"); | 7931 | DRM_DEBUG_DRIVER("RC6 enabled\n"); |
7934 | return 1; | 7932 | return 1; |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 5e00d1670aa9..92c9628c572d 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -3276,6 +3276,18 @@ int evergreen_init(struct radeon_device *rdev) | |||
3276 | rdev->accel_working = false; | 3276 | rdev->accel_working = false; |
3277 | } | 3277 | } |
3278 | } | 3278 | } |
3279 | |||
3280 | /* Don't start up if the MC ucode is missing on BTC parts. | ||
3281 | * The default clocks and voltages before the MC ucode | ||
3282 | * is loaded are not suffient for advanced operations. | ||
3283 | */ | ||
3284 | if (ASIC_IS_DCE5(rdev)) { | ||
3285 | if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) { | ||
3286 | DRM_ERROR("radeon: MC ucode required for NI+.\n"); | ||
3287 | return -EINVAL; | ||
3288 | } | ||
3289 | } | ||
3290 | |||
3279 | return 0; | 3291 | return 0; |
3280 | } | 3292 | } |
3281 | 3293 | ||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 8aa1dbb45c67..f94b33ae2215 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
@@ -1093,7 +1093,6 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev, | |||
1093 | struct vmw_surface *surface = NULL; | 1093 | struct vmw_surface *surface = NULL; |
1094 | struct vmw_dma_buffer *bo = NULL; | 1094 | struct vmw_dma_buffer *bo = NULL; |
1095 | struct ttm_base_object *user_obj; | 1095 | struct ttm_base_object *user_obj; |
1096 | u64 required_size; | ||
1097 | int ret; | 1096 | int ret; |
1098 | 1097 | ||
1099 | /** | 1098 | /** |
@@ -1102,8 +1101,9 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev, | |||
1102 | * requested framebuffer. | 1101 | * requested framebuffer. |
1103 | */ | 1102 | */ |
1104 | 1103 | ||
1105 | required_size = mode_cmd->pitch * mode_cmd->height; | 1104 | if (!vmw_kms_validate_mode_vram(dev_priv, |
1106 | if (unlikely(required_size > (u64) dev_priv->vram_size)) { | 1105 | mode_cmd->pitch, |
1106 | mode_cmd->height)) { | ||
1107 | DRM_ERROR("VRAM size is too small for requested mode.\n"); | 1107 | DRM_ERROR("VRAM size is too small for requested mode.\n"); |
1108 | return ERR_PTR(-ENOMEM); | 1108 | return ERR_PTR(-ENOMEM); |
1109 | } | 1109 | } |
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index c5b12d2e955a..86d6f39178b0 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Finger Sensing Pad PS/2 mouse driver. | 2 | * Finger Sensing Pad PS/2 mouse driver. |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. | 4 | * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. |
5 | * Copyright (C) 2005-2010 Tai-hwa Liang, Sentelic Corporation. | 5 | * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
@@ -162,7 +162,7 @@ static int fsp_reg_write(struct psmouse *psmouse, int reg_addr, int reg_val) | |||
162 | ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2); | 162 | ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2); |
163 | 163 | ||
164 | if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) | 164 | if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) |
165 | return -1; | 165 | goto out; |
166 | 166 | ||
167 | if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { | 167 | if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { |
168 | /* inversion is required */ | 168 | /* inversion is required */ |
@@ -261,7 +261,7 @@ static int fsp_page_reg_write(struct psmouse *psmouse, int reg_val) | |||
261 | ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2); | 261 | ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2); |
262 | 262 | ||
263 | if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) | 263 | if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) |
264 | return -1; | 264 | goto out; |
265 | 265 | ||
266 | if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { | 266 | if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { |
267 | ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2); | 267 | ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2); |
@@ -309,7 +309,7 @@ static int fsp_get_buttons(struct psmouse *psmouse, int *btn) | |||
309 | }; | 309 | }; |
310 | int val; | 310 | int val; |
311 | 311 | ||
312 | if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS1, &val) == -1) | 312 | if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS, &val) == -1) |
313 | return -EIO; | 313 | return -EIO; |
314 | 314 | ||
315 | *btn = buttons[(val & 0x30) >> 4]; | 315 | *btn = buttons[(val & 0x30) >> 4]; |
diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h index ed1395ac7b8b..2e4af24f8c15 100644 --- a/drivers/input/mouse/sentelic.h +++ b/drivers/input/mouse/sentelic.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Finger Sensing Pad PS/2 mouse driver. | 2 | * Finger Sensing Pad PS/2 mouse driver. |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. | 4 | * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. |
5 | * Copyright (C) 2005-2009 Tai-hwa Liang, Sentelic Corporation. | 5 | * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
@@ -33,6 +33,7 @@ | |||
33 | /* Finger-sensing Pad control registers */ | 33 | /* Finger-sensing Pad control registers */ |
34 | #define FSP_REG_SYSCTL1 0x10 | 34 | #define FSP_REG_SYSCTL1 0x10 |
35 | #define FSP_BIT_EN_REG_CLK BIT(5) | 35 | #define FSP_BIT_EN_REG_CLK BIT(5) |
36 | #define FSP_REG_TMOD_STATUS 0x20 | ||
36 | #define FSP_REG_OPC_QDOWN 0x31 | 37 | #define FSP_REG_OPC_QDOWN 0x31 |
37 | #define FSP_BIT_EN_OPC_TAG BIT(7) | 38 | #define FSP_BIT_EN_OPC_TAG BIT(7) |
38 | #define FSP_REG_OPTZ_XLO 0x34 | 39 | #define FSP_REG_OPTZ_XLO 0x34 |
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 2fb2963df553..5b5fa5cdaa31 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c | |||
@@ -90,7 +90,7 @@ struct iommu_domain *iommu_domain_alloc(struct bus_type *bus) | |||
90 | if (bus == NULL || bus->iommu_ops == NULL) | 90 | if (bus == NULL || bus->iommu_ops == NULL) |
91 | return NULL; | 91 | return NULL; |
92 | 92 | ||
93 | domain = kmalloc(sizeof(*domain), GFP_KERNEL); | 93 | domain = kzalloc(sizeof(*domain), GFP_KERNEL); |
94 | if (!domain) | 94 | if (!domain) |
95 | return NULL; | 95 | return NULL; |
96 | 96 | ||
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 881e04c7ffe6..2ca10dfec91f 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -838,13 +838,13 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) | |||
838 | gspca_dev->usb_err = 0; | 838 | gspca_dev->usb_err = 0; |
839 | 839 | ||
840 | /* do the specific subdriver stuff before endpoint selection */ | 840 | /* do the specific subdriver stuff before endpoint selection */ |
841 | gspca_dev->alt = 0; | 841 | intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); |
842 | gspca_dev->alt = gspca_dev->cam.bulk ? intf->num_altsetting : 0; | ||
842 | if (gspca_dev->sd_desc->isoc_init) { | 843 | if (gspca_dev->sd_desc->isoc_init) { |
843 | ret = gspca_dev->sd_desc->isoc_init(gspca_dev); | 844 | ret = gspca_dev->sd_desc->isoc_init(gspca_dev); |
844 | if (ret < 0) | 845 | if (ret < 0) |
845 | goto unlock; | 846 | goto unlock; |
846 | } | 847 | } |
847 | intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); | ||
848 | xfer = gspca_dev->cam.bulk ? USB_ENDPOINT_XFER_BULK | 848 | xfer = gspca_dev->cam.bulk ? USB_ENDPOINT_XFER_BULK |
849 | : USB_ENDPOINT_XFER_ISOC; | 849 | : USB_ENDPOINT_XFER_ISOC; |
850 | 850 | ||
@@ -957,7 +957,7 @@ retry: | |||
957 | ret = -EIO; | 957 | ret = -EIO; |
958 | goto out; | 958 | goto out; |
959 | } | 959 | } |
960 | alt = ep_tb[--alt_idx].alt; | 960 | gspca_dev->alt = ep_tb[--alt_idx].alt; |
961 | } | 961 | } |
962 | } | 962 | } |
963 | out: | 963 | out: |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 50b5f9926f64..0726e59fd418 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -675,7 +675,8 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data, | |||
675 | unsigned int status) | 675 | unsigned int status) |
676 | { | 676 | { |
677 | /* First check for errors */ | 677 | /* First check for errors */ |
678 | if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|MCI_RXOVERRUN)) { | 678 | if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR| |
679 | MCI_TXUNDERRUN|MCI_RXOVERRUN)) { | ||
679 | u32 remain, success; | 680 | u32 remain, success; |
680 | 681 | ||
681 | /* Terminate the DMA transfer */ | 682 | /* Terminate the DMA transfer */ |
@@ -754,8 +755,12 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd, | |||
754 | } | 755 | } |
755 | 756 | ||
756 | if (!cmd->data || cmd->error) { | 757 | if (!cmd->data || cmd->error) { |
757 | if (host->data) | 758 | if (host->data) { |
759 | /* Terminate the DMA transfer */ | ||
760 | if (dma_inprogress(host)) | ||
761 | mmci_dma_data_error(host); | ||
758 | mmci_stop_data(host); | 762 | mmci_stop_data(host); |
763 | } | ||
759 | mmci_request_end(host, cmd->mrq); | 764 | mmci_request_end(host, cmd->mrq); |
760 | } else if (!(cmd->data->flags & MMC_DATA_READ)) { | 765 | } else if (!(cmd->data->flags & MMC_DATA_READ)) { |
761 | mmci_start_data(host, cmd->data); | 766 | mmci_start_data(host, cmd->data); |
@@ -955,8 +960,9 @@ static irqreturn_t mmci_irq(int irq, void *dev_id) | |||
955 | dev_dbg(mmc_dev(host->mmc), "irq0 (data+cmd) %08x\n", status); | 960 | dev_dbg(mmc_dev(host->mmc), "irq0 (data+cmd) %08x\n", status); |
956 | 961 | ||
957 | data = host->data; | 962 | data = host->data; |
958 | if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN| | 963 | if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR| |
959 | MCI_RXOVERRUN|MCI_DATAEND|MCI_DATABLOCKEND) && data) | 964 | MCI_TXUNDERRUN|MCI_RXOVERRUN|MCI_DATAEND| |
965 | MCI_DATABLOCKEND) && data) | ||
960 | mmci_data_irq(host, data, status); | 966 | mmci_data_irq(host, data, status); |
961 | 967 | ||
962 | cmd = host->cmd; | 968 | cmd = host->cmd; |
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index c7b60839ac99..dea0cb4400e2 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c | |||
@@ -2606,6 +2606,9 @@ static int skge_up(struct net_device *dev) | |||
2606 | spin_unlock_irq(&hw->hw_lock); | 2606 | spin_unlock_irq(&hw->hw_lock); |
2607 | 2607 | ||
2608 | napi_enable(&skge->napi); | 2608 | napi_enable(&skge->napi); |
2609 | |||
2610 | skge_set_multicast(dev); | ||
2611 | |||
2609 | return 0; | 2612 | return 0; |
2610 | 2613 | ||
2611 | free_tx_ring: | 2614 | free_tx_ring: |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ethernet/mellanox/mlx4/en_cq.c index 227997d775e8..5829e0b47e7e 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c | |||
@@ -147,6 +147,7 @@ void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq) | |||
147 | mlx4_free_hwq_res(mdev->dev, &cq->wqres, cq->buf_size); | 147 | mlx4_free_hwq_res(mdev->dev, &cq->wqres, cq->buf_size); |
148 | if (priv->mdev->dev->caps.comp_pool && cq->vector) | 148 | if (priv->mdev->dev->caps.comp_pool && cq->vector) |
149 | mlx4_release_eq(priv->mdev->dev, cq->vector); | 149 | mlx4_release_eq(priv->mdev->dev, cq->vector); |
150 | cq->vector = 0; | ||
150 | cq->buf_size = 0; | 151 | cq->buf_size = 0; |
151 | cq->buf = NULL; | 152 | cq->buf = NULL; |
152 | } | 153 | } |
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index cbd5d701c7e0..63b3ec48c203 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -314,7 +314,7 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l | |||
314 | if (!lookup) | 314 | if (!lookup) |
315 | return NULL; | 315 | return NULL; |
316 | 316 | ||
317 | for(; lookup->name != NULL; lookup++) { | 317 | for(; lookup->compatible != NULL; lookup++) { |
318 | if (!of_device_is_compatible(np, lookup->compatible)) | 318 | if (!of_device_is_compatible(np, lookup->compatible)) |
319 | continue; | 319 | continue; |
320 | if (of_address_to_resource(np, 0, &res)) | 320 | if (of_address_to_resource(np, 0, &res)) |
diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c index 03f449a430d2..5b89f7d6cd0f 100644 --- a/drivers/watchdog/coh901327_wdt.c +++ b/drivers/watchdog/coh901327_wdt.c | |||
@@ -76,8 +76,6 @@ static int irq; | |||
76 | static void __iomem *virtbase; | 76 | static void __iomem *virtbase; |
77 | static unsigned long coh901327_users; | 77 | static unsigned long coh901327_users; |
78 | static unsigned long boot_status; | 78 | static unsigned long boot_status; |
79 | static u16 wdogenablestore; | ||
80 | static u16 irqmaskstore; | ||
81 | static struct device *parent; | 79 | static struct device *parent; |
82 | 80 | ||
83 | /* | 81 | /* |
@@ -461,6 +459,10 @@ out: | |||
461 | } | 459 | } |
462 | 460 | ||
463 | #ifdef CONFIG_PM | 461 | #ifdef CONFIG_PM |
462 | |||
463 | static u16 wdogenablestore; | ||
464 | static u16 irqmaskstore; | ||
465 | |||
464 | static int coh901327_suspend(struct platform_device *pdev, pm_message_t state) | 466 | static int coh901327_suspend(struct platform_device *pdev, pm_message_t state) |
465 | { | 467 | { |
466 | irqmaskstore = readw(virtbase + U300_WDOG_IMR) & 0x0001U; | 468 | irqmaskstore = readw(virtbase + U300_WDOG_IMR) & 0x0001U; |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 3774c9b8dac9..8464ea1c36a1 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -231,6 +231,7 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
231 | 231 | ||
232 | cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE; | 232 | cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE; |
233 | 233 | ||
234 | set_memory_x((unsigned long)bios32_entrypoint, (2 * PAGE_SIZE)); | ||
234 | asminline_call(&cmn_regs, bios32_entrypoint); | 235 | asminline_call(&cmn_regs, bios32_entrypoint); |
235 | 236 | ||
236 | if (cmn_regs.u1.ral != 0) { | 237 | if (cmn_regs.u1.ral != 0) { |
@@ -248,8 +249,10 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
248 | if ((physical_bios_base + physical_bios_offset)) { | 249 | if ((physical_bios_base + physical_bios_offset)) { |
249 | cru_rom_addr = | 250 | cru_rom_addr = |
250 | ioremap(cru_physical_address, cru_length); | 251 | ioremap(cru_physical_address, cru_length); |
251 | if (cru_rom_addr) | 252 | if (cru_rom_addr) { |
253 | set_memory_x((unsigned long)cru_rom_addr, cru_length); | ||
252 | retval = 0; | 254 | retval = 0; |
255 | } | ||
253 | } | 256 | } |
254 | 257 | ||
255 | printk(KERN_DEBUG "hpwdt: CRU Base Address: 0x%lx\n", | 258 | printk(KERN_DEBUG "hpwdt: CRU Base Address: 0x%lx\n", |
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index ba6ad662635a..99796c5d913d 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c | |||
@@ -384,10 +384,10 @@ MODULE_PARM_DESC(nowayout, | |||
384 | "Watchdog cannot be stopped once started (default=" | 384 | "Watchdog cannot be stopped once started (default=" |
385 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 385 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
386 | 386 | ||
387 | static int turn_SMI_watchdog_clear_off = 0; | 387 | static int turn_SMI_watchdog_clear_off = 1; |
388 | module_param(turn_SMI_watchdog_clear_off, int, 0); | 388 | module_param(turn_SMI_watchdog_clear_off, int, 0); |
389 | MODULE_PARM_DESC(turn_SMI_watchdog_clear_off, | 389 | MODULE_PARM_DESC(turn_SMI_watchdog_clear_off, |
390 | "Turn off SMI clearing watchdog (default=0)"); | 390 | "Turn off SMI clearing watchdog (depends on TCO-version)(default=1)"); |
391 | 391 | ||
392 | /* | 392 | /* |
393 | * Some TCO specific functions | 393 | * Some TCO specific functions |
@@ -813,7 +813,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, | |||
813 | ret = -EIO; | 813 | ret = -EIO; |
814 | goto out_unmap; | 814 | goto out_unmap; |
815 | } | 815 | } |
816 | if (turn_SMI_watchdog_clear_off) { | 816 | if (turn_SMI_watchdog_clear_off >= iTCO_wdt_private.iTCO_version) { |
817 | /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */ | 817 | /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */ |
818 | val32 = inl(SMI_EN); | 818 | val32 = inl(SMI_EN); |
819 | val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */ | 819 | val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */ |
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index cc2cfbe33b30..bfaf9bb1ee0d 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c | |||
@@ -351,7 +351,7 @@ static int __devexit sp805_wdt_remove(struct amba_device *adev) | |||
351 | return 0; | 351 | return 0; |
352 | } | 352 | } |
353 | 353 | ||
354 | static struct amba_id sp805_wdt_ids[] __initdata = { | 354 | static struct amba_id sp805_wdt_ids[] = { |
355 | { | 355 | { |
356 | .id = 0x00141805, | 356 | .id = 0x00141805, |
357 | .mask = 0x00ffffff, | 357 | .mask = 0x00ffffff, |
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 3eeb97661262..98954003a8d3 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -1094,42 +1094,19 @@ static int ceph_snapdir_d_revalidate(struct dentry *dentry, | |||
1094 | /* | 1094 | /* |
1095 | * Set/clear/test dir complete flag on the dir's dentry. | 1095 | * Set/clear/test dir complete flag on the dir's dentry. |
1096 | */ | 1096 | */ |
1097 | static struct dentry * __d_find_any_alias(struct inode *inode) | ||
1098 | { | ||
1099 | struct dentry *alias; | ||
1100 | |||
1101 | if (list_empty(&inode->i_dentry)) | ||
1102 | return NULL; | ||
1103 | alias = list_first_entry(&inode->i_dentry, struct dentry, d_alias); | ||
1104 | return alias; | ||
1105 | } | ||
1106 | |||
1107 | void ceph_dir_set_complete(struct inode *inode) | 1097 | void ceph_dir_set_complete(struct inode *inode) |
1108 | { | 1098 | { |
1109 | struct dentry *dentry = __d_find_any_alias(inode); | 1099 | /* not yet implemented */ |
1110 | |||
1111 | if (dentry && ceph_dentry(dentry)) { | ||
1112 | dout(" marking %p (%p) complete\n", inode, dentry); | ||
1113 | set_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); | ||
1114 | } | ||
1115 | } | 1100 | } |
1116 | 1101 | ||
1117 | void ceph_dir_clear_complete(struct inode *inode) | 1102 | void ceph_dir_clear_complete(struct inode *inode) |
1118 | { | 1103 | { |
1119 | struct dentry *dentry = __d_find_any_alias(inode); | 1104 | /* not yet implemented */ |
1120 | |||
1121 | if (dentry && ceph_dentry(dentry)) { | ||
1122 | dout(" marking %p (%p) NOT complete\n", inode, dentry); | ||
1123 | clear_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); | ||
1124 | } | ||
1125 | } | 1105 | } |
1126 | 1106 | ||
1127 | bool ceph_dir_test_complete(struct inode *inode) | 1107 | bool ceph_dir_test_complete(struct inode *inode) |
1128 | { | 1108 | { |
1129 | struct dentry *dentry = __d_find_any_alias(inode); | 1109 | /* not yet implemented */ |
1130 | |||
1131 | if (dentry && ceph_dentry(dentry)) | ||
1132 | return test_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); | ||
1133 | return false; | 1110 | return false; |
1134 | } | 1111 | } |
1135 | 1112 | ||
diff --git a/fs/locks.c b/fs/locks.c index 3b0d05dcd7c1..637694bf3a03 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -1205,6 +1205,8 @@ int __break_lease(struct inode *inode, unsigned int mode) | |||
1205 | int want_write = (mode & O_ACCMODE) != O_RDONLY; | 1205 | int want_write = (mode & O_ACCMODE) != O_RDONLY; |
1206 | 1206 | ||
1207 | new_fl = lease_alloc(NULL, want_write ? F_WRLCK : F_RDLCK); | 1207 | new_fl = lease_alloc(NULL, want_write ? F_WRLCK : F_RDLCK); |
1208 | if (IS_ERR(new_fl)) | ||
1209 | return PTR_ERR(new_fl); | ||
1208 | 1210 | ||
1209 | lock_flocks(); | 1211 | lock_flocks(); |
1210 | 1212 | ||
@@ -1221,12 +1223,6 @@ int __break_lease(struct inode *inode, unsigned int mode) | |||
1221 | if (fl->fl_owner == current->files) | 1223 | if (fl->fl_owner == current->files) |
1222 | i_have_this_lease = 1; | 1224 | i_have_this_lease = 1; |
1223 | 1225 | ||
1224 | if (IS_ERR(new_fl) && !i_have_this_lease | ||
1225 | && ((mode & O_NONBLOCK) == 0)) { | ||
1226 | error = PTR_ERR(new_fl); | ||
1227 | goto out; | ||
1228 | } | ||
1229 | |||
1230 | break_time = 0; | 1226 | break_time = 0; |
1231 | if (lease_break_time > 0) { | 1227 | if (lease_break_time > 0) { |
1232 | break_time = jiffies + lease_break_time * HZ; | 1228 | break_time = jiffies + lease_break_time * HZ; |
@@ -1284,8 +1280,7 @@ restart: | |||
1284 | 1280 | ||
1285 | out: | 1281 | out: |
1286 | unlock_flocks(); | 1282 | unlock_flocks(); |
1287 | if (!IS_ERR(new_fl)) | 1283 | locks_free_lock(new_fl); |
1288 | locks_free_lock(new_fl); | ||
1289 | return error; | 1284 | return error; |
1290 | } | 1285 | } |
1291 | 1286 | ||
diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 2a30d67dd6b8..0855e6f20391 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c | |||
@@ -32,7 +32,7 @@ static cputime64_t get_idle_time(int cpu) | |||
32 | idle = kstat_cpu(cpu).cpustat.idle; | 32 | idle = kstat_cpu(cpu).cpustat.idle; |
33 | idle = cputime64_add(idle, arch_idle_time(cpu)); | 33 | idle = cputime64_add(idle, arch_idle_time(cpu)); |
34 | } else | 34 | } else |
35 | idle = nsecs_to_jiffies64(1000 * idle_time); | 35 | idle = usecs_to_cputime64(idle_time); |
36 | 36 | ||
37 | return idle; | 37 | return idle; |
38 | } | 38 | } |
@@ -46,7 +46,7 @@ static cputime64_t get_iowait_time(int cpu) | |||
46 | /* !NO_HZ so we can rely on cpustat.iowait */ | 46 | /* !NO_HZ so we can rely on cpustat.iowait */ |
47 | iowait = kstat_cpu(cpu).cpustat.iowait; | 47 | iowait = kstat_cpu(cpu).cpustat.iowait; |
48 | else | 48 | else |
49 | iowait = nsecs_to_jiffies64(1000 * iowait_time); | 49 | iowait = usecs_to_cputime64(iowait_time); |
50 | 50 | ||
51 | return iowait; | 51 | return iowait; |
52 | } | 52 | } |
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 3eca58f51ae9..8a899496fd5f 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -869,27 +869,6 @@ xfs_fs_dirty_inode( | |||
869 | } | 869 | } |
870 | 870 | ||
871 | STATIC int | 871 | STATIC int |
872 | xfs_log_inode( | ||
873 | struct xfs_inode *ip) | ||
874 | { | ||
875 | struct xfs_mount *mp = ip->i_mount; | ||
876 | struct xfs_trans *tp; | ||
877 | int error; | ||
878 | |||
879 | tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS); | ||
880 | error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0); | ||
881 | if (error) { | ||
882 | xfs_trans_cancel(tp, 0); | ||
883 | return error; | ||
884 | } | ||
885 | |||
886 | xfs_ilock(ip, XFS_ILOCK_EXCL); | ||
887 | xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); | ||
888 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | ||
889 | return xfs_trans_commit(tp, 0); | ||
890 | } | ||
891 | |||
892 | STATIC int | ||
893 | xfs_fs_write_inode( | 872 | xfs_fs_write_inode( |
894 | struct inode *inode, | 873 | struct inode *inode, |
895 | struct writeback_control *wbc) | 874 | struct writeback_control *wbc) |
@@ -902,10 +881,8 @@ xfs_fs_write_inode( | |||
902 | 881 | ||
903 | if (XFS_FORCED_SHUTDOWN(mp)) | 882 | if (XFS_FORCED_SHUTDOWN(mp)) |
904 | return -XFS_ERROR(EIO); | 883 | return -XFS_ERROR(EIO); |
905 | if (!ip->i_update_core) | ||
906 | return 0; | ||
907 | 884 | ||
908 | if (wbc->sync_mode == WB_SYNC_ALL) { | 885 | if (wbc->sync_mode == WB_SYNC_ALL || wbc->for_kupdate) { |
909 | /* | 886 | /* |
910 | * Make sure the inode has made it it into the log. Instead | 887 | * Make sure the inode has made it it into the log. Instead |
911 | * of forcing it all the way to stable storage using a | 888 | * of forcing it all the way to stable storage using a |
@@ -913,11 +890,14 @@ xfs_fs_write_inode( | |||
913 | * ->sync_fs call do that for thus, which reduces the number | 890 | * ->sync_fs call do that for thus, which reduces the number |
914 | * of synchronous log forces dramatically. | 891 | * of synchronous log forces dramatically. |
915 | */ | 892 | */ |
916 | error = xfs_log_inode(ip); | 893 | error = xfs_log_dirty_inode(ip, NULL, 0); |
917 | if (error) | 894 | if (error) |
918 | goto out; | 895 | goto out; |
919 | return 0; | 896 | return 0; |
920 | } else { | 897 | } else { |
898 | if (!ip->i_update_core) | ||
899 | return 0; | ||
900 | |||
921 | /* | 901 | /* |
922 | * We make this non-blocking if the inode is contended, return | 902 | * We make this non-blocking if the inode is contended, return |
923 | * EAGAIN to indicate to the caller that they did not succeed. | 903 | * EAGAIN to indicate to the caller that they did not succeed. |
diff --git a/fs/xfs/xfs_sync.c b/fs/xfs/xfs_sync.c index be5c51d8f757..f0994aedcd15 100644 --- a/fs/xfs/xfs_sync.c +++ b/fs/xfs/xfs_sync.c | |||
@@ -336,6 +336,32 @@ xfs_sync_fsdata( | |||
336 | return error; | 336 | return error; |
337 | } | 337 | } |
338 | 338 | ||
339 | int | ||
340 | xfs_log_dirty_inode( | ||
341 | struct xfs_inode *ip, | ||
342 | struct xfs_perag *pag, | ||
343 | int flags) | ||
344 | { | ||
345 | struct xfs_mount *mp = ip->i_mount; | ||
346 | struct xfs_trans *tp; | ||
347 | int error; | ||
348 | |||
349 | if (!ip->i_update_core) | ||
350 | return 0; | ||
351 | |||
352 | tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS); | ||
353 | error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0); | ||
354 | if (error) { | ||
355 | xfs_trans_cancel(tp, 0); | ||
356 | return error; | ||
357 | } | ||
358 | |||
359 | xfs_ilock(ip, XFS_ILOCK_EXCL); | ||
360 | xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); | ||
361 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | ||
362 | return xfs_trans_commit(tp, 0); | ||
363 | } | ||
364 | |||
339 | /* | 365 | /* |
340 | * When remounting a filesystem read-only or freezing the filesystem, we have | 366 | * When remounting a filesystem read-only or freezing the filesystem, we have |
341 | * two phases to execute. This first phase is syncing the data before we | 367 | * two phases to execute. This first phase is syncing the data before we |
@@ -359,6 +385,16 @@ xfs_quiesce_data( | |||
359 | { | 385 | { |
360 | int error, error2 = 0; | 386 | int error, error2 = 0; |
361 | 387 | ||
388 | /* | ||
389 | * Log all pending size and timestamp updates. The vfs writeback | ||
390 | * code is supposed to do this, but due to its overagressive | ||
391 | * livelock detection it will skip inodes where appending writes | ||
392 | * were written out in the first non-blocking sync phase if their | ||
393 | * completion took long enough that it happened after taking the | ||
394 | * timestamp for the cut-off in the blocking phase. | ||
395 | */ | ||
396 | xfs_inode_ag_iterator(mp, xfs_log_dirty_inode, 0); | ||
397 | |||
362 | xfs_qm_sync(mp, SYNC_TRYLOCK); | 398 | xfs_qm_sync(mp, SYNC_TRYLOCK); |
363 | xfs_qm_sync(mp, SYNC_WAIT); | 399 | xfs_qm_sync(mp, SYNC_WAIT); |
364 | 400 | ||
diff --git a/fs/xfs/xfs_sync.h b/fs/xfs/xfs_sync.h index 941202e7ac6e..fa965479d788 100644 --- a/fs/xfs/xfs_sync.h +++ b/fs/xfs/xfs_sync.h | |||
@@ -34,6 +34,8 @@ void xfs_quiesce_attr(struct xfs_mount *mp); | |||
34 | 34 | ||
35 | void xfs_flush_inodes(struct xfs_inode *ip); | 35 | void xfs_flush_inodes(struct xfs_inode *ip); |
36 | 36 | ||
37 | int xfs_log_dirty_inode(struct xfs_inode *ip, struct xfs_perag *pag, int flags); | ||
38 | |||
37 | int xfs_reclaim_inodes(struct xfs_mount *mp, int mode); | 39 | int xfs_reclaim_inodes(struct xfs_mount *mp, int mode); |
38 | int xfs_reclaim_inodes_count(struct xfs_mount *mp); | 40 | int xfs_reclaim_inodes_count(struct xfs_mount *mp); |
39 | void xfs_reclaim_inodes_nr(struct xfs_mount *mp, int nr_to_scan); | 41 | void xfs_reclaim_inodes_nr(struct xfs_mount *mp, int nr_to_scan); |
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 62ce6823c0f2..12a1764f612b 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h | |||
@@ -40,6 +40,7 @@ typedef u64 cputime64_t; | |||
40 | */ | 40 | */ |
41 | #define cputime_to_usecs(__ct) jiffies_to_usecs(__ct) | 41 | #define cputime_to_usecs(__ct) jiffies_to_usecs(__ct) |
42 | #define usecs_to_cputime(__msecs) usecs_to_jiffies(__msecs) | 42 | #define usecs_to_cputime(__msecs) usecs_to_jiffies(__msecs) |
43 | #define usecs_to_cputime64(__msecs) nsecs_to_jiffies64((__msecs) * 1000) | ||
43 | 44 | ||
44 | /* | 45 | /* |
45 | * Convert cputime to seconds and back. | 46 | * Convert cputime to seconds and back. |
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 99834e581b9e..bd4272b61a14 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
@@ -91,10 +91,11 @@ static inline unsigned int irq_domain_to_irq(struct irq_domain *d, | |||
91 | 91 | ||
92 | extern void irq_domain_add(struct irq_domain *domain); | 92 | extern void irq_domain_add(struct irq_domain *domain); |
93 | extern void irq_domain_del(struct irq_domain *domain); | 93 | extern void irq_domain_del(struct irq_domain *domain); |
94 | |||
95 | extern struct irq_domain_ops irq_domain_simple_ops; | ||
94 | #endif /* CONFIG_IRQ_DOMAIN */ | 96 | #endif /* CONFIG_IRQ_DOMAIN */ |
95 | 97 | ||
96 | #if defined(CONFIG_IRQ_DOMAIN) && defined(CONFIG_OF_IRQ) | 98 | #if defined(CONFIG_IRQ_DOMAIN) && defined(CONFIG_OF_IRQ) |
97 | extern struct irq_domain_ops irq_domain_simple_ops; | ||
98 | extern void irq_domain_add_simple(struct device_node *controller, int irq_base); | 99 | extern void irq_domain_add_simple(struct device_node *controller, int irq_base); |
99 | extern void irq_domain_generate_simple(const struct of_device_id *match, | 100 | extern void irq_domain_generate_simple(const struct of_device_id *match, |
100 | u64 phys_base, unsigned int irq_start); | 101 | u64 phys_base, unsigned int irq_start); |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index c3892fc1d538..68e67e50d028 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -557,6 +557,7 @@ struct kvm_ppc_pvinfo { | |||
557 | #define KVM_CAP_MAX_VCPUS 66 /* returns max vcpus per vm */ | 557 | #define KVM_CAP_MAX_VCPUS 66 /* returns max vcpus per vm */ |
558 | #define KVM_CAP_PPC_PAPR 68 | 558 | #define KVM_CAP_PPC_PAPR 68 |
559 | #define KVM_CAP_S390_GMAP 71 | 559 | #define KVM_CAP_S390_GMAP 71 |
560 | #define KVM_CAP_TSC_DEADLINE_TIMER 72 | ||
560 | 561 | ||
561 | #ifdef KVM_CAP_IRQ_ROUTING | 562 | #ifdef KVM_CAP_IRQ_ROUTING |
562 | 563 | ||
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4bde182fcf93..dcdfc2bda922 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -131,6 +131,7 @@ extern long vwrite(char *buf, char *addr, unsigned long count); | |||
131 | */ | 131 | */ |
132 | extern rwlock_t vmlist_lock; | 132 | extern rwlock_t vmlist_lock; |
133 | extern struct vm_struct *vmlist; | 133 | extern struct vm_struct *vmlist; |
134 | extern __init void vm_area_add_early(struct vm_struct *vm); | ||
134 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); | 135 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); |
135 | 136 | ||
136 | #ifdef CONFIG_SMP | 137 | #ifdef CONFIG_SMP |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 873d5be7926c..e5a7b9aaf552 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -1207,7 +1207,7 @@ extern void ip_vs_control_cleanup(void); | |||
1207 | extern struct ip_vs_dest * | 1207 | extern struct ip_vs_dest * |
1208 | ip_vs_find_dest(struct net *net, int af, const union nf_inet_addr *daddr, | 1208 | ip_vs_find_dest(struct net *net, int af, const union nf_inet_addr *daddr, |
1209 | __be16 dport, const union nf_inet_addr *vaddr, __be16 vport, | 1209 | __be16 dport, const union nf_inet_addr *vaddr, __be16 vport, |
1210 | __u16 protocol, __u32 fwmark); | 1210 | __u16 protocol, __u32 fwmark, __u32 flags); |
1211 | extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp); | 1211 | extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp); |
1212 | 1212 | ||
1213 | 1213 | ||
diff --git a/kernel/futex.c b/kernel/futex.c index ea87f4d2f455..1614be20173d 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -314,17 +314,29 @@ again: | |||
314 | #endif | 314 | #endif |
315 | 315 | ||
316 | lock_page(page_head); | 316 | lock_page(page_head); |
317 | |||
318 | /* | ||
319 | * If page_head->mapping is NULL, then it cannot be a PageAnon | ||
320 | * page; but it might be the ZERO_PAGE or in the gate area or | ||
321 | * in a special mapping (all cases which we are happy to fail); | ||
322 | * or it may have been a good file page when get_user_pages_fast | ||
323 | * found it, but truncated or holepunched or subjected to | ||
324 | * invalidate_complete_page2 before we got the page lock (also | ||
325 | * cases which we are happy to fail). And we hold a reference, | ||
326 | * so refcount care in invalidate_complete_page's remove_mapping | ||
327 | * prevents drop_caches from setting mapping to NULL beneath us. | ||
328 | * | ||
329 | * The case we do have to guard against is when memory pressure made | ||
330 | * shmem_writepage move it from filecache to swapcache beneath us: | ||
331 | * an unlikely race, but we do need to retry for page_head->mapping. | ||
332 | */ | ||
317 | if (!page_head->mapping) { | 333 | if (!page_head->mapping) { |
334 | int shmem_swizzled = PageSwapCache(page_head); | ||
318 | unlock_page(page_head); | 335 | unlock_page(page_head); |
319 | put_page(page_head); | 336 | put_page(page_head); |
320 | /* | 337 | if (shmem_swizzled) |
321 | * ZERO_PAGE pages don't have a mapping. Avoid a busy loop | 338 | goto again; |
322 | * trying to find one. RW mapping would have COW'd (and thus | 339 | return -EFAULT; |
323 | * have a mapping) so this page is RO and won't ever change. | ||
324 | */ | ||
325 | if ((page_head == ZERO_PAGE(address))) | ||
326 | return -EFAULT; | ||
327 | goto again; | ||
328 | } | 340 | } |
329 | 341 | ||
330 | /* | 342 | /* |
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 200ce832c585..7ca523b249ef 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
@@ -143,11 +143,6 @@ int irq_domain_simple_dt_translate(struct irq_domain *d, | |||
143 | return 0; | 143 | return 0; |
144 | } | 144 | } |
145 | 145 | ||
146 | struct irq_domain_ops irq_domain_simple_ops = { | ||
147 | .dt_translate = irq_domain_simple_dt_translate, | ||
148 | }; | ||
149 | EXPORT_SYMBOL_GPL(irq_domain_simple_ops); | ||
150 | |||
151 | /** | 146 | /** |
152 | * irq_domain_create_simple() - Set up a 'simple' translation range | 147 | * irq_domain_create_simple() - Set up a 'simple' translation range |
153 | */ | 148 | */ |
@@ -182,3 +177,10 @@ void irq_domain_generate_simple(const struct of_device_id *match, | |||
182 | } | 177 | } |
183 | EXPORT_SYMBOL_GPL(irq_domain_generate_simple); | 178 | EXPORT_SYMBOL_GPL(irq_domain_generate_simple); |
184 | #endif /* CONFIG_OF_IRQ */ | 179 | #endif /* CONFIG_OF_IRQ */ |
180 | |||
181 | struct irq_domain_ops irq_domain_simple_ops = { | ||
182 | #ifdef CONFIG_OF_IRQ | ||
183 | .dt_translate = irq_domain_simple_dt_translate, | ||
184 | #endif /* CONFIG_OF_IRQ */ | ||
185 | }; | ||
186 | EXPORT_SYMBOL_GPL(irq_domain_simple_ops); | ||
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index c4eb71c8b2ea..1ecd6ba36d6c 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -387,7 +387,6 @@ void clockevents_exchange_device(struct clock_event_device *old, | |||
387 | * released list and do a notify add later. | 387 | * released list and do a notify add later. |
388 | */ | 388 | */ |
389 | if (old) { | 389 | if (old) { |
390 | old->event_handler = clockevents_handle_noop; | ||
391 | clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED); | 390 | clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED); |
392 | list_del(&old->list); | 391 | list_del(&old->list); |
393 | list_add(&old->list, &clockevents_released); | 392 | list_add(&old->list, &clockevents_released); |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 73f17c0293c0..2316840b337a 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -901,7 +901,6 @@ retry: | |||
901 | h->resv_huge_pages += delta; | 901 | h->resv_huge_pages += delta; |
902 | ret = 0; | 902 | ret = 0; |
903 | 903 | ||
904 | spin_unlock(&hugetlb_lock); | ||
905 | /* Free the needed pages to the hugetlb pool */ | 904 | /* Free the needed pages to the hugetlb pool */ |
906 | list_for_each_entry_safe(page, tmp, &surplus_list, lru) { | 905 | list_for_each_entry_safe(page, tmp, &surplus_list, lru) { |
907 | if ((--needed) < 0) | 906 | if ((--needed) < 0) |
@@ -915,6 +914,7 @@ retry: | |||
915 | VM_BUG_ON(page_count(page)); | 914 | VM_BUG_ON(page_count(page)); |
916 | enqueue_huge_page(h, page); | 915 | enqueue_huge_page(h, page); |
917 | } | 916 | } |
917 | spin_unlock(&hugetlb_lock); | ||
918 | 918 | ||
919 | /* Free unnecessary surplus pages to the buddy allocator */ | 919 | /* Free unnecessary surplus pages to the buddy allocator */ |
920 | free: | 920 | free: |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index adc395481813..c3fdbcb17658 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -636,6 +636,7 @@ static int mbind_range(struct mm_struct *mm, unsigned long start, | |||
636 | struct vm_area_struct *prev; | 636 | struct vm_area_struct *prev; |
637 | struct vm_area_struct *vma; | 637 | struct vm_area_struct *vma; |
638 | int err = 0; | 638 | int err = 0; |
639 | pgoff_t pgoff; | ||
639 | unsigned long vmstart; | 640 | unsigned long vmstart; |
640 | unsigned long vmend; | 641 | unsigned long vmend; |
641 | 642 | ||
@@ -643,13 +644,21 @@ static int mbind_range(struct mm_struct *mm, unsigned long start, | |||
643 | if (!vma || vma->vm_start > start) | 644 | if (!vma || vma->vm_start > start) |
644 | return -EFAULT; | 645 | return -EFAULT; |
645 | 646 | ||
647 | if (start > vma->vm_start) | ||
648 | prev = vma; | ||
649 | |||
646 | for (; vma && vma->vm_start < end; prev = vma, vma = next) { | 650 | for (; vma && vma->vm_start < end; prev = vma, vma = next) { |
647 | next = vma->vm_next; | 651 | next = vma->vm_next; |
648 | vmstart = max(start, vma->vm_start); | 652 | vmstart = max(start, vma->vm_start); |
649 | vmend = min(end, vma->vm_end); | 653 | vmend = min(end, vma->vm_end); |
650 | 654 | ||
655 | if (mpol_equal(vma_policy(vma), new_pol)) | ||
656 | continue; | ||
657 | |||
658 | pgoff = vma->vm_pgoff + | ||
659 | ((vmstart - vma->vm_start) >> PAGE_SHIFT); | ||
651 | prev = vma_merge(mm, prev, vmstart, vmend, vma->vm_flags, | 660 | prev = vma_merge(mm, prev, vmstart, vmend, vma->vm_flags, |
652 | vma->anon_vma, vma->vm_file, vma->vm_pgoff, | 661 | vma->anon_vma, vma->vm_file, pgoff, |
653 | new_pol); | 662 | new_pol); |
654 | if (prev) { | 663 | if (prev) { |
655 | vma = prev; | 664 | vma = prev; |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 27be2f0d4cb7..21fdf46ad5aa 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -1118,6 +1118,32 @@ void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t pro | |||
1118 | EXPORT_SYMBOL(vm_map_ram); | 1118 | EXPORT_SYMBOL(vm_map_ram); |
1119 | 1119 | ||
1120 | /** | 1120 | /** |
1121 | * vm_area_add_early - add vmap area early during boot | ||
1122 | * @vm: vm_struct to add | ||
1123 | * | ||
1124 | * This function is used to add fixed kernel vm area to vmlist before | ||
1125 | * vmalloc_init() is called. @vm->addr, @vm->size, and @vm->flags | ||
1126 | * should contain proper values and the other fields should be zero. | ||
1127 | * | ||
1128 | * DO NOT USE THIS FUNCTION UNLESS YOU KNOW WHAT YOU'RE DOING. | ||
1129 | */ | ||
1130 | void __init vm_area_add_early(struct vm_struct *vm) | ||
1131 | { | ||
1132 | struct vm_struct *tmp, **p; | ||
1133 | |||
1134 | BUG_ON(vmap_initialized); | ||
1135 | for (p = &vmlist; (tmp = *p) != NULL; p = &tmp->next) { | ||
1136 | if (tmp->addr >= vm->addr) { | ||
1137 | BUG_ON(tmp->addr < vm->addr + vm->size); | ||
1138 | break; | ||
1139 | } else | ||
1140 | BUG_ON(tmp->addr + tmp->size > vm->addr); | ||
1141 | } | ||
1142 | vm->next = *p; | ||
1143 | *p = vm; | ||
1144 | } | ||
1145 | |||
1146 | /** | ||
1121 | * vm_area_register_early - register vmap area early during boot | 1147 | * vm_area_register_early - register vmap area early during boot |
1122 | * @vm: vm_struct to register | 1148 | * @vm: vm_struct to register |
1123 | * @align: requested alignment | 1149 | * @align: requested alignment |
@@ -1139,8 +1165,7 @@ void __init vm_area_register_early(struct vm_struct *vm, size_t align) | |||
1139 | 1165 | ||
1140 | vm->addr = (void *)addr; | 1166 | vm->addr = (void *)addr; |
1141 | 1167 | ||
1142 | vm->next = vmlist; | 1168 | vm_area_add_early(vm); |
1143 | vmlist = vm; | ||
1144 | } | 1169 | } |
1145 | 1170 | ||
1146 | void __init vmalloc_init(void) | 1171 | void __init vmalloc_init(void) |
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 12571fb2881c..29fa5badde75 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
@@ -616,7 +616,7 @@ struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp) | |||
616 | if ((cp) && (!cp->dest)) { | 616 | if ((cp) && (!cp->dest)) { |
617 | dest = ip_vs_find_dest(ip_vs_conn_net(cp), cp->af, &cp->daddr, | 617 | dest = ip_vs_find_dest(ip_vs_conn_net(cp), cp->af, &cp->daddr, |
618 | cp->dport, &cp->vaddr, cp->vport, | 618 | cp->dport, &cp->vaddr, cp->vport, |
619 | cp->protocol, cp->fwmark); | 619 | cp->protocol, cp->fwmark, cp->flags); |
620 | ip_vs_bind_dest(cp, dest); | 620 | ip_vs_bind_dest(cp, dest); |
621 | return dest; | 621 | return dest; |
622 | } else | 622 | } else |
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 008bf97cc91a..e1a66cf37f9a 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -619,15 +619,21 @@ struct ip_vs_dest *ip_vs_find_dest(struct net *net, int af, | |||
619 | const union nf_inet_addr *daddr, | 619 | const union nf_inet_addr *daddr, |
620 | __be16 dport, | 620 | __be16 dport, |
621 | const union nf_inet_addr *vaddr, | 621 | const union nf_inet_addr *vaddr, |
622 | __be16 vport, __u16 protocol, __u32 fwmark) | 622 | __be16 vport, __u16 protocol, __u32 fwmark, |
623 | __u32 flags) | ||
623 | { | 624 | { |
624 | struct ip_vs_dest *dest; | 625 | struct ip_vs_dest *dest; |
625 | struct ip_vs_service *svc; | 626 | struct ip_vs_service *svc; |
627 | __be16 port = dport; | ||
626 | 628 | ||
627 | svc = ip_vs_service_get(net, af, fwmark, protocol, vaddr, vport); | 629 | svc = ip_vs_service_get(net, af, fwmark, protocol, vaddr, vport); |
628 | if (!svc) | 630 | if (!svc) |
629 | return NULL; | 631 | return NULL; |
630 | dest = ip_vs_lookup_dest(svc, daddr, dport); | 632 | if (fwmark && (flags & IP_VS_CONN_F_FWD_MASK) != IP_VS_CONN_F_MASQ) |
633 | port = 0; | ||
634 | dest = ip_vs_lookup_dest(svc, daddr, port); | ||
635 | if (!dest) | ||
636 | dest = ip_vs_lookup_dest(svc, daddr, port ^ dport); | ||
631 | if (dest) | 637 | if (dest) |
632 | atomic_inc(&dest->refcnt); | 638 | atomic_inc(&dest->refcnt); |
633 | ip_vs_service_put(svc); | 639 | ip_vs_service_put(svc); |
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index 3cdd479f9b5d..2b6678c0ce14 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c | |||
@@ -740,7 +740,7 @@ static void ip_vs_proc_conn(struct net *net, struct ip_vs_conn_param *param, | |||
740 | * but still handled. | 740 | * but still handled. |
741 | */ | 741 | */ |
742 | dest = ip_vs_find_dest(net, type, daddr, dport, param->vaddr, | 742 | dest = ip_vs_find_dest(net, type, daddr, dport, param->vaddr, |
743 | param->vport, protocol, fwmark); | 743 | param->vport, protocol, fwmark, flags); |
744 | 744 | ||
745 | /* Set the approprite ativity flag */ | 745 | /* Set the approprite ativity flag */ |
746 | if (protocol == IPPROTO_TCP) { | 746 | if (protocol == IPPROTO_TCP) { |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index ef21b221f036..257e77256c5c 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -135,7 +135,7 @@ nla_put_failure: | |||
135 | static inline int | 135 | static inline int |
136 | ctnetlink_dump_timeout(struct sk_buff *skb, const struct nf_conn *ct) | 136 | ctnetlink_dump_timeout(struct sk_buff *skb, const struct nf_conn *ct) |
137 | { | 137 | { |
138 | long timeout = (ct->timeout.expires - jiffies) / HZ; | 138 | long timeout = ((long)ct->timeout.expires - (long)jiffies) / HZ; |
139 | 139 | ||
140 | if (timeout < 0) | 140 | if (timeout < 0) |
141 | timeout = 0; | 141 | timeout = 0; |
@@ -1358,12 +1358,15 @@ ctnetlink_create_conntrack(struct net *net, u16 zone, | |||
1358 | nf_ct_protonum(ct)); | 1358 | nf_ct_protonum(ct)); |
1359 | if (helper == NULL) { | 1359 | if (helper == NULL) { |
1360 | rcu_read_unlock(); | 1360 | rcu_read_unlock(); |
1361 | spin_unlock_bh(&nf_conntrack_lock); | ||
1361 | #ifdef CONFIG_MODULES | 1362 | #ifdef CONFIG_MODULES |
1362 | if (request_module("nfct-helper-%s", helpname) < 0) { | 1363 | if (request_module("nfct-helper-%s", helpname) < 0) { |
1364 | spin_lock_bh(&nf_conntrack_lock); | ||
1363 | err = -EOPNOTSUPP; | 1365 | err = -EOPNOTSUPP; |
1364 | goto err1; | 1366 | goto err1; |
1365 | } | 1367 | } |
1366 | 1368 | ||
1369 | spin_lock_bh(&nf_conntrack_lock); | ||
1367 | rcu_read_lock(); | 1370 | rcu_read_lock(); |
1368 | helper = __nf_conntrack_helper_find(helpname, | 1371 | helper = __nf_conntrack_helper_find(helpname, |
1369 | nf_ct_l3num(ct), | 1372 | nf_ct_l3num(ct), |
@@ -1638,7 +1641,7 @@ ctnetlink_exp_dump_expect(struct sk_buff *skb, | |||
1638 | const struct nf_conntrack_expect *exp) | 1641 | const struct nf_conntrack_expect *exp) |
1639 | { | 1642 | { |
1640 | struct nf_conn *master = exp->master; | 1643 | struct nf_conn *master = exp->master; |
1641 | long timeout = (exp->timeout.expires - jiffies) / HZ; | 1644 | long timeout = ((long)exp->timeout.expires - (long)jiffies) / HZ; |
1642 | struct nf_conn_help *help; | 1645 | struct nf_conn_help *help; |
1643 | 1646 | ||
1644 | if (timeout < 0) | 1647 | if (timeout < 0) |
@@ -1869,25 +1872,30 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb, | |||
1869 | 1872 | ||
1870 | err = -ENOMEM; | 1873 | err = -ENOMEM; |
1871 | skb2 = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); | 1874 | skb2 = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); |
1872 | if (skb2 == NULL) | 1875 | if (skb2 == NULL) { |
1876 | nf_ct_expect_put(exp); | ||
1873 | goto out; | 1877 | goto out; |
1878 | } | ||
1874 | 1879 | ||
1875 | rcu_read_lock(); | 1880 | rcu_read_lock(); |
1876 | err = ctnetlink_exp_fill_info(skb2, NETLINK_CB(skb).pid, | 1881 | err = ctnetlink_exp_fill_info(skb2, NETLINK_CB(skb).pid, |
1877 | nlh->nlmsg_seq, IPCTNL_MSG_EXP_NEW, exp); | 1882 | nlh->nlmsg_seq, IPCTNL_MSG_EXP_NEW, exp); |
1878 | rcu_read_unlock(); | 1883 | rcu_read_unlock(); |
1884 | nf_ct_expect_put(exp); | ||
1879 | if (err <= 0) | 1885 | if (err <= 0) |
1880 | goto free; | 1886 | goto free; |
1881 | 1887 | ||
1882 | nf_ct_expect_put(exp); | 1888 | err = netlink_unicast(ctnl, skb2, NETLINK_CB(skb).pid, MSG_DONTWAIT); |
1889 | if (err < 0) | ||
1890 | goto out; | ||
1883 | 1891 | ||
1884 | return netlink_unicast(ctnl, skb2, NETLINK_CB(skb).pid, MSG_DONTWAIT); | 1892 | return 0; |
1885 | 1893 | ||
1886 | free: | 1894 | free: |
1887 | kfree_skb(skb2); | 1895 | kfree_skb(skb2); |
1888 | out: | 1896 | out: |
1889 | nf_ct_expect_put(exp); | 1897 | /* this avoids a loop in nfnetlink. */ |
1890 | return err; | 1898 | return err == -EAGAIN ? -ENOBUFS : err; |
1891 | } | 1899 | } |
1892 | 1900 | ||
1893 | static int | 1901 | static int |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 3891702b81df..d9d4970b9b07 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -2448,8 +2448,12 @@ static int packet_do_bind(struct sock *sk, struct net_device *dev, __be16 protoc | |||
2448 | { | 2448 | { |
2449 | struct packet_sock *po = pkt_sk(sk); | 2449 | struct packet_sock *po = pkt_sk(sk); |
2450 | 2450 | ||
2451 | if (po->fanout) | 2451 | if (po->fanout) { |
2452 | if (dev) | ||
2453 | dev_put(dev); | ||
2454 | |||
2452 | return -EINVAL; | 2455 | return -EINVAL; |
2456 | } | ||
2453 | 2457 | ||
2454 | lock_sock(sk); | 2458 | lock_sock(sk); |
2455 | 2459 | ||
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index eb3b9a86c6ed..a4ab207cdc59 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -488,7 +488,7 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr) | |||
488 | return -EINVAL; | 488 | return -EINVAL; |
489 | 489 | ||
490 | s = sizeof(struct disttable) + n * sizeof(s16); | 490 | s = sizeof(struct disttable) + n * sizeof(s16); |
491 | d = kmalloc(s, GFP_KERNEL); | 491 | d = kmalloc(s, GFP_KERNEL | __GFP_NOWARN); |
492 | if (!d) | 492 | if (!d) |
493 | d = vmalloc(s); | 493 | d = vmalloc(s); |
494 | if (!d) | 494 | if (!d) |
@@ -501,9 +501,10 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr) | |||
501 | root_lock = qdisc_root_sleeping_lock(sch); | 501 | root_lock = qdisc_root_sleeping_lock(sch); |
502 | 502 | ||
503 | spin_lock_bh(root_lock); | 503 | spin_lock_bh(root_lock); |
504 | dist_free(q->delay_dist); | 504 | swap(q->delay_dist, d); |
505 | q->delay_dist = d; | ||
506 | spin_unlock_bh(root_lock); | 505 | spin_unlock_bh(root_lock); |
506 | |||
507 | dist_free(d); | ||
507 | return 0; | 508 | return 0; |
508 | } | 509 | } |
509 | 510 | ||
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index bfdc52370ad0..d3b0a20744f1 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c | |||
@@ -235,6 +235,7 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream, | |||
235 | switch (snd_pcm_format_width(params_format(params))) { | 235 | switch (snd_pcm_format_width(params_format(params))) { |
236 | case 16: | 236 | case 16: |
237 | iface = 0; | 237 | iface = 0; |
238 | break; | ||
238 | case 20: | 239 | case 20: |
239 | iface = 0x10; | 240 | iface = 0x10; |
240 | break; | 241 | break; |
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index 3ad0925d23a9..758e3b36d4cf 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/namei.h> | ||
21 | #include <linux/fs.h> | ||
20 | #include "irq.h" | 22 | #include "irq.h" |
21 | 23 | ||
22 | static struct kvm_assigned_dev_kernel *kvm_find_assigned_dev(struct list_head *head, | 24 | static struct kvm_assigned_dev_kernel *kvm_find_assigned_dev(struct list_head *head, |
@@ -480,12 +482,76 @@ out: | |||
480 | return r; | 482 | return r; |
481 | } | 483 | } |
482 | 484 | ||
485 | /* | ||
486 | * We want to test whether the caller has been granted permissions to | ||
487 | * use this device. To be able to configure and control the device, | ||
488 | * the user needs access to PCI configuration space and BAR resources. | ||
489 | * These are accessed through PCI sysfs. PCI config space is often | ||
490 | * passed to the process calling this ioctl via file descriptor, so we | ||
491 | * can't rely on access to that file. We can check for permissions | ||
492 | * on each of the BAR resource files, which is a pretty clear | ||
493 | * indicator that the user has been granted access to the device. | ||
494 | */ | ||
495 | static int probe_sysfs_permissions(struct pci_dev *dev) | ||
496 | { | ||
497 | #ifdef CONFIG_SYSFS | ||
498 | int i; | ||
499 | bool bar_found = false; | ||
500 | |||
501 | for (i = PCI_STD_RESOURCES; i <= PCI_STD_RESOURCE_END; i++) { | ||
502 | char *kpath, *syspath; | ||
503 | struct path path; | ||
504 | struct inode *inode; | ||
505 | int r; | ||
506 | |||
507 | if (!pci_resource_len(dev, i)) | ||
508 | continue; | ||
509 | |||
510 | kpath = kobject_get_path(&dev->dev.kobj, GFP_KERNEL); | ||
511 | if (!kpath) | ||
512 | return -ENOMEM; | ||
513 | |||
514 | /* Per sysfs-rules, sysfs is always at /sys */ | ||
515 | syspath = kasprintf(GFP_KERNEL, "/sys%s/resource%d", kpath, i); | ||
516 | kfree(kpath); | ||
517 | if (!syspath) | ||
518 | return -ENOMEM; | ||
519 | |||
520 | r = kern_path(syspath, LOOKUP_FOLLOW, &path); | ||
521 | kfree(syspath); | ||
522 | if (r) | ||
523 | return r; | ||
524 | |||
525 | inode = path.dentry->d_inode; | ||
526 | |||
527 | r = inode_permission(inode, MAY_READ | MAY_WRITE | MAY_ACCESS); | ||
528 | path_put(&path); | ||
529 | if (r) | ||
530 | return r; | ||
531 | |||
532 | bar_found = true; | ||
533 | } | ||
534 | |||
535 | /* If no resources, probably something special */ | ||
536 | if (!bar_found) | ||
537 | return -EPERM; | ||
538 | |||
539 | return 0; | ||
540 | #else | ||
541 | return -EINVAL; /* No way to control the device without sysfs */ | ||
542 | #endif | ||
543 | } | ||
544 | |||
483 | static int kvm_vm_ioctl_assign_device(struct kvm *kvm, | 545 | static int kvm_vm_ioctl_assign_device(struct kvm *kvm, |
484 | struct kvm_assigned_pci_dev *assigned_dev) | 546 | struct kvm_assigned_pci_dev *assigned_dev) |
485 | { | 547 | { |
486 | int r = 0, idx; | 548 | int r = 0, idx; |
487 | struct kvm_assigned_dev_kernel *match; | 549 | struct kvm_assigned_dev_kernel *match; |
488 | struct pci_dev *dev; | 550 | struct pci_dev *dev; |
551 | u8 header_type; | ||
552 | |||
553 | if (!(assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU)) | ||
554 | return -EINVAL; | ||
489 | 555 | ||
490 | mutex_lock(&kvm->lock); | 556 | mutex_lock(&kvm->lock); |
491 | idx = srcu_read_lock(&kvm->srcu); | 557 | idx = srcu_read_lock(&kvm->srcu); |
@@ -513,6 +579,18 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm, | |||
513 | r = -EINVAL; | 579 | r = -EINVAL; |
514 | goto out_free; | 580 | goto out_free; |
515 | } | 581 | } |
582 | |||
583 | /* Don't allow bridges to be assigned */ | ||
584 | pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); | ||
585 | if ((header_type & PCI_HEADER_TYPE) != PCI_HEADER_TYPE_NORMAL) { | ||
586 | r = -EPERM; | ||
587 | goto out_put; | ||
588 | } | ||
589 | |||
590 | r = probe_sysfs_permissions(dev); | ||
591 | if (r) | ||
592 | goto out_put; | ||
593 | |||
516 | if (pci_enable_device(dev)) { | 594 | if (pci_enable_device(dev)) { |
517 | printk(KERN_INFO "%s: Could not enable PCI device\n", __func__); | 595 | printk(KERN_INFO "%s: Could not enable PCI device\n", __func__); |
518 | r = -EBUSY; | 596 | r = -EBUSY; |
@@ -544,16 +622,14 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm, | |||
544 | 622 | ||
545 | list_add(&match->list, &kvm->arch.assigned_dev_head); | 623 | list_add(&match->list, &kvm->arch.assigned_dev_head); |
546 | 624 | ||
547 | if (assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU) { | 625 | if (!kvm->arch.iommu_domain) { |
548 | if (!kvm->arch.iommu_domain) { | 626 | r = kvm_iommu_map_guest(kvm); |
549 | r = kvm_iommu_map_guest(kvm); | ||
550 | if (r) | ||
551 | goto out_list_del; | ||
552 | } | ||
553 | r = kvm_assign_device(kvm, match); | ||
554 | if (r) | 627 | if (r) |
555 | goto out_list_del; | 628 | goto out_list_del; |
556 | } | 629 | } |
630 | r = kvm_assign_device(kvm, match); | ||
631 | if (r) | ||
632 | goto out_list_del; | ||
557 | 633 | ||
558 | out: | 634 | out: |
559 | srcu_read_unlock(&kvm->srcu, idx); | 635 | srcu_read_unlock(&kvm->srcu, idx); |
@@ -593,8 +669,7 @@ static int kvm_vm_ioctl_deassign_device(struct kvm *kvm, | |||
593 | goto out; | 669 | goto out; |
594 | } | 670 | } |
595 | 671 | ||
596 | if (match->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU) | 672 | kvm_deassign_device(kvm, match); |
597 | kvm_deassign_device(kvm, match); | ||
598 | 673 | ||
599 | kvm_free_assigned_device(kvm, match); | 674 | kvm_free_assigned_device(kvm, match); |
600 | 675 | ||