public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Linux PCI <linux-pci@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Hanjun Guo <hanjun.guo@linaro.org>,
	Jiang Liu <jiang.liu@linux.intel.com>,
	Tony Luck <tony.luck@intel.com>, Tomasz Nowicki <tn@semihalf.com>,
	Mark Salter <msalter@redhat.com>
Subject: Re: [PATCH v3] PCI: ACPI: IA64: fix IO port generic range check
Date: Tue, 22 Mar 2016 14:42:58 +0000	[thread overview]
Message-ID: <6828228.erfiER1Ahm@vostro.rjw.lan> (raw)
In-Reply-To: <20160322130219.GB19418@localhost>

On Tuesday, March 22, 2016 08:02:19 AM Bjorn Helgaas wrote:
> On Mon, Mar 21, 2016 at 01:42:01PM +0100, Rafael J. Wysocki wrote:
> > On Mon, Mar 21, 2016 at 12:12 PM, Lorenzo Pieralisi

[cut]

> > >
> > > Fixes: 3772aea7d6f3 ("ia64/PCI/ACPI: Use common ACPI resource parsing
> > > interface for host bridge")
> > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > > Cc: Hanjun Guo <hanjun.guo@linaro.org>
> > > Cc: Jiang Liu <jiang.liu@linux.intel.com>
> > > Cc: Tony Luck <tony.luck@intel.com>
> > > Cc: Tomasz Nowicki <tn@semihalf.com>
> > > Cc: Mark Salter <msalter@redhat.com>
> > > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > > ---
> > > v2 -> v3
> > >
> > > - Moved IO resource check to generic ACPI resource code
> > > - Dropped Tested-by tags
> > > - Rebased against v4.5
> > >
> > > v2: https://marc.info/?l=linux-acpi&m\x145521271330332&w=2
> > >
> > > v1 -> v2
> > >
> > > - Updated commit log to report missing IO resources
> > > - Fixed function ioport_valid() comment 16k/64k typo
> > >
> > > v1: https://marc.info/?l=linux-acpi&m\x145432228025354&w=2
> > >
> > >  drivers/acpi/resource.c | 14 +++++++++++++-
> > >  1 file changed, 13 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> > > index d02fd53..56241eb 100644
> > > --- a/drivers/acpi/resource.c
> > > +++ b/drivers/acpi/resource.c
> > > @@ -27,8 +27,20 @@
> > >
> > >  #ifdef CONFIG_X86
> > >  #define valid_IRQ(i) (((i) != 0) && ((i) != 2))
> > > +static inline bool acpi_iospace_resource_valid(struct resource *res)
> > > +{
> > > +       /* On X86 IO space is limited to the [0 - 64K] IO port range */
> > > +       return res->end < 0x10003;
> > > +}
> > >  #else
> > >  #define valid_IRQ(i) (true)
> > > +/*
> > > + * ACPI IO descriptors on arches other than X86 contain MMIO CPU physical
> > > + * addresses mapping IO space in CPU physical address space, IO space
> > > + * resources can be placed anywhere in the 64-bit physical address space.
> > > + */
> > > +static inline bool
> > > +acpi_iospace_resource_valid(struct resource *res) { return true; }
> > >  #endif
> > >
> > >  static bool acpi_dev_resource_len_valid(u64 start, u64 end, u64 len, bool io)
> > > @@ -127,7 +139,7 @@ static void acpi_dev_ioresource_flags(struct resource *res, u64 len,
> > >         if (!acpi_dev_resource_len_valid(res->start, res->end, len, true))
> > >                 res->flags |= IORESOURCE_DISABLED | IORESOURCE_UNSET;
> > >
> > > -       if (res->end >= 0x10003)
> > > +       if (!acpi_iospace_resource_valid(res))
> > >                 res->flags |= IORESOURCE_DISABLED | IORESOURCE_UNSET;
> > >
> > >         if (io_decode = ACPI_DECODE_16)
> > > --
> > 
> > This is fine by me.
> > 
> > Bjorn?
> 
> Looks good to me.

OK, thanks!

May I take this as an ACK? :-)


  reply	other threads:[~2016-03-22 14:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 11:12 [PATCH v3] PCI: ACPI: IA64: fix IO port generic range check Lorenzo Pieralisi
2016-03-21 12:42 ` Rafael J. Wysocki
2016-03-22 13:02   ` Bjorn Helgaas
2016-03-22 14:42     ` Rafael J. Wysocki [this message]
2016-03-23  8:35 ` Hanjun Guo

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=6828228.erfiER1Ahm@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=bhelgaas@google.com \
    --cc=hanjun.guo@linaro.org \
    --cc=helgaas@kernel.org \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=msalter@redhat.com \
    --cc=rafael@kernel.org \
    --cc=tn@semihalf.com \
    --cc=tony.luck@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