Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 332f791d authored by Juergen Gross's avatar Juergen Gross Committed by Boris Ostrovsky
Browse files

xen: clean up xenbus internal headers



The xenbus driver has an awful mixture of internally and globally
visible headers: some of the internally used only stuff is defined in
the global header include/xen/xenbus.h while some stuff defined in
internal headers is used by other drivers, too.

Clean this up by moving the externally used symbols to
include/xen/xenbus.h and the symbols used internally only to a new
header drivers/xen/xenbus/xenbus.h replacing xenbus_comms.h and
xenbus_probe.h

Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
parent c0d197d5
Loading
Loading
Loading
Loading
+36 −27
Original line number Diff line number Diff line
/******************************************************************************
 * xenbus_probe.h
 *
 * Talks to Xen Store to figure out what devices we have.
/*
 * Private include for xenbus communications.
 *
 * Copyright (C) 2005 Rusty Russell, IBM Corporation
 * Copyright (C) 2005 XenSource Ltd.
@@ -31,8 +29,8 @@
 * IN THE SOFTWARE.
 */

#ifndef _XENBUS_PROBE_H
#define _XENBUS_PROBE_H
#ifndef _XENBUS_XENBUS_H
#define _XENBUS_XENBUS_H

#define XEN_BUS_ID_SIZE			20

@@ -54,35 +52,46 @@ enum xenstore_init {
	XS_LOCAL,
};

extern enum xenstore_init xen_store_domain_type;
extern const struct attribute_group *xenbus_dev_groups[];

extern int xenbus_match(struct device *_dev, struct device_driver *_drv);
extern int xenbus_dev_probe(struct device *_dev);
extern int xenbus_dev_remove(struct device *_dev);
extern int xenbus_register_driver_common(struct xenbus_driver *drv,
int xs_init(void);
int xb_init_comms(void);
void xb_deinit_comms(void);
int xb_write(const void *data, unsigned int len);
int xb_read(void *data, unsigned int len);
int xb_data_to_read(void);
int xb_wait_for_data_to_read(void);

int xenbus_match(struct device *_dev, struct device_driver *_drv);
int xenbus_dev_probe(struct device *_dev);
int xenbus_dev_remove(struct device *_dev);
int xenbus_register_driver_common(struct xenbus_driver *drv,
				  struct xen_bus_type *bus,
				  struct module *owner,
				  const char *mod_name);
extern int xenbus_probe_node(struct xen_bus_type *bus,
int xenbus_probe_node(struct xen_bus_type *bus,
		      const char *type,
		      const char *nodename);
extern int xenbus_probe_devices(struct xen_bus_type *bus);
int xenbus_probe_devices(struct xen_bus_type *bus);

extern void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);

extern void xenbus_dev_shutdown(struct device *_dev);
void xenbus_dev_shutdown(struct device *_dev);

extern int xenbus_dev_suspend(struct device *dev);
extern int xenbus_dev_resume(struct device *dev);
extern int xenbus_dev_cancel(struct device *dev);
int xenbus_dev_suspend(struct device *dev);
int xenbus_dev_resume(struct device *dev);
int xenbus_dev_cancel(struct device *dev);

extern void xenbus_otherend_changed(struct xenbus_watch *watch,
void xenbus_otherend_changed(struct xenbus_watch *watch,
			     const char **vec, unsigned int len,
			     int ignore_on_shutdown);

extern int xenbus_read_otherend_details(struct xenbus_device *xendev,
int xenbus_read_otherend_details(struct xenbus_device *xendev,
				 char *id_node, char *path_node);

void xenbus_ring_ops_init(void);

void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg);

#endif
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@
#include <xen/xen.h>
#include <xen/features.h>

#include "xenbus_probe.h"
#include "xenbus.h"

#define XENBUS_PAGES(_grants)	(DIV_ROUND_UP(_grants, XEN_PFN_PER_PAGE))

+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
#include <asm/xen/hypervisor.h>
#include <xen/events.h>
#include <xen/page.h>
#include "xenbus_comms.h"
#include "xenbus.h"

static int xenbus_irq;

drivers/xen/xenbus/xenbus_comms.h

deleted100644 → 0
+0 −51
Original line number Diff line number Diff line
/*
 * Private include for xenbus communications.
 *
 * Copyright (C) 2005 Rusty Russell, 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.
 */

#ifndef _XENBUS_COMMS_H
#define _XENBUS_COMMS_H

#include <linux/fs.h>

int xs_init(void);
int xb_init_comms(void);
void xb_deinit_comms(void);

/* Low level routines. */
int xb_write(const void *data, unsigned len);
int xb_read(void *data, unsigned len);
int xb_data_to_read(void);
int xb_wait_for_data_to_read(void);
extern struct xenstore_domain_interface *xen_store_interface;
extern int xen_store_evtchn;
extern enum xenstore_init xen_store_domain_type;

extern const struct file_operations xen_xenbus_fops;

#endif /* _XENBUS_COMMS_H */
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
#include <xen/events.h>
#include <asm/xen/hypervisor.h>

#include "xenbus_comms.h"
#include "xenbus.h"

static int xenbus_backend_open(struct inode *inode, struct file *filp)
{
Loading