powerpc/mm/slice: Enhance for supporting PPC32
authorChristophe Leroy <christophe.leroy@c-s.fr>
Thu, 22 Feb 2018 14:27:24 +0000 (15:27 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Mar 2018 22:21:23 +0000 (09:21 +1100)
commitdb3a528db41caaa6dfd4c64e9f5efb1c81a80467
tree217c7aa6a24cb3d4b0900866090050aa3fdb8b0a
parenta3286f05bc5a5bc7fc73a9783ec89de78fcd07f8
powerpc/mm/slice: Enhance for supporting PPC32

In preparation for the following patch which will fix an issue on
the 8xx by re-using the 'slices', this patch enhances the
'slices' implementation to support 32 bits CPUs.

On PPC32, the address space is limited to 4Gbytes, hence only the low
slices will be used.

The high slices use bitmaps. As bitmap functions are not prepared to
handle bitmaps of size 0, this patch ensures that bitmap functions
are called only when SLICE_NUM_HIGH is not nul.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/nohash/32/slice.h [new file with mode: 0644]
arch/powerpc/include/asm/slice.h
arch/powerpc/mm/slice.c