From nobody Sun Feb 8 05:27:46 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A5C119D8AC for ; Sun, 18 Jan 2026 14:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768747545; cv=none; b=H3OO9R5Jy2WhiABWZtJcGm6MHl2kGLW6WvaZY4A+3NAW3IJtKcX0iSmjBV2rRKm7/kGkA+Rt/DTUBgAPlYjtwVzMawnYpAl5her3YwiC/U44Bj3yGGmO0ZgpAOtMBuSqvg3aE02/uZSw+AaBkwO/flnRgI5aVmaGO8CwfkA6mcg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768747545; c=relaxed/simple; bh=pnpkMhglIHMfmH5TMpSOr+1AFjcvOEEfe+eyOTa8eP4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Rfjv9Y+fUB7F1rwXxEH9byeRtp5HfaBMT2xNLMHk1IF8V5x9H1LGA9JWu5nEOEfV2JXaycfuxmvDwXoS/T8JkQcReBjt6ssoEYa8C7yGQwNU0kzrQCaL3Kr8gssFPPvWMZkY3GvSEvNMuqNbadaDN6z/7Hq1MtuZfNbPy6rZL3g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XFuoCfpE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XFuoCfpE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30DD5C116D0; Sun, 18 Jan 2026 14:45:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768747545; bh=pnpkMhglIHMfmH5TMpSOr+1AFjcvOEEfe+eyOTa8eP4=; h=From:To:Cc:Subject:Date:From; b=XFuoCfpE4KuFsGa2cG+G0DjU4WOJxEOSKo780iTtG1dkCdAY6IkYpjLgcY3LOZtfC rjsgcF4FsnQkA9fQ+hym32qUxUbAqhgb/d6Fpp7SDRM28nP35roDCiUJH0sM1CxR9l RpRx5VrIj05dXfv4eWNP7oMeY96rVxEHSgwDZZaHXneFBT8KYIv2jChuV35iEd+nUf y4LiaP+nT/uPSyptiOUbwkTZtIBX8nHYFZR1dKmyIZhAxpcqc7q9KvoBH/6E10WsGr cdbO3/PUbYbW/h7kBfjH9pzYTaV/5Ux5BbcogE8gnrC/4yzqa4ihtdeXQHRli8cdJN wNs1uycLqtosQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org Subject: [PATCH] x86/percpu: Make CONFIG_USE_X86_SEG_SUPPORT work with sparse Date: Sun, 18 Jan 2026 15:45:40 +0100 Message-ID: <87v7gz0yjv.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Now that sparse builds enforce the usage of typeof_unqual() the casts in __raw_cpu_read/write() cause sparse to emit tons of false postive warnings: warning: cast removes address space '__percpu' of expression Address this by annotating the casts with __force. Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Closes: https://lore.kernel.org/oe-kbuild-all/202601181733.YZOf9XU3-lkp@int= el.com/ --- arch/x86/include/asm/percpu.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -137,12 +137,12 @@ =20 #define __raw_cpu_read(size, qual, pcp) \ ({ \ - *(qual __my_cpu_type(pcp) *)__my_cpu_ptr(&(pcp)); \ + *(qual __my_cpu_type(pcp) * __force)__my_cpu_ptr(&(pcp)); \ }) =20 -#define __raw_cpu_write(size, qual, pcp, val) \ -do { \ - *(qual __my_cpu_type(pcp) *)__my_cpu_ptr(&(pcp)) =3D (val); \ +#define __raw_cpu_write(size, qual, pcp, val) \ +do { \ + *(qual __my_cpu_type(pcp) * __force)__my_cpu_ptr(&(pcp)) =3D (val); \ } while (0) =20 #define __raw_cpu_read_const(pcp) __raw_cpu_read(, , pcp)