Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4422025iob; Sun, 8 May 2022 12:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8vh/XmU+TVS7h8MAoXS4kavldS/eq5lazm/KAT88yDbvTkTKapmVhNohDRklP99XmeDXu X-Received: by 2002:a17:902:9309:b0:156:983d:2193 with SMTP id bc9-20020a170902930900b00156983d2193mr12768740plb.158.1652037073727; Sun, 08 May 2022 12:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652037073; cv=none; d=google.com; s=arc-20160816; b=PPrBmqBl1AsiO+7XOMLTWvMy3aVvWCCmyizFT4BMai7ELm1aWAAsH+zFWxtPC7xA/Y JdKvBMtYHKJieBfMTTDO/gM9BvcbtI/9X+scOm/sXWdk5+6uDdnWGw/Lu93+Q/pqTTLB 1ewNfcJ+gy6vzPvoyeS9lqNSoh1+Bsm58cqGmh7VNr4jS5Esyw8CJRiopFmI5IlZMu+d TbnuT8CxOg4ZkU/9fppEkcRocpQ7ttTDgc2kCNqFgS3s4DqMUJ7iypp7KEm5oCgCrlwn YhyX7trGAHwgqCOd14oSyrcUF5Cq5U+gY4xa/fBEmcKpIYxkFzpImoMRoXVtGNipm/Nq QIjA== 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:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YQat1rkbwME50is2lwrsUzhjqH7wUUl1ZMLcbuIXkx8=; b=DeOxkusMKvqgrmx6EFPlKJbKV+fx6lQe1jMZgzdlP3ZOb/zYMGbjZZ0pc64xHB7h8W ejDg73p7p9NQgIi44UbT0EBN3/UrFmnle0f7j00dwPwpFfAkxYj1g7q6ZH/TPNLdWr5k +4ZNdfM9H3GGYx1E9C4POtNcMZAB3+14Sn4wvjw7bH14k3kEr4zuJifvrbXKraN4Ql1j hrEpM/xg9XS115zxZwxA+SEusNWYoWYoqlBzUgViduPXR4Y0b9tjOAcBzgMMl+QRQ/yA 4Dj4REc8q3t2HG6VHF3rFJMjPxvZHcHMQc9x+1vs32bIexLGtparI5kA8eX4nzLxJLuF IYlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=zgVZ5Swg; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 127-20020a630985000000b003c165f21c0esi11513005pgj.571.2022.05.08.12.10.59; Sun, 08 May 2022 12:11:13 -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=@quicinc.com header.s=qcdkim header.b=zgVZ5Swg; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239514AbiEFN0t (ORCPT + 99 others); Fri, 6 May 2022 09:26:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392440AbiEFN0q (ORCPT ); Fri, 6 May 2022 09:26:46 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9CFD6830B; Fri, 6 May 2022 06:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651843382; x=1683379382; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=YQat1rkbwME50is2lwrsUzhjqH7wUUl1ZMLcbuIXkx8=; b=zgVZ5SwgQrQJohv4cumKrXn6JnJb0sOR4JnGl2RAF/G8OHucCJhHjLqN 86inPMp+0gq43gpEMMVZkACqXAJQ9TkJwSNz+3JCPGf0hcDRDV1mZVUCg AX/QsEYi79CEn8V9+9m8sDAyJqmc5R0uX0wTqSw2KD8p5SWV5iRQJhprL 4=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 06 May 2022 06:23:02 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2022 06:23:01 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 6 May 2022 06:23:01 -0700 Received: from [10.50.57.95] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 6 May 2022 06:22:56 -0700 Message-ID: Date: Fri, 6 May 2022 18:52:51 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCHv14 2/9] coresight: etm4x: Use asm-generic IO memory barriers Content-Language: en-US To: Suzuki K Poulose , , , CC: , , , , , , , , Mathieu Poirier References: <0d76de0ecc0aa7cb01fd8b8863a8e567abd4410b.1651663123.git.quic_saipraka@quicinc.com> <483bb401-13e6-8c52-4b5f-f3c635b9ad46@arm.com> <687b78b5-5671-5317-ce9e-98720bb533fa@arm.com> From: Sai Prakash Ranjan In-Reply-To: <687b78b5-5671-5317-ce9e-98720bb533fa@arm.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, 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 5/6/2022 2:51 PM, Suzuki K Poulose wrote: > On 06/05/2022 04:02, Sai Prakash Ranjan wrote: >> Hi Suzuki, >> >> On 5/6/2022 5:14 AM, Suzuki K Poulose wrote: >>> Hi, >>> >>> On 04/05/2022 12:28, Sai Prakash Ranjan wrote: >>>> Per discussion in [1], it was decided to move to using architecture >>>> independent/asm-generic IO memory barriers to have just one set of >>>> them and deprecate use of arm64 specific IO memory barriers in driver >>>> code. So replace current usage of __io_rmb()/__iowmb() in drivers to >>>> __io_ar()/__io_bw(). >>>> >>>> [1] https://lore.kernel.org/lkml/CAK8P3a0L2tLeF1Q0+0ijUxhGNaw+Z0fyPC1oW6_ELQfn0=i4iw@mail.gmail.com/ >>>> >>> >>> Looking at the dis-assembly it looks like in effect they are slightly >>> different for arm64. >>> >>> i.e., before this patch we had >>> >>> "dmb osh{ld/st}" >>> >>> and after the patch we have : >>> >>> "dsb {ld/st}" >>> >>> Is this really what we want ? I don't think this is desirable. >>> >>> Suzuki >>> >> >> No, this is not supposed to happen and I do not see how it could happen. >> __io_ar() is defined as __iormb() and __io_bw() is __iowmb(). >> >> I checked the disassembly in both case with MMIO trace off/on with __etm4_cpu_save() >> as below and saw the same number of "dmb"s. >> >> aarch64-linux-gnu-gdb -batch -ex "disassemble/rs __etm4_cpu_save" vmlinux-without-mmio >> aarch64-linux-gnu-gdb -batch -ex "disassemble/rs __etm4_cpu_save" vmlinux-with-mmio >> >> Can you tell me how are you validating if I am missing something? > > Apologies, I was missing the patch in this series, which adds > the arm64 definition for __io_ar/__io_bw. (hint: Please Cc > the affected subsystem in the Cover letter for the series, so > we know what the intention of the changes are). > Sure, I will keep this in mind, apologies for the confusion. > With the patch1, yes this makes sense to me. Otherwise, __io_ar() > is default to rmb() which implies dsb ld. > > With that said, > > Reviewed-by: Suzuki K Poulose Thanks, Sai