diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-04-18 15:52:50 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-04-18 15:52:50 -0400 |
commit | 681e4a5e13c1c8315694eb4f44e0cdd84c9082d2 (patch) | |
tree | 699f14527c118859026e8ce0214e689d0b9c88cb /drivers/xen | |
parent | b960d6c43a63ebd2d8518b328da3816b833ee8cc (diff) | |
parent | c104f1fa1ecf4ee0fc06e31b1f77630b2551be81 (diff) |
Merge commit 'c104f1fa1ecf4ee0fc06e31b1f77630b2551be81' into stable/for-linus-3.4
* commit 'c104f1fa1ecf4ee0fc06e31b1f77630b2551be81': (14566 commits)
cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS
sparc64: Eliminate obsolete __handle_softirq() function
sparc64: Fix bootup crash on sun4v.
kconfig: delete last traces of __enabled_ from autoconf.h
Revert "kconfig: fix __enabled_ macros definition for invisible and un-selected symbols"
kconfig: fix IS_ENABLED to not require all options to be defined
irq_domain: fix type mismatch in debugfs output format
staging: android: fix mem leaks in __persistent_ram_init()
staging: vt6656: Don't leak memory in drivers/staging/vt6656/ioctl.c::private_ioctl()
staging: iio: hmc5843: Fix crash in probe function.
panic: fix stack dump print on direct call to panic()
drivers/rtc/rtc-pl031.c: enable clock on all ST variants
Revert "mm: vmscan: fix misused nr_reclaimed in shrink_mem_cgroup_zone()"
hugetlb: fix race condition in hugetlb_fault()
drivers/rtc/rtc-twl.c: use static register while reading time
drivers/rtc/rtc-s3c.c: add placeholder for driver private data
drivers/rtc/rtc-s3c.c: fix compilation error
MAINTAINERS: add PCDP console maintainer
memcg: do not open code accesses to res_counter members
drivers/rtc/rtc-efi.c: fix section mismatch warning
...
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/biomerge.c | 2 | ||||
-rw-r--r-- | drivers/xen/cpu_hotplug.c | 3 | ||||
-rw-r--r-- | drivers/xen/grant-table.c | 7 | ||||
-rw-r--r-- | drivers/xen/manage.c | 6 | ||||
-rw-r--r-- | drivers/xen/swiotlb-xen.c | 5 | ||||
-rw-r--r-- | drivers/xen/tmem.c | 10 | ||||
-rw-r--r-- | drivers/xen/xen-balloon.c | 2 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/conf_space.c | 2 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/pci_stub.c | 8 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/xenbus.c | 7 | ||||
-rw-r--r-- | drivers/xen/xenbus/xenbus_dev_frontend.c | 4 |
11 files changed, 34 insertions, 22 deletions
diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c index ba6eda4b5143..0edb91c0de6b 100644 --- a/drivers/xen/biomerge.c +++ b/drivers/xen/biomerge.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/bio.h> | 1 | #include <linux/bio.h> |
2 | #include <linux/io.h> | 2 | #include <linux/io.h> |
3 | #include <linux/export.h> | ||
3 | #include <xen/page.h> | 4 | #include <xen/page.h> |
4 | 5 | ||
5 | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, | 6 | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, |
@@ -11,3 +12,4 @@ bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, | |||
11 | return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && | 12 | return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && |
12 | ((mfn1 == mfn2) || ((mfn1+1) == mfn2)); | 13 | ((mfn1 == mfn2) || ((mfn1+1) == mfn2)); |
13 | } | 14 | } |
15 | EXPORT_SYMBOL(xen_biovec_phys_mergeable); | ||
diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c index 14e2d995e958..4dcfced107f5 100644 --- a/drivers/xen/cpu_hotplug.c +++ b/drivers/xen/cpu_hotplug.c | |||
@@ -30,7 +30,8 @@ static int vcpu_online(unsigned int cpu) | |||
30 | sprintf(dir, "cpu/%u", cpu); | 30 | sprintf(dir, "cpu/%u", cpu); |
31 | err = xenbus_scanf(XBT_NIL, dir, "availability", "%s", state); | 31 | err = xenbus_scanf(XBT_NIL, dir, "availability", "%s", state); |
32 | if (err != 1) { | 32 | if (err != 1) { |
33 | printk(KERN_ERR "XENBUS: Unable to read cpu state\n"); | 33 | if (!xen_initial_domain()) |
34 | printk(KERN_ERR "XENBUS: Unable to read cpu state\n"); | ||
34 | return err; | 35 | return err; |
35 | } | 36 | } |
36 | 37 | ||
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index f805918a993f..f100ce20b16b 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
@@ -948,9 +948,12 @@ static void gnttab_request_version(void) | |||
948 | int rc; | 948 | int rc; |
949 | struct gnttab_set_version gsv; | 949 | struct gnttab_set_version gsv; |
950 | 950 | ||
951 | gsv.version = 2; | 951 | if (xen_hvm_domain()) |
952 | gsv.version = 1; | ||
953 | else | ||
954 | gsv.version = 2; | ||
952 | rc = HYPERVISOR_grant_table_op(GNTTABOP_set_version, &gsv, 1); | 955 | rc = HYPERVISOR_grant_table_op(GNTTABOP_set_version, &gsv, 1); |
953 | if (rc == 0) { | 956 | if (rc == 0 && gsv.version == 2) { |
954 | grant_table_version = 2; | 957 | grant_table_version = 2; |
955 | gnttab_interface = &gnttab_v2_ops; | 958 | gnttab_interface = &gnttab_v2_ops; |
956 | } else if (grant_table_version == 2) { | 959 | } else if (grant_table_version == 2) { |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index ce4fa0831860..9e14ae6cd49c 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -129,9 +129,9 @@ static void do_suspend(void) | |||
129 | printk(KERN_DEBUG "suspending xenstore...\n"); | 129 | printk(KERN_DEBUG "suspending xenstore...\n"); |
130 | xs_suspend(); | 130 | xs_suspend(); |
131 | 131 | ||
132 | err = dpm_suspend_noirq(PMSG_FREEZE); | 132 | err = dpm_suspend_end(PMSG_FREEZE); |
133 | if (err) { | 133 | if (err) { |
134 | printk(KERN_ERR "dpm_suspend_noirq failed: %d\n", err); | 134 | printk(KERN_ERR "dpm_suspend_end failed: %d\n", err); |
135 | goto out_resume; | 135 | goto out_resume; |
136 | } | 136 | } |
137 | 137 | ||
@@ -149,7 +149,7 @@ static void do_suspend(void) | |||
149 | 149 | ||
150 | err = stop_machine(xen_suspend, &si, cpumask_of(0)); | 150 | err = stop_machine(xen_suspend, &si, cpumask_of(0)); |
151 | 151 | ||
152 | dpm_resume_noirq(si.cancelled ? PMSG_THAW : PMSG_RESTORE); | 152 | dpm_resume_start(si.cancelled ? PMSG_THAW : PMSG_RESTORE); |
153 | 153 | ||
154 | if (err) { | 154 | if (err) { |
155 | printk(KERN_ERR "failed to start xen_suspend: %d\n", err); | 155 | printk(KERN_ERR "failed to start xen_suspend: %d\n", err); |
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 19e6a2041371..1afb4fba11b4 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
@@ -204,7 +204,8 @@ error: | |||
204 | 204 | ||
205 | void * | 205 | void * |
206 | xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, | 206 | xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
207 | dma_addr_t *dma_handle, gfp_t flags) | 207 | dma_addr_t *dma_handle, gfp_t flags, |
208 | struct dma_attrs *attrs) | ||
208 | { | 209 | { |
209 | void *ret; | 210 | void *ret; |
210 | int order = get_order(size); | 211 | int order = get_order(size); |
@@ -253,7 +254,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_alloc_coherent); | |||
253 | 254 | ||
254 | void | 255 | void |
255 | xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr, | 256 | xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr, |
256 | dma_addr_t dev_addr) | 257 | dma_addr_t dev_addr, struct dma_attrs *attrs) |
257 | { | 258 | { |
258 | int order = get_order(size); | 259 | int order = get_order(size); |
259 | phys_addr_t phys; | 260 | phys_addr_t phys; |
diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index 6a8f76dd5a22..dcb79521e6c8 100644 --- a/drivers/xen/tmem.c +++ b/drivers/xen/tmem.c | |||
@@ -238,9 +238,9 @@ __setup("nocleancache", no_cleancache); | |||
238 | static struct cleancache_ops __initdata tmem_cleancache_ops = { | 238 | static struct cleancache_ops __initdata tmem_cleancache_ops = { |
239 | .put_page = tmem_cleancache_put_page, | 239 | .put_page = tmem_cleancache_put_page, |
240 | .get_page = tmem_cleancache_get_page, | 240 | .get_page = tmem_cleancache_get_page, |
241 | .flush_page = tmem_cleancache_flush_page, | 241 | .invalidate_page = tmem_cleancache_flush_page, |
242 | .flush_inode = tmem_cleancache_flush_inode, | 242 | .invalidate_inode = tmem_cleancache_flush_inode, |
243 | .flush_fs = tmem_cleancache_flush_fs, | 243 | .invalidate_fs = tmem_cleancache_flush_fs, |
244 | .init_shared_fs = tmem_cleancache_init_shared_fs, | 244 | .init_shared_fs = tmem_cleancache_init_shared_fs, |
245 | .init_fs = tmem_cleancache_init_fs | 245 | .init_fs = tmem_cleancache_init_fs |
246 | }; | 246 | }; |
@@ -364,8 +364,8 @@ __setup("nofrontswap", no_frontswap); | |||
364 | static struct frontswap_ops __initdata tmem_frontswap_ops = { | 364 | static struct frontswap_ops __initdata tmem_frontswap_ops = { |
365 | .put_page = tmem_frontswap_put_page, | 365 | .put_page = tmem_frontswap_put_page, |
366 | .get_page = tmem_frontswap_get_page, | 366 | .get_page = tmem_frontswap_get_page, |
367 | .flush_page = tmem_frontswap_flush_page, | 367 | .invalidate_page = tmem_frontswap_flush_page, |
368 | .flush_area = tmem_frontswap_flush_area, | 368 | .invalidate_area = tmem_frontswap_flush_area, |
369 | .init = tmem_frontswap_init | 369 | .init = tmem_frontswap_init |
370 | }; | 370 | }; |
371 | #endif | 371 | #endif |
diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c index 3f7922ec13e3..8f37e23f6d13 100644 --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c | |||
@@ -221,7 +221,7 @@ static int register_balloon(struct device *dev) | |||
221 | { | 221 | { |
222 | int i, error; | 222 | int i, error; |
223 | 223 | ||
224 | error = bus_register(&balloon_subsys); | 224 | error = subsys_system_register(&balloon_subsys, NULL); |
225 | if (error) | 225 | if (error) |
226 | return error; | 226 | return error; |
227 | 227 | ||
diff --git a/drivers/xen/xen-pciback/conf_space.c b/drivers/xen/xen-pciback/conf_space.c index 52fed16d8701..30d7be026c18 100644 --- a/drivers/xen/xen-pciback/conf_space.c +++ b/drivers/xen/xen-pciback/conf_space.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include "conf_space.h" | 16 | #include "conf_space.h" |
17 | #include "conf_space_quirks.h" | 17 | #include "conf_space_quirks.h" |
18 | 18 | ||
19 | static int permissive; | 19 | static bool permissive; |
20 | module_param(permissive, bool, 0644); | 20 | module_param(permissive, bool, 0644); |
21 | 21 | ||
22 | /* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word, | 22 | /* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word, |
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c index 6f63b9d954fb..097e536e8672 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c | |||
@@ -919,7 +919,7 @@ static inline int str_to_quirk(const char *buf, int *domain, int *bus, int | |||
919 | int err; | 919 | int err; |
920 | 920 | ||
921 | err = | 921 | err = |
922 | sscanf(buf, " %04x:%02x:%02x.%1x-%08x:%1x:%08x", domain, bus, slot, | 922 | sscanf(buf, " %04x:%02x:%02x.%d-%08x:%1x:%08x", domain, bus, slot, |
923 | func, reg, size, mask); | 923 | func, reg, size, mask); |
924 | if (err == 7) | 924 | if (err == 7) |
925 | return 0; | 925 | return 0; |
@@ -939,7 +939,7 @@ static int pcistub_device_id_add(int domain, int bus, int slot, int func) | |||
939 | pci_dev_id->bus = bus; | 939 | pci_dev_id->bus = bus; |
940 | pci_dev_id->devfn = PCI_DEVFN(slot, func); | 940 | pci_dev_id->devfn = PCI_DEVFN(slot, func); |
941 | 941 | ||
942 | pr_debug(DRV_NAME ": wants to seize %04x:%02x:%02x.%01x\n", | 942 | pr_debug(DRV_NAME ": wants to seize %04x:%02x:%02x.%d\n", |
943 | domain, bus, slot, func); | 943 | domain, bus, slot, func); |
944 | 944 | ||
945 | spin_lock_irqsave(&device_ids_lock, flags); | 945 | spin_lock_irqsave(&device_ids_lock, flags); |
@@ -969,7 +969,7 @@ static int pcistub_device_id_remove(int domain, int bus, int slot, int func) | |||
969 | 969 | ||
970 | err = 0; | 970 | err = 0; |
971 | 971 | ||
972 | pr_debug(DRV_NAME ": removed %04x:%02x:%02x.%01x from " | 972 | pr_debug(DRV_NAME ": removed %04x:%02x:%02x.%d from " |
973 | "seize list\n", domain, bus, slot, func); | 973 | "seize list\n", domain, bus, slot, func); |
974 | } | 974 | } |
975 | } | 975 | } |
@@ -1064,7 +1064,7 @@ static ssize_t pcistub_slot_show(struct device_driver *drv, char *buf) | |||
1064 | break; | 1064 | break; |
1065 | 1065 | ||
1066 | count += scnprintf(buf + count, PAGE_SIZE - count, | 1066 | count += scnprintf(buf + count, PAGE_SIZE - count, |
1067 | "%04x:%02x:%02x.%01x\n", | 1067 | "%04x:%02x:%02x.%d\n", |
1068 | pci_dev_id->domain, pci_dev_id->bus, | 1068 | pci_dev_id->domain, pci_dev_id->bus, |
1069 | PCI_SLOT(pci_dev_id->devfn), | 1069 | PCI_SLOT(pci_dev_id->devfn), |
1070 | PCI_FUNC(pci_dev_id->devfn)); | 1070 | PCI_FUNC(pci_dev_id->devfn)); |
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c index 8e1c44d8ab46..64b11f99eacc 100644 --- a/drivers/xen/xen-pciback/xenbus.c +++ b/drivers/xen/xen-pciback/xenbus.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #define INVALID_EVTCHN_IRQ (-1) | 16 | #define INVALID_EVTCHN_IRQ (-1) |
17 | struct workqueue_struct *xen_pcibk_wq; | 17 | struct workqueue_struct *xen_pcibk_wq; |
18 | 18 | ||
19 | static int __read_mostly passthrough; | 19 | static bool __read_mostly passthrough; |
20 | module_param(passthrough, bool, S_IRUGO); | 20 | module_param(passthrough, bool, S_IRUGO); |
21 | MODULE_PARM_DESC(passthrough, | 21 | MODULE_PARM_DESC(passthrough, |
22 | "Option to specify how to export PCI topology to guest:\n"\ | 22 | "Option to specify how to export PCI topology to guest:\n"\ |
@@ -206,6 +206,7 @@ static int xen_pcibk_publish_pci_dev(struct xen_pcibk_device *pdev, | |||
206 | goto out; | 206 | goto out; |
207 | } | 207 | } |
208 | 208 | ||
209 | /* Note: The PV protocol uses %02x, don't change it */ | ||
209 | err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str, | 210 | err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str, |
210 | "%04x:%02x:%02x.%02x", domain, bus, | 211 | "%04x:%02x:%02x.%02x", domain, bus, |
211 | PCI_SLOT(devfn), PCI_FUNC(devfn)); | 212 | PCI_SLOT(devfn), PCI_FUNC(devfn)); |
@@ -229,7 +230,7 @@ static int xen_pcibk_export_device(struct xen_pcibk_device *pdev, | |||
229 | err = -EINVAL; | 230 | err = -EINVAL; |
230 | xenbus_dev_fatal(pdev->xdev, err, | 231 | xenbus_dev_fatal(pdev->xdev, err, |
231 | "Couldn't locate PCI device " | 232 | "Couldn't locate PCI device " |
232 | "(%04x:%02x:%02x.%01x)! " | 233 | "(%04x:%02x:%02x.%d)! " |
233 | "perhaps already in-use?", | 234 | "perhaps already in-use?", |
234 | domain, bus, slot, func); | 235 | domain, bus, slot, func); |
235 | goto out; | 236 | goto out; |
@@ -274,7 +275,7 @@ static int xen_pcibk_remove_device(struct xen_pcibk_device *pdev, | |||
274 | if (!dev) { | 275 | if (!dev) { |
275 | err = -EINVAL; | 276 | err = -EINVAL; |
276 | dev_dbg(&pdev->xdev->dev, "Couldn't locate PCI device " | 277 | dev_dbg(&pdev->xdev->dev, "Couldn't locate PCI device " |
277 | "(%04x:%02x:%02x.%01x)! not owned by this domain\n", | 278 | "(%04x:%02x:%02x.%d)! not owned by this domain\n", |
278 | domain, bus, slot, func); | 279 | domain, bus, slot, func); |
279 | goto out; | 280 | goto out; |
280 | } | 281 | } |
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c index 527dc2a3b89f..89f76252a16f 100644 --- a/drivers/xen/xenbus/xenbus_dev_frontend.c +++ b/drivers/xen/xenbus/xenbus_dev_frontend.c | |||
@@ -369,6 +369,10 @@ static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u) | |||
369 | goto out; | 369 | goto out; |
370 | } | 370 | } |
371 | token++; | 371 | token++; |
372 | if (memchr(token, 0, u->u.msg.len - (token - path)) == NULL) { | ||
373 | rc = -EILSEQ; | ||
374 | goto out; | ||
375 | } | ||
372 | 376 | ||
373 | if (msg_type == XS_WATCH) { | 377 | if (msg_type == XS_WATCH) { |
374 | watch = alloc_watch_adapter(path, token); | 378 | watch = alloc_watch_adapter(path, token); |