From patchwork Sun Aug 13 17:26:31 2023 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: 135075 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2335305vqi; Sun, 13 Aug 2023 12:05:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxuknbOM7CU5vvsctuwaR89RKizm9Q5Ym+gaYaTgKDKRpNRN/41GKfB2j2GeqFmmDpI2ct X-Received: by 2002:a17:907:78d3:b0:993:d88e:41ed with SMTP id kv19-20020a17090778d300b00993d88e41edmr6804394ejc.3.1691953527879; Sun, 13 Aug 2023 12:05:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691953527; cv=none; d=google.com; s=arc-20160816; b=kIh4OhQ7f219/PZHJMpgy0UCoW+xlo51TCXiBK+wKfUWSsbY6x+qNFIMphww/Y2ul5 L8bY/7Nap/37durgKGr7pd+lpQk8JYio2JiHEXuY3YisP23Kn4qxJYERqKkv7Y39FaM8 ufQwY0OYl/bneqRM+A1vXArq/hDMh6L0zkHeqBxHaiOAQvl2RTLr43qAe6DnmG8XIgDR vfHTDwERLdB0+LEWXt3+nSY+9TZ+rgnO8pwJRGd9boETyqd4w9EMhkBuWyJNIdpWmV0y +2TvGyE9XwnVjvAZ084Fyyt+TqWLItumzn6X4l7YzdERN6UKxIRfOrOFzIDMVSjbnblG dizQ== 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=9g6wafFE0TX2vxDL1r12AgYaUDRlw2j8fDT0M+x+k8A=; fh=2tuUsYo3AHL3ni72DevXvfbsTeDgdXSgM4MfnGax/4A=; b=Jj4NKFycpn6je2sUB3LtYVfbYJZR2Ukt+orPuIgVYdbQU1zAuVfZSgyAlS8T70kDvP NWHIiJ9eoUwTH+NDliIIWNPstXjLS3BuN6k8rrcylE17nM7ZmCAw/zhxsgEOmCDDnLZ4 e+r2+OF9CC1bSN6yibPjVut2ZtXZSOuoExcuxhtpGkg+B53HM+HVfIJZTzaJOXfflwD8 cXwPMa+0xzGrwC90bcYc2zYezyFF5PH2tSHF7rR9N4T5pfSuhj7sUiST9PY4fPFL6hF5 twAyLeRw/IazRuXGXeYEQxKCLOYLm6PDF9HfO59elDY9YcidUWeMQJdTGuHcjGj5Ts+C rYrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=t+zdgeZT; dkim=neutral (no key) header.i=@linutronix.de; 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 kk18-20020a170907767200b00991f773d9b4si6455059ejc.268.2023.08.13.12.05.03; Sun, 13 Aug 2023 12:05:27 -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=t+zdgeZT; dkim=neutral (no key) header.i=@linutronix.de; 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 S231299AbjHMR0e (ORCPT + 99 others); Sun, 13 Aug 2023 13:26:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230413AbjHMR0c (ORCPT ); Sun, 13 Aug 2023 13:26:32 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F25BA10FA; Sun, 13 Aug 2023 10:26:33 -0700 (PDT) Date: Sun, 13 Aug 2023 17:26:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691947592; 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=9g6wafFE0TX2vxDL1r12AgYaUDRlw2j8fDT0M+x+k8A=; b=t+zdgeZTjuIlmcTvMeyi7JlL1VTQOvFE/7bP3qwzBCicNepXCfS/xPmnCOrZd0Ib3yOj+c 40YXuFywW4MyPT3bO81eKm3EYihutFgh6QroWm2qoihtoyMlxNnIjXU//n8ADHeF4Dr4nZ foJ49v2DOoceBTlk59y+zIUIfshrGSdit4dOKBfsBNnze40qEo1f6XvVv0i+VFSLRV5uLd fL3+u6rTYwU618zdnfRmxseoOWOgDC2CUn4CO1DWx29wre6Wvgr6Mn19ZHGcLY+kJF6jUo 8AnSh97VaOJMreJBu8wpMzkGHsYRha4AD8YofpqOmwQk/e8njS2DNNxY8cF5Rg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691947592; 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=9g6wafFE0TX2vxDL1r12AgYaUDRlw2j8fDT0M+x+k8A=; b=5npoWuLqmZL20dlQ7a5k24y21HzkTn3NSkrBtv5Pyxb++3ChEkGIShX+jHQ5hXwYSU6mDq zQl/6WSW7lUmusAg== From: "tip-bot2 for Thomas Gleixner" 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/intel: Remove debug code Cc: Thomas Gleixner , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230812195728.010895747@linutronix.de> References: <20230812195728.010895747@linutronix.de> MIME-Version: 1.0 Message-ID: <169194759141.27769.2999860222151032837.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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: INBOX X-GMAIL-THRID: 1774054860058259707 X-GMAIL-MSGID: 1774141862770730577 The following commit has been merged into the x86/microcode branch of tip: Commit-ID: d44450c5939949fe37e4e94db69429de1ab1aad6 Gitweb: https://git.kernel.org/tip/d44450c5939949fe37e4e94db69429de1ab1aad6 Author: Thomas Gleixner AuthorDate: Sat, 12 Aug 2023 21:58:49 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Sun, 13 Aug 2023 18:42:55 +02:00 x86/microcode/intel: Remove debug code This is really of dubious value. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230812195728.010895747@linutronix.de --- arch/x86/kernel/cpu/microcode/intel.c | 75 +-------------------------- 1 file changed, 75 deletions(-) diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index d983a3e..8621ef4 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -10,15 +10,7 @@ * Copyright (C) 2012 Fenghua Yu * H Peter Anvin" */ - -/* - * This needs to be before all headers so that pr_debug in printk.h doesn't turn - * printk calls into no_printk(). - * - *#define DEBUG - */ #define pr_fmt(fmt) "microcode: " fmt - #include #include #include @@ -405,69 +397,6 @@ next: return patch; } -static void show_saved_mc(void) -{ -#ifdef DEBUG - int i = 0, j; - unsigned int sig, pf, rev, total_size, data_size, date; - struct ucode_cpu_info uci; - struct ucode_patch *p; - - if (list_empty(µcode_cache)) { - pr_debug("no microcode data saved.\n"); - return; - } - - intel_cpu_collect_info(&uci); - - sig = uci.cpu_sig.sig; - pf = uci.cpu_sig.pf; - rev = uci.cpu_sig.rev; - pr_debug("CPU: sig=0x%x, pf=0x%x, rev=0x%x\n", sig, pf, rev); - - list_for_each_entry(p, µcode_cache, plist) { - struct microcode_header_intel *mc_saved_header; - struct extended_sigtable *ext_header; - struct extended_signature *ext_sig; - int ext_sigcount; - - mc_saved_header = (struct microcode_header_intel *)p->data; - - sig = mc_saved_header->sig; - pf = mc_saved_header->pf; - rev = mc_saved_header->rev; - date = mc_saved_header->date; - - total_size = get_totalsize(mc_saved_header); - data_size = intel_microcode_get_datasize(mc_saved_header); - - pr_debug("mc_saved[%d]: sig=0x%x, pf=0x%x, rev=0x%x, total size=0x%x, date = %04x-%02x-%02x\n", - i++, sig, pf, rev, total_size, - date & 0xffff, - date >> 24, - (date >> 16) & 0xff); - - /* Look for ext. headers: */ - if (total_size <= data_size + MC_HEADER_SIZE) - continue; - - ext_header = (void *)mc_saved_header + data_size + MC_HEADER_SIZE; - ext_sigcount = ext_header->count; - ext_sig = (void *)ext_header + EXT_HEADER_SIZE; - - for (j = 0; j < ext_sigcount; j++) { - sig = ext_sig->sig; - pf = ext_sig->pf; - - pr_debug("\tExtended[%d]: sig=0x%x, pf=0x%x\n", - j, sig, pf); - - ext_sig++; - } - } -#endif -} - /* * Save this microcode patch. It will be loaded early when a CPU is * hot-added or resumes. @@ -480,7 +409,6 @@ static void save_mc_for_early(struct ucode_cpu_info *uci, u8 *mc, unsigned int s mutex_lock(&x86_cpu_microcode_mutex); save_microcode_patch(uci, mc, size); - show_saved_mc(); mutex_unlock(&x86_cpu_microcode_mutex); } @@ -631,9 +559,6 @@ int __init save_microcode_in_initrd_intel(void) intel_cpu_collect_info(&uci); scan_microcode(cp.data, cp.size, &uci, true); - - show_saved_mc(); - return 0; }