Subject: [ANNOUNCE] v5.2.10-rt5

Dear RT folks!

I'm pleased to announce the v5.2.10-rt5 patch set.

Changes since v5.2.10-rt4:

- Take care of compile issue within the timer-atmel-tcb driver on
AT91. Reported by Alexander Dahl, patched by Alexandre Belloni.

- Fixes to the hrtimer code to finally avoiding warnings while
canceling a running hrtimer in IRQ context. Patches by Julien Grall.

Known issues
- rcutorture is currently broken on -RT. Reported by Juri Lelli.

The delta patch against v5.2.10-rt4 is appended below and can be found here:

https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.2/incr/patch-5.2.10-rt4-rt5.patch.xz

You can get this release via the git tree at:

git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v5.2.10-rt5

The RT patch against v5.2.10 can be found here:

https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-5.2.10-rt5.patch.xz

The split quilt queue is available at:

https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.10-rt5.tar.xz

Sebastian

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 36f8c58386e20..2927b673caa62 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -424,7 +424,7 @@ config ATMEL_ST

config ATMEL_TCB_CLKSRC
bool "Atmel TC Block timer driver" if COMPILE_TEST
- depends on HAS_IOMEM && ATMEL_TCLIB
+ depends on HAS_IOMEM
select TIMER_OF if OF
help
Support for Timer Counter Blocks on Atmel SoCs.
diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c
index 05b5272f5d7e9..1a5abc178b655 100644
--- a/drivers/clocksource/timer-atmel-tcb.c
+++ b/drivers/clocksource/timer-atmel-tcb.c
@@ -265,9 +265,11 @@ static irqreturn_t ch2_irq(int irq, void *handle)
return IRQ_NONE;
}

