From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15F2EC433EF for ; Tue, 28 Sep 2021 17:04:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCA1D610E6 for ; Tue, 28 Sep 2021 17:04:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CCA1D610E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y6TMTaR0KfkEQsnKP+JbO8HNqTKBXehyPTGUmR/gNJI=; b=ORICx8viqL+x0+ GOzCuiY4x1VmR+ccrXP01pLwlQjq5Pu8I5yuTdW9zA7BtG5KDjkR/Hvwo5wzVQC8Crh8Pl18mAPjM 7G3Xyi7lW+i8cVrEfwcqMmG9UQ9KFCbkk+5E0q9xM1rqL3tTB/lxB5S/JRRxEHt+b3OFBx1F9s3eg OK2kyloHGfiDXU7eoxxIhhXFFSGe9QWNMi7f3M0LUked9yroEPeWTglpW0yAl4gtlQpmUh6xDtmpU C4I+iRWblZSSaT9SjYTpswm2rHqvQRVnzytbeGS0MC9nTmU2cNvcC/iA7sEf4yGShS+TtdqtKw7vq JkIg1tSGv2OWZrWdeBkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVGUI-0088yO-G1; Tue, 28 Sep 2021 17:01:50 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVGUE-0088xV-PV for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 17:01:48 +0000 Received: by mail-pl1-x62c.google.com with SMTP id l6so14607042plh.9 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=K/Mo3SHTl9sL3m/FhiMNzYhwNsam6el7JHjjlPc/LD3mpWDPjlUxpSOldwwzzY9Q+x qKaInV+Y37AFSW0sLbKRXaiJXkrySJ7uPn2BNY6j9az4YZpFtnJ6zj8bsa1Jp30T5KKh xPZu4ddsr/R/3bCBhjYnG6RjCn8sBczmdbA+iH1cjS80H+LPieLLnXd8ByL+eQqzqiIo FfLct8rVR9ff/CLzIxsPseJVhndnCxOPDuzdgcrou9SbdONAqVZb9VGPxdYJ/jq3WUFo RE1K8gwH1fVaZZENoXUC8jKV2UGSf+jLEtpxncunMLNcgOj9o69elgSQ8uHyIVp//yFi qExQ== X-Gm-Message-State: AOAM531SG81LovKJqtncOFrwepKPFYkSCfFsdNczVKBCQS93nU+brSfC XUasY9N5+4fRd0MU6rFZmg8Epw== X-Google-Smtp-Source: ABdhPJwRg03fFzrBFDgTkieTJe+NXE4t/k9GhJlIoLPzBuFj0laLtbEAiVbUsTkeZAai4w90EtAZFQ== 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-Disposition: inline In-Reply-To: <1632652550-26048-1-git-send-email-quic_taozha@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_100146_854503_E6EBE4AB X-CRM114-Status: GOOD ( 28.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel