diff mbox

[RFC,1/4] ACPI/Resource: Add memory prefetch check support

Message ID 1378477486-8758-2-git-send-email-tianyu.lan@intel.com (mailing list archive)
State RFC, archived
Headers show

Commit Message

lan,Tianyu Sept. 6, 2013, 2:24 p.m. UTC
This patch is to check mem address space's acpi resource caching ability
and set prefetch flag of struct resource if it's prefetchable.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
 drivers/acpi/resource.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rafael Wysocki Sept. 7, 2013, 12:11 a.m. UTC | #1
On Friday, September 06, 2013 10:24:43 AM Lan Tianyu wrote:
> This patch is to check mem address space's acpi resource caching ability
> and set prefetch flag of struct resource if it's prefetchable.
> 
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>

Looks good to me.

Thanks,
Rafael


> ---
>  drivers/acpi/resource.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> index b7201fc..929f416 100644
> --- a/drivers/acpi/resource.c
> +++ b/drivers/acpi/resource.c
> @@ -202,6 +202,9 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares,
>  		res->flags = acpi_dev_memresource_flags(len,
>  						addr.info.mem.write_protect,
>  						window);
> +
> +		if (addr.info.mem.caching == ACPI_PREFETCHABLE_MEMORY)
> +			res->flags |= IORESOURCE_PREFETCH;
>  		break;
>  	case ACPI_IO_RANGE:
>  		io_decode = addr.granularity == 0xfff ?
>
diff mbox

Patch

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index b7201fc..929f416 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -202,6 +202,9 @@  bool acpi_dev_resource_address_space(struct acpi_resource *ares,
 		res->flags = acpi_dev_memresource_flags(len,
 						addr.info.mem.write_protect,
 						window);
+
+		if (addr.info.mem.caching == ACPI_PREFETCHABLE_MEMORY)
+			res->flags |= IORESOURCE_PREFETCH;
 		break;
 	case ACPI_IO_RANGE:
 		io_decode = addr.granularity == 0xfff ?