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 X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88154C4743C for ; Mon, 21 Jun 2021 17:01:28 +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 5761060FE3 for ; Mon, 21 Jun 2021 17:01:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5761060FE3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@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=pcrU9CNEOGdJmfkBHo63wadmP/XkTb8YkrVruRMJE/o=; b=MruTnC5Ok8ETga m6FSEEtIPE5GATe6Xbf2aBgdNJlOcYmbzj60T/zjtGqUNXokTjzYGCI3yqA0ZavbcxJsyTrbybAA5 FXBE8qdWI8BtITcFjRsdRR3acN4PZPZkg596f2rZo/mdtvwkxKzPwEs27kYNKY/N0RjQ1tTyTjetw EwJ3An/t9YFlegrRmpvN6/U7pPba57/F/IUpQ6epRzW/FUvqPDa8LYyVjffo3/IVO/hsAiiVcUP5g p4IGIxUINpcIVx//hkIjzp06Wfqc6JT8KUAtex1V58Zm+EkrND8OhfKYgMFTg+Jg7V6oK/wF4sscb TuPgmeIGbz5qdYGiFvKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvNH4-004D21-TO; Mon, 21 Jun 2021 16:59:51 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvNH1-004D1X-AR for linux-arm-kernel@lists.infradead.org; Mon, 21 Jun 2021 16:59:48 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 722D360FE3; Mon, 21 Jun 2021 16:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624294786; bh=2Je6h6brbLjWNvNovJC594guZRlReN8uXDZdLuOC/V4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AWg6XHQaHr6NBLPcRkFmIxRr11zN8JELU1jRaRgzdU/EEjssytAbt2zLka/Uh3sRc QldHKKd31ZAzyR+cNvwIx9kiB6A3w6/tmyRlF2IS2T4w4Hdl15inP1ojrxiGvXEOph A8W6R2KY5bSRj1ILR4EXDZJ75DrLT53w75+Uga60+9XhpzDmmad4PSpd8mH5kbVqc0 ecr9BIosQm8XMDBwp5VmtZebaK/eb4V7aalE9QqonIEiaqZX35dSY4ua1POTOAxIOg URXnuM1bIABjGsNCRDX3gptG6E9fsW5ow2gP3ICOe68EnrcCc75E1NsQxFUj148GT/ Cdeh4JwuNZ9uQ== Date: Mon, 21 Jun 2021 17:59:42 +0100 From: Will Deacon To: Frank Li Cc: Catalin Marinas , Zhi Li , Shenwei Wang , Han Xu , Nitin Garg , Jason Liu , "linux-arm-kernel@lists.infradead.org" Subject: Re: [EXT] Re: The problem about arm64: io: Relax implicit barriers in default I/O accessors Message-ID: <20210621165941.GB29595@willie-the-truck> References: <20210617092744.GB6314@arm.com> <20210617172528.GA24813@willie-the-truck> <20210617174131.GC24813@willie-the-truck> <20210617214012.GA25403@willie-the-truck> <20210621162641.GA29595@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210621162641.GA29595@willie-the-truck> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210621_095947_425165_422D5BE3 X-CRM114-Status: GOOD ( 22.28 ) 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 On Mon, Jun 21, 2021 at 05:26:41PM +0100, Will Deacon wrote: > On Mon, Jun 21, 2021 at 04:11:57PM +0000, Frank Li wrote: > > > Oh, interesting. Maybe this is a case where OSH vs SY actually makes a > > > difference. I'm not quite sure what it means for the coherency of normal, > > > non-cacheable accesses (which are outer-shareable) so that probably needs a > > > bit more thought. > > > > > > Can you confirm that the issue *does* still occur if you use dmb(osh) > > > instead of dmb(oshst), please? > > > > After get ARM support https://services.arm.com/support/s/case/5003t00001RuJHw, > > This issue have some progress. > > > > Our system configure SYSBARDISABLE = 0x0, So ARM core barrier propagate to CCI-400 > > > > Our DMA and USB is located below downstream of CCI-400. So USB or DMA is located > > in system shared domain. Only use dmb(st), CCI-400 wait for previous transaction > > Complete. When dma(osh), the response is sent when snoop responses are received for > > all earlier transactions. CCI-400 don't wait for previous write finish. > > Thanks for following up. I'll cook a patch to fix this... ... and in doing so, I realised I still have a question about this. If a CPU is writing to a zero-initialised non-cacheable buffer in memory and does something like: buffer[0] = 1; dma_wmb(); // DMB OSHST buffer[64] = 1; would a non-coherent device reading this be able to see buffer[64] == 1 but buffer[0] = 0? In other words, do we need to upgrade the dmb_* barriers as well as the I/O accessors, or are they still ordered by the bus fabric because all of the accesses are going to the DDR? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel