On Tue, 6 Mar 2018 14:49:57 +0100
Christophe LEROY [off-list ref] wrote:
Le 06/03/2018 à 14:25, Nicholas Piggin a écrit :
quoted
@@ -201,6 +206,15 @@ typedef struct {
unsigned char low_slices_psize[SLICE_ARRAY_SIZE];
unsigned char high_slices_psize[0];
unsigned long slb_addr_limit;
+# ifdef CONFIG_PPC_16K_PAGES
+ struct slice_mask mask_16k;
+# else
+ struct slice_mask mask_4k;
+# endif
Could we just call it mask_base or something like that regardless of the
standard page size ?
[...]
quoted
+#elif defined(CONFIG_PPC_8xx)
+static struct slice_mask *slice_mask_for_size(struct mm_struct *mm, int psize)
+{
+#ifdef CONFIG_PPC_16K_PAGES
+ if (psize == MMU_PAGE_16K)
+ return &mm->context.mask_16k;
+#else
+ if (psize == MMU_PAGE_4K)
+ return &mm->context.mask_4k;
+#endif
What about the following instead:
+ if (psize == mmu_virtual_size)
+ return &mm->context.mask_base;
Sure if you prefer. It should generate the same code right?
Thanks,
Nick