From: Bjorn Helgaas <bhelgaas@google.com>
To: tianyu.lan@intel.com
Cc: lenb@kernel.org, rjw@sisk.pl, yinghai@kernel.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Resend PATCH 2/5] ACPI/Resource: Add address translation support
Date: Wed, 16 Oct 2013 17:05:15 -0600 [thread overview]
Message-ID: <20131016230515.GB17866@google.com> (raw)
In-Reply-To: <1381493941-4650-3-git-send-email-tianyu.lan@intel.com>
On Fri, Oct 11, 2013 at 08:18:58PM +0800, tianyu.lan@intel.com wrote:
> From: Lan Tianyu <tianyu.lan@intel.com>
>
> According ACPI 5.0 spec Section 19.1.8
This section reference is wrong. Table 5-133 (on page 243) does
point to Section 19.1.8, but that section is only the ASL grammar
description and doesn't have any useful information about what
_TRA means.
A more useful reference (and the source of the quote below) is
Section 6.4.3.5.1.
> "For bridges, translate addresses across the bridge, this is the
> offset that must be added to the address on the secondary side
> to obtain the address on the primary side. Non-bridge devices
> must list 0."
You didn't quote this correctly. Here's a copy/paste from the spec:
For bridges that translate addresses across the bridge, this is
the offset that must be added to the address on the secondary side
to obtain the address on the primary side. Non-bridge devices must
list 0 for all Address Translation offset bits.
> This patch is to add address translation offset to the start/end
> of struct resource in the acpi_dev_resource_address_space().
> Further more, non-bridge device's translation_offset should 0.
> So this change will affect other devices.
>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
I like the patch, though :) With the above corrections,
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> drivers/acpi/resource.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> index 929f416..84bc3db 100644
> --- a/drivers/acpi/resource.c
> +++ b/drivers/acpi/resource.c
> @@ -192,8 +192,8 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares,
> if (ACPI_FAILURE(status))
> return true;
>
> - res->start = addr.minimum;
> - res->end = addr.maximum;
> + res->start = addr.minimum + addr.translation_offset;
> + res->end = addr.maximum + addr.translation_offset;
> window = addr.producer_consumer == ACPI_PRODUCER;
>
> switch(addr.resource_type) {
> --
> 1.8.2.1
>
next prev parent reply other threads:[~2013-10-16 23:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 12:18 [Resend PATCH 0/5] ACPI/PCI: Parse PCI root bridge's ACPI resource via ACPI resource functions tianyu.lan
2013-10-11 12:18 ` [Resend PATCH 1/5] ACPI/Resource: Add memory prefetch check support tianyu.lan
2013-10-11 12:18 ` [Resend PATCH 2/5] ACPI/Resource: Add address translation support tianyu.lan
2013-10-16 23:05 ` Bjorn Helgaas [this message]
2013-10-17 3:10 ` Lan Tianyu
2013-10-11 12:18 ` [Resend PATCH 3/5] ACPI: Add new acpi_dev_resource_address_space_full() function tianyu.lan
2013-10-16 23:18 ` Bjorn Helgaas
2013-10-17 3:29 ` Lan Tianyu
2013-10-11 12:19 ` [Resend PATCH 4/5] X86/PCI/ACPI: Rework setup_resource() via functions ACPI resource functions tianyu.lan
2013-10-11 18:30 ` Yinghai Lu
2013-10-12 13:05 ` Lan Tianyu
2013-10-15 23:22 ` Rafael J. Wysocki
2013-10-11 12:19 ` [Resend PATCH 5/5] IA64/PCI/ACPI: Rework PCI root bridge ACPI resource conversion tianyu.lan
2013-10-15 23:23 ` Rafael J. Wysocki
2013-10-16 23:55 ` Bjorn Helgaas
2013-10-17 6:09 ` Lan Tianyu
2013-10-17 20:33 ` Bjorn Helgaas
2013-10-18 12:44 ` Lan Tianyu
2013-10-23 22:39 ` Bjorn Helgaas
2013-10-26 16:53 ` Lan Tianyu
2013-10-28 17:32 ` Bjorn Helgaas
2013-10-30 8:34 ` Lan Tianyu
2013-10-30 16:23 ` Bjorn Helgaas
2013-10-31 2:26 ` Lan Tianyu
2013-10-31 13:00 ` Bjorn Helgaas
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=20131016230515.GB17866@google.com \
--to=bhelgaas@google.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=tianyu.lan@intel.com \
--cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).