From patchwork Tue Mar 24 14:02:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 46254 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D84DE214B0 for ; Tue, 24 Mar 2015 14:06:30 +0000 (UTC) Received: by wggy19 with SMTP id y19sf32389604wgg.2 for ; Tue, 24 Mar 2015 07:06:30 -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=91DFETsNb4EMdETCTm1ULs4injLFP7+2AfhJi7Njzfk=; b=KImJLxoTT20b0MOby6uDSY9uaS0pbll1vYhGt6Oz2C+536+FKTSPWdNqVe9jHYbyJy AxXJ+RRc4w6NCWrFyfwMOxS++RjzCYf7PQ65xn2/bPH48W/lNiRz972QL0Gnkbh+uh77 mEPExCPCTKOrwZlsHkeuLZu7WZsWSqVbE575L9Nq0mXOJXnpEsw+J/V2Z1udW72o+wK9 BofRxBrKvYowhz6e4p1ARE0LxDblbCF363SW24QYCegWcCpFS/AI5CGXXk420fR7PUHo An80Vlx1Ejq0bNRa3Czb4yhBsX/oP0pAAnMfhR6DKkppcHgx44erbsjP2QZjQ0vVWAHA PoHg== X-Gm-Message-State: ALoCoQk18jqdfXsxBaF785UqsRpHq5Ip7E+DY2RuRdO4P6Vkp+P4qK7hSrqi70ZNLHQUsnxGh6Ix X-Received: by 10.152.27.134 with SMTP id t6mr916361lag.5.1427205990186; Tue, 24 Mar 2015 07:06:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.168 with SMTP id 8ls325618lan.59.gmail; Tue, 24 Mar 2015 07:06:30 -0700 (PDT) X-Received: by 10.152.206.7 with SMTP id lk7mr3942182lac.55.1427205989982; Tue, 24 Mar 2015 07:06:29 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id a15si598167lbq.90.2015.03.24.07.06.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 07:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by laae1 with SMTP id e1so28194741laa.2 for ; Tue, 24 Mar 2015 07:06:29 -0700 (PDT) X-Received: by 10.152.22.67 with SMTP id b3mr3766562laf.117.1427205989891; Tue, 24 Mar 2015 07:06:29 -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 k9csp1474935lbq; Tue, 24 Mar 2015 07:06:28 -0700 (PDT) X-Received: by 10.66.160.138 with SMTP id xk10mr7818882pab.74.1427205980824; Tue, 24 Mar 2015 07:06:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yi7si5619237pbc.190.2015.03.24.07.06.16; Tue, 24 Mar 2015 07:06:20 -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 S1752272AbbCXOGO (ORCPT + 7 others); Tue, 24 Mar 2015 10:06:14 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34218 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752491AbbCXOGF (ORCPT ); Tue, 24 Mar 2015 10:06:05 -0400 Received: by pacwe9 with SMTP id we9so226784761pac.1 for ; Tue, 24 Mar 2015 07:06:04 -0700 (PDT) X-Received: by 10.70.31.66 with SMTP id y2mr8154978pdh.118.1427205964493; Tue, 24 Mar 2015 07:06:04 -0700 (PDT) Received: from localhost ([180.150.148.224]) by mx.google.com with ESMTPSA id tr8sm4399653pab.4.2015.03.24.07.06.02 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 24 Mar 2015 07:06:03 -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, Hanjun Guo , Ard Biesheuvel Subject: [patch v11 23/23] ARM64 / ACPI: Don't unflatten device tree if acpi=force is passed Date: Tue, 24 Mar 2015 22:02:56 +0800 Message-Id: <1427205776-5060-24-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-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.53 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: , Since the policy is that once we pass acpi=force in the early param, we will not unflatten device tree even if ACPI is disabled in ACPI table init fails, so fix the code by comparinging both acpi_disabled and param_acpi_force before the device tree is unflattened. CC: Ard Biesheuvel Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acpi.h | 3 +++ arch/arm64/kernel/acpi.c | 2 +- arch/arm64/kernel/setup.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index 59c05d8..e1a8965 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -38,6 +38,7 @@ typedef u64 phys_cpuid_t; extern int acpi_disabled; extern int acpi_noirq; extern int acpi_pci_disabled; +extern bool param_acpi_force; /* 1 to indicate PSCI 0.2+ is implemented */ static inline bool acpi_psci_present(void) @@ -91,6 +92,8 @@ void __init acpi_init_cpus(void); static inline bool acpi_psci_present(void) { return false; } static inline bool acpi_psci_use_hvc(void) { return false; } static inline void acpi_init_cpus(void) { } + +#define param_acpi_force false #endif /* CONFIG_ACPI */ #endif /*_ASM_ACPI_H*/ diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 5819ef7..fe9d8f0 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -43,7 +43,7 @@ static int enabled_cpus; static bool bootcpu_valid __initdata; static bool param_acpi_off __initdata; -static bool param_acpi_force __initdata; +bool param_acpi_force __initdata; static int __init parse_acpi(char *arg) { diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index b278311..d60b1ad 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -390,7 +390,7 @@ void __init setup_arch(char **cmdline_p) early_ioremap_reset(); - if (acpi_disabled) { + if (acpi_disabled && !param_acpi_force) { unflatten_device_tree(); psci_dt_init(); cpu_read_bootcpu_ops();