Linux-parisc archive on
 help / Atom feed
* [PATCH] parisc: Remap hugepage-aligned pages in set_kernel_text_rw()
@ 2019-01-04 22:32 Helge Deller
  0 siblings, 0 replies; 1+ messages in thread
From: Helge Deller @ 2019-01-04 22:32 UTC (permalink / raw)
  To: linux-parisc, James Bottomley, John David Anglin; +Cc: Mike Hosken

The alternative coding patch for parisc in kernel 4.20 broke booting
machines with PA8500-PA8700 CPUs. The problem is, that for such machines
the parisc kernel automatically utilizes huge pages to access kernel
text code, but the set_kernel_text_rw() function, which is used shortly
before applying any alternative patches, didn't used the correctly
hugepage-aligned addresses to remap the kernel text read-writeable.

Fixes: 3847dab77421 ("parisc: Add alternative coding infrastructure")
Cc: <>	[4.20]
Signed-off-by: Helge Deller <>

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 2d7cffc..059187a 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -512,8 +512,8 @@ static void __init map_pages(unsigned long start_vaddr,
 void __init set_kernel_text_rw(int enable_read_write)
-	unsigned long start = (unsigned long)__init_begin;
-	unsigned long end   = (unsigned long)_etext;
+	unsigned long start = (unsigned long) _text;
+	unsigned long end   = (unsigned long) &data_start;
 	map_pages(start, __pa(start), end-start,
 		PAGE_KERNEL_RWX, enable_read_write ? 1:0);

^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 22:32 [PATCH] parisc: Remap hugepage-aligned pages in set_kernel_text_rw() Helge Deller

Linux-parisc archive on

Archives are clonable:
	git clone --mirror linux-parisc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-parisc linux-parisc/ \
	public-inbox-index linux-parisc

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox