Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1269542rwl; Fri, 24 Mar 2023 08:20:26 -0700 (PDT) X-Google-Smtp-Source: AKy350Z5u3UV3KHq0/qixQZRXTHFwUlyVr0YBE+Ff/zMfVwHi9ivh+YuEPykMstVq4RY0GjriHfE X-Received: by 2002:a17:906:7fd1:b0:86f:64bb:47eb with SMTP id r17-20020a1709067fd100b0086f64bb47ebmr3279712ejs.3.1679671226351; Fri, 24 Mar 2023 08:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679671226; cv=none; d=google.com; s=arc-20160816; b=JZavYngRIF2+J5PLWRSstkUpj7B9MqbTmV99TnXDA9UPInL4VwOcYSZ1cwYuHNAttf m0VbTBqe8B5MFt9l0X391G2DxueKlz/1+JSanSsK7nfTHi1PQRAuDjUmRXrEAHxccmkR jfnrqR6H2/U5fS0OMezEYo8RmEdHdA98G3J5PBVwzPeJNPOoNxj0mIdFI0Bba489yJ2/ bLAI19iRMnO80p7Wo7hXQkxAusUaKuLDklYSU52c4cmtFz6hLLr5rG7wQdzcDdtsHJTX yYkRzPUhIAHUPVuwfKWBxGC33WGc0WKHdgOxXydk4ZbE9GJAZ8IjEMJ9Vo+fHCUkO9/R BA3A== 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=qAdQYxd+GG+dS9UCrKh+ebCQF6NKtlTg93yGBBAgkq0=; b=w3YrOgbGKytbOb16cMCBBsERDSMgIP+REWNlofL3OhbCdOletY1QboaAEyWN8F2mhE hpvFj+L1pRvp7z0NC90uHg8wYL4Dq9WdwFloiIsFHBj/S+eXrCQ7Zf+YtSV2wv+hRdCV MwPBcBMDd4c1LmO9viff7atQ79vDhRBPnJOhbztDfDAzXvqJ7mfyq7krzJxuLagpsqOo H8hpOZcLY9arpqFspBNdlcDfRuAWv7GPJqpcqzBvrc7OGATuS9eq52fXTKBkCSm7GVoR ZZ0c4xoHA2Hhjnj1pqGugCkq3nEaOQBbVLqt1Erqlifj+Plvp9/tUaO4uk0TQdxj+Mpg zF/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="Vl4uNk/S"; 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 tk13-20020a170907c28d00b0093306604e69si1810776ejc.119.2023.03.24.08.20.02; Fri, 24 Mar 2023 08:20:26 -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=@alien8.de header.s=dkim header.b="Vl4uNk/S"; 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 S231920AbjCXPTl (ORCPT + 99 others); Fri, 24 Mar 2023 11:19:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbjCXPTk (ORCPT ); Fri, 24 Mar 2023 11:19:40 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65663AF11 for ; Fri, 24 Mar 2023 08:19:39 -0700 (PDT) Received: from zn.tnic (p5de8e687.dip0.t-ipconnect.de [93.232.230.135]) (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 DB2BC1EC070A; Fri, 24 Mar 2023 16:19:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1679671177; 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=qAdQYxd+GG+dS9UCrKh+ebCQF6NKtlTg93yGBBAgkq0=; b=Vl4uNk/SClwM0P/GR/nuKm5MoaG1DCVlDyDDYhS3bavumn6Q5sQYaEGRbMYmrCd3kteldD DFAc4f/dth/XhDDnj9lLpBCpsg7ynJCixLDOnyUCpa9aS88TkCr5k2luTKWwY6p5gf3lqh LEJ62n6IhZjAQkRWjIE041tXTwsYtr4= Date: Fri, 24 Mar 2023 16:19:33 +0100 From: Borislav Petkov To: John Ogness Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/microcode: move @microcode_mutex definition near usage Message-ID: <20230324151933.GCZB2/hUOFuECIF1AG@fat_crate.local> References: <20230324114720.1756466-1-john.ogness@linutronix.de> <20230324120019.GAZB2Q09ODVq0iYz5l@fat_crate.local> <87edpenvkh.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87edpenvkh.fsf@jogness.linutronix.de> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Fri, Mar 24, 2023 at 02:17:10PM +0106, John Ogness wrote: > I was doing some tests with CONFIG_PREEMPT_RT. I did not think that > mattered, since the mutex is obviously defined but not used for > !CONFIG_MICROCODE_LATE_LOADING. Oh sure, I see that. I'd still like to have in the commit message why exactly it happens. > Digging deeper I see that initializing @wait_list in > __MUTEX_INITIALIZER() is what is allowing unused global mutexes to go > unnoticed. Since with CONFIG_PREEMPT_RT the mutex is different and > initialized differently, it is (correctly) detected as unused. > > CONFIG_PREEMPT_RT cannot be enabled yet, so this patch is not urgent for > mainline. But at some point it will need fixing. Sure, send it to me when it can be triggered with a .config with the upstream tree, along with exact explanation how it happens and I'll queue it. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette