]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2016 03:43:12 +0000 (20:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2016 03:43:12 +0000 (20:43 -0700)
Pull timer updates from Thomas Gleixner:
 "This update provides the following changes:

   - The rework of the timer wheel which addresses the shortcomings of
     the current wheel (cascading, slow search for next expiring timer,
     etc).  That's the first major change of the wheel in almost 20
     years since Finn implemted it.

   - A large overhaul of the clocksource drivers init functions to
     consolidate the Device Tree initialization

   - Some more Y2038 updates

   - A capability fix for timerfd

   - Yet another clock chip driver

   - The usual pile of updates, comment improvements all over the place"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (130 commits)
  tick/nohz: Optimize nohz idle enter
  clockevents: Make clockevents_subsys static
  clocksource/drivers/time-armada-370-xp: Fix return value check
  timers: Implement optimization for same expiry time in mod_timer()
  timers: Split out index calculation
  timers: Only wake softirq if necessary
  timers: Forward the wheel clock whenever possible
  timers/nohz: Remove pointless tick_nohz_kick_tick() function
  timers: Optimize collect_expired_timers() for NOHZ
  timers: Move __run_timers() function
  timers: Remove set_timer_slack() leftovers
  timers: Switch to a non-cascading wheel
  timers: Reduce the CPU index space to 256k
  timers: Give a few structs and members proper names
  hlist: Add hlist_is_singular_node() helper
  signals: Use hrtimer for sigtimedwait()
  timers: Remove the deprecated mod_timer_pinned() API
  timers, net/ipv4/inet: Initialize connection request timers as pinned
  timers, drivers/tty/mips_ejtag: Initialize the poll timer as pinned
  timers, drivers/tty/metag_da: Initialize the poll timer as pinned
  ...

1  2 
Documentation/kernel-parameters.txt
arch/x86/kernel/apic/x2apic_uv_x.c
arch/x86/kernel/cpu/mcheck/mce.c
drivers/usb/host/xhci.c
kernel/time/timekeeping.c

index fa8c6d470ad2e6d9a4576cd3a063a5f0653e6f8c,2c92f1df7c69fb817b4235bf3490802c0d9aaf3c..17e33dbbf2264d985e2ebc34f89c99d3e01e8f3b
@@@ -687,6 -687,14 +687,14 @@@ bytes respectively. Such letter suffixe
                        [SPARC64] tick
                        [X86-64] hpet,tsc
  
+       clocksource.arm_arch_timer.evtstrm=
+                       [ARM,ARM64]
+                       Format: <bool>
+                       Enable/disable the eventstream feature of the ARM
+                       architected timer so that code using WFE-based polling
+                       loops can be debugged more effectively on production
+                       systems.
        clearcpuid=BITNUM [X86]
                        Disable CPUID feature X for the kernel. See
                        arch/x86/include/asm/cpufeatures.h for the valid bit
        js=             [HW,JOY] Analog joystick
                        See Documentation/input/joystick.txt.
  
 -      kaslr/nokaslr   [X86]
 -                      Enable/disable kernel and module base offset ASLR
 -                      (Address Space Layout Randomization) if built into
 -                      the kernel. When CONFIG_HIBERNATION is selected,
 -                      kASLR is disabled by default. When kASLR is enabled,
 -                      hibernation will be disabled.
 +      nokaslr         [KNL]
 +                      When CONFIG_RANDOMIZE_BASE is set, this disables
 +                      kernel and module base offset ASLR (Address Space
 +                      Layout Randomization).
  
        keepinitrd      [HW,ARM]
  
index 5a58c917179ca91a1577f1675f415600db4ef40c,7a50519e6afc03d97e1472690f085881749812f3..64dd38fbf21871997bcd70a3900b79ff9341c477
@@@ -582,6 -582,7 +582,6 @@@ static struct apic __refdata apic_x2api
  
        .get_apic_id                    = x2apic_get_apic_id,
        .set_apic_id                    = set_apic_id,
 -      .apic_id_mask                   = 0xFFFFFFFFu,
  
        .cpu_mask_to_apicid_and         = uv_cpu_mask_to_apicid_and,
  
@@@ -918,7 -919,7 +918,7 @@@ static void uv_heartbeat(unsigned long 
        uv_set_scir_bits(bits);
  
        /* enable next timer period */
-       mod_timer_pinned(timer, jiffies + SCIR_CPU_HB_INTERVAL);
+       mod_timer(timer, jiffies + SCIR_CPU_HB_INTERVAL);
  }
  
  static void uv_heartbeat_enable(int cpu)
                struct timer_list *timer = &uv_cpu_scir_info(cpu)->timer;
  
                uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY);
-               setup_timer(timer, uv_heartbeat, cpu);
+               setup_pinned_timer(timer, uv_heartbeat, cpu);
                timer->expires = jiffies + SCIR_CPU_HB_INTERVAL;
                add_timer_on(timer, cpu);
                uv_cpu_scir_info(cpu)->enabled = 1;
