From patchwork Tue Mar 24 14:02:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 46240 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 06FBF214B0 for ; Tue, 24 Mar 2015 14:04:37 +0000 (UTC) Received: by wesw62 with SMTP id w62sf15970814wes.0 for ; Tue, 24 Mar 2015 07:04:36 -0700 (PDT) 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=8G9fA+w9OHU74ciOOVsGWqPmV+sca1TIsM175xixEfE=; b=IZyyPZWURCmWQX61YudWr/PiICnuPou4Ci3+0GD2Hi0NJq0sPPce3mGk2GYBeLjPPM aE7F/6e3nmP2B1BJ9bDvlKH1s0cY3z3do3GL8gsDKMzgolEfqZ8CNO5YZo3KKh9gusry jXDJxkb2QTGVOiGE2W6psTJxxAK6Yxp9r5Kuk/evZjPwlmIMusb2VbY6Gd7xhA3Fqms1 xSEyRBkCI4ib7feAi3NFGK4RSOeParRRm71Hlsbsz0u5RMYAXinlyvnwBJbIqAh5U1PE kLt0/iJKiEhBFK1sOlEGLwGDINgcMQ5JEO0s7v1q0/J/nSPtzRvd+t5mmUprOjPk6Yaz qTjg== X-Gm-Message-State: ALoCoQn5kK7e3Q+MnbEOD6GYTIIBJimyR2sRFyH/8pz+eJYZKxIQwR05Idd8an8PQ9RuPlH+p1kM X-Received: by 10.194.236.196 with SMTP id uw4mr915373wjc.5.1427205876257; Tue, 24 Mar 2015 07:04:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.130 with SMTP id v2ls668746lae.98.gmail; Tue, 24 Mar 2015 07:04:35 -0700 (PDT) X-Received: by 10.112.205.103 with SMTP id lf7mr3806982lbc.37.1427205875667; Tue, 24 Mar 2015 07:04:35 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id b7si3109022lah.16.2015.03.24.07.04.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 07:04:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbsy1 with SMTP id sy1so141686713lbb.1 for ; Tue, 24 Mar 2015 07:04:35 -0700 (PDT) X-Received: by 10.152.5.194 with SMTP id u2mr3955546lau.88.1427205875570; Tue, 24 Mar 2015 07:04:35 -0700 (PDT) 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.57.201 with SMTP id k9csp1473649lbq; Tue, 24 Mar 2015 07:04:34 -0700 (PDT) X-Received: by 10.66.221.194 with SMTP id qg2mr8121039pac.106.1427205873678; Tue, 24 Mar 2015 07:04:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oy3si5090340pdb.64.2015.03.24.07.04.32; Tue, 24 Mar 2015 07:04:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S1752991AbbCXOEC (ORCPT + 27 others); Tue, 24 Mar 2015 10:04:02 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:34938 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951AbbCXODy (ORCPT ); Tue, 24 Mar 2015 10:03:54 -0400 Received: by pdbop1 with SMTP id op1so222290718pdb.2 for ; Tue, 24 Mar 2015 07:03:54 -0700 (PDT) X-Received: by 10.66.187.97 with SMTP id fr1mr7790044pac.157.1427205834256; Tue, 24 Mar 2015 07:03:54 -0700 (PDT) Received: from localhost ([180.150.148.224]) by mx.google.com with ESMTPSA id qa3sm4373008pab.16.2015.03.24.07.03.52 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 24 Mar 2015 07:03:53 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Will Deacon , Olof Johansson , Grant Likely Cc: Lorenzo Pieralisi , Arnd Bergmann , Mark Rutland , Graeme Gregory , Sudeep Holla , Jon Masters , Marc Zyngier , Mark Brown , Robert Richter , Timur Tabi , Ashwin Chaugule , Suravee Suthikulpanit , Mark Salter , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Leif Lindholm , Ard Biesheuvel , Hanjun Guo Subject: [patch v11 03/23] ARM64: allow late use of early_ioremap Date: Tue, 24 Mar 2015 22:02:36 +0800 Message-Id: <1427205776-5060-4-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427205776-5060-1-git-send-email-hanjun.guo@linaro.org> References: <1427205776-5060-1-git-send-email-hanjun.guo@linaro.org> 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: 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.217.169 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 Commit 0e63ea48b4d8 (arm64/efi: add missing call to early_ioremap_reset()) added a missing call to early_ioremap_reset(). This triggers a BUG if code tries using early_ioremap() after the early_ioremap_reset(). This is a problem for some ACPI code which needs short-lived temporary mappings after paging_init() but before acpi_early_init() in start_kernel(). This patch adds definitions for the __late_set_fixmap() and __late_clear_fixmap() which avoids the BUG by allowing later use of early_ioremap(). CC: Leif Lindholm CC: Ard Biesheuvel Tested-by: Suravee Suthikulpanit Tested-by: Mark Langsdorf Tested-by: Jon Masters Tested-by: Robert Richter Tested-by: Timur Tabi Acked-by: Robert Richter Reviewed-by: Grant Likely Signed-off-by: Mark Salter Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/fixmap.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h index defa0ff9..f196e40 100644 --- a/arch/arm64/include/asm/fixmap.h +++ b/arch/arm64/include/asm/fixmap.h @@ -62,6 +62,9 @@ void __init early_fixmap_init(void); #define __early_set_fixmap __set_fixmap +#define __late_set_fixmap __set_fixmap +#define __late_clear_fixmap(idx) __set_fixmap((idx), 0, FIXMAP_PAGE_CLEAR) + extern void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot); #include