Merge tag 'for-linus-4.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 27 Jul 2016 18:35:37 +0000 (11:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 27 Jul 2016 18:35:37 +0000 (11:35 -0700)
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
  ...

1  2 
arch/arm64/kernel/setup.c
arch/x86/include/asm/cpu.h
arch/x86/include/asm/smp.h
arch/x86/kernel/apic/apic.c
arch/x86/xen/enlighten.c
drivers/acpi/scan.c
drivers/block/xen-blkback/xenbus.c
drivers/block/xen-blkfront.c
drivers/firmware/efi/efi.c
kernel/sched/cputime.c

Simple merge
index 59d34c521d964f294e4ad66ce6900ad16b19d999,a7fb9ddab16a3518086b3486f09f4565771001c1..9b7fa6313f1a6d28608943b9a40f0838f8b80389
@@@ -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 */
  
Simple merge
Simple merge
Simple merge
index 405056b95b05b34a29b9d90c283032d11614047a,cfc73fecaba437a1b913d8f83d4a8b9b957c6fdf..ad9fc84a8601206cec6cc1fb15cb36e5c23250cb
@@@ -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;
Simple merge
index 0b6682a33e3b836e35a70aa5ba445f8083017f8f,ca0536eb70373c846100aa1de242caf5f48971d5..be4fea6a5dd33695df30f87a1fea5341eadbd709
@@@ -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
         *
         * 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;
Simple merge
index ea0f6f31a2449440e502ee029eb2f3cfe2328c1b,8c4c6dcc052c867fe480b7541575dc66a2a7cb04..1934f658c03604272e5809f32fee1a6a3c928990
@@@ -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, cputimescaled);
        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