aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/vio.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-10-03 21:08:11 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-03 21:08:11 -0700
commit07607c5492f836923c2ab9eb1cd1d39be7dace49 (patch)
tree9fe2ba73b293afe2530c7172487b84ff8027aade /arch/sparc64/kernel/vio.c
parent[SPARC64]: Don't use in/local regs for ldx/stx data in N1 memcpy. (diff)
downloadlinux-dev-07607c5492f836923c2ab9eb1cd1d39be7dace49.tar.xz
linux-dev-07607c5492f836923c2ab9eb1cd1d39be7dace49.zip
[SPARC64]: Fix domain-services port probing.
We should only use ports underneath "domain-services", other DS ports in the MDESC aren't for us to use. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--arch/sparc64/kernel/vio.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c
index 1550ac5673da..830dc88c19c9 100644
--- a/arch/sparc64/kernel/vio.c
+++ b/arch/sparc64/kernel/vio.c
@@ -342,8 +342,33 @@ static struct mdesc_notifier_client vio_device_notifier = {
.node_name = "virtual-device-port",
};
+/* We are only interested in domain service ports under the
+ * "domain-services" node. On control nodes there is another port
+ * under "openboot" that we should not mess with as aparently that is
+ * reserved exclusively for OBP use.
+ */
+static void vio_add_ds(struct mdesc_handle *hp, u64 node)
+{
+ int found;
+ u64 a;
+
+ found = 0;
+ mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) {
+ u64 target = mdesc_arc_target(hp, a);
+ const char *name = mdesc_node_name(hp, target);
+
+ if (!strcmp(name, "domain-services")) {
+ found = 1;
+ break;
+ }
+ }
+
+ if (found)
+ (void) vio_create_one(hp, node, &root_vdev->dev);
+}
+
static struct mdesc_notifier_client vio_ds_notifier = {
- .add = vio_add,
+ .add = vio_add_ds,
.remove = vio_remove,
.node_name = "domain-services-port",
};