Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp648347pxb; Wed, 29 Sep 2021 06:59:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz06vdmW0X1wLx/rhxndP7rR+T+WWVdAP/KOHzCdiqzwHw7UMVqSLm7BckSX+1nwXB12V/0 X-Received: by 2002:a17:906:ca4f:: with SMTP id jx15mr13608994ejb.186.1632923998706; Wed, 29 Sep 2021 06:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632923998; cv=none; d=google.com; s=arc-20160816; b=RDTYtTlJIaHVOTiMK2Nbq8KBchye9eHfFfiqCP/lb2X9ZPzUN4B34MIXAB2idhx1yU L5CMp2/K/uNcXlMwFcHebW46EwFiF5zkobEfUeRfW4F119QFvV3LgX5tDuh1XGJyi9Tg rBsVl0H2Wg6QaFwMGf3Yg5k8f3zcTyfP2SwNkABOieUGV67/eqfruMMzvJxyt2pXr5Pr q11sIqRffEDwR79rV/JRFWkseTBkgw/Z3gpE19wfmAGuWwhEdo8GpVYAErlwhvS8sL39 P2pSTz9kKIQInKZxy+0Q+7SuJuHiyMxNXg7/19vZjIigDweB6t5jvWBXIlRV8kn7U+9t fM1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=f4VH/SesForNRwx3mid7JhUz+9VakkOXqnXXSk62HZc=; b=SwlgRtk0/A4KqZ3efpIPtSSUhQOT4IoEFD8IwNXpLaDlLgx/p6eJnz7dfQD7UDknR/ 8DcfjuV7+M/lkvm6wRBcP8p7OlT6ge4WHhLus/9t/Pr1G4jAUt95u6Vg7+RMZunev+uK q46qCjBZxtbtyo+oacjgs/KA05MJhOpHYj4ErsOtN76eJnmvZxU9I54VaTH5oYVo2iIn D8A0h8bn49/bRivhWdLuO0Ll8HBhw6//+sUg6uSfY9AW+djpzrOchIYHkmm8juYDdsad +demun1M1Cq6RFVwacCSXIeBVpudQXy6bOE5/P/Ud4JKQ4CC1w2AHJdn+OFYG5oPTRU+ hLYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si2853487ejk.222.2021.09.29.06.59.32; Wed, 29 Sep 2021 06:59:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S245516AbhI2Kbf (ORCPT + 99 others); Wed, 29 Sep 2021 06:31:35 -0400 Received: from foss.arm.com ([217.140.110.172]:57684 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240310AbhI2Kbf (ORCPT ); Wed, 29 Sep 2021 06:31:35 -0400 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 04C80D6E; Wed, 29 Sep 2021 03:29:54 -0700 (PDT) Received: from [10.57.95.68] (unknown [10.57.95.68]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16E283F70D; Wed, 29 Sep 2021 03:29:51 -0700 (PDT) Subject: Re: [PATCH] coresight: etm4x: avoid build failure with unrolled loops To: Tao Zhang , Mathieu Poirier , Alexander Shishkin Cc: Mike Leach , Leo Yan , Greg Kroah-Hartman , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tingwei Zhang , Mao Jinlong , Yuanfang Zhang , Arnd Bergmann References: <1632652550-26048-1-git-send-email-quic_taozha@quicinc.com> From: Suzuki K Poulose Message-ID: <48162555-2a67-60bc-ea4b-8720e7b98a22@arm.com> Date: Wed, 29 Sep 2021 11:29:50 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <1632652550-26048-1-git-send-email-quic_taozha@quicinc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tao On 26/09/2021 11:35, Tao Zhang wrote: > clang-12 fails to build the etm4x driver with -fsanitize=array-bounds, > where it decides to unroll certain loops in a way that result in a > C variable getting put into an inline assembly. > > Search this build failure and find this is a known issue and there > has been a mail thread discussing it. > https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210429145752.3218324-1-arnd@kernel.org/ > According to the modification suggestions of this mail thread, > coresight infrastucture has already provided another API that > can replace the function that caused the error. > > Used here "csdev_access_read32" to replace the original API > "etm4x_relaxed_read32". > > This patch applies to coresight/next > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > > Signed-off-by: Tao Zhang Thanks for picking up the patch. Please could you convert all the other variable indexed register access too ? That would save us spinning up patches for fixing those individual cases whenever the compiler decides to change its behavior. Suzuki