linux/drivers/xen/xenbus/xenbus_probe_frontend.c

// SPDX-License-Identifier: GPL-2.0-only
#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"



/* device/<type>/<id> => <type>-<id> */
static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename)
{}

/* device/<typename>/<name> */
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)
{}


/* We watch for devices appearing and vanishing. */
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)
{}

/* We only wait for device setup after most initcalls have run. */
static int ready_to_wait_for_devices;

static bool wait_loop(unsigned long start, unsigned int max_delay,
		     unsigned int *seconds_waited)
{}
/*
 * On a 5-minute timeout, wait for all devices currently configured.  We need
 * to do this to guarantee that the filesystems and / or network devices
 * needed for boot are available, before we can allow the boot to proceed.
 *
 * This needs to be on a late_initcall, to happen after the frontend device
 * drivers have been initialised, but before the root fs is mounted.
 *
 * A possible improvement here would be to have the tools add a per-device
 * flag to the store entry, indicating whether it is needed at boot time.
 * This would allow people who knew what they were doing to accelerate their
 * boot slightly, but of course needs tools or manual intervention to set up
 * those flags correctly.
 */
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)
{}

/*
 * Reset frontend if it is in Connected or Closed state.
 * Wait for backend to catch up.
 * State Connected happens during kdump, Closed after kexec.
 */
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();