Skip to content

Commit

Permalink
parisc: BTLB: Fix crash when setting up BTLB at CPU bringup
Browse files Browse the repository at this point in the history
When using hotplug and bringing up a 32-bit CPU, ask the firmware about the
BTLB information to set up the static (block) TLB entries.

For that write access to the static btlb_info struct is needed, but
since it is marked __ro_after_init the kernel segfaults with missing
write permissions.

Fix the crash by dropping the __ro_after_init annotation.

Fixes: e5ef93d ("parisc: BTLB: Initialize BTLB tables at CPU startup")
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v6.6+
  • Loading branch information
Helge Deller committed Jan 31, 2024
1 parent 8b1d723 commit 913b9d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/parisc/kernel/cache.c
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ int pa_serialize_tlb_flushes __ro_after_init;

struct pdc_cache_info cache_info __ro_after_init;
#ifndef CONFIG_PA20
struct pdc_btlb_info btlb_info __ro_after_init;
struct pdc_btlb_info btlb_info;
#endif

DEFINE_STATIC_KEY_TRUE(parisc_has_cache);

0 comments on commit 913b9d4

Please sign in to comment.