Skip to content

add support for 3A5000/loongarch64

Wu Xiaotian requested to merge yetist/libxfce4ui:dev-loongarch64 into master

This MR fixes the xfce4-about issue on loongarch64.

LoongArch is a new instruction set architecture (ISA) from China, and 3A5000 is the first CPU to use the ISA. For more information, please visit: https://loongson.github.io/LoongArch-Documentation/README-EN.html

On the 3A5000 machine,

$ uname -m
loongarch64
$ cat /proc/cpuinfo 
system type		: generic-loongson-machine

processor		: 0
package			: 0
core			: 0
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A5000
CPU Revision		: 0x10
FPU Revision		: 0x00
CPU MHz			: 1600.00
BogoMIPS		: 3200.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx complex crypto lvz
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 8

processor		: 1
package			: 0
core			: 1
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A5000
CPU Revision		: 0x10
FPU Revision		: 0x00
CPU MHz			: 1600.00
BogoMIPS		: 3200.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx complex crypto lvz
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 8

processor		: 2
package			: 0
core			: 2
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A5000
CPU Revision		: 0x10
FPU Revision		: 0x00
CPU MHz			: 1600.00
BogoMIPS		: 3200.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx complex crypto lvz
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 8

processor		: 3
package			: 0
core			: 3
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A5000
CPU Revision		: 0x10
FPU Revision		: 0x00
CPU MHz			: 1600.00
BogoMIPS		: 3200.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx complex crypto lvz
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 8

The current xfce4-about code does not recognize the cpu information and will display empty as the following:

before

After applying this patch, the problem can be fixed, xfce4-about shows as:

after

Please review this patch, thanks.

Merge request reports