[v2] ppc64/book3s: fix branching to out of line handlers in relocation kernel
Hari Bathini
hbathini at linux.vnet.ibm.com
Thu Mar 31 03:57:58 AEDT 2016
On 03/30/2016 04:47 PM, Michael Ellerman wrote:
> On Wed, 2016-03-30 at 13:14 +0530, Hari Bathini wrote:
>> Alternatively, how about moving the OOLs handlers that can't be branched with
>> LOAD_HANDLER under __end_interrupts. This way we won't be copying more than a
>> few absolutely needed handlers.
>>
>> STD_RELON_EXCEPTION_HV_OOL(0xe40, emulation_assist)
>> .
>> .
>> STD_RELON_EXCEPTION_HV_OOL(0xf80, hv_facility_unavailable)
>>
>>
>> We can leave __end_handlers marker to indicate code that should be part
>> of the first 64K of kernel image.
> That might work. But I suspect you will run into issues with ".org backwards",
> ie. running out of space in head_64.S
>
> But try it and let me know if it works.
It worked. Doing some sanity testing.
Will post v3 soon with this approach.
> I think we also need to write a script or little C program which looks at the
> vmlinux and checks that nothing below __end_whatever does a direct branch. So
> that we don't break it again in future.
Yep. That would make life easy..
Let me see if I can do something about it.
Thanks
Hari
More information about the Linuxppc-dev
mailing list