diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-01-03 16:34:10 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-01-03 16:50:31 +0000 |
commit | 2ce5eef6e23acba92d5dc2056d9be28542802750 (patch) | |
tree | 7fb009069505c4b6ee9afa709b326e7dbe8544fc /sys/cam/cam_sim.c | |
parent | 90f580b954090e669da234f6c8e8d0379ff9d8bc (diff) | |
download | src-2ce5eef6e23acba92d5dc2056d9be28542802750.tar.gz src-2ce5eef6e23acba92d5dc2056d9be28542802750.zip |
cam: Remove Giant handling from cam_sim_alloc()
There are no non-MPSAFE SIM drivers left in the tree, verified with
coccinelle.
Reviewed by: scottl, imp
Differential Revision: https://reviews.freebsd.org/D27853
Diffstat (limited to 'sys/cam/cam_sim.c')
-rw-r--r-- | sys/cam/cam_sim.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index 58600798bae6..e82332b999c3 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -72,9 +72,7 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, { struct cam_sim *sim; - sim = (struct cam_sim *)malloc(sizeof(struct cam_sim), - M_CAMSIM, M_ZERO | M_NOWAIT); - + sim = malloc(sizeof(struct cam_sim), M_CAMSIM, M_ZERO | M_NOWAIT); if (sim == NULL) return (NULL); @@ -92,13 +90,7 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, sim->refcount = 1; sim->devq = queue; sim->mtx = mtx; - if (mtx == &Giant) { - sim->flags |= 0; - callout_init(&sim->callout, 0); - } else { - sim->flags |= CAM_SIM_MPSAFE; - callout_init(&sim->callout, 1); - } + callout_init(&sim->callout, 1); return (sim); } |