summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/mmu_context_book3s64.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2017-08-23 22:20:10 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2017-08-23 22:20:10 +1000
commit15c659ff9d5b367c886166a9854a89b72c524a68 (patch)
treed33acaf62889bf6304f6109dd69923a17ab938be /arch/powerpc/mm/mmu_context_book3s64.c
parent516fa8d0e19d854253460ea7692551e836e7e2b5 (diff)
parent1a92a80ad386a1a6e3b36d576d52a1a456394b70 (diff)
Merge branch 'fixes' into next
There's a non-trivial dependency between some commits we want to put in next and the KVM prefetch work around that went into fixes. So merge fixes into next.
Diffstat (limited to 'arch/powerpc/mm/mmu_context_book3s64.c')
-rw-r--r--arch/powerpc/mm/mmu_context_book3s64.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c
index db9d8cb0f8ee..60188f4b3ecd 100644
--- a/arch/powerpc/mm/mmu_context_book3s64.c
+++ b/arch/powerpc/mm/mmu_context_book3s64.c
@@ -124,9 +124,10 @@ static int hash__init_new_context(struct mm_struct *mm)
static int radix__init_new_context(struct mm_struct *mm)
{
unsigned long rts_field;
- int index;
+ int index, max_id;
- index = alloc_context_id(1, PRTB_ENTRIES - 1);
+ max_id = (1 << mmu_pid_bits) - 1;
+ index = alloc_context_id(mmu_base_pid, max_id);
if (index < 0)
return index;