From patchwork Wed Mar 11 12: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: 45642 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ACF8E214C6 for ; Wed, 11 Mar 2015 12:42:59 +0000 (UTC) Received: by labgq15 with SMTP id gq15sf6490852lab.0 for ; Wed, 11 Mar 2015 05:42:58 -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=8JcArlFiz92KYIospu18L2jAzvEVTWM1bhGDfey4QVE=; b=XgxxD6BVo8L22/yJbxg6E+rkmfqHhbaRRCIDq9Y1a3cnGSLJ0TzdAWQ5KUgoHOWmVP d8iTkpcqwvmVenbOHNHKJGPVzRNpeXZ+Mhg5Xhm8uObJv+k/wWdY2TkzIWfSqfi2/392 8tWDOdtC0hTWDVbMLPRzMxpyOlmpKdaQy9PRFxi4QfKbKNeHF9JKq5S7nsnocuffGTsp 19cc+mL5+UdL/axUq9CIHPp62kJM8zz47EOXmaTrK2xcj0TMYFHM33/X8P8yNFSvRH0p 8KADvmC0VWF3EpM8qyD7j6Fs5GwiJcZhpDgE+jKRAMXgwFA8F9y1vyIYSbb8aoQlnk4s F0mg== X-Gm-Message-State: ALoCoQlEnFeokBe4MXVWVqzaTmJOCrwKEEHCPtqXFEzsxgwLXdFxnGh2ptIWFB8yoPuXsSWYB5jZ X-Received: by 10.112.242.7 with SMTP id wm7mr2637409lbc.1.1426077778595; Wed, 11 Mar 2015 05:42:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.6 with SMTP id v6ls153026laa.13.gmail; Wed, 11 Mar 2015 05:42:58 -0700 (PDT) X-Received: by 10.152.43.102 with SMTP id v6mr28442179lal.1.1426077778413; Wed, 11 Mar 2015 05:42:58 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id d9si2252576lad.116.2015.03.11.05.42.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 05:42:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by labge10 with SMTP id ge10so8006174lab.10 for ; Wed, 11 Mar 2015 05:42:58 -0700 (PDT) X-Received: by 10.152.116.11 with SMTP id js11mr12580760lab.106.1426077778318; Wed, 11 Mar 2015 05:42:58 -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 h5csp2752497lbj; Wed, 11 Mar 2015 05:42:57 -0700 (PDT) X-Received: by 10.66.167.232 with SMTP id zr8mr49712275pab.23.1426077776002; Wed, 11 Mar 2015 05:42:56 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lp6si7055736pab.69.2015.03.11.05.42.51; Wed, 11 Mar 2015 05:42:55 -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 S1753344AbbCKMm3 (ORCPT + 28 others); Wed, 11 Mar 2015 08:42:29 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:45597 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753308AbbCKMmY (ORCPT ); Wed, 11 Mar 2015 08:42:24 -0400 Received: by pdjy10 with SMTP id y10so10921374pdj.12 for ; Wed, 11 Mar 2015 05:42:23 -0700 (PDT) X-Received: by 10.66.216.67 with SMTP id oo3mr76167812pac.133.1426077743457; Wed, 11 Mar 2015 05:42:23 -0700 (PDT) Received: from localhost ([180.150.153.56]) by mx.google.com with ESMTPSA id y2sm5994424pdm.31.2015.03.11.05.42.21 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 11 Mar 2015 05:42:22 -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, Al Stone , Hanjun Guo Subject: [PATCH v10 18/21] ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64 Date: Wed, 11 Mar 2015 20:39:44 +0800 Message-Id: <1426077587-1561-19-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-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.50 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: Al Stone ACPI reduced hardware mode is disabled by default, but ARM64 can only run properly in ACPI hardware reduced mode, so select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64. If the firmware is not using hardware reduced ACPI mode, we will disable ACPI to avoid nightmare such as accessing some registers which are not available on ARM64. CC: Catalin Marinas CC: Will Deacon Reviewed-by: Grant Likely Tested-by: Suravee Suthikulpanit Tested-by: Yijing Wang Tested-by: Mark Langsdorf Tested-by: Jon Masters Tested-by: Timur Tabi Tested-by: Robert Richter Acked-by: Robert Richter Signed-off-by: Al Stone Signed-off-by: Hanjun Guo --- arch/arm64/Kconfig | 1 + arch/arm64/kernel/acpi.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 1b8e973..d00ab9a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1,5 +1,6 @@ config ARM64 def_bool y + select ACPI_REDUCED_HARDWARE_ONLY if ACPI select ARCH_BINFMT_ELF_RANDOMIZE_PIE select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_GCOV_PROFILE_ALL diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 6468f88..5819ef7 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -303,6 +303,11 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table) */ if (table->revision > 5 || (table->revision == 5 && fadt->minor_revision >= 1)) { + if (!acpi_gbl_reduced_hardware) { + pr_err("Not hardware reduced ACPI mode, will not be supported\n"); + goto disable_acpi; + } + /* * ACPI 5.1 only has two explicit methods to boot up SMP, * PSCI and Parking protocol, but the Parking protocol is @@ -319,8 +324,9 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table) pr_warn("Unsupported FADT revision %d.%d, should be 5.1+, will disable ACPI\n", table->revision, fadt->minor_revision); - disable_acpi(); +disable_acpi: + disable_acpi(); return -EINVAL; }