Re: v7.4-rc2 kernel build failure when using the upstream LLVM 24 with -Wunsequenced-volatile

From: Yunseong Kim

Date: Thu Nov 19 2026 - 09:13:48 EST


Hi,

On 19/11/2026 2:23 pm, Yunseong Kim wrote:
> Hi,
>
> After https://github.com/llvm/llvm-project/pull/180955 feature
> "[clang] Add check in SemaChecking for multiple unsequenced volatile accesses",
> v7.4-rc2 kernel compiling with the upstream LLVM 24 was failed.
>
> kernel/sched/build_utility.c:86:
> kernel/sched/topology.c:2008:29: error: unsequenced accesses to volatile qualified 'jiffies' [-Werror,-Wunsequenced-volatile]
> 1998 | .last_balance = jiffies,
> | ~~~~~~~
> 1999 | .balance_interval = sd_weight,
> 2000 |
> 2001 | /* 50% success rate */
> 2002 | .newidle_call = 512,
> 2003 | .newidle_success = 256,
> 2004 | .newidle_ratio = 512,
> 2005 | .newidle_stamp = now,
> 2006 |
> 2007 | .max_newidle_lb_cost = 0,
> 2008 | .last_decay_max_lb_cost = jiffies,
> | ^
> 1 error generated.
>
>
> Is that mean topology code have a potential issue, or is this a compiler's
> false positive? The same error message can be reproduced on the example
> user space program.


I didn't realize there was already a patch in progress.

https://github.com/ClangBuiltLinux/linux/issues/2190

https://lore.kernel.org/20261116-topology-wunsequenced-v2-1-54611119172b@xxxxxxxxxx/


Many thanks!

Best regards,
Yunseong