Page MenuHomeFreeBSD

D44913.diff
No OneTemporary

D44913.diff

diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c
--- a/sys/dev/psci/psci.c
+++ b/sys/dev/psci/psci.c
@@ -378,12 +378,18 @@
{
phandle_t node;
- node = ofw_bus_find_compatible(OF_peer(0), "arm,psci-0.2");
- if (node == 0) {
- node = ofw_bus_find_compatible(OF_peer(0), "arm,psci-1.0");
- if (node == 0)
- return (PSCI_MISSING);
+ /* XXX: This is suboptimal, we should walk the tree & check each
+ * node against compat_data, but we only have a few entries so
+ * it's ok for now.
+ */
+ for (int i = 0; compat_data[i].ocd_str != NULL; i++) {
+ node = ofw_bus_find_compatible(OF_peer(0),
+ compat_data[i].ocd_str);
+ if (node != 0)
+ break;
}
+ if (node == 0)
+ return (PSCI_MISSING);
if (!ofw_bus_node_status_okay(node))
return (PSCI_MISSING);

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 21, 3:15 PM (1 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25772639
Default Alt Text
D44913.diff (780 B)

Event Timeline