From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932479AbbJVJCs (ORCPT ); Thu, 22 Oct 2015 05:02:48 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:64352 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756971AbbJVJCo (ORCPT ); Thu, 22 Oct 2015 05:02:44 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Appana Durga Kedareswara Rao , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-can@vger.kernel.org" , Michal Simek , Soren Brinkmann , Anirudha Sarangi , "mkl@pengutronix.de" , "wg@grandegger.com" Subject: Re: [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite Date: Thu, 22 Oct 2015 11:02:38 +0200 Message-ID: <3847286.pUBWjpC1TL@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1445489163-11045-1-git-send-email-appanad@xilinx.com> <4061693.oBld7AKBIp@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:poA95JdjVxfxEg+TzR4ZHyM8O53q7Tx/Qr++wD02eZJGarHpdx0 lVYbv6MSm9dPsRYs4YO1zHa7EeNzPqcr+Y8eLf+pZIORMvc54zfrQaJFsrgiQVPx7UBAHQB 1k1NMsWTMDBGTedkvgjF1jTXx7e2rjDkux2lbz9nb/3bRElZtDND3aHGuhF4gMIFRx+AQnO Fjhac8Yze03rhuFVX0J0Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:nUr6hP8ATek=:e1rAI1sdoaDHA0l5OATbFy epsnRwQJdULCc7mru3hY309322zkSfQQYCO2E5bVUYqJVbOheSWNeX0/Qaroj7en059h+FdCX zzP3mx3GqIsDvbURj3IrhAoiwVYwDKXJtD108pts4rlBp33GZPBLRRKFmorwF/3UBY1CCIqMU 7RHPbztIds3Efn7f/F5Gi0qFRIXFSr3EE0pYSPzrBU1C6CRZphLhDG4SnbaLGDYBFMQoAuPvJ +ljT46dUYcT8+u66YXHYrv1avWRGToZVIErOtgcaGmZ8GRIcSmiSlAA31Gr6J1ffOoNu7X4l1 v5tZKYfisU/PPwwuN+hyKX0OlCAgwmkDFVNXf7JCGNqX9MIpALKG63nx/8whtNqF1dIJJKbg5 dhplcR/NKk194zVUkEEofHkvCo7pBTdmzZgn6S9dZflr+v83I5bgya9FvZ5zOfKq9xOETuDgT kNzhGkDnZPa49KRcneIp/UT/RqcZJj4vtRr6F7nPcqTGcREJa5G4b9zbIKuIO1t3w/gS6v32q 8w9QhaGCQV2nxo7xADQx948q3voWHF3xSNTQgQTr+dTwJBKRbMP7drM7AJVfcm4x0VuRR2boM MW7646K1MtKGZQQ15Dec81BmCBQoKxbDLz6iMIUx17l0pjRNzPkO7evj6497kPDDCuw2zvpHk iEI3tG17NHpOVUlWZqsDHHujg24IelDxsJTdRS/KCrWhPvz22tsoa03YHmx4rYtpY84mpugK5 LrQ/08T5uKDfA7NU Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 22 October 2015 08:34:53 Appana Durga Kedareswara Rao wrote: > > On Thursday 22 October 2015 10:16:02 Kedareswara rao Appana wrote: > > > The driver only supports memory-mapped I/O [by ioremap()], so > > > readl/writel is actually the right thing to do, IMO. > > > During the validation of this driver or IP on ARM 64-bit processor > > > while sending lot of packets observed that the tx packet drop with > > > iowrite Putting the barriers for each tx fifo register write fixes > > > this issue Instead of barriers using writel also fixed this issue. > > > > > > Signed-off-by: Kedareswara rao Appana > > > > The two should really do the same thing: iowrite32() is just a static inline calling > > writel() on both ARM32 and ARM64. On which kernel version did you observe the > > difference? It's possible that an older version used CONFIG_GENERIC_IOMAP, > > which made this slightly more expensive. > > I observed this issue with the 4.0.0 kernel version Is it possible that you have nonstandard patches on your kernel? If so, can you send a diff against the mainline version? I don't see CONFIG_GENERIC_IOMAP in 4.0.0, and writel() definitely has the necessary barriers on arm64, the same way that iowrite() does. > > If there are barriers that you want to get rid of for performance reasons, you > > should use writel_relaxed(), but be careful to synchronize them correctly with > > regard to DMA. It should be fine in this driver, as it does not perform any DMA, > > but be aware that there is no big-endian version of > > writel_relaxed() at the moment. > > There is no DMA in CAN for this IP. Ok, good. Arnd