Re: [PATCH net-next v2 10/15] net: lan969x: add PTP handler function
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-11-01 00:16:15
Also in:
linux-devicetree, lkml, netdev
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-11-01 00:16:15
Also in:
linux-devicetree, lkml, netdev
On Thu, 31 Oct 2024 09:36:28 +0000 Daniel Machon wrote:
quoted
For a followup for both drivers -- you're mixing irqsave and bare spin_lock() here. The _irqsave/_irqrestore is not necessary, let's drop it.quoted
+ spin_lock(&sparx5->ptp_ts_id_lock);Hi Jakub, I agree it seems wrong to mix these. I just talked to Horatiu, and he mentioned posting a similar fix for the lan966x driver some time ago [1]. Only this fix added _irqsave/_irqrestore to the ptp_ts_id_lock - so basically the opposite of what you are suggesting. Why do you think that the _irqsave/_irqrestore is not necessary?
Oh, I thought this is a real IRQ handler, not a threaded one. I haven't read the code to figure out whether ptp_ts_id_lock needs to be IRQ-safe, but in other places you lock if _irqsave so yes, let's irqsave here, too.