aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAhmed S. Darwish <[email protected]>2020-11-26 14:29:41 +0100
committerMartin K. Petersen <[email protected]>2020-12-01 00:03:52 -0500
commita93c3835319849f0226b9a7101284aeb60a5ed8e (patch)
treef62d0e9cce74600bece44e4f6cfca53d9763407c /tools/perf/scripts/python
parent18577cdcaeeb7a1ca5c3adc4d92ed2ba75699625 (diff)
scsi: qla4xxx: Remove in_interrupt()
qla4_82xx_crb_win_lock() spins on a certain hardware state until it's updated. At the end of each spin, if in_interrupt() is true, it does 20 loops of cpu_relax(). Otherwise, it yields the CPU. The in_interrupt() macro is ill-defined as it does not provide what the name suggests, and it does not catch the intended use-case here. qla4_82xx_crb_win_lock() is always invoked with scsi_qla_host::hw_lock acquired, with disabled interrupts. If the caller is in process context, as in qla4_82xx_need_reset_handler(), then in_interrupt() will return false even though it is not allowed to call schedule(). Remove the in_interrupt() check. Change qla4_82xx_crb_win_lock() specification to a purely atomic function. Mark it as static, remove its forward declaration, and move it above its callers. To avoid hammering the PCI bus while spinning, use a 10 micro-second delay instead of cpu_relax(). Link: https://lore.kernel.org/r/[email protected] Fixes: f4f5df23bf72 ("[SCSI] qla4xxx: Added support for ISP82XX") Cc: Nilesh Javali <[email protected]> Cc: Manish Rangankar <[email protected]> Cc: <[email protected]> Reviewed-by: Daniel Wagner <[email protected]> Signed-off-by: Ahmed S. Darwish <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions