From patchwork Thu Mar 24 12:52:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 8660651 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 97796C0553 for ; Thu, 24 Mar 2016 12:59:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF1A2203AE for ; Thu, 24 Mar 2016 12:59:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9A35203A0 for ; Thu, 24 Mar 2016 12:59:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aj4pN-00020F-4D; Thu, 24 Mar 2016 12:57:29 +0000 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aj4mo-0006z0-Q8 for linux-arm-kernel@lists.infradead.org; Thu, 24 Mar 2016 12:55:00 +0000 Received: by mail-lb0-x229.google.com with SMTP id k12so29635682lbb.1 for ; Thu, 24 Mar 2016 05:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1uocBWwHQxXc+lGHQqShm0XHYYisGFIadIi/YDVSLhU=; b=haT4T+Abd08janArLiSb7IsE5aJdssVu7+p3ixmbbIAnw686iMujRRJMd6XmLXYcH6 SS+JhzqvsNn2uOlQsgdZ351HhI8O+WpFj0Ts97SEVnksEsqvGsmKQgJH55WrIibVUaqj 8HCVd8yMuvITj3YNx/PGZoGLxgjDYFDI0yodM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1uocBWwHQxXc+lGHQqShm0XHYYisGFIadIi/YDVSLhU=; b=U4sWYZY2FqNUmJlPGLsKR6vEPLw3vM/+t92ktKVfoKwKUypljpfs4rn3gFNRefz1zC 19PI/e2sRwjrnVOmQ+bRDzEHUF4E2bF6MwvDjk/h2EjpHkQlrShcQXop3ZfnmJsDpHf9 zayHLI8Mr2HdxTQDbTyv5m7cgS9l4UHIrLyufZ0hlsl0UookX6IkQ2g69VIgRNE95Tc2 fWeB2fgRLe0KphlXzKCUgdU+TygwOWp9rRc150XZyr+Pg7SK3D9Lxbna5aTqWRODktOY JTgJrPmw7AwuFlRy37wSgEVie1E8oXCiJ9/DaawIJL+gp/BPnQBXfRZVs44IruTDaLWx iN/A== X-Gm-Message-State: AD7BkJLz6saP2SwaVjXmNE3hFQsal99xCoERrXghuZyX1G3scSQMRyA3awp1ayZJWHFVJ2y9 X-Received: by 10.112.46.136 with SMTP id v8mr2744452lbm.38.1458824073735; Thu, 24 Mar 2016 05:54:33 -0700 (PDT) Received: from turnip.localdomain (nivc-213.auriga.ru. [80.240.102.213]) by smtp.gmail.com with ESMTPSA id rh2sm1167378lbb.36.2016.03.24.05.54.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Mar 2016 05:54:32 -0700 (PDT) From: Aleksey Makarov To: Greg Kroah-Hartman , "Rafael J . Wysocki" , Len Brown Subject: [PATCH v6 4/5] ACPI: enable ACPI_SPCR_TABLE on ARM64 Date: Thu, 24 Mar 2016 15:52:02 +0300 Message-Id: <1458823925-19560-5-git-send-email-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1458823925-19560-1-git-send-email-aleksey.makarov@linaro.org> References: <1458823925-19560-1-git-send-email-aleksey.makarov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160324_055451_721378_9D4192C1 X-CRM114-Status: GOOD ( 11.68 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , Peter Hurley , Graeme Gregory , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Leif Lindholm , linux-acpi@vger.kernel.org, Aleksey Makarov , Yury Norov , Christopher Covington , linux-serial@vger.kernel.org, Al Stone , linux-arm-kernel@lists.infradead.org, "Zheng, Lv" MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP SBBR mentions SPCR as a mandatory ACPI table. So enable it for ARM64 Earlycon should be set up as early as possible. ACPI boot tables are mapped in arch/arm64/kernel/acpi.c:acpi_boot_table_init() called from setup_arch() and that's where we parse SPCR. So it has to be opted-in per-arch. Signed-off-by: Aleksey Makarov --- arch/arm64/Kconfig | 1 + arch/arm64/kernel/acpi.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 07b6a16..c77b4b2 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -3,6 +3,7 @@ config ARM64 select ACPI_CCA_REQUIRED if ACPI select ACPI_GENERIC_GSI if ACPI select ACPI_REDUCED_HARDWARE_ONLY if ACPI + select ACPI_SPCR_TABLE if ACPI select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_ELF_RANDOMIZE diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index d1ce8e2..046f095 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -189,7 +189,7 @@ void __init acpi_boot_table_init(void) */ if (param_acpi_off || (!param_acpi_force && of_scan_flat_dt(dt_scan_depth1_nodes, NULL))) - return; + goto done; /* * ACPI is disabled at this point. Enable it in order to parse @@ -209,6 +209,9 @@ void __init acpi_boot_table_init(void) if (!param_acpi_force) disable_acpi(); } + +done: + parse_spcr(); } #ifdef CONFIG_ACPI_APEI