linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Victor Hassan <victor@allwinnertech.com>
Cc: linux@armlinux.org.uk, rmk+kernel@armlinux.org.uk,
	yanfei.xu@windriver.com, ardb@kernel.org, tglx@linutronix.de,
	mirq-linux@rere.qmqm.pl, arnd@arndb.de,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: mmu: fix access to illegal address when using earlycon & memblock=debug
Date: Tue, 28 Jun 2022 10:34:49 +0200	[thread overview]
Message-ID: <CACRpkdYt=_i+OqBmJOPxu70d1hRghx4XUWf45qY0zoG0AdtqnA@mail.gmail.com> (raw)
In-Reply-To: <ecabcfa6-7408-d10b-7d88-b1a202b2a90d@allwinnertech.com>

On Fri, Jun 17, 2022 at 3:31 PM Victor Hassan <victor@allwinnertech.com> wrote:
> On 4/18/2022 11:08 PM, Victor Hassan wrote:
> > On 18/04/2022 07:21, Linus Walleij wrote:
> >> On Wed, Mar 16, 2022 at 3:33 AM Victor Hassan
> >> <victor@allwinnertech.com> wrote:
> >>
> >>> earlycon uses fixmap to create a memory map,
> >>> So we need to close earlycon before closing fixmap,
> >>> otherwise printk will access illegal addresses.
> >>> After creating a new memory map, we open earlycon again.
> >>>
> >>> Signed-off-by: Victor Hassan <victor@allwinnertech.com>
> >>
> >> I think noone really noticed this because everyone on Arm systems
> >> use CONFIG_DEBUG_LL, and that makes printascii hammer out
> >> stuff on the console very early, it even accounts for whether we have
> >> MMU on or not.
> >>
> > Hi Linus,
> > Thank you for the reply. I used earlycon, in early_fixmap_shutdown, the
> > base address of earlycon is in the critical stage of release and
> > reassignment, so early_fixmap_shutdown -> create_mapping should not call
> > earlycon in this process, and create_mapping has a lot of conditions
> > that trigger print, memblock=debug just makes it easier to expose problems.
> >
> >> How are you using this on Arm even? What system and what serial
> >> driver?
> > I'm using serial driver 8250 on arm32, with cmdline: memblock=debug.
> > CONFIG_SERIAL_8250=y
> > CONFIG_SERIAL_8520_CONSOLE=y
> >>
> >> That said, it looks correct.
> >> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Hi Linus,
> Sorry to disturb. Is there any question about this issue? Thank you :)

No, I understand the problem, I provided my ACK.

Maybe you wanna add the patch to Russell's patch tracker so
he can apply it?
https://www.arm.linux.org.uk/developer/patches/

Yours,
Linus Walleij

  reply	other threads:[~2022-06-28  8:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16  2:33 [PATCH] ARM: mmu: fix access to illegal address when using earlycon & memblock=debug Victor Hassan
2022-04-17 23:21 ` Linus Walleij
2022-04-18 15:08   ` Victor Hassan
2022-06-17 13:30     ` Victor Hassan
2022-06-28  8:34       ` Linus Walleij [this message]
     [not found] ` <CGME20220831115257eucas1p20d37a01c51e42767860920a936255bd7@eucas1p2.samsung.com>
2022-08-31 11:52   ` Marek Szyprowski
2022-08-31 12:37     ` Victor Hassan
2022-09-01 12:53       ` Victor Hassan
2022-09-01 13:21         ` Rob Herring
2022-09-01 13:49           ` Rob Herring
2022-09-03  8:54           ` Victor Hassan
2022-08-31 13:51     ` Russell King (Oracle)

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='CACRpkdYt=_i+OqBmJOPxu70d1hRghx4XUWf45qY0zoG0AdtqnA@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=tglx@linutronix.de \
    --cc=victor@allwinnertech.com \
    --cc=yanfei.xu@windriver.com \
    /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;
as well as URLs for NNTP newsgroup(s).