Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp264602rwb; Sun, 6 Nov 2022 05:47:50 -0800 (PST) X-Google-Smtp-Source: AMsMyM6GWcUTmCYxGwyi/1bfbd7550ZwDPMKDijwie7DXStLZsdmwOCLSs2p5nGPAVoGHSMnJIxe X-Received: by 2002:a17:906:974e:b0:7ac:baef:7394 with SMTP id o14-20020a170906974e00b007acbaef7394mr41706997ejy.212.1667742470301; Sun, 06 Nov 2022 05:47:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667742470; cv=none; d=google.com; s=arc-20160816; b=QXq8ccrJWtlQzlaiazQqNH7b6+kGOmOswlzFGOKZ1+FV5iHSR2AjOiS44SKUOmRoHv FPBDI7W2K35f4lmoJHzUhPNquOR16Y1P5ZkDI1DCzWuzMJH5rLzVbp5IkJiwfAymppvL Ti03X/PKko4BOLmIc1nr2V3WXzDjy+UxvQI28MRi6F7+Q1b0ud4B48z8iRHEr7bk+K4G 62Ciue9SPy/awILSdiNiwdfJRCVXlFNHOBaNTfeSLejN9klH2BHS28wsYT40uMhshC7D d7k/CN387ncdrI8pJEjaqghsTa3Ex45yPaZ9qYBa1PIxTpjVmgP5j4Nj1J6M0earZgyd xf1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=I5cmTwqL0wnTPzviAC8jMaIF1V7iZJ2LVpUVD7MHVyw=; b=VnjNmAlRrBXsTFCnzwiSrVaazzVwtlEee9JBi/sUm5iE0XSrRrG+TVccbMwOL8E7ME 7/ya99dbW7TFw5gvGXyOyGw+pERNRk3RQaRQX1H5nSHLVwkzMRa2lxnElos77XKWXnuP od2NV0cqGuBeUxOQkPYjijMG2YtL7shoNGIqx1gr3lgfKfizFyqSG7RmEpTmyA2hdsSl 1vsEuoGFFL40AOSszknU/qAs+SihwkNbDHH4Ekxc9hAyvdWCcJ7SV8zUhY9rwh7v14H+ ciPRCvEpjVS824rpm3irKr19s4JyhLkMXrBt/trG/H1fk0yQ6w7iwkb6sjytVuAKlPI7 Aibw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=MiLdg8CN; 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=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw19-20020a170906479300b007ac2daa0b49si6654491ejc.367.2022.11.06.05.47.27; Sun, 06 Nov 2022 05:47:50 -0800 (PST) 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=@alien8.de header.s=dkim header.b=MiLdg8CN; 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=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229984AbiKFNgL (ORCPT + 96 others); Sun, 6 Nov 2022 08:36:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbiKFNgJ (ORCPT ); Sun, 6 Nov 2022 08:36:09 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06965DFFF for ; Sun, 6 Nov 2022 05:36:06 -0800 (PST) Received: from zn.tnic (p200300ea9733e7a5329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7a5:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 4DFC81EC06A9; Sun, 6 Nov 2022 14:36:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1667741764; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=I5cmTwqL0wnTPzviAC8jMaIF1V7iZJ2LVpUVD7MHVyw=; b=MiLdg8CNRGju7VBzB6BnFJKqhB0FvJ4JVdisauoGxdYXMEuXHPGbCJ0BfuXNAYb7jFF81I 57aETF36yfGntLgbe4pEJaGdpzkNDkOXxRKAGKyDPlrI6uAn+qFWWeSCkz1v1QnjUTJNiy pXJ+K7eD4I9kcPLtjXl0Y6OO1J0Rv90= Date: Sun, 6 Nov 2022 14:35:58 +0100 From: Borislav Petkov To: Ashok Raj Cc: Thomas Gleixner , LKML Mailing List , X86-kernel , Tony Luck , Dave Hansen , Arjan van de Ven , Andy Lutomirski , Jacon Jun Pan , Tom Lendacky , Kai Huang , Andrew Cooper Subject: Re: [v2 01/13] x86/microcode/intel: Prevent printing updated microcode rev multiple times Message-ID: References: <20221103175901.164783-1-ashok.raj@intel.com> <20221103175901.164783-2-ashok.raj@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221103175901.164783-2-ashok.raj@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Thu, Nov 03, 2022 at 05:58:49PM +0000, Ashok Raj wrote: > @@ -696,8 +697,7 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) > > csig->rev = c->microcode; > > - /* No extra locking on prev, races are harmless. */ > - if (csig->sig != prev.sig || csig->pf != prev.pf || csig->rev != prev.rev) { > + if (bsp && csig->rev != prev.rev) { > pr_info("sig=0x%x, pf=0x%x, revision=0x%x\n", > csig->sig, csig->pf, csig->rev); And now that we've established that we don't do mixed steppings anymore and the microcode revision is the same system-wide, you should simply drop this pr_info(), in your next patch you're adding +static u32 early_old_rev; That thing should simply be /* Currently applied microcode revision */ static u32 microcode_rev; and you simply update that one each time you update microcode and print it as the previous and the new one and then write the new one into this var and that's it. Simple. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette