aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/xen/grant-table.c5
-rw-r--r--arch/x86/xen/grant-table.c10
-rw-r--r--arch/x86/xen/time.c2
3 files changed, 6 insertions, 11 deletions
diff --git a/arch/arm/xen/grant-table.c b/arch/arm/xen/grant-table.c
index 2c4041c9bac5..e43791829ace 100644
--- a/arch/arm/xen/grant-table.c
+++ b/arch/arm/xen/grant-table.c
@@ -49,8 +49,3 @@ int arch_gnttab_init(unsigned long nr_shared)
49{ 49{
50 return 0; 50 return 0;
51} 51}
52
53int arch_gnttab_init(unsigned long nr_shared, unsigned long nr_status)
54{
55 return 0;
56}
diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c
index c0413046483a..1580e7a5a4cf 100644
--- a/arch/x86/xen/grant-table.c
+++ b/arch/x86/xen/grant-table.c
@@ -118,6 +118,7 @@ static int __init xlated_setup_gnttab_pages(void)
118{ 118{
119 struct page **pages; 119 struct page **pages;
120 xen_pfn_t *pfns; 120 xen_pfn_t *pfns;
121 void *vaddr;
121 int rc; 122 int rc;
122 unsigned int i; 123 unsigned int i;
123 unsigned long nr_grant_frames = gnttab_max_grant_frames(); 124 unsigned long nr_grant_frames = gnttab_max_grant_frames();
@@ -143,21 +144,20 @@ static int __init xlated_setup_gnttab_pages(void)
143 for (i = 0; i < nr_grant_frames; i++) 144 for (i = 0; i < nr_grant_frames; i++)
144 pfns[i] = page_to_pfn(pages[i]); 145 pfns[i] = page_to_pfn(pages[i]);
145 146
146 rc = arch_gnttab_map_shared(pfns, nr_grant_frames, nr_grant_frames, 147 vaddr = vmap(pages, nr_grant_frames, 0, PAGE_KERNEL);
147 &xen_auto_xlat_grant_frames.vaddr); 148 if (!vaddr) {
148
149 if (rc) {
150 pr_warn("%s Couldn't map %ld pfns rc:%d\n", __func__, 149 pr_warn("%s Couldn't map %ld pfns rc:%d\n", __func__,
151 nr_grant_frames, rc); 150 nr_grant_frames, rc);
152 free_xenballooned_pages(nr_grant_frames, pages); 151 free_xenballooned_pages(nr_grant_frames, pages);
153 kfree(pages); 152 kfree(pages);
154 kfree(pfns); 153 kfree(pfns);
155 return rc; 154 return -ENOMEM;
156 } 155 }
157 kfree(pages); 156 kfree(pages);
158 157
159 xen_auto_xlat_grant_frames.pfn = pfns; 158 xen_auto_xlat_grant_frames.pfn = pfns;
160 xen_auto_xlat_grant_frames.count = nr_grant_frames; 159 xen_auto_xlat_grant_frames.count = nr_grant_frames;
160 xen_auto_xlat_grant_frames.vaddr = vaddr;
161 161
162 return 0; 162 return 0;
163} 163}
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 7b78f88c1707..5718b0b58b60 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -444,7 +444,7 @@ void xen_setup_timer(int cpu)
444 444
445 irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt, 445 irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,
446 IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER| 446 IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER|
447 IRQF_FORCE_RESUME, 447 IRQF_FORCE_RESUME|IRQF_EARLY_RESUME,
448 name, NULL); 448 name, NULL);
449 (void)xen_set_irq_priority(irq, XEN_IRQ_PRIORITY_MAX); 449 (void)xen_set_irq_priority(irq, XEN_IRQ_PRIORITY_MAX);
450 450