lkml.org 
[lkml]   [2023]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/microcode: move @microcode_mutex definition near usage
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

\
 
 \ /
  Last update: 2023-03-27 01:16    [W:0.227 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site