From: Marc Zyngier <marc.zyngier@arm.com>
To: Bjorn Helgaas <helgaas@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: shpchp: Fix probing logic inversion
Date: Mon, 25 Jun 2018 17:18:40 +0100 [thread overview]
Message-ID: <62eb1a4b-2ec9-b472-a277-33ddc5952348@arm.com> (raw)
In-Reply-To: <20180625140122.GF108993@bhelgaas-glaptop.roam.corp.google.com>
Bjorn, Mika,
On 25/06/18 15:01, Bjorn Helgaas wrote:
> Hi Marc,
>
> Sorry we broke this!
No worries, gave me a chance to stare at something else! ;-)
>
> On Thu, Jun 21, 2018 at 05:47:15PM +0100, Marc Zyngier wrote:
>> Until recently, shpc_probe() would bail out pretty early in the
>> absence of the SHPC capability. A logic change in the way the
>> driver now checks that capability makes it go and probe the
>> firmware anyway, with ugly consequences if the system is not
>> ACPI based (my arm64 ThunderX is DT driven, and explodes in
>> a spectacular way after getting a NULL root bridge from the
>> non-existent ACPI tables...).
>>
>> Take this opportunity to move the call to shpchp_is_native()
>> back into shpc_probe(), making it clear that a non-ACPI system
>> is not expected to use this driver.
>
> But a non-ACPI system *should* be able to use SHPC.
Yeah, I only realized that once Mika pointed it out.
> Here's my understanding of how it should work. On an ACPI system,
>
> - If firmware has _OSC, the OS calls it to request permission to
> manage the SHPC. If _OSC grants permission, it should also
> configure the hardware (interrupts, etc) to give the OS.
>
> - If there's no _OSC, shpchp assumes it's allowed to manage the
> SHPC, and it calls OSHP to configure the hardware appropriately.
>
> On a non-ACPI system, shpchp assumes there's no firmware involved at
> all, so it can manage the SHPC without doing anything special.
>
> I see Mika has already posted a patch similar to the first one
> below; I think either of those should fix the problem you're seeing.
Absolutely. With this early exit when root is NULL, my test box is back
up and running.
> The second is an attempt to clean things up so they make a
> little more sense.
I haven't tried that second patch yet, but from reading it, it
definitely helps making sense of this driver.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
prev parent reply other threads:[~2018-06-25 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 16:47 Marc Zyngier
2018-06-25 12:52 ` Mika Westerberg
2018-06-25 13:13 ` Marc Zyngier
2018-06-25 13:33 ` Mika Westerberg
2018-06-25 14:01 ` Bjorn Helgaas
2018-06-25 16:18 ` Marc Zyngier [this message]
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=62eb1a4b-2ec9-b472-a277-33ddc5952348@arm.com \
--to=marc.zyngier@arm.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mika.westerberg@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®