Commit b89b6a8
bus: mhi: host: Add spinlock to protect WP access when queueing TREs
Protect WP accesses such that multiple threads queueing buffers for
incoming data do not race.
Meanwhile, if CONFIG_TRACE_IRQFLAGS is enabled, irq will be enabled once
__local_bh_enable_ip is called as part of write_unlock_bh. Hence, let's
take irqsave lock after TRE is generated to avoid running write_unlock_bh
when irqsave lock is held.
Cc: stable@vger.kernel.org
Fixes: 189ff97 ("bus: mhi: core: Add support for data transfer")
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Tested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1702276972-41296-2-git-send-email-quic_qianyu@quicinc.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>1 parent 327ec5f commit b89b6a8
1 file changed
+13
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | | - | |
1128 | | - | |
1129 | 1127 | | |
1130 | | - | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
| 1128 | + | |
| 1129 | + | |
1134 | 1130 | | |
1135 | 1131 | | |
1136 | 1132 | | |
1137 | | - | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1138 | 1136 | | |
1139 | 1137 | | |
1140 | 1138 | | |
| |||
1154 | 1152 | | |
1155 | 1153 | | |
1156 | 1154 | | |
1157 | | - | |
1158 | 1155 | | |
1159 | 1156 | | |
1160 | 1157 | | |
| |||
1206 | 1203 | | |
1207 | 1204 | | |
1208 | 1205 | | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
| |||
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
1226 | | - | |
| 1226 | + | |
| 1227 | + | |
1227 | 1228 | | |
| 1229 | + | |
1228 | 1230 | | |
1229 | 1231 | | |
1230 | 1232 | | |
| |||
1241 | 1243 | | |
1242 | 1244 | | |
1243 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
1244 | 1248 | | |
1245 | 1249 | | |
1246 | 1250 | | |
| |||
0 commit comments