Re: [PATCH] powerpc/mm: use _raw variant of page table accessors

From
Balbir Singh <bsingharora@gmail.com>
Date
2016-06-06 05:33:55
Reply to
Benjamin Herrenschmidt, 2016-06-05

On 06/06/16 08:30, Benjamin Herrenschmidt wrote:
On Fri, 2016-06-03 at 15:34 +1000, Balbir Singh wrote:
quoted
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
Thread (6 messages) 6 messages, 5 authors, last reply 2016-06-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help