powertop icon indicating copy to clipboard operation
powertop copied to clipboard

Add support for RISC-V architecture

Open yeongjoshua opened this issue 1 year ago • 3 comments

Tested on VisionFive 2 Board. The cpuinfo would look like this. Adding this will add support to RISC-V chips.

image

yeongjoshua avatar May 10 '23 07:05 yeongjoshua

this patch looks good.. is there a problem with it for you to close this?

fenrus75 avatar May 10 '23 13:05 fenrus75

I saw a note where I need to submit patch through mailing list, which I still fail to understand how it works

yeongjoshua avatar May 11 '23 07:05 yeongjoshua

It's a little bit different for T-Head 1520 CPU (Lichee Pi 4A). I suggest using isa line to mark the end of processing.

sipeed@lpi4a:~$ cat /proc/cpuinfo 
processor	: 0
hart		: 0
isa		: rv64imafdcvsu
mmu		: sv39
cpu-freq	: 1.848Ghz
cpu-icache	: 64KB
cpu-dcache	: 64KB
cpu-l2cache	: 1MB
cpu-tlb		: 1024 4-ways
cpu-cacheline	: 64Bytes
cpu-vector	: 0.7.1

processor	: 1
hart		: 1
isa		: rv64imafdcvsu
mmu		: sv39
cpu-freq	: 1.848Ghz
cpu-icache	: 64KB
cpu-dcache	: 64KB
cpu-l2cache	: 1MB
cpu-tlb		: 1024 4-ways
cpu-cacheline	: 64Bytes
cpu-vector	: 0.7.1

processor	: 2
hart		: 2
isa		: rv64imafdcvsu
mmu		: sv39
cpu-freq	: 1.848Ghz
cpu-icache	: 64KB
cpu-dcache	: 64KB
cpu-l2cache	: 1MB
cpu-tlb		: 1024 4-ways
cpu-cacheline	: 64Bytes
cpu-vector	: 0.7.1

processor	: 3
hart		: 3
isa		: rv64imafdcvsu
mmu		: sv39
cpu-freq	: 1.848Ghz
cpu-icache	: 64KB
cpu-dcache	: 64KB
cpu-l2cache	: 1MB
cpu-tlb		: 1024 4-ways
cpu-cacheline	: 64Bytes
cpu-vector	: 0.7.1

renat-sabitov avatar Nov 02 '23 11:11 renat-sabitov