Commit 4294fd7
Describe "fail" status for /cpus/cpu* nodes
There are situations where it is desirable to use the same base Device
Tree for devices with a different number of CPUs: There may be CPU
variants with different numbers of cores that can be used interchangably
on the same mainboard, or there are multiple CPU sockets. Not needing to
explicitly build a device tree for each such variant can make
maintenance significantly easier.
For this to work, a system firmware / bootloader needs to adjust the
Device Tree by removing or disabling the excess CPU nodes. However, this
is currently not easily possible due to the special meaning of the
"disabled" status for CPU nodes:
- A "disabled" CPU node is interpreted as inactive, but existent. The
Linux kernel will attempt to enable such CPUs on boot, which will
obviously fail for non-existent CPUs
- Removing the CPU node altogether from a Device Tree is much more
complex than setting a single property, as it may leave dangling
phandle references, often requiring specific knowledge of other nodes'
structure to deal with them.
In the discussion [1] it was suggested to introduce a new status value
for CPUs that should really not be used at all. Rob proposed to use the
value "fail", which already exists in the generic definitions of the
status property.
[1] https://www.lkml.org/lkml/2020/8/26/1237
Suggested-by: Rob Herring <[email protected]>
Signed-off-by: Matthias Schiffer <[email protected]>
Signed-off-by: Rob Herring <[email protected]>1 parent 13a1a82 commit 4294fd7
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
618 | | - | |
| 617 | + | |
| 618 | + | |
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
626 | 629 | | |
627 | 630 | | |
628 | 631 | | |
| |||
639 | 642 | | |
640 | 643 | | |
641 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
642 | 650 | | |
643 | 651 | | |
644 | 652 | | |
| |||
0 commit comments