[patch 36/44] posix-cpu-timers: Get rid of zero checks

2019-08-19 Thread Thomas Gleixner
35,6 @@ void posix_cpu_timers_exit_group(struct cleanup_timers(&tsk->signal->posix_cputimers); } -static inline int expires_gt(u64 expires, u64 new_exp) -{ - return expires == 0 || expires > new_exp; -} - /* * Insert the timer on the appropriate list before any

[patch 44/44] posix-cpu-timers: Expire timers directly

2019-08-19 Thread Thomas Gleixner
Moving the posix cpu timers from on list to another and then expiring them from the second list is avoiding to drop and reacquire sighand lock for each timer expiry, but on the other hand it's more complicated code and suboptimal for a small number of timers. Remove the extra list and expire

[patch 39/44] posix-cpu-timers: Get rid of 64bit divisions

2019-08-19 Thread Thomas Gleixner
Instead of dividing A to match the units of B it's more efficient to multiply B to match the units of A. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) --- a/kernel/time/posix-cpu-timers.c +++ b/ker

[patch 37/44] posix-cpu-timers: Consolidate timer expiry further

2019-08-19 Thread Thomas Gleixner
With the array based samples and expiry cache, the expiry function can use a loop to collect timers from the clock specific lists. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c | 48 + 1 file changed, 25 insertions(+), 23 deletions

[patch 18/44] posix-cpu-timers: Use clock ID in posix_cpu_timer_rearm()

2019-08-19 Thread Thomas Gleixner
Extract the clock ID (PROF/VIRT/SCHED) from the clock selector and use it as argument to the sample functions. That allows to simplify them once all callers are fixed. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[patch 42/44] posix-cpu-timers: Move state tracking to struct posix_cputimers

2019-08-19 Thread Thomas Gleixner
/** * posix_cputimers - Container for posix CPU timer related data * @expiries: Earliest-expiration cache array based + * @timers_active: Timers are queued. + * @expiry_active: Timer expiry is active. Used for + * process wide timers to avoid multiple

[patch 23/44] posix-cpu-timers: Move prof/virt_ticks into caller

2019-08-19 Thread Thomas Gleixner
The functions have only one caller left. No point in having them. Move the almost duplicated code into the caller and simplify it. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) --- a/ker

[patch 27/44] posix-cpu-timers: Provide array based access to expiry cache

2019-08-19 Thread Thomas Gleixner
- * @cputime_expires: Earliest-expiration cache + * @cputime_expires: Earliest-expiration cache task_cputime based + * @expiries: Earliest-expiration cache array based * @cpu_timers:List heads to queue posix CPU timers * * Used in task_struct and signal_struct */ struct

[patch 43/44] posix-cpu-timers: Utilize timerqueue for storage

2019-08-19 Thread Thomas Gleixner
Using a linear O(N) search for timer insertion affects execution time and Dcache footprint badly with a larger number of timers. Switch the storage to a timerqueue which is already used for hrtimers and alarmtimers. It does not affect the size of struct k_itimer as it.alarm is still larger. The

[patch 20/44] posix-cpu-timers: Simplify sample functions

2019-08-19 Thread Thomas Gleixner
All callers hand in a valdiated clock id. Remove the return value which was unchecked in most places anyway. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) --- a/kernel/time/posix-cpu-timer

[patch 29/44] posix-cpu-timers: Simplify set_process_cpu_timer()

