From: Balbir Singh <bsingharora@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/mm: use _raw variant of page table accessors
Date: Mon, 6 Jun 2016 15:33:45 +1000 [thread overview]
Message-ID: <f07f14bc-ab84-a211-e708-589337b23e13@gmail.com> (raw)
In-Reply-To: <1465165853.4274.22.camel@kernel.crashing.org>
On 06/06/16 08:30, Benjamin Herrenschmidt wrote:
> On Fri, 2016-06-03 at 15:34 +1000, Balbir Singh wrote:
>>
>> Can we just save the cpu_to_be64(_PAGE_PTE) as _BE64_PAGE_PTE constant
>> in big-endian (pgtable-be-types.h) and similar for other things. I know its
>> not the best option, but we don't really expect these bits to change often or anymore
>>
> How does that help ? The compiler solves it at compile time either
> way, I'm not sure adding yet another constant will improve
> readability here.
>
I think your right, but having those constants will prevent people from converting from
be64 to cpu, then or'ing and converting back. As long as programmers stick to pxx_raw()
for manipulation we should be in good shape. I was hoping the BE constants would do that,
but its just a matter of discipline
Balbir
prev parent reply other threads:[~2016-06-06 5:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 10:59 [PATCH] powerpc/mm: use _raw variant of page table accessors Aneesh Kumar K.V
2016-06-01 22:13 ` Ram Pai
2016-06-02 7:44 ` Michael Ellerman
2016-06-03 5:34 ` Balbir Singh
2016-06-05 22:30 ` Benjamin Herrenschmidt
2016-06-06 5:33 ` Balbir Singh [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=f07f14bc-ab84-a211-e708-589337b23e13@gmail.com \
--to=bsingharora@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.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).