Message ID | 20231203221151.794615-3-ubizjak@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2431304vqy; Sun, 3 Dec 2023 14:12:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiGtF3g7B+RZHl7DV4Dm/O953jjQnb0KcwpZy7FnlQFpvIJ3JH0nKDy2PHQuu+M3/GP1Hq X-Received: by 2002:a05:6820:229f:b0:58e:272a:7da1 with SMTP id ck31-20020a056820229f00b0058e272a7da1mr1360044oob.2.1701641536403; Sun, 03 Dec 2023 14:12:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701641536; cv=none; d=google.com; s=arc-20160816; b=K1mVorCV6soHPxJYRqYLl/BRLpaRx7EtGq+cFNi+DfScdupFRtSydzaRsUdO7WofZO oQCEQ16t/Loo/VwPIWt4X+QT/esCL3q5IiD6Hf1+OzWLJLxEV1pZsswL5CM1w3E17aer j+n2mUP+sEWUrGHnIvFdIU54StQRqRzKqlqKSEu+4E6mMdn/BbV8+cF/rqaNdboSTk9X owGYQlTp+84TVhziZQPwvxK0UW2i3KrP7w80ydZuYNtfGPWakDtjZMhLAOHTCjHXwgfF G4AfcJhcP8ZC/JgH/9sa/VfRELyVAD9nX1RgnnKzExWd4KXfHVyMhCmv9UdLAl/1mGV7 s+Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DIsCrkxdL3+P74omPdT684tv0k/I5V1A9sE1nd9EGUY=; fh=BqJHm/9wTiUJTC+Wj20hu12Du/VNpV6fDewxlodtHdo=; b=0KP3W4R8U6y9Hek0vytle4K+5IVL/dfP/FSHSJufYb5YhMFxetzz5585onlD8xV+Jm dK6dxUuZLiDViEaN6ctaFmMeH6IW0dhF5SI6KJaHAobgnn3SZvUIFYavyVaN83KwGAgt NAW+oAs5lrT3ArO6xAjDDJTeU+v5OfWMbQKNRbf4pvgMMT7OghenGdWtG0zdFccB1aAT n+uYrZQyIS5OTFBwFzUxvK3Bin9vO3eZZGRLawo0KX0xCdSqbK+hoRd6UgxTSQMzL+00 t9MsC8+lBB+GKzMnN6gDThmPbEA1VqaS2uAHAVPY6a3+iEtLoOderTb2Qpl8+WdrLbE1 sxdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cxQB0EMB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y8-20020a17090aa40800b00286922ce5cdsi1569784pjp.108.2023.12.03.14.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 14:12:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cxQB0EMB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5E3C68069D83; Sun, 3 Dec 2023 14:12:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233990AbjLCWMD (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Sun, 3 Dec 2023 17:12:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233951AbjLCWL7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 3 Dec 2023 17:11:59 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E26B1D5 for <linux-kernel@vger.kernel.org>; Sun, 3 Dec 2023 14:12:05 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40c0a03eb87so6160455e9.3 for <linux-kernel@vger.kernel.org>; Sun, 03 Dec 2023 14:12:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701641524; x=1702246324; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DIsCrkxdL3+P74omPdT684tv0k/I5V1A9sE1nd9EGUY=; b=cxQB0EMBcScTJ6+qad4ZPyrEbXWTVSE34X64H68hHkuTFibL2c89FwAfA9l7li6v/Z QSZ6b5e6L7yvGDJ7ZcAYLW1yvE/aQsk9LHqhhWg5xzyd7++XMlBUbeD0I1sIDW4ccrk0 x7Sj9yK003j6F/bnZhWZ75UiBB6kxnn6hQ95iq9fnwukIw/iyFAKV2F7+IPqj+1Kdh6z vvPqaWPcg4cZ4S0Ptj//0Hayi/Arg50R7wfogiNFTwrtV0JSSy/T7J0hpcCW3Q1SzCfo sTMvntbLff/xSlo9N3VYNrNNMQODOocB9AvAAiZwxy6YsabwX03R9VMuBxD4VfVx8Yr4 jsHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701641524; x=1702246324; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DIsCrkxdL3+P74omPdT684tv0k/I5V1A9sE1nd9EGUY=; b=uymJj9+llHjODyxmH7974hEhuX4aMMQVd+SgEh8JfFKiBsUyQeeNeGUXAv7AXoDmJe zrw49hln75GZJk8AMw475H/oGSZbglExk3GOB6bymc/orraRKM+fACkhS723c9pUnLZi cbU6N7vL3hEBXLuXPcDCRqsK2v5IzlvW7syqy90pLbqcArxBucULQUlGE/GgFE8gybsO PZY17NGqZELRIRCABweksQmrsvrtmXHQB5nj4nO2Njfj4pkZ0dUTC7XBxmU+KtU33Jl2 Rv8FPGJ78w01DuLiHpGwJvdGhXdNkTlM3t7OQhwTwuVC+C1AXbfTHDymyykDILZza51f P/Tg== X-Gm-Message-State: AOJu0YxcIdE84H3D9H1+mkzFPxHkkjH0k81zWfCU1KyQy6diwwBc5UxS LY66/x1zbkOdLlGeVLEMvVg= X-Received: by 2002:a05:600c:4f87:b0:40b:5f03:b3b1 with SMTP id n7-20020a05600c4f8700b0040b5f03b3b1mr978076wmq.211.1701641524194; Sun, 03 Dec 2023 14:12:04 -0800 (PST) Received: from localhost.localdomain ([46.248.82.114]) by smtp.gmail.com with ESMTPSA id ay10-20020a05600c1e0a00b0040b397787d3sm16589181wmb.24.2023.12.03.14.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 14:12:04 -0800 (PST) From: Uros Bizjak <ubizjak@gmail.com> To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Uros Bizjak <ubizjak@gmail.com>, kernel test robot <lkp@intel.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com> Subject: [PATCH -tip 3/3] x86/percpu: Avoid sparse warning with cast to named address space Date: Sun, 3 Dec 2023 23:10:54 +0100 Message-ID: <20231203221151.794615-3-ubizjak@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231203221151.794615-1-ubizjak@gmail.com> References: <20231203221151.794615-1-ubizjak@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 03 Dec 2023 14:12:15 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784300475278680069 X-GMAIL-MSGID: 1784300475278680069 |
Series |
[-tip,1/3] x86/percpu: Fix "const_pcpu_hot" version generation failure
|
|
Commit Message
Uros Bizjak
Dec. 3, 2023, 10:10 p.m. UTC
Currently sparse does not know about __seg_fs and __seg_fs named
address space qualifiers. Avoid thousands of warnings about unexpected
keyword at the end of cast operator by removing named address space
qualifier from __my_cpu_type() when __CHECKER__ is defined.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310080853.UhMe5iWa-lkp@intel.com/
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
---
arch/x86/include/asm/percpu.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index 7f6e978e21b1..07ee2aedb1f6 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -96,6 +96,15 @@ #endif /* CONFIG_SMP */ +/* + * FIXME: Drop this hack once sparse learns how to ignore + * __seg_fs and __seg_gs named address space qualifiers. + */ +#ifdef __CHECKER__ +#undef __percpu_seg_override +#define __percpu_seg_override +#endif + #define __my_cpu_type(var) typeof(var) __percpu_seg_override #define __my_cpu_ptr(ptr) (__my_cpu_type(*ptr) *)(uintptr_t)(ptr) #define __my_cpu_var(var) (*__my_cpu_ptr(&var))