From patchwork Wed Feb 25 08:39:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 45012 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 24D1020502 for ; Wed, 25 Feb 2015 08:41:39 +0000 (UTC) Received: by wesw55 with SMTP id w55sf1702971wes.0 for ; Wed, 25 Feb 2015 00:41:38 -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=17Vi99QwX542UyfmGUGPGgbqHVHH3Hn1qSdaZc07pTs=; b=E7j4LGjXKcQL4jd9YiVO8IcUu6W0knHFpILKmUDxgImoYheVdxiLI3D6h/aQEI3Ik3 1UH/PKCfyhqDy0hIMullJWDr0jVl6uiD2k6U07b/jbMGk/3hi+eWSyPHeP9ZhDl5/Rl/ uiqs5vJ38gaCo9JCpBEwD663VOAJEUx089P6zxUIv/qCoVsW1Z12MLeO2WvvRdShuMDy FlXxNC9eQ09o32UstAvij7Cex8fqVAOOVOxlTicRZO3lQJHgOcxb+/gRhLnI151X5q4p HvSLLy9jKqltkt5fuAb2qTbAEYIn6x9rcKJPGTeIRpmGikB8sRIfjc1I7Grk2+zugdun r3jA== X-Gm-Message-State: ALoCoQmFjlwaLB4tHM69vgNBqsPHVwEL2gFtuKgxcAMs4ZofEbeGDgVGC3N13GQDCQ+aJEC78Ptd X-Received: by 10.180.80.7 with SMTP id n7mr2686101wix.0.1424853698435; Wed, 25 Feb 2015 00:41:38 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.197.34 with SMTP id ir2ls281870lac.84.gmail; Wed, 25 Feb 2015 00:41:38 -0800 (PST) X-Received: by 10.152.5.41 with SMTP id p9mr1802906lap.7.1424853698175; Wed, 25 Feb 2015 00:41:38 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id a4si9735307lah.98.2015.02.25.00.41.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 00:41:38 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbiz11 with SMTP id z11so2296194lbi.8 for ; Wed, 25 Feb 2015 00:41:38 -0800 (PST) X-Received: by 10.152.21.201 with SMTP id x9mr1774807lae.72.1424853698047; Wed, 25 Feb 2015 00:41:38 -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 h5csp2475327lbj; Wed, 25 Feb 2015 00:41:37 -0800 (PST) X-Received: by 10.70.44.203 with SMTP id g11mr3690339pdm.130.1424853696324; Wed, 25 Feb 2015 00:41:36 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si716451pap.82.2015.02.25.00.41.32; Wed, 25 Feb 2015 00:41:36 -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 S1753013AbbBYIlX (ORCPT + 28 others); Wed, 25 Feb 2015 03:41:23 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:40821 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752944AbbBYIlU (ORCPT ); Wed, 25 Feb 2015 03:41:20 -0500 Received: by pdev10 with SMTP id v10so3375129pde.7 for ; Wed, 25 Feb 2015 00:41:19 -0800 (PST) X-Received: by 10.70.123.70 with SMTP id ly6mr3693367pdb.154.1424853679817; Wed, 25 Feb 2015 00:41:19 -0800 (PST) Received: from localhost ([167.160.116.82]) by mx.google.com with ESMTPSA id di10sm41681237pad.41.2015.02.25.00.41.17 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 00:41:19 -0800 (PST) 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@amd.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 v9 04/21] ARM64: allow late use of early_ioremap Date: Wed, 25 Feb 2015 16:39:44 +0800 Message-Id: <1424853601-6675-5-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424853601-6675-1-git-send-email-hanjun.guo@linaro.org> References: <1424853601-6675-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.173 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 Acked-by: Robert Richter Signed-off-by: Mark Salter Signed-off-by: Hanjun Guo Reviewed-by: Grant Likely --- 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