diff options
-rw-r--r-- | arch/x86/xen/setup.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/smp.c | 6 | ||||
-rw-r--r-- | drivers/block/xen-blkfront.c | 3 | ||||
-rw-r--r-- | drivers/net/xen-netfront.c | 4 | ||||
-rw-r--r-- | drivers/xen/Kconfig | 5 | ||||
-rw-r--r-- | drivers/xen/events.c | 26 | ||||
-rw-r--r-- | drivers/xen/platform-pci.c | 5 | ||||
-rw-r--r-- | drivers/xen/tmem.c | 21 | ||||
-rw-r--r-- | drivers/xen/xen-acpi-processor.c | 4 | ||||
-rw-r--r-- | include/xen/interface/physdev.h | 21 | ||||
-rw-r--r-- | include/xen/tmem.h | 6 |
11 files changed, 76 insertions, 27 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 12366238d07d..1ba8dff26753 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/pm.h> | 10 | #include <linux/pm.h> |
11 | #include <linux/memblock.h> | 11 | #include <linux/memblock.h> |
12 | #include <linux/cpuidle.h> | 12 | #include <linux/cpuidle.h> |
13 | #include <linux/cpufreq.h> | ||
13 | 14 | ||
14 | #include <asm/elf.h> | 15 | #include <asm/elf.h> |
15 | #include <asm/vdso.h> | 16 | #include <asm/vdso.h> |
@@ -420,6 +421,7 @@ void __init xen_arch_setup(void) | |||
420 | boot_cpu_data.hlt_works_ok = 1; | 421 | boot_cpu_data.hlt_works_ok = 1; |
421 | #endif | 422 | #endif |
422 | disable_cpuidle(); | 423 | disable_cpuidle(); |
424 | disable_cpufreq(); | ||
423 | WARN_ON(set_pm_idle_to_default()); | 425 | WARN_ON(set_pm_idle_to_default()); |
424 | fiddle_vdso(); | 426 | fiddle_vdso(); |
425 | } | 427 | } |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 315d8fa0c8fb..02900e8ce26c 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -75,8 +75,14 @@ static void __cpuinit cpu_bringup(void) | |||
75 | 75 | ||
76 | xen_setup_cpu_clockevents(); | 76 | xen_setup_cpu_clockevents(); |
77 | 77 | ||
78 | notify_cpu_starting(cpu); | ||
79 | |||
80 | ipi_call_lock(); | ||
78 | set_cpu_online(cpu, true); | 81 | set_cpu_online(cpu, true); |
82 | ipi_call_unlock(); | ||
83 | |||
79 | this_cpu_write(cpu_state, CPU_ONLINE); | 84 | this_cpu_write(cpu_state, CPU_ONLINE); |
85 | |||
80 | wmb(); | 86 | wmb(); |
81 | 87 | ||
82 | /* We can take interrupts now: we're officially "up". */ | 88 | /* We can take interrupts now: we're officially "up". */ |
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 2f22874c0a37..d5e1ab956740 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -1475,6 +1475,9 @@ static int __init xlblk_init(void) | |||
1475 | if (!xen_domain()) | 1475 | if (!xen_domain()) |
1476 | return -ENODEV; | 1476 | return -ENODEV; |
1477 | 1477 | ||
1478 | if (!xen_platform_pci_unplug) | ||
1479 | return -ENODEV; | ||
1480 | |||
1478 | if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) { | 1481 | if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) { |
1479 | printk(KERN_WARNING "xen_blk: can't get major %d with name %s\n", | 1482 | printk(KERN_WARNING "xen_blk: can't get major %d with name %s\n", |
1480 | XENVBD_MAJOR, DEV_NAME); | 1483 | XENVBD_MAJOR, DEV_NAME); |
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index b16175032327..663b32c2e931 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <xen/xenbus.h> | 47 | #include <xen/xenbus.h> |
48 | #include <xen/events.h> | 48 | #include <xen/events.h> |
49 | #include <xen/page.h> | 49 | #include <xen/page.h> |
50 | #include <xen/platform_pci.h> | ||
50 | #include <xen/grant_table.h> | 51 | #include <xen/grant_table.h> |
51 | 52 | ||
52 | #include <xen/interface/io/netif.h> | 53 | #include <xen/interface/io/netif.h> |
@@ -1964,6 +1965,9 @@ static int __init netif_init(void) | |||
1964 | if (xen_initial_domain()) | 1965 | if (xen_initial_domain()) |
1965 | return 0; | 1966 | return 0; |
1966 | 1967 | ||
1968 | if (!xen_platform_pci_unplug) | ||
1969 | return -ENODEV; | ||
1970 | |||
1967 | printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); | 1971 | printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); |
1968 | 1972 | ||
1969 | return xenbus_register_frontend(&netfront_driver); | 1973 | return xenbus_register_frontend(&netfront_driver); |
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 648bcd4195c5..94243136f6bf 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig | |||
@@ -180,9 +180,8 @@ config XEN_PRIVCMD | |||
180 | 180 | ||
181 | config XEN_ACPI_PROCESSOR | 181 | config XEN_ACPI_PROCESSOR |
182 | tristate "Xen ACPI processor" | 182 | tristate "Xen ACPI processor" |
183 | depends on XEN && X86 && ACPI_PROCESSOR | 183 | depends on XEN && X86 && ACPI_PROCESSOR && CPU_FREQ |
184 | default y if (X86_ACPI_CPUFREQ = y || X86_POWERNOW_K8 = y) | 184 | default m |
185 | default m if (X86_ACPI_CPUFREQ = m || X86_POWERNOW_K8 = m) | ||
186 | help | 185 | help |
187 | This ACPI processor uploads Power Management information to the Xen hypervisor. | 186 | This ACPI processor uploads Power Management information to the Xen hypervisor. |
188 | 187 | ||
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index e5e5812a1014..4b33acd8ed4e 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/idle.h> | 37 | #include <asm/idle.h> |
38 | #include <asm/io_apic.h> | 38 | #include <asm/io_apic.h> |
39 | #include <asm/sync_bitops.h> | 39 | #include <asm/sync_bitops.h> |
40 | #include <asm/xen/page.h> | ||
40 | #include <asm/xen/pci.h> | 41 | #include <asm/xen/pci.h> |
41 | #include <asm/xen/hypercall.h> | 42 | #include <asm/xen/hypercall.h> |
42 | #include <asm/xen/hypervisor.h> | 43 | #include <asm/xen/hypervisor.h> |
@@ -109,6 +110,8 @@ struct irq_info { | |||
109 | #define PIRQ_SHAREABLE (1 << 1) | 110 | #define PIRQ_SHAREABLE (1 << 1) |
110 | 111 | ||
111 | static int *evtchn_to_irq; | 112 | static int *evtchn_to_irq; |
113 | static unsigned long *pirq_eoi_map; | ||
114 | static bool (*pirq_needs_eoi)(unsigned irq); | ||
112 | 115 | ||
113 | static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG], | 116 | static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG], |
114 | cpu_evtchn_mask); | 117 | cpu_evtchn_mask); |
@@ -269,10 +272,14 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn) | |||
269 | return ret; | 272 | return ret; |
270 | } | 273 | } |
271 | 274 | ||
272 | static bool pirq_needs_eoi(unsigned irq) | 275 | static bool pirq_check_eoi_map(unsigned irq) |
273 | { | 276 | { |
274 | struct irq_info *info = info_for_irq(irq); | 277 | return test_bit(irq, pirq_eoi_map); |
278 | } | ||
275 | 279 | ||
280 | static bool pirq_needs_eoi_flag(unsigned irq) | ||
281 | { | ||
282 | struct irq_info *info = info_for_irq(irq); | ||
276 | BUG_ON(info->type != IRQT_PIRQ); | 283 | BUG_ON(info->type != IRQT_PIRQ); |
277 | 284 | ||
278 | return info->u.pirq.flags & PIRQ_NEEDS_EOI; | 285 | return info->u.pirq.flags & PIRQ_NEEDS_EOI; |
@@ -1768,7 +1775,7 @@ void xen_callback_vector(void) {} | |||
1768 | 1775 | ||
1769 | void __init xen_init_IRQ(void) | 1776 | void __init xen_init_IRQ(void) |
1770 | { | 1777 | { |
1771 | int i; | 1778 | int i, rc; |
1772 | 1779 | ||
1773 | evtchn_to_irq = kcalloc(NR_EVENT_CHANNELS, sizeof(*evtchn_to_irq), | 1780 | evtchn_to_irq = kcalloc(NR_EVENT_CHANNELS, sizeof(*evtchn_to_irq), |
1774 | GFP_KERNEL); | 1781 | GFP_KERNEL); |
@@ -1782,6 +1789,8 @@ void __init xen_init_IRQ(void) | |||
1782 | for (i = 0; i < NR_EVENT_CHANNELS; i++) | 1789 | for (i = 0; i < NR_EVENT_CHANNELS; i++) |
1783 | mask_evtchn(i); | 1790 | mask_evtchn(i); |
1784 | 1791 | ||
1792 | pirq_needs_eoi = pirq_needs_eoi_flag; | ||
1793 | |||
1785 | if (xen_hvm_domain()) { | 1794 | if (xen_hvm_domain()) { |
1786 | xen_callback_vector(); | 1795 | xen_callback_vector(); |
1787 | native_init_IRQ(); | 1796 | native_init_IRQ(); |
@@ -1789,8 +1798,19 @@ void __init xen_init_IRQ(void) | |||
1789 | * __acpi_register_gsi can point at the right function */ | 1798 | * __acpi_register_gsi can point at the right function */ |
1790 | pci_xen_hvm_init(); | 1799 | pci_xen_hvm_init(); |
1791 | } else { | 1800 | } else { |
1801 | struct physdev_pirq_eoi_gmfn eoi_gmfn; | ||
1802 | |||
1792 | irq_ctx_init(smp_processor_id()); | 1803 | irq_ctx_init(smp_processor_id()); |
1793 | if (xen_initial_domain()) | 1804 | if (xen_initial_domain()) |
1794 | pci_xen_initial_domain(); | 1805 | pci_xen_initial_domain(); |
1806 | |||
1807 | pirq_eoi_map = (void *)__get_free_page(GFP_KERNEL|__GFP_ZERO); | ||
1808 | eoi_gmfn.gmfn = virt_to_mfn(pirq_eoi_map); | ||
1809 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn_v2, &eoi_gmfn); | ||
1810 | if (rc != 0) { | ||
1811 | free_page((unsigned long) pirq_eoi_map); | ||
1812 | pirq_eoi_map = NULL; | ||
1813 | } else | ||
1814 | pirq_needs_eoi = pirq_check_eoi_map; | ||
1795 | } | 1815 | } |
1796 | } | 1816 | } |
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index 319dd0a94d51..2389e581e23c 100644 --- a/drivers/xen/platform-pci.c +++ b/drivers/xen/platform-pci.c | |||
@@ -186,11 +186,6 @@ static struct pci_driver platform_driver = { | |||
186 | 186 | ||
187 | static int __init platform_pci_module_init(void) | 187 | static int __init platform_pci_module_init(void) |
188 | { | 188 | { |
189 | /* no unplug has been done, IGNORE hasn't been specified: just | ||
190 | * return now */ | ||
191 | if (!xen_platform_pci_unplug) | ||
192 | return -ENODEV; | ||
193 | |||
194 | return pci_register_driver(&platform_driver); | 189 | return pci_register_driver(&platform_driver); |
195 | } | 190 | } |
196 | 191 | ||
diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index 17d9e37beba4..dcb79521e6c8 100644 --- a/drivers/xen/tmem.c +++ b/drivers/xen/tmem.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
12 | #include <linux/module.h> | ||
13 | #include <linux/cleancache.h> | 12 | #include <linux/cleancache.h> |
14 | 13 | ||
15 | /* temporary ifdef until include/linux/frontswap.h is upstream */ | 14 | /* temporary ifdef until include/linux/frontswap.h is upstream */ |
@@ -128,15 +127,13 @@ static int xen_tmem_flush_object(u32 pool_id, struct tmem_oid oid) | |||
128 | return xen_tmem_op(TMEM_FLUSH_OBJECT, pool_id, oid, 0, 0, 0, 0, 0); | 127 | return xen_tmem_op(TMEM_FLUSH_OBJECT, pool_id, oid, 0, 0, 0, 0, 0); |
129 | } | 128 | } |
130 | 129 | ||
131 | int tmem_enabled __read_mostly; | 130 | bool __read_mostly tmem_enabled = false; |
132 | EXPORT_SYMBOL(tmem_enabled); | ||
133 | 131 | ||
134 | static int __init enable_tmem(char *s) | 132 | static int __init enable_tmem(char *s) |
135 | { | 133 | { |
136 | tmem_enabled = 1; | 134 | tmem_enabled = true; |
137 | return 1; | 135 | return 1; |
138 | } | 136 | } |
139 | |||
140 | __setup("tmem", enable_tmem); | 137 | __setup("tmem", enable_tmem); |
141 | 138 | ||
142 | #ifdef CONFIG_CLEANCACHE | 139 | #ifdef CONFIG_CLEANCACHE |
@@ -229,17 +226,16 @@ static int tmem_cleancache_init_shared_fs(char *uuid, size_t pagesize) | |||
229 | return xen_tmem_new_pool(shared_uuid, TMEM_POOL_SHARED, pagesize); | 226 | return xen_tmem_new_pool(shared_uuid, TMEM_POOL_SHARED, pagesize); |
230 | } | 227 | } |
231 | 228 | ||
232 | static int use_cleancache = 1; | 229 | static bool __initdata use_cleancache = true; |
233 | 230 | ||
234 | static int __init no_cleancache(char *s) | 231 | static int __init no_cleancache(char *s) |
235 | { | 232 | { |
236 | use_cleancache = 0; | 233 | use_cleancache = false; |
237 | return 1; | 234 | return 1; |
238 | } | 235 | } |
239 | |||
240 | __setup("nocleancache", no_cleancache); | 236 | __setup("nocleancache", no_cleancache); |
241 | 237 | ||
242 | static struct cleancache_ops tmem_cleancache_ops = { | 238 | static struct cleancache_ops __initdata tmem_cleancache_ops = { |
243 | .put_page = tmem_cleancache_put_page, | 239 | .put_page = tmem_cleancache_put_page, |
244 | .get_page = tmem_cleancache_get_page, | 240 | .get_page = tmem_cleancache_get_page, |
245 | .invalidate_page = tmem_cleancache_flush_page, | 241 | .invalidate_page = tmem_cleancache_flush_page, |
@@ -356,17 +352,16 @@ static void tmem_frontswap_init(unsigned ignored) | |||
356 | xen_tmem_new_pool(private, TMEM_POOL_PERSIST, PAGE_SIZE); | 352 | xen_tmem_new_pool(private, TMEM_POOL_PERSIST, PAGE_SIZE); |
357 | } | 353 | } |
358 | 354 | ||
359 | static int __initdata use_frontswap = 1; | 355 | static bool __initdata use_frontswap = true; |
360 | 356 | ||
361 | static int __init no_frontswap(char *s) | 357 | static int __init no_frontswap(char *s) |
362 | { | 358 | { |
363 | use_frontswap = 0; | 359 | use_frontswap = false; |
364 | return 1; | 360 | return 1; |
365 | } | 361 | } |
366 | |||
367 | __setup("nofrontswap", no_frontswap); | 362 | __setup("nofrontswap", no_frontswap); |
368 | 363 | ||
369 | static struct frontswap_ops tmem_frontswap_ops = { | 364 | static struct frontswap_ops __initdata tmem_frontswap_ops = { |
370 | .put_page = tmem_frontswap_put_page, | 365 | .put_page = tmem_frontswap_put_page, |
371 | .get_page = tmem_frontswap_get_page, | 366 | .get_page = tmem_frontswap_get_page, |
372 | .invalidate_page = tmem_frontswap_flush_page, | 367 | .invalidate_page = tmem_frontswap_flush_page, |
diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c index 5c2be963aa18..174b5653cd8a 100644 --- a/drivers/xen/xen-acpi-processor.c +++ b/drivers/xen/xen-acpi-processor.c | |||
@@ -501,11 +501,11 @@ static int __init xen_acpi_processor_init(void) | |||
501 | 501 | ||
502 | perf = per_cpu_ptr(acpi_perf_data, i); | 502 | perf = per_cpu_ptr(acpi_perf_data, i); |
503 | rc = acpi_processor_register_performance(perf, i); | 503 | rc = acpi_processor_register_performance(perf, i); |
504 | if (WARN_ON(rc)) | 504 | if (rc) |
505 | goto err_out; | 505 | goto err_out; |
506 | } | 506 | } |
507 | rc = acpi_processor_notify_smm(THIS_MODULE); | 507 | rc = acpi_processor_notify_smm(THIS_MODULE); |
508 | if (WARN_ON(rc)) | 508 | if (rc) |
509 | goto err_unregister; | 509 | goto err_unregister; |
510 | 510 | ||
511 | for_each_possible_cpu(i) { | 511 | for_each_possible_cpu(i) { |
diff --git a/include/xen/interface/physdev.h b/include/xen/interface/physdev.h index 0c28989007fb..9ce788d8cf49 100644 --- a/include/xen/interface/physdev.h +++ b/include/xen/interface/physdev.h | |||
@@ -39,6 +39,27 @@ struct physdev_eoi { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * Register a shared page for the hypervisor to indicate whether the guest | ||
43 | * must issue PHYSDEVOP_eoi. The semantics of PHYSDEVOP_eoi change slightly | ||
44 | * once the guest used this function in that the associated event channel | ||
45 | * will automatically get unmasked. The page registered is used as a bit | ||
46 | * array indexed by Xen's PIRQ value. | ||
47 | */ | ||
48 | #define PHYSDEVOP_pirq_eoi_gmfn_v1 17 | ||
49 | /* | ||
50 | * Register a shared page for the hypervisor to indicate whether the | ||
51 | * guest must issue PHYSDEVOP_eoi. This hypercall is very similar to | ||
52 | * PHYSDEVOP_pirq_eoi_gmfn_v1 but it doesn't change the semantics of | ||
53 | * PHYSDEVOP_eoi. The page registered is used as a bit array indexed by | ||
54 | * Xen's PIRQ value. | ||
55 | */ | ||
56 | #define PHYSDEVOP_pirq_eoi_gmfn_v2 28 | ||
57 | struct physdev_pirq_eoi_gmfn { | ||
58 | /* IN */ | ||
59 | unsigned long gmfn; | ||
60 | }; | ||
61 | |||
62 | /* | ||
42 | * Query the status of an IRQ line. | 63 | * Query the status of an IRQ line. |
43 | * @arg == pointer to physdev_irq_status_query structure. | 64 | * @arg == pointer to physdev_irq_status_query structure. |
44 | */ | 65 | */ |
diff --git a/include/xen/tmem.h b/include/xen/tmem.h index 82e2c83a32f5..591550a22ac7 100644 --- a/include/xen/tmem.h +++ b/include/xen/tmem.h | |||
@@ -1,5 +1,9 @@ | |||
1 | #ifndef _XEN_TMEM_H | 1 | #ifndef _XEN_TMEM_H |
2 | #define _XEN_TMEM_H | 2 | #define _XEN_TMEM_H |
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
3 | /* defined in drivers/xen/tmem.c */ | 6 | /* defined in drivers/xen/tmem.c */ |
4 | extern int tmem_enabled; | 7 | extern bool tmem_enabled; |
8 | |||
5 | #endif /* _XEN_TMEM_H */ | 9 | #endif /* _XEN_TMEM_H */ |