Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154354907
D3436.id8078.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3436.id8078.diff
View Options
Index: sys/arm64/arm64/gic_v3_its.c
===================================================================
--- sys/arm64/arm64/gic_v3_its.c
+++ sys/arm64/arm64/gic_v3_its.c
@@ -1311,16 +1311,16 @@
static int
its_cmd_send(struct gic_v3_its_softc *sc, struct its_cmd_desc *desc)
{
- struct its_cmd *cmd, *cmd_sync;
+ struct its_cmd *cmd, *cmd_sync, *cmd_write;
struct its_col col_sync;
struct its_cmd_desc desc_sync;
uint64_t target, cwriter;
mtx_lock_spin(&sc->its_spin_mtx);
cmd = its_cmd_alloc_locked(sc);
- mtx_unlock_spin(&sc->its_spin_mtx);
if (cmd == NULL) {
device_printf(sc->dev, "could not allocate ITS command\n");
+ mtx_unlock_spin(&sc->its_spin_mtx);
return (EBUSY);
}
@@ -1328,9 +1328,7 @@
its_cmd_sync(sc, cmd);
if (target != ITS_TARGET_NONE) {
- mtx_lock_spin(&sc->its_spin_mtx);
cmd_sync = its_cmd_alloc_locked(sc);
- mtx_unlock_spin(&sc->its_spin_mtx);
if (cmd_sync == NULL)
goto end;
desc_sync.cmd_type = ITS_CMD_SYNC;
@@ -1341,12 +1339,12 @@
}
end:
/* Update GITS_CWRITER */
- mtx_lock_spin(&sc->its_spin_mtx);
cwriter = its_cmd_cwriter_offset(sc, sc->its_cmdq_write);
gic_its_write(sc, 8, GITS_CWRITER, cwriter);
+ cmd_write = sc->its_cmdq_write;
mtx_unlock_spin(&sc->its_spin_mtx);
- its_cmd_wait_completion(sc, cmd, sc->its_cmdq_write);
+ its_cmd_wait_completion(sc, cmd, cmd_write);
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 1:33 AM (1 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32317390
Default Alt Text
D3436.id8078.diff (1 KB)
Attached To
Mode
D3436: its_cmd_send may return prior to command being completed
Attached
Detach File
Event Timeline
Log In to Comment