#define pr_fmt(fmt) …
#define DPRINTK(fmt, ...) …
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/fcntl.h>
#include <linux/mm.h>
#include <linux/proc_fs.h>
#include <linux/notifier.h>
#include <linux/kthread.h>
#include <linux/mutex.h>
#include <linux/io.h>
#include <linux/module.h>
#include <asm/page.h>
#include <asm/xen/hypervisor.h>
#include <xen/xenbus.h>
#include <xen/events.h>
#include <xen/page.h>
#include <xen/xen.h>
#include <xen/platform_pci.h>
#include "xenbus.h"
static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename)
{ … }
static int xenbus_probe_frontend(struct xen_bus_type *bus, const char *type,
const char *name)
{ … }
static int xenbus_uevent_frontend(const struct device *_dev,
struct kobj_uevent_env *env)
{ … }
static void backend_changed(struct xenbus_watch *watch,
const char *path, const char *token)
{ … }
static void xenbus_frontend_delayed_resume(struct work_struct *w)
{ … }
static int xenbus_frontend_dev_resume(struct device *dev)
{ … }
static int xenbus_frontend_dev_probe(struct device *dev)
{ … }
static void xenbus_frontend_dev_shutdown(struct device *_dev)
{ … }
static const struct dev_pm_ops xenbus_pm_ops = …;
static struct xen_bus_type xenbus_frontend = …;
static void frontend_changed(struct xenbus_watch *watch,
const char *path, const char *token)
{ … }
static struct xenbus_watch fe_watch = …;
static int read_backend_details(struct xenbus_device *xendev)
{ … }
static int is_device_connecting(struct device *dev, void *data, bool ignore_nonessential)
{ … }
static int essential_device_connecting(struct device *dev, void *data)
{ … }
static int non_essential_device_connecting(struct device *dev, void *data)
{ … }
static int exists_essential_connecting_device(struct device_driver *drv)
{ … }
static int exists_non_essential_connecting_device(struct device_driver *drv)
{ … }
static int print_device_status(struct device *dev, void *data)
{ … }
static int ready_to_wait_for_devices;
static bool wait_loop(unsigned long start, unsigned int max_delay,
unsigned int *seconds_waited)
{ … }
static void wait_for_devices(struct xenbus_driver *xendrv)
{ … }
int __xenbus_register_frontend(struct xenbus_driver *drv, struct module *owner,
const char *mod_name)
{ … }
EXPORT_SYMBOL_GPL(…);
static DECLARE_WAIT_QUEUE_HEAD(backend_state_wq);
static int backend_state;
static void xenbus_reset_backend_state_changed(struct xenbus_watch *w,
const char *path, const char *token)
{ … }
static void xenbus_reset_wait_for_backend(char *be, int expected)
{ … }
static void xenbus_reset_frontend(char *fe, char *be, int be_state)
{ … }
static void xenbus_check_frontend(char *class, char *dev)
{ … }
static void xenbus_reset_state(void)
{ … }
static int frontend_probe_and_watch(struct notifier_block *notifier,
unsigned long event,
void *data)
{ … }
static int __init xenbus_probe_frontend_init(void)
{ … }
subsys_initcall(xenbus_probe_frontend_init);
#ifndef MODULE
static int __init boot_wait_for_devices(void)
{ … }
late_initcall(boot_wait_for_devices);
#endif
MODULE_LICENSE(…) …;