From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751791AbdISW1G (ORCPT ); Tue, 19 Sep 2017 18:27:06 -0400 Received: from mga14.intel.com ([192.55.52.115]:25532 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679AbdISW0s (ORCPT ); Tue, 19 Sep 2017 18:26:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,419,1500966000"; d="scan'208";a="902004441" From: Andi Kleen To: x86@kernel.org Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, Andi Kleen Subject: [PATCH v7 3/5] x86/cpuid: Make clearcpuid an early param Date: Tue, 19 Sep 2017 15:26:18 -0700 Message-Id: <20170919222620.3903-4-andi@firstfloor.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170919222620.3903-1-andi@firstfloor.org> References: <20170919222620.3903-1-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen Make clearcpuid= an early param, to make sure it is parsed before the XSAVE initialization. This allows to modify XSAVE state by clearing specific CPUID bits. Signed-off-by: Andi Kleen --- arch/x86/kernel/cpu/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 92480f3948ad..3d8b86b6335d 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1303,7 +1303,7 @@ static __init int setup_disablecpuid(char *arg) return 1; } -__setup("clearcpuid=", setup_disablecpuid); +early_param("clearcpuid", setup_disablecpuid); #ifdef CONFIG_X86_64 DEFINE_PER_CPU_FIRST(union irq_stack_union, -- 2.9.5