# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 0c2816fb60b904fce4225004908856dae1585e3d
# Parent 73b59ad4dd42dcf13ae756a3c0b73a987db9660f
[XEN] Clean up public headers. Clarify licensing of kbdif.h and fbif.h.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
xen/include/public/io/fbif.h | 88 +++++++++++++++++++++++++----------------
xen/include/public/io/kbdif.h | 70 +++++++++++++++++++++-----------
xen/include/public/io/pciif.h | 44 ++++++++++++--------
xen/include/public/io/xenbus.h | 12 +++++
xen/include/public/memory.h | 2
xen/include/public/sysctl.h | 2
xen/include/public/xenoprof.h | 2
7 files changed, 142 insertions(+), 78 deletions(-)
diff -r 73b59ad4dd42 -r 0c2816fb60b9 xen/include/public/io/fbif.h
--- a/xen/include/public/io/fbif.h Wed Dec 13 11:07:47 2006 +0000
+++ b/xen/include/public/io/fbif.h Wed Dec 13 11:29:27 2006 +0000
@@ -1,18 +1,30 @@
/*
* fbif.h -- Xen virtual frame buffer device
*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (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.
+ *
* Copyright (C) 2005 Anthony Liguori <aliguori@xxxxxxxxxx>
* Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@xxxxxxxxxx>
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
*/
#ifndef __XEN_PUBLIC_IO_FBIF_H__
#define __XEN_PUBLIC_IO_FBIF_H__
-
-#include <asm/types.h>
/* Out events (frontend -> backend) */
@@ -31,20 +43,20 @@
struct xenfb_update
{
- __u8 type; /* XENFB_TYPE_UPDATE */
- __s32 x; /* source x */
- __s32 y; /* source y */
- __s32 width; /* rect width */
- __s32 height; /* rect height */
+ uint8_t type; /* XENFB_TYPE_UPDATE */
+ int32_t x; /* source x */
+ int32_t y; /* source y */
+ int32_t width; /* rect width */
+ int32_t height; /* rect height */
};
#define XENFB_OUT_EVENT_SIZE 40
union xenfb_out_event
{
- __u8 type;
- struct xenfb_update update;
- char pad[XENFB_OUT_EVENT_SIZE];
+ uint8_t type;
+ struct xenfb_update update;
+ char pad[XENFB_OUT_EVENT_SIZE];
};
/* In events (backend -> frontend) */
@@ -58,8 +70,8 @@ union xenfb_out_event
union xenfb_in_event
{
- __u8 type;
- char pad[XENFB_IN_EVENT_SIZE];
+ uint8_t type;
+ char pad[XENFB_IN_EVENT_SIZE];
};
/* shared page */
@@ -82,25 +94,25 @@ union xenfb_in_event
struct xenfb_page
{
- __u32 in_cons, in_prod;
- __u32 out_cons, out_prod;
+ uint32_t in_cons, in_prod;
+ uint32_t out_cons, out_prod;
- __s32 width; /* the width of the framebuffer (in pixels) */
- __s32 height; /* the height of the framebuffer (in pixels) */
- __u32 line_length; /* the length of a row of pixels (in bytes) */
- __u32 mem_length; /* the length of the framebuffer (in bytes) */
- __u8 depth; /* the depth of a pixel (in bits) */
+ int32_t width; /* the width of the framebuffer (in pixels) */
+ int32_t height; /* the height of the framebuffer (in pixels) */
+ uint32_t line_length; /* the length of a row of pixels (in bytes) */
+ uint32_t mem_length; /* the length of the framebuffer (in bytes) */
+ uint8_t depth; /* the depth of a pixel (in bits) */
- /*
- * Framebuffer page directory
- *
- * Each directory page holds PAGE_SIZE / sizeof(*pd)
- * framebuffer pages, and can thus map up to PAGE_SIZE *
- * PAGE_SIZE / sizeof(*pd) bytes. With PAGE_SIZE == 4096 and
- * sizeof(unsigned long) == 4, that's 4 Megs. Two directory
- * pages should be enough for a while.
- */
- unsigned long pd[2];
+ /*
+ * Framebuffer page directory
+ *
+ * Each directory page holds PAGE_SIZE / sizeof(*pd)
+ * framebuffer pages, and can thus map up to PAGE_SIZE *
+ * PAGE_SIZE / sizeof(*pd) bytes. With PAGE_SIZE == 4096 and
+ * sizeof(unsigned long) == 4, that's 4 Megs. Two directory
+ * pages should be enough for a while.
+ */
+ unsigned long pd[2];
};
/*
@@ -114,3 +126,13 @@ struct xenfb_page
#endif
#endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 73b59ad4dd42 -r 0c2816fb60b9 xen/include/public/io/kbdif.h
--- a/xen/include/public/io/kbdif.h Wed Dec 13 11:07:47 2006 +0000
+++ b/xen/include/public/io/kbdif.h Wed Dec 13 11:29:27 2006 +0000
@@ -1,18 +1,30 @@
/*
* kbdif.h -- Xen virtual keyboard/mouse
*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (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.
+ *
* Copyright (C) 2005 Anthony Liguori <aliguori@xxxxxxxxxx>
* Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@xxxxxxxxxx>
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
*/
#ifndef __XEN_PUBLIC_IO_KBDIF_H__
#define __XEN_PUBLIC_IO_KBDIF_H__
-
-#include <asm/types.h>
/* In events (backend -> frontend) */
@@ -35,34 +47,34 @@
struct xenkbd_motion
{
- __u8 type; /* XENKBD_TYPE_MOTION */
- __s32 rel_x; /* relative X motion */
- __s32 rel_y; /* relative Y motion */
+ uint8_t type; /* XENKBD_TYPE_MOTION */
+ int32_t rel_x; /* relative X motion */
+ int32_t rel_y; /* relative Y motion */
};
struct xenkbd_key
{
- __u8 type; /* XENKBD_TYPE_KEY */
- __u8 pressed; /* 1 if pressed; 0 otherwise */
- __u32 keycode; /* KEY_* from linux/input.h */
+ uint8_t type; /* XENKBD_TYPE_KEY */
+ uint8_t pressed; /* 1 if pressed; 0 otherwise */
+ uint32_t keycode; /* KEY_* from linux/input.h */
};
struct xenkbd_position
{
- __u8 type; /* XENKBD_TYPE_POS */
- __s32 abs_x; /* absolute X position (in FB pixels) */
- __s32 abs_y; /* absolute Y position (in FB pixels) */
+ uint8_t type; /* XENKBD_TYPE_POS */
+ int32_t abs_x; /* absolute X position (in FB pixels) */
+ int32_t abs_y; /* absolute Y position (in FB pixels) */
};
#define XENKBD_IN_EVENT_SIZE 40
union xenkbd_in_event
{
- __u8 type;
- struct xenkbd_motion motion;
- struct xenkbd_key key;
- struct xenkbd_position pos;
- char pad[XENKBD_IN_EVENT_SIZE];
+ uint8_t type;
+ struct xenkbd_motion motion;
+ struct xenkbd_key key;
+ struct xenkbd_position pos;
+ char pad[XENKBD_IN_EVENT_SIZE];
};
/* Out events (frontend -> backend) */
@@ -77,8 +89,8 @@ union xenkbd_in_event
union xenkbd_out_event
{
- __u8 type;
- char pad[XENKBD_OUT_EVENT_SIZE];
+ uint8_t type;
+ char pad[XENKBD_OUT_EVENT_SIZE];
};
/* shared page */
@@ -101,8 +113,18 @@ union xenkbd_out_event
struct xenkbd_page
{
- __u32 in_cons, in_prod;
- __u32 out_cons, out_prod;
+ uint32_t in_cons, in_prod;
+ uint32_t out_cons, out_prod;
};
#endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 73b59ad4dd42 -r 0c2816fb60b9 xen/include/public/io/pciif.h
--- a/xen/include/public/io/pciif.h Wed Dec 13 11:07:47 2006 +0000
+++ b/xen/include/public/io/pciif.h Wed Dec 13 11:29:27 2006 +0000
@@ -25,7 +25,7 @@
#define __XEN_PCI_COMMON_H__
/* Be sure to bump this number if you change this file */
-#define XEN_PCI_MAGIC "7"
+#define XEN_PCI_MAGIC "7"
/* xen_pci_sharedinfo flags */
#define _XEN_PCIF_active (0)
@@ -45,29 +45,39 @@
#define XEN_PCI_ERR_op_failed (-5)
struct xen_pci_op {
- /* IN: what action to perform: XEN_PCI_OP_* */
- uint32_t cmd;
+ /* IN: what action to perform: XEN_PCI_OP_* */
+ uint32_t cmd;
- /* OUT: will contain an error number (if any) from errno.h */
- int32_t err;
+ /* OUT: will contain an error number (if any) from errno.h */
+ int32_t err;
- /* IN: which device to touch */
- uint32_t domain; /* PCI Domain/Segment */
- uint32_t bus;
- uint32_t devfn;
+ /* IN: which device to touch */
+ uint32_t domain; /* PCI Domain/Segment */
+ uint32_t bus;
+ uint32_t devfn;
- /* IN: which configuration registers to touch */
- int32_t offset;
- int32_t size;
+ /* IN: which configuration registers to touch */
+ int32_t offset;
+ int32_t size;
- /* IN/OUT: Contains the result after a READ or the value to WRITE */
- uint32_t value;
+ /* IN/OUT: Contains the result after a READ or the value to WRITE */
+ uint32_t value;
};
struct xen_pci_sharedinfo {
- /* flags - XEN_PCIF_* */
- uint32_t flags;
- struct xen_pci_op op;
+ /* flags - XEN_PCIF_* */
+ uint32_t flags;
+ struct xen_pci_op op;
};
#endif /* __XEN_PCI_COMMON_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 73b59ad4dd42 -r 0c2816fb60b9 xen/include/public/io/xenbus.h
--- a/xen/include/public/io/xenbus.h Wed Dec 13 11:07:47 2006 +0000
+++ b/xen/include/public/io/xenbus.h Wed Dec 13 11:29:27 2006 +0000
@@ -56,8 +56,18 @@ enum xenbus_state {
*/
XenbusStateClosing = 5,
- XenbusStateClosed = 6
+ XenbusStateClosed = 6
};
typedef enum xenbus_state XenbusState;
#endif /* _XEN_PUBLIC_IO_XENBUS_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 73b59ad4dd42 -r 0c2816fb60b9 xen/include/public/memory.h
--- a/xen/include/public/memory.h Wed Dec 13 11:07:47 2006 +0000
+++ b/xen/include/public/memory.h Wed Dec 13 11:29:27 2006 +0000
@@ -248,7 +248,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_memory_map_t
* XENMEM_memory_map.
* arg == addr of xen_memory_map_t.
*/
-#define XENMEM_machine_memory_map 10
+#define XENMEM_machine_memory_map 10
/*
* Set the pseudo-physical memory map of a domain, as returned by
diff -r 73b59ad4dd42 -r 0c2816fb60b9 xen/include/public/sysctl.h
--- a/xen/include/public/sysctl.h Wed Dec 13 11:07:47 2006 +0000
+++ b/xen/include/public/sysctl.h Wed Dec 13 11:29:27 2006 +0000
@@ -119,7 +119,7 @@ struct xen_sysctl_perfc_op {
uint32_t cmd; /* XEN_SYSCTL_PERFCOP_??? */
/* OUT variables. */
uint32_t nr_counters; /* number of counters description */
- uint32_t nr_vals; /* number of values */
+ uint32_t nr_vals; /* number of values */
/* counter information (or NULL) */
XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc;
/* counter values (or NULL) */
diff -r 73b59ad4dd42 -r 0c2816fb60b9 xen/include/public/xenoprof.h
--- a/xen/include/public/xenoprof.h Wed Dec 13 11:07:47 2006 +0000
+++ b/xen/include/public/xenoprof.h Wed Dec 13 11:29:27 2006 +0000
@@ -52,7 +52,7 @@
#define XENOPROF_last_op 14
#define MAX_OPROF_EVENTS 32
-#define MAX_OPROF_DOMAINS 25
+#define MAX_OPROF_DOMAINS 25
#define XENOPROF_CPU_TYPE_SIZE 64
/* Xenoprof performance events (not Xen events) */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|