Backmerge tag 'v5.10-rc2' into arm/drivers
The SCMI pull request for the arm/drivers branch requires v5.10-rc2 because of dependencies with other git trees, so merge that in here. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
+3
-1
@@ -1503,8 +1503,10 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
|
||||
*/
|
||||
newval = FUTEX_WAITERS | task_pid_vnr(new_owner);
|
||||
|
||||
if (unlikely(should_fail_futex(true)))
|
||||
if (unlikely(should_fail_futex(true))) {
|
||||
ret = -EFAULT;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
ret = cmpxchg_futex_value_locked(&curval, uaddr, uval, newval);
|
||||
if (!ret && (curval != uval)) {
|
||||
|
||||
@@ -84,7 +84,7 @@ static inline bool lockdep_enabled(void)
|
||||
if (!debug_locks)
|
||||
return false;
|
||||
|
||||
if (raw_cpu_read(lockdep_recursion))
|
||||
if (this_cpu_read(lockdep_recursion))
|
||||
return false;
|
||||
|
||||
if (current->lockdep_recursion)
|
||||
@@ -4057,7 +4057,7 @@ void lockdep_hardirqs_on_prepare(unsigned long ip)
|
||||
if (unlikely(in_nmi()))
|
||||
return;
|
||||
|
||||
if (unlikely(__this_cpu_read(lockdep_recursion)))
|
||||
if (unlikely(this_cpu_read(lockdep_recursion)))
|
||||
return;
|
||||
|
||||
if (unlikely(lockdep_hardirqs_enabled())) {
|
||||
@@ -4126,7 +4126,7 @@ void noinstr lockdep_hardirqs_on(unsigned long ip)
|
||||
goto skip_checks;
|
||||
}
|
||||
|
||||
if (unlikely(__this_cpu_read(lockdep_recursion)))
|
||||
if (unlikely(this_cpu_read(lockdep_recursion)))
|
||||
return;
|
||||
|
||||
if (lockdep_hardirqs_enabled()) {
|
||||
@@ -4396,6 +4396,9 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
|
||||
if (unlikely(hlock_class(this)->usage_mask & new_mask))
|
||||
goto unlock;
|
||||
|
||||
if (!hlock_class(this)->usage_mask)
|
||||
debug_atomic_dec(nr_unused_locks);
|
||||
|
||||
hlock_class(this)->usage_mask |= new_mask;
|
||||
|
||||
if (new_bit < LOCK_TRACE_STATES) {
|
||||
@@ -4403,19 +4406,10 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (new_bit) {
|
||||
case 0 ... LOCK_USED-1:
|
||||
if (new_bit < LOCK_USED) {
|
||||
ret = mark_lock_irq(curr, this, new_bit);
|
||||
if (!ret)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case LOCK_USED:
|
||||
debug_atomic_dec(nr_unused_locks);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
unlock:
|
||||
|
||||
+1
-1
@@ -530,7 +530,7 @@ struct module_param_attrs
|
||||
{
|
||||
unsigned int num;
|
||||
struct attribute_group grp;
|
||||
struct param_attribute attrs[0];
|
||||
struct param_attribute attrs[];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SYSFS
|
||||
|
||||
@@ -146,7 +146,7 @@ int freeze_processes(void)
|
||||
BUG_ON(in_atomic());
|
||||
|
||||
/*
|
||||
* Now that the whole userspace is frozen we need to disbale
|
||||
* Now that the whole userspace is frozen we need to disable
|
||||
* the OOM killer to disallow any further interference with
|
||||
* killable tasks. There is no guarantee oom victims will
|
||||
* ever reach a point they go away we have to wait with a timeout.
|
||||
|
||||
@@ -345,7 +345,7 @@ DESC_ID((id) - DESCS_COUNT(desc_ring))
|
||||
*/
|
||||
struct prb_data_block {
|
||||
unsigned long id;
|
||||
char data[0];
|
||||
char data[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -409,7 +409,7 @@ bool rcu_eqs_special_set(int cpu)
|
||||
*
|
||||
* The caller must have disabled interrupts and must not be idle.
|
||||
*/
|
||||
void rcu_momentary_dyntick_idle(void)
|
||||
notrace void rcu_momentary_dyntick_idle(void)
|
||||
{
|
||||
int special;
|
||||
|
||||
|
||||
@@ -102,7 +102,8 @@ static bool sugov_should_update_freq(struct sugov_policy *sg_policy, u64 time)
|
||||
static bool sugov_update_next_freq(struct sugov_policy *sg_policy, u64 time,
|
||||
unsigned int next_freq)
|
||||
{
|
||||
if (sg_policy->next_freq == next_freq)
|
||||
if (sg_policy->next_freq == next_freq &&
|
||||
!cpufreq_driver_test_flags(CPUFREQ_NEED_UPDATE_LIMITS))
|
||||
return false;
|
||||
|
||||
sg_policy->next_freq = next_freq;
|
||||
@@ -161,7 +162,8 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy,
|
||||
|
||||
freq = map_util_freq(util, freq, max);
|
||||
|
||||
if (freq == sg_policy->cached_raw_freq && !sg_policy->need_freq_update)
|
||||
if (freq == sg_policy->cached_raw_freq && !sg_policy->need_freq_update &&
|
||||
!cpufreq_driver_test_flags(CPUFREQ_NEED_UPDATE_LIMITS))
|
||||
return sg_policy->next_freq;
|
||||
|
||||
sg_policy->need_freq_update = false;
|
||||
|
||||
@@ -178,7 +178,7 @@ static void ack_state(struct multi_stop_data *msdata)
|
||||
set_state(msdata, msdata->state + 1);
|
||||
}
|
||||
|
||||
void __weak stop_machine_yield(const struct cpumask *cpumask)
|
||||
notrace void __weak stop_machine_yield(const struct cpumask *cpumask)
|
||||
{
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
@@ -425,11 +425,6 @@ static inline void debug_hrtimer_deactivate(struct hrtimer *timer)
|
||||
debug_object_deactivate(timer, &hrtimer_debug_descr);
|
||||
}
|
||||
|
||||
static inline void debug_hrtimer_free(struct hrtimer *timer)
|
||||
{
|
||||
debug_object_free(timer, &hrtimer_debug_descr);
|
||||
}
|
||||
|
||||
static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
|
||||
enum hrtimer_mode mode);
|
||||
|
||||
|
||||
@@ -172,10 +172,6 @@ static void set_cpu_itimer(struct task_struct *tsk, unsigned int clock_id,
|
||||
u64 oval, nval, ointerval, ninterval;
|
||||
struct cpu_itimer *it = &tsk->signal->it[clock_id];
|
||||
|
||||
/*
|
||||
* Use the to_ktime conversion because that clamps the maximum
|
||||
* value to KTIME_MAX and avoid multiplication overflows.
|
||||
*/
|
||||
nval = timespec64_to_ns(&value->it_value);
|
||||
ninterval = timespec64_to_ns(&value->it_interval);
|
||||
|
||||
|
||||
@@ -68,13 +68,13 @@ static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift)
|
||||
return (cyc * mult) >> shift;
|
||||
}
|
||||
|
||||
struct clock_read_data *sched_clock_read_begin(unsigned int *seq)
|
||||
notrace struct clock_read_data *sched_clock_read_begin(unsigned int *seq)
|
||||
{
|
||||
*seq = raw_read_seqcount_latch(&cd.seq);
|
||||
return cd.read_data + (*seq & 1);
|
||||
}
|
||||
|
||||
int sched_clock_read_retry(unsigned int seq)
|
||||
notrace int sched_clock_read_retry(unsigned int seq)
|
||||
{
|
||||
return read_seqcount_latch_retry(&cd.seq, seq);
|
||||
}
|
||||
|
||||
@@ -732,11 +732,6 @@ static inline void debug_timer_deactivate(struct timer_list *timer)
|
||||
debug_object_deactivate(timer, &timer_debug_descr);
|
||||
}
|
||||
|
||||
static inline void debug_timer_free(struct timer_list *timer)
|
||||
{
|
||||
debug_object_free(timer, &timer_debug_descr);
|
||||
}
|
||||
|
||||
static inline void debug_timer_assert_init(struct timer_list *timer)
|
||||
{
|
||||
debug_object_assert_init(timer, &timer_debug_descr);
|
||||
|
||||
@@ -585,6 +585,7 @@ static struct synth_field *parse_synth_field(int argc, const char **argv,
|
||||
struct synth_field *field;
|
||||
const char *prefix = NULL, *field_type = argv[0], *field_name, *array;
|
||||
int len, ret = 0;
|
||||
struct seq_buf s;
|
||||
ssize_t size;
|
||||
|
||||
if (field_type[0] == ';')
|
||||
@@ -630,13 +631,9 @@ static struct synth_field *parse_synth_field(int argc, const char **argv,
|
||||
field_type++;
|
||||
len = strlen(field_type) + 1;
|
||||
|
||||
if (array) {
|
||||
int l = strlen(array);
|
||||
if (array)
|
||||
len += strlen(array);
|
||||
|
||||
if (l && array[l - 1] == ';')
|
||||
l--;
|
||||
len += l;
|
||||
}
|
||||
if (prefix)
|
||||
len += strlen(prefix);
|
||||
|
||||
@@ -645,14 +642,18 @@ static struct synth_field *parse_synth_field(int argc, const char **argv,
|
||||
ret = -ENOMEM;
|
||||
goto free;
|
||||
}
|
||||
seq_buf_init(&s, field->type, len);
|
||||
if (prefix)
|
||||
strcat(field->type, prefix);
|
||||
strcat(field->type, field_type);
|
||||
seq_buf_puts(&s, prefix);
|
||||
seq_buf_puts(&s, field_type);
|
||||
if (array) {
|
||||
strcat(field->type, array);
|
||||
if (field->type[len - 1] == ';')
|
||||
field->type[len - 1] = '\0';
|
||||
seq_buf_puts(&s, array);
|
||||
if (s.buffer[s.len - 1] == ';')
|
||||
s.len--;
|
||||
}
|
||||
if (WARN_ON_ONCE(!seq_buf_buffer_left(&s)))
|
||||
goto free;
|
||||
s.buffer[s.len] = '\0';
|
||||
|
||||
size = synth_field_size(field->type);
|
||||
if (size < 0) {
|
||||
@@ -663,14 +664,21 @@ static struct synth_field *parse_synth_field(int argc, const char **argv,
|
||||
if (synth_field_is_string(field->type)) {
|
||||
char *type;
|
||||
|
||||
type = kzalloc(sizeof("__data_loc ") + strlen(field->type) + 1, GFP_KERNEL);
|
||||
len = sizeof("__data_loc ") + strlen(field->type) + 1;
|
||||
type = kzalloc(len, GFP_KERNEL);
|
||||
if (!type) {
|
||||
ret = -ENOMEM;
|
||||
goto free;
|
||||
}
|
||||
|
||||
strcat(type, "__data_loc ");
|
||||
strcat(type, field->type);
|
||||
seq_buf_init(&s, type, len);
|
||||
seq_buf_puts(&s, "__data_loc ");
|
||||
seq_buf_puts(&s, field->type);
|
||||
|
||||
if (WARN_ON_ONCE(!seq_buf_buffer_left(&s)))
|
||||
goto free;
|
||||
s.buffer[s.len] = '\0';
|
||||
|
||||
kfree(field->type);
|
||||
field->type = type;
|
||||
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ static bool ok_to_free_tracepoints;
|
||||
*/
|
||||
struct tp_probes {
|
||||
struct rcu_head rcu;
|
||||
struct tracepoint_func probes[0];
|
||||
struct tracepoint_func probes[];
|
||||
};
|
||||
|
||||
static inline void *allocate_probes(int count)
|
||||
|
||||
Reference in New Issue
Block a user