On Fri, Aug 23, 2013 at 12:04 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: > On Fri, Aug 23, 2013 at 11:38 AM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: >> On Fri, Aug 23, 2013 at 8:34 AM, Lan Tianyu <lantianyu1986@xxxxxxxxx> wrote: >>>> I worked around the problem by replacing acpi_resource_to_address64() >>>> with resource_to_addr(). But resource_to_addr() is a static function >>>> in arch/x86/pci/acpi.c, not very convenient to use. Here's what I did: >>>> >>> >>> Hi Rui&Yinghai: >>> How about using the following code to translate struct >>> acpi_resource to struct resouce in this setup_res()? >>> >>> if (acpi_dev_resource_address_space(...) >>> || acpi_dev_resource_memory(..)) >>> return AE_OK; >> >> Yest, that could be better, will update that. >> >> Also can you submit patch that will use that in res_to_addr of >> arch/x86/pci/acpi.c? > > looks acpi_dev_resource_address_space... does not handle > PREFTCH and translation offset. > > So now i have to use res_to_addr alike one. Raphael, Maybe we should move resource_to_addr to acpi generic. Please check if you are ok with attached. Thanks Yinghai
Attachment:
move_res_to_addr.patch
Description: Binary data