mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 09:39:08 +00:00
Merge pull request #2970 from TiejunChina/master-dev
Upgrade -rt kernel version to 4.14.29-rt25.
This commit is contained in:
commit
2117b0dd82
@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.14.18-rt
|
||||
image: linuxkit/kernel:4.14.29-rt
|
||||
cmdline: "console=tty0"
|
||||
init:
|
||||
- linuxkit/init:7af4e32f31f04d6c63d457c502d2f69344db7d72
|
||||
|
@ -221,18 +221,19 @@ ifeq ($(ARCH),x86_64)
|
||||
$(eval $(call kernel,4.15.14,4.15.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,4.14.31,4.14.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,4.14.31,4.14.x,,-dbg))
|
||||
$(eval $(call kernel,4.14.24,4.14.x,-rt,))
|
||||
$(eval $(call kernel,4.14.29,4.14.x,-rt,))
|
||||
$(eval $(call kernel,4.9.91,4.9.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,4.4.125,4.4.x,$(EXTRA),$(DEBUG)))
|
||||
|
||||
else ifeq ($(ARCH),aarch64)
|
||||
$(eval $(call kernel,4.15.14,4.15.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,4.14.31,4.14.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,4.14.24,4.14.x,-rt,))
|
||||
$(eval $(call kernel,4.14.29,4.14.x,-rt,))
|
||||
|
||||
else ifeq ($(ARCH),s390x)
|
||||
$(eval $(call kernel,4.15.14,4.15.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,4.14.31,4.14.x,$(EXTRA),$(DEBUG)))
|
||||
$(eval $(call kernel,4.14.29,4.14.x,-rt,))
|
||||
endif
|
||||
|
||||
# Target for kernel config
|
||||
|
@ -0,0 +1,121 @@
|
||||
From: Boqun Feng <boqun.feng@gmail.com>
|
||||
Date: Fri, 9 Mar 2018 14:56:28 +0800
|
||||
Subject: [PATCH] rtmutex: Make rt_mutex_futex_unlock() safe for irq-off
|
||||
callsites
|
||||
|
||||
Upstream commit 6b0ef92fee2a3189eba6d6b827b247cb4f6da7e9
|
||||
|
||||
When running rcutorture with TREE03 config, CONFIG_PROVE_LOCKING=y, and
|
||||
kernel cmdline argument "rcutorture.gp_exp=1", lockdep reports a
|
||||
HARDIRQ-safe->HARDIRQ-unsafe deadlock:
|
||||
|
||||
================================
|
||||
WARNING: inconsistent lock state
|
||||
4.16.0-rc4+ #1 Not tainted
|
||||
--------------------------------
|
||||
inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
|
||||
takes:
|
||||
__schedule+0xbe/0xaf0
|
||||
{IN-HARDIRQ-W} state was registered at:
|
||||
_raw_spin_lock+0x2a/0x40
|
||||
scheduler_tick+0x47/0xf0
|
||||
...
|
||||
other info that might help us debug this:
|
||||
Possible unsafe locking scenario:
|
||||
CPU0
|
||||
----
|
||||
lock(&rq->lock);
|
||||
<Interrupt>
|
||||
lock(&rq->lock);
|
||||
*** DEADLOCK ***
|
||||
1 lock held by rcu_torture_rea/724:
|
||||
rcu_torture_read_lock+0x0/0x70
|
||||
stack backtrace:
|
||||
CPU: 2 PID: 724 Comm: rcu_torture_rea Not tainted 4.16.0-rc4+ #1
|
||||
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014
|
||||
Call Trace:
|
||||
lock_acquire+0x90/0x200
|
||||
? __schedule+0xbe/0xaf0
|
||||
_raw_spin_lock+0x2a/0x40
|
||||
? __schedule+0xbe/0xaf0
|
||||
__schedule+0xbe/0xaf0
|
||||
preempt_schedule_irq+0x2f/0x60
|
||||
retint_kernel+0x1b/0x2d
|
||||
RIP: 0010:rcu_read_unlock_special+0x0/0x680
|
||||
? rcu_torture_read_unlock+0x60/0x60
|
||||
__rcu_read_unlock+0x64/0x70
|
||||
rcu_torture_read_unlock+0x17/0x60
|
||||
rcu_torture_reader+0x275/0x450
|
||||
? rcutorture_booster_init+0x110/0x110
|
||||
? rcu_torture_stall+0x230/0x230
|
||||
? kthread+0x10e/0x130
|
||||
kthread+0x10e/0x130
|
||||
? kthread_create_worker_on_cpu+0x70/0x70
|
||||
? call_usermodehelper_exec_async+0x11a/0x150
|
||||
ret_from_fork+0x3a/0x50
|
||||
|
||||
This happens with the following even sequence:
|
||||
|
||||
preempt_schedule_irq();
|
||||
local_irq_enable();
|
||||
__schedule():
|
||||
local_irq_disable(); // irq off
|
||||
...
|
||||
rcu_note_context_switch():
|
||||
rcu_note_preempt_context_switch():
|
||||
rcu_read_unlock_special():
|
||||
local_irq_save(flags);
|
||||
...
|
||||
raw_spin_unlock_irqrestore(...,flags); // irq remains off
|
||||
rt_mutex_futex_unlock():
|
||||
raw_spin_lock_irq();
|
||||
...
|
||||
raw_spin_unlock_irq(); // accidentally set irq on
|
||||
|
||||
<return to __schedule()>
|
||||
rq_lock():
|
||||
raw_spin_lock(); // acquiring rq->lock with irq on
|
||||
|
||||
which means rq->lock becomes a HARDIRQ-unsafe lock, which can cause
|
||||
deadlocks in scheduler code.
|
||||
|
||||
This problem was introduced by commit 02a7c234e540 ("rcu: Suppress
|
||||
lockdep false-positive ->boost_mtx complaints"). That brought the user
|
||||
of rt_mutex_futex_unlock() with irq off.
|
||||
|
||||
To fix this, replace the *lock_irq() in rt_mutex_futex_unlock() with
|
||||
*lock_irq{save,restore}() to make it safe to call rt_mutex_futex_unlock()
|
||||
with irq off.
|
||||
|
||||
Fixes: 02a7c234e540 ("rcu: Suppress lockdep false-positive ->boost_mtx complaints")
|
||||
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
Cc: Peter Zijlstra <peterz@infradead.org>
|
||||
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
|
||||
Cc: Steven Rostedt <rostedt@goodmis.org>
|
||||
Cc: Josh Triplett <josh@joshtriplett.org>
|
||||
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Cc: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
|
||||
Link: https://lkml.kernel.org/r/20180309065630.8283-1-boqun.feng@gmail.com
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
kernel/locking/rtmutex.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/kernel/locking/rtmutex.c
|
||||
+++ b/kernel/locking/rtmutex.c
|
||||
@@ -1616,11 +1616,12 @@ bool __sched __rt_mutex_futex_unlock(str
|
||||
void __sched rt_mutex_futex_unlock(struct rt_mutex *lock)
|
||||
{
|
||||
DEFINE_WAKE_Q(wake_q);
|
||||
+ unsigned long flags;
|
||||
bool postunlock;
|
||||
|
||||
- raw_spin_lock_irq(&lock->wait_lock);
|
||||
+ raw_spin_lock_irqsave(&lock->wait_lock, flags);
|
||||
postunlock = __rt_mutex_futex_unlock(lock, &wake_q);
|
||||
- raw_spin_unlock_irq(&lock->wait_lock);
|
||||
+ raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
|
||||
|
||||
if (postunlock)
|
||||
rt_mutex_postunlock(&wake_q);
|
@ -21,7 +21,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
--- a/kernel/time/hrtimer.c
|
||||
+++ b/kernel/time/hrtimer.c
|
||||
@@ -1199,9 +1199,9 @@ static void __run_hrtimer(struct hrtimer
|
||||
@@ -1204,9 +1204,9 @@ static void __run_hrtimer(struct hrtimer
|
||||
timer->is_rel = false;
|
||||
|
||||
/*
|
@ -35,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
/* Soft interrupt function to run the hrtimer queues: */
|
||||
--- a/kernel/time/hrtimer.c
|
||||
+++ b/kernel/time/hrtimer.c
|
||||
@@ -1667,12 +1667,12 @@ void __init hrtimers_init(void)
|
||||
@@ -1672,12 +1672,12 @@ void __init hrtimers_init(void)
|
||||
* schedule_hrtimeout_range_clock - sleep until timeout
|
||||
* @expires: timeout value (ktime_t)
|
||||
* @delta: slack in expires timeout (ktime_t)
|
||||
@ -51,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
{
|
||||
struct hrtimer_sleeper t;
|
||||
|
||||
@@ -1693,7 +1693,7 @@ schedule_hrtimeout_range_clock(ktime_t *
|
||||
@@ -1698,7 +1698,7 @@ schedule_hrtimeout_range_clock(ktime_t *
|
||||
return -EINTR;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
hrtimer_set_expires_range_ns(&t.timer, *expires, delta);
|
||||
|
||||
hrtimer_init_sleeper(&t, current);
|
||||
@@ -1715,7 +1715,7 @@ schedule_hrtimeout_range_clock(ktime_t *
|
||||
@@ -1720,7 +1720,7 @@ schedule_hrtimeout_range_clock(ktime_t *
|
||||
* schedule_hrtimeout_range - sleep until timeout
|
||||
* @expires: timeout value (ktime_t)
|
||||
* @delta: slack in expires timeout (ktime_t)
|
||||
@ -69,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*
|
||||
* Make the current task sleep until the given expiry time has
|
||||
* elapsed. The routine will return immediately unless
|
||||
@@ -1754,7 +1754,7 @@ EXPORT_SYMBOL_GPL(schedule_hrtimeout_ran
|
||||
@@ -1759,7 +1759,7 @@ EXPORT_SYMBOL_GPL(schedule_hrtimeout_ran
|
||||
/**
|
||||
* schedule_hrtimeout - sleep until timeout
|
||||
* @expires: timeout value (ktime_t)
|
@ -48,7 +48,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*/
|
||||
void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
|
||||
u64 delta_ns, const enum hrtimer_mode mode)
|
||||
@@ -1111,7 +1111,8 @@ static void __hrtimer_init(struct hrtime
|
||||
@@ -1116,7 +1116,8 @@ static void __hrtimer_init(struct hrtime
|
||||
* hrtimer_init - initialize a timer to the given clock
|
||||
* @timer: the timer to be initialized
|
||||
* @clock_id: the clock to be used
|
@ -27,7 +27,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
enum ps_mode {
|
||||
PS_DISABLED, PS_ENABLED, PS_AUTO_POLL, PS_MANUAL_POLL
|
||||
} ps;
|
||||
@@ -1418,7 +1418,7 @@ static void mac80211_hwsim_stop(struct i
|
||||
@@ -1423,7 +1423,7 @@ static void mac80211_hwsim_stop(struct i
|
||||
{
|
||||
struct mac80211_hwsim_data *data = hw->priv;
|
||||
data->started = false;
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
wiphy_debug(hw->wiphy, "%s\n", __func__);
|
||||
}
|
||||
|
||||
@@ -1541,14 +1541,12 @@ static enum hrtimer_restart
|
||||
@@ -1546,14 +1546,12 @@ static enum hrtimer_restart
|
||||
mac80211_hwsim_beacon(struct hrtimer *timer)
|
||||
{
|
||||
struct mac80211_hwsim_data *data =
|
||||
@ -53,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
ieee80211_iterate_active_interfaces_atomic(
|
||||
hw, IEEE80211_IFACE_ITER_NORMAL,
|
||||
@@ -1560,11 +1558,9 @@ mac80211_hwsim_beacon(struct hrtimer *ti
|
||||
@@ -1565,11 +1563,9 @@ mac80211_hwsim_beacon(struct hrtimer *ti
|
||||
data->bcn_delta = 0;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
}
|
||||
|
||||
static const char * const hwsim_chanwidths[] = {
|
||||
@@ -1638,15 +1634,15 @@ static int mac80211_hwsim_config(struct
|
||||
@@ -1643,15 +1639,15 @@ static int mac80211_hwsim_config(struct
|
||||
mutex_unlock(&data->mutex);
|
||||
|
||||
if (!data->started || !data->beacon_int)
|
||||
@ -89,7 +89,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1709,7 +1705,7 @@ static void mac80211_hwsim_bss_info_chan
|
||||
@@ -1714,7 +1710,7 @@ static void mac80211_hwsim_bss_info_chan
|
||||
info->enable_beacon, info->beacon_int);
|
||||
vp->bcn_en = info->enable_beacon;
|
||||
if (data->started &&
|
||||
@ -98,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
info->enable_beacon) {
|
||||
u64 tsf, until_tbtt;
|
||||
u32 bcn_int;
|
||||
@@ -1717,9 +1713,9 @@ static void mac80211_hwsim_bss_info_chan
|
||||
@@ -1722,9 +1718,9 @@ static void mac80211_hwsim_bss_info_chan
|
||||
tsf = mac80211_hwsim_get_tsf(hw, vif);
|
||||
bcn_int = data->beacon_int;
|
||||
until_tbtt = bcn_int - do_div(tsf, bcn_int);
|
||||
@ -111,7 +111,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
} else if (!info->enable_beacon) {
|
||||
unsigned int count = 0;
|
||||
ieee80211_iterate_active_interfaces_atomic(
|
||||
@@ -1728,7 +1724,7 @@ static void mac80211_hwsim_bss_info_chan
|
||||
@@ -1733,7 +1729,7 @@ static void mac80211_hwsim_bss_info_chan
|
||||
wiphy_debug(hw->wiphy, " beaconing vifs remaining: %u",
|
||||
count);
|
||||
if (count == 0) {
|
||||
@ -120,7 +120,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
data->beacon_int = 0;
|
||||
}
|
||||
}
|
||||
@@ -2720,9 +2716,9 @@ static int mac80211_hwsim_new_radio(stru
|
||||
@@ -2725,9 +2721,9 @@ static int mac80211_hwsim_new_radio(stru
|
||||
data->debugfs,
|
||||
data, &hwsim_simulate_radar);
|
||||
|
@ -30,7 +30,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
--- a/net/xfrm/xfrm_state.c
|
||||
+++ b/net/xfrm/xfrm_state.c
|
||||
@@ -426,7 +426,7 @@ static void xfrm_put_mode(struct xfrm_mo
|
||||
@@ -427,7 +427,7 @@ static void xfrm_put_mode(struct xfrm_mo
|
||||
|
||||
static void xfrm_state_gc_destroy(struct xfrm_state *x)
|
||||
{
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
del_timer_sync(&x->rtimer);
|
||||
kfree(x->aead);
|
||||
kfree(x->aalg);
|
||||
@@ -471,8 +471,8 @@ static void xfrm_state_gc_task(struct wo
|
||||
@@ -472,8 +472,8 @@ static void xfrm_state_gc_task(struct wo
|
||||
|
||||
static enum hrtimer_restart xfrm_timer_handler(struct hrtimer *me)
|
||||
{
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
unsigned long now = get_seconds();
|
||||
long next = LONG_MAX;
|
||||
int warn = 0;
|
||||
@@ -536,7 +536,8 @@ static enum hrtimer_restart xfrm_timer_h
|
||||
@@ -537,7 +537,8 @@ static enum hrtimer_restart xfrm_timer_h
|
||||
km_state_expired(x, 0, 0);
|
||||
resched:
|
||||
if (next != LONG_MAX) {
|
||||
@ -60,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
}
|
||||
|
||||
goto out;
|
||||
@@ -553,7 +554,7 @@ static enum hrtimer_restart xfrm_timer_h
|
||||
@@ -554,7 +555,7 @@ static enum hrtimer_restart xfrm_timer_h
|
||||
|
||||
out:
|
||||
spin_unlock(&x->lock);
|
||||
@ -69,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
}
|
||||
|
||||
static void xfrm_replay_timer_handler(unsigned long data);
|
||||
@@ -572,8 +573,8 @@ struct xfrm_state *xfrm_state_alloc(stru
|
||||
@@ -573,8 +574,8 @@ struct xfrm_state *xfrm_state_alloc(stru
|
||||
INIT_HLIST_NODE(&x->bydst);
|
||||
INIT_HLIST_NODE(&x->bysrc);
|
||||
INIT_HLIST_NODE(&x->byspi);
|
||||
@ -80,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
setup_timer(&x->rtimer, xfrm_replay_timer_handler,
|
||||
(unsigned long)x);
|
||||
x->curlft.add_time = get_seconds();
|
||||
@@ -1030,7 +1031,9 @@ xfrm_state_find(const xfrm_address_t *da
|
||||
@@ -1031,7 +1032,9 @@ xfrm_state_find(const xfrm_address_t *da
|
||||
hlist_add_head_rcu(&x->byspi, net->xfrm.state_byspi + h);
|
||||
}
|
||||
x->lft.hard_add_expires_seconds = net->xfrm.sysctl_acq_expires;
|
||||
@ -91,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
net->xfrm.state_num++;
|
||||
xfrm_hash_grow_check(net, x->bydst.next != NULL);
|
||||
spin_unlock_bh(&net->xfrm.xfrm_state_lock);
|
||||
@@ -1141,7 +1144,7 @@ static void __xfrm_state_insert(struct x
|
||||
@@ -1142,7 +1145,7 @@ static void __xfrm_state_insert(struct x
|
||||
hlist_add_head_rcu(&x->byspi, net->xfrm.state_byspi + h);
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
if (x->replay_maxage)
|
||||
mod_timer(&x->rtimer, jiffies + x->replay_maxage);
|
||||
|
||||
@@ -1245,7 +1248,9 @@ static struct xfrm_state *__find_acq_cor
|
||||
@@ -1246,7 +1249,9 @@ static struct xfrm_state *__find_acq_cor
|
||||
x->mark.m = m->m;
|
||||
x->lft.hard_add_expires_seconds = net->xfrm.sysctl_acq_expires;
|
||||
xfrm_state_hold(x);
|
||||
@ -111,7 +111,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
list_add(&x->km.all, &net->xfrm.state_all);
|
||||
hlist_add_head_rcu(&x->bydst, net->xfrm.state_bydst + h);
|
||||
h = xfrm_src_hash(net, daddr, saddr, family);
|
||||
@@ -1544,7 +1549,8 @@ int xfrm_state_update(struct xfrm_state
|
||||
@@ -1545,7 +1550,8 @@ int xfrm_state_update(struct xfrm_state
|
||||
memcpy(&x1->lft, &x->lft, sizeof(x1->lft));
|
||||
x1->km.dying = 0;
|
||||
|
||||
@ -121,7 +121,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
if (x1->curlft.use_time)
|
||||
xfrm_state_check_expire(x1);
|
||||
|
||||
@@ -1568,7 +1574,7 @@ int xfrm_state_check_expire(struct xfrm_
|
||||
@@ -1569,7 +1575,7 @@ int xfrm_state_check_expire(struct xfrm_
|
||||
if (x->curlft.bytes >= x->lft.hard_byte_limit ||
|
||||
x->curlft.packets >= x->lft.hard_packet_limit) {
|
||||
x->km.state = XFRM_STATE_EXPIRED;
|
@ -15,7 +15,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
--- a/include/linux/interrupt.h
|
||||
+++ b/include/linux/interrupt.h
|
||||
@@ -633,31 +633,6 @@ extern void tasklet_kill_immediate(struc
|
||||
@@ -618,31 +618,6 @@ extern void tasklet_kill_immediate(struc
|
||||
extern void tasklet_init(struct tasklet_struct *t,
|
||||
void (*func)(unsigned long), unsigned long data);
|
||||
|
||||
@ -49,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*
|
||||
--- a/kernel/softirq.c
|
||||
+++ b/kernel/softirq.c
|
||||
@@ -594,57 +594,6 @@ void tasklet_kill(struct tasklet_struct
|
||||
@@ -584,57 +584,6 @@ void tasklet_kill(struct tasklet_struct
|
||||
}
|
||||
EXPORT_SYMBOL(tasklet_kill);
|
||||
|
@ -114,7 +114,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
}
|
||||
}
|
||||
mvpp2_cleanup_rxqs(port);
|
||||
@@ -7639,13 +7630,10 @@ static int mvpp2_port_probe(struct platf
|
||||
@@ -7644,13 +7635,10 @@ static int mvpp2_port_probe(struct platf
|
||||
port_pcpu = per_cpu_ptr(port->pcpu, cpu);
|
||||
|
||||
hrtimer_init(&port_pcpu->tx_done_timer, CLOCK_MONOTONIC,
|
@ -21,7 +21,7 @@ Cc: stable-rt@vger.kernel.org
|
||||
|
||||
--- a/kernel/locking/rtmutex.c
|
||||
+++ b/kernel/locking/rtmutex.c
|
||||
@@ -1728,7 +1728,7 @@ int __rt_mutex_start_proxy_lock(struct r
|
||||
@@ -1729,7 +1729,7 @@ int __rt_mutex_start_proxy_lock(struct r
|
||||
ret = 0;
|
||||
}
|
||||
|
@ -0,0 +1,60 @@
|
||||
From: "bigeasy@linutronix.de" <bigeasy@linutronix.de>
|
||||
Date: Fri, 23 Mar 2018 18:17:36 +0100
|
||||
Subject: [PATCH] target: drop spin_lock_assert() + irqs_disabled() combo
|
||||
checks
|
||||
|
||||
There are a few functions which check for if the lock is held
|
||||
(spin_lock_assert()) and the interrupts are disabled (irqs_disabled()).
|
||||
>From looking at the code, each function is static, the caller is near by
|
||||
and does spin_lock_irq|safe(). As Linus puts it:
|
||||
|
||||
|It's not like this is some function that is exported to random users,
|
||||
|and we should check that the calling convention is right.
|
||||
|
|
||||
|This looks like "it may have been useful during coding to document
|
||||
|things, but it's not useful long-term".
|
||||
|
||||
Remove those checks.
|
||||
|
||||
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
|
||||
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
|
||||
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
drivers/target/target_core_tmr.c | 2 --
|
||||
drivers/target/target_core_transport.c | 6 ------
|
||||
2 files changed, 8 deletions(-)
|
||||
|
||||
--- a/drivers/target/target_core_tmr.c
|
||||
+++ b/drivers/target/target_core_tmr.c
|
||||
@@ -114,8 +114,6 @@ static bool __target_check_io_state(stru
|
||||
{
|
||||
struct se_session *sess = se_cmd->se_sess;
|
||||
|
||||
- assert_spin_locked(&sess->sess_cmd_lock);
|
||||
- WARN_ON_ONCE(!irqs_disabled());
|
||||
/*
|
||||
* If command already reached CMD_T_COMPLETE state within
|
||||
* target_complete_cmd() or CMD_T_FABRIC_STOP due to shutdown,
|
||||
--- a/drivers/target/target_core_transport.c
|
||||
+++ b/drivers/target/target_core_transport.c
|
||||
@@ -2966,9 +2966,6 @@ static bool
|
||||
__acquires(&cmd->t_state_lock)
|
||||
{
|
||||
|
||||
- assert_spin_locked(&cmd->t_state_lock);
|
||||
- WARN_ON_ONCE(!irqs_disabled());
|
||||
-
|
||||
if (fabric_stop)
|
||||
cmd->transport_state |= CMD_T_FABRIC_STOP;
|
||||
|
||||
@@ -3238,9 +3235,6 @@ static int __transport_check_aborted_sta
|
||||
{
|
||||
int ret;
|
||||
|
||||
- assert_spin_locked(&cmd->t_state_lock);
|
||||
- WARN_ON_ONCE(!irqs_disabled());
|
||||
-
|
||||
if (!(cmd->transport_state & CMD_T_ABORTED))
|
||||
return 0;
|
||||
/*
|
@ -344,7 +344,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
* parent)
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -959,7 +959,7 @@ static struct rq *__migrate_task(struct
|
||||
@@ -960,7 +960,7 @@ static struct rq *__migrate_task(struct
|
||||
}
|
||||
|
||||
/* Affinity changed (again). */
|
||||
@ -353,7 +353,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
return rq;
|
||||
|
||||
update_rq_clock(rq);
|
||||
@@ -987,7 +987,7 @@ static int migration_cpu_stop(void *data
|
||||
@@ -988,7 +988,7 @@ static int migration_cpu_stop(void *data
|
||||
local_irq_disable();
|
||||
/*
|
||||
* We need to explicitly wake pending tasks before running
|
||||
@ -362,7 +362,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
* during wakeups, see set_cpus_allowed_ptr()'s TASK_WAKING test.
|
||||
*/
|
||||
sched_ttwu_pending();
|
||||
@@ -1018,7 +1018,7 @@ static int migration_cpu_stop(void *data
|
||||
@@ -1019,7 +1019,7 @@ static int migration_cpu_stop(void *data
|
||||
*/
|
||||
void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask)
|
||||
{
|
||||
@ -371,7 +371,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
p->nr_cpus_allowed = cpumask_weight(new_mask);
|
||||
}
|
||||
|
||||
@@ -1088,7 +1088,7 @@ static int __set_cpus_allowed_ptr(struct
|
||||
@@ -1089,7 +1089,7 @@ static int __set_cpus_allowed_ptr(struct
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
goto out;
|
||||
|
||||
if (!cpumask_intersects(new_mask, cpu_valid_mask)) {
|
||||
@@ -1249,10 +1249,10 @@ static int migrate_swap_stop(void *data)
|
||||
@@ -1250,10 +1250,10 @@ static int migrate_swap_stop(void *data)
|
||||
if (task_cpu(arg->src_task) != arg->src_cpu)
|
||||
goto unlock;
|
||||
|
||||
@ -393,7 +393,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
goto unlock;
|
||||
|
||||
__migrate_swap_task(arg->src_task, arg->dst_cpu);
|
||||
@@ -1293,10 +1293,10 @@ int migrate_swap(struct task_struct *cur
|
||||
@@ -1294,10 +1294,10 @@ int migrate_swap(struct task_struct *cur
|
||||
if (!cpu_active(arg.src_cpu) || !cpu_active(arg.dst_cpu))
|
||||
goto out;
|
||||
|
||||
@ -406,7 +406,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
goto out;
|
||||
|
||||
trace_sched_swap_numa(cur, arg.src_cpu, p, arg.dst_cpu);
|
||||
@@ -1440,7 +1440,7 @@ void kick_process(struct task_struct *p)
|
||||
@@ -1441,7 +1441,7 @@ void kick_process(struct task_struct *p)
|
||||
EXPORT_SYMBOL_GPL(kick_process);
|
||||
|
||||
/*
|
||||
@ -415,7 +415,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*
|
||||
* A few notes on cpu_active vs cpu_online:
|
||||
*
|
||||
@@ -1480,14 +1480,14 @@ static int select_fallback_rq(int cpu, s
|
||||
@@ -1481,14 +1481,14 @@ static int select_fallback_rq(int cpu, s
|
||||
for_each_cpu(dest_cpu, nodemask) {
|
||||
if (!cpu_active(dest_cpu))
|
||||
continue;
|
||||
@ -432,7 +432,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
if (!(p->flags & PF_KTHREAD) && !cpu_active(dest_cpu))
|
||||
continue;
|
||||
if (!cpu_online(dest_cpu))
|
||||
@@ -1532,7 +1532,7 @@ static int select_fallback_rq(int cpu, s
|
||||
@@ -1533,7 +1533,7 @@ static int select_fallback_rq(int cpu, s
|
||||
}
|
||||
|
||||
/*
|
||||
@ -441,7 +441,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*/
|
||||
static inline
|
||||
int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags)
|
||||
@@ -1542,11 +1542,11 @@ int select_task_rq(struct task_struct *p
|
||||
@@ -1543,11 +1543,11 @@ int select_task_rq(struct task_struct *p
|
||||
if (p->nr_cpus_allowed > 1)
|
||||
cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags);
|
||||
else
|
||||
@ -455,7 +455,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
* CPU.
|
||||
*
|
||||
* Since this is common to all placement strategies, this lives here.
|
||||
@@ -1554,7 +1554,7 @@ int select_task_rq(struct task_struct *p
|
||||
@@ -1555,7 +1555,7 @@ int select_task_rq(struct task_struct *p
|
||||
* [ this allows ->select_task() to simply return task_cpu(p) and
|
||||
* not worry about this generic constraint ]
|
||||
*/
|
||||
@ -464,7 +464,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
!cpu_online(cpu)))
|
||||
cpu = select_fallback_rq(task_cpu(p), p);
|
||||
|
||||
@@ -2444,7 +2444,7 @@ void wake_up_new_task(struct task_struct
|
||||
@@ -2445,7 +2445,7 @@ void wake_up_new_task(struct task_struct
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
* Fork balancing, do it here and not earlier because:
|
||||
@ -473,7 +473,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
* - any previously selected CPU might disappear through hotplug
|
||||
*
|
||||
* Use __set_task_cpu() to avoid calling sched_class::migrate_task_rq,
|
||||
@@ -4161,7 +4161,7 @@ static int __sched_setscheduler(struct t
|
||||
@@ -4162,7 +4162,7 @@ static int __sched_setscheduler(struct t
|
||||
* the entire root_domain to become SCHED_DEADLINE. We
|
||||
* will also fail if there's no bandwidth available.
|
||||
*/
|
||||
@ -482,7 +482,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
rq->rd->dl_bw.bw == 0) {
|
||||
task_rq_unlock(rq, p, &rf);
|
||||
return -EPERM;
|
||||
@@ -4755,7 +4755,7 @@ long sched_getaffinity(pid_t pid, struct
|
||||
@@ -4756,7 +4756,7 @@ long sched_getaffinity(pid_t pid, struct
|
||||
goto out_unlock;
|
||||
|
||||
raw_spin_lock_irqsave(&p->pi_lock, flags);
|
||||
@ -491,7 +491,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
|
||||
|
||||
out_unlock:
|
||||
@@ -5320,7 +5320,7 @@ int task_can_attach(struct task_struct *
|
||||
@@ -5321,7 +5321,7 @@ int task_can_attach(struct task_struct *
|
||||
* allowed nodes is unnecessary. Thus, cpusets are not
|
||||
* applicable for such threads. This prevents checking for
|
||||
* success of set_cpus_allowed_ptr() on all attached tasks
|
||||
@ -500,7 +500,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*/
|
||||
if (p->flags & PF_NO_SETAFFINITY) {
|
||||
ret = -EINVAL;
|
||||
@@ -5347,7 +5347,7 @@ int migrate_task_to(struct task_struct *
|
||||
@@ -5348,7 +5348,7 @@ int migrate_task_to(struct task_struct *
|
||||
if (curr_cpu == target_cpu)
|
||||
return 0;
|
||||
|
||||
@ -509,7 +509,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
return -EINVAL;
|
||||
|
||||
/* TODO: This is not properly updating schedstats */
|
||||
@@ -5484,7 +5484,7 @@ static void migrate_tasks(struct rq *dea
|
||||
@@ -5485,7 +5485,7 @@ static void migrate_tasks(struct rq *dea
|
||||
put_prev_task(rq, next);
|
||||
|
||||
/*
|
@ -79,7 +79,7 @@ Subject: kernel/sched/core: add migrate_disable()
|
||||
* boot command line:
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -1022,7 +1022,15 @@ void set_cpus_allowed_common(struct task
|
||||
@@ -1023,7 +1023,15 @@ void set_cpus_allowed_common(struct task
|
||||
p->nr_cpus_allowed = cpumask_weight(new_mask);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ Subject: kernel/sched/core: add migrate_disable()
|
||||
{
|
||||
struct rq *rq = task_rq(p);
|
||||
bool queued, running;
|
||||
@@ -1051,6 +1059,20 @@ void do_set_cpus_allowed(struct task_str
|
||||
@@ -1052,6 +1060,20 @@ void do_set_cpus_allowed(struct task_str
|
||||
set_curr_task(rq, p);
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ Subject: kernel/sched/core: add migrate_disable()
|
||||
/*
|
||||
* Change a given task's CPU affinity. Migrate the thread to a
|
||||
* proper CPU and schedule it away if the CPU it's executing on
|
||||
@@ -1109,9 +1131,16 @@ static int __set_cpus_allowed_ptr(struct
|
||||
@@ -1110,9 +1132,16 @@ static int __set_cpus_allowed_ptr(struct
|
||||
}
|
||||
|
||||
/* Can the task run on the task's current CPU? If so, we're done */
|
||||
@ -135,7 +135,7 @@ Subject: kernel/sched/core: add migrate_disable()
|
||||
dest_cpu = cpumask_any_and(cpu_valid_mask, new_mask);
|
||||
if (task_running(rq, p) || p->state == TASK_WAKING) {
|
||||
struct migration_arg arg = { p, dest_cpu };
|
||||
@@ -6759,3 +6788,100 @@ const u32 sched_prio_to_wmult[40] = {
|
||||
@@ -6760,3 +6789,100 @@ const u32 sched_prio_to_wmult[40] = {
|
||||
/* 10 */ 39045157, 49367440, 61356676, 76695844, 95443717,
|
||||
/* 15 */ 119304647, 148102320, 186737708, 238609294, 286331153,
|
||||
};
|
@ -28,7 +28,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
--- a/kernel/trace/ring_buffer.c
|
||||
+++ b/kernel/trace/ring_buffer.c
|
||||
@@ -2542,61 +2542,29 @@ rb_wakeups(struct ring_buffer *buffer, s
|
||||
@@ -2540,61 +2540,29 @@ rb_wakeups(struct ring_buffer *buffer, s
|
||||
* The lock and unlock are done within a preempt disable section.
|
||||
* The current_context per_cpu variable can only be modified
|
||||
* by the current task between lock and unlock. But it can
|
||||
@ -105,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2604,7 +2572,9 @@ trace_recursive_lock(struct ring_buffer_
|
||||
@@ -2602,7 +2570,9 @@ trace_recursive_lock(struct ring_buffer_
|
||||
static __always_inline void
|
||||
trace_recursive_unlock(struct ring_buffer_per_cpu *cpu_buffer)
|
||||
{
|
@ -26,7 +26,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
--- a/include/linux/ring_buffer.h
|
||||
+++ b/include/linux/ring_buffer.h
|
||||
@@ -181,6 +181,8 @@ void ring_buffer_normalize_time_stamp(st
|
||||
@@ -178,6 +178,8 @@ void ring_buffer_normalize_time_stamp(st
|
||||
int cpu, u64 *ts);
|
||||
void ring_buffer_set_clock(struct ring_buffer *buffer,
|
||||
u64 (*clock)(void));
|
||||
@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
--- a/kernel/trace/ring_buffer.c
|
||||
+++ b/kernel/trace/ring_buffer.c
|
||||
@@ -489,6 +489,7 @@ struct ring_buffer {
|
||||
@@ -488,6 +488,7 @@ struct ring_buffer {
|
||||
u64 (*clock)(void);
|
||||
|
||||
struct rb_irq_work irq_work;
|
||||
@ -45,7 +45,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
};
|
||||
|
||||
struct ring_buffer_iter {
|
||||
@@ -1383,6 +1384,16 @@ void ring_buffer_set_clock(struct ring_b
|
||||
@@ -1382,6 +1383,16 @@ void ring_buffer_set_clock(struct ring_b
|
||||
buffer->clock = clock;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
||||
--- a/include/linux/ring_buffer.h
|
||||
+++ b/include/linux/ring_buffer.h
|
||||
@@ -37,10 +37,12 @@ struct ring_buffer_event {
|
||||
@@ -34,10 +34,12 @@ struct ring_buffer_event {
|
||||
* array[0] = time delta (28 .. 59)
|
||||
* size = 8 bytes
|
||||
*
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*
|
||||
* <= @RINGBUF_TYPE_DATA_TYPE_LEN_MAX:
|
||||
* Data record
|
||||
@@ -57,12 +59,12 @@ enum ring_buffer_type {
|
||||
@@ -54,12 +56,12 @@ enum ring_buffer_type {
|
||||
RINGBUF_TYPE_DATA_TYPE_LEN_MAX = 28,
|
||||
RINGBUF_TYPE_PADDING,
|
||||
RINGBUF_TYPE_TIME_EXTEND,
|
||||
@ -66,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
* ring_buffer_discard_commit will remove an event that has not
|
||||
--- a/kernel/trace/ring_buffer.c
|
||||
+++ b/kernel/trace/ring_buffer.c
|
||||
@@ -42,6 +42,8 @@ int ring_buffer_print_entry_header(struc
|
||||
@@ -41,6 +41,8 @@ int ring_buffer_print_entry_header(struc
|
||||
RINGBUF_TYPE_PADDING);
|
||||
trace_seq_printf(s, "\ttime_extend : type == %d\n",
|
||||
RINGBUF_TYPE_TIME_EXTEND);
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
trace_seq_printf(s, "\tdata max type_len == %d\n",
|
||||
RINGBUF_TYPE_DATA_TYPE_LEN_MAX);
|
||||
|
||||
@@ -141,12 +143,15 @@ int ring_buffer_print_entry_header(struc
|
||||
@@ -140,12 +142,15 @@ int ring_buffer_print_entry_header(struc
|
||||
|
||||
enum {
|
||||
RB_LEN_TIME_EXTEND = 8,
|
||||
@ -92,7 +92,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
static inline int rb_null_event(struct ring_buffer_event *event)
|
||||
{
|
||||
return event->type_len == RINGBUF_TYPE_PADDING && !event->time_delta;
|
||||
@@ -210,7 +215,7 @@ rb_event_ts_length(struct ring_buffer_ev
|
||||
@@ -209,7 +214,7 @@ rb_event_ts_length(struct ring_buffer_ev
|
||||
{
|
||||
unsigned len = 0;
|
||||
|
||||
@ -101,7 +101,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
/* time extends include the data event after it */
|
||||
len = RB_LEN_TIME_EXTEND;
|
||||
event = skip_time_extend(event);
|
||||
@@ -232,7 +237,7 @@ unsigned ring_buffer_event_length(struct
|
||||
@@ -231,7 +236,7 @@ unsigned ring_buffer_event_length(struct
|
||||
{
|
||||
unsigned length;
|
||||
|
||||
@ -110,7 +110,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
event = skip_time_extend(event);
|
||||
|
||||
length = rb_event_length(event);
|
||||
@@ -249,7 +254,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_event_leng
|
||||
@@ -248,7 +253,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_event_leng
|
||||
static __always_inline void *
|
||||
rb_event_data(struct ring_buffer_event *event)
|
||||
{
|
||||
@ -119,7 +119,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
event = skip_time_extend(event);
|
||||
BUG_ON(event->type_len > RINGBUF_TYPE_DATA_TYPE_LEN_MAX);
|
||||
/* If length is in len field, then array[0] has the data */
|
||||
@@ -276,6 +281,27 @@ EXPORT_SYMBOL_GPL(ring_buffer_event_data
|
||||
@@ -275,6 +280,27 @@ EXPORT_SYMBOL_GPL(ring_buffer_event_data
|
||||
#define TS_MASK ((1ULL << TS_SHIFT) - 1)
|
||||
#define TS_DELTA_TEST (~TS_MASK)
|
||||
|
||||
@ -147,7 +147,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
/* Flag when events were overwritten */
|
||||
#define RB_MISSED_EVENTS (1 << 31)
|
||||
/* Missed count stored at end */
|
||||
@@ -2225,12 +2251,15 @@ rb_move_tail(struct ring_buffer_per_cpu
|
||||
@@ -2223,12 +2249,15 @@ rb_move_tail(struct ring_buffer_per_cpu
|
||||
|
||||
/* Slow path, do not inline */
|
||||
static noinline struct ring_buffer_event *
|
||||
@ -167,7 +167,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
event->time_delta = delta & TS_MASK;
|
||||
event->array[0] = delta >> TS_SHIFT;
|
||||
} else {
|
||||
@@ -2273,7 +2302,9 @@ rb_update_event(struct ring_buffer_per_c
|
||||
@@ -2271,7 +2300,9 @@ rb_update_event(struct ring_buffer_per_c
|
||||
* add it to the start of the resevered space.
|
||||
*/
|
||||
if (unlikely(info->add_timestamp)) {
|
||||
@ -178,7 +178,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
length -= RB_LEN_TIME_EXTEND;
|
||||
delta = 0;
|
||||
}
|
||||
@@ -2461,7 +2492,7 @@ static __always_inline void rb_end_commi
|
||||
@@ -2459,7 +2490,7 @@ static __always_inline void rb_end_commi
|
||||
|
||||
static inline void rb_event_discard(struct ring_buffer_event *event)
|
||||
{
|
||||
@ -187,7 +187,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
event = skip_time_extend(event);
|
||||
|
||||
/* array[0] holds the actual length for the discarded event */
|
||||
@@ -2505,10 +2536,11 @@ rb_update_write_stamp(struct ring_buffer
|
||||
@@ -2503,10 +2534,11 @@ rb_update_write_stamp(struct ring_buffer
|
||||
cpu_buffer->write_stamp =
|
||||
cpu_buffer->commit_page->page->time_stamp;
|
||||
else if (event->type_len == RINGBUF_TYPE_TIME_EXTEND) {
|
||||
@ -202,7 +202,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
} else
|
||||
cpu_buffer->write_stamp += event->time_delta;
|
||||
}
|
||||
@@ -2661,7 +2693,7 @@ static struct ring_buffer_event *
|
||||
@@ -2659,7 +2691,7 @@ static struct ring_buffer_event *
|
||||
* If this is the first commit on the page, then it has the same
|
||||
* timestamp as the page itself.
|
||||
*/
|
||||
@ -211,7 +211,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
info->delta = 0;
|
||||
|
||||
/* See if we shot pass the end of this buffer page */
|
||||
@@ -2739,8 +2771,11 @@ rb_reserve_next_event(struct ring_buffer
|
||||
@@ -2736,8 +2768,11 @@ rb_reserve_next_event(struct ring_buffer
|
||||
/* make sure this diff is calculated here */
|
||||
barrier();
|
||||
|
||||
@ -225,7 +225,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
info.delta = diff;
|
||||
if (unlikely(test_time_stamp(info.delta)))
|
||||
rb_handle_timestamp(cpu_buffer, &info);
|
||||
@@ -3422,14 +3457,13 @@ rb_update_read_stamp(struct ring_buffer_
|
||||
@@ -3419,14 +3454,13 @@ rb_update_read_stamp(struct ring_buffer_
|
||||
return;
|
||||
|
||||
case RINGBUF_TYPE_TIME_EXTEND:
|
||||
@ -243,7 +243,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
return;
|
||||
|
||||
case RINGBUF_TYPE_DATA:
|
||||
@@ -3453,14 +3487,13 @@ rb_update_iter_read_stamp(struct ring_bu
|
||||
@@ -3450,14 +3484,13 @@ rb_update_iter_read_stamp(struct ring_bu
|
||||
return;
|
||||
|
||||
case RINGBUF_TYPE_TIME_EXTEND:
|
||||
@ -261,7 +261,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
return;
|
||||
|
||||
case RINGBUF_TYPE_DATA:
|
||||
@@ -3684,6 +3717,8 @@ rb_buffer_peek(struct ring_buffer_per_cp
|
||||
@@ -3681,6 +3714,8 @@ rb_buffer_peek(struct ring_buffer_per_cp
|
||||
struct buffer_page *reader;
|
||||
int nr_loops = 0;
|
||||
|
||||
@ -270,7 +270,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
again:
|
||||
/*
|
||||
* We repeat when a time extend is encountered.
|
||||
@@ -3720,12 +3755,17 @@ rb_buffer_peek(struct ring_buffer_per_cp
|
||||
@@ -3717,12 +3752,17 @@ rb_buffer_peek(struct ring_buffer_per_cp
|
||||
goto again;
|
||||
|
||||
case RINGBUF_TYPE_TIME_STAMP:
|
||||
@ -290,7 +290,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*ts = cpu_buffer->read_stamp + event->time_delta;
|
||||
ring_buffer_normalize_time_stamp(cpu_buffer->buffer,
|
||||
cpu_buffer->cpu, ts);
|
||||
@@ -3750,6 +3790,9 @@ rb_iter_peek(struct ring_buffer_iter *it
|
||||
@@ -3747,6 +3787,9 @@ rb_iter_peek(struct ring_buffer_iter *it
|
||||
struct ring_buffer_event *event;
|
||||
int nr_loops = 0;
|
||||
|
||||
@ -300,7 +300,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
cpu_buffer = iter->cpu_buffer;
|
||||
buffer = cpu_buffer->buffer;
|
||||
|
||||
@@ -3802,12 +3845,17 @@ rb_iter_peek(struct ring_buffer_iter *it
|
||||
@@ -3799,12 +3842,17 @@ rb_iter_peek(struct ring_buffer_iter *it
|
||||
goto again;
|
||||
|
||||
case RINGBUF_TYPE_TIME_STAMP:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user