Skip to content

Commit ef09fa6

Browse files
hahnjopalmer-dabbelt
authored andcommitted
riscv: dts: starfive: Add JH7100 CPU topology
Add cpu-map binding to inform the kernel about the hardware topology of the CPU cores. Before this change, lstopo would report 1 core with 2 threads: Machine (7231MB total) Package L#0 NUMANode L#0 (P#0 7231MB) L2 L#0 (2048KB) + Core L#0 L1d L#0 (32KB) + L1i L#0 (32KB) + PU L#0 (P#0) L1d L#1 (32KB) + L1i L#1 (32KB) + PU L#1 (P#1) After this change, it correctly identifies two cores: Machine (7231MB total) Package L#0 NUMANode L#0 (P#0 7231MB) L2 L#0 (2048KB) L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0) L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1) Signed-off-by: Jonas Hahnfeld <[email protected]> Co-developed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent f2906aa commit ef09fa6

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

arch/riscv/boot/dts/starfive/jh7100.dtsi

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#address-cells = <1>;
1818
#size-cells = <0>;
1919

20-
cpu@0 {
20+
U74_0: cpu@0 {
2121
compatible = "sifive,u74-mc", "riscv";
2222
reg = <0>;
2323
d-cache-block-size = <64>;
@@ -42,7 +42,7 @@
4242
};
4343
};
4444

45-
cpu@1 {
45+
U74_1: cpu@1 {
4646
compatible = "sifive,u74-mc", "riscv";
4747
reg = <1>;
4848
d-cache-block-size = <64>;
@@ -66,6 +66,18 @@
6666
#interrupt-cells = <1>;
6767
};
6868
};
69+
70+
cpu-map {
71+
cluster0 {
72+
core0 {
73+
cpu = <&U74_0>;
74+
};
75+
76+
core1 {
77+
cpu = <&U74_1>;
78+
};
79+
};
80+
};
6981
};
7082

7183
osc_sys: osc_sys {

0 commit comments

Comments
 (0)