Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1387833rwl; Fri, 24 Mar 2023 09:51:28 -0700 (PDT) X-Google-Smtp-Source: AKy350bsafmgWDuMzLOQueyncD83HJlpc0WOc1eds2Osr6Idfbz94ioek23w5xk7ACk9BXfQwaDZ X-Received: by 2002:a17:902:b491:b0:19a:9610:b234 with SMTP id y17-20020a170902b49100b0019a9610b234mr2531395plr.1.1679676687738; Fri, 24 Mar 2023 09:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679676687; cv=none; d=google.com; s=arc-20160816; b=E8wtnIqolIt1rnLKDESc3c6KoW7nonbDiKFyfMLHWqNRvjwnqXJk/T9fpnTyLvmzQi wCiE5nvnQqD4TUNbKC6Q9zr8XjbOWcvvc/ekb6UlMdKDz7uB4d7xpmu9MJf+0YZbbH15 8NN+gvkbDCnvmIuqDSKxSAU2Gjg9oyFZn5Vb1DbOdftyKeLTGJrpfyfapKlg5M2gqirD 5WFYU0RCdbxGDGJY6XOfQwencS0DREy+8y3JbNCnVFBgjwbjeKake6YCUXaz2LeEXpLw yrQEbF+JEwHg4kEav7JJtyiajyNPRH22xgOx4qHhVe0dZOAza1eXxT4WUSSBiZN+vqba wEKA== 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=9QA2NK4KvzW8q0qZ7Eqn6oHGcHB6OtTLISFz+Esf1IA=; b=QadWdXWs2LfmUzhrb6jLHg/uLWAIAcciTOY2hWh8rEwTbcNJGUkVwWdEj29ln8iAsY VIWbbvs4aRYTGNgafjIrgYof0VNEEWzlJES1C9UD6uMe/De5RqQGYp6IUpw2MtZS9I14 Wn2QphCctV09jMZrYF9/ukx3SEYDI/SiGNvU4wlvqlmbFj10twIeB/nmol5d+7Gq1VAL u0Mtlj7jOBQHjq0usnpsLmvUN5aPg/mM5jBRcik/xW/It4i9meel9PU7QnqLdNj/uO1R KyGoHxWwd0kyE6ATqfgXcwd6T1zyuFxp+HoGUuEWO+6AOyF+o6Gt/pOzT/6bSPycgZfE qo5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=DAg2XGyf; 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 g7-20020a1709026b4700b0019f0e79904asi19997526plt.78.2023.03.24.09.51.03; Fri, 24 Mar 2023 09:51:27 -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=DAg2XGyf; 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 S231693AbjCXQow (ORCPT + 99 others); Fri, 24 Mar 2023 12:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbjCXQov (ORCPT ); Fri, 24 Mar 2023 12:44:51 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAF2D15153 for ; Fri, 24 Mar 2023 09:44:50 -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 719531EC0657; Fri, 24 Mar 2023 17:44:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1679676289; 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=9QA2NK4KvzW8q0qZ7Eqn6oHGcHB6OtTLISFz+Esf1IA=; b=DAg2XGyf8oIE1rxxomhhtVQ1unVh2ngOonk6bUTGVcSG7WF53iMBgPJGpFGxeeSQGJMbjO VJCZmFIxY7SwHpKQCjqdULStGAn3sE1t85DA6QVH3kodEmFQrNUz5qmtsfYIdxEEh8QQ50 18Yyxkw0pZ+2wP3negXKGUOvTrW5F7Q= Date: Fri, 24 Mar 2023 17:44:45 +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: <20230324164445.GEZB3Tfe7pRV+GgE4f@fat_crate.local> References: <20230324114720.1756466-1-john.ogness@linutronix.de> <20230324120019.GAZB2Q09ODVq0iYz5l@fat_crate.local> <87edpenvkh.fsf@jogness.linutronix.de> <20230324151933.GCZB2/hUOFuECIF1AG@fat_crate.local> <87a602nm74.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87a602nm74.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 05:39:35PM +0106, John Ogness wrote: > Note that an unused mutex is being defined, even when the compiler is > not warning about it. Are you sure? $ make arch/x86/kernel/cpu/microcode/core.s grep microcode_mutex arch/x86/kernel/cpu/microcode/core.s $ $ make CC=clang arch/x86/kernel/cpu/microcode/core.s $ grep microcode_mutex arch/x86/kernel/cpu/microcode/core.s $ Looks to me like it gets optimized away. > OK, but the kernel test robots will probably beat me to it. ;-) That's exactly the question: they haven't because this is not a new situation. Their compilers are optimizing unused stuff away too. :-) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette