From patchwork Fri Oct 11 12:18:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lan,Tianyu" X-Patchwork-Id: 3023811 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 27495BF924 for ; Fri, 11 Oct 2013 12:21:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 255C22030D for ; Fri, 11 Oct 2013 12:21:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FF0D20237 for ; Fri, 11 Oct 2013 12:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751807Ab3JKMUP (ORCPT ); Fri, 11 Oct 2013 08:20:15 -0400 Received: from mga03.intel.com ([143.182.124.21]:23512 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752713Ab3JKMUN (ORCPT ); Fri, 11 Oct 2013 08:20:13 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 11 Oct 2013 05:20:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,1080,1371106800"; d="scan'208";a="306591654" Received: from unknown (HELO localhost) ([10.255.21.2]) by AZSMGA002.ch.intel.com with ESMTP; 11 Oct 2013 05:20:09 -0700 From: tianyu.lan@intel.com To: lenb@kernel.org, rjw@sisk.pl, yinghai@kernel.org, bhelgaas@google.com Cc: Lan Tianyu , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Resend PATCH 1/5] ACPI/Resource: Add memory prefetch check support Date: Fri, 11 Oct 2013 20:18:57 +0800 Message-Id: <1381493941-4650-2-git-send-email-tianyu.lan@intel.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1381493941-4650-1-git-send-email-tianyu.lan@intel.com> References: <1381493941-4650-1-git-send-email-tianyu.lan@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Lan Tianyu 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 --- 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 ?