Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3058944lqo; Tue, 21 May 2024 05:55:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPX/E7wpMoHivepH8KVneqve7wIh4Xb3NFWefMyG2g6DsHgB1vmcbqqkxcJtfRC+jIEEGJbf+fiyqG77GcddPDYQerSIbuWXJBqYGb5Q== X-Google-Smtp-Source: AGHT+IEPME59tnN/4KQHMMQPlBu0m89e4S/aP2Mn7prD5GRCMRsURRsbjju8+yPpdb6NRniHjaSE X-Received: by 2002:a05:6a20:9f9a:b0:1af:fbab:cfaf with SMTP id adf61e73a8af0-1affbabd262mr19977156637.62.1716296144698; Tue, 21 May 2024 05:55:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716296144; cv=pass; d=google.com; s=arc-20160816; b=V0jwr0puzS4oAFfR+W8hFg1z6IIao+DmG4t3sAGOwWa5FOibdUrqH9nexdLb/g3Hjg KsWjYQfwq5a097IzG0inabt1A6RsPSEeEVOK5cEX6jlnH8uJXVNx+zdUjimmtQco40z9 t0p8erk9tT8hgx/p3+uIhze5UygYx+6a5c/0irdIWBNUgM953ISi5kpb9jRRIBKOuZDJ EcgnnfQwssugcOKPTf3HvcEsLgWyAqjNwrJqhCdzsdPPe+YLjfwTWAa4p6SeAJkyVsff MJVIrhmx8IC5fOOaWSKAegtpxLCZFoljmn9MQOMO/RffQ2/VT2z7FToud95/ScG9wyoa au2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=sth60PATYndDQxclI4sfKvazGosAbA4q70N4pfN4ONI=; fh=HRwWUfbMu6YAyC4vn6AdUsSGqtJ5265eDpWfzy2S9Tg=; b=QmVgaaX4V8U9+kV9KOleusmGz8VUacsS88U0qudcEqHFHBUEcARgm/xyLAsnoBnIZL QBPmOuo+a6C4BWb5JkTP2ZrstTwVOllEjdvMikqymJEHa3YM6aIXdeaurMH6RCjMgM7+ 0CkOveVqzbLS4DUoxioDROu0zSPzElBeicl0gOMPu4qxSNZlIYb+WpKMPFn7u5WnY9PE rRPeZyNwJOQtR6zHjGu8w8k1fjSB2MPZlDURk6TrUnSr+C37USELlqxONeM8b5uL6lVw K1jUq0hrEApnTMYiqLVwJ2IVtKcjz4357vSi/eispzETYSS1Sqieqb7AiQN+G0U26Aoq nfBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=LHk3Hm4F; dkim=pass header.i=@suse.com header.s=susede1 header.b=LHk3Hm4F; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-184960-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184960-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-65ceb70c3c5si8865624a12.442.2024.05.21.05.55.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 05:55:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184960-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=LHk3Hm4F; dkim=pass header.i=@suse.com header.s=susede1 header.b=LHk3Hm4F; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-184960-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184960-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 584882844C9 for ; Tue, 21 May 2024 12:48:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CCF3768EA; Tue, 21 May 2024 12:48:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="LHk3Hm4F"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="LHk3Hm4F" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12B1576025 for ; Tue, 21 May 2024 12:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716295714; cv=none; b=bWULZZcqTGbeFT3kMLaSqEraY72U1MQTrigTHIqqNBof4aLqwfxo6GMxHxcsUlSPL5j2KRu/FtB28ESUBqEmNzP2XQ5Z8lG7r+BUCWTQCybXCLgOPh+ZaXtMOLFsMt4s4RbkeGXvdtJmwwkd3C9DsQwpCMkzKh5VOH+QvhxXeTs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716295714; c=relaxed/simple; bh=Py+M3XrqzrDyPlIZZVyLd3EN6zx+JbcMiKGql8fVV2o=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=dQAOSJBeDJZcQRh5xNeqvNDZnn8ASUvcte/xACxWtIu7ItIbx0sCAvjHSUJMeitKLUkmhptSxGqepkED2aX4xvMLp+z6qPoIwentC8Xc1gwtYW5hvanPOw/rtY8RYj54LCNlGk/4FVZbVG5IQSNbcLoV/+/pugJ85+xvlSBMdqU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=LHk3Hm4F; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=LHk3Hm4F; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D30652232C; Tue, 21 May 2024 12:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1716295704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sth60PATYndDQxclI4sfKvazGosAbA4q70N4pfN4ONI=; b=LHk3Hm4FJ0VqjUJ9hYY4D+1QDKto7WhtH/DyxrP3qdCcVbcXOWt1M4UN77MYOg3G+tQWo7 aeh7X1ROWPs853PpIuxrHdHXq6q3VgDMswKTBpULQ9UnsMkwY/Lv8LGSiX7hu5oGVl3Fl2 +qt7o1alUCXX32ttn7xq1uHYCRHGuSs= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1716295704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sth60PATYndDQxclI4sfKvazGosAbA4q70N4pfN4ONI=; b=LHk3Hm4FJ0VqjUJ9hYY4D+1QDKto7WhtH/DyxrP3qdCcVbcXOWt1M4UN77MYOg3G+tQWo7 aeh7X1ROWPs853PpIuxrHdHXq6q3VgDMswKTBpULQ9UnsMkwY/Lv8LGSiX7hu5oGVl3Fl2 +qt7o1alUCXX32ttn7xq1uHYCRHGuSs= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9E6ED13A1E; Tue, 21 May 2024 12:48:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id s/d2JBiYTGZrNwAAD6G6ig (envelope-from ); Tue, 21 May 2024 12:48:24 +0000 From: Nikolay Borisov To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Nikolay Borisov Subject: [PATCH] x86/cpu: Move identify_cpu_without_cpuid() into main branch Date: Tue, 21 May 2024 15:48:23 +0300 Message-Id: <20240521124823.486372-1-nik.borisov@suse.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: X-Spamd-Result: default: False [0.19 / 50.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; BAYES_HAM(-0.01)[48.81%]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: 0.19 X-Spam-Flag: NO No point in duplicating if (!have_cpuid_p()) check. Simply move identify_cpu_without_cpuid() into the else branch. No functional changes. Signed-off-by: Nikolay Borisov --- arch/x86/kernel/cpu/common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 2b170da84f97..69265c0acaea 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1578,9 +1578,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) memset(&c->x86_capability, 0, sizeof(c->x86_capability)); c->extended_cpuid_level = 0; - if (!have_cpuid_p()) - identify_cpu_without_cpuid(c); - /* cyrix could have cpuid enabled via c_identify()*/ if (have_cpuid_p()) { cpu_detect(c); @@ -1601,6 +1598,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) if (this_cpu->c_bsp_init) this_cpu->c_bsp_init(c); } else { + identify_cpu_without_cpuid(c); setup_clear_cpu_cap(X86_FEATURE_CPUID); get_cpu_address_sizes(c); cpu_init_topology(c); -- 2.34.1