aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 23:13:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 23:13:34 -0500
commitdaedd8708fe7707ed651bb1c83162f25c48a947c (patch)
tree424e9aaa7d6f686b729257e753e4edf91fecb73c
parent6a6662ced4153f6dbcfc40d7225c3cc45416039c (diff)
parent6b71c52e7f848e2c9f804e175215e5965ea90d32 (diff)
Merge branch 'stable/cleanups-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/cleanups-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen: use static initializers in xen-balloon.c Xen: fix braces and tabs coding style issue in xenbus_probe.c Xen: fix braces coding style issue in xenbus_probe.h Xen: fix whitespaces,tabs coding style issue in drivers/xen/pci.c Xen: fix braces coding style issue in gntdev.c and grant-table.c Xen: fix whitespaces,tabs coding style issue in drivers/xen/events.c Xen: fix whitespaces,tabs coding style issue in drivers/xen/balloon.c Fix up trivial whitespace-conflicts in drivers/xen/{balloon.c,pci.c,xenbus/xenbus_probe.c}
-rw-r--r--drivers/xen/balloon.c13
-rw-r--r--drivers/xen/events.c9
-rw-r--r--drivers/xen/gntdev.c3
-rw-r--r--drivers/xen/grant-table.c2
-rw-r--r--drivers/xen/pci.c2
-rw-r--r--drivers/xen/xen-balloon.c17
-rw-r--r--drivers/xen/xenbus/xenbus_probe.c7
-rw-r--r--drivers/xen/xenbus/xenbus_probe.h3
8 files changed, 25 insertions, 31 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 1779338e1d86..a767884a6c7a 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -94,8 +94,8 @@ static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)];
94#define inc_totalhigh_pages() (totalhigh_pages++) 94#define inc_totalhigh_pages() (totalhigh_pages++)
95#define dec_totalhigh_pages() (totalhigh_pages--) 95#define dec_totalhigh_pages() (totalhigh_pages--)
96#else 96#else
97#define inc_totalhigh_pages() do {} while(0) 97#define inc_totalhigh_pages() do {} while (0)
98#define dec_totalhigh_pages() do {} while(0) 98#define dec_totalhigh_pages() do {} while (0)
99#endif 99#endif
100 100
101/* List of ballooned pages, threaded through the mem_map array. */ 101/* List of ballooned pages, threaded through the mem_map array. */
@@ -155,8 +155,7 @@ static struct page *balloon_retrieve(bool prefer_highmem)
155 if (PageHighMem(page)) { 155 if (PageHighMem(page)) {
156 balloon_stats.balloon_high--; 156 balloon_stats.balloon_high--;
157 inc_totalhigh_pages(); 157 inc_totalhigh_pages();
158 } 158 } else
159 else
160 balloon_stats.balloon_low--; 159 balloon_stats.balloon_low--;
161 160
162 totalram_pages++; 161 totalram_pages++;
@@ -423,7 +422,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
423 (unsigned long)__va(pfn << PAGE_SHIFT), 422 (unsigned long)__va(pfn << PAGE_SHIFT),
424 __pte_ma(0), 0); 423 __pte_ma(0), 0);
425 BUG_ON(ret); 424 BUG_ON(ret);
426 } 425 }
427 426
428 } 427 }
429 428
@@ -508,7 +507,7 @@ EXPORT_SYMBOL_GPL(balloon_set_new_target);
508int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem) 507int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem)
509{ 508{
510 int pgno = 0; 509 int pgno = 0;
511 struct page* page; 510 struct page *page;
512 mutex_lock(&balloon_mutex); 511 mutex_lock(&balloon_mutex);
513 while (pgno < nr_pages) { 512 while (pgno < nr_pages) {
514 page = balloon_retrieve(highmem); 513 page = balloon_retrieve(highmem);
@@ -541,7 +540,7 @@ EXPORT_SYMBOL(alloc_xenballooned_pages);
541 * @nr_pages: Number of pages 540 * @nr_pages: Number of pages
542 * @pages: pages to return 541 * @pages: pages to return
543 */ 542 */
544void free_xenballooned_pages(int nr_pages, struct page** pages) 543void free_xenballooned_pages(int nr_pages, struct page **pages)
545{ 544{
546 int i; 545 int i;
547 546
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 0eb8a57cc808..6e075cdd0c6b 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -85,8 +85,7 @@ enum xen_irq_type {
85 * IPI - IPI vector 85 * IPI - IPI vector
86 * EVTCHN - 86 * EVTCHN -
87 */ 87 */
88struct irq_info 88struct irq_info {
89{
90 struct list_head list; 89 struct list_head list;
91 enum xen_irq_type type; /* type */ 90 enum xen_irq_type type; /* type */
92 unsigned irq; 91 unsigned irq;
@@ -282,9 +281,9 @@ static inline unsigned long active_evtchns(unsigned int cpu,
282 struct shared_info *sh, 281 struct shared_info *sh,
283 unsigned int idx) 282 unsigned int idx)
284{ 283{
285 return (sh->evtchn_pending[idx] & 284 return sh->evtchn_pending[idx] &
286 per_cpu(cpu_evtchn_mask, cpu)[idx] & 285 per_cpu(cpu_evtchn_mask, cpu)[idx] &
287 ~sh->evtchn_mask[idx]); 286 ~sh->evtchn_mask[idx];
288} 287}
289 288
290static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) 289static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
@@ -1180,7 +1179,7 @@ static void __xen_evtchn_do_upcall(void)
1180 int cpu = get_cpu(); 1179 int cpu = get_cpu();
1181 struct shared_info *s = HYPERVISOR_shared_info; 1180 struct shared_info *s = HYPERVISOR_shared_info;
1182 struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu); 1181 struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
1183 unsigned count; 1182 unsigned count;
1184 1183
1185 do { 1184 do {
1186 unsigned long pending_words; 1185 unsigned long pending_words;
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 880798aae2f2..39871326afa2 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -193,9 +193,8 @@ static void gntdev_put_map(struct grant_map *map)
193 193
194 atomic_sub(map->count, &pages_mapped); 194 atomic_sub(map->count, &pages_mapped);
195 195
196 if (map->notify.flags & UNMAP_NOTIFY_SEND_EVENT) { 196 if (map->notify.flags & UNMAP_NOTIFY_SEND_EVENT)
197 notify_remote_via_evtchn(map->notify.event); 197 notify_remote_via_evtchn(map->notify.event);
198 }
199 198
200 if (map->pages) { 199 if (map->pages) {
201 if (!use_ptemod) 200 if (!use_ptemod)
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 8c71ab801756..bf1c094f4ebf 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -193,7 +193,7 @@ int gnttab_query_foreign_access(grant_ref_t ref)
193 193
194 nflags = shared[ref].flags; 194 nflags = shared[ref].flags;
195 195
196 return (nflags & (GTF_reading|GTF_writing)); 196 return nflags & (GTF_reading|GTF_writing);
197} 197}
198EXPORT_SYMBOL_GPL(gnttab_query_foreign_access); 198EXPORT_SYMBOL_GPL(gnttab_query_foreign_access);
199 199
diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
index 66057075d6e2..b84bf0b6cc34 100644
--- a/drivers/xen/pci.c
+++ b/drivers/xen/pci.c
@@ -116,7 +116,7 @@ static int xen_add_device(struct device *dev)
116 &manage_pci_ext); 116 &manage_pci_ext);
117 } else { 117 } else {
118 struct physdev_manage_pci manage_pci = { 118 struct physdev_manage_pci manage_pci = {
119 .bus = pci_dev->bus->number, 119 .bus = pci_dev->bus->number,
120 .devfn = pci_dev->devfn, 120 .devfn = pci_dev->devfn,
121 }; 121 };
122 122
diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c
index 5c9dc43c1e94..9cc2259c9992 100644
--- a/drivers/xen/xen-balloon.c
+++ b/drivers/xen/xen-balloon.c
@@ -50,11 +50,6 @@ static struct sys_device balloon_sysdev;
50 50
51static int register_balloon(struct sys_device *sysdev); 51static int register_balloon(struct sys_device *sysdev);
52 52
53static struct xenbus_watch target_watch =
54{
55 .node = "memory/target"
56};
57
58/* React to a change in the target key */ 53/* React to a change in the target key */
59static void watch_target(struct xenbus_watch *watch, 54static void watch_target(struct xenbus_watch *watch,
60 const char **vec, unsigned int len) 55 const char **vec, unsigned int len)
@@ -73,6 +68,11 @@ static void watch_target(struct xenbus_watch *watch,
73 */ 68 */
74 balloon_set_new_target(new_target >> (PAGE_SHIFT - 10)); 69 balloon_set_new_target(new_target >> (PAGE_SHIFT - 10));
75} 70}
71static struct xenbus_watch target_watch = {
72 .node = "memory/target",
73 .callback = watch_target,
74};
75
76 76
77static int balloon_init_watcher(struct notifier_block *notifier, 77static int balloon_init_watcher(struct notifier_block *notifier,
78 unsigned long event, 78 unsigned long event,
@@ -87,7 +87,9 @@ static int balloon_init_watcher(struct notifier_block *notifier,
87 return NOTIFY_DONE; 87 return NOTIFY_DONE;
88} 88}
89 89
90static struct notifier_block xenstore_notifier; 90static struct notifier_block xenstore_notifier = {
91 .notifier_call = balloon_init_watcher,
92};
91 93
92static int __init balloon_init(void) 94static int __init balloon_init(void)
93{ 95{
@@ -100,9 +102,6 @@ static int __init balloon_init(void)
100 102
101 register_xen_selfballooning(&balloon_sysdev); 103 register_xen_selfballooning(&balloon_sysdev);
102 104
103 target_watch.callback = watch_target;
104 xenstore_notifier.notifier_call = balloon_init_watcher;
105
106 register_xenstore_notifier(&xenstore_notifier); 105 register_xenstore_notifier(&xenstore_notifier);
107 106
108 return 0; 107 return 0;
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 0e867eeecb04..1b178c6e8937 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -310,8 +310,7 @@ void xenbus_unregister_driver(struct xenbus_driver *drv)
310} 310}
311EXPORT_SYMBOL_GPL(xenbus_unregister_driver); 311EXPORT_SYMBOL_GPL(xenbus_unregister_driver);
312 312
313struct xb_find_info 313struct xb_find_info {
314{
315 struct xenbus_device *dev; 314 struct xenbus_device *dev;
316 const char *nodename; 315 const char *nodename;
317}; 316};
@@ -640,7 +639,7 @@ int xenbus_dev_cancel(struct device *dev)
640EXPORT_SYMBOL_GPL(xenbus_dev_cancel); 639EXPORT_SYMBOL_GPL(xenbus_dev_cancel);
641 640
642/* A flag to determine if xenstored is 'ready' (i.e. has started) */ 641/* A flag to determine if xenstored is 'ready' (i.e. has started) */
643int xenstored_ready = 0; 642int xenstored_ready;
644 643
645 644
646int register_xenstore_notifier(struct notifier_block *nb) 645int register_xenstore_notifier(struct notifier_block *nb)
@@ -771,7 +770,7 @@ static int __init xenbus_init(void)
771 proc_mkdir("xen", NULL); 770 proc_mkdir("xen", NULL);
772#endif 771#endif
773 772
774 out_error: 773out_error:
775 return err; 774 return err;
776} 775}
777 776
diff --git a/drivers/xen/xenbus/xenbus_probe.h b/drivers/xen/xenbus/xenbus_probe.h
index b814935378c7..9b1de4e34c64 100644
--- a/drivers/xen/xenbus/xenbus_probe.h
+++ b/drivers/xen/xenbus/xenbus_probe.h
@@ -36,8 +36,7 @@
36 36
37#define XEN_BUS_ID_SIZE 20 37#define XEN_BUS_ID_SIZE 20
38 38
39struct xen_bus_type 39struct xen_bus_type {
40{
41 char *root; 40 char *root;
42 unsigned int levels; 41 unsigned int levels;
43 int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename); 42 int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);