Kieran Mansley
2007-Jun-15 10:46 UTC
[Xen-devel] [PATCH 1/4] [Net] Support accelerated network plugin modules
Add xenbus_for_each_[back,front]end functions to iterate each bus Signed-off-by: Kieran Mansley <kmansley@solarflare.com> diff -r d5e0eb7dd069 drivers/xen/xenbus/xenbus_probe.c --- a/drivers/xen/xenbus/xenbus_probe.c Sun Jun 10 19:50:32 2007 +0100 +++ b/drivers/xen/xenbus/xenbus_probe.c Thu Jun 14 14:49:40 2007 +0100 @@ -4,6 +4,7 @@ * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 Mike Wray, Hewlett-Packard * Copyright (C) 2005, 2006 XenSource Ltd + * Copyright (C) 2007 Solarflare Communications, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -1085,3 +1086,10 @@ static int __init boot_wait_for_devices( late_initcall(boot_wait_for_devices); #endif + + +int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *)) +{ + return bus_for_each_dev(&xenbus_frontend.bus, NULL, arg, fn); +} +EXPORT_SYMBOL_GPL(xenbus_for_each_frontend); diff -r d5e0eb7dd069 drivers/xen/xenbus/xenbus_probe_backend.c --- a/drivers/xen/xenbus/xenbus_probe_backend.c Sun Jun 10 19:50:32 2007 +0100 +++ b/drivers/xen/xenbus/xenbus_probe_backend.c Thu Jun 14 14:49:40 2007 +0100 @@ -4,6 +4,7 @@ * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 Mike Wray, Hewlett-Packard * Copyright (C) 2005, 2006 XenSource Ltd + * Copyright (C) 2007 Solarflare Communications, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -285,3 +286,10 @@ void xenbus_backend_device_register(void xenbus_backend.error); } } + +int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)) +{ + return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn); +} +EXPORT_SYMBOL_GPL(xenbus_for_each_backend); + diff -r d5e0eb7dd069 include/xen/xenbus.h --- a/include/xen/xenbus.h Sun Jun 10 19:50:32 2007 +0100 +++ b/include/xen/xenbus.h Thu Jun 14 14:49:40 2007 +0100 @@ -299,4 +299,7 @@ int xenbus_dev_is_online(struct xenbus_d int xenbus_dev_is_online(struct xenbus_device *dev); int xenbus_frontend_closed(struct xenbus_device *dev); +extern int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)); +extern int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *)); + #endif /* _XEN_XENBUS_H */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kieran Mansley
2007-Jun-21 13:17 UTC
[Xen-devel] [PATCH 1/4] [Net] Support accelerated network plugin modules
Add xenbus_for_each_[back,front]end functions to iterate each bus Signed-off-by: Kieran Mansley <kmansley@solarflare.com> diff -r d5e0eb7dd069 drivers/xen/xenbus/xenbus_probe.c --- a/drivers/xen/xenbus/xenbus_probe.c Sun Jun 10 19:50:32 2007 +0100 +++ b/drivers/xen/xenbus/xenbus_probe.c Fri Jun 15 15:34:45 2007 +0100 @@ -4,6 +4,7 @@ * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 Mike Wray, Hewlett-Packard * Copyright (C) 2005, 2006 XenSource Ltd + * Copyright (C) 2007 Solarflare Communications, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -1085,3 +1086,10 @@ static int __init boot_wait_for_devices( late_initcall(boot_wait_for_devices); #endif + + +int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *)) +{ + return bus_for_each_dev(&xenbus_frontend.bus, NULL, arg, fn); +} +EXPORT_SYMBOL_GPL(xenbus_for_each_frontend); diff -r d5e0eb7dd069 drivers/xen/xenbus/xenbus_probe_backend.c --- a/drivers/xen/xenbus/xenbus_probe_backend.c Sun Jun 10 19:50:32 2007 +0100 +++ b/drivers/xen/xenbus/xenbus_probe_backend.c Fri Jun 15 15:34:55 2007 +0100 @@ -4,6 +4,7 @@ * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 Mike Wray, Hewlett-Packard * Copyright (C) 2005, 2006 XenSource Ltd + * Copyright (C) 2007 Solarflare Communications, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -285,3 +286,10 @@ void xenbus_backend_device_register(void xenbus_backend.error); } } + +int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)) +{ + return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn); +} +EXPORT_SYMBOL_GPL(xenbus_for_each_backend); + diff -r d5e0eb7dd069 include/xen/xenbus.h --- a/include/xen/xenbus.h Sun Jun 10 19:50:32 2007 +0100 +++ b/include/xen/xenbus.h Thu Jun 14 15:04:31 2007 +0100 @@ -299,4 +299,7 @@ int xenbus_dev_is_online(struct xenbus_d int xenbus_dev_is_online(struct xenbus_device *dev); int xenbus_frontend_closed(struct xenbus_device *dev); +extern int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)); +extern int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *)); + #endif /* _XEN_XENBUS_H */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kieran Mansley
2007-Jul-09 12:09 UTC
[Xen-devel] [PATCH 1/4] [Net] Support accelerated network plugin modules
Add xenbus_for_each_[back,front]end functions to iterate each bus Signed-off-by: Kieran Mansley <kmansley@solarflare.com> diff -r d5e0eb7dd069 drivers/xen/xenbus/xenbus_probe.c --- a/drivers/xen/xenbus/xenbus_probe.c Sun Jun 10 19:50:32 2007 +0100 +++ b/drivers/xen/xenbus/xenbus_probe.c Fri Jun 15 15:34:45 2007 +0100 @@ -4,6 +4,7 @@ * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 Mike Wray, Hewlett-Packard * Copyright (C) 2005, 2006 XenSource Ltd + * Copyright (C) 2007 Solarflare Communications, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -1085,3 +1086,10 @@ static int __init boot_wait_for_devices( late_initcall(boot_wait_for_devices); #endif + + +int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *)) +{ + return bus_for_each_dev(&xenbus_frontend.bus, NULL, arg, fn); +} +EXPORT_SYMBOL_GPL(xenbus_for_each_frontend); diff -r d5e0eb7dd069 drivers/xen/xenbus/xenbus_probe_backend.c --- a/drivers/xen/xenbus/xenbus_probe_backend.c Sun Jun 10 19:50:32 2007 +0100 +++ b/drivers/xen/xenbus/xenbus_probe_backend.c Fri Jun 15 15:34:55 2007 +0100 @@ -4,6 +4,7 @@ * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 Mike Wray, Hewlett-Packard * Copyright (C) 2005, 2006 XenSource Ltd + * Copyright (C) 2007 Solarflare Communications, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -285,3 +286,10 @@ void xenbus_backend_device_register(void xenbus_backend.error); } } + +int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)) +{ + return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn); +} +EXPORT_SYMBOL_GPL(xenbus_for_each_backend); + diff -r d5e0eb7dd069 include/xen/xenbus.h --- a/include/xen/xenbus.h Sun Jun 10 19:50:32 2007 +0100 +++ b/include/xen/xenbus.h Thu Jun 14 15:04:31 2007 +0100 @@ -299,4 +299,7 @@ int xenbus_dev_is_online(struct xenbus_d int xenbus_dev_is_online(struct xenbus_device *dev); int xenbus_frontend_closed(struct xenbus_device *dev); +extern int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)); +extern int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *)); + #endif /* _XEN_XENBUS_H */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel