From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>,
Ard Biesheuvel <ardb@kernel.org>,
linux-efi <linux-efi@vger.kernel.org>
Subject: Re: [PATCH] efi/earlycon: Fix write-combine mapping on x86
Date: Wed, 11 Dec 2019 13:04:35 +0200 [thread overview]
Message-ID: <20191211110435.GP32742@smile.fi.intel.com> (raw)
In-Reply-To: <CAKv+Gu8s=kT_21WasEsTRh+6COQYD0mpzOT5n0qhD1Y+YdR3JQ@mail.gmail.com>
On Wed, Dec 11, 2019 at 08:22:56AM +0000, Ard Biesheuvel wrote:
> (+ Andy)
>
> On Wed, 11 Dec 2019 at 00:24, Arvind Sankar <nivedita@alum.mit.edu> wrote:
> >
> > On x86, until PAT is initialized, WC translates into UC-. Since we
> > calculate and store pgprot_writecombine(PAGE_KERNEL) when earlycon is
> > initialized, this means we actually use UC- mappings instead of WC
> > mappings, which makes scrolling very slow.
> >
> > Instead store a boolean flag to indicate whether we want to use
> > writeback or write-combine mappings, and recalculate the actual pgprot_t
> > we need on every mapping. Once PAT is initialized, we will start using
> > write-combine mappings, which speeds up the scrolling considerably.
> >
> > Fixes: 69c1f396f25b ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation")
> > Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Make sense.
One comment below.
> > - if (pgprot_val(fb_prot) == pgprot_val(PAGE_KERNEL))
> > - efi_fb = memremap(fb_base, screen_info.lfb_size, MEMREMAP_WB);
> > - else
> > - efi_fb = memremap(fb_base, screen_info.lfb_size, MEMREMAP_WC);
> > + efi_fb = memremap(fb_base, screen_info.lfb_size,
> > + fb_wb ? MEMREMAP_WB : MEMREMAP_WC);
I would really like to keep the style with if-else.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2019-12-11 11:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 23:24 [PATCH] efi/earlycon: Fix write-combine mapping on x86 Arvind Sankar
2019-12-11 8:22 ` Ard Biesheuvel
2019-12-11 11:04 ` Andy Shevchenko [this message]
2019-12-11 14:00 ` Ard Biesheuvel
2019-12-11 15:50 ` Arvind Sankar
2019-12-11 17:37 ` Arvind Sankar
2019-12-11 18:03 ` Andy Shevchenko
2019-12-11 18:06 ` Ard Biesheuvel
2019-12-11 20:00 ` Andy Shevchenko
2019-12-12 16:56 ` Arvind Sankar
2019-12-12 16:57 ` 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=20191211110435.GP32742@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=ard.biesheuvel@linaro.org \
--cc=ardb@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=nivedita@alum.mit.edu \
/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