Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2381640rdb; Sun, 3 Dec 2023 14:50:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaq8nwrvSswiQVQlJoOfG3DtzUmGbSJUHDYf4WPB94tE2GYaFT/1czSCdrM91HDZ/2jbm5 X-Received: by 2002:a05:6830:3151:b0:6d8:74e2:5d18 with SMTP id c17-20020a056830315100b006d874e25d18mr2757985ots.65.1701643815191; Sun, 03 Dec 2023 14:50:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701643815; cv=none; d=google.com; s=arc-20160816; b=u3OsPurMSVxJsBLGAm3NUPneFWo8HoRTN6B5LkwwVAzsQg2enYVHj+pFbOXdhNKqTq R5ASsyg9xtcfInFDXm2qs6zo/HXHBgKl8d0NDf40+PPGHidbuZgClpoIhsgrZZpFSDRt K1EHeuqsIMxAXiqbU7Eu+FwHz5Vz58YrTeMbnqCOU3BeOlsoOTitddgp5aPZfIc00xb/ 6Ik1QjE81QX4xhAlRbWpQHCxXH92KCKVDe3Eaj7MiBh5CPRdA2jeZYaYfh5VY1XHQae+ W2Yq2YfJhTKJfo3wogJOplRg+rPx9GSle4qlI5/0GSEawZ9lqne3PRsIpx1doDh5a5Hy QcbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=AUjrVen9mMyOXvuD97x+HXHU4fi1qdA0K8Q1bYahYVw=; fh=5ltH63aVz4YrHMQC/EZtUDfu0DusxSSHQG4PO68ZhTs=; b=gYV/n2z+ORIP5P4xZPl2+vtJAhTiSSZ28AvJtbQOs5830lYTMKtqJ+K6qLaRaP2Yka bJOAOp2BOcPSwdYuqdMmvYNSvMgCr/daADrtz64XVkZ0qH3e9AjrCFOwH8q1mLt/vc0q LJDVIjuau1EKkCwq3QTV393kxehCIFfm/rxsNSiSOyF1X88zXRac3O5lO48zmsf3XOHu 7PZgfZvWYDQEMwRlN9uCgRLIB0DcQtIS0uXxeetlRPrj7/a5QmCSbHrvSOjZR8vPU0ZS L5qFBL1KU3o5aoN+TaZg3ctRwSZHs9l6GydDm3QRWPcTjn9RxYSZsQVfcK6LGa/4lWJ/ 92Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hcyNPfAU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id o14-20020a056a00214e00b006ce4e9187b4si843491pfk.370.2023.12.03.14.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 14:50:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hcyNPfAU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id CA20F8061297; Sun, 3 Dec 2023 14:50:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234066AbjLCWt7 (ORCPT + 99 others); Sun, 3 Dec 2023 17:49:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234004AbjLCWt6 (ORCPT ); Sun, 3 Dec 2023 17:49:58 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FD7DD3 for ; Sun, 3 Dec 2023 14:50:04 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50be4f03b06so1497004e87.0 for ; Sun, 03 Dec 2023 14:50:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701643803; x=1702248603; 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=AUjrVen9mMyOXvuD97x+HXHU4fi1qdA0K8Q1bYahYVw=; b=hcyNPfAUOuZ/doFHAQj09JlzSYMO2YhxGj+C9CxM8kv6T5oQu/I4piDHLp5BBUReE5 Ie29qN+/6r4z9sbfMn7CEjfjtxyo1+DVSRDVkbj3lh9s5CLk3iG7liciTRREhgzuK97L rABTzDnqrW8OG4XMyR8x6QGqUm2N093N2Ytay5zeQV/Yh4oWOisvQ0iFbBVaE7aBy+ov 4T5phPCTMW2tpMFnnWSPtTtnKM9/2KqpBHQsA/Rrzs0vQIZERTHnfQG64/zqthvgjLTM d1+js42Ns+ASlzPTCuiT2g0Ftf6tyjoUgtDet4kslk62laE5mQpiCdIEj9i7HrTFXHfs ny5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701643803; x=1702248603; 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=AUjrVen9mMyOXvuD97x+HXHU4fi1qdA0K8Q1bYahYVw=; b=MP2fh2o/4xv1lIPNxs3hI9Q9mCC4V0RNOR6QvaiWLkWyxfZ6knlSIsD/hrnuZj3B4N 72AQB4ixt4MYfW3Pk8ig9z5Sd4r1LtItFighzCXzjekZ3B1YHX0QMuZHfcnTs02NXuUo HhUxy9PsZVlyUD1AH3qtJoKpTXjrQoKDRXXqqo/4Du0OnujZ6J2xsQybQnFh6hOPqGXz lRWsjMLqVuAMeH2UribL27bLdnS7PE4ZcjoXW6X1xBnZzOncINWvxc814qPCz4j9XGSg pTJFllQDuJbb9lKYAvz+jjdaFwj9x8Q48QeZbJnE4toOV/qpQY0bzAZ6/A2RPkKobop/ FRfQ== X-Gm-Message-State: AOJu0YyJllq/35ttNrGkI0i7e0Wvi0qfGqbAAj+ekEc0eHo+G6dpuz9L PR3hWvOUtqV/k0MQ/hEqJPzsgBKy0jTYDrE/T/w= X-Received: by 2002:a05:6512:3b85:b0:50b:d764:291a with SMTP id g5-20020a0565123b8500b0050bd764291amr2118575lfv.178.1701643802715; Sun, 03 Dec 2023 14:50:02 -0800 (PST) MIME-Version: 1.0 References: <20231203221151.794615-1-ubizjak@gmail.com> In-Reply-To: From: Uros Bizjak Date: Sun, 3 Dec 2023 23:49:51 +0100 Message-ID: Subject: Re: [PATCH -tip 1/3] x86/percpu: Fix "const_pcpu_hot" version generation failure To: Linus Torvalds Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Brian Gerst , Denys Vlasenko , Ingo Molnar , "H . Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 03 Dec 2023 14:50:12 -0800 (PST) On Sun, Dec 3, 2023 at 11:19=E2=80=AFPM Linus Torvalds wrote: > > On Mon, 4 Dec 2023 at 07:12, Uros Bizjak wrote: > > > > +/* > > + * The generic per-cpu infrastrucutre is not suitable for > > + * reading const-qualified variables. > > + */ > > +#define this_cpu_read_const(pcp) ({ BUG(); (typeof(pcp))0; }) > > NAK. Absolutely not. > > No way in hell is it acceptable to make this a run-time BUG. If it > doesn't work, it needs to be a compile failure. End of story. Thanks - BUILD_BUG() also works here and is indeed more appropriate: /** * BUILD_BUG - break compile if used. * * If you have some code that you expect the compiler to eliminate at * build time, you should use BUILD_BUG to detect if it is * unexpectedly used. */ v2 is in testing. Thanks, Uros.