Message ID | 1378477486-8758-3-git-send-email-tianyu.lan@intel.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers | show |
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? 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) { >
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. > 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) { >>
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) { >>> > > -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wednesday, September 11, 2013 10:26:37 AM Lan Tianyu wrote: > 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? Well, why would I? You're saying that you've verified it and that's OK. Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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) {
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." 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(-)