diff options
103 files changed, 1590 insertions, 1343 deletions
diff --git a/Documentation/arm/Booting b/Documentation/arm/Booting index 0c1f475fdf36..371814a36719 100644 --- a/Documentation/arm/Booting +++ b/Documentation/arm/Booting | |||
@@ -18,7 +18,8 @@ following: | |||
18 | 2. Initialise one serial port. | 18 | 2. Initialise one serial port. |
19 | 3. Detect the machine type. | 19 | 3. Detect the machine type. |
20 | 4. Setup the kernel tagged list. | 20 | 4. Setup the kernel tagged list. |
21 | 5. Call the kernel image. | 21 | 5. Load initramfs. |
22 | 6. Call the kernel image. | ||
22 | 23 | ||
23 | 24 | ||
24 | 1. Setup and initialise RAM | 25 | 1. Setup and initialise RAM |
@@ -120,12 +121,27 @@ tagged list. | |||
120 | The boot loader must pass at a minimum the size and location of the | 121 | The boot loader must pass at a minimum the size and location of the |
121 | system memory, and the root filesystem location. The dtb must be | 122 | system memory, and the root filesystem location. The dtb must be |
122 | placed in a region of memory where the kernel decompressor will not | 123 | placed in a region of memory where the kernel decompressor will not |
123 | overwrite it. The recommended placement is in the first 16KiB of RAM | 124 | overwrite it, whilst remaining within the region which will be covered |
124 | with the caveat that it may not be located at physical address 0 since | 125 | by the kernel's low-memory mapping. |
125 | the kernel interprets a value of 0 in r2 to mean neither a tagged list | ||
126 | nor a dtb were passed. | ||
127 | 126 | ||
128 | 5. Calling the kernel image | 127 | A safe location is just above the 128MiB boundary from start of RAM. |
128 | |||
129 | 5. Load initramfs. | ||
130 | ------------------ | ||
131 | |||
132 | Existing boot loaders: OPTIONAL | ||
133 | New boot loaders: OPTIONAL | ||
134 | |||
135 | If an initramfs is in use then, as with the dtb, it must be placed in | ||
136 | a region of memory where the kernel decompressor will not overwrite it | ||
137 | while also with the region which will be covered by the kernel's | ||
138 | low-memory mapping. | ||
139 | |||
140 | A safe location is just above the device tree blob which itself will | ||
141 | be loaded just above the 128MiB boundary from the start of RAM as | ||
142 | recommended above. | ||
143 | |||
144 | 6. Calling the kernel image | ||
129 | --------------------------- | 145 | --------------------------- |
130 | 146 | ||
131 | Existing boot loaders: MANDATORY | 147 | Existing boot loaders: MANDATORY |
@@ -136,11 +152,17 @@ is stored in flash, and is linked correctly to be run from flash, | |||
136 | then it is legal for the boot loader to call the zImage in flash | 152 | then it is legal for the boot loader to call the zImage in flash |
137 | directly. | 153 | directly. |
138 | 154 | ||
139 | The zImage may also be placed in system RAM (at any location) and | 155 | The zImage may also be placed in system RAM and called there. The |
140 | called there. Note that the kernel uses 16K of RAM below the image | 156 | kernel should be placed in the first 128MiB of RAM. It is recommended |
141 | to store page tables. The recommended placement is 32KiB into RAM. | 157 | that it is loaded above 32MiB in order to avoid the need to relocate |
158 | prior to decompression, which will make the boot process slightly | ||
159 | faster. | ||
160 | |||
161 | When booting a raw (non-zImage) kernel the constraints are tighter. | ||
162 | In this case the kernel must be loaded at an offset into system equal | ||
163 | to TEXT_OFFSET - PAGE_OFFSET. | ||
142 | 164 | ||
143 | In either case, the following conditions must be met: | 165 | In any case, the following conditions must be met: |
144 | 166 | ||
145 | - Quiesce all DMA capable devices so that memory does not get | 167 | - Quiesce all DMA capable devices so that memory does not get |
146 | corrupted by bogus network packets or disk data. This will save | 168 | corrupted by bogus network packets or disk data. This will save |
diff --git a/Documentation/arm/kernel_mode_neon.txt b/Documentation/arm/kernel_mode_neon.txt new file mode 100644 index 000000000000..525452726d31 --- /dev/null +++ b/Documentation/arm/kernel_mode_neon.txt | |||
@@ -0,0 +1,121 @@ | |||
1 | Kernel mode NEON | ||
2 | ================ | ||
3 | |||
4 | TL;DR summary | ||
5 | ------------- | ||
6 | * Use only NEON instructions, or VFP instructions that don't rely on support | ||
7 | code | ||
8 | * Isolate your NEON code in a separate compilation unit, and compile it with | ||
9 | '-mfpu=neon -mfloat-abi=softfp' | ||
10 | * Put kernel_neon_begin() and kernel_neon_end() calls around the calls into your | ||
11 | NEON code | ||
12 | * Don't sleep in your NEON code, and be aware that it will be executed with | ||
13 | preemption disabled | ||
14 | |||
15 | |||
16 | Introduction | ||
17 | ------------ | ||
18 | It is possible to use NEON instructions (and in some cases, VFP instructions) in | ||
19 | code that runs in kernel mode. However, for performance reasons, the NEON/VFP | ||
20 | register file is not preserved and restored at every context switch or taken | ||
21 | exception like the normal register file is, so some manual intervention is | ||
22 | required. Furthermore, special care is required for code that may sleep [i.e., | ||
23 | may call schedule()], as NEON or VFP instructions will be executed in a | ||
24 | non-preemptible section for reasons outlined below. | ||
25 | |||
26 | |||
27 | Lazy preserve and restore | ||
28 | ------------------------- | ||
29 | The NEON/VFP register file is managed using lazy preserve (on UP systems) and | ||
30 | lazy restore (on both SMP and UP systems). This means that the register file is | ||
31 | kept 'live', and is only preserved and restored when multiple tasks are | ||
32 | contending for the NEON/VFP unit (or, in the SMP case, when a task migrates to | ||
33 | another core). Lazy restore is implemented by disabling the NEON/VFP unit after | ||
34 | every context switch, resulting in a trap when subsequently a NEON/VFP | ||
35 | instruction is issued, allowing the kernel to step in and perform the restore if | ||
36 | necessary. | ||
37 | |||
38 | Any use of the NEON/VFP unit in kernel mode should not interfere with this, so | ||
39 | it is required to do an 'eager' preserve of the NEON/VFP register file, and | ||
40 | enable the NEON/VFP unit explicitly so no exceptions are generated on first | ||
41 | subsequent use. This is handled by the function kernel_neon_begin(), which | ||
42 | should be called before any kernel mode NEON or VFP instructions are issued. | ||
43 | Likewise, the NEON/VFP unit should be disabled again after use to make sure user | ||
44 | mode will hit the lazy restore trap upon next use. This is handled by the | ||
45 | function kernel_neon_end(). | ||
46 | |||
47 | |||
48 | Interruptions in kernel mode | ||
49 | ---------------------------- | ||
50 | For reasons of performance and simplicity, it was decided that there shall be no | ||
51 | preserve/restore mechanism for the kernel mode NEON/VFP register contents. This | ||
52 | implies that interruptions of a kernel mode NEON section can only be allowed if | ||
53 | they are guaranteed not to touch the NEON/VFP registers. For this reason, the | ||
54 | following rules and restrictions apply in the kernel: | ||
55 | * NEON/VFP code is not allowed in interrupt context; | ||
56 | * NEON/VFP code is not allowed to sleep; | ||
57 | * NEON/VFP code is executed with preemption disabled. | ||
58 | |||
59 | If latency is a concern, it is possible to put back to back calls to | ||
60 | kernel_neon_end() and kernel_neon_begin() in places in your code where none of | ||
61 | the NEON registers are live. (Additional calls to kernel_neon_begin() should be | ||
62 | reasonably cheap if no context switch occurred in the meantime) | ||
63 | |||
64 | |||
65 | VFP and support code | ||
66 | -------------------- | ||
67 | Earlier versions of VFP (prior to version 3) rely on software support for things | ||
68 | like IEEE-754 compliant underflow handling etc. When the VFP unit needs such | ||
69 | software assistance, it signals the kernel by raising an undefined instruction | ||
70 | exception. The kernel responds by inspecting the VFP control registers and the | ||
71 | current instruction and arguments, and emulates the instruction in software. | ||
72 | |||
73 | Such software assistance is currently not implemented for VFP instructions | ||
74 | executed in kernel mode. If such a condition is encountered, the kernel will | ||
75 | fail and generate an OOPS. | ||
76 | |||
77 | |||
78 | Separating NEON code from ordinary code | ||
79 | --------------------------------------- | ||
80 | The compiler is not aware of the special significance of kernel_neon_begin() and | ||
81 | kernel_neon_end(), i.e., that it is only allowed to issue NEON/VFP instructions | ||
82 | between calls to these respective functions. Furthermore, GCC may generate NEON | ||
83 | instructions of its own at -O3 level if -mfpu=neon is selected, and even if the | ||
84 | kernel is currently compiled at -O2, future changes may result in NEON/VFP | ||
85 | instructions appearing in unexpected places if no special care is taken. | ||
86 | |||
87 | Therefore, the recommended and only supported way of using NEON/VFP in the | ||
88 | kernel is by adhering to the following rules: | ||
89 | * isolate the NEON code in a separate compilation unit and compile it with | ||
90 | '-mfpu=neon -mfloat-abi=softfp'; | ||
91 | * issue the calls to kernel_neon_begin(), kernel_neon_end() as well as the calls | ||
92 | into the unit containing the NEON code from a compilation unit which is *not* | ||
93 | built with the GCC flag '-mfpu=neon' set. | ||
94 | |||
95 | As the kernel is compiled with '-msoft-float', the above will guarantee that | ||
96 | both NEON and VFP instructions will only ever appear in designated compilation | ||
97 | units at any optimization level. | ||
98 | |||
99 | |||
100 | NEON assembler | ||
101 | -------------- | ||
102 | NEON assembler is supported with no additional caveats as long as the rules | ||
103 | above are followed. | ||
104 | |||
105 | |||
106 | NEON code generated by GCC | ||
107 | -------------------------- | ||
108 | The GCC option -ftree-vectorize (implied by -O3) tries to exploit implicit | ||
109 | parallelism, and generates NEON code from ordinary C source code. This is fully | ||
110 | supported as long as the rules above are followed. | ||
111 | |||
112 | |||
113 | NEON intrinsics | ||
114 | --------------- | ||
115 | NEON intrinsics are also supported. However, as code using NEON intrinsics | ||
116 | relies on the GCC header <arm_neon.h>, (which #includes <stdint.h>), you should | ||
117 | observe the following in addition to the rules above: | ||
118 | * Compile the unit containing the NEON intrinsics with '-ffreestanding' so GCC | ||
119 | uses its builtin version of <stdint.h> (this is a C99 header which the kernel | ||
120 | does not supply); | ||
121 | * Include <arm_neon.h> last, or at least after <linux/types.h> | ||
diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt index 69ddf9fad2dc..c0c7626fd0ff 100644 --- a/Documentation/devicetree/bindings/arm/l2cc.txt +++ b/Documentation/devicetree/bindings/arm/l2cc.txt | |||
@@ -16,9 +16,11 @@ Required properties: | |||
16 | performs the same operation). | 16 | performs the same operation). |
17 | "marvell,"aurora-outer-cache: Marvell Controller designed to be | 17 | "marvell,"aurora-outer-cache: Marvell Controller designed to be |
18 | compatible with the ARM one with outer cache mode. | 18 | compatible with the ARM one with outer cache mode. |
19 | "bcm,bcm11351-a2-pl310-cache": For Broadcom bcm11351 chipset where an | 19 | "brcm,bcm11351-a2-pl310-cache": For Broadcom bcm11351 chipset where an |
20 | offset needs to be added to the address before passing down to the L2 | 20 | offset needs to be added to the address before passing down to the L2 |
21 | cache controller | 21 | cache controller |
22 | "bcm,bcm11351-a2-pl310-cache": DEPRECATED by | ||
23 | "brcm,bcm11351-a2-pl310-cache" | ||
22 | - cache-unified : Specifies the cache is a unified cache. | 24 | - cache-unified : Specifies the cache is a unified cache. |
23 | - cache-level : Should be set to 2 for a level 2 cache. | 25 | - cache-level : Should be set to 2 for a level 2 cache. |
24 | - reg : Physical base address and size of cache controller's memory mapped | 26 | - reg : Physical base address and size of cache controller's memory mapped |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cd5c1c97b043..5d1f5704a284 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -52,6 +52,7 @@ config ARM | |||
52 | select HAVE_REGS_AND_STACK_ACCESS_API | 52 | select HAVE_REGS_AND_STACK_ACCESS_API |
53 | select HAVE_SYSCALL_TRACEPOINTS | 53 | select HAVE_SYSCALL_TRACEPOINTS |
54 | select HAVE_UID16 | 54 | select HAVE_UID16 |
55 | select IRQ_FORCED_THREADING | ||
55 | select KTIME_SCALAR | 56 | select KTIME_SCALAR |
56 | select PERF_USE_VMALLOC | 57 | select PERF_USE_VMALLOC |
57 | select RTC_LIB | 58 | select RTC_LIB |
@@ -1372,6 +1373,15 @@ config ARM_ERRATA_798181 | |||
1372 | which sends an IPI to the CPUs that are running the same ASID | 1373 | which sends an IPI to the CPUs that are running the same ASID |
1373 | as the one being invalidated. | 1374 | as the one being invalidated. |
1374 | 1375 | ||
1376 | config ARM_ERRATA_773022 | ||
1377 | bool "ARM errata: incorrect instructions may be executed from loop buffer" | ||
1378 | depends on CPU_V7 | ||
1379 | help | ||
1380 | This option enables the workaround for the 773022 Cortex-A15 | ||
1381 | (up to r0p4) erratum. In certain rare sequences of code, the | ||
1382 | loop buffer may deliver incorrect instructions. This | ||
1383 | workaround disables the loop buffer to avoid the erratum. | ||
1384 | |||
1375 | endmenu | 1385 | endmenu |
1376 | 1386 | ||
1377 | source "arch/arm/common/Kconfig" | 1387 | source "arch/arm/common/Kconfig" |
@@ -1613,13 +1623,49 @@ config ARCH_NR_GPIO | |||
1613 | 1623 | ||
1614 | source kernel/Kconfig.preempt | 1624 | source kernel/Kconfig.preempt |
1615 | 1625 | ||
1616 | config HZ | 1626 | config HZ_FIXED |
1617 | int | 1627 | int |
1618 | default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \ | 1628 | default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \ |
1619 | ARCH_S5PV210 || ARCH_EXYNOS4 | 1629 | ARCH_S5PV210 || ARCH_EXYNOS4 |
1620 | default AT91_TIMER_HZ if ARCH_AT91 | 1630 | default AT91_TIMER_HZ if ARCH_AT91 |
1621 | default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE | 1631 | default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE |
1622 | default 100 | 1632 | |
1633 | choice | ||
1634 | depends on !HZ_FIXED | ||
1635 | prompt "Timer frequency" | ||
1636 | |||
1637 | config HZ_100 | ||
1638 | bool "100 Hz" | ||
1639 | |||
1640 | config HZ_200 | ||
1641 | bool "200 Hz" | ||
1642 | |||
1643 | config HZ_250 | ||
1644 | bool "250 Hz" | ||
1645 | |||
1646 | config HZ_300 | ||
1647 | bool "300 Hz" | ||
1648 | |||
1649 | config HZ_500 | ||
1650 | bool "500 Hz" | ||
1651 | |||
1652 | config HZ_1000 | ||
1653 | bool "1000 Hz" | ||
1654 | |||
1655 | endchoice | ||
1656 | |||
1657 | config HZ | ||
1658 | int | ||
1659 | default HZ_FIXED if HZ_FIXED | ||
1660 | default 100 if HZ_100 | ||
1661 | default 200 if HZ_200 | ||
1662 | default 250 if HZ_250 | ||
1663 | default 300 if HZ_300 | ||
1664 | default 500 if HZ_500 | ||
1665 | default 1000 | ||
1666 | |||
1667 | config SCHED_HRTICK | ||
1668 | def_bool HIGH_RES_TIMERS | ||
1623 | 1669 | ||
1624 | config SCHED_HRTICK | 1670 | config SCHED_HRTICK |
1625 | def_bool HIGH_RES_TIMERS | 1671 | def_bool HIGH_RES_TIMERS |
@@ -1756,6 +1802,9 @@ config HAVE_ARCH_TRANSPARENT_HUGEPAGE | |||
1756 | def_bool y | 1802 | def_bool y |
1757 | depends on ARM_LPAE | 1803 | depends on ARM_LPAE |
1758 | 1804 | ||
1805 | config ARCH_WANT_GENERAL_HUGETLB | ||
1806 | def_bool y | ||
1807 | |||
1759 | source "mm/Kconfig" | 1808 | source "mm/Kconfig" |
1760 | 1809 | ||
1761 | config FORCE_MAX_ZONEORDER | 1810 | config FORCE_MAX_ZONEORDER |
@@ -2174,6 +2223,13 @@ config NEON | |||
2174 | Say Y to include support code for NEON, the ARMv7 Advanced SIMD | 2223 | Say Y to include support code for NEON, the ARMv7 Advanced SIMD |
2175 | Extension. | 2224 | Extension. |
2176 | 2225 | ||
2226 | config KERNEL_MODE_NEON | ||
2227 | bool "Support for NEON in kernel mode" | ||
2228 | default n | ||
2229 | depends on NEON | ||
2230 | help | ||
2231 | Say Y to include support for NEON in kernel mode. | ||
2232 | |||
2177 | endmenu | 2233 | endmenu |
2178 | 2234 | ||
2179 | menu "Userspace binary formats" | 2235 | menu "Userspace binary formats" |
@@ -2198,7 +2254,7 @@ source "kernel/power/Kconfig" | |||
2198 | 2254 | ||
2199 | config ARCH_SUSPEND_POSSIBLE | 2255 | config ARCH_SUSPEND_POSSIBLE |
2200 | depends on !ARCH_S5PC100 | 2256 | depends on !ARCH_S5PC100 |
2201 | depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ | 2257 | depends on CPU_ARM920T || CPU_ARM926T || CPU_FEROCEON || CPU_SA1100 || \ |
2202 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK | 2258 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK |
2203 | def_bool y | 2259 | def_bool y |
2204 | 2260 | ||
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 583f4a00ec32..4137529850cb 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -92,6 +92,7 @@ choice | |||
92 | config DEBUG_BCM2835 | 92 | config DEBUG_BCM2835 |
93 | bool "Kernel low-level debugging on BCM2835 PL011 UART" | 93 | bool "Kernel low-level debugging on BCM2835 PL011 UART" |
94 | depends on ARCH_BCM2835 | 94 | depends on ARCH_BCM2835 |
95 | select DEBUG_UART_PL01X | ||
95 | 96 | ||
96 | config DEBUG_CLPS711X_UART1 | 97 | config DEBUG_CLPS711X_UART1 |
97 | bool "Kernel low-level debugging messages via UART1" | 98 | bool "Kernel low-level debugging messages via UART1" |
@@ -110,6 +111,7 @@ choice | |||
110 | config DEBUG_CNS3XXX | 111 | config DEBUG_CNS3XXX |
111 | bool "Kernel Kernel low-level debugging on Cavium Networks CNS3xxx" | 112 | bool "Kernel Kernel low-level debugging on Cavium Networks CNS3xxx" |
112 | depends on ARCH_CNS3XXX | 113 | depends on ARCH_CNS3XXX |
114 | select DEBUG_UART_PL01X | ||
113 | help | 115 | help |
114 | Say Y here if you want the debug print routines to direct | 116 | Say Y here if you want the debug print routines to direct |
115 | their output to the CNS3xxx UART0. | 117 | their output to the CNS3xxx UART0. |
@@ -117,6 +119,7 @@ choice | |||
117 | config DEBUG_DAVINCI_DA8XX_UART1 | 119 | config DEBUG_DAVINCI_DA8XX_UART1 |
118 | bool "Kernel low-level debugging on DaVinci DA8XX using UART1" | 120 | bool "Kernel low-level debugging on DaVinci DA8XX using UART1" |
119 | depends on ARCH_DAVINCI_DA8XX | 121 | depends on ARCH_DAVINCI_DA8XX |
122 | select DEBUG_UART_8250 | ||
120 | help | 123 | help |
121 | Say Y here if you want the debug print routines to direct | 124 | Say Y here if you want the debug print routines to direct |
122 | their output to UART1 serial port on DaVinci DA8XX devices. | 125 | their output to UART1 serial port on DaVinci DA8XX devices. |
@@ -124,6 +127,7 @@ choice | |||
124 | config DEBUG_DAVINCI_DA8XX_UART2 | 127 | config DEBUG_DAVINCI_DA8XX_UART2 |
125 | bool "Kernel low-level debugging on DaVinci DA8XX using UART2" | 128 | bool "Kernel low-level debugging on DaVinci DA8XX using UART2" |
126 | depends on ARCH_DAVINCI_DA8XX | 129 | depends on ARCH_DAVINCI_DA8XX |
130 | select DEBUG_UART_8250 | ||
127 | help | 131 | help |
128 | Say Y here if you want the debug print routines to direct | 132 | Say Y here if you want the debug print routines to direct |
129 | their output to UART2 serial port on DaVinci DA8XX devices. | 133 | their output to UART2 serial port on DaVinci DA8XX devices. |
@@ -131,6 +135,7 @@ choice | |||
131 | config DEBUG_DAVINCI_DMx_UART0 | 135 | config DEBUG_DAVINCI_DMx_UART0 |
132 | bool "Kernel low-level debugging on DaVinci DMx using UART0" | 136 | bool "Kernel low-level debugging on DaVinci DMx using UART0" |
133 | depends on ARCH_DAVINCI_DMx | 137 | depends on ARCH_DAVINCI_DMx |
138 | select DEBUG_UART_8250 | ||
134 | help | 139 | help |
135 | Say Y here if you want the debug print routines to direct | 140 | Say Y here if you want the debug print routines to direct |
136 | their output to UART0 serial port on DaVinci DMx devices. | 141 | their output to UART0 serial port on DaVinci DMx devices. |
@@ -138,6 +143,7 @@ choice | |||
138 | config DEBUG_DAVINCI_TNETV107X_UART1 | 143 | config DEBUG_DAVINCI_TNETV107X_UART1 |
139 | bool "Kernel low-level debugging on DaVinci TNETV107x using UART1" | 144 | bool "Kernel low-level debugging on DaVinci TNETV107x using UART1" |
140 | depends on ARCH_DAVINCI_TNETV107X | 145 | depends on ARCH_DAVINCI_TNETV107X |
146 | select DEBUG_UART_8250 | ||
141 | help | 147 | help |
142 | Say Y here if you want the debug print routines to direct | 148 | Say Y here if you want the debug print routines to direct |
143 | their output to UART1 serial port on DaVinci TNETV107X | 149 | their output to UART1 serial port on DaVinci TNETV107X |
@@ -174,9 +180,26 @@ choice | |||
174 | Say Y here if you want the debug print routines to direct | 180 | Say Y here if you want the debug print routines to direct |
175 | their output to the 8250 at PCI COM1. | 181 | their output to the 8250 at PCI COM1. |
176 | 182 | ||
183 | config DEBUG_HI3620_UART | ||
184 | bool "Hisilicon HI3620 Debug UART" | ||
185 | depends on ARCH_HI3xxx | ||
186 | select DEBUG_UART_PL01X | ||
187 | help | ||
188 | Say Y here if you want kernel low-level debugging support | ||
189 | on HI3620 UART. | ||
190 | |||
191 | config DEBUG_HI3716_UART | ||
192 | bool "Hisilicon Hi3716 Debug UART" | ||
193 | depends on ARCH_HI3xxx | ||
194 | select DEBUG_UART_PL01X | ||
195 | help | ||
196 | Say Y here if you want kernel low-level debugging support | ||
197 | on HI3716 UART. | ||
198 | |||
177 | config DEBUG_HIGHBANK_UART | 199 | config DEBUG_HIGHBANK_UART |
178 | bool "Kernel low-level debugging messages via Highbank UART" | 200 | bool "Kernel low-level debugging messages via Highbank UART" |
179 | depends on ARCH_HIGHBANK | 201 | depends on ARCH_HIGHBANK |
202 | select DEBUG_UART_PL01X | ||
180 | help | 203 | help |
181 | Say Y here if you want the debug print routines to direct | 204 | Say Y here if you want the debug print routines to direct |
182 | their output to the UART on Highbank based devices. | 205 | their output to the UART on Highbank based devices. |
@@ -191,6 +214,7 @@ choice | |||
191 | config DEBUG_IMX23_UART | 214 | config DEBUG_IMX23_UART |
192 | bool "i.MX23 Debug UART" | 215 | bool "i.MX23 Debug UART" |
193 | depends on SOC_IMX23 | 216 | depends on SOC_IMX23 |
217 | select DEBUG_UART_PL01X | ||
194 | help | 218 | help |
195 | Say Y here if you want kernel low-level debugging support | 219 | Say Y here if you want kernel low-level debugging support |
196 | on i.MX23. | 220 | on i.MX23. |
@@ -212,6 +236,7 @@ choice | |||
212 | config DEBUG_IMX28_UART | 236 | config DEBUG_IMX28_UART |
213 | bool "i.MX28 Debug UART" | 237 | bool "i.MX28 Debug UART" |
214 | depends on SOC_IMX28 | 238 | depends on SOC_IMX28 |
239 | select DEBUG_UART_PL01X | ||
215 | help | 240 | help |
216 | Say Y here if you want kernel low-level debugging support | 241 | Say Y here if you want kernel low-level debugging support |
217 | on i.MX28. | 242 | on i.MX28. |
@@ -261,6 +286,7 @@ choice | |||
261 | config DEBUG_KEYSTONE_UART0 | 286 | config DEBUG_KEYSTONE_UART0 |
262 | bool "Kernel low-level debugging on KEYSTONE2 using UART0" | 287 | bool "Kernel low-level debugging on KEYSTONE2 using UART0" |
263 | depends on ARCH_KEYSTONE | 288 | depends on ARCH_KEYSTONE |
289 | select DEBUG_UART_8250 | ||
264 | help | 290 | help |
265 | Say Y here if you want the debug print routines to direct | 291 | Say Y here if you want the debug print routines to direct |
266 | their output to UART0 serial port on KEYSTONE2 devices. | 292 | their output to UART0 serial port on KEYSTONE2 devices. |
@@ -268,6 +294,7 @@ choice | |||
268 | config DEBUG_KEYSTONE_UART1 | 294 | config DEBUG_KEYSTONE_UART1 |
269 | bool "Kernel low-level debugging on KEYSTONE2 using UART1" | 295 | bool "Kernel low-level debugging on KEYSTONE2 using UART1" |
270 | depends on ARCH_KEYSTONE | 296 | depends on ARCH_KEYSTONE |
297 | select DEBUG_UART_8250 | ||
271 | help | 298 | help |
272 | Say Y here if you want the debug print routines to direct | 299 | Say Y here if you want the debug print routines to direct |
273 | their output to UART1 serial port on KEYSTONE2 devices. | 300 | their output to UART1 serial port on KEYSTONE2 devices. |
@@ -275,6 +302,7 @@ choice | |||
275 | config DEBUG_MMP_UART2 | 302 | config DEBUG_MMP_UART2 |
276 | bool "Kernel low-level debugging message via MMP UART2" | 303 | bool "Kernel low-level debugging message via MMP UART2" |
277 | depends on ARCH_MMP | 304 | depends on ARCH_MMP |
305 | select DEBUG_UART_8250 | ||
278 | help | 306 | help |
279 | Say Y here if you want kernel low-level debugging support | 307 | Say Y here if you want kernel low-level debugging support |
280 | on MMP UART2. | 308 | on MMP UART2. |
@@ -282,6 +310,7 @@ choice | |||
282 | config DEBUG_MMP_UART3 | 310 | config DEBUG_MMP_UART3 |
283 | bool "Kernel low-level debugging message via MMP UART3" | 311 | bool "Kernel low-level debugging message via MMP UART3" |
284 | depends on ARCH_MMP | 312 | depends on ARCH_MMP |
313 | select DEBUG_UART_8250 | ||
285 | help | 314 | help |
286 | Say Y here if you want kernel low-level debugging support | 315 | Say Y here if you want kernel low-level debugging support |
287 | on MMP UART3. | 316 | on MMP UART3. |
@@ -326,6 +355,7 @@ choice | |||
326 | config DEBUG_MVEBU_UART | 355 | config DEBUG_MVEBU_UART |
327 | bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)" | 356 | bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)" |
328 | depends on ARCH_MVEBU | 357 | depends on ARCH_MVEBU |
358 | select DEBUG_UART_8250 | ||
329 | help | 359 | help |
330 | Say Y here if you want kernel low-level debugging support | 360 | Say Y here if you want kernel low-level debugging support |
331 | on MVEBU based platforms. | 361 | on MVEBU based platforms. |
@@ -344,6 +374,7 @@ choice | |||
344 | config DEBUG_MVEBU_UART_ALTERNATE | 374 | config DEBUG_MVEBU_UART_ALTERNATE |
345 | bool "Kernel low-level debugging messages via MVEBU UART (new bootloaders)" | 375 | bool "Kernel low-level debugging messages via MVEBU UART (new bootloaders)" |
346 | depends on ARCH_MVEBU | 376 | depends on ARCH_MVEBU |
377 | select DEBUG_UART_8250 | ||
347 | help | 378 | help |
348 | Say Y here if you want kernel low-level debugging support | 379 | Say Y here if you want kernel low-level debugging support |
349 | on MVEBU based platforms. | 380 | on MVEBU based platforms. |
@@ -358,6 +389,7 @@ choice | |||
358 | config DEBUG_NOMADIK_UART | 389 | config DEBUG_NOMADIK_UART |
359 | bool "Kernel low-level debugging messages via NOMADIK UART" | 390 | bool "Kernel low-level debugging messages via NOMADIK UART" |
360 | depends on ARCH_NOMADIK | 391 | depends on ARCH_NOMADIK |
392 | select DEBUG_UART_PL01X | ||
361 | help | 393 | help |
362 | Say Y here if you want kernel low-level debugging support | 394 | Say Y here if you want kernel low-level debugging support |
363 | on NOMADIK based platforms. | 395 | on NOMADIK based platforms. |
@@ -365,6 +397,7 @@ choice | |||
365 | config DEBUG_NSPIRE_CLASSIC_UART | 397 | config DEBUG_NSPIRE_CLASSIC_UART |
366 | bool "Kernel low-level debugging via TI-NSPIRE 8250 UART" | 398 | bool "Kernel low-level debugging via TI-NSPIRE 8250 UART" |
367 | depends on ARCH_NSPIRE | 399 | depends on ARCH_NSPIRE |
400 | select DEBUG_UART_8250 | ||
368 | help | 401 | help |
369 | Say Y here if you want kernel low-level debugging support | 402 | Say Y here if you want kernel low-level debugging support |
370 | on TI-NSPIRE classic models. | 403 | on TI-NSPIRE classic models. |
@@ -372,20 +405,82 @@ choice | |||
372 | config DEBUG_NSPIRE_CX_UART | 405 | config DEBUG_NSPIRE_CX_UART |
373 | bool "Kernel low-level debugging via TI-NSPIRE PL011 UART" | 406 | bool "Kernel low-level debugging via TI-NSPIRE PL011 UART" |
374 | depends on ARCH_NSPIRE | 407 | depends on ARCH_NSPIRE |
408 | select DEBUG_UART_PL01X | ||
375 | help | 409 | help |
376 | Say Y here if you want kernel low-level debugging support | 410 | Say Y here if you want kernel low-level debugging support |
377 | on TI-NSPIRE CX models. | 411 | on TI-NSPIRE CX models. |
378 | 412 | ||
379 | config DEBUG_OMAP2PLUS_UART | 413 | config DEBUG_OMAP2UART1 |
380 | bool "Kernel low-level debugging messages via OMAP2PLUS UART" | 414 | bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)" |
381 | depends on ARCH_OMAP2PLUS | 415 | depends on ARCH_OMAP2PLUS |
416 | select DEBUG_OMAP2PLUS_UART | ||
382 | help | 417 | help |
383 | Say Y here if you want kernel low-level debugging support | 418 | This covers at least h4, 2430sdp, 3430sdp, 3630sdp, |
384 | on OMAP2PLUS based platforms. | 419 | omap3 torpedo and 3530 lv som. |
420 | |||
421 | config DEBUG_OMAP2UART2 | ||
422 | bool "Kernel low-level debugging messages via OMAP2/3/4 UART2" | ||
423 | depends on ARCH_OMAP2PLUS | ||
424 | select DEBUG_OMAP2PLUS_UART | ||
425 | |||
426 | config DEBUG_OMAP2UART3 | ||
427 | bool "Kernel low-level debugging messages via OMAP2 UART3 (n8x0)" | ||
428 | depends on ARCH_OMAP2PLUS | ||
429 | select DEBUG_OMAP2PLUS_UART | ||
430 | |||
431 | config DEBUG_OMAP3UART3 | ||
432 | bool "Kernel low-level debugging messages via OMAP3 UART3 (most omap3 boards)" | ||
433 | depends on ARCH_OMAP2PLUS | ||
434 | select DEBUG_OMAP2PLUS_UART | ||
435 | help | ||
436 | This covers at least cm_t3x, beagle, crane, devkit8000, | ||
437 | igep00x0, ldp, n900, n9(50), pandora, overo, touchbook, | ||
438 | and 3517evm. | ||
439 | |||
440 | config DEBUG_OMAP4UART3 | ||
441 | bool "Kernel low-level debugging messages via OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)" | ||
442 | depends on ARCH_OMAP2PLUS | ||
443 | select DEBUG_OMAP2PLUS_UART | ||
444 | |||
445 | config DEBUG_OMAP3UART4 | ||
446 | bool "Kernel low-level debugging messages via OMAP36XX UART4" | ||
447 | depends on ARCH_OMAP2PLUS | ||
448 | select DEBUG_OMAP2PLUS_UART | ||
449 | |||
450 | config DEBUG_OMAP4UART4 | ||
451 | bool "Kernel low-level debugging messages via OMAP4/5 UART4" | ||
452 | depends on ARCH_OMAP2PLUS | ||
453 | select DEBUG_OMAP2PLUS_UART | ||
454 | |||
455 | config DEBUG_TI81XXUART1 | ||
456 | bool "Kernel low-level debugging messages via TI81XX UART1 (ti8148evm)" | ||
457 | depends on ARCH_OMAP2PLUS | ||
458 | select DEBUG_OMAP2PLUS_UART | ||
459 | |||
460 | config DEBUG_TI81XXUART2 | ||
461 | bool "Kernel low-level debugging messages via TI81XX UART2" | ||
462 | depends on ARCH_OMAP2PLUS | ||
463 | select DEBUG_OMAP2PLUS_UART | ||
464 | |||
465 | config DEBUG_TI81XXUART3 | ||
466 | bool "Kernel low-level debugging messages via TI81XX UART3 (ti8168evm)" | ||
467 | depends on ARCH_OMAP2PLUS | ||
468 | select DEBUG_OMAP2PLUS_UART | ||
469 | |||
470 | config DEBUG_AM33XXUART1 | ||
471 | bool "Kernel low-level debugging messages via AM33XX UART1" | ||
472 | depends on ARCH_OMAP2PLUS | ||
473 | select DEBUG_OMAP2PLUS_UART | ||
474 | |||
475 | config DEBUG_ZOOM_UART | ||
476 | bool "Kernel low-level debugging messages via Zoom2/3 UART" | ||
477 | depends on ARCH_OMAP2PLUS | ||
478 | select DEBUG_OMAP2PLUS_UART | ||
385 | 479 | ||
386 | config DEBUG_PICOXCELL_UART | 480 | config DEBUG_PICOXCELL_UART |
387 | depends on ARCH_PICOXCELL | 481 | depends on ARCH_PICOXCELL |
388 | bool "Use PicoXcell UART for low-level debug" | 482 | bool "Use PicoXcell UART for low-level debug" |
483 | select DEBUG_UART_8250 | ||
389 | help | 484 | help |
390 | Say Y here if you want kernel low-level debugging support | 485 | Say Y here if you want kernel low-level debugging support |
391 | on PicoXcell based platforms. | 486 | on PicoXcell based platforms. |
@@ -393,6 +488,7 @@ choice | |||
393 | config DEBUG_PXA_UART1 | 488 | config DEBUG_PXA_UART1 |
394 | depends on ARCH_PXA | 489 | depends on ARCH_PXA |
395 | bool "Use PXA UART1 for low-level debug" | 490 | bool "Use PXA UART1 for low-level debug" |
491 | select DEBUG_UART_8250 | ||
396 | help | 492 | help |
397 | Say Y here if you want kernel low-level debugging support | 493 | Say Y here if you want kernel low-level debugging support |
398 | on PXA UART1. | 494 | on PXA UART1. |
@@ -400,6 +496,7 @@ choice | |||
400 | config DEBUG_REALVIEW_STD_PORT | 496 | config DEBUG_REALVIEW_STD_PORT |
401 | bool "RealView Default UART" | 497 | bool "RealView Default UART" |
402 | depends on ARCH_REALVIEW | 498 | depends on ARCH_REALVIEW |
499 | select DEBUG_UART_PL01X | ||
403 | help | 500 | help |
404 | Say Y here if you want the debug print routines to direct | 501 | Say Y here if you want the debug print routines to direct |
405 | their output to the serial port on RealView EB, PB11MP, PBA8 | 502 | their output to the serial port on RealView EB, PB11MP, PBA8 |
@@ -408,14 +505,64 @@ choice | |||
408 | config DEBUG_REALVIEW_PB1176_PORT | 505 | config DEBUG_REALVIEW_PB1176_PORT |
409 | bool "RealView PB1176 UART" | 506 | bool "RealView PB1176 UART" |
410 | depends on MACH_REALVIEW_PB1176 | 507 | depends on MACH_REALVIEW_PB1176 |
508 | select DEBUG_UART_PL01X | ||
411 | help | 509 | help |
412 | Say Y here if you want the debug print routines to direct | 510 | Say Y here if you want the debug print routines to direct |
413 | their output to the standard serial port on the RealView | 511 | their output to the standard serial port on the RealView |
414 | PB1176 platform. | 512 | PB1176 platform. |
415 | 513 | ||
416 | config DEBUG_ROCKCHIP_UART | 514 | config DEBUG_RK29_UART0 |
417 | bool "Kernel low-level debugging messages via Rockchip UART" | 515 | bool "Kernel low-level debugging messages via Rockchip RK29 UART0" |
516 | depends on ARCH_ROCKCHIP | ||
517 | select DEBUG_UART_8250 | ||
518 | help | ||
519 | Say Y here if you want kernel low-level debugging support | ||
520 | on Rockchip based platforms. | ||
521 | |||
522 | config DEBUG_RK29_UART1 | ||
523 | bool "Kernel low-level debugging messages via Rockchip RK29 UART1" | ||
524 | depends on ARCH_ROCKCHIP | ||
525 | select DEBUG_UART_8250 | ||
526 | help | ||
527 | Say Y here if you want kernel low-level debugging support | ||
528 | on Rockchip based platforms. | ||
529 | |||
530 | config DEBUG_RK29_UART2 | ||
531 | bool "Kernel low-level debugging messages via Rockchip RK29 UART2" | ||
532 | depends on ARCH_ROCKCHIP | ||
533 | select DEBUG_UART_8250 | ||
534 | help | ||
535 | Say Y here if you want kernel low-level debugging support | ||
536 | on Rockchip based platforms. | ||
537 | |||
538 | config DEBUG_RK3X_UART0 | ||
539 | bool "Kernel low-level debugging messages via Rockchip RK3X UART0" | ||
540 | depends on ARCH_ROCKCHIP | ||
541 | select DEBUG_UART_8250 | ||
542 | help | ||
543 | Say Y here if you want kernel low-level debugging support | ||
544 | on Rockchip based platforms. | ||
545 | |||
546 | config DEBUG_RK3X_UART1 | ||
547 | bool "Kernel low-level debugging messages via Rockchip RK3X UART1" | ||
548 | depends on ARCH_ROCKCHIP | ||
549 | select DEBUG_UART_8250 | ||
550 | help | ||
551 | Say Y here if you want kernel low-level debugging support | ||
552 | on Rockchip based platforms. | ||
553 | |||
554 | config DEBUG_RK3X_UART2 | ||
555 | bool "Kernel low-level debugging messages via Rockchip RK3X UART2" | ||
556 | depends on ARCH_ROCKCHIP | ||
557 | select DEBUG_UART_8250 | ||
558 | help | ||
559 | Say Y here if you want kernel low-level debugging support | ||
560 | on Rockchip based platforms. | ||
561 | |||
562 | config DEBUG_RK3X_UART3 | ||
563 | bool "Kernel low-level debugging messages via Rockchip RK3X UART3" | ||
418 | depends on ARCH_ROCKCHIP | 564 | depends on ARCH_ROCKCHIP |
565 | select DEBUG_UART_8250 | ||
419 | help | 566 | help |
420 | Say Y here if you want kernel low-level debugging support | 567 | Say Y here if you want kernel low-level debugging support |
421 | on Rockchip based platforms. | 568 | on Rockchip based platforms. |
@@ -471,6 +618,7 @@ choice | |||
471 | config DEBUG_SOCFPGA_UART | 618 | config DEBUG_SOCFPGA_UART |
472 | depends on ARCH_SOCFPGA | 619 | depends on ARCH_SOCFPGA |
473 | bool "Use SOCFPGA UART for low-level debug" | 620 | bool "Use SOCFPGA UART for low-level debug" |
621 | select DEBUG_UART_8250 | ||
474 | help | 622 | help |
475 | Say Y here if you want kernel low-level debugging support | 623 | Say Y here if you want kernel low-level debugging support |
476 | on SOCFPGA based platforms. | 624 | on SOCFPGA based platforms. |
@@ -478,6 +626,7 @@ choice | |||
478 | config DEBUG_SUNXI_UART0 | 626 | config DEBUG_SUNXI_UART0 |
479 | bool "Kernel low-level debugging messages via sunXi UART0" | 627 | bool "Kernel low-level debugging messages via sunXi UART0" |
480 | depends on ARCH_SUNXI | 628 | depends on ARCH_SUNXI |
629 | select DEBUG_UART_8250 | ||
481 | help | 630 | help |
482 | Say Y here if you want kernel low-level debugging support | 631 | Say Y here if you want kernel low-level debugging support |
483 | on Allwinner A1X based platforms on the UART0. | 632 | on Allwinner A1X based platforms on the UART0. |
@@ -485,13 +634,59 @@ choice | |||
485 | config DEBUG_SUNXI_UART1 | 634 | config DEBUG_SUNXI_UART1 |
486 | bool "Kernel low-level debugging messages via sunXi UART1" | 635 | bool "Kernel low-level debugging messages via sunXi UART1" |
487 | depends on ARCH_SUNXI | 636 | depends on ARCH_SUNXI |
637 | select DEBUG_UART_8250 | ||
488 | help | 638 | help |
489 | Say Y here if you want kernel low-level debugging support | 639 | Say Y here if you want kernel low-level debugging support |
490 | on Allwinner A1X based platforms on the UART1. | 640 | on Allwinner A1X based platforms on the UART1. |
491 | 641 | ||
492 | config DEBUG_TEGRA_UART | 642 | config TEGRA_DEBUG_UART_AUTO_ODMDATA |
643 | bool "Kernel low-level debugging messages via Tegra UART via ODMDATA" | ||
644 | depends on ARCH_TEGRA | ||
645 | select DEBUG_TEGRA_UART | ||
646 | help | ||
647 | Automatically determines which UART to use for low-level | ||
648 | debug based on the ODMDATA value. This value is part of | ||
649 | the BCT, and is written to the boot memory device using | ||
650 | nvflash, or other flashing tool. When bits 19:18 are 3, | ||
651 | then bits 17:15 indicate which UART to use; 0/1/2/3/4 | ||
652 | are UART A/B/C/D/E. | ||
653 | |||
654 | config TEGRA_DEBUG_UARTA | ||
655 | bool "Kernel low-level debugging messages via Tegra UART A" | ||
656 | depends on ARCH_TEGRA | ||
657 | select DEBUG_TEGRA_UART | ||
658 | help | ||
659 | Say Y here if you want kernel low-level debugging support | ||
660 | on Tegra based platforms. | ||
661 | |||
662 | config TEGRA_DEBUG_UARTB | ||
663 | bool "Kernel low-level debugging messages via Tegra UART B" | ||
664 | depends on ARCH_TEGRA | ||
665 | select DEBUG_TEGRA_UART | ||
666 | help | ||
667 | Say Y here if you want kernel low-level debugging support | ||
668 | on Tegra based platforms. | ||
669 | |||
670 | config TEGRA_DEBUG_UARTC | ||
671 | bool "Kernel low-level debugging messages via Tegra UART C" | ||
672 | depends on ARCH_TEGRA | ||
673 | select DEBUG_TEGRA_UART | ||
674 | help | ||
675 | Say Y here if you want kernel low-level debugging support | ||
676 | on Tegra based platforms. | ||
677 | |||
678 | config TEGRA_DEBUG_UARTD | ||
679 | bool "Kernel low-level debugging messages via Tegra UART D" | ||
680 | depends on ARCH_TEGRA | ||
681 | select DEBUG_TEGRA_UART | ||
682 | help | ||
683 | Say Y here if you want kernel low-level debugging support | ||
684 | on Tegra based platforms. | ||
685 | |||
686 | config TEGRA_DEBUG_UARTE | ||
687 | bool "Kernel low-level debugging messages via Tegra UART E" | ||
493 | depends on ARCH_TEGRA | 688 | depends on ARCH_TEGRA |
494 | bool "Use Tegra UART for low-level debug" | 689 | select DEBUG_TEGRA_UART |
495 | help | 690 | help |
496 | Say Y here if you want kernel low-level debugging support | 691 | Say Y here if you want kernel low-level debugging support |
497 | on Tegra based platforms. | 692 | on Tegra based platforms. |
@@ -510,19 +705,32 @@ choice | |||
510 | Say Y here if you want the debug print routines to direct | 705 | Say Y here if you want the debug print routines to direct |
511 | their output to the uart1 port on SiRFmarco devices. | 706 | their output to the uart1 port on SiRFmarco devices. |
512 | 707 | ||
513 | config DEBUG_STI_UART | 708 | config STIH41X_DEBUG_ASC2 |
709 | bool "Use StiH415/416 ASC2 UART for low-level debug" | ||
710 | depends on ARCH_STI | ||
711 | select DEBUG_STI_UART | ||
712 | help | ||
713 | Say Y here if you want kernel low-level debugging support | ||
714 | on STiH415/416 based platforms like b2000, which has | ||
715 | default UART wired up to ASC2. | ||
716 | |||
717 | If unsure, say N. | ||
718 | |||
719 | config STIH41X_DEBUG_SBC_ASC1 | ||
720 | bool "Use StiH415/416 SBC ASC1 UART for low-level debug" | ||
514 | depends on ARCH_STI | 721 | depends on ARCH_STI |
515 | bool "Use StiH415/416 ASC for low-level debug" | 722 | select DEBUG_STI_UART |
516 | help | 723 | help |
517 | Say Y here if you want kernel low-level debugging support | 724 | Say Y here if you want kernel low-level debugging support |
518 | on StiH415/416 based platforms like B2000, B2020. | 725 | on STiH415/416 based platforms like b2020. which has |
519 | It support UART2 and SBC_UART1. | 726 | default UART wired up to SBC ASC1. |
520 | 727 | ||
521 | If unsure, say N. | 728 | If unsure, say N. |
522 | 729 | ||
523 | config DEBUG_U300_UART | 730 | config DEBUG_U300_UART |
524 | bool "Kernel low-level debugging messages via U300 UART0" | 731 | bool "Kernel low-level debugging messages via U300 UART0" |
525 | depends on ARCH_U300 | 732 | depends on ARCH_U300 |
733 | select DEBUG_UART_PL01X | ||
526 | help | 734 | help |
527 | Say Y here if you want the debug print routines to direct | 735 | Say Y here if you want the debug print routines to direct |
528 | their output to the uart port on U300 devices. | 736 | their output to the uart port on U300 devices. |
@@ -548,6 +756,7 @@ choice | |||
548 | config DEBUG_VEXPRESS_UART0_CA9 | 756 | config DEBUG_VEXPRESS_UART0_CA9 |
549 | bool "Use PL011 UART0 at 0x10009000 (V2P-CA9 core tile)" | 757 | bool "Use PL011 UART0 at 0x10009000 (V2P-CA9 core tile)" |
550 | depends on ARCH_VEXPRESS | 758 | depends on ARCH_VEXPRESS |
759 | select DEBUG_UART_PL01X | ||
551 | help | 760 | help |
552 | This option selects UART0 at 0x10009000. Except for custom models, | 761 | This option selects UART0 at 0x10009000. Except for custom models, |
553 | this applies only to the V2P-CA9 tile. | 762 | this applies only to the V2P-CA9 tile. |
@@ -555,6 +764,7 @@ choice | |||
555 | config DEBUG_VEXPRESS_UART0_RS1 | 764 | config DEBUG_VEXPRESS_UART0_RS1 |
556 | bool "Use PL011 UART0 at 0x1c090000 (RS1 complaint tiles)" | 765 | bool "Use PL011 UART0 at 0x1c090000 (RS1 complaint tiles)" |
557 | depends on ARCH_VEXPRESS | 766 | depends on ARCH_VEXPRESS |
767 | select DEBUG_UART_PL01X | ||
558 | help | 768 | help |
559 | This option selects UART0 at 0x1c090000. This applies to most | 769 | This option selects UART0 at 0x1c090000. This applies to most |
560 | of the tiles using the RS1 memory map, including all new A-class | 770 | of the tiles using the RS1 memory map, including all new A-class |
@@ -563,6 +773,7 @@ choice | |||
563 | config DEBUG_VEXPRESS_UART0_CRX | 773 | config DEBUG_VEXPRESS_UART0_CRX |
564 | bool "Use PL011 UART0 at 0xb0090000 (Cortex-R compliant tiles)" | 774 | bool "Use PL011 UART0 at 0xb0090000 (Cortex-R compliant tiles)" |
565 | depends on ARCH_VEXPRESS && !MMU | 775 | depends on ARCH_VEXPRESS && !MMU |
776 | select DEBUG_UART_PL01X | ||
566 | help | 777 | help |
567 | This option selects UART0 at 0xb0090000. This is appropriate for | 778 | This option selects UART0 at 0xb0090000. This is appropriate for |
568 | Cortex-R series tiles and SMMs, such as Cortex-R5 and Cortex-R7 | 779 | Cortex-R series tiles and SMMs, such as Cortex-R5 and Cortex-R7 |
@@ -579,7 +790,7 @@ choice | |||
579 | depends on !ARCH_MULTIPLATFORM | 790 | depends on !ARCH_MULTIPLATFORM |
580 | help | 791 | help |
581 | Say Y here if your platform doesn't provide a UART option | 792 | Say Y here if your platform doesn't provide a UART option |
582 | below. This relies on your platform choosing the right UART | 793 | above. This relies on your platform choosing the right UART |
583 | definition internally in order for low-level debugging to | 794 | definition internally in order for low-level debugging to |
584 | work. | 795 | work. |
585 | 796 | ||
@@ -610,11 +821,41 @@ choice | |||
610 | For more details about semihosting, please see | 821 | For more details about semihosting, please see |
611 | chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd. | 822 | chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd. |
612 | 823 | ||
824 | config DEBUG_LL_UART_8250 | ||
825 | bool "Kernel low-level debugging via 8250 UART" | ||
826 | help | ||
827 | Say Y here if you wish the debug print routes to direct | ||
828 | their output to an 8250 UART. You can use this option | ||
829 | to provide the parameters for the 8250 UART rather than | ||
830 | selecting one of the platform specific options above if | ||
831 | you know the parameters for the port. | ||
832 | |||
833 | This option is preferred over the platform specific | ||
834 | options; the platform specific options are deprecated | ||
835 | and will be soon removed. | ||
836 | |||
837 | config DEBUG_LL_UART_PL01X | ||
838 | bool "Kernel low-level debugging via ARM Ltd PL01x Primecell UART" | ||
839 | help | ||
840 | Say Y here if you wish the debug print routes to direct | ||
841 | their output to a PL01x Primecell UART. You can use | ||
842 | this option to provide the parameters for the UART | ||
843 | rather than selecting one of the platform specific | ||
844 | options above if you know the parameters for the port. | ||
845 | |||
846 | This option is preferred over the platform specific | ||
847 | options; the platform specific options are deprecated | ||
848 | and will be soon removed. | ||
849 | |||
613 | endchoice | 850 | endchoice |
614 | 851 | ||
615 | config DEBUG_EXYNOS_UART | 852 | config DEBUG_EXYNOS_UART |
616 | bool | 853 | bool |
617 | 854 | ||
855 | config DEBUG_OMAP2PLUS_UART | ||
856 | bool | ||
857 | depends on ARCH_OMAP2PLUS | ||
858 | |||
618 | config DEBUG_IMX_UART_PORT | 859 | config DEBUG_IMX_UART_PORT |
619 | int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ | 860 | int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ |
620 | DEBUG_IMX25_UART || \ | 861 | DEBUG_IMX25_UART || \ |
@@ -631,140 +872,19 @@ config DEBUG_IMX_UART_PORT | |||
631 | Choose UART port on which kernel low-level debug messages | 872 | Choose UART port on which kernel low-level debug messages |
632 | should be output. | 873 | should be output. |
633 | 874 | ||
634 | choice | 875 | config DEBUG_TEGRA_UART |
635 | prompt "Low-level debug console UART" | 876 | bool |
636 | depends on DEBUG_OMAP2PLUS_UART | 877 | depends on ARCH_TEGRA |
637 | |||
638 | config DEBUG_OMAP2UART1 | ||
639 | bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)" | ||
640 | help | ||
641 | This covers at least h4, 2430sdp, 3430sdp, 3630sdp, | ||
642 | omap3 torpedo and 3530 lv som. | ||
643 | |||
644 | config DEBUG_OMAP2UART2 | ||
645 | bool "OMAP2/3/4 UART2" | ||
646 | |||
647 | config DEBUG_OMAP2UART3 | ||
648 | bool "OMAP2 UART3 (n8x0)" | ||
649 | |||
650 | config DEBUG_OMAP3UART3 | ||
651 | bool "OMAP3 UART3 (most omap3 boards)" | ||
652 | help | ||
653 | This covers at least cm_t3x, beagle, crane, devkit8000, | ||
654 | igep00x0, ldp, n900, n9(50), pandora, overo, touchbook, | ||
655 | and 3517evm. | ||
656 | |||
657 | config DEBUG_OMAP4UART3 | ||
658 | bool "OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)" | ||
659 | |||
660 | config DEBUG_OMAP3UART4 | ||
661 | bool "OMAP36XX UART4" | ||
662 | |||
663 | config DEBUG_OMAP4UART4 | ||
664 | bool "OMAP4/5 UART4" | ||
665 | |||
666 | config DEBUG_TI81XXUART1 | ||
667 | bool "TI81XX UART1 (ti8148evm)" | ||
668 | |||
669 | config DEBUG_TI81XXUART2 | ||
670 | bool "TI81XX UART2" | ||
671 | |||
672 | config DEBUG_TI81XXUART3 | ||
673 | bool "TI81XX UART3 (ti8168evm)" | ||
674 | |||
675 | config DEBUG_AM33XXUART1 | ||
676 | bool "AM33XX UART1" | ||
677 | |||
678 | config DEBUG_ZOOM_UART | ||
679 | bool "Zoom2/3 UART" | ||
680 | endchoice | ||
681 | |||
682 | choice | ||
683 | prompt "Low-level debug console UART" | ||
684 | depends on DEBUG_ROCKCHIP_UART | ||
685 | |||
686 | config DEBUG_RK29_UART0 | ||
687 | bool "RK29 UART0" | ||
688 | |||
689 | config DEBUG_RK29_UART1 | ||
690 | bool "RK29 UART1" | ||
691 | |||
692 | config DEBUG_RK29_UART2 | ||
693 | bool "RK29 UART2" | ||
694 | |||
695 | config DEBUG_RK3X_UART0 | ||
696 | bool "RK3X UART0" | ||
697 | |||
698 | config DEBUG_RK3X_UART1 | ||
699 | bool "RK3X UART1" | ||
700 | |||
701 | config DEBUG_RK3X_UART2 | ||
702 | bool "RK3X UART2" | ||
703 | |||
704 | config DEBUG_RK3X_UART3 | ||
705 | bool "RK3X UART3" | ||
706 | endchoice | ||
707 | |||
708 | choice | ||
709 | prompt "Low-level debug console UART" | ||
710 | depends on DEBUG_LL && DEBUG_TEGRA_UART | ||
711 | |||
712 | config TEGRA_DEBUG_UART_AUTO_ODMDATA | ||
713 | bool "Via ODMDATA" | ||
714 | help | ||
715 | Automatically determines which UART to use for low-level debug based | ||
716 | on the ODMDATA value. This value is part of the BCT, and is written | ||
717 | to the boot memory device using nvflash, or other flashing tool. | ||
718 | When bits 19:18 are 3, then bits 17:15 indicate which UART to use; | ||
719 | 0/1/2/3/4 are UART A/B/C/D/E. | ||
720 | |||
721 | config TEGRA_DEBUG_UARTA | ||
722 | bool "UART A" | ||
723 | |||
724 | config TEGRA_DEBUG_UARTB | ||
725 | bool "UART B" | ||
726 | |||
727 | config TEGRA_DEBUG_UARTC | ||
728 | bool "UART C" | ||
729 | |||
730 | config TEGRA_DEBUG_UARTD | ||
731 | bool "UART D" | ||
732 | |||
733 | config TEGRA_DEBUG_UARTE | ||
734 | bool "UART E" | ||
735 | |||
736 | endchoice | ||
737 | |||
738 | choice | ||
739 | prompt "Low-level debug console UART" | ||
740 | depends on DEBUG_LL && DEBUG_STI_UART | ||
741 | |||
742 | config STIH41X_DEBUG_ASC2 | ||
743 | bool "ASC2 UART" | ||
744 | help | ||
745 | Say Y here if you want kernel low-level debugging support | ||
746 | on STiH415/416 based platforms like b2000, which has | ||
747 | default UART wired up to ASC2. | ||
748 | |||
749 | If unsure, say N. | ||
750 | |||
751 | config STIH41X_DEBUG_SBC_ASC1 | ||
752 | bool "SBC ASC1 UART" | ||
753 | help | ||
754 | Say Y here if you want kernel low-level debugging support | ||
755 | on STiH415/416 based platforms like b2020. which has | ||
756 | default UART wired up to SBC ASC1. | ||
757 | |||
758 | If unsure, say N. | ||
759 | 878 | ||
760 | endchoice | 879 | config DEBUG_STI_UART |
880 | bool | ||
881 | depends on ARCH_STI | ||
761 | 882 | ||
762 | config DEBUG_LL_INCLUDE | 883 | config DEBUG_LL_INCLUDE |
763 | string | 884 | string |
764 | default "debug/bcm2835.S" if DEBUG_BCM2835 | 885 | default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 |
765 | default "debug/cns3xxx.S" if DEBUG_CNS3XXX | 886 | default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X |
766 | default "debug/exynos.S" if DEBUG_EXYNOS_UART | 887 | default "debug/exynos.S" if DEBUG_EXYNOS_UART |
767 | default "debug/highbank.S" if DEBUG_HIGHBANK_UART | ||
768 | default "debug/icedcc.S" if DEBUG_ICEDCC | 888 | default "debug/icedcc.S" if DEBUG_ICEDCC |
769 | default "debug/imx.S" if DEBUG_IMX1_UART || \ | 889 | default "debug/imx.S" if DEBUG_IMX1_UART || \ |
770 | DEBUG_IMX25_UART || \ | 890 | DEBUG_IMX25_UART || \ |
@@ -775,38 +895,170 @@ config DEBUG_LL_INCLUDE | |||
775 | DEBUG_IMX53_UART ||\ | 895 | DEBUG_IMX53_UART ||\ |
776 | DEBUG_IMX6Q_UART || \ | 896 | DEBUG_IMX6Q_UART || \ |
777 | DEBUG_IMX6SL_UART | 897 | DEBUG_IMX6SL_UART |
778 | default "debug/keystone.S" if DEBUG_KEYSTONE_UART0 || \ | ||
779 | DEBUG_KEYSTONE_UART1 | ||
780 | default "debug/mvebu.S" if DEBUG_MVEBU_UART || \ | ||
781 | DEBUG_MVEBU_UART_ALTERNATE | ||
782 | default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART | ||
783 | default "debug/nomadik.S" if DEBUG_NOMADIK_UART | ||
784 | default "debug/nspire.S" if DEBUG_NSPIRE_CX_UART || \ | ||
785 | DEBUG_NSPIRE_CLASSIC_UART | ||
786 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART | 898 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART |
787 | default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART | ||
788 | default "debug/pxa.S" if DEBUG_PXA_UART1 || DEBUG_MMP_UART2 || \ | ||
789 | DEBUG_MMP_UART3 | ||
790 | default "debug/rockchip.S" if DEBUG_ROCKCHIP_UART | ||
791 | default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 | 899 | default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 |
792 | default "debug/socfpga.S" if DEBUG_SOCFPGA_UART | ||
793 | default "debug/sti.S" if DEBUG_STI_UART | 900 | default "debug/sti.S" if DEBUG_STI_UART |
794 | default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 | ||
795 | default "debug/tegra.S" if DEBUG_TEGRA_UART | 901 | default "debug/tegra.S" if DEBUG_TEGRA_UART |
796 | default "debug/u300.S" if DEBUG_U300_UART | ||
797 | default "debug/ux500.S" if DEBUG_UX500_UART | 902 | default "debug/ux500.S" if DEBUG_UX500_UART |
798 | default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ | 903 | default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT |
799 | DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 || \ | ||
800 | DEBUG_VEXPRESS_UART0_CRX | ||
801 | default "debug/vt8500.S" if DEBUG_VT8500_UART0 | 904 | default "debug/vt8500.S" if DEBUG_VT8500_UART0 |
802 | default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 | 905 | default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 |
803 | default "mach/debug-macro.S" | 906 | default "mach/debug-macro.S" |
804 | 907 | ||
908 | # Compatibility options for PL01x | ||
909 | config DEBUG_UART_PL01X | ||
910 | def_bool ARCH_EP93XX || \ | ||
911 | ARCH_INTEGRATOR || \ | ||
912 | ARCH_SPEAR3XX || \ | ||
913 | ARCH_SPEAR6XX || \ | ||
914 | ARCH_SPEAR13XX || \ | ||
915 | ARCH_VERSATILE | ||
916 | |||
917 | # Compatibility options for 8250 | ||
918 | config DEBUG_UART_8250 | ||
919 | def_bool ARCH_DOVE || ARCH_EBSA110 || \ | ||
920 | (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ | ||
921 | ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \ | ||
922 | ARCH_IOP33X || ARCH_IXP4XX || ARCH_KIRKWOOD || \ | ||
923 | ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC | ||
924 | |||
925 | config DEBUG_UART_PHYS | ||
926 | hex "Physical base address of debug UART" | ||
927 | default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 | ||
928 | default 0x01c28000 if DEBUG_SUNXI_UART0 | ||
929 | default 0x01c28400 if DEBUG_SUNXI_UART1 | ||
930 | default 0x01d0c000 if DEBUG_DAVINCI_DA8XX_UART1 | ||
931 | default 0x01d0d000 if DEBUG_DAVINCI_DA8XX_UART2 | ||
932 | default 0x02530c00 if DEBUG_KEYSTONE_UART0 | ||
933 | default 0x02531000 if DEBUG_KEYSTONE_UART1 | ||
934 | default 0x03010fe0 if ARCH_RPC | ||
935 | default 0x08108300 if DEBUG_DAVINCI_TNETV107X_UART1 | ||
936 | default 0x10009000 if DEBUG_REALVIEW_STD_PORT || DEBUG_CNS3XXX || \ | ||
937 | DEBUG_VEXPRESS_UART0_CA9 | ||
938 | default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT | ||
939 | default 0x10124000 if DEBUG_RK3X_UART0 | ||
940 | default 0x10126000 if DEBUG_RK3X_UART1 | ||
941 | default 0x101f1000 if ARCH_VERSATILE | ||
942 | default 0x101fb000 if DEBUG_NOMADIK_UART | ||
943 | default 0x16000000 if ARCH_INTEGRATOR | ||
944 | default 0x1c090000 if DEBUG_VEXPRESS_UART0_RS1 | ||
945 | default 0x20060000 if DEBUG_RK29_UART0 | ||
946 | default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 | ||
947 | default 0x20068000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 | ||
948 | default 0x20201000 if DEBUG_BCM2835 | ||
949 | default 0x40090000 if ARCH_LPC32XX | ||
950 | default 0x40100000 if DEBUG_PXA_UART1 | ||
951 | default 0x42000000 if ARCH_GEMINI | ||
952 | default 0x7c0003f8 if FOOTBRIDGE | ||
953 | default 0x80230000 if DEBUG_PICOXCELL_UART | ||
954 | default 0x80070000 if DEBUG_IMX23_UART | ||
955 | default 0x80074000 if DEBUG_IMX28_UART | ||
956 | default 0x808c0000 if ARCH_EP93XX | ||
957 | default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART | ||
958 | default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX | ||
959 | default 0xc0013000 if DEBUG_U300_UART | ||
960 | default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN | ||
961 | default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN | ||
962 | default 0xd0000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX | ||
963 | default 0xd0012000 if DEBUG_MVEBU_UART | ||
964 | default 0xd4017000 if DEBUG_MMP_UART2 | ||
965 | default 0xd4018000 if DEBUG_MMP_UART3 | ||
966 | default 0xe0000000 if ARCH_SPEAR13XX | ||
967 | default 0xf0000be0 if ARCH_EBSA110 | ||
968 | default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE | ||
969 | default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \ | ||
970 | ARCH_ORION5X | ||
971 | default 0xf8b00000 if DEBUG_HI3716_UART | ||
972 | default 0xfcb00000 if DEBUG_HI3620_UART | ||
973 | default 0xfe800000 if ARCH_IOP32X | ||
974 | default 0xffc02000 if DEBUG_SOCFPGA_UART | ||
975 | default 0xffd82340 if ARCH_IOP13XX | ||
976 | default 0xfff36000 if DEBUG_HIGHBANK_UART | ||
977 | default 0xfffff700 if ARCH_IOP33X | ||
978 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ | ||
979 | DEBUG_UART_8250 || DEBUG_UART_PL01X | ||
980 | |||
981 | config DEBUG_UART_VIRT | ||
982 | hex "Virtual base address of debug UART" | ||
983 | default 0xe0010fe0 if ARCH_RPC | ||
984 | default 0xf0000be0 if ARCH_EBSA110 | ||
985 | default 0xf0009000 if DEBUG_CNS3XXX | ||
986 | default 0xf01fb000 if DEBUG_NOMADIK_UART | ||
987 | default 0xf0201000 if DEBUG_BCM2835 | ||
988 | default 0xf11f1000 if ARCH_VERSATILE | ||
989 | default 0xf1600000 if ARCH_INTEGRATOR | ||
990 | default 0xf1c28000 if DEBUG_SUNXI_UART0 | ||
991 | default 0xf1c28400 if DEBUG_SUNXI_UART1 | ||
992 | default 0xf2100000 if DEBUG_PXA_UART1 | ||
993 | default 0xf4090000 if ARCH_LPC32XX | ||
994 | default 0xf4200000 if ARCH_GEMINI | ||
995 | default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 | ||
996 | default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 | ||
997 | default 0xfb009000 if DEBUG_REALVIEW_STD_PORT | ||
998 | default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT | ||
999 | default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX | ||
1000 | default 0xfd000000 if ARCH_SPEAR13XX | ||
1001 | default 0xfd012000 if ARCH_MV78XX0 | ||
1002 | default 0xfde12000 if ARCH_DOVE | ||
1003 | default 0xfe012000 if ARCH_ORION5X | ||
1004 | default 0xfe017000 if DEBUG_MMP_UART2 | ||
1005 | default 0xfe018000 if DEBUG_MMP_UART3 | ||
1006 | default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART | ||
1007 | default 0xfe230000 if DEBUG_PICOXCELL_UART | ||
1008 | default 0xfe800000 if ARCH_IOP32X | ||
1009 | default 0xfeb00000 if DEBUG_HI3620_UART || DEBUG_HI3716_UART | ||
1010 | default 0xfeb24000 if DEBUG_RK3X_UART0 | ||
1011 | default 0xfeb26000 if DEBUG_RK3X_UART1 | ||
1012 | default 0xfeb30c00 if DEBUG_KEYSTONE_UART0 | ||
1013 | default 0xfeb31000 if DEBUG_KEYSTONE_UART1 | ||
1014 | default 0xfec12000 if DEBUG_MVEBU_UART || DEBUG_MVEBU_UART_ALTERNATE | ||
1015 | default 0xfed60000 if DEBUG_RK29_UART0 | ||
1016 | default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 | ||
1017 | default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 | ||
1018 | default 0xfec02000 if DEBUG_SOCFPGA_UART | ||
1019 | default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0 | ||
1020 | default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1 | ||
1021 | default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2 | ||
1022 | default 0xfed12000 if ARCH_KIRKWOOD | ||
1023 | default 0xfedc0000 if ARCH_EP93XX | ||
1024 | default 0xfee003f8 if FOOTBRIDGE | ||
1025 | default 0xfee08300 if DEBUG_DAVINCI_TNETV107X_UART1 | ||
1026 | default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART | ||
1027 | default 0xfef36000 if DEBUG_HIGHBANK_UART | ||
1028 | default 0xfee82340 if ARCH_IOP13XX | ||
1029 | default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN | ||
1030 | default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN | ||
1031 | default 0xfefff700 if ARCH_IOP33X | ||
1032 | default 0xff003000 if DEBUG_U300_UART | ||
1033 | default DEBUG_UART_PHYS if !MMU | ||
1034 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ | ||
1035 | DEBUG_UART_8250 || DEBUG_UART_PL01X | ||
1036 | |||
1037 | config DEBUG_UART_8250_SHIFT | ||
1038 | int "Register offset shift for the 8250 debug UART" | ||
1039 | depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 | ||
1040 | default 0 if FOOTBRIDGE || ARCH_IOP32X | ||
1041 | default 2 | ||
1042 | |||
1043 | config DEBUG_UART_8250_WORD | ||
1044 | bool "Use 32-bit accesses for 8250 UART" | ||
1045 | depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 | ||
1046 | depends on DEBUG_UART_8250_SHIFT >= 2 | ||
1047 | default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ | ||
1048 | ARCH_KEYSTONE || \ | ||
1049 | DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \ | ||
1050 | DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_DAVINCI_TNETV107X_UART1 | ||
1051 | |||
1052 | config DEBUG_UART_8250_FLOW_CONTROL | ||
1053 | bool "Enable flow control for 8250 UART" | ||
1054 | depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 | ||
1055 | default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_GEMINI || ARCH_RPC | ||
1056 | |||
805 | config DEBUG_UNCOMPRESS | 1057 | config DEBUG_UNCOMPRESS |
806 | bool | 1058 | bool |
807 | depends on ARCH_MULTIPLATFORM | 1059 | depends on ARCH_MULTIPLATFORM |
808 | default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ | 1060 | default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ |
809 | !DEBUG_TEGRA_UART | 1061 | (!DEBUG_TEGRA_UART || !ZBOOT_ROM) |
810 | help | 1062 | help |
811 | This option influences the normal decompressor output for | 1063 | This option influences the normal decompressor output for |
812 | multiplatform kernels. Normally, multiplatform kernels disable | 1064 | multiplatform kernels. Normally, multiplatform kernels disable |
diff --git a/arch/arm/common/mcpm_head.S b/arch/arm/common/mcpm_head.S index 80f033614a1f..39c96df3477a 100644 --- a/arch/arm/common/mcpm_head.S +++ b/arch/arm/common/mcpm_head.S | |||
@@ -151,7 +151,7 @@ mcpm_setup_leave: | |||
151 | 151 | ||
152 | mov r0, #INBOUND_NOT_COMING_UP | 152 | mov r0, #INBOUND_NOT_COMING_UP |
153 | strb r0, [r8, #MCPM_SYNC_CLUSTER_INBOUND] | 153 | strb r0, [r8, #MCPM_SYNC_CLUSTER_INBOUND] |
154 | dsb | 154 | dsb st |
155 | sev | 155 | sev |
156 | 156 | ||
157 | mov r0, r11 | 157 | mov r0, r11 |
diff --git a/arch/arm/common/vlock.S b/arch/arm/common/vlock.S index ff198583f683..8b7df283fedf 100644 --- a/arch/arm/common/vlock.S +++ b/arch/arm/common/vlock.S | |||
@@ -42,7 +42,7 @@ | |||
42 | dmb | 42 | dmb |
43 | mov \rscratch, #0 | 43 | mov \rscratch, #0 |
44 | strb \rscratch, [\rbase, \rcpu] | 44 | strb \rscratch, [\rbase, \rcpu] |
45 | dsb | 45 | dsb st |
46 | sev | 46 | sev |
47 | .endm | 47 | .endm |
48 | 48 | ||
@@ -102,7 +102,7 @@ ENTRY(vlock_unlock) | |||
102 | dmb | 102 | dmb |
103 | mov r1, #VLOCK_OWNER_NONE | 103 | mov r1, #VLOCK_OWNER_NONE |
104 | strb r1, [r0, #VLOCK_OWNER_OFFSET] | 104 | strb r1, [r0, #VLOCK_OWNER_OFFSET] |
105 | dsb | 105 | dsb st |
106 | sev | 106 | sev |
107 | bx lr | 107 | bx lr |
108 | ENDPROC(vlock_unlock) | 108 | ENDPROC(vlock_unlock) |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index a5fef710af32..fcc1b5bf6979 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -220,9 +220,9 @@ | |||
220 | #ifdef CONFIG_SMP | 220 | #ifdef CONFIG_SMP |
221 | #if __LINUX_ARM_ARCH__ >= 7 | 221 | #if __LINUX_ARM_ARCH__ >= 7 |
222 | .ifeqs "\mode","arm" | 222 | .ifeqs "\mode","arm" |
223 | ALT_SMP(dmb) | 223 | ALT_SMP(dmb ish) |
224 | .else | 224 | .else |
225 | ALT_SMP(W(dmb)) | 225 | ALT_SMP(W(dmb) ish) |
226 | .endif | 226 | .endif |
227 | #elif __LINUX_ARM_ARCH__ == 6 | 227 | #elif __LINUX_ARM_ARCH__ == 6 |
228 | ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb | 228 | ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb |
diff --git a/arch/arm/include/asm/barrier.h b/arch/arm/include/asm/barrier.h index 8dcd9c702d90..60f15e274e6d 100644 --- a/arch/arm/include/asm/barrier.h +++ b/arch/arm/include/asm/barrier.h | |||
@@ -14,27 +14,27 @@ | |||
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #if __LINUX_ARM_ARCH__ >= 7 | 16 | #if __LINUX_ARM_ARCH__ >= 7 |
17 | #define isb() __asm__ __volatile__ ("isb" : : : "memory") | 17 | #define isb(option) __asm__ __volatile__ ("isb " #option : : : "memory") |
18 | #define dsb() __asm__ __volatile__ ("dsb" : : : "memory") | 18 | #define dsb(option) __asm__ __volatile__ ("dsb " #option : : : "memory") |
19 | #define dmb() __asm__ __volatile__ ("dmb" : : : "memory") | 19 | #define dmb(option) __asm__ __volatile__ ("dmb " #option : : : "memory") |
20 | #elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6 | 20 | #elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6 |
21 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | 21 | #define isb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ |
22 | : : "r" (0) : "memory") | 22 | : : "r" (0) : "memory") |
23 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | 23 | #define dsb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ |
24 | : : "r" (0) : "memory") | 24 | : : "r" (0) : "memory") |
25 | #define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ | 25 | #define dmb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ |
26 | : : "r" (0) : "memory") | 26 | : : "r" (0) : "memory") |
27 | #elif defined(CONFIG_CPU_FA526) | 27 | #elif defined(CONFIG_CPU_FA526) |
28 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | 28 | #define isb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ |
29 | : : "r" (0) : "memory") | 29 | : : "r" (0) : "memory") |
30 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | 30 | #define dsb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ |
31 | : : "r" (0) : "memory") | 31 | : : "r" (0) : "memory") |
32 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | 32 | #define dmb(x) __asm__ __volatile__ ("" : : : "memory") |
33 | #else | 33 | #else |
34 | #define isb() __asm__ __volatile__ ("" : : : "memory") | 34 | #define isb(x) __asm__ __volatile__ ("" : : : "memory") |
35 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | 35 | #define dsb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ |
36 | : : "r" (0) : "memory") | 36 | : : "r" (0) : "memory") |
37 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | 37 | #define dmb(x) __asm__ __volatile__ ("" : : : "memory") |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifdef CONFIG_ARCH_HAS_BARRIERS | 40 | #ifdef CONFIG_ARCH_HAS_BARRIERS |
@@ -42,7 +42,7 @@ | |||
42 | #elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) | 42 | #elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) |
43 | #define mb() do { dsb(); outer_sync(); } while (0) | 43 | #define mb() do { dsb(); outer_sync(); } while (0) |
44 | #define rmb() dsb() | 44 | #define rmb() dsb() |
45 | #define wmb() mb() | 45 | #define wmb() do { dsb(st); outer_sync(); } while (0) |
46 | #else | 46 | #else |
47 | #define mb() barrier() | 47 | #define mb() barrier() |
48 | #define rmb() barrier() | 48 | #define rmb() barrier() |
@@ -54,9 +54,9 @@ | |||
54 | #define smp_rmb() barrier() | 54 | #define smp_rmb() barrier() |
55 | #define smp_wmb() barrier() | 55 | #define smp_wmb() barrier() |
56 | #else | 56 | #else |
57 | #define smp_mb() dmb() | 57 | #define smp_mb() dmb(ish) |
58 | #define smp_rmb() dmb() | 58 | #define smp_rmb() smp_mb() |
59 | #define smp_wmb() dmb() | 59 | #define smp_wmb() dmb(ishst) |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #define read_barrier_depends() do { } while(0) | 62 | #define read_barrier_depends() do { } while(0) |
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 17d0ae8672fa..15f2d5bf8875 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -268,8 +268,7 @@ extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr | |||
268 | * Harvard caches are synchronised for the user space address range. | 268 | * Harvard caches are synchronised for the user space address range. |
269 | * This is used for the ARM private sys_cacheflush system call. | 269 | * This is used for the ARM private sys_cacheflush system call. |
270 | */ | 270 | */ |
271 | #define flush_cache_user_range(start,end) \ | 271 | #define flush_cache_user_range(s,e) __cpuc_coherent_user_range(s,e) |
272 | __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end)) | ||
273 | 272 | ||
274 | /* | 273 | /* |
275 | * Perform necessary cache operations to ensure that data previously | 274 | * Perform necessary cache operations to ensure that data previously |
@@ -352,7 +351,7 @@ static inline void flush_cache_vmap(unsigned long start, unsigned long end) | |||
352 | * set_pte_at() called from vmap_pte_range() does not | 351 | * set_pte_at() called from vmap_pte_range() does not |
353 | * have a DSB after cleaning the cache line. | 352 | * have a DSB after cleaning the cache line. |
354 | */ | 353 | */ |
355 | dsb(); | 354 | dsb(ishst); |
356 | } | 355 | } |
357 | 356 | ||
358 | static inline void flush_cache_vunmap(unsigned long start, unsigned long end) | 357 | static inline void flush_cache_vunmap(unsigned long start, unsigned long end) |
diff --git a/arch/arm/include/asm/hardware/debug-8250.S b/arch/arm/include/asm/hardware/debug-8250.S deleted file mode 100644 index 22c689255e6e..000000000000 --- a/arch/arm/include/asm/hardware/debug-8250.S +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/debug-8250.S | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 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 | #include <linux/serial_reg.h> | ||
11 | |||
12 | .macro senduart,rd,rx | ||
13 | strb \rd, [\rx, #UART_TX << UART_SHIFT] | ||
14 | .endm | ||
15 | |||
16 | .macro busyuart,rd,rx | ||
17 | 1002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
18 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
19 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
20 | bne 1002b | ||
21 | .endm | ||
22 | |||
23 | .macro waituart,rd,rx | ||
24 | #ifdef FLOW_CONTROL | ||
25 | 1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT] | ||
26 | tst \rd, #UART_MSR_CTS | ||
27 | beq 1001b | ||
28 | #endif | ||
29 | .endm | ||
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 441efc491b50..69b879ac0289 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -65,12 +65,12 @@ struct machine_desc { | |||
65 | /* | 65 | /* |
66 | * Current machine - only accessible during boot. | 66 | * Current machine - only accessible during boot. |
67 | */ | 67 | */ |
68 | extern struct machine_desc *machine_desc; | 68 | extern const struct machine_desc *machine_desc; |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * Machine type table - also only accessible during boot | 71 | * Machine type table - also only accessible during boot |
72 | */ | 72 | */ |
73 | extern struct machine_desc __arch_info_begin[], __arch_info_end[]; | 73 | extern const struct machine_desc __arch_info_begin[], __arch_info_end[]; |
74 | #define for_each_machine_desc(p) \ | 74 | #define for_each_machine_desc(p) \ |
75 | for (p = __arch_info_begin; p < __arch_info_end; p++) | 75 | for (p = __arch_info_begin; p < __arch_info_end; p++) |
76 | 76 | ||
diff --git a/arch/arm/include/asm/memblock.h b/arch/arm/include/asm/memblock.h index 00ca5f92648e..c2f5102ae659 100644 --- a/arch/arm/include/asm/memblock.h +++ b/arch/arm/include/asm/memblock.h | |||
@@ -4,8 +4,7 @@ | |||
4 | struct meminfo; | 4 | struct meminfo; |
5 | struct machine_desc; | 5 | struct machine_desc; |
6 | 6 | ||
7 | extern void arm_memblock_init(struct meminfo *, struct machine_desc *); | 7 | void arm_memblock_init(struct meminfo *, const struct machine_desc *); |
8 | |||
9 | phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align); | 8 | phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align); |
10 | 9 | ||
11 | #endif | 10 | #endif |
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h index 0d3a28dbc8e5..ed690c49ef93 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h | |||
@@ -12,6 +12,8 @@ enum { | |||
12 | ARM_SEC_CORE, | 12 | ARM_SEC_CORE, |
13 | ARM_SEC_EXIT, | 13 | ARM_SEC_EXIT, |
14 | ARM_SEC_DEVEXIT, | 14 | ARM_SEC_DEVEXIT, |
15 | ARM_SEC_HOT, | ||
16 | ARM_SEC_UNLIKELY, | ||
15 | ARM_SEC_MAX, | 17 | ARM_SEC_MAX, |
16 | }; | 18 | }; |
17 | 19 | ||
diff --git a/arch/arm/include/asm/neon.h b/arch/arm/include/asm/neon.h new file mode 100644 index 000000000000..8f730fe70093 --- /dev/null +++ b/arch/arm/include/asm/neon.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/include/asm/neon.h | ||
3 | * | ||
4 | * Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org> | ||
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 <asm/hwcap.h> | ||
12 | |||
13 | #define cpu_has_neon() (!!(elf_hwcap & HWCAP_NEON)) | ||
14 | |||
15 | #ifdef __ARM_NEON__ | ||
16 | |||
17 | /* | ||
18 | * If you are affected by the BUILD_BUG below, it probably means that you are | ||
19 | * using NEON code /and/ calling the kernel_neon_begin() function from the same | ||
20 | * compilation unit. To prevent issues that may arise from GCC reordering or | ||
21 | * generating(1) NEON instructions outside of these begin/end functions, the | ||
22 | * only supported way of using NEON code in the kernel is by isolating it in a | ||
23 | * separate compilation unit, and calling it from another unit from inside a | ||
24 | * kernel_neon_begin/kernel_neon_end pair. | ||
25 | * | ||
26 | * (1) Current GCC (4.7) might generate NEON instructions at O3 level if | ||
27 | * -mpfu=neon is set. | ||
28 | */ | ||
29 | |||
30 | #define kernel_neon_begin() \ | ||
31 | BUILD_BUG_ON_MSG(1, "kernel_neon_begin() called from NEON code") | ||
32 | |||
33 | #else | ||
34 | void kernel_neon_begin(void); | ||
35 | #endif | ||
36 | void kernel_neon_end(void); | ||
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 04aeb02d2e11..be956dbf6bae 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -100,7 +100,7 @@ extern pgprot_t pgprot_s2_device; | |||
100 | #define PAGE_HYP _MOD_PROT(pgprot_kernel, L_PTE_HYP) | 100 | #define PAGE_HYP _MOD_PROT(pgprot_kernel, L_PTE_HYP) |
101 | #define PAGE_HYP_DEVICE _MOD_PROT(pgprot_hyp_device, L_PTE_HYP) | 101 | #define PAGE_HYP_DEVICE _MOD_PROT(pgprot_hyp_device, L_PTE_HYP) |
102 | #define PAGE_S2 _MOD_PROT(pgprot_s2, L_PTE_S2_RDONLY) | 102 | #define PAGE_S2 _MOD_PROT(pgprot_s2, L_PTE_S2_RDONLY) |
103 | #define PAGE_S2_DEVICE _MOD_PROT(pgprot_s2_device, L_PTE_USER | L_PTE_S2_RDONLY) | 103 | #define PAGE_S2_DEVICE _MOD_PROT(pgprot_s2_device, L_PTE_S2_RDWR) |
104 | 104 | ||
105 | #define __PAGE_NONE __pgprot(_L_PTE_DEFAULT | L_PTE_RDONLY | L_PTE_XN | L_PTE_NONE) | 105 | #define __PAGE_NONE __pgprot(_L_PTE_DEFAULT | L_PTE_RDONLY | L_PTE_XN | L_PTE_NONE) |
106 | #define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_XN) | 106 | #define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_XN) |
diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h index a219227c3e43..4a2985e21969 100644 --- a/arch/arm/include/asm/prom.h +++ b/arch/arm/include/asm/prom.h | |||
@@ -15,13 +15,13 @@ | |||
15 | 15 | ||
16 | #ifdef CONFIG_OF | 16 | #ifdef CONFIG_OF |
17 | 17 | ||
18 | extern struct machine_desc *setup_machine_fdt(unsigned int dt_phys); | 18 | extern const struct machine_desc *setup_machine_fdt(unsigned int dt_phys); |
19 | extern void arm_dt_memblock_reserve(void); | 19 | extern void arm_dt_memblock_reserve(void); |
20 | extern void __init arm_dt_init_cpu_maps(void); | 20 | extern void __init arm_dt_init_cpu_maps(void); |
21 | 21 | ||
22 | #else /* CONFIG_OF */ | 22 | #else /* CONFIG_OF */ |
23 | 23 | ||
24 | static inline struct machine_desc *setup_machine_fdt(unsigned int dt_phys) | 24 | static inline const struct machine_desc *setup_machine_fdt(unsigned int dt_phys) |
25 | { | 25 | { |
26 | return NULL; | 26 | return NULL; |
27 | } | 27 | } |
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h index b07c09e5a0ac..4f2c28060c9a 100644 --- a/arch/arm/include/asm/spinlock.h +++ b/arch/arm/include/asm/spinlock.h | |||
@@ -46,7 +46,7 @@ static inline void dsb_sev(void) | |||
46 | { | 46 | { |
47 | #if __LINUX_ARM_ARCH__ >= 7 | 47 | #if __LINUX_ARM_ARCH__ >= 7 |
48 | __asm__ __volatile__ ( | 48 | __asm__ __volatile__ ( |
49 | "dsb\n" | 49 | "dsb ishst\n" |
50 | SEV | 50 | SEV |
51 | ); | 51 | ); |
52 | #else | 52 | #else |
diff --git a/arch/arm/include/asm/switch_to.h b/arch/arm/include/asm/switch_to.h index fa09e6b49bf1..c99e259469f7 100644 --- a/arch/arm/include/asm/switch_to.h +++ b/arch/arm/include/asm/switch_to.h | |||
@@ -4,6 +4,16 @@ | |||
4 | #include <linux/thread_info.h> | 4 | #include <linux/thread_info.h> |
5 | 5 | ||
6 | /* | 6 | /* |
7 | * For v7 SMP cores running a preemptible kernel we may be pre-empted | ||
8 | * during a TLB maintenance operation, so execute an inner-shareable dsb | ||
9 | * to ensure that the maintenance completes in case we migrate to another | ||
10 | * CPU. | ||
11 | */ | ||
12 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP) && defined(CONFIG_CPU_V7) | ||
13 | #define finish_arch_switch(prev) dsb(ish) | ||
14 | #endif | ||
15 | |||
16 | /* | ||
7 | * switch_to(prev, next) should switch from task `prev' to `next' | 17 | * switch_to(prev, next) should switch from task `prev' to `next' |
8 | * `prev' will never be the same as `next'. schedule() itself | 18 | * `prev' will never be the same as `next'. schedule() itself |
9 | * contains the memory barrier to tell GCC not to cache `current'. | 19 | * contains the memory barrier to tell GCC not to cache `current'. |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 2b8114fcba09..df5e13d64f2c 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -43,6 +43,16 @@ struct cpu_context_save { | |||
43 | __u32 extra[2]; /* Xscale 'acc' register, etc */ | 43 | __u32 extra[2]; /* Xscale 'acc' register, etc */ |
44 | }; | 44 | }; |
45 | 45 | ||
46 | struct arm_restart_block { | ||
47 | union { | ||
48 | /* For user cache flushing */ | ||
49 | struct { | ||
50 | unsigned long start; | ||
51 | unsigned long end; | ||
52 | } cache; | ||
53 | }; | ||
54 | }; | ||
55 | |||
46 | /* | 56 | /* |
47 | * low level task data that entry.S needs immediate access to. | 57 | * low level task data that entry.S needs immediate access to. |
48 | * __switch_to() assumes cpu_context follows immediately after cpu_domain. | 58 | * __switch_to() assumes cpu_context follows immediately after cpu_domain. |
@@ -68,6 +78,7 @@ struct thread_info { | |||
68 | unsigned long thumbee_state; /* ThumbEE Handler Base register */ | 78 | unsigned long thumbee_state; /* ThumbEE Handler Base register */ |
69 | #endif | 79 | #endif |
70 | struct restart_block restart_block; | 80 | struct restart_block restart_block; |
81 | struct arm_restart_block arm_restart_block; | ||
71 | }; | 82 | }; |
72 | 83 | ||
73 | #define INIT_THREAD_INFO(tsk) \ | 84 | #define INIT_THREAD_INFO(tsk) \ |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index f467e9b3f8d5..38960264040c 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -319,67 +319,110 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
319 | #define tlb_op(f, regs, arg) __tlb_op(f, "p15, 0, %0, " regs, arg) | 319 | #define tlb_op(f, regs, arg) __tlb_op(f, "p15, 0, %0, " regs, arg) |
320 | #define tlb_l2_op(f, regs, arg) __tlb_op(f, "p15, 1, %0, " regs, arg) | 320 | #define tlb_l2_op(f, regs, arg) __tlb_op(f, "p15, 1, %0, " regs, arg) |
321 | 321 | ||
322 | static inline void local_flush_tlb_all(void) | 322 | static inline void __local_flush_tlb_all(void) |
323 | { | 323 | { |
324 | const int zero = 0; | 324 | const int zero = 0; |
325 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 325 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
326 | 326 | ||
327 | if (tlb_flag(TLB_WB)) | ||
328 | dsb(); | ||
329 | |||
330 | tlb_op(TLB_V4_U_FULL | TLB_V6_U_FULL, "c8, c7, 0", zero); | 327 | tlb_op(TLB_V4_U_FULL | TLB_V6_U_FULL, "c8, c7, 0", zero); |
331 | tlb_op(TLB_V4_D_FULL | TLB_V6_D_FULL, "c8, c6, 0", zero); | 328 | tlb_op(TLB_V4_D_FULL | TLB_V6_D_FULL, "c8, c6, 0", zero); |
332 | tlb_op(TLB_V4_I_FULL | TLB_V6_I_FULL, "c8, c5, 0", zero); | 329 | tlb_op(TLB_V4_I_FULL | TLB_V6_I_FULL, "c8, c5, 0", zero); |
333 | tlb_op(TLB_V7_UIS_FULL, "c8, c3, 0", zero); | 330 | } |
331 | |||
332 | static inline void local_flush_tlb_all(void) | ||
333 | { | ||
334 | const int zero = 0; | ||
335 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
336 | |||
337 | if (tlb_flag(TLB_WB)) | ||
338 | dsb(nshst); | ||
339 | |||
340 | __local_flush_tlb_all(); | ||
341 | tlb_op(TLB_V7_UIS_FULL, "c8, c7, 0", zero); | ||
334 | 342 | ||
335 | if (tlb_flag(TLB_BARRIER)) { | 343 | if (tlb_flag(TLB_BARRIER)) { |
336 | dsb(); | 344 | dsb(nsh); |
337 | isb(); | 345 | isb(); |
338 | } | 346 | } |
339 | } | 347 | } |
340 | 348 | ||
341 | static inline void local_flush_tlb_mm(struct mm_struct *mm) | 349 | static inline void __flush_tlb_all(void) |
342 | { | 350 | { |
343 | const int zero = 0; | 351 | const int zero = 0; |
344 | const int asid = ASID(mm); | ||
345 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 352 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
346 | 353 | ||
347 | if (tlb_flag(TLB_WB)) | 354 | if (tlb_flag(TLB_WB)) |
348 | dsb(); | 355 | dsb(ishst); |
356 | |||
357 | __local_flush_tlb_all(); | ||
358 | tlb_op(TLB_V7_UIS_FULL, "c8, c3, 0", zero); | ||
359 | |||
360 | if (tlb_flag(TLB_BARRIER)) { | ||
361 | dsb(ish); | ||
362 | isb(); | ||
363 | } | ||
364 | } | ||
365 | |||
366 | static inline void __local_flush_tlb_mm(struct mm_struct *mm) | ||
367 | { | ||
368 | const int zero = 0; | ||
369 | const int asid = ASID(mm); | ||
370 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
349 | 371 | ||
350 | if (possible_tlb_flags & (TLB_V4_U_FULL|TLB_V4_D_FULL|TLB_V4_I_FULL)) { | 372 | if (possible_tlb_flags & (TLB_V4_U_FULL|TLB_V4_D_FULL|TLB_V4_I_FULL)) { |
351 | if (cpumask_test_cpu(get_cpu(), mm_cpumask(mm))) { | 373 | if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm))) { |
352 | tlb_op(TLB_V4_U_FULL, "c8, c7, 0", zero); | 374 | tlb_op(TLB_V4_U_FULL, "c8, c7, 0", zero); |
353 | tlb_op(TLB_V4_D_FULL, "c8, c6, 0", zero); | 375 | tlb_op(TLB_V4_D_FULL, "c8, c6, 0", zero); |
354 | tlb_op(TLB_V4_I_FULL, "c8, c5, 0", zero); | 376 | tlb_op(TLB_V4_I_FULL, "c8, c5, 0", zero); |
355 | } | 377 | } |
356 | put_cpu(); | ||
357 | } | 378 | } |
358 | 379 | ||
359 | tlb_op(TLB_V6_U_ASID, "c8, c7, 2", asid); | 380 | tlb_op(TLB_V6_U_ASID, "c8, c7, 2", asid); |
360 | tlb_op(TLB_V6_D_ASID, "c8, c6, 2", asid); | 381 | tlb_op(TLB_V6_D_ASID, "c8, c6, 2", asid); |
361 | tlb_op(TLB_V6_I_ASID, "c8, c5, 2", asid); | 382 | tlb_op(TLB_V6_I_ASID, "c8, c5, 2", asid); |
383 | } | ||
384 | |||
385 | static inline void local_flush_tlb_mm(struct mm_struct *mm) | ||
386 | { | ||
387 | const int asid = ASID(mm); | ||
388 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
389 | |||
390 | if (tlb_flag(TLB_WB)) | ||
391 | dsb(nshst); | ||
392 | |||
393 | __local_flush_tlb_mm(mm); | ||
394 | tlb_op(TLB_V7_UIS_ASID, "c8, c7, 2", asid); | ||
395 | |||
396 | if (tlb_flag(TLB_BARRIER)) | ||
397 | dsb(nsh); | ||
398 | } | ||
399 | |||
400 | static inline void __flush_tlb_mm(struct mm_struct *mm) | ||
401 | { | ||
402 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
403 | |||
404 | if (tlb_flag(TLB_WB)) | ||
405 | dsb(ishst); | ||
406 | |||
407 | __local_flush_tlb_mm(mm); | ||
362 | #ifdef CONFIG_ARM_ERRATA_720789 | 408 | #ifdef CONFIG_ARM_ERRATA_720789 |
363 | tlb_op(TLB_V7_UIS_ASID, "c8, c3, 0", zero); | 409 | tlb_op(TLB_V7_UIS_ASID, "c8, c3, 0", 0); |
364 | #else | 410 | #else |
365 | tlb_op(TLB_V7_UIS_ASID, "c8, c3, 2", asid); | 411 | tlb_op(TLB_V7_UIS_ASID, "c8, c3, 2", ASID(mm)); |
366 | #endif | 412 | #endif |
367 | 413 | ||
368 | if (tlb_flag(TLB_BARRIER)) | 414 | if (tlb_flag(TLB_BARRIER)) |
369 | dsb(); | 415 | dsb(ish); |
370 | } | 416 | } |
371 | 417 | ||
372 | static inline void | 418 | static inline void |
373 | local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | 419 | __local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) |
374 | { | 420 | { |
375 | const int zero = 0; | 421 | const int zero = 0; |
376 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 422 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
377 | 423 | ||
378 | uaddr = (uaddr & PAGE_MASK) | ASID(vma->vm_mm); | 424 | uaddr = (uaddr & PAGE_MASK) | ASID(vma->vm_mm); |
379 | 425 | ||
380 | if (tlb_flag(TLB_WB)) | ||
381 | dsb(); | ||
382 | |||
383 | if (possible_tlb_flags & (TLB_V4_U_PAGE|TLB_V4_D_PAGE|TLB_V4_I_PAGE|TLB_V4_I_FULL) && | 426 | if (possible_tlb_flags & (TLB_V4_U_PAGE|TLB_V4_D_PAGE|TLB_V4_I_PAGE|TLB_V4_I_FULL) && |
384 | cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { | 427 | cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { |
385 | tlb_op(TLB_V4_U_PAGE, "c8, c7, 1", uaddr); | 428 | tlb_op(TLB_V4_U_PAGE, "c8, c7, 1", uaddr); |
@@ -392,6 +435,36 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
392 | tlb_op(TLB_V6_U_PAGE, "c8, c7, 1", uaddr); | 435 | tlb_op(TLB_V6_U_PAGE, "c8, c7, 1", uaddr); |
393 | tlb_op(TLB_V6_D_PAGE, "c8, c6, 1", uaddr); | 436 | tlb_op(TLB_V6_D_PAGE, "c8, c6, 1", uaddr); |
394 | tlb_op(TLB_V6_I_PAGE, "c8, c5, 1", uaddr); | 437 | tlb_op(TLB_V6_I_PAGE, "c8, c5, 1", uaddr); |
438 | } | ||
439 | |||
440 | static inline void | ||
441 | local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | ||
442 | { | ||
443 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
444 | |||
445 | uaddr = (uaddr & PAGE_MASK) | ASID(vma->vm_mm); | ||
446 | |||
447 | if (tlb_flag(TLB_WB)) | ||
448 | dsb(nshst); | ||
449 | |||
450 | __local_flush_tlb_page(vma, uaddr); | ||
451 | tlb_op(TLB_V7_UIS_PAGE, "c8, c7, 1", uaddr); | ||
452 | |||
453 | if (tlb_flag(TLB_BARRIER)) | ||
454 | dsb(nsh); | ||
455 | } | ||
456 | |||
457 | static inline void | ||
458 | __flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | ||
459 | { | ||
460 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
461 | |||
462 | uaddr = (uaddr & PAGE_MASK) | ASID(vma->vm_mm); | ||
463 | |||
464 | if (tlb_flag(TLB_WB)) | ||
465 | dsb(ishst); | ||
466 | |||
467 | __local_flush_tlb_page(vma, uaddr); | ||
395 | #ifdef CONFIG_ARM_ERRATA_720789 | 468 | #ifdef CONFIG_ARM_ERRATA_720789 |
396 | tlb_op(TLB_V7_UIS_PAGE, "c8, c3, 3", uaddr & PAGE_MASK); | 469 | tlb_op(TLB_V7_UIS_PAGE, "c8, c3, 3", uaddr & PAGE_MASK); |
397 | #else | 470 | #else |
@@ -399,19 +472,14 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
399 | #endif | 472 | #endif |
400 | 473 | ||
401 | if (tlb_flag(TLB_BARRIER)) | 474 | if (tlb_flag(TLB_BARRIER)) |
402 | dsb(); | 475 | dsb(ish); |
403 | } | 476 | } |
404 | 477 | ||
405 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | 478 | static inline void __local_flush_tlb_kernel_page(unsigned long kaddr) |
406 | { | 479 | { |
407 | const int zero = 0; | 480 | const int zero = 0; |
408 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 481 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
409 | 482 | ||
410 | kaddr &= PAGE_MASK; | ||
411 | |||
412 | if (tlb_flag(TLB_WB)) | ||
413 | dsb(); | ||
414 | |||
415 | tlb_op(TLB_V4_U_PAGE, "c8, c7, 1", kaddr); | 483 | tlb_op(TLB_V4_U_PAGE, "c8, c7, 1", kaddr); |
416 | tlb_op(TLB_V4_D_PAGE, "c8, c6, 1", kaddr); | 484 | tlb_op(TLB_V4_D_PAGE, "c8, c6, 1", kaddr); |
417 | tlb_op(TLB_V4_I_PAGE, "c8, c5, 1", kaddr); | 485 | tlb_op(TLB_V4_I_PAGE, "c8, c5, 1", kaddr); |
@@ -421,26 +489,75 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
421 | tlb_op(TLB_V6_U_PAGE, "c8, c7, 1", kaddr); | 489 | tlb_op(TLB_V6_U_PAGE, "c8, c7, 1", kaddr); |
422 | tlb_op(TLB_V6_D_PAGE, "c8, c6, 1", kaddr); | 490 | tlb_op(TLB_V6_D_PAGE, "c8, c6, 1", kaddr); |
423 | tlb_op(TLB_V6_I_PAGE, "c8, c5, 1", kaddr); | 491 | tlb_op(TLB_V6_I_PAGE, "c8, c5, 1", kaddr); |
492 | } | ||
493 | |||
494 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | ||
495 | { | ||
496 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
497 | |||
498 | kaddr &= PAGE_MASK; | ||
499 | |||
500 | if (tlb_flag(TLB_WB)) | ||
501 | dsb(nshst); | ||
502 | |||
503 | __local_flush_tlb_kernel_page(kaddr); | ||
504 | tlb_op(TLB_V7_UIS_PAGE, "c8, c7, 1", kaddr); | ||
505 | |||
506 | if (tlb_flag(TLB_BARRIER)) { | ||
507 | dsb(nsh); | ||
508 | isb(); | ||
509 | } | ||
510 | } | ||
511 | |||
512 | static inline void __flush_tlb_kernel_page(unsigned long kaddr) | ||
513 | { | ||
514 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
515 | |||
516 | kaddr &= PAGE_MASK; | ||
517 | |||
518 | if (tlb_flag(TLB_WB)) | ||
519 | dsb(ishst); | ||
520 | |||
521 | __local_flush_tlb_kernel_page(kaddr); | ||
424 | tlb_op(TLB_V7_UIS_PAGE, "c8, c3, 1", kaddr); | 522 | tlb_op(TLB_V7_UIS_PAGE, "c8, c3, 1", kaddr); |
425 | 523 | ||
426 | if (tlb_flag(TLB_BARRIER)) { | 524 | if (tlb_flag(TLB_BARRIER)) { |
427 | dsb(); | 525 | dsb(ish); |
428 | isb(); | 526 | isb(); |
429 | } | 527 | } |
430 | } | 528 | } |
431 | 529 | ||
530 | /* | ||
531 | * Branch predictor maintenance is paired with full TLB invalidation, so | ||
532 | * there is no need for any barriers here. | ||
533 | */ | ||
534 | static inline void __local_flush_bp_all(void) | ||
535 | { | ||
536 | const int zero = 0; | ||
537 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
538 | |||
539 | if (tlb_flag(TLB_V6_BP)) | ||
540 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero)); | ||
541 | } | ||
542 | |||
432 | static inline void local_flush_bp_all(void) | 543 | static inline void local_flush_bp_all(void) |
433 | { | 544 | { |
434 | const int zero = 0; | 545 | const int zero = 0; |
435 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 546 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
436 | 547 | ||
548 | __local_flush_bp_all(); | ||
437 | if (tlb_flag(TLB_V7_UIS_BP)) | 549 | if (tlb_flag(TLB_V7_UIS_BP)) |
438 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero)); | ||
439 | else if (tlb_flag(TLB_V6_BP)) | ||
440 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero)); | 550 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero)); |
551 | } | ||
441 | 552 | ||
442 | if (tlb_flag(TLB_BARRIER)) | 553 | static inline void __flush_bp_all(void) |
443 | isb(); | 554 | { |
555 | const int zero = 0; | ||
556 | const unsigned int __tlb_flag = __cpu_tlb_flags; | ||
557 | |||
558 | __local_flush_bp_all(); | ||
559 | if (tlb_flag(TLB_V7_UIS_BP)) | ||
560 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero)); | ||
444 | } | 561 | } |
445 | 562 | ||
446 | #include <asm/cputype.h> | 563 | #include <asm/cputype.h> |
@@ -461,7 +578,7 @@ static inline void dummy_flush_tlb_a15_erratum(void) | |||
461 | * Dummy TLBIMVAIS. Using the unmapped address 0 and ASID 0. | 578 | * Dummy TLBIMVAIS. Using the unmapped address 0 and ASID 0. |
462 | */ | 579 | */ |
463 | asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (0)); | 580 | asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (0)); |
464 | dsb(); | 581 | dsb(ish); |
465 | } | 582 | } |
466 | #else | 583 | #else |
467 | static inline int erratum_a15_798181(void) | 584 | static inline int erratum_a15_798181(void) |
@@ -495,7 +612,7 @@ static inline void flush_pmd_entry(void *pmd) | |||
495 | tlb_l2_op(TLB_L2CLEAN_FR, "c15, c9, 1 @ L2 flush_pmd", pmd); | 612 | tlb_l2_op(TLB_L2CLEAN_FR, "c15, c9, 1 @ L2 flush_pmd", pmd); |
496 | 613 | ||
497 | if (tlb_flag(TLB_WB)) | 614 | if (tlb_flag(TLB_WB)) |
498 | dsb(); | 615 | dsb(ishst); |
499 | } | 616 | } |
500 | 617 | ||
501 | static inline void clean_pmd_entry(void *pmd) | 618 | static inline void clean_pmd_entry(void *pmd) |
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h new file mode 100644 index 000000000000..a53cdb8f068c --- /dev/null +++ b/arch/arm/include/asm/types.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _ASM_TYPES_H | ||
2 | #define _ASM_TYPES_H | ||
3 | |||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
6 | /* | ||
7 | * The C99 types uintXX_t that are usually defined in 'stdint.h' are not as | ||
8 | * unambiguous on ARM as you would expect. For the types below, there is a | ||
9 | * difference on ARM between GCC built for bare metal ARM, GCC built for glibc | ||
10 | * and the kernel itself, which results in build errors if you try to build with | ||
11 | * -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h' | ||
12 | * in order to use NEON intrinsics) | ||
13 | * | ||
14 | * As the typedefs for these types in 'stdint.h' are based on builtin defines | ||
15 | * supplied by GCC, we can tweak these to align with the kernel's idea of those | ||
16 | * types, so 'linux/types.h' and 'stdint.h' can be safely included from the same | ||
17 | * source file (provided that -ffreestanding is used). | ||
18 | * | ||
19 | * int32_t uint32_t uintptr_t | ||
20 | * bare metal GCC long unsigned long unsigned int | ||
21 | * glibc GCC int unsigned int unsigned int | ||
22 | * kernel int unsigned int unsigned long | ||
23 | */ | ||
24 | |||
25 | #ifdef __INT32_TYPE__ | ||
26 | #undef __INT32_TYPE__ | ||
27 | #define __INT32_TYPE__ int | ||
28 | #endif | ||
29 | |||
30 | #ifdef __UINT32_TYPE__ | ||
31 | #undef __UINT32_TYPE__ | ||
32 | #define __UINT32_TYPE__ unsigned int | ||
33 | #endif | ||
34 | |||
35 | #ifdef __UINTPTR_TYPE__ | ||
36 | #undef __UINTPTR_TYPE__ | ||
37 | #define __UINTPTR_TYPE__ unsigned long | ||
38 | #endif | ||
39 | |||
40 | #endif /* _ASM_TYPES_H */ | ||
diff --git a/arch/arm/include/asm/v7m.h b/arch/arm/include/asm/v7m.h index fa88d09fa3d9..615781c61627 100644 --- a/arch/arm/include/asm/v7m.h +++ b/arch/arm/include/asm/v7m.h | |||
@@ -15,6 +15,10 @@ | |||
15 | 15 | ||
16 | #define V7M_SCB_VTOR 0x08 | 16 | #define V7M_SCB_VTOR 0x08 |
17 | 17 | ||
18 | #define V7M_SCB_AIRCR 0x0c | ||
19 | #define V7M_SCB_AIRCR_VECTKEY (0x05fa << 16) | ||
20 | #define V7M_SCB_AIRCR_SYSRESETREQ (1 << 2) | ||
21 | |||
18 | #define V7M_SCB_SCR 0x10 | 22 | #define V7M_SCB_SCR 0x10 |
19 | #define V7M_SCB_SCR_SLEEPDEEP (1 << 2) | 23 | #define V7M_SCB_SCR_SLEEPDEEP (1 << 2) |
20 | 24 | ||
@@ -42,3 +46,11 @@ | |||
42 | */ | 46 | */ |
43 | #define EXC_RET_STACK_MASK 0x00000004 | 47 | #define EXC_RET_STACK_MASK 0x00000004 |
44 | #define EXC_RET_THREADMODE_PROCESSSTACK 0xfffffffd | 48 | #define EXC_RET_THREADMODE_PROCESSSTACK 0xfffffffd |
49 | |||
50 | #ifndef __ASSEMBLY__ | ||
51 | |||
52 | enum reboot_mode; | ||
53 | |||
54 | void armv7m_restart(enum reboot_mode mode, const char *cmd); | ||
55 | |||
56 | #endif /* __ASSEMBLY__ */ | ||
diff --git a/arch/arm/include/asm/xor.h b/arch/arm/include/asm/xor.h index 7604673dc427..4ffb26d4cad8 100644 --- a/arch/arm/include/asm/xor.h +++ b/arch/arm/include/asm/xor.h | |||
@@ -7,7 +7,10 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/hardirq.h> | ||
10 | #include <asm-generic/xor.h> | 11 | #include <asm-generic/xor.h> |
12 | #include <asm/hwcap.h> | ||
13 | #include <asm/neon.h> | ||
11 | 14 | ||
12 | #define __XOR(a1, a2) a1 ^= a2 | 15 | #define __XOR(a1, a2) a1 ^= a2 |
13 | 16 | ||
@@ -138,4 +141,74 @@ static struct xor_block_template xor_block_arm4regs = { | |||
138 | xor_speed(&xor_block_arm4regs); \ | 141 | xor_speed(&xor_block_arm4regs); \ |
139 | xor_speed(&xor_block_8regs); \ | 142 | xor_speed(&xor_block_8regs); \ |
140 | xor_speed(&xor_block_32regs); \ | 143 | xor_speed(&xor_block_32regs); \ |
144 | NEON_TEMPLATES; \ | ||
141 | } while (0) | 145 | } while (0) |
146 | |||
147 | #ifdef CONFIG_KERNEL_MODE_NEON | ||
148 | |||
149 | extern struct xor_block_template const xor_block_neon_inner; | ||
150 | |||
151 | static void | ||
152 | xor_neon_2(unsigned long bytes, unsigned long *p1, unsigned long *p2) | ||
153 | { | ||
154 | if (in_interrupt()) { | ||
155 | xor_arm4regs_2(bytes, p1, p2); | ||
156 | } else { | ||
157 | kernel_neon_begin(); | ||
158 | xor_block_neon_inner.do_2(bytes, p1, p2); | ||
159 | kernel_neon_end(); | ||
160 | } | ||
161 | } | ||
162 | |||
163 | static void | ||
164 | xor_neon_3(unsigned long bytes, unsigned long *p1, unsigned long *p2, | ||
165 | unsigned long *p3) | ||
166 | { | ||
167 | if (in_interrupt()) { | ||
168 | xor_arm4regs_3(bytes, p1, p2, p3); | ||
169 | } else { | ||
170 | kernel_neon_begin(); | ||
171 | xor_block_neon_inner.do_3(bytes, p1, p2, p3); | ||
172 | kernel_neon_end(); | ||
173 | } | ||
174 | } | ||
175 | |||
176 | static void | ||
177 | xor_neon_4(unsigned long bytes, unsigned long *p1, unsigned long *p2, | ||
178 | unsigned long *p3, unsigned long *p4) | ||
179 | { | ||
180 | if (in_interrupt()) { | ||
181 | xor_arm4regs_4(bytes, p1, p2, p3, p4); | ||
182 | } else { | ||
183 | kernel_neon_begin(); | ||
184 | xor_block_neon_inner.do_4(bytes, p1, p2, p3, p4); | ||
185 | kernel_neon_end(); | ||
186 | } | ||
187 | } | ||
188 | |||
189 | static void | ||
190 | xor_neon_5(unsigned long bytes, unsigned long *p1, unsigned long *p2, | ||
191 | unsigned long *p3, unsigned long *p4, unsigned long *p5) | ||
192 | { | ||
193 | if (in_interrupt()) { | ||
194 | xor_arm4regs_5(bytes, p1, p2, p3, p4, p5); | ||
195 | } else { | ||
196 | kernel_neon_begin(); | ||
197 | xor_block_neon_inner.do_5(bytes, p1, p2, p3, p4, p5); | ||
198 | kernel_neon_end(); | ||
199 | } | ||
200 | } | ||
201 | |||
202 | static struct xor_block_template xor_block_neon = { | ||
203 | .name = "neon", | ||
204 | .do_2 = xor_neon_2, | ||
205 | .do_3 = xor_neon_3, | ||
206 | .do_4 = xor_neon_4, | ||
207 | .do_5 = xor_neon_5 | ||
208 | }; | ||
209 | |||
210 | #define NEON_TEMPLATES \ | ||
211 | do { if (cpu_has_neon()) xor_speed(&xor_block_neon); } while (0) | ||
212 | #else | ||
213 | #define NEON_TEMPLATES | ||
214 | #endif | ||
diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S new file mode 100644 index 000000000000..7a2baf913aa0 --- /dev/null +++ b/arch/arm/include/debug/8250.S | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * arch/arm/include/debug/8250.S | ||
3 | * | ||
4 | * Copyright (C) 1994-2013 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 | #include <linux/serial_reg.h> | ||
11 | |||
12 | .macro addruart, rp, rv, tmp | ||
13 | ldr \rp, =CONFIG_DEBUG_UART_PHYS | ||
14 | ldr \rv, =CONFIG_DEBUG_UART_VIRT | ||
15 | .endm | ||
16 | |||
17 | #ifdef CONFIG_DEBUG_UART_8250_WORD | ||
18 | .macro store, rd, rx:vararg | ||
19 | str \rd, \rx | ||
20 | .endm | ||
21 | |||
22 | .macro load, rd, rx:vararg | ||
23 | ldr \rd, \rx | ||
24 | .endm | ||
25 | #else | ||
26 | .macro store, rd, rx:vararg | ||
27 | strb \rd, \rx | ||
28 | .endm | ||
29 | |||
30 | .macro load, rd, rx:vararg | ||
31 | ldrb \rd, \rx | ||
32 | .endm | ||
33 | #endif | ||
34 | |||
35 | #define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT | ||
36 | |||
37 | .macro senduart,rd,rx | ||
38 | store \rd, [\rx, #UART_TX << UART_SHIFT] | ||
39 | .endm | ||
40 | |||
41 | .macro busyuart,rd,rx | ||
42 | 1002: load \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
43 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
44 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
45 | bne 1002b | ||
46 | .endm | ||
47 | |||
48 | .macro waituart,rd,rx | ||
49 | #ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL | ||
50 | 1001: load \rd, [\rx, #UART_MSR << UART_SHIFT] | ||
51 | tst \rd, #UART_MSR_CTS | ||
52 | beq 1001b | ||
53 | #endif | ||
54 | .endm | ||
diff --git a/arch/arm/include/debug/8250_32.S b/arch/arm/include/debug/8250_32.S deleted file mode 100644 index 8db01eeabbb4..000000000000 --- a/arch/arm/include/debug/8250_32.S +++ /dev/null | |||
@@ -1,27 +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 version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial_reg.h> | ||
13 | |||
14 | .macro senduart,rd,rx | ||
15 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
16 | .endm | ||
17 | |||
18 | .macro busyuart,rd,rx | ||
19 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
20 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
21 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
22 | bne 1002b | ||
23 | .endm | ||
24 | |||
25 | /* The UART's don't have any flow control IO's wired up. */ | ||
26 | .macro waituart,rd,rx | ||
27 | .endm | ||
diff --git a/arch/arm/include/debug/bcm2835.S b/arch/arm/include/debug/bcm2835.S deleted file mode 100644 index aed9199bd847..000000000000 --- a/arch/arm/include/debug/bcm2835.S +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 2010 Broadcom | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | */ | ||
13 | |||
14 | #define BCM2835_DEBUG_PHYS 0x20201000 | ||
15 | #define BCM2835_DEBUG_VIRT 0xf0201000 | ||
16 | |||
17 | .macro addruart, rp, rv, tmp | ||
18 | ldr \rp, =BCM2835_DEBUG_PHYS | ||
19 | ldr \rv, =BCM2835_DEBUG_VIRT | ||
20 | .endm | ||
21 | |||
22 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/include/debug/cns3xxx.S b/arch/arm/include/debug/cns3xxx.S deleted file mode 100644 index d04c150baa1c..000000000000 --- a/arch/arm/include/debug/cns3xxx.S +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright 1994-1999 Russell King | ||
5 | * Copyright 2008 Cavium Networks | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This file 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 | |||
13 | .macro addruart,rp,rv,tmp | ||
14 | mov \rp, #0x00009000 | ||
15 | orr \rv, \rp, #0xf0000000 @ virtual base | ||
16 | orr \rp, \rp, #0x10000000 | ||
17 | .endm | ||
18 | |||
19 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/include/debug/highbank.S b/arch/arm/include/debug/highbank.S deleted file mode 100644 index 8cad4322a5a2..000000000000 --- a/arch/arm/include/debug/highbank.S +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | |||
12 | .macro addruart,rp,rv,tmp | ||
13 | ldr \rv, =0xfee36000 | ||
14 | ldr \rp, =0xfff36000 | ||
15 | .endm | ||
16 | |||
17 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/include/debug/keystone.S b/arch/arm/include/debug/keystone.S deleted file mode 100644 index 9aef9ba3f4f0..000000000000 --- a/arch/arm/include/debug/keystone.S +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * Early serial debug output macro for Keystone SOCs | ||
3 | * | ||
4 | * Copyright 2013 Texas Instruments, Inc. | ||
5 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
6 | * | ||
7 | * Based on RMKs low level debug code. | ||
8 | * Copyright (C) 1994-1999 Russell King | ||
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 | |||
15 | #include <linux/serial_reg.h> | ||
16 | |||
17 | #define UART_SHIFT 2 | ||
18 | #if defined(CONFIG_DEBUG_KEYSTONE_UART0) | ||
19 | #define UART_PHYS 0x02530c00 | ||
20 | #define UART_VIRT 0xfeb30c00 | ||
21 | #elif defined(CONFIG_DEBUG_KEYSTONE_UART1) | ||
22 | #define UART_PHYS 0x02531000 | ||
23 | #define UART_VIRT 0xfeb31000 | ||
24 | #endif | ||
25 | |||
26 | .macro addruart, rp, rv, tmp | ||
27 | ldr \rv, =UART_VIRT @ physical base address | ||
28 | ldr \rp, =UART_PHYS @ virtual base address | ||
29 | .endm | ||
30 | |||
31 | .macro senduart,rd,rx | ||
32 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
33 | .endm | ||
34 | |||
35 | .macro busyuart,rd,rx | ||
36 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
37 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
38 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
39 | bne 1002b | ||
40 | .endm | ||
41 | |||
42 | .macro waituart,rd,rx | ||
43 | .endm | ||
diff --git a/arch/arm/include/debug/mvebu.S b/arch/arm/include/debug/mvebu.S deleted file mode 100644 index 6517311a1c91..000000000000 --- a/arch/arm/include/debug/mvebu.S +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * Early serial output macro for Marvell SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Lior Amsalem <alior@marvell.com> | ||
7 | * Gregory Clement <gregory.clement@free-electrons.com> | ||
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 | #ifdef CONFIG_DEBUG_MVEBU_UART_ALTERNATE | ||
15 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xf1000000 | ||
16 | #else | ||
17 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 | ||
18 | #endif | ||
19 | |||
20 | #define ARMADA_370_XP_REGS_VIRT_BASE 0xfec00000 | ||
21 | |||
22 | .macro addruart, rp, rv, tmp | ||
23 | ldr \rp, =ARMADA_370_XP_REGS_PHYS_BASE | ||
24 | ldr \rv, =ARMADA_370_XP_REGS_VIRT_BASE | ||
25 | orr \rp, \rp, #0x00012000 | ||
26 | orr \rv, \rv, #0x00012000 | ||
27 | .endm | ||
28 | |||
29 | #define UART_SHIFT 2 | ||
30 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/include/debug/mxs.S b/arch/arm/include/debug/mxs.S deleted file mode 100644 index d86951551ca1..000000000000 --- a/arch/arm/include/debug/mxs.S +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* arch/arm/mach-mxs/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | */ | ||
13 | |||
14 | #ifdef CONFIG_DEBUG_IMX23_UART | ||
15 | #define UART_PADDR 0x80070000 | ||
16 | #elif defined (CONFIG_DEBUG_IMX28_UART) | ||
17 | #define UART_PADDR 0x80074000 | ||
18 | #endif | ||
19 | |||
20 | #define UART_VADDR 0xfe100000 | ||
21 | |||
22 | .macro addruart, rp, rv, tmp | ||
23 | ldr \rp, =UART_PADDR @ physical | ||
24 | ldr \rv, =UART_VADDR @ virtual | ||
25 | .endm | ||
26 | |||
27 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/include/debug/nomadik.S b/arch/arm/include/debug/nomadik.S deleted file mode 100644 index 735417922ce2..000000000000 --- a/arch/arm/include/debug/nomadik.S +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | */ | ||
12 | |||
13 | .macro addruart, rp, rv, tmp | ||
14 | mov \rp, #0x00100000 | ||
15 | add \rp, \rp, #0x000fb000 | ||
16 | add \rv, \rp, #0xf0000000 @ virtual base | ||
17 | add \rp, \rp, #0x10000000 @ physical base address | ||
18 | .endm | ||
19 | |||
20 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/include/debug/nspire.S b/arch/arm/include/debug/nspire.S deleted file mode 100644 index 886fd276fcbc..000000000000 --- a/arch/arm/include/debug/nspire.S +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/include/debug/nspire.S | ||
3 | * | ||
4 | * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au> | ||
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 | |||
12 | #define NSPIRE_EARLY_UART_PHYS_BASE 0x90020000 | ||
13 | #define NSPIRE_EARLY_UART_VIRT_BASE 0xfee20000 | ||
14 | |||
15 | .macro addruart, rp, rv, tmp | ||
16 | ldr \rp, =(NSPIRE_EARLY_UART_PHYS_BASE) @ physical base address | ||
17 | ldr \rv, =(NSPIRE_EARLY_UART_VIRT_BASE) @ virtual base address | ||
18 | .endm | ||
19 | |||
20 | |||
21 | #ifdef CONFIG_DEBUG_NSPIRE_CX_UART | ||
22 | #include <asm/hardware/debug-pl01x.S> | ||
23 | #endif | ||
24 | |||
25 | #ifdef CONFIG_DEBUG_NSPIRE_CLASSIC_UART | ||
26 | #define UART_SHIFT 2 | ||
27 | #include <asm/hardware/debug-8250.S> | ||
28 | #endif | ||
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S deleted file mode 100644 index bc1f07c49cd4..000000000000 --- a/arch/arm/include/debug/picoxcell.S +++ /dev/null | |||
@@ -1,19 +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 version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #define UART_SHIFT 2 | ||
11 | #define PICOXCELL_UART1_BASE 0x80230000 | ||
12 | #define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000) | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE) | ||
16 | ldr \rp, =PICOXCELL_UART1_BASE | ||
17 | .endm | ||
18 | |||
19 | #include "8250_32.S" | ||
diff --git a/arch/arm/include/asm/hardware/debug-pl01x.S b/arch/arm/include/debug/pl01x.S index f9fd083eff63..37c6895b87e6 100644 --- a/arch/arm/include/asm/hardware/debug-pl01x.S +++ b/arch/arm/include/debug/pl01x.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* arch/arm/include/asm/hardware/debug-pl01x.S | 1 | /* arch/arm/include/debug/pl01x.S |
2 | * | 2 | * |
3 | * Debugging macro include header | 3 | * Debugging macro include header |
4 | * | 4 | * |
@@ -12,6 +12,13 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/amba/serial.h> | 13 | #include <linux/amba/serial.h> |
14 | 14 | ||
15 | #ifdef CONFIG_DEBUG_UART_PHYS | ||
16 | .macro addruart, rp, rv, tmp | ||
17 | ldr \rp, =CONFIG_DEBUG_UART_PHYS | ||
18 | ldr \rv, =CONFIG_DEBUG_UART_VIRT | ||
19 | .endm | ||
20 | #endif | ||
21 | |||
15 | .macro senduart,rd,rx | 22 | .macro senduart,rd,rx |
16 | strb \rd, [\rx, #UART01x_DR] | 23 | strb \rd, [\rx, #UART01x_DR] |
17 | .endm | 24 | .endm |
diff --git a/arch/arm/include/debug/pxa.S b/arch/arm/include/debug/pxa.S deleted file mode 100644 index e1e795aa3d7f..000000000000 --- a/arch/arm/include/debug/pxa.S +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * Early serial output macro for Marvell PXA/MMP SoC | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
6 | * | ||
7 | * Copyright (C) 2013 Haojian Zhuang | ||
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 | #if defined(CONFIG_DEBUG_PXA_UART1) | ||
15 | #define PXA_UART_REG_PHYS_BASE 0x40100000 | ||
16 | #define PXA_UART_REG_VIRT_BASE 0xf2100000 | ||
17 | #elif defined(CONFIG_DEBUG_MMP_UART2) | ||
18 | #define PXA_UART_REG_PHYS_BASE 0xd4017000 | ||
19 | #define PXA_UART_REG_VIRT_BASE 0xfe017000 | ||
20 | #elif defined(CONFIG_DEBUG_MMP_UART3) | ||
21 | #define PXA_UART_REG_PHYS_BASE 0xd4018000 | ||
22 | #define PXA_UART_REG_VIRT_BASE 0xfe018000 | ||
23 | #else | ||
24 | #error "Select uart for DEBUG_LL" | ||
25 | #endif | ||
26 | |||
27 | .macro addruart, rp, rv, tmp | ||
28 | ldr \rp, =PXA_UART_REG_PHYS_BASE | ||
29 | ldr \rv, =PXA_UART_REG_VIRT_BASE | ||
30 | .endm | ||
31 | |||
32 | #define UART_SHIFT 2 | ||
33 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/include/debug/rockchip.S b/arch/arm/include/debug/rockchip.S deleted file mode 100644 index cfd883e69588..000000000000 --- a/arch/arm/include/debug/rockchip.S +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Early serial output macro for Rockchip SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.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 | |||
13 | #if defined(CONFIG_DEBUG_RK29_UART0) | ||
14 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20060000 | ||
15 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed60000 | ||
16 | #elif defined(CONFIG_DEBUG_RK29_UART1) | ||
17 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000 | ||
18 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000 | ||
19 | #elif defined(CONFIG_DEBUG_RK29_UART2) | ||
20 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000 | ||
21 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000 | ||
22 | #elif defined(CONFIG_DEBUG_RK3X_UART0) | ||
23 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10124000 | ||
24 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb24000 | ||
25 | #elif defined(CONFIG_DEBUG_RK3X_UART1) | ||
26 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10126000 | ||
27 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb26000 | ||
28 | #elif defined(CONFIG_DEBUG_RK3X_UART2) | ||
29 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000 | ||
30 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000 | ||
31 | #elif defined(CONFIG_DEBUG_RK3X_UART3) | ||
32 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000 | ||
33 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000 | ||
34 | #endif | ||
35 | |||
36 | .macro addruart, rp, rv, tmp | ||
37 | ldr \rp, =ROCKCHIP_UART_DEBUG_PHYS_BASE | ||
38 | ldr \rv, =ROCKCHIP_UART_DEBUG_VIRT_BASE | ||
39 | .endm | ||
40 | |||
41 | #define UART_SHIFT 2 | ||
42 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S deleted file mode 100644 index 966b2f994946..000000000000 --- a/arch/arm/include/debug/socfpga.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1994-1999 Russell King | ||
3 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | |||
10 | #define UART_SHIFT 2 | ||
11 | #define DEBUG_LL_UART_OFFSET 0x00002000 | ||
12 | |||
13 | .macro addruart, rp, rv, tmp | ||
14 | mov \rp, #DEBUG_LL_UART_OFFSET | ||
15 | orr \rp, \rp, #0x00c00000 | ||
16 | orr \rv, \rp, #0xfe000000 @ virtual base | ||
17 | orr \rp, \rp, #0xff000000 @ physical base | ||
18 | .endm | ||
19 | |||
20 | #include "8250_32.S" | ||
21 | |||
diff --git a/arch/arm/include/debug/sunxi.S b/arch/arm/include/debug/sunxi.S deleted file mode 100644 index 04eb56d5db2c..000000000000 --- a/arch/arm/include/debug/sunxi.S +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * Early serial output macro for Allwinner A1X SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.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 | |||
13 | #if defined(CONFIG_DEBUG_SUNXI_UART0) | ||
14 | #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28000 | ||
15 | #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28000 | ||
16 | #elif defined(CONFIG_DEBUG_SUNXI_UART1) | ||
17 | #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400 | ||
18 | #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400 | ||
19 | #endif | ||
20 | |||
21 | .macro addruart, rp, rv, tmp | ||
22 | ldr \rp, =SUNXI_UART_DEBUG_PHYS_BASE | ||
23 | ldr \rv, =SUNXI_UART_DEBUG_VIRT_BASE | ||
24 | .endm | ||
25 | |||
26 | #define UART_SHIFT 2 | ||
27 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/include/debug/tegra.S b/arch/arm/include/debug/tegra.S index 883d7c22fd9d..be6a720dd183 100644 --- a/arch/arm/include/debug/tegra.S +++ b/arch/arm/include/debug/tegra.S | |||
@@ -221,3 +221,32 @@ | |||
221 | 1002: | 221 | 1002: |
222 | #endif | 222 | #endif |
223 | .endm | 223 | .endm |
224 | |||
225 | /* | ||
226 | * Storage for the state maintained by the macros above. | ||
227 | * | ||
228 | * In the kernel proper, this data is located in arch/arm/mach-tegra/common.c. | ||
229 | * That's because this header is included from multiple files, and we only | ||
230 | * want a single copy of the data. In particular, the UART probing code above | ||
231 | * assumes it's running using physical addresses. This is true when this file | ||
232 | * is included from head.o, but not when included from debug.o. So we need | ||
233 | * to share the probe results between the two copies, rather than having | ||
234 | * to re-run the probing again later. | ||
235 | * | ||
236 | * In the decompressor, we put the symbol/storage right here, since common.c | ||
237 | * isn't included in the decompressor build. This symbol gets put in .text | ||
238 | * even though it's really data, since .data is discarded from the | ||
239 | * decompressor. Luckily, .text is writeable in the decompressor, unless | ||
240 | * CONFIG_ZBOOT_ROM. That dependency is handled in arch/arm/Kconfig.debug. | ||
241 | */ | ||
242 | #if defined(ZIMAGE) | ||
243 | tegra_uart_config: | ||
244 | /* Debug UART initialization required */ | ||
245 | .word 1 | ||
246 | /* Debug UART physical address */ | ||
247 | .word 0 | ||
248 | /* Debug UART virtual address */ | ||
249 | .word 0 | ||
250 | /* Scratch space for debug macro */ | ||
251 | .word 0 | ||
252 | #endif | ||
diff --git a/arch/arm/include/debug/u300.S b/arch/arm/include/debug/u300.S deleted file mode 100644 index 6f04f08a203c..000000000000 --- a/arch/arm/include/debug/u300.S +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2013 ST-Ericsson AB | ||
3 | * License terms: GNU General Public License (GPL) version 2 | ||
4 | * Debugging macro include header. | ||
5 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
6 | */ | ||
7 | #define U300_SLOW_PER_PHYS_BASE 0xc0010000 | ||
8 | #define U300_SLOW_PER_VIRT_BASE 0xff000000 | ||
9 | |||
10 | .macro addruart, rp, rv, tmp | ||
11 | /* If we move the address using MMU, use this. */ | ||
12 | ldr \rp, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address | ||
13 | ldr \rv, = U300_SLOW_PER_VIRT_BASE @ MMU on, virtual address | ||
14 | orr \rp, \rp, #0x00003000 | ||
15 | orr \rv, \rv, #0x00003000 | ||
16 | .endm | ||
17 | |||
18 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/include/debug/ux500.S b/arch/arm/include/debug/ux500.S index fbd24beeb1fa..aa7f63a8b5e0 100644 --- a/arch/arm/include/debug/ux500.S +++ b/arch/arm/include/debug/ux500.S | |||
@@ -45,4 +45,4 @@ | |||
45 | ldr \rv, =UART_VIRT_BASE @ yes, virtual address | 45 | ldr \rv, =UART_VIRT_BASE @ yes, virtual address |
46 | .endm | 46 | .endm |
47 | 47 | ||
48 | #include <asm/hardware/debug-pl01x.S> | 48 | #include <debug/pl01x.S> |
diff --git a/arch/arm/include/debug/vexpress.S b/arch/arm/include/debug/vexpress.S index acafb229e2b6..524acd5a223e 100644 --- a/arch/arm/include/debug/vexpress.S +++ b/arch/arm/include/debug/vexpress.S | |||
@@ -47,51 +47,5 @@ | |||
47 | 47 | ||
48 | .endm | 48 | .endm |
49 | 49 | ||
50 | #include <asm/hardware/debug-pl01x.S> | 50 | #include <debug/pl01x.S> |
51 | |||
52 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9) | ||
53 | |||
54 | .macro addruart,rp,rv,tmp | ||
55 | mov \rp, #DEBUG_LL_UART_OFFSET | ||
56 | orr \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
57 | orr \rp, \rp, #DEBUG_LL_PHYS_BASE | ||
58 | .endm | ||
59 | |||
60 | #include <asm/hardware/debug-pl01x.S> | ||
61 | |||
62 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1) | ||
63 | |||
64 | .macro addruart,rp,rv,tmp | ||
65 | mov \rp, #DEBUG_LL_UART_OFFSET_RS1 | ||
66 | orr \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
67 | orr \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1 | ||
68 | .endm | ||
69 | |||
70 | #include <asm/hardware/debug-pl01x.S> | ||
71 | |||
72 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CRX) | ||
73 | |||
74 | .macro addruart,rp,tmp,tmp2 | ||
75 | ldr \rp, =DEBUG_LL_UART_PHYS_CRX | ||
76 | .endm | ||
77 | |||
78 | #include <asm/hardware/debug-pl01x.S> | ||
79 | |||
80 | #else /* CONFIG_DEBUG_LL_UART_NONE */ | ||
81 | |||
82 | .macro addruart, rp, rv, tmp | ||
83 | /* Safe dummy values */ | ||
84 | mov \rp, #0 | ||
85 | mov \rv, #DEBUG_LL_VIRT_BASE | ||
86 | .endm | ||
87 | |||
88 | .macro senduart,rd,rx | ||
89 | .endm | ||
90 | |||
91 | .macro waituart,rd,rx | ||
92 | .endm | ||
93 | |||
94 | .macro busyuart,rd,rx | ||
95 | .endm | ||
96 | |||
97 | #endif | 51 | #endif |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 86d10dd47dc4..5140df5f23aa 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -24,7 +24,7 @@ obj-$(CONFIG_ATAGS_PROC) += atags_proc.o | |||
24 | obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o | 24 | obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o |
25 | 25 | ||
26 | ifeq ($(CONFIG_CPU_V7M),y) | 26 | ifeq ($(CONFIG_CPU_V7M),y) |
27 | obj-y += entry-v7m.o | 27 | obj-y += entry-v7m.o v7m.o |
28 | else | 28 | else |
29 | obj-y += entry-armv.o | 29 | obj-y += entry-armv.o |
30 | endif | 30 | endif |
diff --git a/arch/arm/kernel/atags.h b/arch/arm/kernel/atags.h index 9edc9692332d..ec4164da6e30 100644 --- a/arch/arm/kernel/atags.h +++ b/arch/arm/kernel/atags.h | |||
@@ -7,9 +7,10 @@ static inline void save_atags(struct tag *tags) { } | |||
7 | void convert_to_tag_list(struct tag *tags); | 7 | void convert_to_tag_list(struct tag *tags); |
8 | 8 | ||
9 | #ifdef CONFIG_ATAGS | 9 | #ifdef CONFIG_ATAGS |
10 | struct machine_desc *setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr); | 10 | const struct machine_desc *setup_machine_tags(phys_addr_t __atags_pointer, |
11 | unsigned int machine_nr); | ||
11 | #else | 12 | #else |
12 | static inline struct machine_desc * | 13 | static inline const struct machine_desc * |
13 | setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr) | 14 | setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr) |
14 | { | 15 | { |
15 | early_print("no ATAGS support: can't continue\n"); | 16 | early_print("no ATAGS support: can't continue\n"); |
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c index 14512e6931d8..8c14de8180c0 100644 --- a/arch/arm/kernel/atags_parse.c +++ b/arch/arm/kernel/atags_parse.c | |||
@@ -178,11 +178,11 @@ static void __init squash_mem_tags(struct tag *tag) | |||
178 | tag->hdr.tag = ATAG_NONE; | 178 | tag->hdr.tag = ATAG_NONE; |
179 | } | 179 | } |
180 | 180 | ||
181 | struct machine_desc * __init setup_machine_tags(phys_addr_t __atags_pointer, | 181 | const struct machine_desc * __init |
182 | unsigned int machine_nr) | 182 | setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr) |
183 | { | 183 | { |
184 | struct tag *tags = (struct tag *)&default_tags; | 184 | struct tag *tags = (struct tag *)&default_tags; |
185 | struct machine_desc *mdesc = NULL, *p; | 185 | const struct machine_desc *mdesc = NULL, *p; |
186 | char *from = default_command_line; | 186 | char *from = default_command_line; |
187 | 187 | ||
188 | default_tags.mem.start = PHYS_OFFSET; | 188 | default_tags.mem.start = PHYS_OFFSET; |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index 2ee8a17d2b01..f35906b3d8c9 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c | |||
@@ -181,10 +181,10 @@ bool arch_match_cpu_phys_id(int cpu, u64 phys_id) | |||
181 | * If a dtb was passed to the kernel in r2, then use it to choose the | 181 | * If a dtb was passed to the kernel in r2, then use it to choose the |
182 | * correct machine_desc and to setup the system. | 182 | * correct machine_desc and to setup the system. |
183 | */ | 183 | */ |
184 | struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) | 184 | const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) |
185 | { | 185 | { |
186 | struct boot_param_header *devtree; | 186 | struct boot_param_header *devtree; |
187 | struct machine_desc *mdesc, *mdesc_best = NULL; | 187 | const struct machine_desc *mdesc, *mdesc_best = NULL; |
188 | unsigned int score, mdesc_score = ~1; | 188 | unsigned int score, mdesc_score = ~1; |
189 | unsigned long dt_root; | 189 | unsigned long dt_root; |
190 | const char *model; | 190 | const char *model; |
@@ -193,7 +193,7 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) | |||
193 | DT_MACHINE_START(GENERIC_DT, "Generic DT based system") | 193 | DT_MACHINE_START(GENERIC_DT, "Generic DT based system") |
194 | MACHINE_END | 194 | MACHINE_END |
195 | 195 | ||
196 | mdesc_best = (struct machine_desc *)&__mach_desc_GENERIC_DT; | 196 | mdesc_best = &__mach_desc_GENERIC_DT; |
197 | #endif | 197 | #endif |
198 | 198 | ||
199 | if (!dt_phys) | 199 | if (!dt_phys) |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 94104bf69719..74ad15d1a065 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -442,10 +442,10 @@ local_restart: | |||
442 | ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine | 442 | ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine |
443 | 443 | ||
444 | add r1, sp, #S_OFF | 444 | add r1, sp, #S_OFF |
445 | 2: mov why, #0 @ no longer a real syscall | ||
446 | cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE) | 445 | cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE) |
447 | eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back | 446 | eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back |
448 | bcs arm_syscall | 447 | bcs arm_syscall |
448 | 2: mov why, #0 @ no longer a real syscall | ||
449 | b sys_ni_syscall @ not private func | 449 | b sys_ni_syscall @ not private func |
450 | 450 | ||
451 | #if defined(CONFIG_OABI_COMPAT) || !defined(CONFIG_AEABI) | 451 | #if defined(CONFIG_OABI_COMPAT) || !defined(CONFIG_AEABI) |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 85c3fb6c93c2..084dc8896986 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -292,12 +292,20 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, | |||
292 | maps[ARM_SEC_CORE].unw_sec = s; | 292 | maps[ARM_SEC_CORE].unw_sec = s; |
293 | else if (strcmp(".ARM.exidx.exit.text", secname) == 0) | 293 | else if (strcmp(".ARM.exidx.exit.text", secname) == 0) |
294 | maps[ARM_SEC_EXIT].unw_sec = s; | 294 | maps[ARM_SEC_EXIT].unw_sec = s; |
295 | else if (strcmp(".ARM.exidx.text.unlikely", secname) == 0) | ||
296 | maps[ARM_SEC_UNLIKELY].unw_sec = s; | ||
297 | else if (strcmp(".ARM.exidx.text.hot", secname) == 0) | ||
298 | maps[ARM_SEC_HOT].unw_sec = s; | ||
295 | else if (strcmp(".init.text", secname) == 0) | 299 | else if (strcmp(".init.text", secname) == 0) |
296 | maps[ARM_SEC_INIT].txt_sec = s; | 300 | maps[ARM_SEC_INIT].txt_sec = s; |
297 | else if (strcmp(".text", secname) == 0) | 301 | else if (strcmp(".text", secname) == 0) |
298 | maps[ARM_SEC_CORE].txt_sec = s; | 302 | maps[ARM_SEC_CORE].txt_sec = s; |
299 | else if (strcmp(".exit.text", secname) == 0) | 303 | else if (strcmp(".exit.text", secname) == 0) |
300 | maps[ARM_SEC_EXIT].txt_sec = s; | 304 | maps[ARM_SEC_EXIT].txt_sec = s; |
305 | else if (strcmp(".text.unlikely", secname) == 0) | ||
306 | maps[ARM_SEC_UNLIKELY].txt_sec = s; | ||
307 | else if (strcmp(".text.hot", secname) == 0) | ||
308 | maps[ARM_SEC_HOT].txt_sec = s; | ||
301 | } | 309 | } |
302 | 310 | ||
303 | for (i = 0; i < ARM_SEC_MAX; i++) | 311 | for (i = 0; i < ARM_SEC_MAX; i++) |
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index aebe0e99c153..8d6147b2001f 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
@@ -118,7 +118,8 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler) | |||
118 | continue; | 118 | continue; |
119 | } | 119 | } |
120 | 120 | ||
121 | err = request_irq(irq, handler, IRQF_NOBALANCING, "arm-pmu", | 121 | err = request_irq(irq, handler, |
122 | IRQF_NOBALANCING | IRQF_NO_THREAD, "arm-pmu", | ||
122 | cpu_pmu); | 123 | cpu_pmu); |
123 | if (err) { | 124 | if (err) { |
124 | pr_err("unable to request IRQ%d for ARM PMU counters\n", | 125 | pr_err("unable to request IRQ%d for ARM PMU counters\n", |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index afc2489ee13b..0e1e2b3afa45 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -72,10 +72,10 @@ static int __init fpe_setup(char *line) | |||
72 | __setup("fpe=", fpe_setup); | 72 | __setup("fpe=", fpe_setup); |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | extern void paging_init(struct machine_desc *desc); | 75 | extern void paging_init(const struct machine_desc *desc); |
76 | extern void sanity_check_meminfo(void); | 76 | extern void sanity_check_meminfo(void); |
77 | extern enum reboot_mode reboot_mode; | 77 | extern enum reboot_mode reboot_mode; |
78 | extern void setup_dma_zone(struct machine_desc *desc); | 78 | extern void setup_dma_zone(const struct machine_desc *desc); |
79 | 79 | ||
80 | unsigned int processor_id; | 80 | unsigned int processor_id; |
81 | EXPORT_SYMBOL(processor_id); | 81 | EXPORT_SYMBOL(processor_id); |
@@ -139,7 +139,7 @@ EXPORT_SYMBOL(elf_platform); | |||
139 | static const char *cpu_name; | 139 | static const char *cpu_name; |
140 | static const char *machine_name; | 140 | static const char *machine_name; |
141 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; | 141 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; |
142 | struct machine_desc *machine_desc __initdata; | 142 | const struct machine_desc *machine_desc __initdata; |
143 | 143 | ||
144 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; | 144 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; |
145 | #define ENDIANNESS ((char)endian_test.l) | 145 | #define ENDIANNESS ((char)endian_test.l) |
@@ -607,7 +607,7 @@ static void __init setup_processor(void) | |||
607 | 607 | ||
608 | void __init dump_machine_table(void) | 608 | void __init dump_machine_table(void) |
609 | { | 609 | { |
610 | struct machine_desc *p; | 610 | const struct machine_desc *p; |
611 | 611 | ||
612 | early_print("Available machine support:\n\nID (hex)\tNAME\n"); | 612 | early_print("Available machine support:\n\nID (hex)\tNAME\n"); |
613 | for_each_machine_desc(p) | 613 | for_each_machine_desc(p) |
@@ -694,7 +694,7 @@ static int __init early_mem(char *p) | |||
694 | } | 694 | } |
695 | early_param("mem", early_mem); | 695 | early_param("mem", early_mem); |
696 | 696 | ||
697 | static void __init request_standard_resources(struct machine_desc *mdesc) | 697 | static void __init request_standard_resources(const struct machine_desc *mdesc) |
698 | { | 698 | { |
699 | struct memblock_region *region; | 699 | struct memblock_region *region; |
700 | struct resource *res; | 700 | struct resource *res; |
@@ -852,7 +852,7 @@ void __init hyp_mode_check(void) | |||
852 | 852 | ||
853 | void __init setup_arch(char **cmdline_p) | 853 | void __init setup_arch(char **cmdline_p) |
854 | { | 854 | { |
855 | struct machine_desc *mdesc; | 855 | const struct machine_desc *mdesc; |
856 | 856 | ||
857 | setup_processor(); | 857 | setup_processor(); |
858 | mdesc = setup_machine_fdt(__atags_pointer); | 858 | mdesc = setup_machine_fdt(__atags_pointer); |
@@ -994,15 +994,6 @@ static int c_show(struct seq_file *m, void *v) | |||
994 | seq_printf(m, "model name\t: %s rev %d (%s)\n", | 994 | seq_printf(m, "model name\t: %s rev %d (%s)\n", |
995 | cpu_name, cpuid & 15, elf_platform); | 995 | cpu_name, cpuid & 15, elf_platform); |
996 | 996 | ||
997 | #if defined(CONFIG_SMP) | ||
998 | seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", | ||
999 | per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ), | ||
1000 | (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100); | ||
1001 | #else | ||
1002 | seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", | ||
1003 | loops_per_jiffy / (500000/HZ), | ||
1004 | (loops_per_jiffy / (5000/HZ)) % 100); | ||
1005 | #endif | ||
1006 | /* dump out the processor features */ | 997 | /* dump out the processor features */ |
1007 | seq_puts(m, "Features\t: "); | 998 | seq_puts(m, "Features\t: "); |
1008 | 999 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 2dc19349eb19..92d10e503746 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -398,17 +398,8 @@ asmlinkage void secondary_start_kernel(void) | |||
398 | 398 | ||
399 | void __init smp_cpus_done(unsigned int max_cpus) | 399 | void __init smp_cpus_done(unsigned int max_cpus) |
400 | { | 400 | { |
401 | int cpu; | 401 | printk(KERN_INFO "SMP: Total of %d processors activated.\n", |
402 | unsigned long bogosum = 0; | 402 | num_online_cpus()); |
403 | |||
404 | for_each_online_cpu(cpu) | ||
405 | bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy; | ||
406 | |||
407 | printk(KERN_INFO "SMP: Total of %d processors activated " | ||
408 | "(%lu.%02lu BogoMIPS).\n", | ||
409 | num_online_cpus(), | ||
410 | bogosum / (500000/HZ), | ||
411 | (bogosum / (5000/HZ)) % 100); | ||
412 | 403 | ||
413 | hyp_mode_check(); | 404 | hyp_mode_check(); |
414 | } | 405 | } |
diff --git a/arch/arm/kernel/smp_tlb.c b/arch/arm/kernel/smp_tlb.c index c2edfff573c2..83ccca303df8 100644 --- a/arch/arm/kernel/smp_tlb.c +++ b/arch/arm/kernel/smp_tlb.c | |||
@@ -104,7 +104,7 @@ void flush_tlb_all(void) | |||
104 | if (tlb_ops_need_broadcast()) | 104 | if (tlb_ops_need_broadcast()) |
105 | on_each_cpu(ipi_flush_tlb_all, NULL, 1); | 105 | on_each_cpu(ipi_flush_tlb_all, NULL, 1); |
106 | else | 106 | else |
107 | local_flush_tlb_all(); | 107 | __flush_tlb_all(); |
108 | broadcast_tlb_a15_erratum(); | 108 | broadcast_tlb_a15_erratum(); |
109 | } | 109 | } |
110 | 110 | ||
@@ -113,7 +113,7 @@ void flush_tlb_mm(struct mm_struct *mm) | |||
113 | if (tlb_ops_need_broadcast()) | 113 | if (tlb_ops_need_broadcast()) |
114 | on_each_cpu_mask(mm_cpumask(mm), ipi_flush_tlb_mm, mm, 1); | 114 | on_each_cpu_mask(mm_cpumask(mm), ipi_flush_tlb_mm, mm, 1); |
115 | else | 115 | else |
116 | local_flush_tlb_mm(mm); | 116 | __flush_tlb_mm(mm); |
117 | broadcast_tlb_mm_a15_erratum(mm); | 117 | broadcast_tlb_mm_a15_erratum(mm); |
118 | } | 118 | } |
119 | 119 | ||
@@ -126,7 +126,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
126 | on_each_cpu_mask(mm_cpumask(vma->vm_mm), ipi_flush_tlb_page, | 126 | on_each_cpu_mask(mm_cpumask(vma->vm_mm), ipi_flush_tlb_page, |
127 | &ta, 1); | 127 | &ta, 1); |
128 | } else | 128 | } else |
129 | local_flush_tlb_page(vma, uaddr); | 129 | __flush_tlb_page(vma, uaddr); |
130 | broadcast_tlb_mm_a15_erratum(vma->vm_mm); | 130 | broadcast_tlb_mm_a15_erratum(vma->vm_mm); |
131 | } | 131 | } |
132 | 132 | ||
@@ -137,7 +137,7 @@ void flush_tlb_kernel_page(unsigned long kaddr) | |||
137 | ta.ta_start = kaddr; | 137 | ta.ta_start = kaddr; |
138 | on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1); | 138 | on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1); |
139 | } else | 139 | } else |
140 | local_flush_tlb_kernel_page(kaddr); | 140 | __flush_tlb_kernel_page(kaddr); |
141 | broadcast_tlb_a15_erratum(); | 141 | broadcast_tlb_a15_erratum(); |
142 | } | 142 | } |
143 | 143 | ||
@@ -173,5 +173,5 @@ void flush_bp_all(void) | |||
173 | if (tlb_ops_need_broadcast()) | 173 | if (tlb_ops_need_broadcast()) |
174 | on_each_cpu(ipi_flush_bp_all, NULL, 1); | 174 | on_each_cpu(ipi_flush_bp_all, NULL, 1); |
175 | else | 175 | else |
176 | local_flush_bp_all(); | 176 | __flush_bp_all(); |
177 | } | 177 | } |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index ab517fcce21b..8fcda140358d 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -497,28 +497,64 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
497 | return regs->ARM_r0; | 497 | return regs->ARM_r0; |
498 | } | 498 | } |
499 | 499 | ||
500 | static long do_cache_op_restart(struct restart_block *); | ||
501 | |||
500 | static inline int | 502 | static inline int |
501 | do_cache_op(unsigned long start, unsigned long end, int flags) | 503 | __do_cache_op(unsigned long start, unsigned long end) |
502 | { | 504 | { |
503 | struct mm_struct *mm = current->active_mm; | 505 | int ret; |
504 | struct vm_area_struct *vma; | 506 | unsigned long chunk = PAGE_SIZE; |
507 | |||
508 | do { | ||
509 | if (signal_pending(current)) { | ||
510 | struct thread_info *ti = current_thread_info(); | ||
511 | |||
512 | ti->restart_block = (struct restart_block) { | ||
513 | .fn = do_cache_op_restart, | ||
514 | }; | ||
515 | |||
516 | ti->arm_restart_block = (struct arm_restart_block) { | ||
517 | { | ||
518 | .cache = { | ||
519 | .start = start, | ||
520 | .end = end, | ||
521 | }, | ||
522 | }, | ||
523 | }; | ||
524 | |||
525 | return -ERESTART_RESTARTBLOCK; | ||
526 | } | ||
527 | |||
528 | ret = flush_cache_user_range(start, start + chunk); | ||
529 | if (ret) | ||
530 | return ret; | ||
505 | 531 | ||
532 | cond_resched(); | ||
533 | start += chunk; | ||
534 | } while (start < end); | ||
535 | |||
536 | return 0; | ||
537 | } | ||
538 | |||
539 | static long do_cache_op_restart(struct restart_block *unused) | ||
540 | { | ||
541 | struct arm_restart_block *restart_block; | ||
542 | |||
543 | restart_block = ¤t_thread_info()->arm_restart_block; | ||
544 | return __do_cache_op(restart_block->cache.start, | ||
545 | restart_block->cache.end); | ||
546 | } | ||
547 | |||
548 | static inline int | ||
549 | do_cache_op(unsigned long start, unsigned long end, int flags) | ||
550 | { | ||
506 | if (end < start || flags) | 551 | if (end < start || flags) |
507 | return -EINVAL; | 552 | return -EINVAL; |
508 | 553 | ||
509 | down_read(&mm->mmap_sem); | 554 | if (!access_ok(VERIFY_READ, start, end - start)) |
510 | vma = find_vma(mm, start); | 555 | return -EFAULT; |
511 | if (vma && vma->vm_start < end) { | ||
512 | if (start < vma->vm_start) | ||
513 | start = vma->vm_start; | ||
514 | if (end > vma->vm_end) | ||
515 | end = vma->vm_end; | ||
516 | 556 | ||
517 | up_read(&mm->mmap_sem); | 557 | return __do_cache_op(start, end); |
518 | return flush_cache_user_range(start, end); | ||
519 | } | ||
520 | up_read(&mm->mmap_sem); | ||
521 | return -EINVAL; | ||
522 | } | 558 | } |
523 | 559 | ||
524 | /* | 560 | /* |
diff --git a/arch/arm/kernel/v7m.c b/arch/arm/kernel/v7m.c new file mode 100644 index 000000000000..4d2cba94f5cc --- /dev/null +++ b/arch/arm/kernel/v7m.c | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Uwe Kleine-Koenig for Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it under | ||
5 | * the terms of the GNU General Public License version 2 as published by the | ||
6 | * Free Software Foundation. | ||
7 | */ | ||
8 | #include <linux/io.h> | ||
9 | #include <linux/reboot.h> | ||
10 | #include <asm/barrier.h> | ||
11 | #include <asm/v7m.h> | ||
12 | |||
13 | void armv7m_restart(enum reboot_mode mode, const char *cmd) | ||
14 | { | ||
15 | dsb(); | ||
16 | __raw_writel(V7M_SCB_AIRCR_VECTKEY | V7M_SCB_AIRCR_SYSRESETREQ, | ||
17 | BASEADDR_V7M_SCB + V7M_SCB_AIRCR); | ||
18 | dsb(); | ||
19 | } | ||
diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S index f048338135f7..1b9844d369cc 100644 --- a/arch/arm/kvm/init.S +++ b/arch/arm/kvm/init.S | |||
@@ -142,7 +142,7 @@ target: @ We're now in the trampoline code, switch page tables | |||
142 | 142 | ||
143 | @ Invalidate the old TLBs | 143 | @ Invalidate the old TLBs |
144 | mcr p15, 4, r0, c8, c7, 0 @ TLBIALLH | 144 | mcr p15, 4, r0, c8, c7, 0 @ TLBIALLH |
145 | dsb | 145 | dsb ish |
146 | 146 | ||
147 | eret | 147 | eret |
148 | 148 | ||
diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index 85dd84b10687..ddc15539bad2 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S | |||
@@ -55,7 +55,7 @@ ENTRY(__kvm_tlb_flush_vmid_ipa) | |||
55 | mcrr p15, 6, r2, r3, c2 @ Write VTTBR | 55 | mcrr p15, 6, r2, r3, c2 @ Write VTTBR |
56 | isb | 56 | isb |
57 | mcr p15, 0, r0, c8, c3, 0 @ TLBIALLIS (rt ignored) | 57 | mcr p15, 0, r0, c8, c3, 0 @ TLBIALLIS (rt ignored) |
58 | dsb | 58 | dsb ish |
59 | isb | 59 | isb |
60 | mov r2, #0 | 60 | mov r2, #0 |
61 | mov r3, #0 | 61 | mov r3, #0 |
@@ -79,7 +79,7 @@ ENTRY(__kvm_flush_vm_context) | |||
79 | mcr p15, 4, r0, c8, c3, 4 | 79 | mcr p15, 4, r0, c8, c3, 4 |
80 | /* Invalidate instruction caches Inner Shareable (ICIALLUIS) */ | 80 | /* Invalidate instruction caches Inner Shareable (ICIALLUIS) */ |
81 | mcr p15, 0, r0, c7, c1, 0 | 81 | mcr p15, 0, r0, c7, c1, 0 |
82 | dsb | 82 | dsb ish |
83 | isb @ Not necessary if followed by eret | 83 | isb @ Not necessary if followed by eret |
84 | 84 | ||
85 | bx lr | 85 | bx lr |
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 0988d9e04dd4..b0de86b56c13 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c | |||
@@ -489,7 +489,6 @@ int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa, | |||
489 | 489 | ||
490 | for (addr = guest_ipa; addr < end; addr += PAGE_SIZE) { | 490 | for (addr = guest_ipa; addr < end; addr += PAGE_SIZE) { |
491 | pte_t pte = pfn_pte(pfn, PAGE_S2_DEVICE); | 491 | pte_t pte = pfn_pte(pfn, PAGE_S2_DEVICE); |
492 | kvm_set_s2pte_writable(&pte); | ||
493 | 492 | ||
494 | ret = mmu_topup_memory_cache(&cache, 2, 2); | 493 | ret = mmu_topup_memory_cache(&cache, 2, 2); |
495 | if (ret) | 494 | if (ret) |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index af72969820b4..aaf3a8731136 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -45,3 +45,9 @@ lib-$(CONFIG_ARCH_SHARK) += io-shark.o | |||
45 | 45 | ||
46 | $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S | 46 | $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S |
47 | $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S | 47 | $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S |
48 | |||
49 | ifeq ($(CONFIG_KERNEL_MODE_NEON),y) | ||
50 | NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon | ||
51 | CFLAGS_xor-neon.o += $(NEON_FLAGS) | ||
52 | lib-$(CONFIG_XOR_BLOCKS) += xor-neon.o | ||
53 | endif | ||
diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c new file mode 100644 index 000000000000..f485e5a2af4b --- /dev/null +++ b/arch/arm/lib/xor-neon.c | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/xor-neon.c | ||
3 | * | ||
4 | * Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org> | ||
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/raid/xor.h> | ||
12 | |||
13 | #ifndef __ARM_NEON__ | ||
14 | #error You should compile this file with '-mfloat-abi=softfp -mfpu=neon' | ||
15 | #endif | ||
16 | |||
17 | /* | ||
18 | * Pull in the reference implementations while instructing GCC (through | ||
19 | * -ftree-vectorize) to attempt to exploit implicit parallelism and emit | ||
20 | * NEON instructions. | ||
21 | */ | ||
22 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) | ||
23 | #pragma GCC optimize "tree-vectorize" | ||
24 | #else | ||
25 | /* | ||
26 | * While older versions of GCC do not generate incorrect code, they fail to | ||
27 | * recognize the parallel nature of these functions, and emit plain ARM code, | ||
28 | * which is known to be slower than the optimized ARM code in asm-arm/xor.h. | ||
29 | */ | ||
30 | #warning This code requires at least version 4.6 of GCC | ||
31 | #endif | ||
32 | |||
33 | #pragma GCC diagnostic ignored "-Wunused-variable" | ||
34 | #include <asm-generic/xor.h> | ||
35 | |||
36 | struct xor_block_template const xor_block_neon_inner = { | ||
37 | .name = "__inner_neon__", | ||
38 | .do_2 = xor_8regs_2, | ||
39 | .do_3 = xor_8regs_3, | ||
40 | .do_4 = xor_8regs_4, | ||
41 | .do_5 = xor_8regs_5, | ||
42 | }; | ||
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S deleted file mode 100644 index b18b8ebc6508..000000000000 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* | ||
2 | * Debugging macro for DaVinci | ||
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 | |||
12 | /* Modifications | ||
13 | * Jan 2009 Chaithrika U S Added senduart, busyuart, waituart | ||
14 | * macros, based on debug-8250.S file | ||
15 | * but using 32-bit accesses required for | ||
16 | * some davinci devices. | ||
17 | */ | ||
18 | |||
19 | #include <linux/serial_reg.h> | ||
20 | |||
21 | #include <mach/serial.h> | ||
22 | |||
23 | #define UART_SHIFT 2 | ||
24 | |||
25 | #if defined(CONFIG_DEBUG_DAVINCI_DMx_UART0) | ||
26 | #define UART_BASE DAVINCI_UART0_BASE | ||
27 | #elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART1) | ||
28 | #define UART_BASE DA8XX_UART1_BASE | ||
29 | #elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART2) | ||
30 | #define UART_BASE DA8XX_UART2_BASE | ||
31 | #elif defined(CONFIG_DEBUG_DAVINCI_TNETV107X_UART1) | ||
32 | #define UART_BASE TNETV107X_UART2_BASE | ||
33 | #define UART_VIRTBASE TNETV107X_UART2_VIRT | ||
34 | #else | ||
35 | #error "Select a specifc port for DEBUG_LL" | ||
36 | #endif | ||
37 | |||
38 | #ifndef UART_VIRTBASE | ||
39 | #define UART_VIRTBASE IO_ADDRESS(UART_BASE) | ||
40 | #endif | ||
41 | |||
42 | .macro addruart, rp, rv, tmp | ||
43 | ldr \rp, =UART_BASE | ||
44 | ldr \rv, =UART_VIRTBASE | ||
45 | .endm | ||
46 | |||
47 | .macro senduart,rd,rx | ||
48 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
49 | .endm | ||
50 | |||
51 | .macro busyuart,rd,rx | ||
52 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
53 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
54 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
55 | bne 1002b | ||
56 | .endm | ||
57 | |||
58 | .macro waituart,rd,rx | ||
59 | #ifdef FLOW_CONTROL | ||
60 | 1001: ldr \rd, [\rx, #UART_MSR << UART_SHIFT] | ||
61 | tst \rd, #UART_MSR_CTS | ||
62 | beq 1001b | ||
63 | #endif | ||
64 | .endm | ||
65 | |||
diff --git a/arch/arm/mach-dove/include/mach/debug-macro.S b/arch/arm/mach-dove/include/mach/debug-macro.S deleted file mode 100644 index 5929cbc59161..000000000000 --- a/arch/arm/mach-dove/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-dove/include/mach/debug-macro.S | ||
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 | #include <mach/bridge-regs.h> | ||
10 | |||
11 | .macro addruart, rp, rv, tmp | ||
12 | ldr \rp, =DOVE_SB_REGS_PHYS_BASE | ||
13 | ldr \rv, =DOVE_SB_REGS_VIRT_BASE | ||
14 | orr \rp, \rp, #0x00012000 | ||
15 | orr \rv, \rv, #0x00012000 | ||
16 | .endm | ||
17 | |||
18 | #define UART_SHIFT 2 | ||
19 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-ebsa110/include/mach/debug-macro.S b/arch/arm/mach-ebsa110/include/mach/debug-macro.S deleted file mode 100644 index bb02c05e6812..000000000000 --- a/arch/arm/mach-ebsa110/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* arch/arm/mach-ebsa110/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | **/ | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0xf0000000 | ||
16 | orr \rp, \rp, #0x00000be0 | ||
17 | mov \rp, \rv | ||
18 | .endm | ||
19 | |||
20 | #define UART_SHIFT 2 | ||
21 | #define FLOW_CONTROL | ||
22 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index fe3c1fa5462b..93e54fd4e3d5 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -194,20 +194,6 @@ config MACH_VISION_EP9307 | |||
194 | Say 'Y' here if you want your kernel to support the | 194 | Say 'Y' here if you want your kernel to support the |
195 | Vision Engraving Systems EP9307 SoM. | 195 | Vision Engraving Systems EP9307 SoM. |
196 | 196 | ||
197 | choice | ||
198 | prompt "Select a UART for early kernel messages" | ||
199 | |||
200 | config EP93XX_EARLY_UART1 | ||
201 | bool "UART1" | ||
202 | |||
203 | config EP93XX_EARLY_UART2 | ||
204 | bool "UART2" | ||
205 | |||
206 | config EP93XX_EARLY_UART3 | ||
207 | bool "UART3" | ||
208 | |||
209 | endchoice | ||
210 | |||
211 | endmenu | 197 | endmenu |
212 | 198 | ||
213 | endif | 199 | endif |
diff --git a/arch/arm/mach-ep93xx/include/mach/debug-macro.S b/arch/arm/mach-ep93xx/include/mach/debug-macro.S deleted file mode 100644 index af54e43132cf..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/debug-macro.S | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
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 (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | #include <mach/ep93xx-regs.h> | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | ldr \rp, =EP93XX_APB_PHYS_BASE @ Physical base | ||
16 | ldr \rv, =EP93XX_APB_VIRT_BASE @ virtual base | ||
17 | orr \rp, \rp, #0x000c0000 | ||
18 | orr \rv, \rv, #0x000c0000 | ||
19 | .endm | ||
20 | |||
21 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h index b5cc77d2380b..03c42e5400d2 100644 --- a/arch/arm/mach-ep93xx/include/mach/uncompress.h +++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h | |||
@@ -31,18 +31,8 @@ static void __raw_writel(unsigned int value, unsigned int ptr) | |||
31 | *((volatile unsigned int *)ptr) = value; | 31 | *((volatile unsigned int *)ptr) = value; |
32 | } | 32 | } |
33 | 33 | ||
34 | #if defined(CONFIG_EP93XX_EARLY_UART1) | 34 | #define PHYS_UART_DATA (CONFIG_DEBUG_UART_PHYS + 0x00) |
35 | #define UART_BASE EP93XX_UART1_PHYS_BASE | 35 | #define PHYS_UART_FLAG (CONFIG_DEBUG_UART_PHYS + 0x18) |
36 | #elif defined(CONFIG_EP93XX_EARLY_UART2) | ||
37 | #define UART_BASE EP93XX_UART2_PHYS_BASE | ||
38 | #elif defined(CONFIG_EP93XX_EARLY_UART3) | ||
39 | #define UART_BASE EP93XX_UART3_PHYS_BASE | ||
40 | #else | ||
41 | #define UART_BASE EP93XX_UART1_PHYS_BASE | ||
42 | #endif | ||
43 | |||
44 | #define PHYS_UART_DATA (UART_BASE + 0x00) | ||
45 | #define PHYS_UART_FLAG (UART_BASE + 0x18) | ||
46 | #define UART_FLAG_TXFF 0x20 | 36 | #define UART_FLAG_TXFF 0x20 |
47 | 37 | ||
48 | static inline void putc(int c) | 38 | static inline void putc(int c) |
diff --git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S index c169f0c99b2a..02247f313e94 100644 --- a/arch/arm/mach-footbridge/include/mach/debug-macro.S +++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S | |||
@@ -13,20 +13,6 @@ | |||
13 | 13 | ||
14 | #include <asm/hardware/dec21285.h> | 14 | #include <asm/hardware/dec21285.h> |
15 | 15 | ||
16 | #ifndef CONFIG_DEBUG_DC21285_PORT | ||
17 | /* For NetWinder debugging */ | ||
18 | .macro addruart, rp, rv, tmp | ||
19 | mov \rp, #0x000003f8 | ||
20 | orr \rv, \rp, #0xfe000000 @ virtual | ||
21 | orr \rv, \rv, #0x00e00000 @ virtual | ||
22 | orr \rp, \rp, #0x7c000000 @ physical | ||
23 | .endm | ||
24 | |||
25 | #define UART_SHIFT 0 | ||
26 | #define FLOW_CONTROL | ||
27 | #include <asm/hardware/debug-8250.S> | ||
28 | |||
29 | #else | ||
30 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
31 | /* For EBSA285 debugging */ | 17 | /* For EBSA285 debugging */ |
32 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 | 18 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 |
@@ -54,4 +40,3 @@ | |||
54 | 40 | ||
55 | .macro waituart,rd,rx | 41 | .macro waituart,rd,rx |
56 | .endm | 42 | .endm |
57 | #endif | ||
diff --git a/arch/arm/mach-gemini/include/mach/debug-macro.S b/arch/arm/mach-gemini/include/mach/debug-macro.S deleted file mode 100644 index 837670763b85..000000000000 --- a/arch/arm/mach-gemini/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * Copyright (C) 2001-2006 Storlink, Corp. | ||
6 | * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
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 <mach/hardware.h> | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | ldr \rp, =GEMINI_UART_BASE @ physical | ||
16 | ldr \rv, =IO_ADDRESS(GEMINI_UART_BASE) @ virtual | ||
17 | .endm | ||
18 | |||
19 | #define UART_SHIFT 2 | ||
20 | #define FLOW_CONTROL | ||
21 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-integrator/include/mach/debug-macro.S b/arch/arm/mach-integrator/include/mach/debug-macro.S deleted file mode 100644 index 411b116077e4..000000000000 --- a/arch/arm/mach-integrator/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* arch/arm/mach-integrator/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | */ | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0x16000000 @ physical base address | ||
16 | mov \rv, #0xf0000000 @ virtual base | ||
17 | add \rv, \rv, #0x16000000 >> 4 | ||
18 | .endm | ||
19 | |||
20 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-iop13xx/include/mach/debug-macro.S b/arch/arm/mach-iop13xx/include/mach/debug-macro.S deleted file mode 100644 index d869a6f67e5c..000000000000 --- a/arch/arm/mach-iop13xx/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop13xx/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header | ||
5 | * | ||
6 | * Copyright (C) 1994-1999 Russell King | ||
7 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0x00002300 | ||
16 | orr \rp, \rp, #0x00000040 | ||
17 | orr \rv, \rp, #0xfe000000 @ virtual | ||
18 | orr \rv, \rv, #0x00e80000 | ||
19 | orr \rp, \rp, #0xff000000 @ physical | ||
20 | orr \rp, \rp, #0x00d80000 | ||
21 | .endm | ||
22 | |||
23 | #define UART_SHIFT 2 | ||
24 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-iop32x/include/mach/debug-macro.S b/arch/arm/mach-iop32x/include/mach/debug-macro.S deleted file mode 100644 index 363bdf90b34d..000000000000 --- a/arch/arm/mach-iop32x/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop32x/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header | ||
5 | * | ||
6 | * Copyright (C) 1994-1999 Russell King | ||
7 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0xfe000000 @ physical as well as virtual | ||
16 | orr \rp, \rp, #0x00800000 @ location of the UART | ||
17 | mov \rv, \rp | ||
18 | .endm | ||
19 | |||
20 | #define UART_SHIFT 0 | ||
21 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-iop33x/include/mach/debug-macro.S b/arch/arm/mach-iop33x/include/mach/debug-macro.S deleted file mode 100644 index 361be1f6026e..000000000000 --- a/arch/arm/mach-iop33x/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop33x/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header | ||
5 | * | ||
6 | * Copyright (C) 1994-1999 Russell King | ||
7 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0x00ff0000 | ||
16 | orr \rp, \rp, #0x0000f700 | ||
17 | orr \rv, #0xfe000000 @ virtual | ||
18 | orr \rp, #0xff000000 @ physical | ||
19 | .endm | ||
20 | |||
21 | #define UART_SHIFT 2 | ||
22 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S deleted file mode 100644 index ff686cbc5df4..000000000000 --- a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* arch/arm/mach-ixp4xx/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | |||
13 | .macro addruart, rp, rv, tmp | ||
14 | #ifdef __ARMEB__ | ||
15 | mov \rp, #3 @ Uart regs are at off set of 3 if | ||
16 | @ byte writes used - Big Endian. | ||
17 | #else | ||
18 | mov \rp, #0 | ||
19 | #endif | ||
20 | orr \rv, \rp, #0xfe000000 @ virtual | ||
21 | orr \rv, \rv, #0x00f00000 | ||
22 | orr \rp, \rp, #0xc8000000 @ physical | ||
23 | .endm | ||
24 | |||
25 | #define UART_SHIFT 2 | ||
26 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/debug-macro.S b/arch/arm/mach-kirkwood/include/mach/debug-macro.S deleted file mode 100644 index f785d401a607..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/debug-macro.S | ||
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 | #include <mach/bridge-regs.h> | ||
10 | |||
11 | .macro addruart, rp, rv, tmp | ||
12 | ldr \rp, =KIRKWOOD_REGS_PHYS_BASE | ||
13 | ldr \rv, =KIRKWOOD_REGS_VIRT_BASE | ||
14 | orr \rp, \rp, #0x00012000 | ||
15 | orr \rv, \rv, #0x00012000 | ||
16 | .endm | ||
17 | |||
18 | #define UART_SHIFT 2 | ||
19 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/debug-macro.S b/arch/arm/mach-lpc32xx/include/mach/debug-macro.S deleted file mode 100644 index 351bd6c84909..000000000000 --- a/arch/arm/mach-lpc32xx/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/debug-macro.S | ||
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 | /* | ||
20 | * Debug output is hardcoded to standard UART 5 | ||
21 | */ | ||
22 | |||
23 | .macro addruart, rp, rv, tmp | ||
24 | ldreq \rp, =0x40090000 | ||
25 | ldrne \rv, =0xF4090000 | ||
26 | .endm | ||
27 | |||
28 | #define UART_SHIFT 2 | ||
29 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-mv78xx0/include/mach/debug-macro.S b/arch/arm/mach-mv78xx0/include/mach/debug-macro.S deleted file mode 100644 index a7df02b049b7..000000000000 --- a/arch/arm/mach-mv78xx0/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mv78xx0/include/mach/debug-macro.S | ||
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 | #include <mach/mv78xx0.h> | ||
10 | |||
11 | .macro addruart, rp, rv, tmp | ||
12 | ldr \rp, =MV78XX0_REGS_PHYS_BASE | ||
13 | ldr \rv, =MV78XX0_REGS_VIRT_BASE | ||
14 | orr \rp, \rp, #0x00012000 | ||
15 | orr \rv, \rv, #0x00012000 | ||
16 | .endm | ||
17 | |||
18 | #define UART_SHIFT 2 | ||
19 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-orion5x/include/mach/debug-macro.S b/arch/arm/mach-orion5x/include/mach/debug-macro.S deleted file mode 100644 index f340ed8f8dd0..000000000000 --- a/arch/arm/mach-orion5x/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header | ||
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 <mach/orion5x.h> | ||
12 | |||
13 | .macro addruart, rp, rv, tmp | ||
14 | ldr \rp, =ORION5X_REGS_PHYS_BASE | ||
15 | ldr \rv, =ORION5X_REGS_VIRT_BASE | ||
16 | orr \rp, \rp, #0x00012000 | ||
17 | orr \rv, \rv, #0x00012000 | ||
18 | .endm | ||
19 | |||
20 | #define UART_SHIFT 2 | ||
21 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-realview/include/mach/debug-macro.S b/arch/arm/mach-realview/include/mach/debug-macro.S deleted file mode 100644 index 8cc372dc66a8..000000000000 --- a/arch/arm/mach-realview/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* arch/arm/mach-realview/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | |||
13 | #ifdef CONFIG_DEBUG_REALVIEW_STD_PORT | ||
14 | #define DEBUG_LL_UART_OFFSET 0x00009000 | ||
15 | #elif defined(CONFIG_DEBUG_REALVIEW_PB1176_PORT) | ||
16 | #define DEBUG_LL_UART_OFFSET 0x0010c000 | ||
17 | #endif | ||
18 | |||
19 | #ifndef DEBUG_LL_UART_OFFSET | ||
20 | #error "Unknown RealView platform" | ||
21 | #endif | ||
22 | |||
23 | .macro addruart, rp, rv, tmp | ||
24 | mov \rp, #DEBUG_LL_UART_OFFSET | ||
25 | orr \rv, \rp, #0xfb000000 @ virtual base | ||
26 | orr \rp, \rp, #0x10000000 @ physical base | ||
27 | .endm | ||
28 | |||
29 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-rpc/include/mach/debug-macro.S b/arch/arm/mach-rpc/include/mach/debug-macro.S deleted file mode 100644 index 6d28cc99b124..000000000000 --- a/arch/arm/mach-rpc/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* arch/arm/mach-rpc/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | */ | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0x00010000 | ||
16 | orr \rp, \rp, #0x00000fe0 | ||
17 | orr \rv, \rp, #0xe0000000 @ virtual | ||
18 | orr \rp, \rp, #0x03000000 @ physical | ||
19 | .endm | ||
20 | |||
21 | #define UART_SHIFT 2 | ||
22 | #define FLOW_CONTROL | ||
23 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-spear/include/mach/debug-macro.S b/arch/arm/mach-spear/include/mach/debug-macro.S deleted file mode 100644 index 75b05ad0fbad..000000000000 --- a/arch/arm/mach-spear/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header for spear platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar <viresh.linux@gmail.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 | #include <linux/amba/serial.h> | ||
15 | #include <mach/spear.h> | ||
16 | |||
17 | .macro addruart, rp, rv, tmp | ||
18 | mov \rp, #SPEAR_DBG_UART_BASE @ Physical base | ||
19 | mov \rv, #VA_SPEAR_DBG_UART_BASE @ Virtual base | ||
20 | .endm | ||
21 | |||
22 | .macro senduart, rd, rx | ||
23 | strb \rd, [\rx, #UART01x_DR] @ ASC_TX_BUFFER | ||
24 | .endm | ||
25 | |||
26 | .macro waituart, rd, rx | ||
27 | 1001: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER | ||
28 | tst \rd, #UART01x_FR_TXFF @ TX_FULL | ||
29 | bne 1001b | ||
30 | .endm | ||
31 | |||
32 | .macro busyuart, rd, rx | ||
33 | 1002: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER | ||
34 | tst \rd, #UART011_FR_TXFE @ TX_EMPTY | ||
35 | beq 1002b | ||
36 | .endm | ||
diff --git a/arch/arm/mach-spear/include/mach/spear.h b/arch/arm/mach-spear/include/mach/spear.h index cf3a5369eeca..5cdc53d9b653 100644 --- a/arch/arm/mach-spear/include/mach/spear.h +++ b/arch/arm/mach-spear/include/mach/spear.h | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | /* Debug uart for linux, will be used for debug and uncompress messages */ | 40 | /* Debug uart for linux, will be used for debug and uncompress messages */ |
41 | #define SPEAR_DBG_UART_BASE SPEAR_ICM1_UART_BASE | 41 | #define SPEAR_DBG_UART_BASE SPEAR_ICM1_UART_BASE |
42 | #define VA_SPEAR_DBG_UART_BASE VA_SPEAR_ICM1_UART_BASE | ||
43 | 42 | ||
44 | /* Sysctl base for spear platform */ | 43 | /* Sysctl base for spear platform */ |
45 | #define SPEAR_SYS_CTRL_BASE SPEAR_ICM3_SYS_CTRL_BASE | 44 | #define SPEAR_SYS_CTRL_BASE SPEAR_ICM3_SYS_CTRL_BASE |
@@ -86,7 +85,6 @@ | |||
86 | 85 | ||
87 | /* Debug uart for linux, will be used for debug and uncompress messages */ | 86 | /* Debug uart for linux, will be used for debug and uncompress messages */ |
88 | #define SPEAR_DBG_UART_BASE UART_BASE | 87 | #define SPEAR_DBG_UART_BASE UART_BASE |
89 | #define VA_SPEAR_DBG_UART_BASE VA_UART_BASE | ||
90 | 88 | ||
91 | #endif /* SPEAR13XX */ | 89 | #endif /* SPEAR13XX */ |
92 | 90 | ||
diff --git a/arch/arm/mach-versatile/include/mach/debug-macro.S b/arch/arm/mach-versatile/include/mach/debug-macro.S deleted file mode 100644 index d0fbd7f1cb00..000000000000 --- a/arch/arm/mach-versatile/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* arch/arm/mach-versatile/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | */ | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0x001F0000 | ||
16 | orr \rp, \rp, #0x00001000 | ||
17 | orr \rv, \rp, #0xf1000000 @ virtual base | ||
18 | orr \rp, \rp, #0x10000000 @ physical base | ||
19 | .endm | ||
20 | |||
21 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index d70e0aba0c9d..447da6ffadd5 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -290,7 +290,7 @@ static void l2x0_disable(void) | |||
290 | raw_spin_lock_irqsave(&l2x0_lock, flags); | 290 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
291 | __l2x0_flush_all(); | 291 | __l2x0_flush_all(); |
292 | writel_relaxed(0, l2x0_base + L2X0_CTRL); | 292 | writel_relaxed(0, l2x0_base + L2X0_CTRL); |
293 | dsb(); | 293 | dsb(st); |
294 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); | 294 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
295 | } | 295 | } |
296 | 296 | ||
@@ -417,9 +417,9 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
417 | outer_cache.disable = l2x0_disable; | 417 | outer_cache.disable = l2x0_disable; |
418 | } | 418 | } |
419 | 419 | ||
420 | printk(KERN_INFO "%s cache controller enabled\n", type); | 420 | pr_info("%s cache controller enabled\n", type); |
421 | printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n", | 421 | pr_info("l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d kB\n", |
422 | ways, cache_id, aux, l2x0_size); | 422 | ways, cache_id, aux, l2x0_size >> 10); |
423 | } | 423 | } |
424 | 424 | ||
425 | #ifdef CONFIG_OF | 425 | #ifdef CONFIG_OF |
@@ -929,7 +929,9 @@ static const struct of_device_id l2x0_ids[] __initconst = { | |||
929 | .data = (void *)&aurora_no_outer_data}, | 929 | .data = (void *)&aurora_no_outer_data}, |
930 | { .compatible = "marvell,aurora-outer-cache", | 930 | { .compatible = "marvell,aurora-outer-cache", |
931 | .data = (void *)&aurora_with_outer_data}, | 931 | .data = (void *)&aurora_with_outer_data}, |
932 | { .compatible = "bcm,bcm11351-a2-pl310-cache", | 932 | { .compatible = "brcm,bcm11351-a2-pl310-cache", |
933 | .data = (void *)&bcm_l2x0_data}, | ||
934 | { .compatible = "bcm,bcm11351-a2-pl310-cache", /* deprecated name */ | ||
933 | .data = (void *)&bcm_l2x0_data}, | 935 | .data = (void *)&bcm_l2x0_data}, |
934 | {} | 936 | {} |
935 | }; | 937 | }; |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 515b00064da8..b5c467a65c27 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -282,7 +282,7 @@ ENTRY(v7_coherent_user_range) | |||
282 | add r12, r12, r2 | 282 | add r12, r12, r2 |
283 | cmp r12, r1 | 283 | cmp r12, r1 |
284 | blo 1b | 284 | blo 1b |
285 | dsb | 285 | dsb ishst |
286 | icache_line_size r2, r3 | 286 | icache_line_size r2, r3 |
287 | sub r3, r2, #1 | 287 | sub r3, r2, #1 |
288 | bic r12, r0, r3 | 288 | bic r12, r0, r3 |
@@ -294,7 +294,7 @@ ENTRY(v7_coherent_user_range) | |||
294 | mov r0, #0 | 294 | mov r0, #0 |
295 | ALT_SMP(mcr p15, 0, r0, c7, c1, 6) @ invalidate BTB Inner Shareable | 295 | ALT_SMP(mcr p15, 0, r0, c7, c1, 6) @ invalidate BTB Inner Shareable |
296 | ALT_UP(mcr p15, 0, r0, c7, c5, 6) @ invalidate BTB | 296 | ALT_UP(mcr p15, 0, r0, c7, c5, 6) @ invalidate BTB |
297 | dsb | 297 | dsb ishst |
298 | isb | 298 | isb |
299 | mov pc, lr | 299 | mov pc, lr |
300 | 300 | ||
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 4a0544492f10..84e6f772e204 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -162,10 +162,7 @@ static void flush_context(unsigned int cpu) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | /* Queue a TLB invalidate and flush the I-cache if necessary. */ | 164 | /* Queue a TLB invalidate and flush the I-cache if necessary. */ |
165 | if (!tlb_ops_need_broadcast()) | 165 | cpumask_setall(&tlb_flush_pending); |
166 | cpumask_set_cpu(cpu, &tlb_flush_pending); | ||
167 | else | ||
168 | cpumask_setall(&tlb_flush_pending); | ||
169 | 166 | ||
170 | if (icache_is_vivt_asid_tagged()) | 167 | if (icache_is_vivt_asid_tagged()) |
171 | __flush_icache_all(); | 168 | __flush_icache_all(); |
@@ -245,8 +242,6 @@ void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk) | |||
245 | if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) { | 242 | if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) { |
246 | local_flush_bp_all(); | 243 | local_flush_bp_all(); |
247 | local_flush_tlb_all(); | 244 | local_flush_tlb_all(); |
248 | if (erratum_a15_798181()) | ||
249 | dummy_flush_tlb_a15_erratum(); | ||
250 | } | 245 | } |
251 | 246 | ||
252 | atomic64_set(&per_cpu(active_asids, cpu), asid); | 247 | atomic64_set(&per_cpu(active_asids, cpu), asid); |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index dbddc07a3bbd..f5e1a8471714 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -455,7 +455,6 @@ static void __dma_remap(struct page *page, size_t size, pgprot_t prot) | |||
455 | unsigned end = start + size; | 455 | unsigned end = start + size; |
456 | 456 | ||
457 | apply_to_page_range(&init_mm, start, size, __dma_update_pte, &prot); | 457 | apply_to_page_range(&init_mm, start, size, __dma_update_pte, &prot); |
458 | dsb(); | ||
459 | flush_tlb_kernel_range(start, end); | 458 | flush_tlb_kernel_range(start, end); |
460 | } | 459 | } |
461 | 460 | ||
diff --git a/arch/arm/mm/hugetlbpage.c b/arch/arm/mm/hugetlbpage.c index 3d1e4a205b0b..66781bf34077 100644 --- a/arch/arm/mm/hugetlbpage.c +++ b/arch/arm/mm/hugetlbpage.c | |||
@@ -36,22 +36,6 @@ | |||
36 | * of type casting from pmd_t * to pte_t *. | 36 | * of type casting from pmd_t * to pte_t *. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | ||
40 | { | ||
41 | pgd_t *pgd; | ||
42 | pud_t *pud; | ||
43 | pmd_t *pmd = NULL; | ||
44 | |||
45 | pgd = pgd_offset(mm, addr); | ||
46 | if (pgd_present(*pgd)) { | ||
47 | pud = pud_offset(pgd, addr); | ||
48 | if (pud_present(*pud)) | ||
49 | pmd = pmd_offset(pud, addr); | ||
50 | } | ||
51 | |||
52 | return (pte_t *)pmd; | ||
53 | } | ||
54 | |||
55 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, | 39 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, |
56 | int write) | 40 | int write) |
57 | { | 41 | { |
@@ -68,33 +52,6 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | |||
68 | return 0; | 52 | return 0; |
69 | } | 53 | } |
70 | 54 | ||
71 | pte_t *huge_pte_alloc(struct mm_struct *mm, | ||
72 | unsigned long addr, unsigned long sz) | ||
73 | { | ||
74 | pgd_t *pgd; | ||
75 | pud_t *pud; | ||
76 | pte_t *pte = NULL; | ||
77 | |||
78 | pgd = pgd_offset(mm, addr); | ||
79 | pud = pud_alloc(mm, pgd, addr); | ||
80 | if (pud) | ||
81 | pte = (pte_t *)pmd_alloc(mm, pud, addr); | ||
82 | |||
83 | return pte; | ||
84 | } | ||
85 | |||
86 | struct page * | ||
87 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, | ||
88 | pmd_t *pmd, int write) | ||
89 | { | ||
90 | struct page *page; | ||
91 | |||
92 | page = pte_page(*(pte_t *)pmd); | ||
93 | if (page) | ||
94 | page += ((address & ~PMD_MASK) >> PAGE_SHIFT); | ||
95 | return page; | ||
96 | } | ||
97 | |||
98 | int pmd_huge(pmd_t pmd) | 55 | int pmd_huge(pmd_t pmd) |
99 | { | 56 | { |
100 | return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT); | 57 | return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT); |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 15225d829d71..2958e74fc42c 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -231,7 +231,7 @@ static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole, | |||
231 | } | 231 | } |
232 | #endif | 232 | #endif |
233 | 233 | ||
234 | void __init setup_dma_zone(struct machine_desc *mdesc) | 234 | void __init setup_dma_zone(const struct machine_desc *mdesc) |
235 | { | 235 | { |
236 | #ifdef CONFIG_ZONE_DMA | 236 | #ifdef CONFIG_ZONE_DMA |
237 | if (mdesc->dma_zone_size) { | 237 | if (mdesc->dma_zone_size) { |
@@ -335,7 +335,8 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align) | |||
335 | return phys; | 335 | return phys; |
336 | } | 336 | } |
337 | 337 | ||
338 | void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | 338 | void __init arm_memblock_init(struct meminfo *mi, |
339 | const struct machine_desc *mdesc) | ||
339 | { | 340 | { |
340 | int i; | 341 | int i; |
341 | 342 | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 53cdbd39ec8e..b1d17eeb59b8 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -1186,7 +1186,7 @@ void __init arm_mm_memblock_reserve(void) | |||
1186 | * called function. This means you can't use any function or debugging | 1186 | * called function. This means you can't use any function or debugging |
1187 | * method which may touch any device, otherwise the kernel _will_ crash. | 1187 | * method which may touch any device, otherwise the kernel _will_ crash. |
1188 | */ | 1188 | */ |
1189 | static void __init devicemaps_init(struct machine_desc *mdesc) | 1189 | static void __init devicemaps_init(const struct machine_desc *mdesc) |
1190 | { | 1190 | { |
1191 | struct map_desc map; | 1191 | struct map_desc map; |
1192 | unsigned long addr; | 1192 | unsigned long addr; |
@@ -1319,7 +1319,7 @@ static void __init map_lowmem(void) | |||
1319 | * paging_init() sets up the page tables, initialises the zone memory | 1319 | * paging_init() sets up the page tables, initialises the zone memory |
1320 | * maps, and sets up the zero page, bad page and bad page tables. | 1320 | * maps, and sets up the zero page, bad page and bad page tables. |
1321 | */ | 1321 | */ |
1322 | void __init paging_init(struct machine_desc *mdesc) | 1322 | void __init paging_init(const struct machine_desc *mdesc) |
1323 | { | 1323 | { |
1324 | void *zero_page; | 1324 | void *zero_page; |
1325 | 1325 | ||
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 1fa50100ab6a..34d4ab217bab 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -299,7 +299,7 @@ void __init sanity_check_meminfo(void) | |||
299 | * paging_init() sets up the page tables, initialises the zone memory | 299 | * paging_init() sets up the page tables, initialises the zone memory |
300 | * maps, and sets up the zero page, bad page and bad page tables. | 300 | * maps, and sets up the zero page, bad page and bad page tables. |
301 | */ | 301 | */ |
302 | void __init paging_init(struct machine_desc *mdesc) | 302 | void __init paging_init(const struct machine_desc *mdesc) |
303 | { | 303 | { |
304 | early_trap_init((void *)CONFIG_VECTORS_BASE); | 304 | early_trap_init((void *)CONFIG_VECTORS_BASE); |
305 | mpu_setup(); | 305 | mpu_setup(); |
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index d5146b98c8d1..db79b62c92fb 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
@@ -514,6 +514,32 @@ ENTRY(cpu_feroceon_set_pte_ext) | |||
514 | #endif | 514 | #endif |
515 | mov pc, lr | 515 | mov pc, lr |
516 | 516 | ||
517 | /* Suspend/resume support: taken from arch/arm/mm/proc-arm926.S */ | ||
518 | .globl cpu_feroceon_suspend_size | ||
519 | .equ cpu_feroceon_suspend_size, 4 * 3 | ||
520 | #ifdef CONFIG_ARM_CPU_SUSPEND | ||
521 | ENTRY(cpu_feroceon_do_suspend) | ||
522 | stmfd sp!, {r4 - r6, lr} | ||
523 | mrc p15, 0, r4, c13, c0, 0 @ PID | ||
524 | mrc p15, 0, r5, c3, c0, 0 @ Domain ID | ||
525 | mrc p15, 0, r6, c1, c0, 0 @ Control register | ||
526 | stmia r0, {r4 - r6} | ||
527 | ldmfd sp!, {r4 - r6, pc} | ||
528 | ENDPROC(cpu_feroceon_do_suspend) | ||
529 | |||
530 | ENTRY(cpu_feroceon_do_resume) | ||
531 | mov ip, #0 | ||
532 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I+D TLBs | ||
533 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I+D caches | ||
534 | ldmia r0, {r4 - r6} | ||
535 | mcr p15, 0, r4, c13, c0, 0 @ PID | ||
536 | mcr p15, 0, r5, c3, c0, 0 @ Domain ID | ||
537 | mcr p15, 0, r1, c2, c0, 0 @ TTB address | ||
538 | mov r0, r6 @ control register | ||
539 | b cpu_resume_mmu | ||
540 | ENDPROC(cpu_feroceon_do_resume) | ||
541 | #endif | ||
542 | |||
517 | .type __feroceon_setup, #function | 543 | .type __feroceon_setup, #function |
518 | __feroceon_setup: | 544 | __feroceon_setup: |
519 | mov r0, #0 | 545 | mov r0, #0 |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 73398bcf9bd8..c63d9bdee51e 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -83,7 +83,7 @@ ENTRY(cpu_v7_dcache_clean_area) | |||
83 | add r0, r0, r2 | 83 | add r0, r0, r2 |
84 | subs r1, r1, r2 | 84 | subs r1, r1, r2 |
85 | bhi 2b | 85 | bhi 2b |
86 | dsb | 86 | dsb ishst |
87 | mov pc, lr | 87 | mov pc, lr |
88 | ENDPROC(cpu_v7_dcache_clean_area) | 88 | ENDPROC(cpu_v7_dcache_clean_area) |
89 | 89 | ||
@@ -330,7 +330,19 @@ __v7_setup: | |||
330 | 1: | 330 | 1: |
331 | #endif | 331 | #endif |
332 | 332 | ||
333 | 3: mov r10, #0 | 333 | /* Cortex-A15 Errata */ |
334 | 3: ldr r10, =0x00000c0f @ Cortex-A15 primary part number | ||
335 | teq r0, r10 | ||
336 | bne 4f | ||
337 | |||
338 | #ifdef CONFIG_ARM_ERRATA_773022 | ||
339 | cmp r6, #0x4 @ only present up to r0p4 | ||
340 | mrcle p15, 0, r10, c1, c0, 1 @ read aux control register | ||
341 | orrle r10, r10, #1 << 1 @ disable loop buffer | ||
342 | mcrle p15, 0, r10, c1, c0, 1 @ write aux control register | ||
343 | #endif | ||
344 | |||
345 | 4: mov r10, #0 | ||
334 | mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate | 346 | mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate |
335 | dsb | 347 | dsb |
336 | #ifdef CONFIG_MMU | 348 | #ifdef CONFIG_MMU |
diff --git a/arch/arm/mm/tlb-v7.S b/arch/arm/mm/tlb-v7.S index ea94765acf9a..355308767bae 100644 --- a/arch/arm/mm/tlb-v7.S +++ b/arch/arm/mm/tlb-v7.S | |||
@@ -35,7 +35,7 @@ | |||
35 | ENTRY(v7wbi_flush_user_tlb_range) | 35 | ENTRY(v7wbi_flush_user_tlb_range) |
36 | vma_vm_mm r3, r2 @ get vma->vm_mm | 36 | vma_vm_mm r3, r2 @ get vma->vm_mm |
37 | mmid r3, r3 @ get vm_mm->context.id | 37 | mmid r3, r3 @ get vm_mm->context.id |
38 | dsb | 38 | dsb ish |
39 | mov r0, r0, lsr #PAGE_SHIFT @ align address | 39 | mov r0, r0, lsr #PAGE_SHIFT @ align address |
40 | mov r1, r1, lsr #PAGE_SHIFT | 40 | mov r1, r1, lsr #PAGE_SHIFT |
41 | asid r3, r3 @ mask ASID | 41 | asid r3, r3 @ mask ASID |
@@ -56,7 +56,7 @@ ENTRY(v7wbi_flush_user_tlb_range) | |||
56 | add r0, r0, #PAGE_SZ | 56 | add r0, r0, #PAGE_SZ |
57 | cmp r0, r1 | 57 | cmp r0, r1 |
58 | blo 1b | 58 | blo 1b |
59 | dsb | 59 | dsb ish |
60 | mov pc, lr | 60 | mov pc, lr |
61 | ENDPROC(v7wbi_flush_user_tlb_range) | 61 | ENDPROC(v7wbi_flush_user_tlb_range) |
62 | 62 | ||
@@ -69,7 +69,7 @@ ENDPROC(v7wbi_flush_user_tlb_range) | |||
69 | * - end - end address (exclusive, may not be aligned) | 69 | * - end - end address (exclusive, may not be aligned) |
70 | */ | 70 | */ |
71 | ENTRY(v7wbi_flush_kern_tlb_range) | 71 | ENTRY(v7wbi_flush_kern_tlb_range) |
72 | dsb | 72 | dsb ish |
73 | mov r0, r0, lsr #PAGE_SHIFT @ align address | 73 | mov r0, r0, lsr #PAGE_SHIFT @ align address |
74 | mov r1, r1, lsr #PAGE_SHIFT | 74 | mov r1, r1, lsr #PAGE_SHIFT |
75 | mov r0, r0, lsl #PAGE_SHIFT | 75 | mov r0, r0, lsl #PAGE_SHIFT |
@@ -84,7 +84,7 @@ ENTRY(v7wbi_flush_kern_tlb_range) | |||
84 | add r0, r0, #PAGE_SZ | 84 | add r0, r0, #PAGE_SZ |
85 | cmp r0, r1 | 85 | cmp r0, r1 |
86 | blo 1b | 86 | blo 1b |
87 | dsb | 87 | dsb ish |
88 | isb | 88 | isb |
89 | mov pc, lr | 89 | mov pc, lr |
90 | ENDPROC(v7wbi_flush_kern_tlb_range) | 90 | ENDPROC(v7wbi_flush_kern_tlb_range) |
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index 8d10dc8a1e17..3e5d3115a2a6 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
@@ -78,6 +78,11 @@ | |||
78 | ENTRY(vfp_support_entry) | 78 | ENTRY(vfp_support_entry) |
79 | DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10 | 79 | DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10 |
80 | 80 | ||
81 | ldr r3, [sp, #S_PSR] @ Neither lazy restore nor FP exceptions | ||
82 | and r3, r3, #MODE_MASK @ are supported in kernel mode | ||
83 | teq r3, #USR_MODE | ||
84 | bne vfp_kmode_exception @ Returns through lr | ||
85 | |||
81 | VFPFMRX r1, FPEXC @ Is the VFP enabled? | 86 | VFPFMRX r1, FPEXC @ Is the VFP enabled? |
82 | DBGSTR1 "fpexc %08x", r1 | 87 | DBGSTR1 "fpexc %08x", r1 |
83 | tst r1, #FPEXC_EN | 88 | tst r1, #FPEXC_EN |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 5dfbb0b8e7f4..52b8f40b1c73 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
22 | #include <linux/user.h> | 22 | #include <linux/user.h> |
23 | #include <linux/export.h> | ||
23 | 24 | ||
24 | #include <asm/cp15.h> | 25 | #include <asm/cp15.h> |
25 | #include <asm/cputype.h> | 26 | #include <asm/cputype.h> |
@@ -648,6 +649,72 @@ static int vfp_hotplug(struct notifier_block *b, unsigned long action, | |||
648 | return NOTIFY_OK; | 649 | return NOTIFY_OK; |
649 | } | 650 | } |
650 | 651 | ||
652 | void vfp_kmode_exception(void) | ||
653 | { | ||
654 | /* | ||
655 | * If we reach this point, a floating point exception has been raised | ||
656 | * while running in kernel mode. If the NEON/VFP unit was enabled at the | ||
657 | * time, it means a VFP instruction has been issued that requires | ||
658 | * software assistance to complete, something which is not currently | ||
659 | * supported in kernel mode. | ||
660 | * If the NEON/VFP unit was disabled, and the location pointed to below | ||
661 | * is properly preceded by a call to kernel_neon_begin(), something has | ||
662 | * caused the task to be scheduled out and back in again. In this case, | ||
663 | * rebuilding and running with CONFIG_DEBUG_ATOMIC_SLEEP enabled should | ||
664 | * be helpful in localizing the problem. | ||
665 | */ | ||
666 | if (fmrx(FPEXC) & FPEXC_EN) | ||
667 | pr_crit("BUG: unsupported FP instruction in kernel mode\n"); | ||
668 | else | ||
669 | pr_crit("BUG: FP instruction issued in kernel mode with FP unit disabled\n"); | ||
670 | } | ||
671 | |||
672 | #ifdef CONFIG_KERNEL_MODE_NEON | ||
673 | |||
674 | /* | ||
675 | * Kernel-side NEON support functions | ||
676 | */ | ||
677 | void kernel_neon_begin(void) | ||
678 | { | ||
679 | struct thread_info *thread = current_thread_info(); | ||
680 | unsigned int cpu; | ||
681 | u32 fpexc; | ||
682 | |||
683 | /* | ||
684 | * Kernel mode NEON is only allowed outside of interrupt context | ||
685 | * with preemption disabled. This will make sure that the kernel | ||
686 | * mode NEON register contents never need to be preserved. | ||
687 | */ | ||
688 | BUG_ON(in_interrupt()); | ||
689 | cpu = get_cpu(); | ||
690 | |||
691 | fpexc = fmrx(FPEXC) | FPEXC_EN; | ||
692 | fmxr(FPEXC, fpexc); | ||
693 | |||
694 | /* | ||
695 | * Save the userland NEON/VFP state. Under UP, | ||
696 | * the owner could be a task other than 'current' | ||
697 | */ | ||
698 | if (vfp_state_in_hw(cpu, thread)) | ||
699 | vfp_save_state(&thread->vfpstate, fpexc); | ||
700 | #ifndef CONFIG_SMP | ||
701 | else if (vfp_current_hw_state[cpu] != NULL) | ||
702 | vfp_save_state(vfp_current_hw_state[cpu], fpexc); | ||
703 | #endif | ||
704 | vfp_current_hw_state[cpu] = NULL; | ||
705 | } | ||
706 | EXPORT_SYMBOL(kernel_neon_begin); | ||
707 | |||
708 | void kernel_neon_end(void) | ||
709 | { | ||
710 | /* Disable the NEON/VFP unit. */ | ||
711 | fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); | ||
712 | put_cpu(); | ||
713 | } | ||
714 | EXPORT_SYMBOL(kernel_neon_end); | ||
715 | |||
716 | #endif /* CONFIG_KERNEL_MODE_NEON */ | ||
717 | |||
651 | /* | 718 | /* |
652 | * VFP support code initialisation. | 719 | * VFP support code initialisation. |
653 | */ | 720 | */ |
@@ -731,4 +798,4 @@ static int __init vfp_init(void) | |||
731 | return 0; | 798 | return 0; |
732 | } | 799 | } |
733 | 800 | ||
734 | late_initcall(vfp_init); | 801 | core_initcall(vfp_init); |
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index 8dfaa2ce2e95..0f424698064f 100644 --- a/include/linux/raid/pq.h +++ b/include/linux/raid/pq.h | |||
@@ -114,6 +114,11 @@ extern const struct raid6_recov_calls raid6_recov_intx1; | |||
114 | extern const struct raid6_recov_calls raid6_recov_ssse3; | 114 | extern const struct raid6_recov_calls raid6_recov_ssse3; |
115 | extern const struct raid6_recov_calls raid6_recov_avx2; | 115 | extern const struct raid6_recov_calls raid6_recov_avx2; |
116 | 116 | ||
117 | extern const struct raid6_calls raid6_neonx1; | ||
118 | extern const struct raid6_calls raid6_neonx2; | ||
119 | extern const struct raid6_calls raid6_neonx4; | ||
120 | extern const struct raid6_calls raid6_neonx8; | ||
121 | |||
117 | /* Algorithm list */ | 122 | /* Algorithm list */ |
118 | extern const struct raid6_calls * const raid6_algos[]; | 123 | extern const struct raid6_calls * const raid6_algos[]; |
119 | extern const struct raid6_recov_calls *const raid6_recov_algos[]; | 124 | extern const struct raid6_recov_calls *const raid6_recov_algos[]; |
diff --git a/lib/raid6/.gitignore b/lib/raid6/.gitignore index 162becacf97c..0a7e494b2bcd 100644 --- a/lib/raid6/.gitignore +++ b/lib/raid6/.gitignore | |||
@@ -2,3 +2,4 @@ mktables | |||
2 | altivec*.c | 2 | altivec*.c |
3 | int*.c | 3 | int*.c |
4 | tables.c | 4 | tables.c |
5 | neon?.c | ||
diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile index 9f7c184725d7..b4625787c7ee 100644 --- a/lib/raid6/Makefile +++ b/lib/raid6/Makefile | |||
@@ -5,6 +5,7 @@ raid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \ | |||
5 | 5 | ||
6 | raid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o | 6 | raid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o |
7 | raid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o | 7 | raid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o |
8 | raid6_pq-$(CONFIG_KERNEL_MODE_NEON) += neon.o neon1.o neon2.o neon4.o neon8.o | ||
8 | 9 | ||
9 | hostprogs-y += mktables | 10 | hostprogs-y += mktables |
10 | 11 | ||
@@ -16,6 +17,21 @@ ifeq ($(CONFIG_ALTIVEC),y) | |||
16 | altivec_flags := -maltivec -mabi=altivec | 17 | altivec_flags := -maltivec -mabi=altivec |
17 | endif | 18 | endif |
18 | 19 | ||
20 | # The GCC option -ffreestanding is required in order to compile code containing | ||
21 | # ARM/NEON intrinsics in a non C99-compliant environment (such as the kernel) | ||
22 | ifeq ($(CONFIG_KERNEL_MODE_NEON),y) | ||
23 | NEON_FLAGS := -ffreestanding | ||
24 | ifeq ($(ARCH),arm) | ||
25 | NEON_FLAGS += -mfloat-abi=softfp -mfpu=neon | ||
26 | endif | ||
27 | ifeq ($(ARCH),arm64) | ||
28 | CFLAGS_REMOVE_neon1.o += -mgeneral-regs-only | ||
29 | CFLAGS_REMOVE_neon2.o += -mgeneral-regs-only | ||
30 | CFLAGS_REMOVE_neon4.o += -mgeneral-regs-only | ||
31 | CFLAGS_REMOVE_neon8.o += -mgeneral-regs-only | ||
32 | endif | ||
33 | endif | ||
34 | |||
19 | targets += int1.c | 35 | targets += int1.c |
20 | $(obj)/int1.c: UNROLL := 1 | 36 | $(obj)/int1.c: UNROLL := 1 |
21 | $(obj)/int1.c: $(src)/int.uc $(src)/unroll.awk FORCE | 37 | $(obj)/int1.c: $(src)/int.uc $(src)/unroll.awk FORCE |
@@ -70,6 +86,30 @@ $(obj)/altivec8.c: UNROLL := 8 | |||
70 | $(obj)/altivec8.c: $(src)/altivec.uc $(src)/unroll.awk FORCE | 86 | $(obj)/altivec8.c: $(src)/altivec.uc $(src)/unroll.awk FORCE |
71 | $(call if_changed,unroll) | 87 | $(call if_changed,unroll) |
72 | 88 | ||
89 | CFLAGS_neon1.o += $(NEON_FLAGS) | ||
90 | targets += neon1.c | ||
91 | $(obj)/neon1.c: UNROLL := 1 | ||
92 | $(obj)/neon1.c: $(src)/neon.uc $(src)/unroll.awk FORCE | ||
93 | $(call if_changed,unroll) | ||
94 | |||
95 | CFLAGS_neon2.o += $(NEON_FLAGS) | ||
96 | targets += neon2.c | ||
97 | $(obj)/neon2.c: UNROLL := 2 | ||
98 | $(obj)/neon2.c: $(src)/neon.uc $(src)/unroll.awk FORCE | ||
99 | $(call if_changed,unroll) | ||
100 | |||
101 | CFLAGS_neon4.o += $(NEON_FLAGS) | ||
102 | targets += neon4.c | ||
103 | $(obj)/neon4.c: UNROLL := 4 | ||
104 | $(obj)/neon4.c: $(src)/neon.uc $(src)/unroll.awk FORCE | ||
105 | $(call if_changed,unroll) | ||
106 | |||
107 | CFLAGS_neon8.o += $(NEON_FLAGS) | ||
108 | targets += neon8.c | ||
109 | $(obj)/neon8.c: UNROLL := 8 | ||
110 | $(obj)/neon8.c: $(src)/neon.uc $(src)/unroll.awk FORCE | ||
111 | $(call if_changed,unroll) | ||
112 | |||
73 | quiet_cmd_mktable = TABLE $@ | 113 | quiet_cmd_mktable = TABLE $@ |
74 | cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 ) | 114 | cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 ) |
75 | 115 | ||
diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c index 6d7316fe9f30..74e6f5629dbc 100644 --- a/lib/raid6/algos.c +++ b/lib/raid6/algos.c | |||
@@ -70,6 +70,12 @@ const struct raid6_calls * const raid6_algos[] = { | |||
70 | &raid6_intx2, | 70 | &raid6_intx2, |
71 | &raid6_intx4, | 71 | &raid6_intx4, |
72 | &raid6_intx8, | 72 | &raid6_intx8, |
73 | #ifdef CONFIG_KERNEL_MODE_NEON | ||
74 | &raid6_neonx1, | ||
75 | &raid6_neonx2, | ||
76 | &raid6_neonx4, | ||
77 | &raid6_neonx8, | ||
78 | #endif | ||
73 | NULL | 79 | NULL |
74 | }; | 80 | }; |
75 | 81 | ||
diff --git a/lib/raid6/neon.c b/lib/raid6/neon.c new file mode 100644 index 000000000000..36ad4705df1a --- /dev/null +++ b/lib/raid6/neon.c | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * linux/lib/raid6/neon.c - RAID6 syndrome calculation using ARM NEON intrinsics | ||
3 | * | ||
4 | * Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org> | ||
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/raid/pq.h> | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #include <asm/neon.h> | ||
15 | #else | ||
16 | #define kernel_neon_begin() | ||
17 | #define kernel_neon_end() | ||
18 | #define cpu_has_neon() (1) | ||
19 | #endif | ||
20 | |||
21 | /* | ||
22 | * There are 2 reasons these wrappers are kept in a separate compilation unit | ||
23 | * from the actual implementations in neonN.c (generated from neon.uc by | ||
24 | * unroll.awk): | ||
25 | * - the actual implementations use NEON intrinsics, and the GCC support header | ||
26 | * (arm_neon.h) is not fully compatible (type wise) with the kernel; | ||
27 | * - the neonN.c files are compiled with -mfpu=neon and optimization enabled, | ||
28 | * and we have to make sure that we never use *any* NEON/VFP instructions | ||
29 | * outside a kernel_neon_begin()/kernel_neon_end() pair. | ||
30 | */ | ||
31 | |||
32 | #define RAID6_NEON_WRAPPER(_n) \ | ||
33 | static void raid6_neon ## _n ## _gen_syndrome(int disks, \ | ||
34 | size_t bytes, void **ptrs) \ | ||
35 | { \ | ||
36 | void raid6_neon ## _n ## _gen_syndrome_real(int, \ | ||
37 | unsigned long, void**); \ | ||
38 | kernel_neon_begin(); \ | ||
39 | raid6_neon ## _n ## _gen_syndrome_real(disks, \ | ||
40 | (unsigned long)bytes, ptrs); \ | ||
41 | kernel_neon_end(); \ | ||
42 | } \ | ||
43 | struct raid6_calls const raid6_neonx ## _n = { \ | ||
44 | raid6_neon ## _n ## _gen_syndrome, \ | ||
45 | raid6_have_neon, \ | ||
46 | "neonx" #_n, \ | ||
47 | 0 \ | ||
48 | } | ||
49 | |||
50 | static int raid6_have_neon(void) | ||
51 | { | ||
52 | return cpu_has_neon(); | ||
53 | } | ||
54 | |||
55 | RAID6_NEON_WRAPPER(1); | ||
56 | RAID6_NEON_WRAPPER(2); | ||
57 | RAID6_NEON_WRAPPER(4); | ||
58 | RAID6_NEON_WRAPPER(8); | ||
diff --git a/lib/raid6/neon.uc b/lib/raid6/neon.uc new file mode 100644 index 000000000000..1b9ed793342d --- /dev/null +++ b/lib/raid6/neon.uc | |||
@@ -0,0 +1,80 @@ | |||
1 | /* ----------------------------------------------------------------------- | ||
2 | * | ||
3 | * neon.uc - RAID-6 syndrome calculation using ARM NEON instructions | ||
4 | * | ||
5 | * Copyright (C) 2012 Rob Herring | ||
6 | * | ||
7 | * Based on altivec.uc: | ||
8 | * Copyright 2002-2004 H. Peter Anvin - All Rights Reserved | ||
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 as published by | ||
12 | * the Free Software Foundation, Inc., 53 Temple Place Ste 330, | ||
13 | * Boston MA 02111-1307, USA; either version 2 of the License, or | ||
14 | * (at your option) any later version; incorporated herein by reference. | ||
15 | * | ||
16 | * ----------------------------------------------------------------------- */ | ||
17 | |||
18 | /* | ||
19 | * neon$#.c | ||
20 | * | ||
21 | * $#-way unrolled NEON intrinsics math RAID-6 instruction set | ||
22 | * | ||
23 | * This file is postprocessed using unroll.awk | ||
24 | */ | ||
25 | |||
26 | #include <arm_neon.h> | ||
27 | |||
28 | typedef uint8x16_t unative_t; | ||
29 | |||
30 | #define NBYTES(x) ((unative_t){x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}) | ||
31 | #define NSIZE sizeof(unative_t) | ||
32 | |||
33 | /* | ||
34 | * The SHLBYTE() operation shifts each byte left by 1, *not* | ||
35 | * rolling over into the next byte | ||
36 | */ | ||
37 | static inline unative_t SHLBYTE(unative_t v) | ||
38 | { | ||
39 | return vshlq_n_u8(v, 1); | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * The MASK() operation returns 0xFF in any byte for which the high | ||
44 | * bit is 1, 0x00 for any byte for which the high bit is 0. | ||
45 | */ | ||
46 | static inline unative_t MASK(unative_t v) | ||
47 | { | ||
48 | const uint8x16_t temp = NBYTES(0); | ||
49 | return (unative_t)vcltq_s8((int8x16_t)v, (int8x16_t)temp); | ||
50 | } | ||
51 | |||
52 | void raid6_neon$#_gen_syndrome_real(int disks, unsigned long bytes, void **ptrs) | ||
53 | { | ||
54 | uint8_t **dptr = (uint8_t **)ptrs; | ||
55 | uint8_t *p, *q; | ||
56 | int d, z, z0; | ||
57 | |||
58 | register unative_t wd$$, wq$$, wp$$, w1$$, w2$$; | ||
59 | const unative_t x1d = NBYTES(0x1d); | ||
60 | |||
61 | z0 = disks - 3; /* Highest data disk */ | ||
62 | p = dptr[z0+1]; /* XOR parity */ | ||
63 | q = dptr[z0+2]; /* RS syndrome */ | ||
64 | |||
65 | for ( d = 0 ; d < bytes ; d += NSIZE*$# ) { | ||
66 | wq$$ = wp$$ = vld1q_u8(&dptr[z0][d+$$*NSIZE]); | ||
67 | for ( z = z0-1 ; z >= 0 ; z-- ) { | ||
68 | wd$$ = vld1q_u8(&dptr[z][d+$$*NSIZE]); | ||
69 | wp$$ = veorq_u8(wp$$, wd$$); | ||
70 | w2$$ = MASK(wq$$); | ||
71 | w1$$ = SHLBYTE(wq$$); | ||
72 | |||
73 | w2$$ = vandq_u8(w2$$, x1d); | ||
74 | w1$$ = veorq_u8(w1$$, w2$$); | ||
75 | wq$$ = veorq_u8(w1$$, wd$$); | ||
76 | } | ||
77 | vst1q_u8(&p[d+NSIZE*$$], wp$$); | ||
78 | vst1q_u8(&q[d+NSIZE*$$], wq$$); | ||
79 | } | ||
80 | } | ||
diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile index 087332dbf8aa..28afa1a06e03 100644 --- a/lib/raid6/test/Makefile +++ b/lib/raid6/test/Makefile | |||
@@ -22,11 +22,23 @@ ifeq ($(ARCH),x86_64) | |||
22 | IS_X86 = yes | 22 | IS_X86 = yes |
23 | endif | 23 | endif |
24 | 24 | ||
25 | ifeq ($(ARCH),arm) | ||
26 | CFLAGS += -I../../../arch/arm/include -mfpu=neon | ||
27 | HAS_NEON = yes | ||
28 | endif | ||
29 | ifeq ($(ARCH),arm64) | ||
30 | CFLAGS += -I../../../arch/arm64/include | ||
31 | HAS_NEON = yes | ||
32 | endif | ||
33 | |||
25 | ifeq ($(IS_X86),yes) | 34 | ifeq ($(IS_X86),yes) |
26 | OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o | 35 | OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o |
27 | CFLAGS += $(shell echo "vpbroadcastb %xmm0, %ymm1" | \ | 36 | CFLAGS += $(shell echo "vpbroadcastb %xmm0, %ymm1" | \ |
28 | gcc -c -x assembler - >&/dev/null && \ | 37 | gcc -c -x assembler - >&/dev/null && \ |
29 | rm ./-.o && echo -DCONFIG_AS_AVX2=1) | 38 | rm ./-.o && echo -DCONFIG_AS_AVX2=1) |
39 | else ifeq ($(HAS_NEON),yes) | ||
40 | OBJS += neon.o neon1.o neon2.o neon4.o neon8.o | ||
41 | CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1 | ||
30 | else | 42 | else |
31 | HAS_ALTIVEC := $(shell echo -e '\#include <altivec.h>\nvector int a;' |\ | 43 | HAS_ALTIVEC := $(shell echo -e '\#include <altivec.h>\nvector int a;' |\ |
32 | gcc -c -x c - >&/dev/null && \ | 44 | gcc -c -x c - >&/dev/null && \ |
@@ -55,6 +67,18 @@ raid6.a: $(OBJS) | |||
55 | raid6test: test.c raid6.a | 67 | raid6test: test.c raid6.a |
56 | $(CC) $(CFLAGS) -o raid6test $^ | 68 | $(CC) $(CFLAGS) -o raid6test $^ |
57 | 69 | ||
70 | neon1.c: neon.uc ../unroll.awk | ||
71 | $(AWK) ../unroll.awk -vN=1 < neon.uc > $@ | ||
72 | |||
73 | neon2.c: neon.uc ../unroll.awk | ||
74 | $(AWK) ../unroll.awk -vN=2 < neon.uc > $@ | ||
75 | |||
76 | neon4.c: neon.uc ../unroll.awk | ||
77 | $(AWK) ../unroll.awk -vN=4 < neon.uc > $@ | ||
78 | |||
79 | neon8.c: neon.uc ../unroll.awk | ||
80 | $(AWK) ../unroll.awk -vN=8 < neon.uc > $@ | ||
81 | |||
58 | altivec1.c: altivec.uc ../unroll.awk | 82 | altivec1.c: altivec.uc ../unroll.awk |
59 | $(AWK) ../unroll.awk -vN=1 < altivec.uc > $@ | 83 | $(AWK) ../unroll.awk -vN=1 < altivec.uc > $@ |
60 | 84 | ||
@@ -89,7 +113,7 @@ tables.c: mktables | |||
89 | ./mktables > tables.c | 113 | ./mktables > tables.c |
90 | 114 | ||
91 | clean: | 115 | clean: |
92 | rm -f *.o *.a mktables mktables.c *.uc int*.c altivec*.c tables.c raid6test | 116 | rm -f *.o *.a mktables mktables.c *.uc int*.c altivec*.c neon*.c tables.c raid6test |
93 | 117 | ||
94 | spotless: clean | 118 | spotless: clean |
95 | rm -f *~ | 119 | rm -f *~ |