index 58af6300992d586df1ca34d2299bdea8f727d036,b80a6361a9e155c88aff1fff25885401680551f9..79d8ec849468e70ab42d7f5bfc19497578208a79
@@@ -425,7 -425,7 +425,7 @@@ static u64 mce_rdmsrl(u32 msr
        }
  
        if (rdmsrl_safe(msr, &v)) {
 -              WARN_ONCE(1, "mce: Unable to read msr %d!\n", msr);
 +              WARN_ONCE(1, "mce: Unable to read MSR 0x%x!\n", msr);
                /*
                 * Return zero in case the access faulted. This should
                 * not happen normally but can happen if the CPU does
@@@ -1309,7 -1309,7 +1309,7 @@@ static void __restart_timer(struct time
  
        if (timer_pending(t)) {
                if (time_before(when, t->expires))
-                       mod_timer_pinned(t, when);
+                       mod_timer(t, when);
        } else {
                t->expires = round_jiffies(when);
                add_timer_on(t, smp_processor_id());
@@@ -1735,7 -1735,7 +1735,7 @@@ static void __mcheck_cpu_init_timer(voi
        struct timer_list *t = this_cpu_ptr(&mce_timer);
        unsigned int cpu = smp_processor_id();
  
-       setup_timer(t, mce_timer_fn, cpu);
+       setup_pinned_timer(t, mce_timer_fn, cpu);
        mce_start_timer(cpu, t);
  }
  
diff --combined drivers/usb/host/xhci.c
index 9da98321d8e6fe393a3f4d995f7c6e94987107a7,a986fe763d87542afc3c45f84c6827ef936db926..01d96c9b3a75b95b93da48ce9f250722d03d9483
@@@ -490,8 -490,6 +490,6 @@@ static void compliance_mode_recovery_ti
        xhci->comp_mode_recovery_timer.expires = jiffies +
                        msecs_to_jiffies(COMP_MODE_RCVRY_MSECS);
  
-       set_timer_slack(&xhci->comp_mode_recovery_timer,
-                       msecs_to_jiffies(COMP_MODE_RCVRY_MSECS));
        add_timer(&xhci->comp_mode_recovery_timer);
        xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
                        "Compliance mode recovery timer initialized");
@@@ -3139,7 -3137,6 +3137,7 @@@ int xhci_alloc_streams(struct usb_hcd *
        struct xhci_input_control_ctx *ctrl_ctx;
        unsigned int ep_index;
        unsigned int num_stream_ctxs;
 +      unsigned int max_packet;
        unsigned long flags;
        u32 changed_ep_bitmask = 0;
  
  
        for (i = 0; i < num_eps; i++) {
                ep_index = xhci_get_endpoint_index(&eps[i]->desc);
 +              max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&eps[i]->desc));
                vdev->eps[ep_index].stream_info = xhci_alloc_stream_info(xhci,
                                num_stream_ctxs,
 -                              num_streams, mem_flags);
 +                              num_streams,
 +                              max_packet, mem_flags);
                if (!vdev->eps[ep_index].stream_info)
                        goto cleanup;
                /* Set maxPstreams in endpoint context and update deq ptr to
index 255e225393acd960e95e30bfb056adf47ec1268c,a196e08324e767fd0a8faae26732b949b52e9127..3b65746c7f156dbdea1e7b1f6fb4e43197820369
@@@ -480,10 -480,12 +480,12 @@@ static inline void old_vsyscall_fixup(s
        * users are removed, this can be killed.
        */
        remainder = tk->tkr_mono.xtime_nsec & ((1ULL << tk->tkr_mono.shift) - 1);
-       tk->tkr_mono.xtime_nsec -= remainder;
-       tk->tkr_mono.xtime_nsec += 1ULL << tk->tkr_mono.shift;
-       tk->ntp_error += remainder << tk->ntp_error_shift;
-       tk->ntp_error -= (1ULL << tk->tkr_mono.shift) << tk->ntp_error_shift;
+       if (remainder != 0) {
+               tk->tkr_mono.xtime_nsec -= remainder;
+               tk->tkr_mono.xtime_nsec += 1ULL << tk->tkr_mono.shift;
+               tk->ntp_error += remainder << tk->ntp_error_shift;
+               tk->ntp_error -= (1ULL << tk->tkr_mono.shift) << tk->ntp_error_shift;
+       }
  }
  #else
  #define old_vsyscall_fixup(tk)
@@@ -2186,7 -2188,6 +2188,7 @@@ struct timespec64 get_monotonic_coarse6
  
        return now;
  }
 +EXPORT_SYMBOL(get_monotonic_coarse64);
  
  /*
   * Must hold jiffies_lock