From: Lukas Wunner <lukas@wunner.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Keith Busch <kbusch@kernel.org>,
Linux PCI <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Sinan Kaya <okaya@kernel.org>, Thomas Tai <thomas.tai@oracle.com>,
poza@codeaurora.org, Christoph Hellwig <hch@lst.de>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
Oliver O'Halloran <oohall@gmail.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCHv3 09/10] PCI: Unify device inaccessible
Date: Fri, 18 Apr 2025 05:55:05 +0200 [thread overview]
Message-ID: <aAHNGT60lleXqnW6@wunner.de> (raw)
In-Reply-To: <e0606dfcf8780bf994432dc373581fdf0af18f8e.camel@kernel.crashing.org>
[cc += PowerPC / EEH maintainers]
Hi Ben,
On Tue, Sep 25, 2018 at 11:10:01AM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2018-09-18 at 17:57 -0600, Keith Busch wrote:
> > + * pci_dev_set_io_state - Set the new error state if possible.
> > + *
> > + * @dev - pci device to set new error_state
> > + * @new - the state we want dev to be in
> > + *
> > + * Must be called with device_lock held.
>
> Any reason why you don't do cmpxchg as I originally suggested (sorry
> I've been away and may have missed some previous emails)
>
> This won't work for PowerPC EEH. We will change the state from a
> readl() so at interrupt time or any other context.
>
> We really need the cmpxchg variant.
Independently from your request, pci_dev_set_io_state() was
converted to cmpxchg() in 2023 with commit 74ff8864cc84
("PCI: hotplug: Allow marking devices as disconnected during
bind/unbind").
So you may now amend EEH to use pcie_do_recovery() or whatever
you needed this for.
I had kept your e-mail in my inbox as a reminder that there's a
remaining issue here and just came across it while clearing out
other messages.
Thanks,
Lukas
next prev parent reply other threads:[~2025-04-18 3:55 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 23:56 [PATCHv3 00/10] PCI error handling Keith Busch
2018-09-18 23:56 ` [PATCHv3 01/10] PCI/portdrv: Use subsys_init for service drivers Keith Busch
2018-09-19 16:28 ` Bjorn Helgaas
2018-09-19 17:05 ` Keith Busch
2018-09-19 18:00 ` Keith Busch
2018-09-19 19:40 ` Bjorn Helgaas
2018-09-19 20:17 ` Keith Busch
2018-09-18 23:56 ` [PATCHv3 02/10] PCI/portdrv: Restore pci state on slot reset Keith Busch
2018-09-18 23:56 ` [PATCHv3 03/10] PCI/AER: Take reference on error devices Keith Busch
2018-09-18 23:56 ` [PATCHv3 04/10] PCI/ERR: Use slot reset if available Keith Busch
2018-09-18 23:56 ` [PATCHv3 05/10] PCI/ERR: Handle fatal error recovery Keith Busch
2018-09-19 15:46 ` Bjorn Helgaas
2018-09-19 15:52 ` Keith Busch
2018-09-18 23:56 ` [PATCHv3 06/10] PCI/ERR: Always use the first downstream port Keith Busch
2018-09-18 23:56 ` [PATCHv3 07/10] PCI/ERR: Simplify broadcast callouts Keith Busch
2018-09-18 23:57 ` [PATCHv3 08/10] PCI/ERR: Report current recovery status for udev Keith Busch
2018-09-18 23:57 ` [PATCHv3 09/10] PCI: Unify device inaccessible Keith Busch
2018-09-25 1:10 ` Benjamin Herrenschmidt
2018-09-25 15:35 ` Keith Busch
2018-09-25 19:28 ` Benjamin Herrenschmidt
2025-04-18 3:55 ` Lukas Wunner [this message]
2018-09-18 23:57 ` [PATCHv3 10/10] PCI: Make link active reporting detection generic Keith Busch
2018-09-19 16:42 ` Sinan Kaya
2018-09-19 16:46 ` Sinan Kaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aAHNGT60lleXqnW6@wunner.de \
--to=lukas@wunner.de \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mpe@ellerman.id.au \
--cc=okaya@kernel.org \
--cc=oohall@gmail.com \
--cc=poza@codeaurora.org \
--cc=thomas.tai@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.