From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-efi <linux-efi@vger.kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Alexander Graf <agraf@suse.de>,
Matt Fleming <matt@codeblueprint.co.uk>
Subject: Re: [PATCH v3] efi/earlycon: Remap entire framebuffer after page initialization
Date: Mon, 18 Nov 2019 13:45:38 +0200 [thread overview]
Message-ID: <20191118114538.GV32742@smile.fi.intel.com> (raw)
In-Reply-To: <CAKv+Gu9wKQ_yXjfkB6-6f8Tfu+cfpSNnxn04ZqExYxuPSQS-ww@mail.gmail.com>
On Fri, Nov 15, 2019 at 04:28:10PM +0000, Ard Biesheuvel wrote:
> On Fri, 15 Nov 2019 at 15:31, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > When the commit 69c1f396f25b ("efi/x86: Convert x86 EFI earlyprintk
> > into generic earlycon implementation") moved x86 specific EFI earlyprintk
> > implementation to shared location it also tweaked the behaviour. In particular
> > it dropped a trick with full framebuffer remapping after page initialization.
> > This lead to two regressions:
> > 1) very slow scrolling after page initialization;
> > 2) kernel hang when keep_bootcon parameter is being provided.
> >
> > Returning the trick back fixes #2 and mitigates, i.e. reduces the window when
> > slowness appears, #1 presumably due to eliminating heavy map()/unmap()
> > operations per each pixel line on the screen.
> > +/*
> > + * efi earlycon needs to use early_memremap() to map the framebuffer.
> > + * But early_memremap() is not usable for 'earlycon=efifb keep_bootcon',
> > + * memremap() should be used instead. memremap() will be available after
> > + * paging_init() which is earlier than initcall callbacks. Thus adding this
> > + * early initcall function early_efi_map_fb() to map the whole efi framebuffer.
> > + */
> > +static int __init early_efi_map_fb(void)
> > +{
> > + if (!fb_base || !fb_size)
> > + return NULL;
> > +
>
> 'return 0' please.
Ah, sorry. Though I think we rather return -ENOVEV here.
> I'll test this on actual arm64 hardware somewhere next week, and queue
> it if it doesn't break anything (no need to resend for the above)
Thanks!
> > + if (pgprot_val(fb_prot) == pgprot_val(PAGE_KERNEL))
> > + efi_fb = memremap(fb_base, fb_size, MEMREMAP_WB);
> > + else
> > + efi_fb = memremap(fb_base, fb_size, MEMREMAP_WC);
> > +
> > + return efi_fb ? 0 : -ENOMEM;
> > +}
> > +early_initcall(early_efi_map_fb);
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2019-11-18 11:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 15:31 [PATCH v3] efi/earlycon: Remap entire framebuffer after page initialization Andy Shevchenko
2019-11-15 16:28 ` Ard Biesheuvel
2019-11-18 11:45 ` Andy Shevchenko [this message]
2019-11-18 15:11 ` Ard Biesheuvel
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=20191118114538.GV32742@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=agraf@suse.de \
--cc=ard.biesheuvel@linaro.org \
--cc=linux-efi@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mika.westerberg@linux.intel.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