]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/mm/hash: Use context ids 1-4 for the kernel
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 29 Mar 2017 12:10:22 +0000 (23:10 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 31 Mar 2017 12:09:59 +0000 (23:09 +1100)
commit941711a3a049abc012be0eb8856ff6eec40a4570
tree66c898b97f9e8d9e7fbc11a3a12a79c3a96999a7
parent760573c1a98cce20b9306f3922d460e58b4ba656
powerpc/mm/hash: Use context ids 1-4 for the kernel

Currently we use the top 4 context ids (0x7fffc-0x7ffff) for the kernel.
Kernel VSIDs are built using these top context values and effective the
segement ID. In subsequent patches we want to increase the max effective
address to 512TB. We will achieve that by increasing the effective
segment IDs there by increasing virtual address range.

We will be switching to a 68bit virtual address in the following patch.
But platforms like Power4 and Power5 only support a 65 bit virtual
address. We will handle that by limiting the context bits to 16 instead
of 19 on those platforms. That means the max context id will have a
different value on different platforms.

So that we don't have to deal with the kernel context ids changing
between different platforms, move the kernel context ids down to use
context ids 1-4.

We can't use segment 0 of context-id 0, because that maps to VSID 0,
which we want to keep as invalid, so we avoid context-id 0 entirely.
Similarly we can't use the last segment of the maximum context, so we
avoid it too.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
[mpe: Switch from 0-3 to 1-4 so VSID=0 remains invalid]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/mmu-hash.h
arch/powerpc/mm/mmu_context_book3s64.c
arch/powerpc/mm/slb_low.S