From patchwork Thu Mar 31 13:40:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 64788 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp167376lbc; Thu, 31 Mar 2016 06:45:37 -0700 (PDT) X-Received: by 10.98.9.129 with SMTP id 1mr22146148pfj.163.1459431937548; Thu, 31 Mar 2016 06:45:37 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id x80si14272022pfi.97.2016.03.31.06.45.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Mar 2016 06:45:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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 1alctp-0008Qf-Mh; Thu, 31 Mar 2016 13:44:37 +0000 Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1alcsk-0007ji-Tl for linux-arm-kernel@lists.infradead.org; Thu, 31 Mar 2016 13:43:32 +0000 Received: by mail-lb0-x22e.google.com with SMTP id vo2so52843065lbb.1 for ; Thu, 31 Mar 2016 06:43:10 -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=7xZoOoNcEx4y7v1ia4xPtXCkRPZCpLL3hXB0l2rnR00=; b=kwJDAmcnrudQl39gC4MJxYcV1QHKU0FylGZyyG24QcCtTbIUGo83KYqNgdbB4mEcP9 9Dvv155DuzdMoSmZOTUqfVQyLHO8B8DclOYPFdIDU//k0toGtSJsPOryQGYMC93X7YdN JkvnDDHCNMtn0dS1ycEwgaJnc64RPMoiwPSM0= 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=7xZoOoNcEx4y7v1ia4xPtXCkRPZCpLL3hXB0l2rnR00=; b=Qem50vmGMYKRcUnHYTbl64gzvcHTSI54XLojoUK3vsck28+cQrUOlNpPKAujJu1T48 xsiP0jWbzN/z4nOo9My2u/kJyC8T3hN6+WkRw7ooXjDgr7LE4CSQXoLJkVYYMVQ61Wp+ rKwhw/chL5vnEaJpkWiOMe2IqGK03xaeXWFwbXAZnlm5t334Js2bX4nMSty3gnBQs+/9 rElzo44DQDz5bHCRY6i+dCsyjwbDhJodfeWlYYSHS8L3e0E/aM5Ft2C3kti+8U/V2ugv daGGBE2FRPUCEUUK93pcfOTN6c/F7o6tjYFhtbd1xp0H3XvjgTdpbPbAfC2Rv3Ixz6Nn ss4A== X-Gm-Message-State: AD7BkJLM6ucH6+LB1COL5ERL2b5UgH/m0MABPnf2iWptNhbGSmtOdl9VzOYhsBAVHkxxoUbR X-Received: by 10.112.38.104 with SMTP id f8mr415974lbk.115.1459431789096; Thu, 31 Mar 2016 06:43:09 -0700 (PDT) Received: from turnip.localdomain (nivc-213.auriga.ru. [80.240.102.213]) by smtp.gmail.com with ESMTPSA id mi9sm1285984lbc.27.2016.03.31.06.43.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 Mar 2016 06:43:08 -0700 (PDT) From: Aleksey Makarov To: Russell King , Greg Kroah-Hartman Subject: [PATCH v7 4/5] ARM64: ACPI: enable ACPI_SPCR_TABLE Date: Thu, 31 Mar 2016 16:40:26 +0300 Message-Id: <1459431629-27934-5-git-send-email-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1459431629-27934-1-git-send-email-aleksey.makarov@linaro.org> References: <1459431629-27934-1-git-send-email-aleksey.makarov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160331_064331_256281_C3822040 X-CRM114-Status: GOOD ( 14.26 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c04:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: "Zheng, Lv" , Peter Hurley , Graeme Gregory , Catalin Marinas , Andy Shevchenko , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, Leif Lindholm , linux-acpi@vger.kernel.org, Aleksey Makarov , Yury Norov , Christopher Covington , linux-serial@vger.kernel.org, Will Deacon , Al Stone , linux-arm-kernel@lists.infradead.org, Len Brown MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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() that is called from setup_arch() and that's where we parse SPCR. So it has to be opted-in per-arch. When ACPI_SPCR_TABLE is defined initialization of DT earlycon is deferred until the DT/ACPI decision is done. Initialize DT earlycon if ACPI is disabled. Signed-off-by: Aleksey Makarov --- arch/arm64/Kconfig | 1 + arch/arm64/kernel/acpi.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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..f331ebb 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -189,7 +190,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 +210,14 @@ void __init acpi_boot_table_init(void) if (!param_acpi_force) disable_acpi(); } + +done: + if (acpi_disabled) { + if (earlycon_init_is_deferred) + early_init_dt_scan_chosen_stdout(); + } else { + parse_spcr(earlycon_init_is_deferred); + } } #ifdef CONFIG_ACPI_APEI