From f4d29ca7defdec9c8010a20a9ce10a71462a9978 Mon Sep 17 00:00:00 2001 From: Jag Raman Date: Fri, 23 Jun 2017 14:58:39 -0400 Subject: sparc64: Enhance search for VIO device in MDESC Enhances search for VIO device in MDESC by leveraging already existing MDESC APIs. Enhances changes in earlier patch, "sparc: Machine description indices can vary", by using existing MD search functions. It also specifies a match function, thereby enabling device_find_child() to use it for the purpose of matching device nodes in MDESC. An API to find VDEV node in MDESC based on its md_node_info is also added. It is planned to be used by VIO device clients in the future. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller --- arch/sparc/include/asm/vio.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/sparc/include/asm/vio.h') diff --git a/arch/sparc/include/asm/vio.h b/arch/sparc/include/asm/vio.h index d8eb195b69e3..25ede61c0386 100644 --- a/arch/sparc/include/asm/vio.h +++ b/arch/sparc/include/asm/vio.h @@ -329,7 +329,6 @@ struct vio_dev { int compat_len; u64 dev_no; - u64 id; unsigned long channel_id; @@ -341,6 +340,9 @@ struct vio_dev { /* Handle to the root of "channel-devices" sub-tree in MDESC */ u64 cdev_handle; + /* MD specific data used to identify the vdev in MD */ + union md_node_info md_node_info; + struct device dev; }; @@ -497,5 +499,6 @@ int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev, void vio_port_up(struct vio_driver_state *vio); int vio_set_intr(unsigned long dev_ino, int state); +u64 vio_vdev_node(struct mdesc_handle *hp, struct vio_dev *vdev); #endif /* _SPARC64_VIO_H */ -- cgit v1.2.3