Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1644785lqg; Sun, 3 Mar 2024 21:43:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdkuKUAzR11n8i/ZLiEZB8bk8G3fpIjBtFRDQWPFJGI/1skLKMrnnWsFF9XKQKaPvker2fXSyuqfbxMElHgn1oQF0wFzC34YYb46k2ag== X-Google-Smtp-Source: AGHT+IHnXQkK2vM19aBxoDyb3zaSquc/2KJ1gL61MpPdMp2HLsWvcwdTbhzeC105kNVRdp34YQHj X-Received: by 2002:a05:6808:208d:b0:3c1:f026:e7f8 with SMTP id s13-20020a056808208d00b003c1f026e7f8mr1829466oiw.50.1709531003186; Sun, 03 Mar 2024 21:43:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709531003; cv=pass; d=google.com; s=arc-20160816; b=KJ2UqeiFUf236yn5IP37+4qic60+qYPX21Qyfp0ru8oNjE/x3xF9PgnN8RaFHZmtn2 mi875nhf1/Q351ZGT3N9xntyAZ3ZYY0Vl/YB/3cSNNcnlaQFPoIopiOCwzo7sLtBQm7J EsxH1NG/Ydy6dOJGheM4Ivo+7gqqNo/nUU9cdrMlrjN9wh9tRaocky050qcZULgBjC4W gBATwoJS+RfnhWFzk9eZkHaOzvbzdP79JUKMiPSNk70YY7L9qRy/Iek5aDyvpp+c7jFL YLo//NAnJFYGxmX0QhpE2LX/HsG9OetPclQOxkbYBI7Kzq5HXur/pPwbwRbqqtn4J60/ m+2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=WGkZHzlyAWQ8ISw8UICIlbevVxrfqlLQ1gYQEskJp5s=; fh=2uj3uuf3FbLdbbR5fX/hXkjmyDHCs6pCbrwdQp3JR+Y=; b=LWomCDWXoEAzZvOJvmhRbhCl7CwwOYPKASTnlHYOoOUzR3MLeyALRQdTe6+xNK6K/9 f2Hl+w87cLfluy4pOPk+5YHyL9ziHBt9bsDy2rROho3voV28msS36by1rkP5M1NV2oSZ rFfJ2VjBpSvd/ukvlrAT7egmrzA0QmC7RVXvFE1e44P+EzAZ0zvSqly+HVBY0PQgqBkm NtHXEkh/Bv+mbJORXlzFHu9oFYXeU6y+QjjWj3G0WkwtoPcw/1weEj1bu9NIs+0facoY JtjWco7UqaHHdF1QEu8oFACdmliiXBaCBvN5W7zVBJsfNM7qtaiMyNKqgUQ4IINxSEqD aQ/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=W41nBSLf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-90063-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i193-20020a639dca000000b005dc229b6778si7866654pgd.14.2024.03.03.21.43.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 21:43:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90063-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=W41nBSLf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-90063-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CFD93281158 for ; Mon, 4 Mar 2024 05:43:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C941C144; Mon, 4 Mar 2024 05:43:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W41nBSLf" Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 125EAAD5E; Mon, 4 Mar 2024 05:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709530992; cv=none; b=UumKhGOy/kBXw5NJSRC733ABpuEGStJDunSUfJShWXG6xtDxRxkKEKWP07Tc64LQr/rahtMOpsZtUKsYE38hHOO82ZBepDZLkNc1P1y3b6UJu58oMAphuczlS9wJmEvyBF/aXkxqpn9GFoMRnzwW8IuHLgYblmnCCCNrAYq5wAM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709530992; c=relaxed/simple; bh=WGkZHzlyAWQ8ISw8UICIlbevVxrfqlLQ1gYQEskJp5s=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=XkQ04pq5oo0RLQyUvmwD5lqCqVHTspfKTbu5uoaztttvmsExCvXJL7rx+fTTzQWYKxlSbP3dUKaxnBDHKrPX2O3n81lP5TXl2sTUyvk0kq0gBZvqe3Od4FrDnhT+ipabv5x92S/VjIIB5D82EkUo6p/JHGR1YhgD2/L45+yDpNQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=W41nBSLf; arc=none smtp.client-ip=209.85.208.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2d26227d508so46181651fa.2; Sun, 03 Mar 2024 21:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709530989; x=1710135789; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WGkZHzlyAWQ8ISw8UICIlbevVxrfqlLQ1gYQEskJp5s=; b=W41nBSLf62H1Iwy/YE1u8aUptPHHnHW0NoD5wu9R12u0oe3iPpApy5DYSj6VAW4YXu gCgkA5RfzrzUNlILm0CiE23b4JtBNs/d5MueuAVtKjH9qrcDHXkTTlTcV8PE8up1dALe BtCpY0L01wJgNqIURUAAXxYlu5hbHIBUsTXPkDqnCQkjcP+9kPNDnCsFdZFobnviczTs 6FJQ5jw63oCe1GXgJBeBKmALOe1i8hmGCZSSBHKk989Gk0iOVaptGawchYEOBXvAFB8Y TivS0dNkMNC9Tl0/WI5/OfX+hzftdBeMlZyKSLjsKpJ/HXrUTaVZ/gtCk249IK02mjc2 S6fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709530989; x=1710135789; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WGkZHzlyAWQ8ISw8UICIlbevVxrfqlLQ1gYQEskJp5s=; b=cWV11LBTw6/ooIkwauxMg8nUSeJZcmziZe8+JtpoQXgk4LybleUDyVQe9jvho6i6nC 63/RSeRzW0oYzwQbOj+SGJOavPKWpg7xW7LI0j1rAcIKCy8CIimupJIH2RB+fDLYKdp4 CCOjg1f292PXQNXaQq0mH7obeSmGLYZLRmRW6xbVcL4+rJGW6uwFdHgstQbmOsnX0d3h +wvPeTv9bcq98KEnjBdejVe3VwOfR9iYu2QqubhRl7krC2+3PkCe/QI0iPtPuQ4rrTMY JnNp0S2bZ7aukkoc21NinYM9sjeyAg+Q0gTcbI5kk48ugZoCWTSnaTAbO1RIM/BYjGRT YrFg== X-Forwarded-Encrypted: i=1; AJvYcCWQaFqDssw06GOh/rRuA/0xByVyztAXhS1+KLW/m8BEI59XkJzHzFl13CEKOFy60tFHLxrktuhep+MjECqElXEP81r1mRx93UTLl1O9zh6PTW9p4k5mb+Sg4+SNGxPyV+1JjM9W+7p2K3zy X-Gm-Message-State: AOJu0YzUVVWTbc4c+hqEn+1HQPlYNDoq4lg1Bzjuunkj7uHqrNnRqy+A kC2DCPelvv+UiASYBG2rfKkm/EH5rglqkPVp7jQurBzVQJai8NQBC+C6nABIqeg4nFkBY+dgad+ uefA6oEtovC2hjS4Iz4fPR6oWTLGnMtwLRZQ= X-Received: by 2002:a2e:86d0:0:b0:2d2:b337:f55d with SMTP id n16-20020a2e86d0000000b002d2b337f55dmr5260411ljj.16.1709530988812; Sun, 03 Mar 2024 21:43:08 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <202403020457.RCJoQ3ts-lkp@intel.com> <87edctwr6y.ffs@tglx> <87a5nhwpus.ffs@tglx> <87y1b0vp8m.ffs@tglx> <87sf18vdsq.ffs@tglx> <87le70uwf0.ffs@tglx> <87edcruvja.ffs@tglx> <87bk7vuldh.ffs@tglx> <87bk7ux4e9.ffs@tglx> In-Reply-To: <87bk7ux4e9.ffs@tglx> From: Uros Bizjak Date: Mon, 4 Mar 2024 06:42:57 +0100 Message-ID: Subject: Re: arch/x86/include/asm/processor.h:698:16: sparse: sparse: incorrect type in initializer (different address spaces) To: Thomas Gleixner Cc: Linus Torvalds , kernel test robot , oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Arjan van de Ven , x86@kernel.org, Luc Van Oostenryck , Sparse Mailing-list , "Paul E. McKenney" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 4, 2024 at 12:49=E2=80=AFAM Thomas Gleixner wrote: > > On Sun, Mar 03 2024 at 21:24, Uros Bizjak wrote: > > On Sun, Mar 3, 2024 at 9:21=E2=80=AFPM Uros Bizjak = wrote: > >> On Sun, Mar 3, 2024 at 9:10=E2=80=AFPM Thomas Gleixner wrote: > >> > That's so sad because it would provide us compiler based __percpu > >> > validation. > >> > >> Unfortunately, the c compiler can't strip qualifiers, so typeof() is > >> of limited use also when const and volatile qualifiers are used. > >> Perhaps some extension could be introduced to c standard to provide an > >> unqualified type, e.g. typeof_unqual(). > > > > Oh, there is one in C23 [1]. > > Yes. I found it right after ranting. > > gcc >=3D 14 and clang >=3D 16 have support for it of course only when add= ing > -std=3Dc2x to the command line. > > Sigh. The name space qualifiers are non standard and then the thing > which makes them more useful is hidden behind a standard. With GCC, you can use __typeof_unqual__ (please note underscores) without -std=3Dc2x [1]: "... Alternate spelling __typeof_unqual__ is available in all C modes and provides non-atomic unqualified version of what __typeof__ operator returns..." Please also see the example in my last post. It can be compiled without -st= d=3D... [1] https://gcc.gnu.org/onlinedocs/gcc/Typeof.html Uros.