aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-23 22:17:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-23 22:17:27 -0400
commit0e9e3e306c7e472bdcffa34c4c4584301eda03b3 (patch)
treeae273fcf6af4b2a0c463cf3f1e836fa3e066b281 /drivers
parent3185bd26188223195dc2e659a3d00219cad71a0f (diff)
parent801e7fb738c1049d93417dd8c2c4bf9cf567b668 (diff)
Merge tag 'stable/for-linus-3.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Pull xen bug-fixes from Konrad Rzeszutek Wilk: - Fix mysterious SIGSEGV or SIGKILL in applications due to corrupting of the %eip when returning from a signal handler. - Fix various ARM compile issues after the merge fallout. - Continue on making more of the Xen generic code usable by ARM platform. - Fix SR-IOV passthrough to mirror multifunction PCI devices. - Fix various compile warnings. - Remove hypercalls that don't exist anymore. * tag 'stable/for-linus-3.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen: dbgp: Fix warning when CONFIG_PCI is not enabled. xen: arm: comment on why 64-bit xen_pfn_t is safe even on 32 bit xen: balloon: use correct type for frame_list xen/x86: don't corrupt %eip when returning from a signal handler xen: arm: make p2m operations NOPs xen: balloon: don't include e820.h xen: grant: use xen_pfn_t type for frame_list. xen: events: pirq_check_eoi_map is X86 specific xen: XENMEM_translate_gpfn_list was remove ages ago and is unused. xen: sysfs: fix build warning. xen: sysfs: include err.h for PTR_ERR etc xen: xenbus: quirk uses x86 specific cpuid xen PV passthru: assign SR-IOV virtual functions to separate virtual slots xen/xenbus: Fix compile warning. xen/x86: remove duplicated include from enlighten.c
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/balloon.c3
-rw-r--r--drivers/xen/dbgp.c2
-rw-r--r--drivers/xen/events.c4
-rw-r--r--drivers/xen/grant-table.c8
-rw-r--r--drivers/xen/sys-hypervisor.c4
-rw-r--r--drivers/xen/xen-pciback/vpci.c14
-rw-r--r--drivers/xen/xenbus/xenbus_xs.c2
7 files changed, 26 insertions, 11 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 31ab82fda38a..d6886d90ccfd 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -55,7 +55,6 @@
55#include <asm/pgalloc.h> 55#include <asm/pgalloc.h>
56#include <asm/pgtable.h> 56#include <asm/pgtable.h>
57#include <asm/tlb.h> 57#include <asm/tlb.h>
58#include <asm/e820.h>
59 58
60#include <asm/xen/hypervisor.h> 59#include <asm/xen/hypervisor.h>
61#include <asm/xen/hypercall.h> 60#include <asm/xen/hypercall.h>
@@ -88,7 +87,7 @@ struct balloon_stats balloon_stats;
88EXPORT_SYMBOL_GPL(balloon_stats); 87EXPORT_SYMBOL_GPL(balloon_stats);
89 88
90/* We increase/decrease in batches which fit in a page */ 89/* We increase/decrease in batches which fit in a page */
91static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; 90static xen_pfn_t frame_list[PAGE_SIZE / sizeof(unsigned long)];
92 91
93#ifdef CONFIG_HIGHMEM 92#ifdef CONFIG_HIGHMEM
94#define inc_totalhigh_pages() (totalhigh_pages++) 93#define inc_totalhigh_pages() (totalhigh_pages++)
diff --git a/drivers/xen/dbgp.c b/drivers/xen/dbgp.c
index 42569c77ccc8..f3ccc80a455f 100644
--- a/drivers/xen/dbgp.c
+++ b/drivers/xen/dbgp.c
@@ -8,7 +8,9 @@
8 8
9static int xen_dbgp_op(struct usb_hcd *hcd, int op) 9static int xen_dbgp_op(struct usb_hcd *hcd, int op)
10{ 10{
11#ifdef CONFIG_PCI
11 const struct device *ctrlr = hcd_to_bus(hcd)->controller; 12 const struct device *ctrlr = hcd_to_bus(hcd)->controller;
13#endif
12 struct physdev_dbgp_op dbgp; 14 struct physdev_dbgp_op dbgp;
13 15
14 if (!xen_initial_domain()) 16 if (!xen_initial_domain())
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 59e10a1286d5..912ac81b6dbf 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -115,7 +115,9 @@ struct irq_info {
115#define PIRQ_SHAREABLE (1 << 1) 115#define PIRQ_SHAREABLE (1 << 1)
116 116
117static int *evtchn_to_irq; 117static int *evtchn_to_irq;
118#ifdef CONFIG_X86
118static unsigned long *pirq_eoi_map; 119static unsigned long *pirq_eoi_map;
120#endif
119static bool (*pirq_needs_eoi)(unsigned irq); 121static bool (*pirq_needs_eoi)(unsigned irq);
120 122
121static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG], 123static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG],
@@ -277,10 +279,12 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn)
277 return ret; 279 return ret;
278} 280}
279 281
282#ifdef CONFIG_X86
280static bool pirq_check_eoi_map(unsigned irq) 283static bool pirq_check_eoi_map(unsigned irq)
281{ 284{
282 return test_bit(pirq_from_irq(irq), pirq_eoi_map); 285 return test_bit(pirq_from_irq(irq), pirq_eoi_map);
283} 286}
287#endif
284 288
285static bool pirq_needs_eoi_flag(unsigned irq) 289static bool pirq_needs_eoi_flag(unsigned irq)
286{ 290{
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index b2b0a375b348..b91f14e83164 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -84,7 +84,7 @@ struct gnttab_ops {
84 * nr_gframes is the number of frames to map grant table. Returning 84 * nr_gframes is the number of frames to map grant table. Returning
85 * GNTST_okay means success and negative value means failure. 85 * GNTST_okay means success and negative value means failure.
86 */ 86 */
87 int (*map_frames)(unsigned long *frames, unsigned int nr_gframes); 87 int (*map_frames)(xen_pfn_t *frames, unsigned int nr_gframes);
88 /* 88 /*
89 * Release a list of frames which are mapped in map_frames for grant 89 * Release a list of frames which are mapped in map_frames for grant
90 * entry status. 90 * entry status.
@@ -960,7 +960,7 @@ static unsigned nr_status_frames(unsigned nr_grant_frames)
960 return (nr_grant_frames * GREFS_PER_GRANT_FRAME + SPP - 1) / SPP; 960 return (nr_grant_frames * GREFS_PER_GRANT_FRAME + SPP - 1) / SPP;
961} 961}
962 962
963static int gnttab_map_frames_v1(unsigned long *frames, unsigned int nr_gframes) 963static int gnttab_map_frames_v1(xen_pfn_t *frames, unsigned int nr_gframes)
964{ 964{
965 int rc; 965 int rc;
966 966
@@ -977,7 +977,7 @@ static void gnttab_unmap_frames_v1(void)
977 arch_gnttab_unmap(gnttab_shared.addr, nr_grant_frames); 977 arch_gnttab_unmap(gnttab_shared.addr, nr_grant_frames);
978} 978}
979 979
980static int gnttab_map_frames_v2(unsigned long *frames, unsigned int nr_gframes) 980static int gnttab_map_frames_v2(xen_pfn_t *frames, unsigned int nr_gframes)
981{ 981{
982 uint64_t *sframes; 982 uint64_t *sframes;
983 unsigned int nr_sframes; 983 unsigned int nr_sframes;
@@ -1029,7 +1029,7 @@ static void gnttab_unmap_frames_v2(void)
1029static int gnttab_map(unsigned int start_idx, unsigned int end_idx) 1029static int gnttab_map(unsigned int start_idx, unsigned int end_idx)
1030{ 1030{
1031 struct gnttab_setup_table setup; 1031 struct gnttab_setup_table setup;
1032 unsigned long *frames; 1032 xen_pfn_t *frames;
1033 unsigned int nr_gframes = end_idx + 1; 1033 unsigned int nr_gframes = end_idx + 1;
1034 int rc; 1034 int rc;
1035 1035
diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
index 5e5ad7e28858..96453f8a85c5 100644
--- a/drivers/xen/sys-hypervisor.c
+++ b/drivers/xen/sys-hypervisor.c
@@ -11,6 +11,7 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/kobject.h> 13#include <linux/kobject.h>
14#include <linux/err.h>
14 15
15#include <asm/xen/hypervisor.h> 16#include <asm/xen/hypervisor.h>
16#include <asm/xen/hypercall.h> 17#include <asm/xen/hypercall.h>
@@ -284,7 +285,8 @@ static ssize_t virtual_start_show(struct hyp_sysfs_attr *attr, char *buffer)
284 ret = HYPERVISOR_xen_version(XENVER_platform_parameters, 285 ret = HYPERVISOR_xen_version(XENVER_platform_parameters,
285 parms); 286 parms);
286 if (!ret) 287 if (!ret)
287 ret = sprintf(buffer, "%lx\n", parms->virt_start); 288 ret = sprintf(buffer, "%"PRI_xen_ulong"\n",
289 parms->virt_start);
288 kfree(parms); 290 kfree(parms);
289 } 291 }
290 292
diff --git a/drivers/xen/xen-pciback/vpci.c b/drivers/xen/xen-pciback/vpci.c
index 46d140baebd8..0f478ac483cd 100644
--- a/drivers/xen/xen-pciback/vpci.c
+++ b/drivers/xen/xen-pciback/vpci.c
@@ -89,9 +89,15 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev,
89 89
90 mutex_lock(&vpci_dev->lock); 90 mutex_lock(&vpci_dev->lock);
91 91
92 /* Keep multi-function devices together on the virtual PCI bus */ 92 /*
93 for (slot = 0; slot < PCI_SLOT_MAX; slot++) { 93 * Keep multi-function devices together on the virtual PCI bus, except
94 if (!list_empty(&vpci_dev->dev_list[slot])) { 94 * virtual functions.
95 */
96 if (!dev->is_virtfn) {
97 for (slot = 0; slot < PCI_SLOT_MAX; slot++) {
98 if (list_empty(&vpci_dev->dev_list[slot]))
99 continue;
100
95 t = list_entry(list_first(&vpci_dev->dev_list[slot]), 101 t = list_entry(list_first(&vpci_dev->dev_list[slot]),
96 struct pci_dev_entry, list); 102 struct pci_dev_entry, list);
97 103
@@ -116,7 +122,7 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev,
116 pci_name(dev), slot); 122 pci_name(dev), slot);
117 list_add_tail(&dev_entry->list, 123 list_add_tail(&dev_entry->list,
118 &vpci_dev->dev_list[slot]); 124 &vpci_dev->dev_list[slot]);
119 func = PCI_FUNC(dev->devfn); 125 func = dev->is_virtfn ? 0 : PCI_FUNC(dev->devfn);
120 goto unlock; 126 goto unlock;
121 } 127 }
122 } 128 }
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index f5dda83ad7a5..acedeabe589c 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -627,6 +627,7 @@ static struct xenbus_watch *find_watch(const char *token)
627 */ 627 */
628static bool xen_strict_xenbus_quirk(void) 628static bool xen_strict_xenbus_quirk(void)
629{ 629{
630#ifdef CONFIG_X86
630 uint32_t eax, ebx, ecx, edx, base; 631 uint32_t eax, ebx, ecx, edx, base;
631 632
632 base = xen_cpuid_base(); 633 base = xen_cpuid_base();
@@ -634,6 +635,7 @@ static bool xen_strict_xenbus_quirk(void)
634 635
635 if ((eax >> 16) < 4) 636 if ((eax >> 16) < 4)
636 return true; 637 return true;
638#endif
637 return false; 639 return false;
638 640
639} 641}