#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/mm_types.h>
#include <linux/init.h>
#include <linux/capability.h>
#include <linux/memory_hotplug.h>
#include <xen/xen.h>
#include <xen/interface/xen.h>
#include <xen/balloon.h>
#include <xen/xenbus.h>
#include <xen/features.h>
#include <xen/page.h>
#include <xen/mem-reservation.h>
#define PAGES2KB(_p) …
#define BALLOON_CLASS_NAME …
#ifdef CONFIG_MEMORY_HOTPLUG
u64 xen_saved_max_mem_size = …;
#endif
static struct device balloon_dev;
static int register_balloon(struct device *dev);
static void watch_target(struct xenbus_watch *watch,
const char *path, const char *token)
{ … }
static struct xenbus_watch target_watch = …;
static int balloon_init_watcher(struct notifier_block *notifier,
unsigned long event,
void *data)
{ … }
static struct notifier_block xenstore_notifier = …;
void xen_balloon_init(void)
{ … }
EXPORT_SYMBOL_GPL(…);
#define BALLOON_SHOW(name, format, args...) …
BALLOON_SHOW(…);
BALLOON_SHOW(…);
BALLOON_SHOW(…);
static DEVICE_ULONG_ATTR(schedule_delay, 0444, balloon_stats.schedule_delay);
static DEVICE_ULONG_ATTR(max_schedule_delay, 0644, balloon_stats.max_schedule_delay);
static DEVICE_ULONG_ATTR(retry_count, 0444, balloon_stats.retry_count);
static DEVICE_ULONG_ATTR(max_retry_count, 0644, balloon_stats.max_retry_count);
static DEVICE_BOOL_ATTR(scrub_pages, 0644, xen_scrub_pages);
static ssize_t target_kb_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t target_kb_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(target_kb);
static ssize_t target_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t target_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(target);
static struct attribute *balloon_attrs[] = …;
static const struct attribute_group balloon_group = …;
static struct attribute *balloon_info_attrs[] = …;
static const struct attribute_group balloon_info_group = …;
static const struct attribute_group *balloon_groups[] = …;
static const struct bus_type balloon_subsys = …;
static int register_balloon(struct device *dev)
{ … }