From patchwork Wed Jan 22 11:25:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 23505 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DAA6B203C6 for ; Wed, 22 Jan 2014 11:29:29 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id a41sf404056yho.4 for ; Wed, 22 Jan 2014 03:29:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=Uul0ssSN5la0MlW//s2eVgjK6fAC3JmyoUAs5ziKys8=; b=AvOtTaz1MaWDxg0f2dTZM32V74ONnL3VQ1DZmp9+6FBiGxDQLVGyhn99XraebmWFvW OvmZcy8s+jHgKbrmdVv9AtTmUHH+rUJo88ka3bRMXyAAQ9sTH0pL7Ho6Hrd7x6mDyxt5 l8LABSiHnP8AJFC2/7nElgiZefVnENdDAYQTjesuFFZJXC/ZkyLcPQ/yj27Onl6T21Pt oujkoiVSpBhSVoL0huflY8tng1WZE5F18sUb0oiuBAiW2gwdFzVvHx6wBUnnqAyuvfmX wKWFWEfYK87sSfv4hewIng7/qaWMmJF0wiMYI5Ztjc7PfIuaRXU7MYvELAoTTaC8emSn 2UyQ== X-Gm-Message-State: ALoCoQnEm3ICjlzE+b4k/F6tiUxHsro9H22TF5CozyYz86PaW/TVZo2PSlYPMVKcuLhy3djDOMJB X-Received: by 10.236.128.243 with SMTP id f79mr270886yhi.27.1390390169100; Wed, 22 Jan 2014 03:29:29 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.15.105 with SMTP id w9ls51991qec.9.gmail; Wed, 22 Jan 2014 03:29:28 -0800 (PST) X-Received: by 10.58.235.129 with SMTP id um1mr498905vec.17.1390390168807; Wed, 22 Jan 2014 03:29:28 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id gv8si4358650veb.44.2014.01.22.03.29.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 03:29:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id c14so143637vea.3 for ; Wed, 22 Jan 2014 03:29:28 -0800 (PST) X-Received: by 10.221.3.70 with SMTP id nx6mr68667vcb.45.1390390168733; Wed, 22 Jan 2014 03:29:28 -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.220.174.196 with SMTP id u4csp178118vcz; Wed, 22 Jan 2014 03:29:28 -0800 (PST) X-Received: by 10.68.184.194 with SMTP id ew2mr1084093pbc.100.1390390167852; Wed, 22 Jan 2014 03:29:27 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ek3si9480687pbd.175.2014.01.22.03.29.26; Wed, 22 Jan 2014 03:29:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755351AbaAVL3V (ORCPT + 27 others); Wed, 22 Jan 2014 06:29:21 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:44592 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755234AbaAVL2u (ORCPT ); Wed, 22 Jan 2014 06:28:50 -0500 Received: from 172.24.2.119 (EHLO szxeml207-edg.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AJQ35821; Wed, 22 Jan 2014 19:28:42 +0800 (CST) Received: from SZXEML421-HUB.china.huawei.com (10.82.67.160) by szxeml207-edg.china.huawei.com (172.24.2.56) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 22 Jan 2014 19:28:39 +0800 Received: from LGGEML424-HUB.china.huawei.com (10.72.61.124) by szxeml421-hub.china.huawei.com (10.82.67.160) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 22 Jan 2014 19:28:36 +0800 Received: from kernel-host.huawei (10.107.197.247) by lggeml424-hub.china.huawei.com (10.72.61.124) with Microsoft SMTP Server id 14.3.158.1; Wed, 22 Jan 2014 19:28:16 +0800 From: Wang Nan To: CC: Eric Biederman , Russell King , Andrew Morton , Geng Hui , , , , Wang Nan , Subject: [PATCH 1/3] ARM: Premit ioremap() to map reserved pages Date: Wed, 22 Jan 2014 19:25:14 +0800 Message-ID: <1390389916-8711-2-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1390389916-8711-1-git-send-email-wangnan0@huawei.com> References: <1390389916-8711-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.197.247] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangnan0@huawei.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , This patch relaxes the restriction set by commit 309caa9cc, which prohibit ioremap() on all kernel managed pages. Other architectures, such as x86 and (some specific platforms of) powerpc, allow such mapping. ioremap() pages is an efficient way to avoid arm's mysterious cache control. This feature will be used for arm kexec support to ensure copied data goes into RAM even without cache flushing, because we found that flush_cache_xxx can't reliably flush code to memory. Signed-off-by: Wang Nan Cc: # 3.4+ Cc: Eric Biederman Cc: Russell King Cc: Andrew Morton Cc: Geng Hui --- arch/arm/mm/ioremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index f123d6e..98b1c10 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -298,7 +298,7 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, /* * Don't allow RAM to be mapped - this causes problems with ARMv6+ */ - if (WARN_ON(pfn_valid(pfn))) + if (WARN_ON(pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn)))) return NULL; area = get_vm_area_caller(size, VM_IOREMAP, caller);