Merge branches 'upstream/core' and 'upstream/bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
* 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: xen: allocate irq descs on any NUMA node xen: prevent crashes with non-HIGHMEM 32-bit kernels with largeish memory xen: use default_idle xen: clean up "extra" memory handling some more * 'upstream/bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: xen: x86/32: perform initial startup on initial_page_table xen: don't bother to stop other cpus on shutdown/reboot
This commit is contained in:
commit
8338fded13
|
@ -1021,10 +1021,6 @@ static void xen_reboot(int reason)
|
|||
{
|
||||
struct sched_shutdown r = { .reason = reason };
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
stop_other_cpus();
|
||||
#endif
|
||||
|
||||
if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r))
|
||||
BUG();
|
||||
}
|
||||
|
|
|
@ -181,24 +181,21 @@ char * __init xen_memory_setup(void)
|
|||
for (i = 0; i < memmap.nr_entries; i++) {
|
||||
unsigned long long end = map[i].addr + map[i].size;
|
||||
|
||||
if (map[i].type == E820_RAM) {
|
||||
if (map[i].addr < mem_end && end > mem_end) {
|
||||
/* Truncate region to max_mem. */
|
||||
u64 delta = end - mem_end;
|
||||
if (map[i].type == E820_RAM && end > mem_end) {
|
||||
/* RAM off the end - may be partially included */
|
||||
u64 delta = min(map[i].size, end - mem_end);
|
||||
|
||||
map[i].size -= delta;
|
||||
end -= delta;
|
||||
|
||||
extra_pages += PFN_DOWN(delta);
|
||||
|
||||
end = mem_end;
|
||||
}
|
||||
}
|
||||
|
||||
if (end > xen_extra_mem_start)
|
||||
if (map[i].size > 0 && end > xen_extra_mem_start)
|
||||
xen_extra_mem_start = end;
|
||||
|
||||
/* If region is non-RAM or below mem_end, add what remains */
|
||||
if ((map[i].type != E820_RAM || map[i].addr < mem_end) &&
|
||||
map[i].size > 0)
|
||||
/* Add region if any remains */
|
||||
if (map[i].size > 0)
|
||||
e820_add_region(map[i].addr, map[i].size, map[i].type);
|
||||
}
|
||||
|
||||
|
@ -252,20 +249,6 @@ char * __init xen_memory_setup(void)
|
|||
return "Xen";
|
||||
}
|
||||
|
||||
static void xen_idle(void)
|
||||
{
|
||||
local_irq_disable();
|
||||
|
||||
if (need_resched())
|
||||
local_irq_enable();
|
||||
else {
|
||||
current_thread_info()->status &= ~TS_POLLING;
|
||||
smp_mb__after_clear_bit();
|
||||
safe_halt();
|
||||
current_thread_info()->status |= TS_POLLING;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the bit indicating "nosegneg" library variants should be used.
|
||||
* We only need to bother in pure 32-bit mode; compat 32-bit processes
|
||||
|
@ -362,7 +345,11 @@ void __init xen_arch_setup(void)
|
|||
MAX_GUEST_CMDLINE > COMMAND_LINE_SIZE ?
|
||||
COMMAND_LINE_SIZE : MAX_GUEST_CMDLINE);
|
||||
|
||||
pm_idle = xen_idle;
|
||||
/* Set up idle, making sure it calls safe_halt() pvop */
|
||||
#ifdef CONFIG_X86_32
|
||||
boot_cpu_data.hlt_works_ok = 1;
|
||||
#endif
|
||||
pm_idle = default_idle;
|
||||
|
||||
fiddle_vdso();
|
||||
}
|
||||
|
|
|
@ -412,8 +412,16 @@ static int __init balloon_init(void)
|
|||
|
||||
register_balloon(&balloon_sysdev);
|
||||
|
||||
/* Initialise the balloon with excess memory space. */
|
||||
extra_pfn_end = min(e820_end_of_ram_pfn(),
|
||||
/*
|
||||
* Initialise the balloon with excess memory space. We need
|
||||
* to make sure we don't add memory which doesn't exist or
|
||||
* logically exist. The E820 map can be trimmed to be smaller
|
||||
* than the amount of physical memory due to the mem= command
|
||||
* line parameter. And if this is a 32-bit non-HIGHMEM kernel
|
||||
* on a system with memory which requires highmem to access,
|
||||
* don't try to use it.
|
||||
*/
|
||||
extra_pfn_end = min(min(max_pfn, e820_end_of_ram_pfn()),
|
||||
(unsigned long)PFN_DOWN(xen_extra_mem_start + xen_extra_mem_size));
|
||||
for (pfn = PFN_UP(xen_extra_mem_start);
|
||||
pfn < extra_pfn_end;
|
||||
|
|
|
@ -423,7 +423,7 @@ static int find_unbound_irq(void)
|
|||
if (irq == start)
|
||||
goto no_irqs;
|
||||
|
||||
res = irq_alloc_desc_at(irq, 0);
|
||||
res = irq_alloc_desc_at(irq, -1);
|
||||
|
||||
if (WARN_ON(res != irq))
|
||||
return -1;
|
||||
|
@ -630,7 +630,7 @@ int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name)
|
|||
if (identity_mapped_irq(gsi) || (!xen_initial_domain() &&
|
||||
xen_pv_domain())) {
|
||||
irq = gsi;
|
||||
irq_alloc_desc_at(irq, 0);
|
||||
irq_alloc_desc_at(irq, -1);
|
||||
} else
|
||||
irq = find_unbound_irq();
|
||||
|
||||
|
|
Loading…
Reference in New Issue