public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: linux-arm-kernel@lists•infradead.org
Cc: Appana Durga Kedareswara Rao <appana.durga.rao@xilinx•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"linux-can@vger•kernel.org" <linux-can@vger•kernel.org>,
	Michal Simek <michals@xilinx•com>,
	Soren Brinkmann <sorenb@xilinx•com>,
	Anirudha Sarangi <anirudh@xilinx•com>,
	"mkl@pengutronix•de" <mkl@pengutronix•de>,
	"wg@grandegger•com" <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	[thread overview]
Message-ID: <3847286.pUBWjpC1TL@wuerfel> (raw)
In-Reply-To: <C246CAC1457055469EF09E3A7AC4E11A4A4F2CDB@XAP-PVEXMBX01.xlnx.xilinx.com>

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 <appanad@xilinx•com>
> > 
> > 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

  reply	other threads:[~2015-10-22  9:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22  4:46 [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite Kedareswara rao Appana
2015-10-22  4:46 ` [PATCH 2/2] can: xilinx: fix bug in bus error handling Kedareswara rao Appana
2015-10-22  4:46 ` Kedareswara rao Appana
2015-10-22  4:46 ` Kedareswara rao Appana
2015-10-22  8:14 ` [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite Arnd Bergmann
2015-10-22  8:21   ` Marc Kleine-Budde
2015-10-22  8:39     ` Appana Durga Kedareswara Rao
2015-10-22  8:58     ` Arnd Bergmann
2015-10-25 20:32       ` Marc Kleine-Budde
2015-10-26  1:25         ` Arnd Bergmann
2015-10-22  8:34   ` Appana Durga Kedareswara Rao
2015-10-22  9:02     ` Arnd Bergmann [this message]
2015-10-22  9:49       ` Michal Simek
     [not found] ` <1445489163-11045-2-git-send-email-appanad@xilinx.com>
2015-10-22 16:33   ` [PATCH 2/2] can: xilinx: fix bug in bus error handling Sören Brinkmann
2015-10-23  5:21     ` Appana Durga Kedareswara Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3847286.pUBWjpC1TL@wuerfel \
    --to=arnd@arndb$(echo .)de \
    --cc=anirudh@xilinx$(echo .)com \
    --cc=appana.durga.rao@xilinx$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-can@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=michals@xilinx$(echo .)com \
    --cc=mkl@pengutronix$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sorenb@xilinx$(echo .)com \
    --cc=wg@grandegger$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox