mbox series

[v2,0/3] CPUCFG emulation future-proofing & HWCAP addition

Message ID 20200530073243.16411-1-git@xen0n.name (mailing list archive)
Headers show
Series CPUCFG emulation future-proofing & HWCAP addition | expand

Message

WANG Xuerui May 30, 2020, 7:32 a.m. UTC
This patch series future-proofs the CPUCFG emulation, in light of
possibility of new Loongson cores still lacking native CPUCFG.
Also an HWCAP flag bit is allocated and exposed for userspace's probing
convenience, per the earlier plan shared on the mailing list.

Tested on Loongson-3A3000 and Loongson-3A4000. Compile-tested with
64r2_defconfig.

v2:
- unconditionally bump PERF_COUNT_SW_EMULATION_FAULTS even on
  unsupported core models
- reordered model match arms per Huacai's review
- tweaked commit message of 2nd patch

WANG Xuerui (3):
  MIPS: Loongson64: Guard against future cores without CPUCFG
  MIPS: Expose Loongson CPUCFG availability via HWCAP
  MIPS: Loongson64: Reorder CPUCFG model match arms

 .../include/asm/mach-loongson64/cpucfg-emul.h | 11 +++
 arch/mips/include/uapi/asm/hwcap.h            |  1 +
 arch/mips/kernel/traps.c                      |  4 ++
 arch/mips/loongson64/cpucfg-emul.c            | 70 +++++++++++--------
 4 files changed, 56 insertions(+), 30 deletions(-)

Comments

Thomas Bogendoerfer May 31, 2020, 9:36 a.m. UTC | #1
On Sat, May 30, 2020 at 03:32:40PM +0800, WANG Xuerui wrote:
> This patch series future-proofs the CPUCFG emulation, in light of
> possibility of new Loongson cores still lacking native CPUCFG.
> Also an HWCAP flag bit is allocated and exposed for userspace's probing
> convenience, per the earlier plan shared on the mailing list.
> 
> Tested on Loongson-3A3000 and Loongson-3A4000. Compile-tested with
> 64r2_defconfig.
> 
> v2:
> - unconditionally bump PERF_COUNT_SW_EMULATION_FAULTS even on
>   unsupported core models
> - reordered model match arms per Huacai's review
> - tweaked commit message of 2nd patch
> 
> WANG Xuerui (3):
>   MIPS: Loongson64: Guard against future cores without CPUCFG
>   MIPS: Expose Loongson CPUCFG availability via HWCAP
>   MIPS: Loongson64: Reorder CPUCFG model match arms
> 
>  .../include/asm/mach-loongson64/cpucfg-emul.h | 11 +++
>  arch/mips/include/uapi/asm/hwcap.h            |  1 +
>  arch/mips/kernel/traps.c                      |  4 ++
>  arch/mips/loongson64/cpucfg-emul.c            | 70 +++++++++++--------
>  4 files changed, 56 insertions(+), 30 deletions(-)

series applied to mips-next.

Thomas.