From: oss@buserror.net (Scott Wood)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 4/7] soc/qman: add helper functions needed by caam/qi driver
Date: Thu, 16 Mar 2017 15:39:23 -0500 [thread overview]
Message-ID: <1489696763.2944.42.camel@buserror.net> (raw)
In-Reply-To: <1488552733-20806-5-git-send-email-horia.geanta@nxp.com>
On Fri, 2017-03-03 at 16:52 +0200, Horia Geant? wrote:
> Add helper functions, macros, #defines for accessing / enabling
> qman functionality from caam/qi driver, such that this driver
> is not aware of the need for data conversion to big endian.
Why? ?I complained about that (probably internally) when this driver was
originally submitted.
Having a bunch of accessors in a header file that just do an assignment with
an endian conversion just obfuscates things. ?The driver still needs to know
that the conversion needs to happen, or else it wouldn't know that the fields
can't be accessed directly... and it gets particularly ridiculous when a
single field has a growing pile of accessors depending on exactly what flags
you want to set (e.g. qm_sg_entry_set_*). ?Just open-code it unless an
accessor is justified by the call sites getting unwieldy or numerous.
It looks like GCC 6 has added an attribute (scalar_storage_order) that could
be used on structs to avoid having to manually swap such things. ?I look
forward to the day when GCC 6 is old enough for the kernel to depend on this.
-Scott
next prev parent reply other threads:[~2017-03-16 20:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 14:52 [RFC 0/7] crypto: caam - add Queue Interface (QI) support Horia Geantă
2017-03-03 14:52 ` [RFC 1/7] soc/qman: export volatile dequeue related structs Horia Geantă
2017-03-03 14:52 ` [RFC 2/7] soc/qman: add dedicated channel ID for CAAM Horia Geantă
2017-03-03 14:52 ` [RFC 3/7] soc/qman: export non-programmable FQD fields query Horia Geantă
2017-03-03 14:52 ` [RFC 4/7] soc/qman: add helper functions needed by caam/qi driver Horia Geantă
2017-03-16 20:39 ` Scott Wood [this message]
2017-03-03 14:52 ` [RFC 5/7] crypto: caam - avoid double inclusion in desc_constr.h Horia Geantă
2017-03-03 14:52 ` [RFC 6/7] crypto: caam - add Queue Interface (QI) backend support Horia Geantă
2017-03-03 14:52 ` [RFC 7/7] crypto: caam/qi - add ablkcipher and authenc algorithms Horia Geantă
2017-03-16 8:42 ` [RFC 0/7] crypto: caam - add Queue Interface (QI) support Herbert Xu
2017-03-16 14:13 ` Horia Geantă
2017-03-16 20:49 ` Scott Wood
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=1489696763.2944.42.camel@buserror.net \
--to=oss@buserror.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;
as well as URLs for NNTP newsgroup(s).