From: Bjorn Helgaas <helgaas@kernel.org>
To: Paul Burton <paulburton@kernel.org>
Cc: Krzysztof Wilczynski <kw@linux.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: piix4-poweroff.c I/O BAR usage
Date: Wed, 20 May 2020 08:57:08 -0500 [thread overview]
Message-ID: <20200520135708.GA1086370@bjorn-Precision-5520> (raw)
Hi Paul,
This looks like it might be a bug:
static const int piix4_pm_io_region = PCI_BRIDGE_RESOURCES;
static int piix4_poweroff_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{
...
/* Request access to the PIIX4 PM IO registers */
res = pci_request_region(dev, piix4_pm_io_region,
"PIIX4 PM IO registers");
pci_request_region() takes a BAR number (0-5), but here we're passing
PCI_BRIDGE_RESOURCES (13 if CONFIG_PCI_IOV, or 7 otherwise), which is
the bridge I/O window.
I don't think this device ([8086:7113]) is a bridge, so that resource
should be empty.
Based on this spec:
https://www.intel.com/Assets/PDF/datasheet/290562.pdf,
it looks like it should be the PIIX4 power management function at
function 3, which has no standard PCI BARs but does have a PMBA (Power
Management Base Address) at 0x40 and an SMBBA (SMBus Base Address) at
0x90 in config space.
I suppose on an ACPI system the regions described by PMBA and SMBBA
might be described via ACPI, since they're not discoverable by
standard PCI enumeration? Pretty sure you don't have ACPI on MIPS
though.
Maybe the driver should read PMBA and SMBBA and reserve those regions
by hand with request_region()?
Bjorn
next reply other threads:[~2020-05-20 13:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 13:57 Bjorn Helgaas [this message]
2020-05-22 1:04 ` piix4-poweroff.c I/O BAR usage Maciej W. Rozycki
2020-05-22 5:23 ` Paul Burton
2020-05-22 12:32 ` Maciej W. Rozycki
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=20200520135708.GA1086370@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=paulburton@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