diff options
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/balloon.c | 12 | ||||
-rw-r--r-- | drivers/xen/events.c | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 2b17ad5b4b32..43f9f02c7db0 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -412,8 +412,16 @@ static int __init balloon_init(void) | |||
412 | 412 | ||
413 | register_balloon(&balloon_sysdev); | 413 | register_balloon(&balloon_sysdev); |
414 | 414 | ||
415 | /* Initialise the balloon with excess memory space. */ | 415 | /* |
416 | extra_pfn_end = min(e820_end_of_ram_pfn(), | 416 | * Initialise the balloon with excess memory space. We need |
417 | * to make sure we don't add memory which doesn't exist or | ||
418 | * logically exist. The E820 map can be trimmed to be smaller | ||
419 | * than the amount of physical memory due to the mem= command | ||
420 | * line parameter. And if this is a 32-bit non-HIGHMEM kernel | ||
421 | * on a system with memory which requires highmem to access, | ||
422 | * don't try to use it. | ||
423 | */ | ||
424 | extra_pfn_end = min(min(max_pfn, e820_end_of_ram_pfn()), | ||
417 | (unsigned long)PFN_DOWN(xen_extra_mem_start + xen_extra_mem_size)); | 425 | (unsigned long)PFN_DOWN(xen_extra_mem_start + xen_extra_mem_size)); |
418 | for (pfn = PFN_UP(xen_extra_mem_start); | 426 | for (pfn = PFN_UP(xen_extra_mem_start); |
419 | pfn < extra_pfn_end; | 427 | pfn < extra_pfn_end; |
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index f34288a5400c..31af0ac31a98 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -427,7 +427,7 @@ static int find_unbound_irq(void) | |||
427 | if (irq == start) | 427 | if (irq == start) |
428 | goto no_irqs; | 428 | goto no_irqs; |
429 | 429 | ||
430 | res = irq_alloc_desc_at(irq, 0); | 430 | res = irq_alloc_desc_at(irq, -1); |
431 | 431 | ||
432 | if (WARN_ON(res != irq)) | 432 | if (WARN_ON(res != irq)) |
433 | return -1; | 433 | return -1; |
@@ -634,7 +634,7 @@ int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name) | |||
634 | if (identity_mapped_irq(gsi) || (!xen_initial_domain() && | 634 | if (identity_mapped_irq(gsi) || (!xen_initial_domain() && |
635 | xen_pv_domain())) { | 635 | xen_pv_domain())) { |
636 | irq = gsi; | 636 | irq = gsi; |
637 | irq_alloc_desc_at(irq, 0); | 637 | irq_alloc_desc_at(irq, -1); |
638 | } else | 638 | } else |
639 | irq = find_unbound_irq(); | 639 | irq = find_unbound_irq(); |
640 | 640 | ||