From patchwork Mon Feb 2 12:45:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 44123 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ED4602070C for ; Mon, 2 Feb 2015 12:48:37 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y19sf16056807wgg.2 for ; Mon, 02 Feb 2015 04:48:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=q1j9+iqs4okgFPQgmPePGELkSrpYpA5yBDUerIuIuhA=; b=A6cZA56eces2lVPBUq2zTdptNTIxaLIcxRWzTpbZAURAe+xXDzbvh7B8AH0dHIfp3r BUAgLe+zSsX8MWCLS7tlIxkmK3znUP44gADSbB0LcvEET7x8X1YjueCg9oqbZMT1ndZv 47cn3Qgkc2Ng+AxEilk14mdOpBJMMO4RZrLEj/y/8qGp5pb7mcKVtfhdtBePSDtz9GGz bVRO9YOWQa9YtfI12olpFmc+DNaDQB5q8vWwEsLj8IL8QaQTLn3UQj/0tAfBtS+wFYgr m2PQC44drrAzH9B8g5sNA4Zyx+rY1hL2/wHtqEprUEvD3izJikKfhLVWBb98FpQgHZcu Lqiw== X-Gm-Message-State: ALoCoQnY7nrLSO0qHp+6QF8faOjnAgOr2WYFtDtI4pnQuoQHEzpkdAVMmAd19yPtvZLxXLsU1k4Y X-Received: by 10.112.35.135 with SMTP id h7mr2312107lbj.23.1422881317230; Mon, 02 Feb 2015 04:48:37 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.66 with SMTP id u2ls679691lal.32.gmail; Mon, 02 Feb 2015 04:48:37 -0800 (PST) X-Received: by 10.112.160.193 with SMTP id xm1mr19307766lbb.5.1422881317023; Mon, 02 Feb 2015 04:48:37 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id my5si14463996lbb.93.2015.02.02.04.48.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 04:48:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so40254641lab.6 for ; Mon, 02 Feb 2015 04:48:36 -0800 (PST) X-Received: by 10.112.125.41 with SMTP id mn9mr19110906lbb.80.1422881316927; Mon, 02 Feb 2015 04:48:36 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1272961lbj; Mon, 2 Feb 2015 04:48:36 -0800 (PST) X-Received: by 10.68.239.102 with SMTP id vr6mr29347407pbc.35.1422881313280; Mon, 02 Feb 2015 04:48:33 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si23531096pas.104.2015.02.02.04.48.32; Mon, 02 Feb 2015 04:48:33 -0800 (PST) Received-SPF: none (google.com: linux-acpi-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370AbbBBMsZ (ORCPT + 7 others); Mon, 2 Feb 2015 07:48:25 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:58158 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932102AbbBBMsX (ORCPT ); Mon, 2 Feb 2015 07:48:23 -0500 Received: by mail-pa0-f41.google.com with SMTP id kq14so82108539pab.0 for ; Mon, 02 Feb 2015 04:48:22 -0800 (PST) X-Received: by 10.66.65.108 with SMTP id w12mr28961377pas.115.1422881302698; Mon, 02 Feb 2015 04:48:22 -0800 (PST) Received: from localhost ([180.150.157.4]) by mx.google.com with ESMTPSA id k15sm18742984pbq.47.2015.02.02.04.48.21 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 04:48:21 -0800 (PST) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Olof Johansson , Arnd Bergmann , Mark Rutland , Grant Likely , Will Deacon Cc: Lorenzo Pieralisi , Graeme Gregory , Sudeep Holla , Jon Masters , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Daniel Lezcano , Mark Brown , Rob Herring , Robert Richter , Randy Dunlap , Charles.Garcia-Tobin@arm.com, phoenix.liyi@huawei.com, Timur Tabi , Ashwin Chaugule , suravee.suthikulpanit@amd.com, Mark Langsdorf , wangyijing@huawei.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Mark Salter , Hanjun Guo Subject: [PATCH v8 02/21] acpi: fix acpi_os_ioremap for arm64 Date: Mon, 2 Feb 2015 20:45:30 +0800 Message-Id: <1422881149-8177-3-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422881149-8177-1-git-send-email-hanjun.guo@linaro.org> References: <1422881149-8177-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mark Salter The acpi_os_ioremap() function may be used to map normal RAM or IO regions. The current implementation simply uses ioremap_cache(). This will work for some architectures, but arm64 ioremap_cache() cannot be used to map IO regions which don't support caching. So for arm64, use ioremap() for non-RAM regions. CC: Rafael J Wysocki Signed-off-by: Mark Salter Signed-off-by: Hanjun Guo --- include/acpi/acpi_io.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/acpi/acpi_io.h b/include/acpi/acpi_io.h index 444671e..9d573db 100644 --- a/include/acpi/acpi_io.h +++ b/include/acpi/acpi_io.h @@ -1,11 +1,17 @@ #ifndef _ACPI_IO_H_ #define _ACPI_IO_H_ +#include #include static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) { +#ifdef CONFIG_ARM64 + if (!page_is_ram(phys >> PAGE_SHIFT)) + return ioremap(phys, size); +#endif + return ioremap_cache(phys, size); }