From: Bjorn Helgaas <helgaas@kernel.org>
To: Prabhakar Kushwaha <prabhakar.pkin@gmail.com>
Cc: Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
Ganapatrao Prabhakerrao Kulkarni <gkulkarni@marvell.com>,
Myron Stowe <myron.stowe@redhat.com>,
Vijay Mohan Pandarathil <vijaymohan.pandarathil@hp.com>,
Marc Zyngier <maz@kernel.org>,
Bhupesh Sharma <bhsharma@redhat.com>,
kexec mailing list <kexec@lists.infradead.org>,
Robin Murphy <robin.murphy@arm.com>,
linux-pci@vger.kernel.org,
Prabhakar Kushwaha <pkushwaha@marvell.com>,
Will Deacon <will@kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH][v2] iommu: arm-smmu-v3: Copy SMMU table for kdump kernel
Date: Thu, 11 Jun 2020 18:03:23 -0500 [thread overview]
Message-ID: <20200611230323.GA1616315@bjorn-Precision-5520> (raw)
In-Reply-To: <CAJ2QiJJ58nWe_vpjLWoFuM7s-7f7H-40q-4r-aGqorKPy9EPQw@mail.gmail.com>
On Sun, Jun 07, 2020 at 02:00:35PM +0530, Prabhakar Kushwaha wrote:
> On Thu, Jun 4, 2020 at 5:32 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Wed, Jun 03, 2020 at 11:12:48PM +0530, Prabhakar Kushwaha wrote:
> > > On Sat, May 30, 2020 at 1:03 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > > On Fri, May 29, 2020 at 07:48:10PM +0530, Prabhakar Kushwaha wrote:
<snip>
> > > > > diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
> > > > > index 117c0a2b2ba4..26b908f55aef 100644
> > > > > --- a/drivers/pci/pcie/err.c
> > > > > +++ b/drivers/pci/pcie/err.c
> > > > > @@ -66,6 +66,20 @@ static int report_error_detected(struct pci_dev *dev,
> > > > > if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
> > > > > vote = PCI_ERS_RESULT_NO_AER_DRIVER;
> > > > > pci_info(dev, "can't recover (no
> > > > > error_detected callback)\n");
> > > > > +
> > > > > + pci_save_state(dev);
> > > > > + pci_cfg_access_lock(dev);
> > > > > +
> > > > > + /* Quiesce the device completely */
> > > > > + pci_write_config_word(dev, PCI_COMMAND,
> > > > > + PCI_COMMAND_INTX_DISABLE);
> > > > > + if (!__pci_reset_function_locked(dev)) {
> > > > > + vote = PCI_ERS_RESULT_RECOVERED;
> > > > > + pci_info(dev, "recovered via pci level
> > > > > reset\n");
> > > > > + }
> >
> > So I guess we *do* need to save the state before the reset and restore
> > it (either that or enumerate the device from scratch just like we
> > would if it had been hot-added). I'm not really thrilled with trying
> > to save the state after the device has already reported an error. I'd
> > rather do it earlier, maybe during enumeration, like in
> > pci_init_capabilities(). But I don't understand all the subtleties of
> > dev->state_saved, so that requires some legwork.
>
> I tried moving pci_save_state earlier. All observations are the same
> as mentioned in earlier discussions.
By "legwork", I didn't mean just trying things to see whether they
seem to work. I meant researching the history to find out *why* it's
designed the way it is so that when we change it, we don't break
things.
For example, these commits are obviously important to understand:
aa8c6c93747f ("PCI PM: Restore standard config registers of all devices early")
c82f63e411f1 ("PCI: check saved state before restore")
4b77b0a2ba27 ("PCI: Clear saved_state after the state has been restored")
I think we need to step back and separate this AER issue from the
whole SMMU table copying thing. Then do the research and start a
new thread with a patch to fix just the AER issue.
The ARM guys would probably be grateful to be dropped from the AER
thread because it really has nothing to do with ARM.
Bjorn
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-06-11 23:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 2:46 [PATCH][v2] iommu: arm-smmu-v3: Copy SMMU table for kdump kernel Prabhakar Kushwaha
2020-05-12 22:03 ` Bjorn Helgaas
2020-05-14 7:17 ` Prabhakar Kushwaha
2020-05-19 23:22 ` Bjorn Helgaas
2020-05-21 3:58 ` Prabhakar Kushwaha
2020-05-21 22:49 ` Bjorn Helgaas
2020-05-27 11:44 ` Prabhakar Kushwaha
2020-05-27 20:18 ` Bjorn Helgaas
2020-05-29 14:18 ` Prabhakar Kushwaha
2020-05-29 19:33 ` Bjorn Helgaas
2020-06-03 17:42 ` Prabhakar Kushwaha
2020-06-04 0:02 ` Bjorn Helgaas
2020-06-07 8:30 ` Prabhakar Kushwaha
2020-06-11 23:03 ` Bjorn Helgaas [this message]
2020-05-18 15:55 ` Will Deacon
2020-05-19 2:54 ` Prabhakar Kushwaha
2020-05-21 9:23 ` Will Deacon
2020-05-21 11:22 ` Prabhakar Kushwaha
2020-06-01 7:39 ` Will Deacon
2020-06-02 14:04 ` Prabhakar Kushwaha
2020-06-08 11:41 ` Will Deacon
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=20200611230323.GA1616315@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=bhsharma@redhat.com \
--cc=gkulkarni@marvell.com \
--cc=kexec@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=maz@kernel.org \
--cc=myron.stowe@redhat.com \
--cc=pkushwaha@marvell.com \
--cc=prabhakar.pkin@gmail.com \
--cc=robin.murphy@arm.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=vijaymohan.pandarathil@hp.com \
--cc=will@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox