From: Shannon Nelson <shannon.nelson@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, sparclinux@vger.kernel.org,
Michael Chan <michael.chan@broadcom.com>
Subject: Re: [PATCH net-next] bnxt: add dma mapping attributes
Date: Tue, 9 May 2017 18:17:05 -0700 [thread overview]
Message-ID: <9dde0a3e-6f87-6571-afe3-9aa36635a874@oracle.com> (raw)
In-Reply-To: <20170509.204937.115947896476049334.davem@davemloft.net>
On 5/9/2017 5:49 PM, David Miller wrote:
> From: Shannon Nelson <shannon.nelson@oracle.com>
> Date: Tue, 9 May 2017 13:37:33 -0700
>
>> @@ -66,6 +66,12 @@
>> MODULE_DESCRIPTION("Broadcom BCM573xx network driver");
>> MODULE_VERSION(DRV_MODULE_VERSION);
>>
>> +#ifdef CONFIG_SPARC
>> +#define BNXT_DMA_ATTRS DMA_ATTR_WEAK_ORDERING
>> +#else
>> +#define BNXT_DMA_ATTRS 0
>> +#endif
>> +
>
> I do not what this ifdef crap showing up in every driver just
> to improve performance on one platform.
>
> This needs to be generically done somehow in a way that
> drivers get the correct setting automatically and without
> ifdef checks.
>
Yes, these do get ugly, and as Michael pointed out this really is an
advisory bit and should just be ignored by platforms that don't care.
I'll just respin this using the DMA_ATTR_WEAK_ORDERING bit directly
rather than obscuring it with a BNXT define.
sln
prev parent reply other threads:[~2017-05-10 1:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 20:37 [PATCH net-next] bnxt: add dma mapping attributes Shannon Nelson
2017-05-09 21:05 ` Michael Chan
2017-05-09 22:54 ` Shannon Nelson
2017-05-10 0:49 ` David Miller
2017-05-10 1:17 ` Shannon Nelson [this message]
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=9dde0a3e-6f87-6571-afe3-9aa36635a874@oracle.com \
--to=shannon.nelson@oracle.com \
--cc=davem@davemloft.net \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=sparclinux@vger.kernel.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