From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EEE0CDB474 for ; Tue, 17 Oct 2023 21:24:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344442AbjJQVYu (ORCPT ); Tue, 17 Oct 2023 17:24:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235099AbjJQVYR (ORCPT ); Tue, 17 Oct 2023 17:24:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16600109 for ; Tue, 17 Oct 2023 14:23:49 -0700 (PDT) Message-ID: <20231017211722.906846627@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697577827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=ADl+tJKDMR2begbrrA6j9nZiECrMHsdLH4cmpVlI80c=; b=VpueM5HDqoiK3sCXhwPD6b0fiPdVfrHugBHN7qhHb+lqxjjg5iZs3MZdP3nfVpTS5CBGJ2 Qoz2G5mg3fPS+1gHSp4DPUB9IvawsSK3MZy+/qdk4Gv9CoUQQEkY0DpU1a+qcntGJWn5Qm CovYxLc1w1z1MY36YxkcTYYzmKugmE4UKH27sstOUzPv+NuaGhY49A3pM/bl0qUgFY/kVR VBtdd3RMvJRJCSfXCDFLpHc/yw9aFnif8orGuPmwXNvQhQRMPOljT1VPgZJINTA1n60jDJ WXX1cNio81VqipAwJNxbJl8RYgu5YzMD9DMq/kDonk3KpBmEaMTdMrHDSEhKzg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697577827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=ADl+tJKDMR2begbrrA6j9nZiECrMHsdLH4cmpVlI80c=; b=JfbmqsMHChDAPl3sxuOtQzJeb4BqdGbG7mBqTOHEFsSw4Bs9IsIvs0ifCVFpfMtotA6Jim IPTzli7NFvmsRDAg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Borislav Petkov Subject: [patch V5 17/39] x86/microcode/intel: Reuse intel_cpu_collect_info() References: <20231017200758.877560658@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 17 Oct 2023 23:23:46 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner No point for an almost duplicate function. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/cpu/microcode/intel.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) --- --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -419,21 +419,7 @@ void reload_ucode_intel(void) static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) { - struct cpuinfo_x86 *c = &cpu_data(cpu_num); - unsigned int val[2]; - - memset(csig, 0, sizeof(*csig)); - - csig->sig = cpuid_eax(0x00000001); - - if ((c->x86_model >= 5) || (c->x86 > 6)) { - /* get processor flags from MSR 0x17 */ - rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]); - csig->pf = 1 << ((val[1] >> 18) & 7); - } - - csig->rev = c->microcode; - + intel_collect_cpu_info(csig); return 0; }