diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-01 16:40:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-01 16:40:30 -0400 |
commit | 65beea4c3a526320b019ca5c010da41533dafaf5 (patch) | |
tree | 7a07dde6553ac46cb4bd446003a813c365438f96 | |
parent | fb0af61d3afe0b8f8b7bd2ed7c9fcaae670ced4a (diff) | |
parent | 55c0c4c793b538fb438bcc72481b9dc2f79fe5a9 (diff) |
Merge tag 'arc-5.1-final' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC fixes from Vineet Gupta:
"A few minor fixes for ARC.
- regression in memset if line size !64
- avoid panic if PAE and IOC"
* tag 'arc-5.1-final' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARC: memset: fix build with L1_CACHE_SHIFT != 6
ARC: [hsdk] Make it easier to add PAE40 region to DTB
ARC: PAE40: don't panic and instead turn off hw ioc
-rw-r--r-- | arch/arc/boot/dts/hsdk.dts | 13 | ||||
-rw-r--r-- | arch/arc/lib/memset-archs.S | 4 | ||||
-rw-r--r-- | arch/arc/mm/cache.c | 31 |
3 files changed, 25 insertions, 23 deletions
diff --git a/arch/arc/boot/dts/hsdk.dts b/arch/arc/boot/dts/hsdk.dts index 69bc1c9e8e50..7425bb0f2d1b 100644 --- a/arch/arc/boot/dts/hsdk.dts +++ b/arch/arc/boot/dts/hsdk.dts | |||
@@ -18,8 +18,8 @@ | |||
18 | model = "snps,hsdk"; | 18 | model = "snps,hsdk"; |
19 | compatible = "snps,hsdk"; | 19 | compatible = "snps,hsdk"; |
20 | 20 | ||
21 | #address-cells = <1>; | 21 | #address-cells = <2>; |
22 | #size-cells = <1>; | 22 | #size-cells = <2>; |
23 | 23 | ||
24 | chosen { | 24 | chosen { |
25 | bootargs = "earlycon=uart8250,mmio32,0xf0005000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1"; | 25 | bootargs = "earlycon=uart8250,mmio32,0xf0005000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1"; |
@@ -105,7 +105,7 @@ | |||
105 | #size-cells = <1>; | 105 | #size-cells = <1>; |
106 | interrupt-parent = <&idu_intc>; | 106 | interrupt-parent = <&idu_intc>; |
107 | 107 | ||
108 | ranges = <0x00000000 0xf0000000 0x10000000>; | 108 | ranges = <0x00000000 0x0 0xf0000000 0x10000000>; |
109 | 109 | ||
110 | cgu_rst: reset-controller@8a0 { | 110 | cgu_rst: reset-controller@8a0 { |
111 | compatible = "snps,hsdk-reset"; | 111 | compatible = "snps,hsdk-reset"; |
@@ -269,9 +269,10 @@ | |||
269 | }; | 269 | }; |
270 | 270 | ||
271 | memory@80000000 { | 271 | memory@80000000 { |
272 | #address-cells = <1>; | 272 | #address-cells = <2>; |
273 | #size-cells = <1>; | 273 | #size-cells = <2>; |
274 | device_type = "memory"; | 274 | device_type = "memory"; |
275 | reg = <0x80000000 0x40000000>; /* 1 GiB */ | 275 | reg = <0x0 0x80000000 0x0 0x40000000>; /* 1 GB lowmem */ |
276 | /* 0x1 0x00000000 0x0 0x40000000>; 1 GB highmem */ | ||
276 | }; | 277 | }; |
277 | }; | 278 | }; |
diff --git a/arch/arc/lib/memset-archs.S b/arch/arc/lib/memset-archs.S index f230bb7092fd..b3373f5c88e0 100644 --- a/arch/arc/lib/memset-archs.S +++ b/arch/arc/lib/memset-archs.S | |||
@@ -30,10 +30,10 @@ | |||
30 | 30 | ||
31 | #else | 31 | #else |
32 | 32 | ||
33 | .macro PREALLOC_INSTR | 33 | .macro PREALLOC_INSTR reg, off |
34 | .endm | 34 | .endm |
35 | 35 | ||
36 | .macro PREFETCHW_INSTR | 36 | .macro PREFETCHW_INSTR reg, off |
37 | .endm | 37 | .endm |
38 | 38 | ||
39 | #endif | 39 | #endif |
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c index 4135abec3fb0..63e6e6504699 100644 --- a/arch/arc/mm/cache.c +++ b/arch/arc/mm/cache.c | |||
@@ -113,10 +113,24 @@ static void read_decode_cache_bcr_arcv2(int cpu) | |||
113 | } | 113 | } |
114 | 114 | ||
115 | READ_BCR(ARC_REG_CLUSTER_BCR, cbcr); | 115 | READ_BCR(ARC_REG_CLUSTER_BCR, cbcr); |
116 | if (cbcr.c) | 116 | if (cbcr.c) { |
117 | ioc_exists = 1; | 117 | ioc_exists = 1; |
118 | else | 118 | |
119 | /* | ||
120 | * As for today we don't support both IOC and ZONE_HIGHMEM enabled | ||
121 | * simultaneously. This happens because as of today IOC aperture covers | ||
122 | * only ZONE_NORMAL (low mem) and any dma transactions outside this | ||
123 | * region won't be HW coherent. | ||
124 | * If we want to use both IOC and ZONE_HIGHMEM we can use | ||
125 | * bounce_buffer to handle dma transactions to HIGHMEM. | ||
126 | * Also it is possible to modify dma_direct cache ops or increase IOC | ||
127 | * aperture size if we are planning to use HIGHMEM without PAE. | ||
128 | */ | ||
129 | if (IS_ENABLED(CONFIG_HIGHMEM) || is_pae40_enabled()) | ||
130 | ioc_enable = 0; | ||
131 | } else { | ||
119 | ioc_enable = 0; | 132 | ioc_enable = 0; |
133 | } | ||
120 | 134 | ||
121 | /* HS 2.0 didn't have AUX_VOL */ | 135 | /* HS 2.0 didn't have AUX_VOL */ |
122 | if (cpuinfo_arc700[cpu].core.family > 0x51) { | 136 | if (cpuinfo_arc700[cpu].core.family > 0x51) { |
@@ -1158,19 +1172,6 @@ noinline void __init arc_ioc_setup(void) | |||
1158 | if (!ioc_enable) | 1172 | if (!ioc_enable) |
1159 | return; | 1173 | return; |
1160 | 1174 | ||
1161 | /* | ||
1162 | * As for today we don't support both IOC and ZONE_HIGHMEM enabled | ||
1163 | * simultaneously. This happens because as of today IOC aperture covers | ||
1164 | * only ZONE_NORMAL (low mem) and any dma transactions outside this | ||
1165 | * region won't be HW coherent. | ||
1166 | * If we want to use both IOC and ZONE_HIGHMEM we can use | ||
1167 | * bounce_buffer to handle dma transactions to HIGHMEM. | ||
1168 | * Also it is possible to modify dma_direct cache ops or increase IOC | ||
1169 | * aperture size if we are planning to use HIGHMEM without PAE. | ||
1170 | */ | ||
1171 | if (IS_ENABLED(CONFIG_HIGHMEM)) | ||
1172 | panic("IOC and HIGHMEM can't be used simultaneously"); | ||
1173 | |||
1174 | /* Flush + invalidate + disable L1 dcache */ | 1175 | /* Flush + invalidate + disable L1 dcache */ |
1175 | __dc_disable(); | 1176 | __dc_disable(); |
1176 | 1177 | ||