Re: PPC64: vio_find_node removal?

From: Hollis Blanchard
Date: Thu Jul 01 2004 - 17:30:13 EST


On Thu, 2004-07-01 at 14:54, Dmitry Torokhov wrote:

> kset_find_obj that is now only used by vio_find_name/vio_find_node needs to
> take kobject reference otherwise use of this function is generally unsafe.
>
> I was looking at vio_find_name users and it is only used in rpaphp hotplug
> driver. When creating a hotplug slot the function first tries to find already
> existing vio node and if unsuccessfull tries to create a new one. The only
> time when vio node would already exist if previous call to register_vio_slot
> failed (the function does not do cleanup of created vio device node and it's
> the only place where vio devices are created). So it seems to me that if
> register_vio_slot would do proper cleanup we can get rid of vio_find_name/
> vio_find_node.

At boot time, all the virtual IO devices are registered and matched with
their drivers (or not). Later on (possibly when loading a module),
rpaphp initializes. rpaphp needs a reference to the already-registered
VIO devices so that it can hotplug-remove them later by calling
vio_unregister_device().

--
Hollis Blanchard
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/