Re: [ANNOUNCE] v5.12-rc3-rt3
On Sat Mar 20 2021, Mike Galbraith wrote: > On Fri, 2021-03-19 at 23:33 +0100, Sebastian Andrzej Siewior wrote: >> Dear RT folks! >> >> I'm pleased to announce the v5.12-rc3-rt3 patch set. > > My little rpi4b is fairly unhappy with 5.12-rt, whereas 5.11-rt works > fine on it. The below spew is endless, making boot endless. I turned > it into a WARN_ON_ONCE to see if the thing would finish boot, and > surprisingly, it seems perfectly fine with that bad idea. Having not > the foggiest clue what I'm doing down in arm arch-land, bug is in no > immediate danger :) Yeah, I've had the same issue with my Marvell ESPRESSObin. WARN_ON_ONCE() made it boot and it runs without any problems since then. Thanks! Thanks, Kurt signature.asc Description: PGP signature
Re: [ANNOUNCE] v5.12-rc3-rt3
On Sun, 2021-03-21 at 08:46 +0100, Mike Galbraith wrote: > On Sat, 2021-03-20 at 09:18 +0100, Mike Galbraith wrote: > > On Fri, 2021-03-19 at 23:33 +0100, Sebastian Andrzej Siewior wrote: > > > Dear RT folks! > > > > > > I'm pleased to announce the v5.12-rc3-rt3 patch set. > > > > My little rpi4b is fairly unhappy with 5.12-rt, whereas 5.11-rt works > > fine on it. The below spew is endless, making boot endless. I turned > > it into a WARN_ON_ONCE to see if the thing would finish boot, and > > surprisingly, it seems perfectly fine with that bad idea. Having not > > the foggiest clue what I'm doing down in arm arch-land, bug is in no > > immediate danger :) > > Actually, it looks like a defenseless little buglet, and this gripe > simply wants to be disabled for RT. Or completely removed instead. It's entirely possible I'm missing something obvious to arm experts, but I don't _think_ the register read needs protection, leaving me wondering why arch_faults_on_old_pte() was born with that warning. -Mike
Re: [ANNOUNCE] v5.12-rc3-rt3
On Sat, 2021-03-20 at 09:18 +0100, Mike Galbraith wrote: > On Fri, 2021-03-19 at 23:33 +0100, Sebastian Andrzej Siewior wrote: > > Dear RT folks! > > > > I'm pleased to announce the v5.12-rc3-rt3 patch set. > > My little rpi4b is fairly unhappy with 5.12-rt, whereas 5.11-rt works > fine on it. The below spew is endless, making boot endless. I turned > it into a WARN_ON_ONCE to see if the thing would finish boot, and > surprisingly, it seems perfectly fine with that bad idea. Having not > the foggiest clue what I'm doing down in arm arch-land, bug is in no > immediate danger :) Actually, it looks like a defenseless little buglet, and this gripe simply wants to be disabled for RT. arm64: disable arch_faults_on_old_pte() preemptible() warning for RT arch_faults_on_old_pte() was never called in < 5.12-rt, but 5.12 added arch_wants_old_prefaulted_pte(), which is a wrapper thereof, and thus finish_fault() -> do_set_pte() -> arch_wants_old_prefaulted_pte() now calls it, in preemptible context, and a flood of complaints ensues. Kill it for RT. Signed-off-by: Mike Galbraith --- arch/arm64/include/asm/pgtable.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -979,7 +979,7 @@ static inline void update_mmu_cache(stru */ static inline bool arch_faults_on_old_pte(void) { - WARN_ON(preemptible()); + WARN_ON(!IS_ENABLED(CONFIG_PREEMPT_RT) && preemptible()); return !cpu_has_hw_af(); } > > [2.216913] WARNING: CPU: 0 PID: 1 at arch/arm64/include/asm/pgtable.h:982 > do_set_pte+0x1cc/0x1d4 > [2.216949] Modules linked in: > [2.216961] CPU: 0 PID: 1 Comm: init Not tainted 5.12.0.g425ed5a-v8-rt #33 > [2.216973] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT) > [2.216979] pstate: 2005 (nzCv daif -PAN -UAO -TCO BTYPE=--) > [2.216990] pc : do_set_pte+0x1cc/0x1d4 > [2.217004] lr : filemap_map_pages+0x178/0x380 > [2.217016] sp : ffc01153bbb0 > [2.217020] x29: ffc01153bbb0 x28: fffe07d93080 > [2.217033] x27: x26: ff8101c9e000 > [2.217044] x25: ff8101b40fd8 x24: > [2.217054] x23: ff8101674170 x22: 007fb1b4b000 > [2.217064] x21: fffe07d93080 x20: ffc01153bcf0 > [2.217073] x19: 0021f64c2fc3 x18: > [2.217082] x17: x16: > [2.217091] x15: x14: > [2.217100] x13: x12: > [2.217108] x11: x10: > [2.217117] x9 : ffc010209068 x8 : 000f > [2.217126] x7 : ff8101e87c68 x6 : fffe > [2.217135] x5 : 00101e8b x4 : ff8101e880a8 > [2.217144] x3 : 00200fc3 x2 : > [2.217153] x1 : x0 : > [2.217162] Call trace: > [2.217166] do_set_pte+0x1cc/0x1d4 > [2.217181] filemap_map_pages+0x178/0x380 > [2.217189] __handle_mm_fault+0x75c/0x930 > [2.217202] handle_mm_fault+0x178/0x25c > [2.217214] do_page_fault+0x16c/0x470 > [2.217233] do_translation_fault+0xbc/0xd8 > [2.217244] do_mem_abort+0x4c/0xbc > [2.217259] el0_ia+0x68/0xcc > [2.217272] el0_sync_handler+0x180/0x1b0 > [2.217284] el0_sync+0x170/0x180
Re: [ANNOUNCE] v5.12-rc3-rt3
On Fri, 2021-03-19 at 23:33 +0100, Sebastian Andrzej Siewior wrote: > Dear RT folks! > > I'm pleased to announce the v5.12-rc3-rt3 patch set. My little rpi4b is fairly unhappy with 5.12-rt, whereas 5.11-rt works fine on it. The below spew is endless, making boot endless. I turned it into a WARN_ON_ONCE to see if the thing would finish boot, and surprisingly, it seems perfectly fine with that bad idea. Having not the foggiest clue what I'm doing down in arm arch-land, bug is in no immediate danger :) [2.216913] WARNING: CPU: 0 PID: 1 at arch/arm64/include/asm/pgtable.h:982 do_set_pte+0x1cc/0x1d4 [2.216949] Modules linked in: [2.216961] CPU: 0 PID: 1 Comm: init Not tainted 5.12.0.g425ed5a-v8-rt #33 [2.216973] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT) [2.216979] pstate: 2005 (nzCv daif -PAN -UAO -TCO BTYPE=--) [2.216990] pc : do_set_pte+0x1cc/0x1d4 [2.217004] lr : filemap_map_pages+0x178/0x380 [2.217016] sp : ffc01153bbb0 [2.217020] x29: ffc01153bbb0 x28: fffe07d93080 [2.217033] x27: x26: ff8101c9e000 [2.217044] x25: ff8101b40fd8 x24: [2.217054] x23: ff8101674170 x22: 007fb1b4b000 [2.217064] x21: fffe07d93080 x20: ffc01153bcf0 [2.217073] x19: 0021f64c2fc3 x18: [2.217082] x17: x16: [2.217091] x15: x14: [2.217100] x13: x12: [2.217108] x11: x10: [2.217117] x9 : ffc010209068 x8 : 000f [2.217126] x7 : ff8101e87c68 x6 : fffe [2.217135] x5 : 00101e8b x4 : ff8101e880a8 [2.217144] x3 : 00200fc3 x2 : [2.217153] x1 : x0 : [2.217162] Call trace: [2.217166] do_set_pte+0x1cc/0x1d4 [2.217181] filemap_map_pages+0x178/0x380 [2.217189] __handle_mm_fault+0x75c/0x930 [2.217202] handle_mm_fault+0x178/0x25c [2.217214] do_page_fault+0x16c/0x470 [2.217233] do_translation_fault+0xbc/0xd8 [2.217244] do_mem_abort+0x4c/0xbc [2.217259] el0_ia+0x68/0xcc [2.217272] el0_sync_handler+0x180/0x1b0 [2.217284] el0_sync+0x170/0x180
[ANNOUNCE] v5.12-rc3-rt3
Dear RT folks! I'm pleased to announce the v5.12-rc3-rt3 patch set. Changes since v5.12-rc3-rt2: - Update the softirq/tasklet patches to the latest version which has been merged into the tip tree. Only the comments have changed. - In certain conditions the SLAB_TYPESAFE_BY_RCU marked SLAB pages may have been returned to the page-allocator without waiting for required grace period. The problem has been introduced during the rework in v5.11.2-rt9. - Update John's printk patches. With this update I can strike - kdb/kgdb can easily deadlock. off the known issues list. Known issues - netconsole triggers WARN. The delta patch against v5.12-rc3-rt2 is appended below and can be found here: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.12/incr/patch-5.12-rc3-rt2-rt3.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.12-rc3-rt3 The RT patch against v5.12-rc3 can be found here: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.12/older/patch-5.12-rc3-rt3.patch.xz The split quilt queue is available at: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.12/older/patches-5.12-rc3-rt3.tar.xz Sebastian diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 7a13bc20f0a0c..e0ced3afc667f 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h @@ -57,6 +57,7 @@ struct smp_ops_t { extern int smp_send_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us); extern int smp_send_safe_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us); +extern void smp_send_debugger_break_cpu(unsigned int cpu); extern void smp_send_debugger_break(void); extern void start_secondary_resume(void); extern void smp_generic_give_timebase(void); diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index 409080208a6c4..1f716688c9775 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -120,11 +121,19 @@ int kgdb_skipexception(int exception, struct pt_regs *regs) static int kgdb_debugger_ipi(struct pt_regs *regs) { - kgdb_nmicallback(raw_smp_processor_id(), regs); + int cpu = raw_smp_processor_id(); + + if (!console_atomic_kgdb_cpu_delay(cpu)) + kgdb_nmicallback(cpu, regs); return 0; } #ifdef CONFIG_SMP +void kgdb_roundup_cpu(unsigned int cpu) +{ + smp_send_debugger_break_cpu(cpu); +} + void kgdb_roundup_cpus(void) { smp_send_debugger_break(); diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index 1ef55f4b389a2..3c8d9bbb51cfa 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c @@ -73,8 +73,7 @@ static const char *nvram_os_partitions[] = { }; static void oops_to_nvram(struct kmsg_dumper *dumper, - enum kmsg_dump_reason reason, - struct kmsg_dumper_iter *iter); + enum kmsg_dump_reason reason); static struct kmsg_dumper nvram_kmsg_dumper = { .dump = oops_to_nvram @@ -644,11 +643,11 @@ void __init nvram_init_oops_partition(int rtas_partition_exists) * partition. If that's too much, go back and capture uncompressed text. */ static void oops_to_nvram(struct kmsg_dumper *dumper, - enum kmsg_dump_reason reason, - struct kmsg_dumper_iter *iter) + enum kmsg_dump_reason reason) { struct oops_log_info *oops_hdr = (struct oops_log_info *)oops_buf; static unsigned int oops_count = 0; + static struct kmsg_dump_iter iter; static bool panicking = false; static DEFINE_SPINLOCK(lock); unsigned long flags; @@ -683,13 +682,14 @@ static void oops_to_nvram(struct kmsg_dumper *dumper, return; if (big_oops_buf) { - kmsg_dump_get_buffer(iter, false, + kmsg_dump_rewind(); + kmsg_dump_get_buffer(, false, big_oops_buf, big_oops_buf_sz, _len); rc = zip_oops(text_len); } if (rc != 0) { - kmsg_dump_rewind(iter); - kmsg_dump_get_buffer(iter, false, + kmsg_dump_rewind(); + kmsg_dump_get_buffer(, false, oops_data, oops_data_sz, _len); err_type = ERR_TYPE_KERNEL_PANIC; oops_hdr->version = cpu_to_be16(OOPS_HDR_VERSION); diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 5a4d59a1070d5..b396c6eafce38 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -582,6 +582,11 @@ static void debugger_ipi_callback(struct pt_regs *regs) debugger_ipi(regs); } +void