Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1438844rdh; Mon, 25 Sep 2023 12:51:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMbc9tle8mRV1Q/B6NNoToHxRk7J3vKJAcFH26vbb0sFBhSVo7b5v3vseDYY/XXBnTKo2W X-Received: by 2002:a17:90a:b288:b0:26b:c5b:bb44 with SMTP id c8-20020a17090ab28800b0026b0c5bbb44mr6762320pjr.13.1695671485757; Mon, 25 Sep 2023 12:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695671485; cv=none; d=google.com; s=arc-20160816; b=G28/5QVkYt8gFGMVW/ZwAEBwcRyiQgXXhQ0ZxaontgtBMaXi9hx1o6mB5c49/8QObo D1TI6JIPKLnZyZ3lmrmPgiixs06ZmtrALLNUxoqu4sWR3fXEO6fZ/BtReVLk3HpEK9QT /MDx62uKlBY/dnEhb8pNIojAItRO+U4luQygLkzZUm73dgVHMo+QdII+Ob48SQ3mq7e1 FwfPm0RMJli6eNMTSOj42BMyNcdOUxJmOrlDwXtVtHszRM82QFIITqoVHQGOmgShdaWa +/Zy9DP9nGnQRPjSvNp9IoVEj9cwSjTAzGL3v3IgA73ETT8I6qDBmR0SaRJJY8qNLQ6M p1HA== 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=nIxg/Ujz545pz1uUk69VdG7hAbXi7YxGHlSiBDExfco=; fh=PzO2CxsOiBbTGhXkcERuVR7d1qaW+lNW0j3GLCtBkwc=; b=TziisH91U1VdqPTAfGSbWko+ze+1zfBaj7shOd11dhMSwwlOyiHjsyu8wEx3n3lTWY Sg9XlD4uFyoUm1TFDZDlhqlo0xBgtgDGqrvF31Rn3dtvs77N+gw16xOyQXwkRwNmWeVW 3LgCSqp6dF14KNmzzk2mnlIb2fmbqMYUcePbvkRlEgTa3qaYMI1kuvBrMzraYck3L42k wnpg1S+6iBFcJL2DxEfXNWhEOODKRIZ88tGpCITL2oMJ1ouaGsg7fiJ4hBHbq3Gg38Bq Lw9cegPAgyuX8w4KEfDin9DAApvqgtOvdB4mkCnke6FdLf8zKHojGTPhZDyIkJMAw6iW Q5Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cwKuH7UH; dkim=neutral (no key) header.i=@linutronix.de header.b=lN+JgiMY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id kx8-20020a17090b228800b002765c8090b6si12493615pjb.81.2023.09.25.12.51.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 12:51:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cwKuH7UH; dkim=neutral (no key) header.i=@linutronix.de header.b=lN+JgiMY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 61B94807C5DA; Mon, 25 Sep 2023 08:51:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233372AbjIYPux (ORCPT + 99 others); Mon, 25 Sep 2023 11:50:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233385AbjIYPu3 (ORCPT ); Mon, 25 Sep 2023 11:50:29 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E38C7CF1 for ; Mon, 25 Sep 2023 08:48:49 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695656928; 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=nIxg/Ujz545pz1uUk69VdG7hAbXi7YxGHlSiBDExfco=; b=cwKuH7UHAWvwZUJXR1Lg1hIyKppXvQ8bGNN6CIcvVo1KLyXw/zKMHWHQH8tSe5DPrKbmyr AXeHF9NLlhhF4sOJRbiTtGHS3j/LY7ZAQa2wKcE8nP5Qjrh6Jy0q3hLHohl9CYDCD4DYRt B2ry7GeBKZgKeZ5O9Gqz29IyjIykdExP2yKMIZ9K1eUdkdUDWC64abXOnRgEU8XkV4GVhI YDCt9s2uM5ofoX+uE0LU5gBpVsjdGb1X4JIYrxM6hM6NYqr6I9U1Hhohe28xMYa7Zjeyq0 THmTfFyN87bdL2SmSQ6jHfPHVENmdCzXvs8UpnUir8Emjsq4Y1nti0j+NB2XWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695656928; 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=nIxg/Ujz545pz1uUk69VdG7hAbXi7YxGHlSiBDExfco=; b=lN+JgiMYFuPX8AEASevQMSklh5h+a5SPgjL1BLvcupYaPU7zyUh0jF6GNY5rSoUJmrIuKq 6NjZVUxonRMtfWDw== To: Borislav Petkov Cc: LKML , x86@kernel.org, "Chang S. Bae" , Arjan van de Ven , Nikolay Borisov Subject: Re: [patch V3 12/30] x86/microcode/intel: Reuse intel_cpu_collect_info() In-Reply-To: <20230921104220.GHZQweDKyaJmkYdt4f@fat_crate.local> References: <20230912065249.695681286@linutronix.de> <20230912065501.530637507@linutronix.de> <20230921104220.GHZQweDKyaJmkYdt4f@fat_crate.local> Date: Mon, 25 Sep 2023 12:47:16 +0200 Message-ID: <87zg1afs23.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=0.2 required=5.0 tests=DATE_IN_PAST_03_06,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 25 Sep 2023 08:51:13 -0700 (PDT) On Thu, Sep 21 2023 at 12:42, Borislav Petkov wrote: > On Tue, Sep 12, 2023 at 09:58:02AM +0200, Thomas Gleixner wrote: >> static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) > > You can get rid of that silly wrapper too and use > intel_collect_cpu_info() in the function pointer assignment directly. > > Diff ontop: > > --- > > diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h > index 4066dd3734ba..581ecfbaf134 100644 > --- a/arch/x86/include/asm/cpu.h > +++ b/arch/x86/include/asm/cpu.h > @@ -75,7 +75,7 @@ extern __noendbr void cet_disable(void); > > struct cpu_signature; > > -void intel_collect_cpu_info(struct cpu_signature *sig); > +void intel_collect_cpu_info(int unused, struct cpu_signature *sig); Eew. That's a function exposed to code outside of microcode and just grows that unused argument for no value and you obviously forgot to fixup the extern callsite :) > diff --git a/arch/x86/kernel/cpu/microcode/internal.h b/arch/x86/kernel/cpu/microcode/internal.h > index 051b7956d4fd..b3753025cd4a 100644 > --- a/arch/x86/kernel/cpu/microcode/internal.h > +++ b/arch/x86/kernel/cpu/microcode/internal.h > @@ -30,7 +30,7 @@ struct microcode_ops { > * See also the "Synchronization" section in microcode_core.c. > */ > enum ucode_state (*apply_microcode)(int cpu); > - int (*collect_cpu_info)(int cpu, struct cpu_signature *csig); > + void (*collect_cpu_info)(int cpu, struct cpu_signature *csig); > void (*finalize_late_load)(int result); Making this void makes sense, but that's a separate change. Thanks, tglx