Skip to contentSkip to conversation

parisc: Allow live-patching of __meminit functions

PATCH New Helge Deller 1 participant 1 message May 1, 2019 PA-RISC architecture

lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 parisc: Allow live-patching of __meminit functions

When making the text sections writeable with set_kernel_text_rw(1), include all text sections including those in the __init section. Otherwise functions marked with __meminit will stay read-only.

arch/parisc/mm/init.c +1 -1
index 78e451ce0f1b..79afd9600cca 100644
@@ -477,7 +477,7 @@ static void __init map_pages(unsigned long start_vaddr,
 
 void __init set_kernel_text_rw(int enable_read_write)
 {
-	unsigned long start = (unsigned long) _text;
+	unsigned long start = (unsigned long) __init_begin;
 	unsigned long end   = (unsigned long) &data_start;
 
 	map_pages(start, __pa(start), end-start,