From: Cristian Marussi <cristian.marussi@arm.com>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
sudeep.holla@arm.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 2/2] mailbox: arm_mhuv3: Add driver
Date: Fri, 12 Apr 2024 18:01:02 +0100 [thread overview]
Message-ID: <Zhlozklecy0Jr1Uh@pluto> (raw)
In-Reply-To: <ZhPJlHDMzejX_W4i@pluto>
On Mon, Apr 08, 2024 at 11:40:24AM +0100, Cristian Marussi wrote:
> On Sun, Apr 07, 2024 at 08:14:23PM -0500, Jassi Brar wrote:
> > On Thu, Apr 4, 2024 at 1:25 AM Cristian Marussi
> > <cristian.marussi@arm.com> wrote:
> > >
> > > Add support for ARM MHUv3 mailbox controller.
> > >
> > > Support is limited to the MHUv3 Doorbell extension using only the PBX/MBX
> > > combined interrupts.
> > >
>
> Hi Jassi,
>
> thanks for having a look at this !
>
[snip]
> > > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
> > > ---
> > > +struct aidr {
> > > + u32 arch_minor_rev : 4;
> > > + u32 arch_major_rev : 4;
> > > + u32 pad : 24;
> > > +} __packed;
> > > +
> > I am not sure about using bitfields on register values. I know v2
> > driver also uses bitfields but this still is not very portable and is
> > dependent on compiler behaviour. We may actually save some loc by not
> > having unused fields if we use shifts and masks. Though I don't
> > strongly feel either way.
> >
>
> Yes, indeed seemed a bit odd way of handling regs when I saw it in mhuv2,
> BUT it seemed it had its advantages in terms of clarity of usage....did
> not know about possible drawbacks, though. I'll re-think about the pros
> and cons of this approach.
>
..replying to myself here...I am dropping bitfields too in favour of
bitmasks...I've read too many horror stories this afternoon about bitfields
and compilers interactions and their flaky usage while handling reg maps to
still feel comfortable using them...
Thanks,
Cristian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2024-04-12 17:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 6:23 [PATCH v3 0/2] Add initial ARM MHUv3 mailbox support Cristian Marussi
2024-04-04 6:23 ` [PATCH v3 1/2] dt-bindings: mailbox: arm,mhuv3: Add bindings Cristian Marussi
2024-04-04 6:30 ` Krzysztof Kozlowski
2024-04-04 6:54 ` Cristian Marussi
2024-04-07 23:38 ` Jassi Brar
2024-04-08 11:09 ` Cristian Marussi
2024-04-09 7:44 ` Krzysztof Kozlowski
2024-04-04 6:23 ` [PATCH v3 2/2] mailbox: arm_mhuv3: Add driver Cristian Marussi
2024-04-05 10:32 ` Jonathan Cameron
2024-04-08 10:08 ` Cristian Marussi
2024-04-08 1:14 ` Jassi Brar
2024-04-08 10:40 ` Cristian Marussi
2024-04-12 17:01 ` Cristian Marussi [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=Zhlozklecy0Jr1Uh@pluto \
--to=cristian.marussi@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jassisinghbrar@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sudeep.holla@arm.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;
as well as URLs for NNTP newsgroup(s).