From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linaro-acpi@lists.linaro.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 2/2] ACPI: Ignore Consumer/Producer for QWord/DWord/Word Address Space
Date: Wed, 30 Nov 2016 16:24:36 +0000 [thread overview]
Message-ID: <20161130162436.GA9093@red-moon> (raw)
In-Reply-To: <20161130155616.GA9693@bhelgaas-glaptop.roam.corp.google.com>
On Wed, Nov 30, 2016 at 09:56:17AM -0600, Bjorn Helgaas wrote:
> On Wed, Nov 30, 2016 at 12:04:25PM +0000, Lorenzo Pieralisi wrote:
> > On Tue, Nov 29, 2016 at 12:43:34PM -0600, Bjorn Helgaas wrote:
> > > Per ACPI spec r6.0, sec 6.4.3.5.1, 2, 3, Bit [0] of General Flags (the
> > > Consumer/Producer bit) should be ignored for QWord/DWord/Word Address Space
> > > descriptors. The Consumer/Producer bit is defined only for the Extended
> > > Address Space descriptor.
> > >
> > > Ignore Consumer/Producer except for Extended Address Space descriptors.
> > >
> > > Note that for QWord/DWord/Word descriptors, we previously applied the
> > > translation offset (_TRA) only when the Consumer/Producer bit was set.
> >
> > "..Consumer/Producer bit was clear" ? If that bit was set:
> >
> > struct acpi_resource_address->producer_consumer == ACPI_CONSUMER
> >
> > and we are not applying the _TRA offset in that case, right ?
>
> Right, of course. How about this instead?
>
> Note that for QWord/DWord/Word descriptors, we previously applied the
> translation offset (_TRA) only for Producers, i.e., when the Consumer/
> Producer bit was clear. This patch changes that: for those descriptors,
> we ignore Consumer/Producer and always apply the translation offset.
Yes that's a perfect description, thanks a lot !
Lorenzo
> > > This patch changes that: for those descriptors, we ignore Consumer/Producer
> > > and always apply the translation offset.
> > >
> > > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> > > ---
> > > drivers/acpi/resource.c | 16 +++++++++++-----
> > > 1 file changed, 11 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> > > index 2732d39e..b45cd8f 100644
> > > --- a/drivers/acpi/resource.c
> > > +++ b/drivers/acpi/resource.c
> > > @@ -261,11 +261,16 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares,
> > > * primary side. Non-bridge devices must list 0 for all Address
> > > * Translation offset bits.
> > > */
> > > - if (addr->producer_consumer == ACPI_PRODUCER)
> > > + if (ares->type == ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64) {
> > > + if (addr->producer_consumer == ACPI_PRODUCER)
> > > + offset = attr->translation_offset;
> > > + else if (attr->translation_offset)
> > > + pr_debug("ACPI: translation_offset(%lld) is invalid for non-bridge device.\n",
> > > + attr->translation_offset);
> > > + } else {
> > > offset = attr->translation_offset;
> > > - else if (attr->translation_offset)
> > > - pr_debug("ACPI: translation_offset(%lld) is invalid for non-bridge device.\n",
> > > - attr->translation_offset);
> > > + }
> > > +
> > > start = attr->minimum + offset;
> > > end = attr->maximum + offset;
> > >
> > > @@ -294,7 +299,8 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares,
> > > return false;
> > > }
> > >
> > > - if (addr->producer_consumer == ACPI_PRODUCER)
> > > + if (ares->type == ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 &&
> > > + addr->producer_consumer == ACPI_PRODUCER)
> > > res->flags |= IORESOURCE_WINDOW;
> > >
> > > if (addr->info.mem.caching == ACPI_PREFETCHABLE_MEMORY)
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ACPI: Ignore Consumer/Producer for QWord/DWord/Word Address Space
Date: Wed, 30 Nov 2016 16:24:36 +0000 [thread overview]
Message-ID: <20161130162436.GA9093@red-moon> (raw)
In-Reply-To: <20161130155616.GA9693@bhelgaas-glaptop.roam.corp.google.com>
On Wed, Nov 30, 2016 at 09:56:17AM -0600, Bjorn Helgaas wrote:
> On Wed, Nov 30, 2016 at 12:04:25PM +0000, Lorenzo Pieralisi wrote:
> > On Tue, Nov 29, 2016 at 12:43:34PM -0600, Bjorn Helgaas wrote:
> > > Per ACPI spec r6.0, sec 6.4.3.5.1, 2, 3, Bit [0] of General Flags (the
> > > Consumer/Producer bit) should be ignored for QWord/DWord/Word Address Space
> > > descriptors. The Consumer/Producer bit is defined only for the Extended
> > > Address Space descriptor.
> > >
> > > Ignore Consumer/Producer except for Extended Address Space descriptors.
> > >
> > > Note that for QWord/DWord/Word descriptors, we previously applied the
> > > translation offset (_TRA) only when the Consumer/Producer bit was set.
> >
> > "..Consumer/Producer bit was clear" ? If that bit was set:
> >
> > struct acpi_resource_address->producer_consumer == ACPI_CONSUMER
> >
> > and we are not applying the _TRA offset in that case, right ?
>
> Right, of course. How about this instead?
>
> Note that for QWord/DWord/Word descriptors, we previously applied the
> translation offset (_TRA) only for Producers, i.e., when the Consumer/
> Producer bit was clear. This patch changes that: for those descriptors,
> we ignore Consumer/Producer and always apply the translation offset.
Yes that's a perfect description, thanks a lot !
Lorenzo
> > > This patch changes that: for those descriptors, we ignore Consumer/Producer
> > > and always apply the translation offset.
> > >
> > > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> > > ---
> > > drivers/acpi/resource.c | 16 +++++++++++-----
> > > 1 file changed, 11 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> > > index 2732d39e..b45cd8f 100644
> > > --- a/drivers/acpi/resource.c
> > > +++ b/drivers/acpi/resource.c
> > > @@ -261,11 +261,16 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares,
> > > * primary side. Non-bridge devices must list 0 for all Address
> > > * Translation offset bits.
> > > */
> > > - if (addr->producer_consumer == ACPI_PRODUCER)
> > > + if (ares->type == ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64) {
> > > + if (addr->producer_consumer == ACPI_PRODUCER)
> > > + offset = attr->translation_offset;
> > > + else if (attr->translation_offset)
> > > + pr_debug("ACPI: translation_offset(%lld) is invalid for non-bridge device.\n",
> > > + attr->translation_offset);
> > > + } else {
> > > offset = attr->translation_offset;
> > > - else if (attr->translation_offset)
> > > - pr_debug("ACPI: translation_offset(%lld) is invalid for non-bridge device.\n",
> > > - attr->translation_offset);
> > > + }
> > > +
> > > start = attr->minimum + offset;
> > > end = attr->maximum + offset;
> > >
> > > @@ -294,7 +299,8 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares,
> > > return false;
> > > }
> > >
> > > - if (addr->producer_consumer == ACPI_PRODUCER)
> > > + if (ares->type == ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 &&
> > > + addr->producer_consumer == ACPI_PRODUCER)
> > > res->flags |= IORESOURCE_WINDOW;
> > >
> > > if (addr->info.mem.caching == ACPI_PREFETCHABLE_MEMORY)
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> > > the body of a message to majordomo at vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2016-11-30 16:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 18:43 [PATCH 0/2] ACPI: Ignore Consumer/Producer for QWord/DWord/Word Address Space Bjorn Helgaas
2016-11-29 18:43 ` Bjorn Helgaas
2016-11-29 18:43 ` Bjorn Helgaas
2016-11-29 18:43 ` [PATCH 1/2] ACPI: Combine acpi_dev_resource_address_space() and acpi_dev_resource_ext_address_space() Bjorn Helgaas
2016-11-29 18:43 ` Bjorn Helgaas
2016-11-29 18:43 ` [PATCH 2/2] ACPI: Ignore Consumer/Producer for QWord/DWord/Word Address Space Bjorn Helgaas
2016-11-29 18:43 ` Bjorn Helgaas
2016-11-30 12:04 ` Lorenzo Pieralisi
2016-11-30 12:04 ` Lorenzo Pieralisi
2016-11-30 12:04 ` Lorenzo Pieralisi
2016-11-30 15:56 ` Bjorn Helgaas
2016-11-30 15:56 ` Bjorn Helgaas
2016-11-30 15:56 ` Bjorn Helgaas
2016-11-30 16:24 ` Lorenzo Pieralisi [this message]
2016-11-30 16:24 ` Lorenzo Pieralisi
2016-11-29 20:56 ` [PATCH 0/2] " Rafael J. Wysocki
2016-11-29 20:56 ` Rafael J. Wysocki
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=20161130162436.GA9093@red-moon \
--to=lorenzo.pieralisi@arm.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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 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.