summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2023-05-22 15:41:21 +0200
committerJakub Kicinski <kuba@kernel.org>2023-05-23 20:38:12 -0700
commitd6c36cbc5e533f48bd89a7b5f339bd82b8b4378a (patch)
treeb8937bd5c6eda3399d294779d443ca571c573f4c /net/core
parent368d3cb406cdd074d1df2ad9ec06d1bfcb664882 (diff)
downloadlinux-d6c36cbc5e533f48bd89a7b5f339bd82b8b4378a.tar.gz
linux-d6c36cbc5e533f48bd89a7b5f339bd82b8b4378a.tar.bz2
linux-d6c36cbc5e533f48bd89a7b5f339bd82b8b4378a.zip
r8169: Use a raw_spinlock_t for the register locks.
The driver's interrupt service routine is requested with the IRQF_NO_THREAD if MSI is available. This means that the routine is invoked in hardirq context even on PREEMPT_RT. The routine itself is relatively short and schedules a worker, performs register access and schedules NAPI. On PREEMPT_RT, scheduling NAPI from hardirq results in waking ksoftirqd for further processing so using NAPI threads with this driver is highly recommended since it NULL routes the threaded-IRQ efforts. Adding rtl_hw_aspm_clkreq_enable() to the ISR is problematic on PREEMPT_RT because the function uses spinlock_t locks which become sleeping locks on PREEMPT_RT. The locks are only used to protect register access and don't nest into other functions or locks. They are also not used for unbounded period of time. Therefore it looks okay to convert them to raw_spinlock_t. Convert the three locks which are used from the interrupt service routine to raw_spinlock_t. Fixes: e1ed3e4d9111 ("r8169: disable ASPM during NAPI poll") Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/20230522134121.uxjax0F5@linutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions