Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2543224rwb; Fri, 2 Dec 2022 11:12:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf4pJG0kftruKPCJ9y7LbScVx9xWcGj+fbHxPJUvm648Z9HN0yvZHyjaNwj+RfJEL6h+FYIl X-Received: by 2002:a63:da10:0:b0:477:ccac:6eb5 with SMTP id c16-20020a63da10000000b00477ccac6eb5mr37223771pgh.41.1670008323905; Fri, 02 Dec 2022 11:12:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670008323; cv=none; d=google.com; s=arc-20160816; b=pgFYn8VORacuDDvTeIEOoNgnB/O6l2rIpaLXLdfJdqyFI85mXusYZ9Lu8Zwjypi6DH XnpYT9Tv28M0VvQrpMyTwspRtFk9w1oLZTLZvDp4bYnOju8cnjpAFn5mK/A0AuN3PFlt 4F559lyPbnh2BJrmnxiYQpZFpddL0riX3NK+J0FGAUikqGim9CaQONeeZWkq+nl8L0NO mOkQllEV0D9dZIizCNGzOdRw2Vj2RzekJUI2QsnCAQt0Rm18xGZXNdZJylsdWR2ohkl1 7crITxrmm51HtlGtNKCiWKJllAw7hyGBK2xG32/blRBHpGExVYCvu0YhkGK9t0Nq1BaD 8rCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=YTAaq0K2yMj7q/wt8hfIaZP0HJYKKi1+zXlY0Z5SIEE=; b=eIaQlTyD7vXqkMua6SrTBasMYpcq9YXUjy8TbC8uS3Fb7cR1WArasrqWFfSQnKWBFP 3OC+DZ+aeV9LbcsLJBm2WZpMIV/Kd/R/ESmqmwI64E/pC4Y/GskxKdV75mFq/w0SPxIH OjG4uX2xamvvnAregiPL9CS1oO2b1GzLkJMEEf0q7OOz8o1juGRIL9RHFin2x2cENfVq Eui/erD6TUfngXD6qRNrAXUxIlF3fUb0bBBnDlyhMa3HF6fbYk91zItoXy5fLqyZeP+o PfhomevPVPxF4iWqTcdxRcQLSXjJp32yRjSV8czTT4DpqH1NxOj6Ie1+WXqHsX/DbbLx zWNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TgdxiseK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u62-20020a638541000000b0046086f8f5d0si8059835pgd.537.2022.12.02.11.11.52; Fri, 02 Dec 2022 11:12:03 -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=@linutronix.de header.s=2020 header.b=TgdxiseK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S234464AbiLBS6v (ORCPT + 82 others); Fri, 2 Dec 2022 13:58:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234720AbiLBS6p (ORCPT ); Fri, 2 Dec 2022 13:58:45 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAC1A9A4D2 for ; Fri, 2 Dec 2022 10:58:44 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670007522; 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: in-reply-to:in-reply-to:references:references; bh=YTAaq0K2yMj7q/wt8hfIaZP0HJYKKi1+zXlY0Z5SIEE=; b=TgdxiseKmR3QZUPIkisqSBFbY2qjrS4do1CEQXae/CPfZi/pMY94N5Iza9+0Dw23J0R4Ga vowu2Vp2W/FXUYoEBuuHwim1pQ4DrO83ueF/g7AVRdlgrtVifSqEZlfKePJ6zpFomV8z+5 XVRg1pRDCEOG+zc27vNzunSk7/so/KTU23AQ0q9NYRfAn36GWeTR0eRg6dQ36MO0CgVwTg Ohzn8KFNQszWsYGYVROV9EIzHxZBedHy3MtJvPJMr2W1VatkLbrlEfT/IPQ+4LnsMcOkFH KSbO7pyatDfSJDfXpswAL03eUwy/9wl6rbueMwAFP9+eMkaa8flwksnmetbVSg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670007522; 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: in-reply-to:in-reply-to:references:references; bh=YTAaq0K2yMj7q/wt8hfIaZP0HJYKKi1+zXlY0Z5SIEE=; b=7j6+Gers8GCK8kklGUF/xqNmB6OIiRTTnAjOaAZQEdlTg+esPXHR7JCt6/28UbBc/74M8J 6rF/s+ELdXjw72BQ== To: Ashok Raj , Borislav Petkov Cc: X86-kernel , LKML Mailing List , Ashok Raj , Dave Hansen , Tony Luck , alison.schofield@intel.com, reinette.chatre@intel.com Subject: Re: [Patch V1 1/7] x86/microcode/intel: Remove redundant microcode rev pr_info()s In-Reply-To: <20221129210832.107850-2-ashok.raj@intel.com> References: <20221129210832.107850-1-ashok.raj@intel.com> <20221129210832.107850-2-ashok.raj@intel.com> Date: Fri, 02 Dec 2022 19:58:42 +0100 Message-ID: <87cz91pr8d.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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 Ashok! On Tue, Nov 29 2022 at 13:08, Ashok Raj wrote: > There is a pr_info() to dump information about newly loaded microcode. There... Somewhere, right? > The code intends this pr_info() to be just once, but the check to ensure > is racy. Unfortunately this happens quite often in with this new change > resulting in multiple redundant prints on the console. -ENOPARSE. Can you try to express that in coherent sentences please? > microcode_init()->schedule_on_each_cpu(setup_online_cpu)->collect_cpu_info > > [ 33.688639] microcode: sig=0x50654, pf=0x80, revision=0x2006e05 > [ 33.688659] microcode: sig=0x50654, pf=0x80, revision=0x2006e05 > [ 33.688660] microcode: sig=0x50654, pf=0x80, revision=0x2006e05 > > There is already a pr_info() in microcode/core.c as shown below: > > microcode: Reload completed, microcode revision: 0x2b000041 -> 0x2b000070 There are quite some pr_info()'s in microcode/core.c... $function_name() prints the new and the previous microcode revision once when the load has completed: microcode: Reload completed, microcode revision: 0x2b000041 -> 0x2b000070 Hmm? > The sig and pf aren't that useful to end user, they are available via The sig and pf ?!? Come on, you really can do better. > /proc/cpuinfo and this never changes between microcode loads. > > Remove the redundant pr_info() and the racy single print checks. This > removes the race entirely, zap the duplicated pr_info() spam and > simplify the code. The last sentence does not qualify as coherent either. Other than that. Nice cleanup. Thanks, tglx