+static const u8 atmel_tcb_divisors[5] = { 2, 8, 32, 128, 0, };
+
static int __init setup_clkevents(struct atmel_tc *tc, int divisor_idx)
{
- unsigned divisor = atmel_tc_divisors[divisor_idx];
+ unsigned divisor = atmel_tcb_divisors[divisor_idx];
int ret;
struct clk *t2_clk = tc->clk[2];
int irq = tc->irq[2];
@@ -360,8 +362,6 @@ static void __init tcb_setup_single_chan(struct atmel_tc *tc, int mck_divisor_id
writel(ATMEL_TC_SYNC, tcaddr + ATMEL_TC_BCR);
}

-static const u8 atmel_tcb_divisors[5] = { 2, 8, 32, 128, 0, };
-
static const struct of_device_id atmel_tcb_of_match[] = {
{ .compatible = "atmel,at91rm9200-tcb", .data = (void *)16, },
{ .compatible = "atmel,at91sam9x5-tcb", .data = (void *)32, },
@@ -482,7 +482,7 @@ static int __init tcb_clksrc_init(struct device_node *node)
#ifdef CONFIG_ATMEL_TCB_CLKSRC_USE_SLOW_CLOCK
ret = setup_clkevents(&tc, clk32k_divisor_idx);
#else
- ret = setup_clkevents(tc, best_divisor_idx);
+ ret = setup_clkevents(&tc, best_divisor_idx);
#endif
if (ret)
goto err_unregister_clksrc;
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 7d7db88021311..5eb45a868de9a 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -932,9 +932,9 @@ EXPORT_SYMBOL_GPL(hrtimer_forward);

void hrtimer_grab_expiry_lock(const struct hrtimer *timer)
{
- struct hrtimer_clock_base *base = timer->base;
+ struct hrtimer_clock_base *base = READ_ONCE(timer->base);

- if (base && base->cpu_base) {
+ if (timer->is_soft && base != &migration_base) {
spin_lock(&base->cpu_base->softirq_expiry_lock);
spin_unlock(&base->cpu_base->softirq_expiry_lock);
}
diff --git a/localversion-rt b/localversion-rt
index ad3da1bcab7e8..0efe7ba1930e1 100644
--- a/localversion-rt
+++ b/localversion-rt
@@ -1 +1 @@
--rt4
+-rt5


2019-08-27 12:35:49

by Alexander Dahl

[permalink] [raw]
Subject: Re: [ANNOUNCE] v5.2.10-rt5

Hello Sebastian,

Am Dienstag, 27. August 2019, 12:55:42 CEST schrieb Sebastian Andrzej Siewior:
> I'm pleased to announce the v5.2.10-rt5 patch set.
>
> Changes since v5.2.10-rt4:
>
> - Take care of compile issue within the timer-atmel-tcb driver on
> AT91. Reported by Alexander Dahl, patched by Alexandre Belloni.
>
> - Fixes to the hrtimer code to finally avoiding warnings while
> canceling a running hrtimer in IRQ context. Patches by Julien Grall.

This causes build errors on my side now, I tested with the .config we use on
our custom tree on a tag "v5.2.10-rt5-rebase", cross-compiling with gcc 7.3.1
for ARCH=arm:


% LANG=C PATH=/opt/OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf/
gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/bin:${PATH}
HOSTCC=gcc CROSS_COMPILE=arm-v7a-linux-gnueabihf- ARCH=arm make
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
CHK include/generated/compile.h
CC kernel/time/hrtimer.o
kernel/time/hrtimer.c: In function 'hrtimer_grab_expiry_lock':
kernel/time/hrtimer.c:937:33: error: 'migration_base' undeclared (first use in
this function); did you mean 'migrate_mode'?
if (timer->is_soft && base != &migration_base) {
^~~~~~~~~~~~~~
migrate_mode
kernel/time/hrtimer.c:937:33: note: each undeclared identifier is reported
only once for each function it appears in
scripts/Makefile.build:278: recipe for target 'kernel/time/hrtimer.o' failed
make[2]: *** [kernel/time/hrtimer.o] Error 1
scripts/Makefile.build:489: recipe for target 'kernel/time' failed
make[1]: *** [kernel/time] Error 2
Makefile:1073: recipe for target 'kernel' failed
make: *** [kernel] Error 2


I did savedefconfig and attached the result.

Greets
Alex


Attachments:
defconfig (5.91 kB)
Subject: Re: [ANNOUNCE] v5.2.10-rt5

On 2019-08-27 14:34:19 [+0200], Alexander Dahl wrote:
> Hello Sebastian,
Hello Alexander,

> This causes build errors on my side now, I tested with the .config we use on
> our custom tree on a tag "v5.2.10-rt5-rebase", cross-compiling with gcc 7.3.1
> for ARCH=arm:

of course, !SMP. What about this:

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -934,7 +934,11 @@ void hrtimer_grab_expiry_lock(const struct hrtimer *timer)
{
struct hrtimer_clock_base *base = READ_ONCE(timer->base);

+#ifdef CONFIG_SMP
if (timer->is_soft && base != &migration_base) {
+#else
+ if (timer->is_soft && base && base->cpu_base) {
+#endif
spin_lock(&base->cpu_base->softirq_expiry_lock);
spin_unlock(&base->cpu_base->softirq_expiry_lock);
}

Sebastian

2019-08-27 14:27:37

by Alexander Dahl

[permalink] [raw]
Subject: Re: [ANNOUNCE] v5.2.10-rt5

Hello Sebastian,

Am Dienstag, 27. August 2019, 15:22:01 CEST schrieb Sebastian Andrzej Siewior:
> of course, !SMP. What about this:
>
> diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
> --- a/kernel/time/hrtimer.c
> +++ b/kernel/time/hrtimer.c
> @@ -934,7 +934,11 @@ void hrtimer_grab_expiry_lock(const struct hrtimer
> *timer) {
> struct hrtimer_clock_base *base = READ_ONCE(timer->base);
>
> +#ifdef CONFIG_SMP
> if (timer->is_soft && base != &migration_base) {
> +#else
> + if (timer->is_soft && base && base->cpu_base) {
> +#endif
> spin_lock(&base->cpu_base->softirq_expiry_lock);
> spin_unlock(&base->cpu_base->softirq_expiry_lock);
> }

Build error is gone and target system boots successfully, seems to work fine
at first sight. Thanks for the quick response.

Greets
Alex