Commit bff164d
committed
Pull up following revision(s) (requested by skrll in ticket #40):
sys/arch/arm/include/cpufunc.h: revision 1.92
sys/arch/arm/arm32/bus_dma.c: revision 1.150
arm: Adjust barriers issued in bus_dmamap_sync for the coherent case.
PR/59654
This change adjusts the memory barriers issued by bus_dmamap_sync for
the coherent case. In the non-coherent case the CPU cache operations
are expected to provide any, and all required barriers.
These barriers are emitted after bouncing for PREWRITE and before
bouncing for POSTREAD.
A new indrection is introduced to deal with the differencs in barrier
(dsb) options between Arm V8 and V7, the lack of options in Arm V6,
and the need to use cpu_drain_writebuf for all other earlier versions.
The Arm V8 Net change is:
op old new
--------------------- ---------------------- ------------
PREREAD none dsb(osh)
PREWRITE cpu_drain_writebuf dsb(oshst)
PREREAD|PREWRITE cpu_drain_writebuf dsb(osh)
POSTREAD cpu_drain_writebuf dsb(oshld)
POSTWRITE none none
POSTREAD|POSTWRITE cpu_drain_writebuf dsb(oshld)
where cpu_drain_writebuf is a dsb(sy) or CPU equivalent.1 parent 19c8372 commit bff164d
2 files changed
+63
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
1200 | 1200 | | |
1201 | 1201 | | |
1202 | 1202 | | |
1203 | | - | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1204 | 1245 | | |
1205 | 1246 | | |
1206 | 1247 | | |
| 1248 | + | |
1207 | 1249 | | |
1208 | 1250 | | |
1209 | 1251 | | |
1210 | 1252 | | |
| 1253 | + | |
1211 | 1254 | | |
1212 | 1255 | | |
1213 | 1256 | | |
1214 | 1257 | | |
| 1258 | + | |
1215 | 1259 | | |
1216 | 1260 | | |
1217 | 1261 | | |
1218 | 1262 | | |
| 1263 | + | |
1219 | 1264 | | |
1220 | 1265 | | |
1221 | 1266 | | |
1222 | 1267 | | |
| 1268 | + | |
1223 | 1269 | | |
1224 | 1270 | | |
1225 | 1271 | | |
1226 | 1272 | | |
1227 | 1273 | | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | 1274 | | |
1236 | 1275 | | |
1237 | 1276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
78 | 92 | | |
79 | 93 | | |
80 | 94 | | |
| |||
0 commit comments