From: Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
To: Ravi Patel <rapatel-qTEPVZfXA3Y@public.gmane.org>
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
"patches-qTEPVZfXA3Y@public.gmane.org"
<patches-qTEPVZfXA3Y@public.gmane.org>,
Keyur Chudgar <kchudgar-qTEPVZfXA3Y@public.gmane.org>
Subject: Re: [PATCH 2/4] misc: xgene: Add base driver for APM X-Gene SoC Queue Manager/Traffic Manager
Date: Sat, 21 Dec 2013 16:40:23 -0800 [thread overview]
Message-ID: <20131222004023.GA15645@kroah.com> (raw)
In-Reply-To: <CAN1v_PtWrRQ6i0HAOACGP4ahgMB1393GnZS-OG6LTyPcsnpvhg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sat, Dec 21, 2013 at 04:20:04PM -0800, Ravi Patel wrote:
> On Thu, Dec 19, 2013 at 7:20 PM, Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> wrote:
> > On Thu, Dec 19, 2013 at 06:45:01PM -0800, Ravi Patel wrote:
> >> --- /dev/null
> >> +++ b/drivers/misc/xgene/qmtm/Kconfig
> >> @@ -0,0 +1,8 @@
> >> +config XGENE_QMTM
> >> + tristate "APM X-Gene QMTM driver"
> >> + depends on ARCH_XGENE
> >
> > What does it need from this arch in order to build? What would be
> > needed to get it to build on other arches so that it gets some actualy
> > build testing?
>
> In patch v2 added, depends on ARM64 || COMPILE_TEST in order to
> support build testing for other arches.
> If you think we should have no dependency at all, let us know.
That's fine, but it's pretty obvious you didn't check this as your v2
version can't build on non XGENE systems :(
> > u64 for a bitfield? Is that even valid C? This is pretty scary from a
> > bitfield perspective, what about different endian and addressing modes?
>
> Currently the patch is supporting only ARM64 LE mode.
> We will fix u64 bit-field with multiple u32 bit-fields for supporting
> ARM32 LE Mode.
Don't use bitfields, use bit shifts, that way it doesn't matter what
endian the system is that it is running on at all.
> > Any chance to just use shifts to access the fields properly, like most
> > drivers do, in a endian-neutral way to get the data out and into the
> > structures?
> >
> > Same goes for the other structures in this file.
>
> I agree with you that code with bit-mask and bit-shift takes care for
> endian-neutral mode.
> But QMTM in BE Mode, behaves differently by expecting message format
> in memory as follow:
> Swapping at 128 bits level.
> a. For each 16 bytes, group of 4 bytes needs be swapped Higher to
> lower <-> lower to higher,
> b. As well as each bytes/bit fields in the group of 4 bytes also needs
> to be swapped.
> So because of 128 bit level swap, there will be complete different
> code for bit-mask, bit-shift for BE and LE
> So to support ARM64 BE and ARM32 BE, we are planning to just
> re-arrange bit-fields reversely in the structures for BE and LE.
I'll hold off and wait to see what you create, but I think it will be
more complex than just using a bit shift...
good luck,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-12-22 0:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 2:44 [PATCH 0/4] misc: xgene: Add support for APM X-Gene SoC Queue Manager/Traffic Manager Ravi Patel
2013-12-20 2:45 ` [PATCH 1/4] Documentation: Add documentation for APM X-Gene SoC Queue Manager/Traffic Manager DTS binding Ravi Patel
2013-12-20 2:45 ` [PATCH 2/4] misc: xgene: Add base driver for APM X-Gene SoC Queue Manager/Traffic Manager Ravi Patel
[not found] ` <1387507503-7565-3-git-send-email-rapatel-qTEPVZfXA3Y@public.gmane.org>
2013-12-20 3:20 ` Greg KH
2013-12-22 0:20 ` Ravi Patel
[not found] ` <CAN1v_PtWrRQ6i0HAOACGP4ahgMB1393GnZS-OG6LTyPcsnpvhg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-22 0:40 ` Greg KH [this message]
2013-12-20 3:21 ` Greg KH
[not found] ` <CAN1v_PuBZHN85xTodfSZ-+H4Wdj0T8kSFUJB56KVj9xFH3--JQ@mail.gmail.com>
[not found] ` <CAN1v_PuBZHN85xTodfSZ-+H4Wdj0T8kSFUJB56KVj9xFH3--JQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-20 4:24 ` Greg KH
2013-12-22 0:43 ` Ravi Patel
2013-12-22 1:01 ` Greg KH
2013-12-20 2:45 ` [PATCH 3/4] arm64: boot: dts: Add DTS entries " Ravi Patel
2013-12-20 2:45 ` [PATCH 4/4] misc: xgene: Add error handling " Ravi Patel
[not found] ` <1387507503-7565-1-git-send-email-rapatel-qTEPVZfXA3Y@public.gmane.org>
2013-12-20 3:22 ` [PATCH 0/4] misc: xgene: Add support " Greg KH
[not found] ` <CAN1v_PsibDTwQ9_ZxRnBtJA46BPne6fTuS_9TddWPZt6ewwgQQ@mail.gmail.com>
[not found] ` <CAN1v_PsibDTwQ9_ZxRnBtJA46BPne6fTuS_9TddWPZt6ewwgQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-20 3:40 ` Greg KH
2013-12-20 17:46 ` Ben Hutchings
2013-12-20 19:00 ` Greg KH
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=20131222004023.GA15645@kroah.com \
--to=gregkh-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kchudgar-qTEPVZfXA3Y@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=patches-qTEPVZfXA3Y@public.gmane.org \
--cc=rapatel-qTEPVZfXA3Y@public.gmane.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).