]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
efi/earlycon: Fix write-combine mapping on x86
authorArvind Sankar <nivedita@alum.mit.edu>
Tue, 24 Dec 2019 13:29:07 +0000 (14:29 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commit4ff1623daf04d0abad1a3ad9785436d4ec122995
tree3610846fe37eccacfb250e50a6c1f69914842507
parent11973e325389b56e3516f862d563f741f71742c3
efi/earlycon: Fix write-combine mapping on x86

BugLink: https://bugs.launchpad.net/bugs/1862429
commit d92b54570d24d017d2630e314b525ed792f5aa6c upstream.

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.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Fixes: 69c1f396f25b ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation")
Link: https://lkml.kernel.org/r/20191224132909.102540-2-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/firmware/efi/earlycon.c