Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2644009rwb; Fri, 2 Dec 2022 12:48:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf6vcgs3FJtmySSOnLYfJTm1DOwfiZB4IA+GLbjGDVPNEcfo9JfKVhrO8L4XZSCstou5PCiK X-Received: by 2002:a17:902:f78c:b0:186:8c13:50b3 with SMTP id q12-20020a170902f78c00b001868c1350b3mr53748327pln.153.1670014109205; Fri, 02 Dec 2022 12:48:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670014109; cv=none; d=google.com; s=arc-20160816; b=rYTHNf8uBlrJekO0aqT6Acbi4VxIRxc3CO0zV2BE8jeij8IYBL1Ejc4Tb/DWz0qw5f A20jn9miKb4uloCIK+MnAxKteyAij1cIzOKoKYvVkSjcYQ3tlbSsMUdLmSnhzoh3XFaW BWQqHMFX3c4KNIhukHMXn8BDa4L88cdHXp5k+F1+tJvt8YM+MC7+HnVsxtHGYdOtHRpa /tG5qxXWYNOppCX593yOJcRyQMmnQPZGUD7ZqbnzM/PLyaas3lZY+/4LZM31k1LUc50h ZeXMx+tR1p4YmDscwiO08Gjp52IZ1XG6hNbyrPBmwhH7UafSAeJNO4mfhdSAq2QSUcCK qsrg== 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=bV2EzwLCAkqStO5X/oBmuNeHZefcqIt2y+2D2SEUA4o=; b=YxyfPU8V16OESM/h3/3cbmAP5n07NDHVgoFkuZSbkO4dTNFpXfux0lgGL3MYyGaOVW cST95uL76QEkTdb3kcfGJRjnrWrhHyRXY42llf9C/k5+enO2arwgwAdrY05lZKPr0sn9 YRzB2jv6n32BnlBu3AmejjdY9FwmdINXM68ddDsKI4722p5zdztLfyU2cnBQt8fd8Uyy Upbw2LAc+sDaTu1DQULMzmNvs1IX8TmPDdhursMO4IUf0FD5RdeKaHH6EJ/FfioG3Ab+ bN/E2E1GtbfXfvAsOLEmGcJ2lW6JI1MC2HonKnRda9nsHn0JMzekrlPvyzyd5Qca/TTQ BNQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YfPgqs8I; 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 y18-20020a62b512000000b005766cd2128dsi1799360pfe.269.2022.12.02.12.48.17; Fri, 02 Dec 2022 12:48:29 -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=YfPgqs8I; 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 S234610AbiLBTXe (ORCPT + 82 others); Fri, 2 Dec 2022 14:23:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234730AbiLBTXb (ORCPT ); Fri, 2 Dec 2022 14:23:31 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAA5EC23F8 for ; Fri, 2 Dec 2022 11:23:30 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670009009; 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=bV2EzwLCAkqStO5X/oBmuNeHZefcqIt2y+2D2SEUA4o=; b=YfPgqs8IbL3kav7yhqANGovHCCrWdn6TBgsU3wgl65dMjITMeOR1KJq7wfpOhaKItSgAah gQ9sNYn4rjcXcImf3h/0pQ1b9tU6xSdxxo0EVdc3y7p3Z3ROwbJn7mlEkOY+Sx0T6YCbsM xu93IRu0Xlnn9NM6gIf/Mn6w5Rs3I2Kx2+jrQjXJyF/vPuCDtMOilrcqzbM7gjw3UsCr8l Chx/pWtMlDO3/e21JEZ9Lv+Rc7Fu3+yeEYKp57wQ3wiqRs70LZcuns9Iq0gzJn4bY/W3/J vyLu5IWb9xHMRcn040CvVDNpo3BguScH0XBP4w+yUqqCNBPyZli4003k1DkVSA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670009009; 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=bV2EzwLCAkqStO5X/oBmuNeHZefcqIt2y+2D2SEUA4o=; b=q6Fn78WsaZ+Matzg3UEpvndL5IBj3BVbl2UVKImBEWERfil92Wv/9q6mzmkoLfNznv762X MhD4oXzlKgyw3XDQ== 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 5/7] x86/microcode/intel: Prepare the print_ucode_rev to simply take a rev to print In-Reply-To: <20221129210832.107850-6-ashok.raj@intel.com> References: <20221129210832.107850-1-ashok.raj@intel.com> <20221129210832.107850-6-ashok.raj@intel.com> Date: Fri, 02 Dec 2022 20:23:28 +0100 Message-ID: <871qphpq33.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 On Tue, Nov 29 2022 at 13:08, Ashok Raj wrote: > Instead of passing a struct ucode_cpu_info, just pass the rev to print. > > Next patch will permit printing old and new revisions after an early > update. A subsequent patch will print a message when early loading fails. > > struct ucode_cpu_info is always the current version in the CPU. When > loading fails this is the old rev, when its successfully applied its the > new rev. That makes the code bit ugly to read. > > Remove the struct ucode_cpu_info parameter from print_ucode() and let > the caller to pass in the revision number to print. Back to word salad mode? Subject: x86/microcode/intel: Use a plain revision argument for print_ucode_rev() print_ucode_rev() takes a struct ucode_cpu_info argument. The sole purpose of it is to print the microcode revision. The only available ucode_cpu_info describes always the currently loaded microcode version. After a microcode update this is on success the new version or on failure the original version. Subsequent changes need to print both the original and the new version, but the original version will be cached in a plain integer, which makes the code inconsistent. Replace the struct ucode_cpu_info argument with a plain integer which contains the revision number and adjust the call sites accordingly. No functional change. Hmm? Other than that. Reviewed-by: Thomas Gleixner