From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755554AbbLAPNe (ORCPT ); Tue, 1 Dec 2015 10:13:34 -0500 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:23276 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756541AbbLAPMm (ORCPT ); Tue, 1 Dec 2015 10:12:42 -0500 From: "Suzuki K. Poulose" To: linux-arm-kernel@lists.infradead.org Cc: marc.zyngier@arm.com, linux-kernel@vger.kernel.org, mark.rutland@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, "Suzuki K. Poulose" Subject: [PATCH v2 4/6] arm64: Add hook for checking early CPU features Date: Tue, 1 Dec 2015 15:12:09 +0000 Message-Id: <1448982731-17182-5-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1448982731-17182-1-git-send-email-suzuki.poulose@arm.com> References: <1448982731-17182-1-git-send-email-suzuki.poulose@arm.com> X-OriginalArrivalTime: 01 Dec 2015 15:12:37.0364 (UTC) FILETIME=[B6A0AB40:01D12C4A] X-MC-Unique: nk568c5uQQSjKtKz7DdoRQ-7 Content-Type: text/plain; charset=WINDOWS-1252 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id tB1FDcwi028793 Adds a hook for checking whether a secondary CPU has the features used already by the kernel during early boot, based on the boot CPU. Cc: Will Deacon Cc: Mark Rutland Cc: Catalin Marinas Signed-off-by: Suzuki K. Poulose --- arch/arm64/kernel/cpufeature.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index dde1f56..8dd05283 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -824,6 +824,14 @@ static u64 __raw_read_system_reg(u32 sys_id) } /* + * Check for CPU features that are used in early boot + * based on the Boot CPU value. + */ +static void check_early_cpu_features(void) +{ +} + +/* * Run through the enabled system capabilities and enable() it on this CPU. * The capabilities were decided based on the available CPUs at the boot time. * Any new CPU should match the system wide status of the capability. If the @@ -836,6 +844,8 @@ void verify_local_cpu_capabilities(void) int i; const struct arm64_cpu_capabilities *caps; + check_early_cpu_features(); + /* * If we haven't computed the system capabilities, there is nothing * to verify. -- 1.7.9.5