From: Linus Torvalds Date: Wed, 27 Jul 2016 18:35:37 +0000 (-0700) Subject: Merge tag 'for-linus-4.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=08fd8c17686c6b09fa410a26d516548dd80ff147;p=openwrt%2Fstaging%2Fblogic.git Merge tag 'for-linus-4.8-rc0-tag' of git://git./linux/kernel/git/xen/tip Pull xen updates from David Vrabel: "Features and fixes for 4.8-rc0: - ACPI support for guests on ARM platforms. - Generic steal time support for arm and x86. - Support cases where kernel cpu is not Xen VCPU number (e.g., if in-guest kexec is used). - Use the system workqueue instead of a custom workqueue in various places" * tag 'for-linus-4.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (47 commits) xen: add static initialization of steal_clock op to xen_time_ops xen/pvhvm: run xen_vcpu_setup() for the boot CPU xen/evtchn: use xen_vcpu_id mapping xen/events: fifo: use xen_vcpu_id mapping xen/events: use xen_vcpu_id mapping in events_base x86/xen: use xen_vcpu_id mapping when pointing vcpu_info to shared_info x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op xen: introduce xen_vcpu_id mapping x86/acpi: store ACPI ids from MADT for future usage x86/xen: update cpuid.h from Xen-4.7 xen/evtchn: add IOCTL_EVTCHN_RESTRICT xen-blkback: really don't leak mode property xen-blkback: constify instance of "struct attribute_group" xen-blkfront: prefer xenbus_scanf() over xenbus_gather() xen-blkback: prefer xenbus_scanf() over xenbus_gather() xen: support runqueue steal time on xen arm/xen: add support for vm_assist hypercall xen: update xen headers xen-pciback: drop superfluous variables xen-pciback: short-circuit read path used for merging write values ... --- 08fd8c17686c6b09fa410a26d516548dd80ff147 diff --cc arch/x86/include/asm/cpu.h index 59d34c521d96,a7fb9ddab16a..9b7fa6313f1a --- a/arch/x86/include/asm/cpu.h +++ b/arch/x86/include/asm/cpu.h @@@ -16,7 -16,9 +16,8 @@@ extern void prefill_possible_map(void) static inline void prefill_possible_map(void) {} #define cpu_physical_id(cpu) boot_cpu_physical_apicid + #define cpu_acpi_id(cpu) 0 #define safe_smp_processor_id() 0 -#define stack_smp_processor_id() 0 #endif /* CONFIG_SMP */ diff --cc drivers/acpi/scan.c index 405056b95b05,cfc73fecaba4..ad9fc84a8601 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@@ -1925,8 -1961,19 +1970,21 @@@ static int acpi_bus_scan_fixed(void return result < 0 ? result : 0; } + static void __init acpi_get_spcr_uart_addr(void) + { + acpi_status status; + struct acpi_table_spcr *spcr_ptr; + + status = acpi_get_table(ACPI_SIG_SPCR, 0, + (struct acpi_table_header **)&spcr_ptr); + if (ACPI_SUCCESS(status)) + spcr_uart_addr = spcr_ptr->serial_port.address; + else + printk(KERN_WARNING PREFIX "STAO table present, but SPCR is missing\n"); + } + +static bool acpi_scan_initialized; + int __init acpi_scan_init(void) { int result; diff --cc drivers/block/xen-blkfront.c index 0b6682a33e3b,ca0536eb7037..be4fea6a5dd3 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@@ -2298,11 -2308,9 +2297,10 @@@ static void blkfront_gather_backend_fea unsigned int indirect_segments; info->feature_flush = 0; + info->feature_fua = 0; - err = xenbus_gather(XBT_NIL, info->xbdev->otherend, - "feature-barrier", "%d", &barrier, - NULL); + err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, + "feature-barrier", "%d", &barrier); /* * If there's no "feature-barrier" defined, then it means @@@ -2311,35 -2319,27 +2309,32 @@@ * * If there are barriers, then we use flush. */ - if (!err && barrier) { - if (err > 0 && barrier) - info->feature_flush = REQ_FLUSH | REQ_FUA; ++ if (err > 0 && barrier) { + info->feature_flush = 1; + info->feature_fua = 1; + } + /* * And if there is "feature-flush-cache" use that above * barriers. */ - err = xenbus_gather(XBT_NIL, info->xbdev->otherend, - "feature-flush-cache", "%d", &flush, - NULL); + err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, + "feature-flush-cache", "%d", &flush); - if (!err && flush) { - if (err > 0 && flush) - info->feature_flush = REQ_FLUSH; ++ if (err > 0 && flush) { + info->feature_flush = 1; + info->feature_fua = 0; + } - err = xenbus_gather(XBT_NIL, info->xbdev->otherend, - "feature-discard", "%d", &discard, - NULL); + err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, + "feature-discard", "%d", &discard); - if (!err && discard) + if (err > 0 && discard) blkfront_setup_discard(info); - err = xenbus_gather(XBT_NIL, info->xbdev->otherend, - "feature-persistent", "%u", &persistent, - NULL); - if (err) + err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, + "feature-persistent", "%d", &persistent); + if (err <= 0) info->feature_persistent = 0; else info->feature_persistent = persistent; diff --cc kernel/sched/cputime.c index ea0f6f31a244,8c4c6dcc052c..1934f658c036 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c @@@ -485,33 -477,18 +485,23 @@@ void account_process_tick(struct task_s return; } - if (steal_account_process_tick()) + cputime = cputime_one_jiffy; + steal = steal_account_process_time(cputime); + + if (steal >= cputime) return; + cputime -= steal; + scaled = cputime_to_scaled(cputime); + if (user_tick) - account_user_time(p, cputime_one_jiffy, one_jiffy_scaled); + account_user_time(p, cputime, scaled); else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET)) - account_system_time(p, HARDIRQ_OFFSET, cputime_one_jiffy, - one_jiffy_scaled); + account_system_time(p, HARDIRQ_OFFSET, cputime, scaled); else - account_idle_time(cputime_one_jiffy); + account_idle_time(cputime); } - /* - * Account multiple ticks of steal time. - * @p: the process from which the cpu time has been stolen - * @ticks: number of stolen ticks - */ - void account_steal_ticks(unsigned long ticks) - { - account_steal_time(jiffies_to_cputime(ticks)); - } - /* * Account multiple ticks of idle time. * @ticks: number of stolen ticks