From nobody Mon Sep 28 10:00:08 2026 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB7233ACA65 for ; Sun, 23 Aug 2026 20:16:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787516174; cv=none; b=N4RwuIIcofpLVtB1xCZ+0/dGkSNCcNzeqmpJu4B3+3KhGxYzSgksYq9cyZo6sgQwXnv6jBTOI2aYwe5IgsqSJBB3jQ7MVS4JNzPKiRMqqKyW2ox47n+QTrXMhCJmybG7hzgXmIsJ4FfvTtBHOxlRQX8B6eBcVR9DZRPkLWVXSb8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787516174; c=relaxed/simple; bh=4tWprq1Pate0uay9EGxRh8onfJaq8QbUiHsDfsLyDs8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Ea9xq4ZOriKfzeidSvTKNYVHDIV8fqL/qWLr8tqibumfPBvxnK6LZK3uuM0GIa6YnBJxQPygHggh4+CzceYP21bttfJXCuRk3T5Jx4avplVU1Lf727JiXmIblJwq1cvJS5m4IuWLP5fByEcHq98FD/SJFelNuIIjKobfcfRSJNs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=isomorphic-ai.com; spf=pass smtp.mailfrom=isomorphic-ai.com; dkim=pass (2048-bit key) header.d=isomorphic-ai.com header.i=@isomorphic-ai.com header.b=HFM1mhuJ; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=isomorphic-ai.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=isomorphic-ai.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=isomorphic-ai.com header.i=@isomorphic-ai.com header.b="HFM1mhuJ" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-6a0a4aa99bdso4746267a12.1 for ; Sun, 23 Aug 2026 13:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isomorphic-ai.com; s=google; t=1787516170; x=1788120970; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MfartcHqwqCIhFwvC4CwiIrHlgQajx9zG1o6pHu7jNE=; b=HFM1mhuJlZbIS12rdHUcPpRNZfphtsqm0lLyTtyR6+BLb4gW58g6wWFG8PIhh1pYjo gBh1THc+ZcoD9b7iBWg2aS/++UDCcF6Ay5pW7JN4/TAimgu5pw6EJ7jf72miUHK5yYHW iKBqM1aFmBku5jNjA2V1s5ksM+D+AKLnJASqMaLlk57Eyu+KknYOpP3XBRhZj9NZuMfS ytWZSS/JZY3k3tV6ciebQa/H9K6sFSnGa+tghyFlr7Juyn93rpkUmjFe+m2167iF1ps/ Y23Ul22k1M6YuZBzX+LMs11tCSNXg2rXltdOrx6G3845Em32LZvQ854xEm8Bh9Fclgod Bpfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787516170; x=1788120970; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=MfartcHqwqCIhFwvC4CwiIrHlgQajx9zG1o6pHu7jNE=; b=W5RPK9oj2vhPBjM/HgSkS2XZe6L2/bYUSSMQxR+AQoE+Olf1YV6AiqTh8yxFlYEKcm BZIFLWMzzm8Tri1oo8U61aDtFiK/43uyPwPt+dYf/i/bUXzPJC6ea0YljFmWOlH0SCv/ ahykwUUL1Pb/NawgJlBs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1UYk9Es/4H+R3uNmBRrV7AzSMtavDFVzhQ7BpbzfGywrbgQ== X-Received: by 2002:a17:907:c8c6:b0:c1f:1520:4de5 with SMTP id a640c23a62f3a-c249257c128mr1492980966b.1.1787516169331; Sun, 23 Aug 2026 13:16:09 -0700 (PDT) Received: from ms-103.premium-rootserver.net ([193.32.222.77]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c249606a8fasm1010651166b.8.2026.08.23.13.16.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2026 13:16:08 -0700 (PDT) From: Fabian Franz To: Richard Weinberger , Anton Ivanov , Johannes Berg , "Borislav Petkov (AMD)" , Fabian Franz , Nikolay Borisov , "Xin Li (Intel)" , Ingo Molnar Cc: Claude Fable 5 , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH REGRESSION] um: Fix cpu_feature_enabled() build breakage Date: Sun, 23 Aug 2026 22:14:58 +0200 Message-ID: <20260823201521.2576344-1-fabian@isomorphic-ai.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Since commit 3ed403bbc967 ("treewide: Remove CLOCK_TICK_RATE") deleted the (otherwise empty) arch/um/include/asm/timex.h, UML builds resolve to arch/x86/include/asm/timex.h via the HEADER_ARCH include path. That pulls , whose get_cycles() uses cpu_feature_enabled(), into virtually every translation unit, starting with asm-offsets.c. This newly expands parts of UML's copy of that no longer compile, and "make ARCH=3Dum" now dies in prepare0: arch/um/include/asm/cpufeature.h:52:39: error: implicit declaration of function 'DISABLED_MASK_BIT_SET' arch/um/include/asm/cpufeature.h:115:17: error: implicit declaration of function '_static_cpu_has'; did you mean '__static_cpu_has'? Two independent breakages meet here: 1. cpu_feature_enabled() and this_cpu_has() still test DISABLED_MASK_BIT_SET()/REQUIRED_MASK_BIT_SET(). Those used to come from / via , but since commit 8f97566c8a81 ("x86/cpufeatures: Remove {disabled,required}-features.h") they live in the generated , which only the arch/x86 archprepare rule generates. ARCH=3Dum never generates nor includes it, so the references have been dangling since then. 2. The _static_cpu_has() macro expands to itself. Commit 3eaa50e1e255 ("x86/cpu: Hide and rename static_cpu_has()") renamed the inline function _static_cpu_has() -> __static_cpu_has() and the macro static_cpu_has() -> _static_cpu_has(), but in the UML header the macro's out-of-line branch kept calling _static_cpu_has(), which now names the macro itself and is left unexpanded by the preprocessor. Fix the macro to call __static_cpu_has(), as the x86 header does, and drop the mask based short-circuits from cpu_feature_enabled() and this_cpu_has(). UML has no compile-time feature masking to express: capabilities are copied from the host's CPUID at boot, see commit d8fb32f4790f ("um: Add support for host CPU flags and alignment"), and generating cpufeaturemasks.h from a UML .config would wrongly mark features disabled simply because the gating CONFIG_X86_* symbols do not exist for ARCH=3Dum. Fixes: 3eaa50e1e255 ("x86/cpu: Hide and rename static_cpu_has()") Fixes: 8f97566c8a81 ("x86/cpufeatures: Remove {disabled,required}-features.= h") Signed-off-by: Fabian Franz Assisted-By: Claude Fable 5 --- arch/um/include/asm/cpufeature.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/um/include/asm/cpufeature.h b/arch/um/include/asm/cpufeat= ure.h index f7770083c0a4..20b2c7ead62e 100644 --- a/arch/um/include/asm/cpufeature.h +++ b/arch/um/include/asm/cpufeature.h @@ -37,8 +37,7 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; test_cpu_cap(c, bit) =20 #define this_cpu_has(bit) \ - (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \ - x86_this_cpu_test_bit(bit, cpu_info.x86_capability)) + x86_this_cpu_test_bit(bit, cpu_info.x86_capability) =20 /* * This macro is for detection of features which need kernel @@ -48,8 +47,7 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; * supporting a possible guest feature where host support for it * is not relevant. */ -#define cpu_feature_enabled(bit) \ - (__builtin_constant_p(bit) && DISABLED_MASK_BIT_SET(bit) ? 0 : _static_cp= u_has(bit)) +#define cpu_feature_enabled(bit) _static_cpu_has(bit) =20 #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit) =20 @@ -112,7 +110,7 @@ static __always_inline bool __static_cpu_has(u16 bit) ( \ __builtin_constant_p(boot_cpu_has(bit)) ? \ boot_cpu_has(bit) : \ - _static_cpu_has(bit) \ + __static_cpu_has(bit) \ ) =20 #define cpu_has_bug(c, bit) cpu_has(c, (bit)) --=20 2.43.0 Every ARCH=3Dum build has failed since the 7.3 merge window. #regzbot introduced: 3ed403bbc967 Steps to reproduce on master: make ARCH=3Dum O=3D/tmp/um-build defconfig make ARCH=3Dum O=3D/tmp/um-build -j$(nproc) fails with: /home/ubuntu/projects/linux/arch/x86/include/asm/tsc.h: In function =E2=80= =98get_cycles=E2=80=99: /home/ubuntu/projects/linux/arch/um/include/asm/cpufeature.h:52:39: error: = implicit declaration of function =E2=80=98DISABLED_MASK_BIT_SET=E2=80=99 [-= Werror=3Dimplicit-function-declaration] 52 | (__builtin_constant_p(bit) && DISABLED_MASK_BIT_SET(bit) ? = 0 : _static_cpu_has(bit)) | ^~~~~~~~~~~~~~~~~~~~~ /home/ubuntu/projects/linux/arch/x86/include/asm/tsc.h:79:14: note: in expa= nsion of macro =E2=80=98cpu_feature_enabled=E2=80=99 79 | if (!cpu_feature_enabled(X86_FEATURE_TSC)) | ^~~~~~~~~~~~~~~~~~~ /home/ubuntu/projects/linux/arch/um/include/asm/cpufeature.h:115:17: error:= implicit declaration of function =E2=80=98_static_cpu_has=E2=80=99; did yo= u mean =E2=80=98__static_cpu_has=E2=80=99? [-Werror=3Dimplicit-function-dec= laration] 115 | _static_cpu_has(bit) \ | ^~~~~~~~~~~~~~~ /home/ubuntu/projects/linux/arch/um/include/asm/cpufeature.h:52:72: note: i= n expansion of macro =E2=80=98_static_cpu_has=E2=80=99 52 | builtin_constant_p(bit) && DISABLED_MASK_BIT_SET(bit) ? 0 : _static= _cpu_has(bit)) | ^~~~~~~= ~~~~~~~~ If this is known please disregard. I am also not 100% sure if this is the r= ight fix or if it's better to bring back the macros to um. In any case it would be good for um to build again on the master branch out= of the box. Thanks, Fabian