From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753659Ab3KYKfp (ORCPT ); Mon, 25 Nov 2013 05:35:45 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:58005 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751639Ab3KYKfm (ORCPT ); Mon, 25 Nov 2013 05:35:42 -0500 Message-ID: <529327A8.8080909@ti.com> Date: Mon, 25 Nov 2013 16:04:16 +0530 From: Sekhar Nori User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Prabhakar Lad , Taras Kondratiuk CC: Linus Walleij , Grygorii Strashko , LKML , DLOS , LAK , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , LDOC , Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Rob Landley , Grant Likely Subject: Re: [PATCH v6 1/6] gpio: davinci: use readl/writel instead of __raw_* References: <1385057731-4348-1-git-send-email-prabhakar.csengg@gmail.com> <1385057731-4348-2-git-send-email-prabhakar.csengg@gmail.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prabhakar, On Monday 25 November 2013 09:42 AM, Prabhakar Lad wrote: > Hi Taras, > > On Fri, Nov 22, 2013 at 3:38 PM, Taras Kondratiuk > wrote: >> On 21 November 2013 20:15, Prabhakar Lad wrote: >>> From: "Lad, Prabhakar" >>> >>> This patch replaces the __raw_readl/writel with >>> readl and writel, Altough the code runs on ARMv5 >>> based SOCs, changing this will help copying the code >>> for other uses. >> >> This replacement has a functional impact: it adds memory barriers. >> Please note this in the description. >> Also please add a bit of explanation on why do you need to add barriers. >> > Agreed this adds memory barriers, I'll add a note about it. Well the barriers certainly make it easier to debug by having both device and memory accesses happen in program order. That said, if there is no pressing reason to add barriers, you can use {readl|writel}_relaxed() instead. That will make the code protable across endianess. Thanks, Sekhar