diff options
author | Ahmed S. Darwish <a.darwish@linutronix.de> | 2020-11-26 16:29:40 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-12-01 08:03:52 +0300 |
commit | 18577cdcaeeb7a1ca5c3adc4d92ed2ba75699625 (patch) | |
tree | 35cc33864dd6fc6203069bcb3ad620ed7da75021 /drivers/mailbox/bcm2835-mailbox.c | |
parent | 4ba9e516573e60c471c01bb369144651f6f8d50b (diff) | |
download | linux-18577cdcaeeb7a1ca5c3adc4d92ed2ba75699625.tar.xz |
scsi: hisi_sas: Remove preemptible()
hisi_sas_task_exec() uses preemptible() to see if it's safe to block. This
does not work for CONFIG_PREEMPT_COUNT=n kernels in which preemptible()
always returns 0.
The problem is masked when enabling some of the common Kconfig.debug
options (like CONFIG_DEBUG_ATOMIC_SLEEP), as they implicitly enable the
preemption counter.
In general, driver leaf functions should not make logic decisions based on
the context they're called from. The caller should be the entity
responsible for explicitly indicating context.
Since hisi_sas_task_exec() already has a gfp_t flags parameter, use it as
the explicit context marker.
Link: https://lore.kernel.org/r/20201126132952.2287996-3-bigeasy@linutronix.de
Fixes: 214e702d4b70 ("scsi: hisi_sas: Adjust task reject period during host reset")
Fixes: 550c0d89d52d ("scsi: hisi_sas: Replace in_softirq() check in hisi_sas_task_exec()")
Cc: Xiaofei Tan <tanxiaofei@huawei.com>
Cc: Xiang Chen <chenxiang66@hisilicon.com>
Cc: John Garry <john.garry@huawei.com>
Acked-by: John Garry <john.garry@huawei.com>
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/mailbox/bcm2835-mailbox.c')
0 files changed, 0 insertions, 0 deletions