From patchwork Wed Nov 2 16:08:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 14326 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3060wru; Wed, 2 Nov 2022 09:09:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM71RioncGmyYhpnYF1D1QSU/A+aDZkiT+wwEzuQ3Nw6a8CB8EdGWCvJzgoVpGq79kHM6IFE X-Received: by 2002:aa7:df94:0:b0:461:aff8:d3e1 with SMTP id b20-20020aa7df94000000b00461aff8d3e1mr25673836edy.10.1667405388920; Wed, 02 Nov 2022 09:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667405388; cv=none; d=google.com; s=arc-20160816; b=elDMK5SKDDjDP3e7SgXZymM7uEApYScgGGbCd16N1h7AWijGQjUD3F7Py2TlewFeNh tdaJ0KdYXTO2gv8OWvbUFf3XZ8ArctfTQjSrDdcdPq5s0zhgJyOZwHO5LpwZQ3pwqF90 3mEhZSIF+pFM+dgpKFnBB/ums3mLV6p8m89Ku79mxJ5j1qsxQAquizMGPnTRYa5Y+SqZ R1GuNmERErHmd2jn1lCaQF+xIwxESS1276SwEArFWMTUHmv+7JD3pX4KxrjT2bpfOM03 e8K+jzx3O1OHBHGqTNRc+4Q/f0lL0vJgbfpS4G2sBEYFhYxx0ygoT/tWKj16em+duEbX ImXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=409bMVTBRdKa8UrKbFq/pmwOU0N/BaKvfsRkl1vzBsg=; b=cRiQimqhjv5xXvU6KSKpOMVVbkeb+jX2YdXeqR6wC0XWBbcgk4sg/HeCgQExq3EN7z WloVO/yFaLgm359AVT1X6J8N5dbzKms0oY3EMo0s0Nut/TLkybFaPGBGz8sZP59N6pFO RKGKm3BRcO6ASYiSNXARGnALrM/MEaBN3w5iRGgS8ic46hNzkal9sXThe/V9XC3BHHpJ LK1n83uvcW0EVspp/0dck6EW06V+q6GAfcpexZwRZ5STXNJTaiQ9ilT7SUcpR1Vz2ShX 6qigfsJWQfz/OzD56LqvxVU4QCx6Rb8OCOstDHe2UxavTzwIvuC4r0j3Z731VrwsqV5e zA3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ZVhab/tX"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="PYW5/+4h"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fk27-20020a056402399b00b00458cba4c78bsi15064303edb.416.2022.11.02.09.09.11; Wed, 02 Nov 2022 09:09:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ZVhab/tX"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="PYW5/+4h"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbiKBQJB (ORCPT + 99 others); Wed, 2 Nov 2022 12:09:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231124AbiKBQJA (ORCPT ); Wed, 2 Nov 2022 12:09:00 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B30272B1A5; Wed, 2 Nov 2022 09:08:59 -0700 (PDT) Date: Wed, 02 Nov 2022 16:08:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667405337; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=409bMVTBRdKa8UrKbFq/pmwOU0N/BaKvfsRkl1vzBsg=; b=ZVhab/tXD9XYm93nhavxM2XwjRVRRlLyQ4PurB4njZ4E+GxaSv/fPOH6r6ke4vwTRZYxT/ 9AHTCHD1FBkrPiLTY2Itx8COmgDk7UBcrkida2M2tm9wLvOpZATNM8qn34uNhU/oREr0Jm XBdlT+cbfMX0+nBvh/rdC3vPUTyrmVGIawCCqeHaI8AygKlA/CLpOlnuY8NfGmvbRP3GfX KHhoOz6g0nfLMV7KiygyddnGsgRw367puCiFLnRF4VDOWAifTunx7xz64ZNn1VxfUU1iqU idNzXyV4bPCRRUNqcmcNIjv3rHLWAXdBsY6b+meNNg6AW2RP7MaGqgpmbS5MLw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667405337; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=409bMVTBRdKa8UrKbFq/pmwOU0N/BaKvfsRkl1vzBsg=; b=PYW5/+4huF+SC7HV+QqyWwUQWNS6Kh1xDCcrYa8PzrHi6OCkkI/HJcl+uidNncKocBwsg2 NVyluJ2+r1TUAeCQ== From: "tip-bot2 for Borislav Petkov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/microcode] x86/microcode: Drop struct ucode_cpu_info.valid Cc: Borislav Petkov , Ashok Raj , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221028142638.28498-6-bp@alien8.de> References: <20221028142638.28498-6-bp@alien8.de> MIME-Version: 1.0 Message-ID: <166740533523.6127.10746142712096251030.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747942047994013025?= X-GMAIL-MSGID: =?utf-8?q?1748401273003373437?= The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 254ed7cf4dd79a18bbc496ab53f6c82d45431c78 Gitweb: https://git.kernel.org/tip/254ed7cf4dd79a18bbc496ab53f6c82d45431c78 Author: Borislav Petkov AuthorDate: Wed, 19 Oct 2022 19:25:27 +02:00 Committer: Borislav Petkov CommitterDate: Wed, 02 Nov 2022 16:45:46 +01:00 x86/microcode: Drop struct ucode_cpu_info.valid It is not needed anymore. Signed-off-by: Borislav Petkov Reviewed-by: Ashok Raj Link: https://lore.kernel.org/r/20221028142638.28498-6-bp@alien8.de --- arch/x86/include/asm/microcode.h | 1 - arch/x86/kernel/cpu/intel.c | 1 - arch/x86/kernel/cpu/microcode/core.c | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h index d4c36fb..d5a58bd 100644 --- a/arch/x86/include/asm/microcode.h +++ b/arch/x86/include/asm/microcode.h @@ -49,7 +49,6 @@ struct microcode_ops { struct ucode_cpu_info { struct cpu_signature cpu_sig; - int valid; void *mc; }; extern struct ucode_cpu_info ucode_cpu_info[]; diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 2d7ea54..beb8ca5 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -210,7 +210,6 @@ int intel_cpu_collect_info(struct ucode_cpu_info *uci) csig.rev = intel_get_microcode_revision(); uci->cpu_sig = csig; - uci->valid = 1; return 0; } diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index ffb249c..712aaff 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -554,9 +554,9 @@ void microcode_bsp_resume(void) int cpu = smp_processor_id(); struct ucode_cpu_info *uci = ucode_cpu_info + cpu; - if (uci->valid && uci->mc) + if (uci->mc) microcode_ops->apply_microcode(cpu); - else if (!uci->mc) + else reload_early_microcode(); }