Skip to content

Commit eabfbd9

Browse files
Merge branch 'riscv-cpu_map_topo' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git into for-next
RISC-V: Add cpu-map topology information nodes It was reported to me that the Hive Unmatched incorrectly reports its topology to hwloc, but the StarFive VisionFive did in [0] & a subsequent off-list email from Brice (the hwloc maintainer). This turned out not to be entirely true, the /downstream/ version of the VisionFive does work correctly but not upstream, as the downstream devicetree has a cpu-map node that was added recently. This series adds a cpu-map node to all upstream devicetrees, which I have tested on mpfs & fu540. The first patch is lifted directly from the downstream StarFive devicetree. 0: open-mpi/hwloc#536 Link: https://lore.kernel.org/linux-riscv/[email protected]/ [Palmer: except the Microchip DT, that went in via the previous PR.] * 'riscv-cpu_map_topo' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git: riscv: dts: canaan: Add k210 topology information riscv: dts: sifive: Add fu740 topology information riscv: dts: sifive: Add fu540 topology information riscv: dts: starfive: Add JH7100 CPU topology
2 parents a8914b6 + d9d193d commit eabfbd9

File tree

4 files changed

+74
-2
lines changed

4 files changed

+74
-2
lines changed

arch/riscv/boot/dts/canaan/k210.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@
6565
compatible = "riscv,cpu-intc";
6666
};
6767
};
68+
69+
cpu-map {
70+
cluster0 {
71+
core0 {
72+
cpu = <&cpu0>;
73+
};
74+
75+
core1 {
76+
cpu = <&cpu1>;
77+
};
78+
};
79+
};
6880
};
6981

7082
sram: memory@80000000 {

arch/riscv/boot/dts/sifive/fu540-c000.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,30 @@
133133
interrupt-controller;
134134
};
135135
};
136+
137+
cpu-map {
138+
cluster0 {
139+
core0 {
140+
cpu = <&cpu0>;
141+
};
142+
143+
core1 {
144+
cpu = <&cpu1>;
145+
};
146+
147+
core2 {
148+
cpu = <&cpu2>;
149+
};
150+
151+
core3 {
152+
cpu = <&cpu3>;
153+
};
154+
155+
core4 {
156+
cpu = <&cpu4>;
157+
};
158+
};
159+
};
136160
};
137161
soc {
138162
#address-cells = <2>;

arch/riscv/boot/dts/sifive/fu740-c000.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,30 @@
134134
interrupt-controller;
135135
};
136136
};
137+
138+
cpu-map {
139+
cluster0 {
140+
core0 {
141+
cpu = <&cpu0>;
142+
};
143+
144+
core1 {
145+
cpu = <&cpu1>;
146+
};
147+
148+
core2 {
149+
cpu = <&cpu2>;
150+
};
151+
152+
core3 {
153+
cpu = <&cpu3>;
154+
};
155+
156+
core4 {
157+
cpu = <&cpu4>;
158+
};
159+
};
160+
};
137161
};
138162
soc {
139163
#address-cells = <2>;

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)