You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
powerpc/mm: Increase the slice range to 64TB
This patch makes the high psizes mask as an unsigned char array so that we can have more than 16TB. Currently we support upto 64TB Reviewed-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
67550080b8
commit
7aa0727f33
@@ -803,16 +803,19 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap)
|
||||
#ifdef CONFIG_PPC_MM_SLICES
|
||||
unsigned int get_paca_psize(unsigned long addr)
|
||||
{
|
||||
unsigned long index, slices;
|
||||
u64 lpsizes;
|
||||
unsigned char *hpsizes;
|
||||
unsigned long index, mask_index;
|
||||
|
||||
if (addr < SLICE_LOW_TOP) {
|
||||
slices = get_paca()->context.low_slices_psize;
|
||||
lpsizes = get_paca()->context.low_slices_psize;
|
||||
index = GET_LOW_SLICE_INDEX(addr);
|
||||
} else {
|
||||
slices = get_paca()->context.high_slices_psize;
|
||||
index = GET_HIGH_SLICE_INDEX(addr);
|
||||
return (lpsizes >> (index * 4)) & 0xF;
|
||||
}
|
||||
return (slices >> (index * 4)) & 0xF;
|
||||
hpsizes = get_paca()->context.high_slices_psize;
|
||||
index = GET_HIGH_SLICE_INDEX(addr);
|
||||
mask_index = index & 0x1;
|
||||
return (hpsizes[index >> 1] >> (mask_index * 4)) & 0xF;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user