From: Jeremy Fitzhardinge Date: Tue, 7 Apr 2009 20:34:16 +0000 (-0700) Subject: Merge commit 'origin/master' into for-linus/xen/master X-Git-Tag: v2.6.31-rc1~410^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38f4b8c0da01ae7cd9b93386842ce272d6fde9ab;p=platform%2Fupstream%2Fkernel-adaptation-pc.git Merge commit 'origin/master' into for-linus/xen/master * commit 'origin/master': (4825 commits) Fix build errors due to CONFIG_BRANCH_TRACER=y parport: Use the PCI IRQ if offered tty: jsm cleanups Adjust path to gpio headers KGDB_SERIAL_CONSOLE check for module Change KCONFIG name tty: Blackin CTS/RTS Change hardware flow control from poll to interrupt driven Add support for the MAX3100 SPI UART. lanana: assign a device name and numbering for MAX3100 serqt: initial clean up pass for tty side tty: Use the generic RS485 ioctl on CRIS tty: Correct inline types for tty_driver_kref_get() splice: fix deadlock in splicing to file nilfs2: support nanosecond timestamp nilfs2: introduce secondary super block nilfs2: simplify handling of active state of segments nilfs2: mark minor flag for checkpoint created by internal operation nilfs2: clean up sketch file nilfs2: super block operations fix endian bug ... Conflicts: arch/x86/include/asm/thread_info.h arch/x86/lguest/boot.c drivers/xen/manage.c --- 38f4b8c0da01ae7cd9b93386842ce272d6fde9ab diff --cc arch/x86/include/asm/thread_info.h index 2f34d64,8820a73..602c769 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@@ -94,7 -94,7 +94,8 @@@ struct thread_info #define TIF_FORCED_TF 24 /* true if TF in eflags artificially */ #define TIF_DEBUGCTLMSR 25 /* uses thread_struct.debugctlmsr */ #define TIF_DS_AREA_MSR 26 /* uses thread_struct.ds_area_msr */ -#define TIF_SYSCALL_FTRACE 27 /* for ftrace syscall instrumentation */ +#define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */ ++#define TIF_SYSCALL_FTRACE 28 /* for ftrace syscall instrumentation */ #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) @@@ -116,7 -116,7 +117,8 @@@ #define _TIF_FORCED_TF (1 << TIF_FORCED_TF) #define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR) #define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR) +#define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES) + #define _TIF_SYSCALL_FTRACE (1 << TIF_SYSCALL_FTRACE) /* work to do in syscall_trace_enter() */ #define _TIF_WORK_SYSCALL_ENTRY \ diff --cc arch/x86/lguest/boot.c index 5287081,e94a11e..5ab2397 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@@ -147,16 -166,10 +166,16 @@@ static void lazy_hcall3(unsigned long c /* When lazy mode is turned off reset the per-cpu lazy mode variable and then * issue the do-nothing hypercall to flush any stored calls. */ -static void lguest_leave_lazy_mode(void) +static void lguest_leave_lazy_mmu_mode(void) +{ + hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); + paravirt_leave_lazy_mmu(); +} + +static void lguest_end_context_switch(struct task_struct *next) { - hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); - paravirt_leave_lazy(paravirt_get_lazy_mode()); + kvm_hypercall0(LHCALL_FLUSH_ASYNC); + paravirt_end_context_switch(next); } /*G:033 @@@ -1045,7 -1065,9 +1071,9 @@@ __init void lguest_init(void pv_mmu_ops.read_cr2 = lguest_read_cr2; pv_mmu_ops.read_cr3 = lguest_read_cr3; pv_mmu_ops.lazy_mode.enter = paravirt_enter_lazy_mmu; - pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mode; + pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mmu_mode; + pv_mmu_ops.pte_update = lguest_pte_update; + pv_mmu_ops.pte_update_defer = lguest_pte_update; #ifdef CONFIG_X86_LOCAL_APIC /* apic read/write intercepts */ diff --cc arch/x86/mm/pageattr.c index 9015e5e,d71e1b6..660cac7 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@@ -824,7 -844,15 +844,8 @@@ static int change_page_attr_set_clr(uns vm_unmap_aliases(); - /* - * If we're called with lazy mmu updates enabled, the - * in-memory pte state may be stale. Flush pending updates to - * bring them up to date. - */ - arch_flush_lazy_mmu_mode(); - cpa.vaddr = addr; + cpa.pages = pages; cpa.numpages = numpages; cpa.mask_set = mask_set; cpa.mask_clr = mask_clr; diff --cc drivers/xen/cpu_hotplug.c index 411cb1f,5f54c01..bdfd584 --- a/drivers/xen/cpu_hotplug.c +++ b/drivers/xen/cpu_hotplug.c @@@ -18,10 -18,10 +18,10 @@@ static void disable_hotplug_cpu(int cpu if (cpu_present(cpu)) arch_unregister_cpu(cpu); - cpu_clear(cpu, cpu_present_map); + set_cpu_present(cpu, false); } -static void vcpu_hotplug(unsigned int cpu) +static int vcpu_online(unsigned int cpu) { int err; char dir[32], state[32]; diff --cc drivers/xen/manage.c index 5269bb4,0d61db1..fddc202 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c @@@ -104,9 -97,16 +98,15 @@@ static void do_suspend(void goto out; } - printk("suspending xenbus...\n"); - /* XXX use normal device tree? */ - xenbus_suspend(); + printk(KERN_DEBUG "suspending xenstore...\n"); + xs_suspend(); + err = device_power_down(PMSG_SUSPEND); + if (err) { + printk(KERN_ERR "device_power_down failed: %d\n", err); + goto resume_devices; + } + err = stop_machine(xen_suspend, &cancelled, cpumask_of(0)); if (err) { printk(KERN_ERR "failed to start xen_suspend: %d\n", err); @@@ -115,10 -115,13 +115,13 @@@ if (!cancelled) { xen_arch_resume(); - xenbus_resume(); + xs_resume(); } else - xenbus_suspend_cancel(); + xs_suspend_cancel(); + device_power_up(PMSG_RESUME); + + resume_devices: device_resume(PMSG_RESUME); /* Make sure timer events get retriggered on all CPUs */