• Arvind Sankar's avatar
    efi/earlycon: Fix write-combine mapping on x86 · d92b5457
    Arvind Sankar authored
    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: default avatarArvind Sankar <nivedita@alum.mit.edu>
    Signed-off-by: default avatarArd 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: 69c1f396 ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation")
    Link: https://lkml.kernel.org/r/20191224132909.102540-2-ardb@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    d92b5457
earlycon.c 5.08 KB