aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lg.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-07-30 18:03:46 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-07-30 02:33:46 -0400
commit1842f23c05b6a866be831aa60bc8a8731c58ddd0 (patch)
tree8047f21d149b3958b5c4278c1a5601ddce9e0e4b /drivers/lguest/lg.h
parenta91d74a3c4de8115295ee87350c13a329164aaaf (diff)
lguest and virtio: cleanup struct definitions to Linux style.
I've been doing this for years, and akpm picked me up on it about 12 months ago. lguest partly serves as example code, so let's do it Right. Also, remove two unused fields in struct vblk_info in the example launcher. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@redhat.com>
Diffstat (limited to 'drivers/lguest/lg.h')
-rw-r--r--drivers/lguest/lg.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index 74c0db691b53..bc28745d05af 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -16,15 +16,13 @@
16void free_pagetables(void); 16void free_pagetables(void);
17int init_pagetables(struct page **switcher_page, unsigned int pages); 17int init_pagetables(struct page **switcher_page, unsigned int pages);
18 18
19struct pgdir 19struct pgdir {
20{
21 unsigned long gpgdir; 20 unsigned long gpgdir;
22 pgd_t *pgdir; 21 pgd_t *pgdir;
23}; 22};
24 23
25/* We have two pages shared with guests, per cpu. */ 24/* We have two pages shared with guests, per cpu. */
26struct lguest_pages 25struct lguest_pages {
27{
28 /* This is the stack page mapped rw in guest */ 26 /* This is the stack page mapped rw in guest */
29 char spare[PAGE_SIZE - sizeof(struct lguest_regs)]; 27 char spare[PAGE_SIZE - sizeof(struct lguest_regs)];
30 struct lguest_regs regs; 28 struct lguest_regs regs;
@@ -89,8 +87,7 @@ struct lg_eventfd_map {
89}; 87};
90 88
91/* The private info the thread maintains about the guest. */ 89/* The private info the thread maintains about the guest. */
92struct lguest 90struct lguest {
93{
94 struct lguest_data __user *lguest_data; 91 struct lguest_data __user *lguest_data;
95 struct lg_cpu cpus[NR_CPUS]; 92 struct lg_cpu cpus[NR_CPUS];
96 unsigned int nr_cpus; 93 unsigned int nr_cpus;