From: davem@davemloft.net (David Miller)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next v3 2/2] net: Adding support for Cavium ThunderX network controller
Date: Mon, 18 May 2015 16:09:31 -0400 (EDT) [thread overview]
Message-ID: <20150518.160931.2235555994068443513.davem@davemloft.net> (raw)
In-Reply-To: <1431747401-20847-3-git-send-email-aleksey.makarov@auriga.com>
From: Aleksey Makarov <aleksey.makarov@auriga.com>
Date: Fri, 15 May 2015 20:36:39 -0700
> +/* Register read/write APIs */
> +static void nic_reg_write(struct nicpf *nic, u64 offset, u64 val)
> +{
> + writeq_relaxed(val, nic->reg_base + offset);
> +}
> +
> +static u64 nic_reg_read(struct nicpf *nic, u64 offset)
> +{
> + return readq_relaxed(nic->reg_base + offset);
> +}
Are you really sure it's OK to used relaxed ordering for all register
accesses like this?
Personally, I think it's asking for trouble.
Maybe in _extremely_ specific situations in the packet processing
fast path where you can clearly define the ordering needs when
programming the mailbox registers, I'd say it's OK.
But universally across the entire driver? No way, no way at all.
next prev parent reply other threads:[~2015-05-18 20:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1431747401-20847-1-git-send-email-aleksey.makarov@auriga.com>
[not found] ` <1431747401-20847-3-git-send-email-aleksey.makarov@auriga.com>
2015-05-18 8:46 ` [PATCH net-next v3 2/2] net: Adding support for Cavium ThunderX network controller Paul Bolle
2015-05-18 20:09 ` David Miller [this message]
2015-05-18 21:52 ` David Daney
2015-05-18 23:52 ` David Miller
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=20150518.160931.2235555994068443513.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
/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