Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3535062rwi; Tue, 1 Nov 2022 23:25:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4IKRzDMEAKxSAZkLzAnMHEDk5XxEZd1FHKrVFuc217InA6dxv1pP/QXz2kPH9wCqWav02J X-Received: by 2002:a17:907:72d6:b0:79b:8cce:112a with SMTP id du22-20020a17090772d600b0079b8cce112amr22090145ejc.118.1667370342385; Tue, 01 Nov 2022 23:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667370342; cv=none; d=google.com; s=arc-20160816; b=ItgBuNdjr4Ei0bdW3VlxGS72twRxerrZNdd6G/B95cAVTIlrX16qW4z1x24m8yKxPW agafdOuPqDh+ATwPTA0b0emFs8Wmky60V93bVLSAX8Ty0YUuNet5sAI60SxgDlItFlO8 ZyhNZlHFpXZYZeGhRV28R6jVnK6/TEj9iWy0y6LOlcz+Q8yubPlDU9lZ3ICJklfkOWoq 3EH/ulGaHIztuBrkmXZlRll13bL7YkzxaBd8CD3YRRBS4BGZH5mZD7PL4yOfTTDgHt3P QprEDQRb/PY7nsVMYbTZj2NTfZDJ56pKCaxh8a+CL2PpuP3XCspp8Scv70KJKzATl4ea WXwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=9TazwZDxices9Msk4O5I1fEfDIOuULMU//H3plMI/Co=; b=O8Qpc9hw0jqGFGBSZsmPzTnDBU4O6dfhVe808nIaovgijzqJnjGwbCuwUC6Z7Fr2Yh jJUbmdqeN2uAV9lohJrmbcZ9lnPg76cGxnw0dTxSi3dPhvVNItzQAtQjzSWXr4Zb3iHz kvA0d4ufDI/AWKsD7HOU8L50+q7gMQknCHep5f2ryWjQunWXukmaamYcvyATsIrnL2vd /Y1FEbPtgXKzfl1BJXUAbSYphBNmjddEj8G9j4l3kGyDoyyWMY1G8oWPtfI2ZgBkaIpO QzohyQZABvl2iYns7BEsIelQO66jmENSb2zJExQwVplH4ERzmqM3aoMvXG2thBuBCWb5 nsYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LwYTWx42; 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 r8-20020a05640251c800b00456e33b69e1si16303383edd.347.2022.11.01.23.25.18; Tue, 01 Nov 2022 23:25:42 -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=LwYTWx42; 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 S229968AbiKBGGH (ORCPT + 96 others); Wed, 2 Nov 2022 02:06:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiKBGGF (ORCPT ); Wed, 2 Nov 2022 02:06:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24573DE87; Tue, 1 Nov 2022 23:06:03 -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 ACFD8617DC; Wed, 2 Nov 2022 06:06:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0DD0C433D6; Wed, 2 Nov 2022 06:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667369162; bh=bvrPUQ1AkdtWDIkrPLtRNfBzvHOW7CeSneSnNTmKJ2o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LwYTWx42wGb7JaWR7zd6arvecdUoOxnekCLqF9GagZ6p3oZkyfLd38l2C6kPNKPKg 2p0V4MA72gH6i73YrS5WVRvT1U3FVI2+DZeSIoI+yLSOGIqN0XCDfMAR5+rsLE8Rvh Hva8ARZU+u5QVDBYfoqxGDM3tRGsyBnn7BX4mO4n/4B3fDVKxr4KjE+F9LLMnAby4L /fBLka4RB8U7FMxWWhshc+UBeZyHR330jinhi7Uq3qZEmGepUFluhcH13u0WD6FqjO w1eGoFeUt3Kz+zyh5Hf82ZPoua2dmeakiDoCKG9I4Ma2Gmlk6AZkTJQF6ae24zEBSe +UOgluERW5cmw== Date: Wed, 2 Nov 2022 06:05:54 +0000 From: Will Deacon To: Parav Pandit Cc: 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, paulmck@kernel.org, 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: <20221102060553.GA15438@willie-the-truck> References: <20221027201000.219731-1-parav@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221027201000.219731-1-parav@nvidia.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-8.2 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 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 Cheers, Will