Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp473833rwi; Wed, 2 Nov 2022 14:14:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5DlKpuS9igtm/LEwwchInE05zXkbaTjfw8LmGjqEYdOj/l4MfoC2LlQQJffszaohgaPn4q X-Received: by 2002:a05:6402:14ca:b0:462:e375:a1f4 with SMTP id f10-20020a05640214ca00b00462e375a1f4mr27261069edx.344.1667423677009; Wed, 02 Nov 2022 14:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667423677; cv=none; d=google.com; s=arc-20160816; b=kPdZzrSBhyk3WUIZ2lrAVZdb4SC28eNtDDVBlpvglua2l4yGGGyXqzFCrPJaxIPEB2 dLTmyAsdJE1kI4qFTNR2PjtZB4qI65PvcXTOG8opNfs4I2q+QwKEYqvQNrykqjJNA4A2 zVc7pFt34WGWN61/4JK/WJvVhuxN3+8ih5JOxTffymBTdaPblUBB9mzrDM6GbmEXGb0n ZktB3tT+8pXjICwN3+8MQloLiybYnT1IXBNLox+nSKYsGCaFLhjJ4PuarhzVxeaAP0H4 p/cObX5Z7WAtIJI8xmKUxU15ooxRGvxMH22zs4NSvf/stz7UiQ83Ux3MruJFKfLX6EZ2 nlCw== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=qxG2BqO9VrbE9xx3pcjfmGOgVbOvfx2uX5YnQNTtHxA=; b=z8Hih24kw31hL9hZ4dgcKnbLLloGznO00pcEirn3BrlT7MtZ/GQEVT4m17KWqgJYu0 8ElS8Yn1O/i9PE3usggondhPCB60JPOGzcPCel9FIwNjUdTKGT1mOh6PMTNrHYOWo5Iy 9rtDyGa+LPDUvBcbH9H0nKWayzfApo8EQVwxVbOcMiI3ASudJiePoCncOGvsSwo8XlSF eAFmPKQdonTg/qJLUFSFYnqdBjnubxB8Uvtct1RY7mep/YTofPwFoKIAgKDd0zsHgo+n sd0/vkEOgUteuJlLxVUBbyNr7LNRlEqC63z+zgwr2WCv/sCBZkWN/nN1l5HxIpkigAVN +rgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RweD87Fa; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga16-20020a1709070c1000b007ade20fc415si10869872ejc.811.2022.11.02.14.14.09; Wed, 02 Nov 2022 14:14:36 -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=@kernel.org header.s=k20201202 header.b=RweD87Fa; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231217AbiKBUav (ORCPT + 98 others); Wed, 2 Nov 2022 16:30:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231196AbiKBUar (ORCPT ); Wed, 2 Nov 2022 16:30:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDC063896; Wed, 2 Nov 2022 13:30:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 844FE61BDF; Wed, 2 Nov 2022 20:30:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAF51C433C1; Wed, 2 Nov 2022 20:30:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667421045; bh=hud8Dpz5A5Zx36M35iJBXmY3CB9VaHEsQIX80WqYh4c=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=RweD87Fa6HGuEDGwF4YVqM+BdcUvNOQL+CMELNcieFg3TcfJ/1Ez22e9NT+/s1lgd e4VU6afapXCtyFo+WA6PmVqy38OSsn/axYwHhoc8Kcxp5LlYykp9q8qjOol2CMmI6D 4yT8xgHA2rx/YuFRaCqvsbJQVz46bF/chq6ihok0mgH4WO0alIDF59jldBgi7j/ktS i2XuGWQSb+8WoSSIZ260tZ4LaDgh+lwN1uQ4h38CqDfdi/dGH8+7Kv3r8lbzjR/46a l6SjLq3Sx+Ww+0bBrlQ5qly3VRZ9YCxgASxJ5xw74nT/ST0quoQik10daC5ftS6jY2 mqFtGJNN+3m5g== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 7F2415C1813; Wed, 2 Nov 2022 13:30:45 -0700 (PDT) Date: Wed, 2 Nov 2022 13:30:45 -0700 From: "Paul E. McKenney" To: Will Deacon Cc: Parav Pandit , bagasdotme@gmail.com, arnd@arndb.de, stern@rowland.harvard.edu, parri.andrea@gmail.com, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com, dlustig@nvidia.com, joel@joelfernandes.org, corbet@lwn.net, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v5] locking/memory-barriers.txt: Improve documentation for writel() example Message-ID: <20221102203045.GS5600@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20221027201000.219731-1-parav@nvidia.com> <20221102060553.GA15438@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221102060553.GA15438@willie-the-truck> X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Wed, Nov 02, 2022 at 06:05:54AM +0000, Will Deacon wrote: > On Thu, Oct 27, 2022 at 11:10:00PM +0300, Parav Pandit wrote: > > The cited commit describes that when using writel(), explicit wmb() > > is not needed. wmb() is an expensive barrier. writel() uses the needed > > platform specific barrier instead of wmb(). > > > > writeX() section of "KERNEL I/O BARRIER EFFECTS" already describes > > ordering of I/O accessors with MMIO writes. > > > > Hence add the comment for pseudo code of writel() and remove confusing > > text around writel() and wmb(). > > > > commit 5846581e3563 ("locking/memory-barriers.txt: Fix broken DMA vs. MMIO ordering example") > > > > Signed-off-by: Parav Pandit > > --- > > changelog: > > v4->v5: > > - Used suggested documentation update from Will > > - Added comment to the writel() pseudo code example > > - updated commit log for newer changes > > Sorry for the delay on this, I'm really behind on patches at the moment. > This patch looks good to me, so thanks for doing it. You can either add > my: > > Acked-by: Will Deacon > > or, since we worked on this together: > > Co-developed-by: Will Deacon > Signed-off-by: Will Deacon Thank you! I will apply these tags on the next rebase. Thanx, Paul