[PATCH -V3 2/3] powerpc: Update kernel VSID range
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Thu Mar 14 00:44:02 EST 2013
Paul Mackerras <paulus at samba.org> writes:
>> BEGIN_FTR_SECTION
>> b slb_finish_load
>> END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
>> @@ -91,24 +97,19 @@ _GLOBAL(slb_miss_kernel_load_vmemmap)
>> _GLOBAL(slb_miss_kernel_load_io)
>> li r11,0
>> 6:
>> - li r9,0x1
>> /*
>> - * for 1T we shift 12 bits more. slb_finish_load_1T will do
>> - * the necessary adjustment
>> + * context = (MAX_USER_CONTEXT) + ((ea >> 60) - 0xc) + 1
>> */
>> - rldimi r10,r9,(CONTEXT_BITS + USER_ESID_BITS),0
>> + rldicl r9,r3,4,62
>> + addis r9,r9,8
>> + subi r9,r9,4
>
> If you did the context calculation earlier, before the "bne cr7,1f",
> you could save 3 more instructions.
We use r9 later as region id in
#ifdef CONFIG_SPARSEMEM_VMEMMAP
/* Check virtual memmap region. To be patches at kernel boot */
cmpldi cr0,r9,0xf
bne 1f
hence i didn't do the above suggested change.
-aneesh
More information about the Linuxppc-dev
mailing list