Merge android-4.9-o.74 (127372f) into msm-4.9
* refs/heads/tmp-127372f:
Linux 4.9.74
mm/vmstat: Make NR_TLB_REMOTE_FLUSH_RECEIVED available even on UP
tty: fix tty_ldisc_receive_buf() documentation
n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)
x86/smpboot: Remove stale TLB flush invocations
nohz: Prevent a timer interrupt storm in tick_nohz_stop_sched_tick()
timers: Reinitialize per cpu bases on hotplug
timers: Invoke timer_start_debug() where it makes sense
timers: Use deferrable base independent of base::nohz_active
usb: xhci: Add XHCI_TRUST_TX_LENGTH for Renesas uPD720201
USB: Fix off by one in type-specific length check of BOS SSP capability
usb: add RESET_RESUME for ELSA MicroLink 56K
usb: Add device quirk for Logitech HD Pro Webcam C925e
USB: serial: option: adding support for YUGA CLM920-NC5
USB: serial: option: add support for Telit ME910 PID 0x1101
USB: serial: qcserial: add Sierra Wireless EM7565
USB: serial: ftdi_sio: add id for Airbus DS P8GR
usbip: vhci: stop printing kernel pointer addresses in messages
usbip: stub: stop printing kernel pointer addresses in messages
usbip: prevent leaking socket pointer address in messages
usbip: fix usbip bind writing random string after command in match_busid
s390/qeth: update takeover IPs after configuration change
s390/qeth: lock IP table while applying takeover changes
s390/qeth: don't apply takeover changes to RXIP
s390/qeth: apply takeover changes when mode is toggled
net/mlx5: Fix error flow in CREATE_QP command
net/mlx5e: Prevent possible races in VXLAN control flow
net/mlx5e: Add refcount to VXLAN structure
net/mlx5e: Fix possible deadlock of VXLAN lock
net/mlx5e: Fix features check of IPv6 traffic
net/mlx5: Fix rate limit packet pacing naming and struct
tcp: invalidate rate samples during SACK reneging
sock: free skb in skb_complete_tx_timestamp on error
net: phy: micrel: ksz9031: reconfigure autoneg after phy autoneg workaround
net: Fix double free and memory corruption in get_net_ns_by_id()
net: fec: Allow reception of frames bigger than 1522 bytes
net: bridge: fix early call to br_stp_change_bridge_id and plug newlink leaks
ipv4: Fix use-after-free when flushing FIB tables
adding missing rcu_read_unlock in ipxip6_rcv
sctp: Replace use of sockets_allocated with specified macro.
net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case
net: ipv4: fix for a race condition in raw_sendmsg
tg3: Fix rx hang on MTU change with 5717/5719
tcp md5sig: Use skb's saddr when replying to an incoming segment
tcp_bbr: record "full bw reached" decision in new full_bw_reached bit
RDS: Check cmsg_len before dereferencing CMSG_DATA
ptr_ring: add barriers
net: reevalulate autoflowlabel setting after sysctl setting
net: qmi_wwan: add Sierra EM7565 1199:9091
netlink: Add netns check on taps
net: igmp: Use correct source address on IGMPv3 reports
net: fec: unmap the xmit buffer that are not transferred by DMA
ipv6: mcast: better catch silly mtu values
ipv4: igmp: guard against silly MTU values
kbuild: add '-fno-stack-check' to kernel build options
x86/mm/64: Fix reboot interaction with CR4.PCIDE
x86/mm: Enable CR4.PCIDE on supported systems
x86/mm: Add the 'nopcid' boot option to turn off PCID
x86/mm: Disable PCID on 32-bit kernels
x86/mm: Remove the UP asm/tlbflush.h code, always use the (formerly) SMP code
x86/mm: Reimplement flush_tlb_page() using flush_tlb_mm_range()
x86/mm: Make flush_tlb_mm_range() more predictable
x86/mm: Remove flush_tlb() and flush_tlb_current_task()
x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly()
ALSA: hda - fix headset mic detection issue on a Dell machine
ALSA: hda: Drop useless WARN_ON()
ASoC: tlv320aic31xx: Fix GPIO1 register definition
ASoC: twl4030: fix child-node lookup
ASoC: fsl_ssi: AC'97 ops need regmap, clock and cleaning up on failure
ASoC: da7218: fix fix child-node lookup
ASoC: wm_adsp: Fix validation of firmware and coeff lengths
iw_cxgb4: Only validate the MSN for successful completions
ring-buffer: Mask out the info bits when returning buffer page length
tracing: Fix crash when it fails to alloc ring buffer
tracing: Fix possible double free on failure of allocating trace buffer
tracing: Remove extra zeroing out of the ring buffer page
sync objtool's copy of x86-opcode-map.txt
Conflicts:
include/linux/cpuhotplug.h
kernel/time/timer.c
Change-Id: I0198e2b75715d13acd86237321966774cd6d9f1d
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 4c0b001..5b5d016 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -826,11 +826,10 @@
struct timer_base *base = per_cpu_ptr(&timer_bases[BASE_STD], cpu);
/*
- * If the timer is deferrable and nohz is active then we need to use
- * the deferrable base.
+ * If the timer is deferrable and NO_HZ_COMMON is set then we need
+ * to use the deferrable base.
*/
- if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && base->nohz_active &&
- (tflags & TIMER_DEFERRABLE)) {
+ if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && (tflags & TIMER_DEFERRABLE)) {
base = &timer_base_deferrable;
if (tflags & TIMER_PINNED)
base = per_cpu_ptr(&timer_bases[BASE_DEF], cpu);
@@ -843,11 +842,10 @@
struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]);
/*
- * If the timer is deferrable and nohz is active then we need to use
- * the deferrable base.
+ * If the timer is deferrable and NO_HZ_COMMON is set then we need
+ * to use the deferrable base.
*/
- if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && base->nohz_active &&
- (tflags & TIMER_DEFERRABLE)) {
+ if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && (tflags & TIMER_DEFERRABLE)) {
base = &timer_base_deferrable;
if (tflags & TIMER_PINNED)
base = this_cpu_ptr(&timer_bases[BASE_DEF]);
@@ -1002,8 +1000,6 @@
if (!ret && pending_only)
goto out_unlock;
- debug_activate(timer, expires);
-
new_base = get_target_base(base, timer->flags);
if (base != new_base) {
@@ -1027,6 +1023,8 @@
}
}
+ debug_activate(timer, expires);
+
timer->expires = expires;
/*
* If 'idx' was calculated above and the base time did not advance
@@ -1692,7 +1690,7 @@
base->must_forward_clk = false;
__run_timers(base);
- if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && base->nohz_active)
+ if (IS_ENABLED(CONFIG_NO_HZ_COMMON))
__run_timers(this_cpu_ptr(&timer_bases[BASE_DEF]));
if ((atomic_cmpxchg(&deferrable_pending, 1, 0) &&
@@ -1872,6 +1870,21 @@
}
}
+int timers_prepare_cpu(unsigned int cpu)
+{
+ struct timer_base *base;
+ int b;
+
+ for (b = 0; b < NR_BASES; b++) {
+ base = per_cpu_ptr(&timer_bases[b], cpu);
+ base->clk = jiffies;
+ base->next_expiry = base->clk + NEXT_TIMER_MAX_DELTA;
+ base->is_idle = false;
+ base->must_forward_clk = true;
+ }
+ return 0;
+}
+
static void __migrate_timers(unsigned int cpu, bool remove_pinned)
{
struct timer_base *old_base;