mbox series

[0/5] MIPS: Fix kernel in XKPHYS

Message ID 20231023191400.170052-1-jiaxun.yang@flygoat.com (mailing list archive)
Headers show
Series MIPS: Fix kernel in XKPHYS | expand

Message

Jiaxun Yang Oct. 23, 2023, 7:13 p.m. UTC
Hi all,

This series fixes support for loading kernel to XKPHYS space.
It is derived from "MIPS: use virtual addresses from xkphys for MIPS64" [1].

Boot tested on boston and QEMU with loading address set to 0xa800000090000000.
QEMU patch on the way.

Gregory and Vladimir, do let me know if I missed anything.

Thanks
- Jiaxun

[1]: https://lore.kernel.org/lkml/20231004161038.2818327-3-gregory.clement@bootlin.com/

Jiaxun Yang (5):
  MIPS: Export higher/highest relocation functions in uasm
  MIPS: genex: Fix except_vec_vi for kernel in XKPHYS
  MIPS: Fix set_uncached_handler for ebase in XKPHYS
  MIPS: Handle mips_cps_core_entry within lower 4G
  MIPS: Allow kernel base to be set from Kconfig for all platforms

 arch/mips/Kconfig               | 18 +++++++++++++----
 arch/mips/include/asm/mips-cm.h |  1 +
 arch/mips/include/asm/uasm.h    |  2 ++
 arch/mips/kernel/genex.S        | 19 +++++++++++++----
 arch/mips/kernel/smp-cps.c      | 27 +++++++++++++++++++------
 arch/mips/kernel/traps.c        | 36 +++++++++++++++++++++++----------
 arch/mips/mm/uasm.c             |  6 ++++--
 7 files changed, 82 insertions(+), 27 deletions(-)

Comments

Florian Fainelli Oct. 25, 2023, 6:09 p.m. UTC | #1
On 10/23/23 12:13, Jiaxun Yang wrote:
> Hi all,
> 
> This series fixes support for loading kernel to XKPHYS space.
> It is derived from "MIPS: use virtual addresses from xkphys for MIPS64" [1].
> 
> Boot tested on boston and QEMU with loading address set to 0xa800000090000000.
> QEMU patch on the way.
> 
> Gregory and Vladimir, do let me know if I missed anything.
> 
> Thanks
> - Jiaxun
> 
> [1]: https://lore.kernel.org/lkml/20231004161038.2818327-3-gregory.clement@bootlin.com/

FWIW, tested on a Cobalt Qube 2 (RM5231):

Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Jiaxun Yang Oct. 27, 2023, 8:47 p.m. UTC | #2
在2023年10月27日十月 下午5:35,Gregory CLEMENT写道:
> Hello Jiaxun,
>
>
>> Hi all,
>>
>> This series fixes support for loading kernel to XKPHYS space.
>> It is derived from "MIPS: use virtual addresses from xkphys for MIPS64" [1].
>>
>> Boot tested on boston and QEMU with loading address set to 0xa800000090000000.
>> QEMU patch on the way.
>>
>> Gregory and Vladimir, do let me know if I missed anything.
>
> Thanks for this series, I reviewed it and tested it on my platform, so
> you can add for all the patches:
>
> Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
> Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
>
> However I add to fix the patch " MIPS: Handle mips_cps_core_entry within
> lower 4G", I think you missed a case. I will comment on it.

I found a better solution for CPS handling, will send v2 later together with
fixes to bring TO_CAC to 32bit.

Thanks.
- Jiaxun

>
> Gregory
>
>
>>
>> Thanks
>> - Jiaxun
>>
>> [1]: https://lore.kernel.org/lkml/20231004161038.2818327-3-gregory.clement@bootlin.com/
>>
>> Jiaxun Yang (5):
>>   MIPS: Export higher/highest relocation functions in uasm
>>   MIPS: genex: Fix except_vec_vi for kernel in XKPHYS
>>   MIPS: Fix set_uncached_handler for ebase in XKPHYS
>>   MIPS: Handle mips_cps_core_entry within lower 4G
>>   MIPS: Allow kernel base to be set from Kconfig for all platforms
>>
>>  arch/mips/Kconfig               | 18 +++++++++++++----
>>  arch/mips/include/asm/mips-cm.h |  1 +
>>  arch/mips/include/asm/uasm.h    |  2 ++
>>  arch/mips/kernel/genex.S        | 19 +++++++++++++----
>>  arch/mips/kernel/smp-cps.c      | 27 +++++++++++++++++++------
>>  arch/mips/kernel/traps.c        | 36 +++++++++++++++++++++++----------
>>  arch/mips/mm/uasm.c             |  6 ++++--
>>  7 files changed, 82 insertions(+), 27 deletions(-)
>>
>> -- 
>> 2.34.1
>>
>
> -- 
> Gregory Clement, Bootlin
> Embedded Linux and Kernel engineering
> http://bootlin.com