Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2731802imw; Sun, 10 Jul 2022 13:56:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uti7ZOHNck4meBEIeBlz2zx/E/x2LmhGUSVxrfMQbOMVdjX6xQqocHjnDIaK51wtLT7OoU X-Received: by 2002:a17:907:6da2:b0:726:3ebd:9c9a with SMTP id sb34-20020a1709076da200b007263ebd9c9amr15121242ejc.628.1657486601834; Sun, 10 Jul 2022 13:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657486601; cv=none; d=google.com; s=arc-20160816; b=VpXp2gkRhLodObzigSTra6gF76DMGHaOz59Z1f7QlrkStyIbwh5afNnAGY3yj2sJnp BEiJRuiYYBiFVj2gUirlMVv/6/62QQelTu7QWlzZ6fNW6B/N1TSu+gn/1IrV5msxI3Pk VQkIXfxDozmuNYHQ6g1fKPAQ9aJlHGBlcF09B/Shx/9EfnIhNlB5iiO1kaJDoOC6TARg f9BHrjWMQVQ6BZaWe1bKMCIwCxbiU/4Z0JVSINOI2JWjjZ9PK9auKIzs73KzZCa/xL7y T+bPE0AQIzcU/psw+GnVTsXLp/3L+wKm/nWvI6qXWpoQBpCF7NCyjZpNDP1c4b/slyZC NEog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=d2zueGnIKuaD/e70mDI99673g349Sik2SW2NNAp7x3c=; b=YVOTmzWjXFj/VW+D2Vw4kf7R2fVOAZPzik9WzKJki9dInwCbtF8USUJ8PkZ0hEN/qT NCb033/mCC+L0+U5zuEV+LVmmRfUpRFKriS6RaVOkZasqWEZk4ckCx7OjngDxoTjeCMj WpPBvBI1n/OHCowWkyGw7rkZMRcS2CxGpQeMUQrsv3wQwQFgTIEB/3GuJSc3Cvbbj4WQ 7ARah4JUq9gmQ7PbTUBzYLsbcsjolZLSo+ckdUw4ZGgeMmgA4d522U/85Yx3e41Ss+kS VSydXZ6Nm64z0wyyL+y7ia6MJ/GwJK6IO/EUZnYUFcQ09wtc8N2lA/gSMGjMMgI9R7FR 6UKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ShhJs+Cw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a056402440800b004356ae0bc86si9272416eda.396.2022.07.10.13.55.56; Sun, 10 Jul 2022 13:56:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ShhJs+Cw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229594AbiGJTNd (ORCPT + 99 others); Sun, 10 Jul 2022 15:13:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbiGJTNc (ORCPT ); Sun, 10 Jul 2022 15:13:32 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02BF314D0C for ; Sun, 10 Jul 2022 12:13:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 61352CE0EB9 for ; Sun, 10 Jul 2022 19:13:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6B2FC341D2 for ; Sun, 10 Jul 2022 19:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657480405; bh=3hkmLeoPA94cguxwWVvXXxv3VcnHAir/c52ak4ViFbA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ShhJs+CwJ0mATbKIljdmTB0BEj4Xh/8n7CNhzbStAtyoTJMmi8fD1azjRYNy8VmnY 5//BNxPQA2fYCY3AWQyLWV4os77A8LuA7JhDC5bWRJmAm8PuQk3ygJ9i/u9nmRLCjB XnTbIFtVLLCl/snNNALgf3PTmLgwV7rVdNWXvZJIUrJb7ZVNH/ttX0U8fxv9a2dS0A sJ4JslvKrnfcScwn995fBK0o+ZgfOTXShwmEcT60mCwhs++Bgy4PM8J8P3qlv8ePTn 9d3V8jAUMzx0PQTOLRuF8oNQ21AxD0JXL52iwnGEHZ7AOXlRIFvIIuvgwq+2uSQsIU f6TDGpXuzyyuA== Received: by mail-yb1-f180.google.com with SMTP id h62so3032201ybb.11 for ; Sun, 10 Jul 2022 12:13:25 -0700 (PDT) X-Gm-Message-State: AJIora/aduvDz/TfExBbnz7nCLPI6E0FDug5J4TOApgedCsVPS9DnNuW kAV1y4MAGb5DM6VIDIxMQZV/OCQUN44LWfoJ5Jk= X-Received: by 2002:a25:9f87:0:b0:669:4345:a8c0 with SMTP id u7-20020a259f87000000b006694345a8c0mr14394151ybq.472.1657480404689; Sun, 10 Jul 2022 12:13:24 -0700 (PDT) MIME-Version: 1.0 References: <20220708231520.3958391-1-ndesaulniers@google.com> In-Reply-To: <20220708231520.3958391-1-ndesaulniers@google.com> From: Arnd Bergmann Date: Sun, 10 Jul 2022 21:13:08 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6] coresight: etm4x: avoid build failure with unrolled loops To: Nick Desaulniers Cc: Mathieu Poirier , Suzuki K Poulose , David Laight , Tao Zhang , Mike Leach , Leo Yan , Alexander Shishkin , Nathan Chancellor , Tom Rix , coresight@lists.linaro.org, Linux ARM , Linux Kernel Mailing List , clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 9, 2022 at 1:15 AM Nick Desaulniers wrote: > ({ \ > u64 __val; \ > \ > - if (__builtin_constant_p((offset))) \ > + if (__is_constexpr((offset))) \ > __val = read_etm4x_sysreg_const_offset((offset)); \ > else \ > __val = etm4x_sysreg_read((offset), true, (_64bit)); \ > This is clearly better than the current version using __builtin_constant_p(), but I don't think it's safe in all cases, since there are expressions that are constant expressions to the compiler but are not valid input to the assembler. I would prefer to see this fixed differently, but doing this one first is also fine with me: Acked-by: Arnd Bergmann Arnd