Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[pandora-kernel.git] / drivers / lguest / lg.h
index 9c31382..bc28745 100644 (file)
 void free_pagetables(void);
 int init_pagetables(struct page **switcher_page, unsigned int pages);
 
-struct pgdir
-{
+struct pgdir {
        unsigned long gpgdir;
        pgd_t *pgdir;
 };
 
 /* We have two pages shared with guests, per cpu.  */
-struct lguest_pages
-{
+struct lguest_pages {
        /* This is the stack page mapped rw in guest */
        char spare[PAGE_SIZE - sizeof(struct lguest_regs)];
        struct lguest_regs regs;
@@ -38,8 +36,6 @@ struct lguest_pages
 #define CHANGED_GDT_TLS                4 /* Actually a subset of CHANGED_GDT */
 #define CHANGED_ALL            3
 
-struct lguest;
-
 struct lg_cpu {
        unsigned int id;
        struct lguest *lg;
@@ -56,13 +52,13 @@ struct lg_cpu {
 
        unsigned long pending_notify; /* pfn from LHCALL_NOTIFY */
 
-       /* At end of a page shared mapped over lguest_pages in guest.  */
+       /* At end of a page shared mapped over lguest_pages in guest. */
        unsigned long regs_page;
        struct lguest_regs *regs;
 
        struct lguest_pages *last_pages;
 
-       int cpu_pgd; /* which pgd this cpu is currently using */
+       int cpu_pgd; /* Which pgd this cpu is currently using */
 
        /* If a hypercall was asked for, this points to the arguments. */
        struct hcall_args *hcall;
@@ -91,15 +87,17 @@ struct lg_eventfd_map {
 };
 
 /* The private info the thread maintains about the guest. */
-struct lguest
-{
+struct lguest {
        struct lguest_data __user *lguest_data;
        struct lg_cpu cpus[NR_CPUS];
        unsigned int nr_cpus;
 
        u32 pfn_limit;
-       /* This provides the offset to the base of guest-physical
-        * memory in the Launcher. */
+
+       /*
+        * This provides the offset to the base of guest-physical memory in the
+        * Launcher.
+        */
        void __user *mem_base;
        unsigned long kernel_address;
 
@@ -124,11 +122,13 @@ bool lguest_address_ok(const struct lguest *lg,
 void __lgread(struct lg_cpu *, void *, unsigned long, unsigned);
 void __lgwrite(struct lg_cpu *, unsigned long, const void *, unsigned);
 
-/*H:035 Using memory-copy operations like that is usually inconvient, so we
+/*H:035
+ * Using memory-copy operations like that is usually inconvient, so we
  * have the following helper macros which read and write a specific type (often
  * an unsigned long).
  *
- * This reads into a variable of the given type then returns that. */
+ * This reads into a variable of the given type then returns that.
+ */
 #define lgread(cpu, addr, type)                                                \
        ({ type _v; __lgread((cpu), &_v, (addr), sizeof(_v)); _v; })
 
@@ -142,9 +142,11 @@ void __lgwrite(struct lg_cpu *, unsigned long, const void *, unsigned);
 
 int run_guest(struct lg_cpu *cpu, unsigned long __user *user);
 
-/* Helper macros to obtain the first 12 or the last 20 bits, this is only the
+/*
+ * Helper macros to obtain the first 12 or the last 20 bits, this is only the
  * first step in the migration to the kernel types.  pte_pfn is already defined
- * in the kernel. */
+ * in the kernel.
+ */
 #define pgd_flags(x)   (pgd_val(x) & ~PAGE_MASK)
 #define pgd_pfn(x)     (pgd_val(x) >> PAGE_SHIFT)
 #define pmd_flags(x)    (pmd_val(x) & ~PAGE_MASK)