Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab1831b0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen: try harder to balloon up under memory pressure.
  Xen balloon: fix totalram_pages counting.
  xen: explicitly create/destroy stop_machine workqueues outside suspend/resume region.
  xen: improve error handling in do_suspend.
  xen: don't leak IRQs over suspend/resume.
  xen: call clock resume notifier on all CPUs
  xen: use iret for return from 64b kernel to 32b usermode
  xen: don't call dpm_resume_noirq() with interrupts disabled.
  xen: register runstate info for boot CPU early
  xen: register runstate on secondary CPUs
  xen: register timer interrupt with IRQF_TIMER
  xen: correctly restore pfn_to_mfn_list_list after resume
  xen: restore runstate_info even if !have_vcpu_info_placement
  xen: re-register runstate area earlier on resume.
  xen: wait up to 5 minutes for device connetion
  xen: improvement to wait_for_devices()
  xen: fix is_disconnected_device/exists_disconnected_device
  xen/xenbus: make DEVICE_ATTR()s static
parents eae6fa9b bc2c0303
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -138,7 +138,6 @@ static void xen_vcpu_setup(int cpu)
 */
void xen_vcpu_restore(void)
{
	if (have_vcpu_info_placement) {
	int cpu;

	for_each_online_cpu(cpu) {
@@ -148,15 +147,15 @@ void xen_vcpu_restore(void)
		    HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
			BUG();

		xen_setup_runstate_info(cpu);

		if (have_vcpu_info_placement)
			xen_vcpu_setup(cpu);

		if (other_cpu &&
		    HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
			BUG();
	}

		BUG_ON(!have_vcpu_info_placement);
	}
}

static void __init xen_banner(void)
@@ -1180,6 +1179,8 @@ asmlinkage void __init xen_start_kernel(void)

	xen_raw_console_write("about to get started...\n");

	xen_setup_runstate_info(0);

	/* Start the world */
#ifdef CONFIG_X86_32
	i386_start_kernel();
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ static inline unsigned p2m_index(unsigned long pfn)
}

/* Build the parallel p2m_top_mfn structures */
static void __init xen_build_mfn_list_list(void)
void xen_build_mfn_list_list(void)
{
	unsigned pfn, idx;

+1 −0
Original line number Diff line number Diff line
@@ -295,6 +295,7 @@ static int __cpuinit xen_cpu_up(unsigned int cpu)
		(unsigned long)task_stack_page(idle) -
		KERNEL_STACK_OFFSET + THREAD_SIZE;
#endif
	xen_setup_runstate_info(cpu);
	xen_setup_timer(cpu);
	xen_init_lock_cpu(cpu);

+16 −1
Original line number Diff line number Diff line
#include <linux/types.h>
#include <linux/clockchips.h>

#include <xen/interface/xen.h>
#include <xen/grant_table.h>
@@ -27,6 +28,8 @@ void xen_pre_suspend(void)

void xen_post_suspend(int suspend_cancelled)
{
	xen_build_mfn_list_list();

	xen_setup_shared_info();

	if (suspend_cancelled) {
@@ -44,7 +47,19 @@ void xen_post_suspend(int suspend_cancelled)

}

static void xen_vcpu_notify_restore(void *data)
{
	unsigned long reason = (unsigned long)data;

	/* Boot processor notified via generic timekeeping_resume() */
	if ( smp_processor_id() == 0)
		return;

	clockevents_notify(reason, NULL);
}

void xen_arch_resume(void)
{
	/* nothing */
	smp_call_function(xen_vcpu_notify_restore,
			       (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
}
+3 −4
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ bool xen_vcpu_stolen(int vcpu)
	return per_cpu(runstate, vcpu).state == RUNSTATE_runnable;
}

static void setup_runstate_info(int cpu)
void xen_setup_runstate_info(int cpu)
{
	struct vcpu_register_runstate_memory_area area;

@@ -434,7 +434,7 @@ void xen_setup_timer(int cpu)
		name = "<timer kasprintf failed>";

	irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,
				      IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING,
				      IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER,
				      name, NULL);

	evt = &per_cpu(xen_clock_events, cpu);
@@ -442,8 +442,6 @@ void xen_setup_timer(int cpu)

	evt->cpumask = cpumask_of(cpu);
	evt->irq = irq;

	setup_runstate_info(cpu);
}

void xen_teardown_timer(int cpu)
@@ -494,6 +492,7 @@ __init void xen_time_init(void)

	setup_force_cpu_cap(X86_FEATURE_TSC);

	xen_setup_runstate_info(cpu);
	xen_setup_timer(cpu);
	xen_setup_cpu_clockevents();
}
Loading