From: Alexander Gerasiov <gq@redlab-i.ru>
To: Nikita Edward Baruzdin <nebaruzdin@gmail.com>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH v3] can: sja1000: Optimise register accesses
Date: Thu, 8 Sep 2016 11:36:07 +0300 [thread overview]
Message-ID: <20160908113607.7b7e7ca8@brick.gerasiov.net> (raw)
In-Reply-To: <20160908080613.3997-1-nebaruzdin@gmail.com>
Hello Nikita,
On Thu, 8 Sep 2016 11:06:13 +0300
Nikita Edward Baruzdin <nebaruzdin@gmail.com> wrote:
> Since PCI bus width is at least 32 bits, using ioread32()/iowrite32()
> instead of consecutive ioread8()/iowrite8() calls seems reasonable.
>
> Thus, this patch introduces [read|write]_reg_rep() interface functions
> that are used to read/write CAN ID and payload data.
>
> * For plx_pci driver this interface is implemented as
> plx_pci_[read|write]_reg_rep() that use ioread32()/iowrite32() for
> register accesses as much as possible to improve driver
> performance.
>
> * For other drivers the default implementation,
> sja1000_[read|write]_reg_rep(), is used for now. These functions
> still access registers in a series of ioread8()/iowrite8() calls.
This looks OK for me. (I hope you didn't forget to run tests with this
variant. And with default implementation of rep functions too.)
It would be good if someone run tests with other plx_pci based adapters
(they should also work with 32 bit access via PCI, but who knows).
Tests with other sja1000 cards and on big-endian boxes are welcome too.
--
Best regards,
Alexander Gerasiov
Contacts:
e-mail: gq@cs.msu.su Homepage: http://gerasiov.net Skype: gerasiov
PGP fingerprint: 04B5 9D90 DF7C C2AB CD49 BAEA CA87 E9E8 2AAC 33F1
next prev parent reply other threads:[~2016-09-08 8:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 8:06 [PATCH v3] can: sja1000: Optimise register accesses Nikita Edward Baruzdin
2016-09-08 8:36 ` Alexander Gerasiov [this message]
2016-09-08 11:10 ` Nikita Edward Baruzdin
2016-09-08 12:07 ` Marc Kleine-Budde
2016-09-08 13:54 ` Nikita Edward Baruzdin
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=20160908113607.7b7e7ca8@brick.gerasiov.net \
--to=gq@redlab-i.ru \
--cc=linux-can@vger.kernel.org \
--cc=nebaruzdin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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