linux/drivers/xen/xen-balloon.c

/******************************************************************************
 * Xen balloon driver - enables returning/claiming memory to/from Xen.
 *
 * Copyright (c) 2003, B Dragovic
 * Copyright (c) 2003-2004, M Williamson, K Fraser
 * Copyright (c) 2005 Dan M. Smith, IBM Corporation
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation; or, when distributed
 * separately from the Linux kernel or incorporated into other
 * software packages, subject to the following license:
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this source file (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy, modify,
 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
 * and to permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

#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);

/* React to a change in the target key */
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)
{}