]> git.baikalelectronics.ru Git - 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)
committerIngo Molnar <mingo@kernel.org>
Wed, 25 Dec 2019 09:46:06 +0000 (10:46 +0100)
commitd92b54570d24d017d2630e314b525ed792f5aa6c
tree30b65425951a2c1c35335a9ed8bc0bd7cb73b1dc
parent46cf053efec6a3a5f343fead837777efe8252a46
efi/earlycon: Fix write-combine mapping on x86

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>
drivers/firmware/efi/earlycon.c