From: Peter Hurley <peter@hurleysoftware.com>
To: Aaron Sierra <asierra@xes-inc.com>
Cc: Peter Tyser <ptyser@xes-inc.com>,
Samuel Ortiz <sameo@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] drivers: mfd: Fix resource request for [mem 0x00000000]
Date: Thu, 08 Nov 2012 13:24:23 -0500 [thread overview]
Message-ID: <1352399063.2309.6.camel@thor> (raw)
In-Reply-To: <cd909a40-1ba3-471e-b6c4-b54432a626df@zimbra>
On Thu, 2012-11-08 at 11:04 -0600, Aaron Sierra wrote:
> > The older southbridges supported by the lpc_ich driver do not
> > provide memory-mapped space of the root complex. The driver
> > correctly avoids computing the iomem address in this case, yet
> > submits a zeroed resource request anyway (via mfd_add_devices()).
> >
> > Remove the iomem resource from the resource array submitted to the
> > mfd core for the older southbridges.
> >
>
> Peter, thanks for catching this.
>
> > + } else {
> > + /* So don't register iomem for TCO ver 1 */
> > + --lpc_ich_cells[LPC_WDT].num_resources;
>
> My only complaint is that pre-decrementing num_resources isn't
> necessary and doesn't match the other cases where num_resources is
> decremented (post-decremented), like here:
>
> if (!base_addr) {
> dev_err(&dev->dev, "I/O space for ACPI uninitialized\n");
> lpc_ich_cells[LPC_GPIO].num_resources--;
> goto gpe0_done;
> }
Sorry, C++ force-of-habit. How's this instead? (please note, I also
retitled the patch to refer to lpc_ich specifically)
-- >8 --
Subject: [PATCH v2 5/5] mfd: lpc_ich: Fix resource request for [mem 0x00000000]
The older southbridges supported by the lpc_ich driver do not
provide memory-mapped space of the root complex. The driver
correctly avoids computing the iomem address in this case, yet
submits a zeroed resource request anyway (via mfd_add_devices()).
Remove the iomem resource from the resource array submitted to the
mfd core for the older southbridges.
Cc: Aaron Sierra <asierra@xes-inc.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
v2: post-decrement to match existing style
retitle patch subject
drivers/mfd/lpc_ich.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index a22544f..f507c09 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -842,6 +842,9 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev,
res = wdt_mem_res(ICH_RES_MEM_GCS);
res->start = base_addr + ACPIBASE_GCS_OFF;
res->end = base_addr + ACPIBASE_GCS_END;
+ } else {
+ /* So don't register iomem for TCO ver 1 */
+ lpc_ich_cells[LPC_WDT].num_resources--;
}
lpc_ich_finalize_cell(&lpc_ich_cells[LPC_WDT], id);
--
1.8.0
next prev parent reply other threads:[~2012-11-08 18:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 2:55 [PATCH 0/5] Add diagnostics for iomem resources Peter Hurley
2012-11-08 2:55 ` [PATCH 1/5] resources: Print resource ranges when expanding overlaps Peter Hurley
2012-11-08 2:55 ` [PATCH 2/5] resources: Print resource conflicts for failed requests Peter Hurley
2012-11-08 2:55 ` [PATCH 3/5] resources: Print warning when inserting resource [mem 0x00000000] Peter Hurley
2012-11-08 2:55 ` [PATCH 4/5] x86: acpi: Print warning for malformed host bridge resources Peter Hurley
2012-11-10 21:52 ` Bjorn Helgaas
2012-11-11 14:49 ` Peter Hurley
2012-12-14 12:51 ` Peter Hurley
2012-11-08 2:55 ` [PATCH 5/5] drivers: mfd: Fix resource request for [mem 0x00000000] Peter Hurley
2012-11-08 17:04 ` Aaron Sierra
2012-11-08 18:24 ` Peter Hurley [this message]
2012-11-08 18:58 ` Aaron Sierra
2012-11-09 11:55 ` [PATCH v3] mfd: lpc_ich: " Peter Hurley
2012-11-19 17:46 ` Samuel Ortiz
2012-11-19 18:28 ` Peter Hurley
2012-11-21 16:33 ` Samuel Ortiz
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=1352399063.2309.6.camel@thor \
--to=peter@hurleysoftware.com \
--cc=asierra@xes-inc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ptyser@xes-inc.com \
--cc=sameo@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 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.