Thread (5 messages) flat view 5 messages, 3 authors, 2021-08-27

Re: [PATCH net] net: dsa: mv88e6xxx: stop calling irq_domain_add_simple with the reg_lock held

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-08-27 18:34:39

On Fri, Aug 27, 2021 at 09:01:01PM +0300, Vladimir Oltean wrote:
The mv88e6xxx IRQ setup code has some pretty horrible locking patterns,
and wrong.
I agree about the patterns. But it has been lockdep clean, i spent a
while testing it, failed probes, unloads etc, and adding comments.

I suspect it is now wrong because of core changes.
Only hardware access should need the register lock, and this in itself
is for the mv88e6xxx_smi_indirect_ops to work properly and nothing more,
unless I'm misunderstanding something
Historically, reg_lock has been used to serialize all access to the
hardware across entries points into the driver. Not everything takes
rtnl lock. Clearly, interrupts don't. I don't know if PTP takes it. In
the past there was been hwmon code, etc. The reg_lock is used to
serialize all this. The patterns of all entry points into the driver
taking the lock has in general worked well. Just interrupt code is a
pain.
Fixes: dc30c35be720 ("net: dsa: mv88e6xxx: Implement interrupt support.")
As i said, i suspect this is the wrong commit. You need to look at
changes to the interrupt core. There is even a danger that if this
gets backported too far, it could add deadlocks.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help