Kernel crash due to Preempt-RT patches

Dear Experts,

I applied realtime patches for RB5 by following the instructions of enabling RT patches for Dragonboard 845c.
The kernel I used : https://git.linaro.org/landing-teams/working/qualcomm/kernel.git, branch release/rb5/qcomlt-5.12,
The patches : https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/5.12/patch-5.12-rc3-rt3.patch.xz

I was trying to generate the boot image manually to be used with Debian Sid 65, 66 (as instructed in https://releases.linaro.org/96boards/dragonboard845c/linaro/debian/latest/ or in https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/build/kernel.md.html) as well as automatically within YoctoEmbedded. But in both cases, I always struggled with the following crash :

[ 104.306446] WARNING: CPU: 5 PID: 1 at arch/arm64/include/asm/pgtable.h:982 do_set_pte+0x1d4/0x230
[ 104.306448] Modules linked in:
[ 104.306448] CPU: 5 PID: 1 Comm: init Tainted: G W 5.12.0-rc6-rt3+linaro #1
[ 104.306449] Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT)
[ 104.306450] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO BTYPE=–)
[ 104.306450] pc : do_set_pte+0x1d4/0x230
[ 104.306452] lr : filemap_map_pages+0x18c/0x380
[ 104.306454] sp : ffff80001005bbe0
[ 104.306454] x29: ffff80001005bbe0 x28: ffff00ae0253ed80
[ 104.306455] x27: fffffc02bdd85440 x26: 0000000000000100
[ 104.306456] x25: 0000000000000001 x24: ffff00ae02a4b578
[ 104.306457] x23: 0000000000000000 x22: ffff00ae023c8780
[ 104.306459] x21: fffffc02bdd85440 x20: ffff80001005bd30
[ 104.306460] x19: 0020000276151fc3 x18: ffff00ae02598000
[ 104.306461] x17: 0000000000000000 x16: 0000000000000000
[ 104.306463] x15: 0000000000000000 x14: ffff00ae00159f80
[ 104.306464] x13: ffff39408b685000 x12: 000000003474d91d
[ 104.306465] x11: 0000000000000000 x10: ffff00ae00014800
[ 104.306466] x9 : 000000000000000d x8 : 0000000000000001
[ 104.306467] x7 : 0000000000000021 x6 : 0000000000000000
[ 104.306468] x5 : 0000000000000001 x4 : 0000ffffa4107000
[ 104.306469] x3 : 0000000000000000 x2 : 0000ffffa410d000
[ 104.306470] x1 : 0000000000000000 x0 : 0000000000000000
[ 104.306472] Call trace:
[ 104.306472] do_set_pte+0x1d4/0x230
[ 104.306473] filemap_map_pages+0x18c/0x380
[ 104.306475] __handle_mm_fault+0xac8/0xe58
[ 104.306476] handle_mm_fault+0x104/0x288
[ 104.306478] do_page_fault+0x13c/0x398
[ 104.306480] do_translation_fault+0x60/0x70
[ 104.306481] do_mem_abort+0x40/0xb0
[ 104.306483] el0_da+0x20/0x30
[ 104.306484] el0_sync_handler+0x88/0xb8
[ 104.306485] el0_sync+0x170/0x180
[ 104.306486] —[ end trace 0000000000000061 ]—
[ 105.306581] ------------[ cut here ]------------

Observing that the kernel version of the Linaro branch is 5.12.0-rc6, while the RT-patches’ version is 5.12-rc3 as latest at the time of writing, do you think that this version mismatch could be the cause of the crash?

Should I also try with older kernel releases that seem to support RB5 under Linaro repository as well ? Currently I find 4 related branches for RB5 :
release/rb5/qcomlt-5.10
release/rb5/qcomlt-5.11
release/rb5/qcomlt-5.12
release/rb5/qcomlt-5.9
I wonder if they are all maintained and work well on RB5, please !?!?

Thanks in advance and look forward to receiving your advice!
K.

Hi again,

Just a little update that there’s been a small buglet in the used RT-patches. I applied the patch for that bug and the RT-kernel could be built and NO similar WARNING found.

BR,
K.