[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SN7PR12MB7201C9D05D5E4AB4D5D091F88BF62@SN7PR12MB7201.namprd12.prod.outlook.com>
Date: Thu, 6 Feb 2025 16:07:23 +0000
From: "Havalige, Thippeswamy" <thippeswamy.havalige@....com>
To: Markus Elfring <Markus.Elfring@....de>, "linux-pci@...r.kernel.org"
<linux-pci@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, Bjorn Helgaas <bhelgaas@...gle.com>, Conor
Dooley <conor+dt@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>, Lorenzo Pieralisi
<lpieralisi@...nel.org>, Manivannan Sadhasivam
<manivannan.sadhasivam@...aro.org>, Rob Herring <robh@...nel.org>
CC: LKML <linux-kernel@...r.kernel.org>, "Gogada, Bharat Kumar"
<bharat.kumar.gogada@....com>, Jingoo Han <jingoohan1@...il.com>, "Simek,
Michal" <michal.simek@....com>
Subject: RE: [PATCH v8 3/3] PCI: amd-mdb: Add AMD MDB Root Port driver
Hi @Markus Elfring
> -----Original Message-----
> From: Markus Elfring <Markus.Elfring@....de>
> Sent: Wednesday, February 5, 2025 8:40 PM
> To: Havalige, Thippeswamy <thippeswamy.havalige@....com>; linux-
> pci@...r.kernel.org; devicetree@...r.kernel.org; Bjorn Helgaas
> <bhelgaas@...gle.com>; Conor Dooley <conor+dt@...nel.org>; Krzysztof
> Kozlowski <krzk+dt@...nel.org>; Krzysztof Wilczyński <kw@...ux.com>;
> Lorenzo Pieralisi <lpieralisi@...nel.org>; Manivannan Sadhasivam
> <manivannan.sadhasivam@...aro.org>; Rob Herring <robh@...nel.org>
> Cc: LKML <linux-kernel@...r.kernel.org>; Gogada, Bharat Kumar
> <bharat.kumar.gogada@....com>; Jingoo Han <jingoohan1@...il.com>;
> Simek, Michal <michal.simek@....com>
> Subject: Re: [PATCH v8 3/3] PCI: amd-mdb: Add AMD MDB Root Port driver
>
> …
> > +++ b/drivers/pci/controller/dwc/pcie-amd-mdb.c
> > @@ -0,0 +1,476 @@
> …
> > +static void amd_mdb_mask_intx_irq(struct irq_data *data)
> > +{
> …
> > + raw_spin_lock_irqsave(&port->lock, flags);
> > + val = pcie_read(pcie, AMD_MDB_TLP_IR_MASK_MISC);
> > + pcie_write(pcie, (val & (~mask)), AMD_MDB_TLP_IR_ENABLE_MISC);
> > + raw_spin_unlock_irqrestore(&port->lock, flags);
> > +}
> …
>
> Under which circumstances would you become interested to apply a
> statement
> like “guard(raw_spinlock_irqsave)(&port->lock);”?
> https://elixir.bootlin.com/linux/v6.13.1/source/include/linux/spinlock.h#L551
-Thanks for review comments, raw_spin_lock_irqsave is lightweight and performance oriented.
Achieves it by not performing few checks related to preemption, lock deprecation that was originally in spin_lock_irqsave.
If you add guard around guard around the raw_spin_lock_irqsave then it should provide those additional safety checks.
Its need is based on the environment, if you needs those checks/features.
We need to check the implementation/code to exactly see what are those. So choose to prevent my interrupt handler from
being affected by latency pruning
>
> Regards,
> Markus
Powered by blists - more mailing lists