summaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa/bfa.h
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2022-05-06 13:57:55 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-05-17 04:26:50 +0300
commit848b89778ed53e6c9f9e3ed01c90109ee970b3d1 (patch)
treec4f3b92ebc65dba74b7e049a3e89f49b582ee43c /drivers/scsi/bfa/bfa.h
parent0873fe44e780eb8ff7932aed347de8dd4103cea7 (diff)
downloadlinux-848b89778ed53e6c9f9e3ed01c90109ee970b3d1.tar.xz
scsi: fcoe: Add a local_lock to fcoe_percpu
fcoe_get_paged_crc_eof() relies on the caller having preemption disabled to ensure the per-CPU fcoe_percpu context remains valid throughout the call. This is done by either holding spinlocks (such as bnx2fc_global_lock or qedf_global_lock) or the get_cpu() from fcoe_alloc_paged_crc_eof(). This last one breaks PREEMPT_RT semantics as there can be memory allocation and end up sleeping in atomic contexts. Introduce a local_lock_t to struct fcoe_percpu that will keep the non-RT case the same, mapping to preempt_disable/enable, while RT will use a per-CPU spinlock allowing the region to be preemptible but still maintain CPU locality. The other users of fcoe_percpu are already safe in this regard and do not require local_lock()ing. Link: https://lore.kernel.org/r/20211117025956.79616-3-dave@stgolabs.net Link: https://lore.kernel.org/r/20220506105758.283887-2-bigeasy@linutronix.de Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa.h')
0 files changed, 0 insertions, 0 deletions