Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: John David Anglin <dave.anglin@bell.net>,
	linux-parisc <linux-parisc@vger.kernel.org>
Subject: Re: Your System ate a SPARC! Gah! in map_pages()
Date: Mon, 6 Dec 2021 19:41:21 +0100	[thread overview]
Message-ID: <e76b69c3-0351-7054-bf8c-6de2bd9c33ca@gmx.de> (raw)
In-Reply-To: <a00c91d7-85d4-7c5d-85db-af812aadcb31@bell.net>

On 12/6/21 00:05, John David Anglin wrote:
> On 2021-12-05 4:00 p.m., John David Anglin wrote:
>>> Does it boot if you remove the __init in front of map_pages?
>> I'll try.  I thought of trying it but wasn't sure if map_pages() had to be an init routine or not.
> This appears to fix boot.  System booted okay about six times.

Do you have huge pages enabled?
If so you could try this patch (instead of markung map_pages __init):

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 1ae31db9988f..a9a510338ced 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -405,7 +405,7 @@ static void __init map_pages(unsigned long start_vaddr,
                                } else if (!kernel_set_to_readonly) {
                                        /* still initializing, allow writing to RO memory */
                                        prot = PAGE_KERNEL_RWX;
-                                       huge = true;
+                                       huge = false;
                                } else if (address >= ro_start) {
                                        /* Code (ro) and Data areas */
                                        prot = (address < ro_end) ?

Maybe the whole kernel is initially mapped via one/multiple huge pages(s), and
then we suddenly turn huge pages partly off. Therefore maybe not all TLB entries for the code of
map_pages() is already loaded?

On the other side the problem is somewhat similar to what I see with patching
the kernel code in the fixmap code on PA1.x CPUs... it showed strange asm statements too..

Helge

  reply	other threads:[~2021-12-06 18:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-05 19:33 Your System ate a SPARC! Gah! in map_pages() John David Anglin
2021-12-05 20:46 ` Helge Deller
2021-12-05 21:00   ` John David Anglin
2021-12-05 23:05     ` John David Anglin
2021-12-06 18:41       ` Helge Deller [this message]
2021-12-06 19:07         ` John David Anglin
2021-12-07 15:36           ` John David Anglin
2021-12-07 22:07   ` John David Anglin
2021-12-08  8:14     ` Helge Deller
2021-12-10 19:53       ` Sven Schnelle
2021-12-10 21:14         ` Helge Deller
2021-12-10 21:18           ` John David Anglin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e76b69c3-0351-7054-bf8c-6de2bd9c33ca@gmx.de \
    --to=deller@gmx.de \
    --cc=dave.anglin@bell.net \
    --cc=linux-parisc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox