From patchwork Mon Feb 2 12:45:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 44124 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 744F32034D for ; Mon, 2 Feb 2015 12:48:53 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id n3sf18237897wiv.0 for ; Mon, 02 Feb 2015 04:48:50 -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=RXkYkcHZvcvVh+haRxZILPIsQgLOErpL/RPLCgoGD78=; b=hITKo9WlPV+g3xTsKIR4/SxUNnFeVwE0UmBh1cBFnKZa7qHKmBkHB5JntQWDYU2oZN +4i2q1EPG0+aQrB1utfUh0cZX4ECGNscMJS8/veRD5EX/XSTEzqA0EPd+mKOzlHyyk89 rdmtK1X3DI+ai2XRfsbsEnRTGlwB7mCSGtcjdokqoiXyJKL0OVjEC1dqJC5VwiBB7u/4 CJRSU9zF/wGcv1NGRYQK0ttiLwRHmacXSnWzsSSw7aXcFYSs0rjBBw1V/Rgb9ZRiQveE T3xNT/3GXu9lGDn0VXR9ceMVzSwwGOwP8NAt7deslalds+a4/VQ6VvMhyA9kTjjFHxzy qBPw== X-Gm-Message-State: ALoCoQmvaloB69m9gieitwzzIBjcVvsQHY+nItt9IMsHXTlx6lVxQlezidMtIwq4onSLo4mpgdmn X-Received: by 10.180.88.199 with SMTP id bi7mr360090wib.1.1422881330535; Mon, 02 Feb 2015 04:48:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.74 with SMTP id q10ls630345laq.43.gmail; Mon, 02 Feb 2015 04:48:50 -0800 (PST) X-Received: by 10.112.162.226 with SMTP id yd2mr19297509lbb.1.1422881330272; Mon, 02 Feb 2015 04:48:50 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id ss9si16856371lbb.89.2015.02.02.04.48.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 04:48:50 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id ms9so40333610lab.1 for ; Mon, 02 Feb 2015 04:48:50 -0800 (PST) X-Received: by 10.112.176.236 with SMTP id cl12mr134756lbc.3.1422881330161; Mon, 02 Feb 2015 04:48:50 -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 h5csp1273063lbj; Mon, 2 Feb 2015 04:48:49 -0800 (PST) X-Received: by 10.70.15.196 with SMTP id z4mr29033900pdc.20.1422881328259; Mon, 02 Feb 2015 04:48:48 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch1si21389435pad.107.2015.02.02.04.48.47; Mon, 02 Feb 2015 04:48:48 -0800 (PST) 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 S1755443AbbBBMsf (ORCPT + 29 others); Mon, 2 Feb 2015 07:48:35 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:63580 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755403AbbBBMs1 (ORCPT ); Mon, 2 Feb 2015 07:48:27 -0500 Received: by mail-pa0-f49.google.com with SMTP id fa1so82075427pad.8 for ; Mon, 02 Feb 2015 04:48:26 -0800 (PST) X-Received: by 10.70.36.99 with SMTP id p3mr28719657pdj.81.1422881306888; Mon, 02 Feb 2015 04:48:26 -0800 (PST) Received: from localhost ([180.150.157.4]) by mx.google.com with ESMTPSA id kg12sm18747709pbb.44.2015.02.02.04.48.25 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 04:48:26 -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 , Leif Lindholm , Ard Biesheuvel , Hanjun Guo Subject: [PATCH v8 03/21] arm64: allow late use of early_ioremap Date: Mon, 2 Feb 2015 20:45:31 +0800 Message-Id: <1422881149-8177-4-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-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.215.42 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 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 9ef6eca..e629c70 100644 --- a/arch/arm64/include/asm/fixmap.h +++ b/arch/arm64/include/asm/fixmap.h @@ -61,6 +61,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