From: Lan Tianyu <tianyu.lan@intel.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: lenb@kernel.org, yinghai@kernel.org, bhelgaas@google.com,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/4] ACPI/Resource: Add address translation support
Date: Wed, 11 Sep 2013 10:26:37 -0400 [thread overview]
Message-ID: <52307D9D.3070801@intel.com> (raw)
In-Reply-To: <522D3002.5050304@intel.com>
On 09/08/2013 10:18 PM, Lan Tianyu wrote:
> On 2013年09月07日 08:15, Rafael J. Wysocki wrote:
>> On Friday, September 06, 2013 10:24:44 AM Lan Tianyu wrote:
>>> According ACPI 5.0 spec Section 19.1.8
>>> "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."
>>
>> Can you please have a look into the previous versions of the spec and double
>> check that this change won't confuse systems that implement them?
>>
>
> Hi Rafael:
> I check all versions. This part has existed and not been
> changed since ACPI 1.0.
>
Hi Rafael:
Do you have other comments on this?
>> Otherwise it looks OK to me.
>>
>> Thanks,
>> Rafael
>>
>>
>>> 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>
>>> ---
>>> 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) {
>>>
>
>
next prev parent reply other threads:[~2013-09-11 14:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 14:24 [RFC PATCH 0/4] ACPI/PCI: Parse PCI root bridge's ACPI resource via ACPI resource functions Lan Tianyu
2013-09-06 14:24 ` [RFC PATCH 1/4] ACPI/Resource: Add memory prefetch check support Lan Tianyu
2013-09-07 0:11 ` Rafael J. Wysocki
2013-09-06 14:24 ` [RFC PATCH 2/4] ACPI/Resource: Add address translation support Lan Tianyu
2013-09-07 0:15 ` Rafael J. Wysocki
2013-09-09 2:18 ` Lan Tianyu
2013-09-11 14:26 ` Lan Tianyu [this message]
2013-09-11 20:37 ` Rafael J. Wysocki
2013-09-06 14:24 ` [RFC PATCH 3/4] ACPI: Add new acpi_dev_resource_address_space_with_addr() function Lan Tianyu
2013-09-07 0:26 ` Rafael J. Wysocki
2013-09-06 14:24 ` [RFC PATCH 4/4] X86/PCI/ACPI: Rework setup_resource() via functions ACPI resource functions Lan Tianyu
2013-09-06 15:36 ` Bjorn Helgaas
2013-09-06 16:01 ` Lan Tianyu
2013-09-06 16:10 ` Bjorn Helgaas
2013-09-06 16:35 ` Lan Tianyu
2013-09-07 0:27 ` 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=52307D9D.3070801@intel.com \
--to=tianyu.lan@intel.com \
--cc=bhelgaas@google.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--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