ia64/xen-unstable

changeset 12995:0c2816fb60b9

[XEN] Clean up public headers. Clarify licensing of kbdif.h and fbif.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Dec 13 11:29:27 2006 +0000 (2006-12-13)
parents 73b59ad4dd42
children 478ddc354ccd
files xen/include/public/io/fbif.h xen/include/public/io/kbdif.h xen/include/public/io/pciif.h xen/include/public/io/xenbus.h xen/include/public/memory.h xen/include/public/sysctl.h xen/include/public/xenoprof.h
line diff
     1.1 --- a/xen/include/public/io/fbif.h	Wed Dec 13 11:07:47 2006 +0000
     1.2 +++ b/xen/include/public/io/fbif.h	Wed Dec 13 11:29:27 2006 +0000
     1.3 @@ -1,19 +1,31 @@
     1.4  /*
     1.5   * fbif.h -- Xen virtual frame buffer device
     1.6   *
     1.7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
     1.8 + * of this software and associated documentation files (the "Software"), to
     1.9 + * deal in the Software without restriction, including without limitation the
    1.10 + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    1.11 + * sell copies of the Software, and to permit persons to whom the Software is
    1.12 + * furnished to do so, subject to the following conditions:
    1.13 + *
    1.14 + * The above copyright notice and this permission notice shall be included in
    1.15 + * all copies or substantial portions of the Software.
    1.16 + *
    1.17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    1.20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    1.21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    1.22 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    1.23 + * DEALINGS IN THE SOFTWARE.
    1.24 + *
    1.25   * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
    1.26   * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@redhat.com>
    1.27 - *
    1.28 - *  This file is subject to the terms and conditions of the GNU General Public
    1.29 - *  License. See the file COPYING in the main directory of this archive for
    1.30 - *  more details.
    1.31   */
    1.32  
    1.33  #ifndef __XEN_PUBLIC_IO_FBIF_H__
    1.34  #define __XEN_PUBLIC_IO_FBIF_H__
    1.35  
    1.36 -#include <asm/types.h>
    1.37 -
    1.38  /* Out events (frontend -> backend) */
    1.39  
    1.40  /*
    1.41 @@ -31,20 +43,20 @@
    1.42  
    1.43  struct xenfb_update
    1.44  {
    1.45 -	__u8 type;		/* XENFB_TYPE_UPDATE */
    1.46 -	__s32 x;		/* source x */
    1.47 -	__s32 y;		/* source y */
    1.48 -	__s32 width;		/* rect width */
    1.49 -	__s32 height;		/* rect height */
    1.50 +    uint8_t type;    /* XENFB_TYPE_UPDATE */
    1.51 +    int32_t x;      /* source x */
    1.52 +    int32_t y;      /* source y */
    1.53 +    int32_t width;  /* rect width */
    1.54 +    int32_t height; /* rect height */
    1.55  };
    1.56  
    1.57  #define XENFB_OUT_EVENT_SIZE 40
    1.58  
    1.59  union xenfb_out_event
    1.60  {
    1.61 -	__u8 type;
    1.62 -	struct xenfb_update update;
    1.63 -	char pad[XENFB_OUT_EVENT_SIZE];
    1.64 +    uint8_t type;
    1.65 +    struct xenfb_update update;
    1.66 +    char pad[XENFB_OUT_EVENT_SIZE];
    1.67  };
    1.68  
    1.69  /* In events (backend -> frontend) */
    1.70 @@ -58,8 +70,8 @@ union xenfb_out_event
    1.71  
    1.72  union xenfb_in_event
    1.73  {
    1.74 -	__u8 type;
    1.75 -	char pad[XENFB_IN_EVENT_SIZE];
    1.76 +    uint8_t type;
    1.77 +    char pad[XENFB_IN_EVENT_SIZE];
    1.78  };
    1.79  
    1.80  /* shared page */
    1.81 @@ -82,25 +94,25 @@ union xenfb_in_event
    1.82  
    1.83  struct xenfb_page
    1.84  {
    1.85 -	__u32 in_cons, in_prod;
    1.86 -	__u32 out_cons, out_prod;
    1.87 -
    1.88 -	__s32 width;         /* the width of the framebuffer (in pixels) */
    1.89 -	__s32 height;        /* the height of the framebuffer (in pixels) */
    1.90 -	__u32 line_length;   /* the length of a row of pixels (in bytes) */
    1.91 -	__u32 mem_length;    /* the length of the framebuffer (in bytes) */
    1.92 -	__u8 depth;          /* the depth of a pixel (in bits) */
    1.93 +    uint32_t in_cons, in_prod;
    1.94 +    uint32_t out_cons, out_prod;
    1.95  
    1.96 -	/*
    1.97 -	 * Framebuffer page directory
    1.98 -	 *
    1.99 -	 * Each directory page holds PAGE_SIZE / sizeof(*pd)
   1.100 -	 * framebuffer pages, and can thus map up to PAGE_SIZE *
   1.101 -	 * PAGE_SIZE / sizeof(*pd) bytes.  With PAGE_SIZE == 4096 and
   1.102 -	 * sizeof(unsigned long) == 4, that's 4 Megs.  Two directory
   1.103 -	 * pages should be enough for a while.
   1.104 -	 */
   1.105 -	unsigned long pd[2];
   1.106 +    int32_t width;          /* the width of the framebuffer (in pixels) */
   1.107 +    int32_t height;         /* the height of the framebuffer (in pixels) */
   1.108 +    uint32_t line_length;   /* the length of a row of pixels (in bytes) */
   1.109 +    uint32_t mem_length;    /* the length of the framebuffer (in bytes) */
   1.110 +    uint8_t depth;          /* the depth of a pixel (in bits) */
   1.111 +
   1.112 +    /*
   1.113 +     * Framebuffer page directory
   1.114 +     *
   1.115 +     * Each directory page holds PAGE_SIZE / sizeof(*pd)
   1.116 +     * framebuffer pages, and can thus map up to PAGE_SIZE *
   1.117 +     * PAGE_SIZE / sizeof(*pd) bytes.  With PAGE_SIZE == 4096 and
   1.118 +     * sizeof(unsigned long) == 4, that's 4 Megs.  Two directory
   1.119 +     * pages should be enough for a while.
   1.120 +     */
   1.121 +    unsigned long pd[2];
   1.122  };
   1.123  
   1.124  /*
   1.125 @@ -114,3 +126,13 @@ struct xenfb_page
   1.126  #endif
   1.127  
   1.128  #endif
   1.129 +
   1.130 +/*
   1.131 + * Local variables:
   1.132 + * mode: C
   1.133 + * c-set-style: "BSD"
   1.134 + * c-basic-offset: 4
   1.135 + * tab-width: 4
   1.136 + * indent-tabs-mode: nil
   1.137 + * End:
   1.138 + */
     2.1 --- a/xen/include/public/io/kbdif.h	Wed Dec 13 11:07:47 2006 +0000
     2.2 +++ b/xen/include/public/io/kbdif.h	Wed Dec 13 11:29:27 2006 +0000
     2.3 @@ -1,19 +1,31 @@
     2.4  /*
     2.5   * kbdif.h -- Xen virtual keyboard/mouse
     2.6   *
     2.7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
     2.8 + * of this software and associated documentation files (the "Software"), to
     2.9 + * deal in the Software without restriction, including without limitation the
    2.10 + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    2.11 + * sell copies of the Software, and to permit persons to whom the Software is
    2.12 + * furnished to do so, subject to the following conditions:
    2.13 + *
    2.14 + * The above copyright notice and this permission notice shall be included in
    2.15 + * all copies or substantial portions of the Software.
    2.16 + *
    2.17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    2.18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    2.19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    2.20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    2.21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    2.22 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    2.23 + * DEALINGS IN THE SOFTWARE.
    2.24 + *
    2.25   * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
    2.26   * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@redhat.com>
    2.27 - *
    2.28 - *  This file is subject to the terms and conditions of the GNU General Public
    2.29 - *  License. See the file COPYING in the main directory of this archive for
    2.30 - *  more details.
    2.31   */
    2.32  
    2.33  #ifndef __XEN_PUBLIC_IO_KBDIF_H__
    2.34  #define __XEN_PUBLIC_IO_KBDIF_H__
    2.35  
    2.36 -#include <asm/types.h>
    2.37 -
    2.38  /* In events (backend -> frontend) */
    2.39  
    2.40  /*
    2.41 @@ -35,34 +47,34 @@
    2.42  
    2.43  struct xenkbd_motion
    2.44  {
    2.45 -	__u8 type;         /* XENKBD_TYPE_MOTION */
    2.46 -	__s32 rel_x;       /* relative X motion */
    2.47 -	__s32 rel_y;       /* relative Y motion */
    2.48 +    uint8_t type;        /* XENKBD_TYPE_MOTION */
    2.49 +    int32_t rel_x;       /* relative X motion */
    2.50 +    int32_t rel_y;       /* relative Y motion */
    2.51  };
    2.52  
    2.53  struct xenkbd_key
    2.54  {
    2.55 -	__u8 type;         /* XENKBD_TYPE_KEY */
    2.56 -	__u8 pressed;      /* 1 if pressed; 0 otherwise */
    2.57 -	__u32 keycode;     /* KEY_* from linux/input.h */
    2.58 +    uint8_t type;         /* XENKBD_TYPE_KEY */
    2.59 +    uint8_t pressed;      /* 1 if pressed; 0 otherwise */
    2.60 +    uint32_t keycode;     /* KEY_* from linux/input.h */
    2.61  };
    2.62  
    2.63  struct xenkbd_position
    2.64  {
    2.65 -	__u8 type;         /* XENKBD_TYPE_POS */
    2.66 -	__s32 abs_x;       /* absolute X position (in FB pixels) */
    2.67 -	__s32 abs_y;       /* absolute Y position (in FB pixels) */
    2.68 +    uint8_t type;        /* XENKBD_TYPE_POS */
    2.69 +    int32_t abs_x;       /* absolute X position (in FB pixels) */
    2.70 +    int32_t abs_y;       /* absolute Y position (in FB pixels) */
    2.71  };
    2.72  
    2.73  #define XENKBD_IN_EVENT_SIZE 40
    2.74  
    2.75  union xenkbd_in_event
    2.76  {
    2.77 -	__u8 type;
    2.78 -	struct xenkbd_motion motion;
    2.79 -	struct xenkbd_key key;
    2.80 -	struct xenkbd_position pos;
    2.81 -	char pad[XENKBD_IN_EVENT_SIZE];
    2.82 +    uint8_t type;
    2.83 +    struct xenkbd_motion motion;
    2.84 +    struct xenkbd_key key;
    2.85 +    struct xenkbd_position pos;
    2.86 +    char pad[XENKBD_IN_EVENT_SIZE];
    2.87  };
    2.88  
    2.89  /* Out events (frontend -> backend) */
    2.90 @@ -77,8 +89,8 @@ union xenkbd_in_event
    2.91  
    2.92  union xenkbd_out_event
    2.93  {
    2.94 -	__u8 type;
    2.95 -	char pad[XENKBD_OUT_EVENT_SIZE];
    2.96 +    uint8_t type;
    2.97 +    char pad[XENKBD_OUT_EVENT_SIZE];
    2.98  };
    2.99  
   2.100  /* shared page */
   2.101 @@ -101,8 +113,18 @@ union xenkbd_out_event
   2.102  
   2.103  struct xenkbd_page
   2.104  {
   2.105 -	__u32 in_cons, in_prod;
   2.106 -	__u32 out_cons, out_prod;
   2.107 +    uint32_t in_cons, in_prod;
   2.108 +    uint32_t out_cons, out_prod;
   2.109  };
   2.110  
   2.111  #endif
   2.112 +
   2.113 +/*
   2.114 + * Local variables:
   2.115 + * mode: C
   2.116 + * c-set-style: "BSD"
   2.117 + * c-basic-offset: 4
   2.118 + * tab-width: 4
   2.119 + * indent-tabs-mode: nil
   2.120 + * End:
   2.121 + */
     3.1 --- a/xen/include/public/io/pciif.h	Wed Dec 13 11:07:47 2006 +0000
     3.2 +++ b/xen/include/public/io/pciif.h	Wed Dec 13 11:29:27 2006 +0000
     3.3 @@ -25,7 +25,7 @@
     3.4  #define __XEN_PCI_COMMON_H__
     3.5  
     3.6  /* Be sure to bump this number if you change this file */
     3.7 -#define XEN_PCI_MAGIC		"7"
     3.8 +#define XEN_PCI_MAGIC "7"
     3.9  
    3.10  /* xen_pci_sharedinfo flags */
    3.11  #define _XEN_PCIF_active     (0)
    3.12 @@ -45,29 +45,39 @@
    3.13  #define XEN_PCI_ERR_op_failed       (-5)
    3.14  
    3.15  struct xen_pci_op {
    3.16 -	/* IN: what action to perform: XEN_PCI_OP_* */
    3.17 -	uint32_t cmd;
    3.18 -
    3.19 -	/* OUT: will contain an error number (if any) from errno.h */
    3.20 -	int32_t err;
    3.21 +    /* IN: what action to perform: XEN_PCI_OP_* */
    3.22 +    uint32_t cmd;
    3.23  
    3.24 -	/* IN: which device to touch */
    3.25 -	uint32_t domain; /* PCI Domain/Segment */
    3.26 -	uint32_t bus;
    3.27 -	uint32_t devfn;
    3.28 +    /* OUT: will contain an error number (if any) from errno.h */
    3.29 +    int32_t err;
    3.30  
    3.31 -	/* IN: which configuration registers to touch */
    3.32 -	int32_t offset;
    3.33 -	int32_t size;
    3.34 +    /* IN: which device to touch */
    3.35 +    uint32_t domain; /* PCI Domain/Segment */
    3.36 +    uint32_t bus;
    3.37 +    uint32_t devfn;
    3.38  
    3.39 -	/* IN/OUT: Contains the result after a READ or the value to WRITE */
    3.40 -	uint32_t value;
    3.41 +    /* IN: which configuration registers to touch */
    3.42 +    int32_t offset;
    3.43 +    int32_t size;
    3.44 +
    3.45 +    /* IN/OUT: Contains the result after a READ or the value to WRITE */
    3.46 +    uint32_t value;
    3.47  };
    3.48  
    3.49  struct xen_pci_sharedinfo {
    3.50 -	/* flags - XEN_PCIF_* */
    3.51 -	uint32_t flags;
    3.52 -	struct xen_pci_op op;
    3.53 +    /* flags - XEN_PCIF_* */
    3.54 +    uint32_t flags;
    3.55 +    struct xen_pci_op op;
    3.56  };
    3.57  
    3.58  #endif /* __XEN_PCI_COMMON_H__ */
    3.59 +
    3.60 +/*
    3.61 + * Local variables:
    3.62 + * mode: C
    3.63 + * c-set-style: "BSD"
    3.64 + * c-basic-offset: 4
    3.65 + * tab-width: 4
    3.66 + * indent-tabs-mode: nil
    3.67 + * End:
    3.68 + */
     4.1 --- a/xen/include/public/io/xenbus.h	Wed Dec 13 11:07:47 2006 +0000
     4.2 +++ b/xen/include/public/io/xenbus.h	Wed Dec 13 11:29:27 2006 +0000
     4.3 @@ -56,8 +56,18 @@ enum xenbus_state {
     4.4       */
     4.5      XenbusStateClosing       = 5,
     4.6  
     4.7 -    XenbusStateClosed	     = 6
     4.8 +    XenbusStateClosed        = 6
     4.9  };
    4.10  typedef enum xenbus_state XenbusState;
    4.11  
    4.12  #endif /* _XEN_PUBLIC_IO_XENBUS_H */
    4.13 +
    4.14 +/*
    4.15 + * Local variables:
    4.16 + * mode: C
    4.17 + * c-set-style: "BSD"
    4.18 + * c-basic-offset: 4
    4.19 + * tab-width: 4
    4.20 + * indent-tabs-mode: nil
    4.21 + * End:
    4.22 + */
     5.1 --- a/xen/include/public/memory.h	Wed Dec 13 11:07:47 2006 +0000
     5.2 +++ b/xen/include/public/memory.h	Wed Dec 13 11:29:27 2006 +0000
     5.3 @@ -248,7 +248,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_memory_map_t
     5.4   * XENMEM_memory_map.
     5.5   * arg == addr of xen_memory_map_t.
     5.6   */
     5.7 -#define XENMEM_machine_memory_map	10
     5.8 +#define XENMEM_machine_memory_map   10
     5.9  
    5.10  /*
    5.11   * Set the pseudo-physical memory map of a domain, as returned by
     6.1 --- a/xen/include/public/sysctl.h	Wed Dec 13 11:07:47 2006 +0000
     6.2 +++ b/xen/include/public/sysctl.h	Wed Dec 13 11:29:27 2006 +0000
     6.3 @@ -119,7 +119,7 @@ struct xen_sysctl_perfc_op {
     6.4      uint32_t       cmd;                /*  XEN_SYSCTL_PERFCOP_??? */
     6.5      /* OUT variables. */
     6.6      uint32_t       nr_counters;       /*  number of counters description  */
     6.7 -    uint32_t       nr_vals;			  /*  number of values  */
     6.8 +    uint32_t       nr_vals;           /*  number of values  */
     6.9      /* counter information (or NULL) */
    6.10      XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc;
    6.11      /* counter values (or NULL) */
     7.1 --- a/xen/include/public/xenoprof.h	Wed Dec 13 11:07:47 2006 +0000
     7.2 +++ b/xen/include/public/xenoprof.h	Wed Dec 13 11:29:27 2006 +0000
     7.3 @@ -52,7 +52,7 @@
     7.4  #define XENOPROF_last_op            14
     7.5  
     7.6  #define MAX_OPROF_EVENTS    32
     7.7 -#define MAX_OPROF_DOMAINS   25	
     7.8 +#define MAX_OPROF_DOMAINS   25
     7.9  #define XENOPROF_CPU_TYPE_SIZE 64
    7.10  
    7.11  /* Xenoprof performance events (not Xen events) */