From patchwork Wed Mar 11 12:39:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 45633 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 78978214C6 for ; Wed, 11 Mar 2015 12:41:21 +0000 (UTC) Received: by wibbs8 with SMTP id bs8sf6991148wib.3 for ; Wed, 11 Mar 2015 05:41:20 -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=n7D8TDmZOyHknCe56kKS0FULghOMNXCNB5IQjAwdBLE=; b=gFBcfC/rjAzaEtZL2+Yd8BW/JwzGs4rq6Pptix7mt1ydm/+jIHFyOrXsouiWVG/IoN jRkkdN5bEmu4LHoYcZN9p+EOO3bVNoDhDenfJm81prFm7keXEDOAV1sPYOZQXZgE43x0 35vcL4QDeMoC/XSPqX49qsVM/cWy8eoVlzoJN2v//XmsyEp7t1IrnCz/Z8IMf+H9ayAC +aGCVdH9ZJf9limqfyjdKxDrDjUp28Q+RqmT25976ouSLMgfqFBMulr/ETlVOvfzQj0W xYLKlDtpTkD8/psjLSq2Mvl6GhjQC9NVET6vc9ExUH9TjCYhumiY9InOlw+YpIhxAa9d GewQ== X-Gm-Message-State: ALoCoQkBT6CwvuIXXEvNoNc8UEOZWgfP9mx5WZmYKtaV/5u92t1WFv7dbHb6JhZhm/nL/4WNwGrF X-Received: by 10.194.178.67 with SMTP id cw3mr1110684wjc.2.1426077680820; Wed, 11 Mar 2015 05:41:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.228.169 with SMTP id sj9ls156393lac.35.gmail; Wed, 11 Mar 2015 05:41:20 -0700 (PDT) X-Received: by 10.112.161.66 with SMTP id xq2mr34554849lbb.103.1426077680658; Wed, 11 Mar 2015 05:41:20 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id r2si2312487lbb.46.2015.03.11.05.41.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 05:41:20 -0700 (PDT) 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 labmn12 with SMTP id mn12so8515162lab.0 for ; Wed, 11 Mar 2015 05:41:20 -0700 (PDT) X-Received: by 10.152.121.33 with SMTP id lh1mr34642296lab.86.1426077680570; Wed, 11 Mar 2015 05:41:20 -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.35.133 with SMTP id h5csp2751599lbj; Wed, 11 Mar 2015 05:41:19 -0700 (PDT) X-Received: by 10.50.25.225 with SMTP id f1mr63848516igg.29.1426077678228; Wed, 11 Mar 2015 05:41:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ks9si6739044pab.194.2015.03.11.05.41.17; Wed, 11 Mar 2015 05:41:18 -0700 (PDT) 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 S1752816AbbCKMlD (ORCPT + 7 others); Wed, 11 Mar 2015 08:41:03 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:45141 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752764AbbCKMk6 (ORCPT ); Wed, 11 Mar 2015 08:40:58 -0400 Received: by pdjy10 with SMTP id y10so10912769pdj.12 for ; Wed, 11 Mar 2015 05:40:58 -0700 (PDT) X-Received: by 10.66.154.17 with SMTP id vk17mr76865704pab.5.1426077657940; Wed, 11 Mar 2015 05:40:57 -0700 (PDT) Received: from localhost ([180.150.153.56]) by mx.google.com with ESMTPSA id rk5sm5967488pab.37.2015.03.11.05.40.56 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 11 Mar 2015 05:40:57 -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@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 v10 03/21] ARM64: allow late use of early_ioremap Date: Wed, 11 Mar 2015 20:39:29 +0800 Message-Id: <1426077587-1561-4-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426077587-1561-1-git-send-email-hanjun.guo@linaro.org> References: <1426077587-1561-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.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 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