Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp5078297pxb; Tue, 28 Sep 2021 10:04:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS37jFuw0eEZszXFaf71ApUSaa6cHQE4dFMp9nkL51zS6VpVKDXKhlE/CT5f1TOVJbgUio X-Received: by 2002:a17:906:190a:: with SMTP id a10mr8012203eje.474.1632848670360; Tue, 28 Sep 2021 10:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632848670; cv=none; d=google.com; s=arc-20160816; b=xStIXllHUcz2zePxuXkrTOmSaMq8i18UUlgJPnuezbRnNfXXEFXCAfhRwCMgOozmre Hr45ObEFOk84JyyAsIaZTUaf20QstWk/zgnq2FDCdT7yTfJFSvrnUk7XhPOM+J/eocpN hdbwTzSOETcEnq6NinnDN3ADNiXqhkj0OwAI/wGamQQlfPb0PNEmnnYVLztGtRl8R0+p A/6dElaK1ReVyXv4UG1PcFJD9b0Ctv/wdORC8eQF9IAg5UFD0pY2dHOJezP5dO41MVyJ J4crrHIMFDa1LwHSEAc9T0kKNHnqomFgP+/W2lsEBN//tHr3lj/8UJAV1q2k2LIsVskM eykA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ye3IGx3xsyiPYn6ctob/HWeGLeGpvxCIcL+FYuNuPPA=; b=uMRTWKAhB5ILjH/k5hvYAyD6O4fwRRy3dEaGpBOv92HFpbebo6aGQzmvPWbx5DNKeI hQAGWQ0JKnYoH6FeyUZeNszvGADMZzE7OxRsKxd92U+9D3aYdGhFGd2V0QHvBpOP6FUK MUeeHqQOwfrDKfrbJqqLjJ4GQfZlcvVB1axN+AB0tpCHaaP7o6ygxxtMjSH1EEJOyBLr NkXeJ6muW9swhDAArLhpzBueBJ4CYRPswuiNRnQD5MUWABi8gvTRtEBCV24Lac+LyNz3 pf/U27i6cBNMsMSUQTC1PE7wBOvGgtmdDbiSNHOLHw0hucsS+bxpccy6Fl01ceqEbNez MUEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LGQz2aR5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si4091056ejq.278.2021.09.28.10.03.59; Tue, 28 Sep 2021 10:04:30 -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; dkim=pass header.i=@linaro.org header.s=google header.b=LGQz2aR5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241907AbhI1RDW (ORCPT + 99 others); Tue, 28 Sep 2021 13:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240975AbhI1RDT (ORCPT ); Tue, 28 Sep 2021 13:03:19 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DADFC06161C for ; Tue, 28 Sep 2021 10:01:40 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id j15so13196602plh.7 for ; Tue, 28 Sep 2021 10:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Ye3IGx3xsyiPYn6ctob/HWeGLeGpvxCIcL+FYuNuPPA=; b=LGQz2aR5Qglk96plkagtj2jQh2a0LjCDeJKbwVlhTkR+X4SZycmVFCQ16wFqIEoo7S wOpaf6R3zbpNIrRLUbPwbem98y/KI2Lth8RrWz0g4tSiqSOij+8lJayubzpFlK+Q5yWB APLw+AedWNLKwUbdHhgoDGscHvnndefjbPP6VJa0k51MMOGYgFv4tYhCP/d3SVPfDFBI FToUIQdpPMwgcleakt5ZCgWRHC8LXadHnJMuaoi8FbvAmQxkZsNqlqAVpdlRVN+89Aur 2aEZbQksiVegP1yquNZ2Viivj61WJ5yv0KRrZNMm1iXq22XaIR5ok9COAaPGTFOdJXq5 Pp7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ye3IGx3xsyiPYn6ctob/HWeGLeGpvxCIcL+FYuNuPPA=; b=IgUCLhin1y0zchzmoui5C2Tm5kdWI38Z3hwQTcnsVSu9l56WykNH7IrqfiY6SvaQhA 7YzzbCMR9d8HCWezQwLPyukqbLkCyL0bao3pfEcLlrU48QAcj2KsqaV6NyK0DMTM6ClT RwUbcGI2CQm116oYppGepy2qQZehwobtt21okhCkxDTrkwCWTYIgZBHiEv043a1qw4zq ty4EsDviWFpWKzALaqrH89j0qDMdM5LSeMPknCTPPynNJSpO2bHFMgY065Ii01h90V7q CVYhauu4xKo2wlxOfe9pLMgcwl2x1hr7ENy1o8u1Nycplz5PJTi/+sxRFMepeI1wldYF vC+Q== X-Gm-Message-State: AOAM530m/OLnul/kKvNrn2htWs+t3MMvkw3UajKBpk12VcKGq9Wf9bRS GY7d1R6Jgkd+sE1scy2U7CX7tw== X-Received: by 2002:a17:903:1d2:b0:13d:c967:c14 with SMTP id e18-20020a17090301d200b0013dc9670c14mr5648919plh.52.1632848498155; Tue, 28 Sep 2021 10:01:38 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id w1sm3043595pjy.49.2021.09.28.10.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 10:01:36 -0700 (PDT) Date: Tue, 28 Sep 2021 11:01:30 -0600 From: Mathieu Poirier To: Tao Zhang Cc: Suzuki K Poulose , Alexander Shishkin , 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 Subject: Re: [PATCH] coresight: etm4x: avoid build failure with unrolled loops Message-ID: <20210928170130.GA2918258@p14s> References: <1632652550-26048-1-git-send-email-quic_taozha@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1632652550-26048-1-git-send-email-quic_taozha@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tao, On Sun, Sep 26, 2021 at 06:35:50PM +0800, 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 > --- > drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c > index f58afbab6e6d..0bca8e2be070 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c > @@ -797,7 +797,7 @@ static void etm4_disable_hw(void *info) > /* read back the current counter values */ > for (i = 0; i < drvdata->nr_cntr; i++) { > config->cntr_val[i] = > - etm4x_relaxed_read32(csa, TRCCNTVRn(i)); > + csdev_access_read32(csa, TRCCNTVRn(i)); It seems like the patch you are referencing above was never applied... So the question is, how is it that only this instance is giving you trouble when there are many more instances of the same pattern in the file? Thanks, Mathieu > } > > coresight_disclaim_device_unlocked(csdev); > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >