From: Leonardo Bras <leobras.c@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
brking@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 1/1] powerpc/iommu: Enable remaining IOMMU Pagesizes present in LoPAR
Date: Wed, 14 Apr 2021 01:02:16 -0300 [thread overview]
Message-ID: <fd20f4fae3d4bc1de0e62a25cead4db00bdd8dbd.camel@gmail.com> (raw)
In-Reply-To: <20210412222143.GO26583@gate.crashing.org>
On Mon, 2021-04-12 at 17:21 -0500, Segher Boessenkool wrote:
> On Fri, Apr 09, 2021 at 02:36:16PM +1000, Alexey Kardashevskiy wrote:
> > On 08/04/2021 19:04, Michael Ellerman wrote:
> > > > > > +#define QUERY_DDW_PGSIZE_4K 0x01
> > > > > > +#define QUERY_DDW_PGSIZE_64K 0x02
> > > > > > +#define QUERY_DDW_PGSIZE_16M 0x04
> > > > > > +#define QUERY_DDW_PGSIZE_32M 0x08
> > > > > > +#define QUERY_DDW_PGSIZE_64M 0x10
> > > > > > +#define QUERY_DDW_PGSIZE_128M 0x20
> > > > > > +#define QUERY_DDW_PGSIZE_256M 0x40
> > > > > > +#define QUERY_DDW_PGSIZE_16G 0x80
> > > > >
> > > > > I'm not sure the #defines really gain us much vs just putting the
> > > > > literal values in the array below?
> > > >
> > > > Then someone says "uuuuu magic values" :) I do not mind either way.
> > > > Thanks,
> > >
> > > Yeah that's true. But #defining them doesn't make them less magic, if
> > > you only use them in one place :)
> >
> > Defining them with "QUERY_DDW" in the names kinda tells where they are
> > from. Can also grep QEMU using these to see how the other side handles
> > it. Dunno.
>
> And *not* defining anything reduces the mental load a lot. You can add
> a comment at the single spot you use them, explaining what this is, in a
> much better way!
>
> Comments are *good*.
>
>
> Segher
Thanks for the feedback Alexey, Michael and Segher!
I have sent a v3 for this patch.
http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210408201915.174217-1-leobras.c@gmail.com/
Please let me know of your feedback in it.
Best regards,
Leonardo Bras
next prev parent reply other threads:[~2021-04-14 4:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 19:56 [PATCH v2 1/1] powerpc/iommu: Enable remaining IOMMU Pagesizes present in LoPAR Leonardo Bras
2021-04-08 0:22 ` kernel test robot
2021-04-08 5:37 ` Michael Ellerman
2021-04-08 6:20 ` Leonardo Bras
2021-04-08 6:35 ` Leonardo Bras
2021-04-08 9:08 ` Michael Ellerman
2021-04-08 7:13 ` Alexey Kardashevskiy
2021-04-08 9:04 ` Michael Ellerman
2021-04-09 4:36 ` Alexey Kardashevskiy
2021-04-09 4:44 ` Leonardo Bras
2021-04-12 22:21 ` Segher Boessenkool
2021-04-14 4:02 ` Leonardo Bras [this message]
2021-04-08 7:48 ` kernel test robot
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=fd20f4fae3d4bc1de0e62a25cead4db00bdd8dbd.camel@gmail.com \
--to=leobras.c@gmail.com \
--cc=aik@ozlabs.ru \
--cc=brking@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.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).