2019-08-19 Thread Thomas Gleixner
/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c @@ -1181,15 +1181,15 @@ void run_posix_cpu_timers(void) * Set one of the process-wide special case CPU timers or RLIMIT_CPU. * The tsk->sighand->siglock must be held by the caller. */ -void set_process_cpu_timer(

[patch 38/44] posix-cpu-timers: Respect INFINITY for hard RTTIME limit

2019-08-19 Thread Thomas Gleixner
The RTIME limit expiry code does not check the hard RTTIME limit for INFINITY, i.e. being disabled. Add it. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cp

[patch 17/44] posix-cpu-timers: Use clock ID in posix_cpu_timer_get()

2019-08-19 Thread Thomas Gleixner
Extract the clock ID (PROF/VIRT/SCHED) from the clock selector and use it as argument to the sample functions. That allows to simplify them once all callers are fixed. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[patch 41/44] posix-cpu-timers: Deduplicate rlimit handling

2019-08-19 Thread Thomas Gleixner
current->comm, task_pid_nr(current)); + } + __group_send_sig_info(signo, SEND_SIG_PRIV, current); + return true; +} + /* * Check for any per-thread CPU timers that have fired and move them off * the tsk->cpu_timers[N] list onto the firing

[patch 32/44] posix-cpu-timers: Provide array based sample functions

2019-08-19 Thread Thomas Gleixner
Instead of using task_cputime and doing the addition of utime and stime at all call sites, it's way simpler to have a sample array which allows indexed based checks against the expiry cache array. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c | 26 ++

[patch 35/44] posix-cpu-timers: Switch thread group sampling to array

2019-08-19 Thread Thomas Gleixner
to be started - * @iimes: Storage for time samples + * @samples: Storage for time samples * * The thread group cputime accouting is avoided when there are no posix * CPU timers armed. Before starting a timer it's required to check whether @@ -266,13 +257,14 @@ void

[patch 31/44] posix-cpu-timers: Remove the odd field rename defines

2019-08-19 Thread Thomas Gleixner
The last users of the odd define based renaming of struct task_cputime members are gone. Good riddance. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h | 15 --- 1 file changed, 15 deletions(-) --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @

[patch 28/44] posix-cpu-timers: Simplify timer queueing

2019-08-19 Thread Thomas Gleixner
} list_add(&nt->entry, listpos); - if (listpos == head) { - u64 exp = nt->expires; + if (listpos != head) + return; - /* -* We are the new earliest-expiring POSIX 1.b timer, hence -* need to updat

[patch 07/44] posix-cpu-timers: Simplify sighand locking in run_posix_cpu_timers()

2019-08-19 Thread Thomas Gleixner
t k_itimer *timer, *next; - unsigned long flags; LIST_HEAD(firing); lockdep_assert_irqs_disabled(); /* -* The fast path checks that there are no expired thread or thread -* group timers. If that's so, just return. +* Verify that sighand exits. If

[patch 16/44] posix-cpu-timers: Use clock ID in posix_cpu_timer_set()

2019-08-19 Thread Thomas Gleixner
Extract the clock ID (PROF/VIRT/SCHED) from the clock selector and use it as argument to the sample functions. That allows to simplify them once all callers are fixed. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletio

[PATCHv6 08/36] posix-timers: Use clock_get_ktime() in common_timer_get()

2019-08-15 Thread Dmitry Safonov
From: Andrei Vagin Now, when the clock_get_ktime() callback exists, the suboptimal timespec64-based conversion can be removed from common_timer_get(). Suggested-by: Thomas Gleixner Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- kernel/time/posi

[PATCHv6 15/36] posix-timers: Make clock_nanosleep() time namespace aware

2019-08-15 Thread Dmitry Safonov
From: Andrei Vagin clock_nanosleep() accepts absolute values of expiration time, if the TIMER_ABSTIME flag is set. This value is in the task time namespace, which has to be converted to the host time namespace. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry S

[PATCHv6 12/36] posix-timers: Make timer_settime() time namespace aware

2019-08-15 Thread Dmitry Safonov
From: Andrei Vagin Wire timer_settime() syscall into time namespace virtualization. sys_timer_settime() calls the ktime->timer_set() callback. Right now, common_timer_set() is the only implementation for the callback. There user-supplied timer's value is converted from timespec64 to ktime and t

Re: [GIT pull] timers/urgent for 5.3-rc3

2019-08-03 Thread pr-tracker-bot
The pull request you sent on Sat, 03 Aug 2019 16:36:53 -: > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git > timers-urgent-for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/0432a0a066b05361b6d4d26522233c3c76c9e5da Thank you! -- Deet-do

[GIT pull] timers/urgent for 5.3-rc3

2019-08-03 Thread Thomas Gleixner
Linus, please pull the latest timers-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus up to: 33a58980ff3c: arm64: compat: vdso: Use legacy syscalls as fallback A series of commits to deal with the regression caused by the

[tip:timers/core] posix-timers: Prepare for PREEMPT_RT

2019-08-01 Thread tip-bot for Thomas Gleixner
Commit-ID: 08a3c192c93f4359a94bf47971e55b0324b72b8b Gitweb: https://git.kernel.org/tip/08a3c192c93f4359a94bf47971e55b0324b72b8b Author: Thomas Gleixner AuthorDate: Wed, 31 Jul 2019 00:33:55 +0200 Committer: Thomas Gleixner CommitDate: Thu, 1 Aug 2019 20:51:25 +0200 posix-timers

[tip:timers/core] posix-timers: Move rcu_head out of it union

2019-08-01 Thread tip-bot for Sebastian Andrzej Siewior
-timers: Move rcu_head out of it union Timer deletion on PREEMPT_RT is prone to priority inversion and live locks. The hrtimer code has a synchronization mechanism for this. Posix CPU timers will grow one. But that mechanism cannot be invoked while holding the k_itimer lock because that can deadlock

[tip:timers/core] posix-timers: Rework cancel retry loops

2019-08-01 Thread tip-bot for Thomas Gleixner
Commit-ID: 6945e5c2abe008302b20266248d6de95575311a8 Gitweb: https://git.kernel.org/tip/6945e5c2abe008302b20266248d6de95575311a8 Author: Thomas Gleixner AuthorDate: Wed, 31 Jul 2019 00:33:53 +0200 Committer: Thomas Gleixner CommitDate: Thu, 1 Aug 2019 20:51:24 +0200 posix-timers

[tip:timers/core] posix-timers: Cleanup the flag/flags confusion

2019-08-01 Thread tip-bot for Thomas Gleixner
Commit-ID: 21670ee44f1e3565030bcabc62178b8e5eb2fce7 Gitweb: https://git.kernel.org/tip/21670ee44f1e3565030bcabc62178b8e5eb2fce7 Author: Thomas Gleixner AuthorDate: Wed, 31 Jul 2019 00:33:52 +0200 Committer: Thomas Gleixner CommitDate: Thu, 1 Aug 2019 20:51:24 +0200 posix-timers

[tip:timers/core] timers: Prepare support for PREEMPT_RT

2019-08-01 Thread tip-bot for Anna-Maria Gleixner
Commit-ID: 030dcdd197d77374879bb5603d091eee7d8aba80 Gitweb: https://git.kernel.org/tip/030dcdd197d77374879bb5603d091eee7d8aba80 Author: Anna-Maria Gleixner AuthorDate: Fri, 26 Jul 2019 20:31:00 +0200 Committer: Thomas Gleixner CommitDate: Thu, 1 Aug 2019 20:51:22 +0200 timers: Prepare

Re: [patch 4/5] posix-cpu-timers: Defer timer handling to task_work

2019-08-01 Thread Thomas Gleixner
On Thu, 1 Aug 2019, Oleg Nesterov wrote: > On 08/01, Thomas Gleixner wrote: > > > > +static void __run_posix_cpu_timers(struct task_struct *tsk) > > +{ > > + /* FIXME: Init it proper in fork or such */ > > + init_task_work(&tsk->cpu_timer_work, posix_cpu_timers_work); > > + task_work_add(tsk,

[tip:timers/core] posix-timers: Prepare for PREEMPT_RT

2019-08-01 Thread tip-bot for Thomas Gleixner
Commit-ID: 3a839db3eaeeef31520de45f3b078204d068e3d0 Gitweb: https://git.kernel.org/tip/3a839db3eaeeef31520de45f3b078204d068e3d0 Author: Thomas Gleixner AuthorDate: Wed, 31 Jul 2019 00:33:55 +0200 Committer: Thomas Gleixner CommitDate: Thu, 1 Aug 2019 17:46:43 +0200 posix-timers

[tip:timers/core] posix-timers: Move rcu_head out of it union

2019-08-01 Thread tip-bot for Sebastian Andrzej Siewior
-timers: Move rcu_head out of it union Timer deletion on PREEMPT_RT is prone to priority inversion and live locks. The hrtimer code has a synchronization mechanism for this. Posix CPU timers will grow one. But that mechanism cannot be invoked while holding the k_itimer lock because that can deadlock

[tip:timers/core] posix-timers: Rework cancel retry loops

2019-08-01 Thread tip-bot for Thomas Gleixner
Commit-ID: f8d1b0549263354b8d8854fefc521ac536be70ff Gitweb: https://git.kernel.org/tip/f8d1b0549263354b8d8854fefc521ac536be70ff Author: Thomas Gleixner AuthorDate: Wed, 31 Jul 2019 00:33:53 +0200 Committer: Thomas Gleixner CommitDate: Thu, 1 Aug 2019 17:46:42 +0200 posix-timers

[tip:timers/core] posix-timers: Cleanup the flag/flags confusion

2019-08-01 Thread tip-bot for Anna-Maria Gleixner
Commit-ID: b0ccc6eb0d7e0b7d346b118ccc8b38bf18e39b7f Gitweb: https://git.kernel.org/tip/b0ccc6eb0d7e0b7d346b118ccc8b38bf18e39b7f Author: Anna-Maria Gleixner AuthorDate: Wed, 31 Jul 2019 00:33:52 +0200 Committer: Thomas Gleixner CommitDate: Thu, 1 Aug 2019 17:46:42 +0200 posix-timers

[tip:timers/core] timers: Prepare support for PREEMPT_RT

2019-08-01 Thread tip-bot for Anna-Maria Gleixner
Commit-ID: 1c2df8ac9292ea1fe6c958c198bf6bc5c768acf5 Gitweb: https://git.kernel.org/tip/1c2df8ac9292ea1fe6c958c198bf6bc5c768acf5 Author: Anna-Maria Gleixner AuthorDate: Fri, 26 Jul 2019 20:31:00 +0200 Committer: Thomas Gleixner CommitDate: Thu, 1 Aug 2019 17:43:20 +0200 timers: Prepare

Re: [patch 4/5] posix-cpu-timers: Defer timer handling to task_work

2019-08-01 Thread Oleg Nesterov
On 08/01, Thomas Gleixner wrote: > > +static void __run_posix_cpu_timers(struct task_struct *tsk) > +{ > + /* FIXME: Init it proper in fork or such */ > + init_task_work(&tsk->cpu_timer_work, posix_cpu_timers_work); > + task_work_add(tsk, &tsk->cpu_timer_work, true); > +} What if updat

Re: [patch 4/5] posix-cpu-timers: Defer timer handling to task_work

2019-08-01 Thread Thomas Gleixner
; bool > > > > +# Select to handle posix CPU timers from task_work > > +# and not from the timer interrupt context > > +config POSIX_CPU_TIMERS_TASK_WORK > > + bool > > + > > if GENERIC_CLOCKEVENTS > > menu "Timers subsystem" >

Re: [patch 4/5] posix-cpu-timers: Defer timer handling to task_work

2019-08-01 Thread Peter Zijlstra
On Thu, Aug 01, 2019 at 04:32:54PM +0200, Thomas Gleixner wrote: > --- a/kernel/time/Kconfig > +++ b/kernel/time/Kconfig > @@ -52,6 +52,11 @@ config GENERIC_CLOCKEVENTS_MIN_ADJUST > config GENERIC_CMOS_UPDATE > bool > > +# Select to handle posix CPU timers from task_w

[patch 0/5] posix-cpu-timers: Move expiry into task work context

2019-08-01 Thread Thomas Gleixner
Running posix cpu timers in hard interrupt context has a few downsides: - For PREEMPT_RT it cannot work as the expiry code needs to take sighand lock, which is a 'sleeping spinlock' in RT - For fine grained accounting it's just wrong to run this in context of the timer in

[patch 4/5] posix-cpu-timers: Defer timer handling to task_work

2019-08-01 Thread Thomas Gleixner
Running posix cpu timers in hard interrupt context has a few downsides: - For PREEMPT_RT it cannot work as the expiry code needs to take sighand lock, which is a 'sleeping spinlock' in RT - For fine grained accounting it's just wrong to run this in context of the timer in

[patch 3/5] posix-cpu-timers: Split run_posix_cpu_timers()

2019-08-01 Thread Thomas Gleixner
@@ -1127,25 +1127,11 @@ static inline int fastpath_timer_check(s return 0; } -/* - * This is called from the timer interrupt handler. The irq handler has - * already updated our counts. We need to check if any timers fire now. - * Interrupts are disabled. - */ -void run_posix_cpu_timers(struct

Re: [patch 7/7] posix-timers: Prepare for PREEMPT_RT

2019-07-31 Thread Thomas Gleixner
On Wed, 31 Jul 2019, Peter Zijlstra wrote: > On Wed, Jul 31, 2019 at 12:33:55AM +0200, Thomas Gleixner wrote: > > +static struct k_itimer *timer_wait_running(struct k_itimer *timer, > > + unsigned long *flags) > > +{ > > + const struct k_clock *kc = READ_ONCE

Re: [patch 0/7] posix-timers: Prepare for PREEMPT_RT - part 1

2019-07-31 Thread Peter Zijlstra
On Wed, Jul 31, 2019 at 12:33:48AM +0200, Thomas Gleixner wrote: > The following series prepares posix-timers for RT. The main change here is > to utilize the hrtimer synchronization mechanism to prevent priority > inversion and live locks on timer deletion. > > This does not cove

Re: [patch 7/7] posix-timers: Prepare for PREEMPT_RT

2019-07-31 Thread Peter Zijlstra
On Wed, Jul 31, 2019 at 12:33:55AM +0200, Thomas Gleixner wrote: > +static struct k_itimer *timer_wait_running(struct k_itimer *timer, > +unsigned long *flags) > +{ > + const struct k_clock *kc = READ_ONCE(timer->kclock); > + timer_t timer_id = READ_O

[patch 5/7] posix-timers: Rework cancel retry loops

2019-07-30 Thread Thomas Gleixner
As a preparatory step for adding the PREEMPT RT specific synchronization mechanism to wait for a running timer callback, rework the timer cancel retry loops so they call a common function. This allows trivial substitution in one place. Originally-by: Anna-Maria Gleixner Signed-off-by: Thomas Glei

[patch 6/7] posix-timers: Move rcu_head out of it union

2019-07-30 Thread Thomas Gleixner
Timer deletion on PREEMPT_RT is prone to priority inversion and live locks. The hrtimer code has a synchronization mechanism for this. Posix CPU timers will grow one. But that mechanism cannot be invoked while holding the k_itimer lock because that can deadlock against the running timer callback

[patch 4/7] posix-timers: Cleanup the flag/flags confusion

2019-07-30 Thread Thomas Gleixner
do_timer_settime() has a 'flags' argument and uses 'flag' for the interrupt flags, which is confusing at best. Rename the argument so 'flags' can be used for interrupt flags as usual. Signed-off-by: Thomas Gleixner --- kernel/time/posix-timers.c | 10 +- 1 file changed, 5 insertions(+

[patch 7/7] posix-timers: Prepare for PREEMPT_RT

2019-07-30 Thread Thomas Gleixner
Posix timer delete retry loops are affected by the same priority inversion and live lock issues as the other timers. Provide a RT specific synchronization function which keeps a reference to the timer by holding rcu read lock to prevent the timer from being freed, dropping the timer lock and

[patch 0/7] posix-timers: Prepare for PREEMPT_RT - part 1

2019-07-30 Thread Thomas Gleixner
The following series prepares posix-timers for RT. The main change here is to utilize the hrtimer synchronization mechanism to prevent priority inversion and live locks on timer deletion. This does not cover the posix CPU timers as they need more special treatment for RT which is covered in a

[tip:timers/core] timers: Prepare support for PREEMPT_RT

2019-07-30 Thread tip-bot for Anna-Maria Gleixner
Commit-ID: 51503dcd6118d627a0c1b5829191d4fa6f16 Gitweb: https://git.kernel.org/tip/51503dcd6118d627a0c1b5829191d4fa6f16 Author: Anna-Maria Gleixner AuthorDate: Fri, 26 Jul 2019 20:31:00 +0200 Committer: Thomas Gleixner CommitDate: Tue, 30 Jul 2019 23:57:57 +0200 timers

[PATCHv5 08/37] posix-timers: Use clock_get_ktime() in common_timer_get()

2019-07-29 Thread Dmitry Safonov
From: Andrei Vagin Now, when the clock_get_ktime() callback exists, the suboptimal timespec64-based conversion can be removed from common_timer_get(). Suggested-by: Thomas Gleixner Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- kernel/time/posi

[PATCHv5 16/37] posix-timers: Make clock_nanosleep() time namespace aware

2019-07-29 Thread Dmitry Safonov
From: Andrei Vagin clock_nanosleep() accepts absolute values of expiration time, if the TIMER_ABSTIME flag is set. This value is in the task time namespace, which has to be converted to the host time namespace. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry S

[PATCHv5 13/37] posix-timers: Make timer_settime() time namespace aware

2019-07-29 Thread Dmitry Safonov
From: Andrei Vagin Wire timer_settime() syscall into time namespace virtualization. sys_timer_settime() calls the ktime->timer_set() callback. Right now, common_timer_set() is the only implementation for the callback. There user-supplied timer's value is converted from timespec64 to ktime and t

[PATCHv5 08/37] posix-timers: Use clock_get_ktime() in common_timer_get()

2019-07-29 Thread Dmitry Safonov
From: Andrei Vagin Now, when the clock_get_ktime() callback exists, the suboptimal timespec64-based conversion can be removed from common_timer_get(). Suggested-by: Thomas Gleixner Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- kernel/time/posi

[PATCHv5 13/37] posix-timers: Make timer_settime() time namespace aware

2019-07-29 Thread Dmitry Safonov
From: Andrei Vagin Wire timer_settime() syscall into time namespace virtualization. sys_timer_settime() calls the ktime->timer_set() callback. Right now, common_timer_set() is the only implementation for the callback. There user-supplied timer's value is converted from timespec64 to ktime and t

Re: [patch 00/12] (hr)timers: Prepare for PREEMPT_RT support

2019-07-29 Thread Peter Zijlstra
d that, as I don't know whether this is a > real world issue. I just noticed that it is basically the same > problem. Adding it would be trivial. > > - Prepare for moving most hrtimer callbacks into softirq context and mark > timers which need to expire in ha

Re: [PATCH 0/5] Add missing pwm-cells to STM32 timers PWM

2019-07-29 Thread Alexandre Torgue
Hi Fabrice On 6/19/19 11:52 AM, Fabrice Gasnier wrote: This series adds missing generic 3-cells PWM to STM32 timers dt-bindings, PWM driver, and the relevant dtsi files for STM32F4, STM32F7 and STM32MP1. Fabrice Gasnier (5): dt-bindings: pwm-stm32: add #pwm-cells pwm: stm32: use 3 cells

[patch 12/12] timers: Prepare support for PREEMPT_RT

2019-07-26 Thread Thomas Gleixner
system makes progress. This addresses both the priority inversion and the life lock issues. This mechanism is not used for timers which are marked IRQSAFE as for those preemption is disabled accross the callback and therefore this situation cannot happen. The callbacks for such timers need to be

[patch 00/12] (hr)timers: Prepare for PREEMPT_RT support

2019-07-26 Thread Thomas Gleixner
em. Adding it would be trivial. - Prepare for moving most hrtimer callbacks into softirq context and mark timers which need to expire in hard interrupt context even on RT so they don't get moved. The timerwheel still needs some special handling for IRQSAFE timers (g) which I

[PATCH RT 08/16] timers: Redo the notification of canceling timers on -RT

2019-07-19 Thread Steven Rostedt
rcu_note_context_switch() anymore like reported by Grygorii Strashko and Daniel Wagner. The patches were contributed by Anna-Maria Gleixner. This is an all in one commit of the following patches: | [PATCH] timers: Introduce expiry spin lock | [PATCH] timers: Drop expiry lock after each timer

Re: [GIT pull] timers/urgent for 5.3-rc1

2019-07-11 Thread pr-tracker-bot
The pull request you sent on Thu, 11 Jul 2019 20:02:36 -: > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git > timers-urgent-for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d7fe42a64a19a4140fb94bcf996035319cd3e6b9 Thank you! -- Deet-do

[GIT pull] timers/urgent for 5.3-rc1

2019-07-11 Thread Thomas Gleixner
Linus, please pull the latest timers-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus up to: 0df1c9868c3a: timekeeping/vsyscall: Use __iter_div_u64_rem() Two small fixes from the timer departement: - Prevent the compiler

Re: [GIT pull] timers/core for 5.3-rc1

2019-07-08 Thread pr-tracker-bot
The pull request you sent on Mon, 08 Jul 2019 09:05:37 -: > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git > timers-core-for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/927ba67a63c72ee87d655e30183d1576c3717d3e Thank you! -- Deet-doot-

Re: [GIT pull] x86/timers for 5.3-rc1

2019-07-08 Thread pr-tracker-bot
The pull request you sent on Mon, 08 Jul 2019 09:05:37 -: > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-timers-for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/2f0f6503e37551eb8d8d5e4d27c78d28a30fed5a Thank you! -- Deet-doot-dot, I

[GIT pull] x86/timers for 5.3-rc1

2019-07-08 Thread Thomas Gleixner
Linus, please pull the latest x86-timers-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-timers-for-linus up to: e44252f4fe79: x86/hpet: Use channel for legacy clockevent storage A rather large series consolidating the HPET code, which was triggered

[tip:x86/timers] x86/hpet: Carve out shareable parts of init_one_hpet_msi_clockevent()

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: ea99110dd024d2f31bde19dda049f3fbf3816a70 Gitweb: https://git.kernel.org/tip/ea99110dd024d2f31bde19dda049f3fbf3816a70 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:24:07 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:26 +0200 x86/hpet: Carve out

[tip:x86/timers] x86/hpet: Wrap legacy clockevent in hpet_channel

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 18e84a2dff00c3c817161a105332cd3fc7592648 Gitweb: https://git.kernel.org/tip/18e84a2dff00c3c817161a105332cd3fc7592648 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:24:05 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:25 +0200 x86/hpet: Wrap lega

[tip:x86/timers] x86/hpet: Use channel for legacy clockevent storage

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: e44252f4fe79dd9ca93bcf4e8f74389a5b8452f5 Gitweb: https://git.kernel.org/tip/e44252f4fe79dd9ca93bcf4e8f74389a5b8452f5 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:24:09 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:27 +0200 x86/hpet: Use chann

[tip:x86/timers] x86/hpet: Use common init for legacy clockevent

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 49adaa60fa75a04457d30f38321378cdc3547212 Gitweb: https://git.kernel.org/tip/49adaa60fa75a04457d30f38321378cdc3547212 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:24:08 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:27 +0200 x86/hpet: Use commo

[tip:x86/timers] x86/hpet: Move clockevents into channels

2019-06-27 Thread tip-bot for Thomas Gleixner
->flags |= HPET_DEV_VALID; - num_timers_used++; - if (num_timers_used == num_possible_cpus()) + hc->mode = HPET_MODE_CLOCKEVT; + + if (++hpet_base.nr_clockevents == num_possible_cpus()) break; } pr_info("%d chann

[tip:x86/timers] x86/hpet: Consolidate clockevent functions

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 310b5b3eb6ba5d3a92d783b9fa1c5a3ffb5932e9 Gitweb: https://git.kernel.org/tip/310b5b3eb6ba5d3a92d783b9fa1c5a3ffb5932e9 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:24:06 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:26 +0200 x86/hpet: Consolida

[tip:x86/timers] x86/hpet: Use cached info instead of extra flags

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 45e0a415634600e608188480bc355b20344f9e3f Gitweb: https://git.kernel.org/tip/45e0a415634600e608188480bc355b20344f9e3f Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:24:04 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:25 +0200 x86/hpet: Use cache

[tip:x86/timers] x86/hpet: Use cached channel data

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 2460d5878ad69c178f9ff1cc3eee9f09b017e15f Gitweb: https://git.kernel.org/tip/2460d5878ad69c178f9ff1cc3eee9f09b017e15f Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:59 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:22 +0200 x86/hpet: Use cache

[tip:x86/timers] x86/hpet: Introduce struct hpet_base and struct hpet_channel

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: e37f0881e9d9ec8b12f242cc2b78d93259aa7f0f Gitweb: https://git.kernel.org/tip/e37f0881e9d9ec8b12f242cc2b78d93259aa7f0f Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:58 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:21 +0200 x86/hpet: Introduce

[tip:x86/timers] x86/hpet: Rename variables to prepare for switching to channels

2019-06-27 Thread tip-bot for Ingo Molnar
Commit-ID: d415c7543140f77fe1d2d9d3942cbf51a9737993 Gitweb: https://git.kernel.org/tip/d415c7543140f77fe1d2d9d3942cbf51a9737993 Author: Ingo Molnar AuthorDate: Sun, 23 Jun 2019 15:24:02 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:24 +0200 x86/hpet: Rename variab

[tip:x86/timers] x86/hpet: Add function to select a /dev/hpet channel

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: af5a1dadf3fcf673906af1a1129b2b7528494ee5 Gitweb: https://git.kernel.org/tip/af5a1dadf3fcf673906af1a1129b2b7528494ee5 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:24:01 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:23 +0200 x86/hpet: Add funct

[tip:x86/timers] x86/hpet: Add mode information to struct hpet_channel

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 9e16e4933e48819a259b8967e72e5765349953b1 Gitweb: https://git.kernel.org/tip/9e16e4933e48819a259b8967e72e5765349953b1 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:24:00 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:23 +0200 x86/hpet: Add mode

[tip:x86/timers] x86/hpet: Make naming consistent

2019-06-27 Thread tip-bot for Ingo Molnar
Commit-ID: 3fe50c34dc1fa8ae2c24ec202b9decbbef72921d Gitweb: https://git.kernel.org/tip/3fe50c34dc1fa8ae2c24ec202b9decbbef72921d Author: Ingo Molnar AuthorDate: Sun, 23 Jun 2019 15:23:55 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:20 +0200 x86/hpet: Make naming c

[tip:x86/timers] x86/hpet: Coding style cleanup

2019-06-27 Thread tip-bot for Ingo Molnar
@@ -131,26 +131,33 @@ EXPORT_SYMBOL_GPL(is_hpet_enabled); static void _hpet_print_config(const char *function, int line) { - u32 i, timers, l, h; + u32 i, id, period, cfg, status, channels, l, h; + pr_info("%s(%d):\n", function, line); - l = hpet_readl(HPET_ID);

[tip:x86/timers] x86/hpet: Clean up comments

2019-06-27 Thread tip-bot for Ingo Molnar
Commit-ID: dfe36b573ed320ce311b2cb9251d2543be9e52ac Gitweb: https://git.kernel.org/tip/dfe36b573ed320ce311b2cb9251d2543be9e52ac Author: Ingo Molnar AuthorDate: Sun, 23 Jun 2019 15:23:56 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:20 +0200 x86/hpet: Clean up comm

[tip:x86/timers] x86/hpet: Remove not required includes

2019-06-27 Thread tip-bot for Ingo Molnar
Commit-ID: 9bc9e1d4c139497553599a73839ea846dce63f72 Gitweb: https://git.kernel.org/tip/9bc9e1d4c139497553599a73839ea846dce63f72 Author: Ingo Molnar AuthorDate: Sun, 23 Jun 2019 15:23:54 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:20 +0200 x86/hpet: Remove not re

[tip:x86/timers] x86/hpet: Shuffle code around for readability sake

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 6bdec41a0cbcbda35c9044915fc8f45503a595a0 Gitweb: https://git.kernel.org/tip/6bdec41a0cbcbda35c9044915fc8f45503a595a0 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:50 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:18 +0200 x86/hpet: Shuffle c

[tip:x86/timers] x86/hpet: Separate counter check out of clocksource register code

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 3222daf970f30133cc4c639cbecdc29c4ae91b2b Gitweb: https://git.kernel.org/tip/3222daf970f30133cc4c639cbecdc29c4ae91b2b Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:51 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:18 +0200 x86/hpet: Separate

[tip:x86/timers] x86/hpet: Decapitalize and rename EVT_TO_HPET_DEV

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 3535aa12f7f26fc755514b13aee8fac15741267e Gitweb: https://git.kernel.org/tip/3535aa12f7f26fc755514b13aee8fac15741267e Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:53 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:19 +0200 x86/hpet: Decapital

[tip:x86/timers] x86/hpet: Simplify counter validation

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 44b5be5733e119300115b98409cbcf9a45b8d3f1 Gitweb: https://git.kernel.org/tip/44b5be5733e119300115b98409cbcf9a45b8d3f1 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:52 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:19 +0200 x86/hpet: Simplify

[tip:x86/timers] x86/hpet: Mark init functions __init

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 433526cc0502ff13d9b2fd63ba546a202dac0463 Gitweb: https://git.kernel.org/tip/433526cc0502ff13d9b2fd63ba546a202dac0463 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:47 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:17 +0200 x86/hpet: Mark init

[tip:x86/timers] x86/hpet: Move static and global variables to one place

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 8c273f2c81f0756f65b24771196c0eff7ac90e7b Gitweb: https://git.kernel.org/tip/8c273f2c81f0756f65b24771196c0eff7ac90e7b Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:49 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:17 +0200 x86/hpet: Move stat

[tip:x86/timers] x86/hpet: Remove unused parameter from hpet_next_event()

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 853acaf064acf3aad6189b36de814bd381d35133 Gitweb: https://git.kernel.org/tip/853acaf064acf3aad6189b36de814bd381d35133 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:45 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:16 +0200 x86/hpet: Remove un

[tip:x86/timers] x86/hpet: Sanitize stub functions

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 4ce78e2094fc2736f8ecd04ec85e5566acaed516 Gitweb: https://git.kernel.org/tip/4ce78e2094fc2736f8ecd04ec85e5566acaed516 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:48 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:17 +0200 x86/hpet: Sanitize

[tip:x86/timers] x86/hpet: Replace printk(KERN...) with pr_...()

2019-06-27 Thread tip-bot for Thomas Gleixner
); static void _hpet_print_config(const char *function, int line) { u32 i, timers, l, h; - printk(KERN_INFO "hpet: %s(%d):\n", function, line); + pr_info("%s(%d):\n", function, line); l = hpet_readl(HPET_ID); h = hpet_readl(HPET_PERIOD);

[tip:x86/timers] x86/hpet: Remove the unused hpet_msi_read() function

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: eb8ec32c45a87efbc6683b771597084c4d904a17 Gitweb: https://git.kernel.org/tip/eb8ec32c45a87efbc6683b771597084c4d904a17 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:46 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:16 +0200 x86/hpet: Remove th

[tip:x86/timers] x86/hpet: Remove pointless x86-64 specific #include

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 7c4b0e0898ebff4d4821d5dd7a564903a1e88821 Gitweb: https://git.kernel.org/tip/7c4b0e0898ebff4d4821d5dd7a564903a1e88821 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:44 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:16 +0200 x86/hpet: Remove po

[tip:x86/timers] x86/hpet: Restructure init code

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 9b0b28de837a3a59b409613d15e90d5569938945 Gitweb: https://git.kernel.org/tip/9b0b28de837a3a59b409613d15e90d5569938945 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:43 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:15 +0200 x86/hpet: Restructu

[tip:x86/timers] x86/hpet: Simplify CPU online code

2019-06-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 36b9017f0250a5299bb715b3b8c41b5e2b05b320 Gitweb: https://git.kernel.org/tip/36b9017f0250a5299bb715b3b8c41b5e2b05b320 Author: Thomas Gleixner AuthorDate: Sun, 23 Jun 2019 15:23:41 +0200 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 00:57:15 +0200 x86/hpet: Simplify

[PATCH 05/25] clocksource/drivers/tegra: Support per-CPU timers on all Tegra's

2019-06-26 Thread Daniel Lezcano
From: Dmitry Osipenko Assign TMR1-4 per-CPU core on 32bit Tegra's in a way it is done for Tegra210. In a result each core can handle its own timer events, less code is unique to ARM64 and Tegra's clock events driver now has higher rating on all Tegra's, replacing the ARM's TWD timer which isn't v

[tip:timers/core] posix-timers: Use spin_lock_irq() in itimer_delete()

2019-06-22 Thread tip-bot for Sebastian Andrzej Siewior
-timers: Use spin_lock_irq() in itimer_delete() itimer_delete() uses spin_lock_irqsave() to obtain a `flags' variable which can then be passed to unlock_timer(). It uses already spin_lock locking for the structure instead of lock_timer() because it has a timer which can not be removed by othe

[tip:timers/core] posix-timers: Remove "it_signal = NULL" assignment in itimer_delete()

2019-06-22 Thread tip-bot for Sebastian Andrzej Siewior
-timers: Remove "it_signal = NULL" assignment in itimer_delete() itimer_delete() is invoked during do_exit(). At this point it is the last thread in the group dying and doing the clean up. Since it is the last thread in the group, there can not be any other task attempting to lock the it

[tip:timers/core] kselftests: timers: freq-step: Update maximum acceptable precision and errors

2019-06-22 Thread tip-bot for Miroslav Lichvar
: timers: freq-step: Update maximum acceptable precision and errors PTI has a significant impact on precision of the MONOTONIC_RAW clock, which prevents a lot of computers from running the freq-step test. Increase the maximum acceptable precision for the test to not be skipped to 500 nanoseconds. After

[PATCH 1/2] posix-timers: Remove "it_signal = NULL" assignment in itimer_delete()

2019-06-21 Thread Sebastian Andrzej Siewior
()) is not required. The assignment and comment was copied in commit 0e568881178ff ("[PATCH] fix posix-timers to have proper per-process scope") from sys_timer_delete() which was/is the syscall interface and requires the assignment. Remove the superfluous ->it_signal = NULL assignment

<    4   5   6   7   8   9   10   11   12   13   >