Thread (31 messages) flat view 31 messages, 3 authors, 2018-03-20

Re: [PATCH 07/10] powerpc/mm/slice: Switch to 3-operand slice bitops helpers

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2018-03-06 23:19:26

On Tue, 6 Mar 2018 15:44:46 +0100
Christophe LEROY [off-list ref] wrote:
Le 06/03/2018 à 14:25, Nicholas Piggin a écrit :
quoted
This converts the slice_mask bit operation helpers to be the usual
3-operand kind, which is clearer to work with.  
What's the real benefit of doing that ?
One or two places where we want to combine 2 const input bitmaps
and can avoid the extra copy in the next patch.

E.g., slice_or_mask(&good_mask, maskp, compat_maskp);
It is helps for a subsequent patch, say it.
Fair point, I'll add to the changelog.
quoted
@@ -433,25 +433,33 @@ static unsigned long slice_find_area(struct mm_struct *mm, unsigned long len,
  		return slice_find_area_bottomup(mm, len, mask, psize, high_limit);
  }
  
-static inline void slice_or_mask(struct slice_mask *dst,
+static inline void slice_copy_mask(struct slice_mask *dst,
  					const struct slice_mask *src)  
This new function is not used, the compiler while probably not be happy.
I think it doesn't get so grumpy with inlines (otherwise we'd have a lot
of problems of headers). Usually I think the new function should go into
the patch where it's first used, but this being a self contained helper,
I thought it fit better to add here. Maybe I'm wrong, I can move it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help