Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3103415imw; Mon, 11 Jul 2022 01:43:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1thoMyPd6N/cN2RK1fQJEW4kZxsYpF61bzC6yZrWB8jBul0CzE1rJRDDiZ7ZZBKu1u/9Pn9 X-Received: by 2002:a63:5cc:0:b0:412:b2ea:c6fe with SMTP id 195-20020a6305cc000000b00412b2eac6femr15284682pgf.596.1657529026451; Mon, 11 Jul 2022 01:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657529026; cv=none; d=google.com; s=arc-20160816; b=wSmxwOzzyIclMP4L2xR0pM2owhN15JZ4ty3yS1N9fdd+lpuOLrLAzaTnillx/i5XUy gxJbF2vLnEmCTj6rTk2kCpMzokNXK2n6uo3je6OZpW/btslQOrUkMqxYG2GUjhjVxfOV f5g4ucvHkUM1VpSxQKsrN5tPlz+nFNcGiahomsH+mdhdyHluTPk3m0yL90Y5jhRv0AFQ FLxoEeb8sebiQpIV00nCG6Z67+L/DqN/5sMpEu0N6P33QOq4UDnbb5f6FbPW0f/klXpN YFFBQ033L6IsYSFmlv0XyRxOl1imvKr83OmNB92fR1xwoG3j1yew1ztqB115XUtGzP99 iZUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=wetTVAX4upjH76pvlztChLpZ2eN/78CwORhlWl5OBuk=; b=l+fQEYYP+olHDEkPQvU7U9CglgUPVnWReNI/4k9os6g8mxrdaWnKiBhAE7NEDvUXUn NnrWSI9Au6cGYl+5E28QAvkDo+vFWjCb6lkRcKMs72Hb0GapJIsCLlq+wGaOcgwMr0Pq 5u6X34CLqm63OqwOSCpY5eHsJ++qn2wEqT1VfeOn8gVcsE7hfrkx/mp5vTa/vaylKx5J +Vj/GlLLpRLtPESEtmfBlIReGjVq8UhgAbDnMyv2ElJjzIwCW+JOJWENCST/g7bl0aB1 goxcCa+VRJ9WdHraYfFz/eiMTCFThiJnZGiO77K1a+XPuggQ1mM6F3xt7QhucQRg1tU4 YwnQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a170903200b00b0016be6146f7fsi8914935pla.192.2022.07.11.01.43.34; Mon, 11 Jul 2022 01:43:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230330AbiGKIfz (ORCPT + 99 others); Mon, 11 Jul 2022 04:35:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbiGKIfU (ORCPT ); Mon, 11 Jul 2022 04:35:20 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58F4E2FC for ; Mon, 11 Jul 2022 01:34:47 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 61485176B; Mon, 11 Jul 2022 01:34:47 -0700 (PDT) Received: from [10.57.86.128] (unknown [10.57.86.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E70ED3F70D; Mon, 11 Jul 2022 01:34:44 -0700 (PDT) Message-ID: <80b0362d-6ece-1da1-18c0-c1030fe4a303@arm.com> Date: Mon, 11 Jul 2022 09:34:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v6] coresight: etm4x: avoid build failure with unrolled loops To: Arnd Bergmann , Nick Desaulniers Cc: Mathieu Poirier , 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 References: <20220708231520.3958391-1-ndesaulniers@google.com> From: Suzuki K Poulose In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,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 10/07/2022 20:13, Arnd Bergmann wrote: > 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 Thanks, I have queued this. Suzuki