Skip to content
  • Luis R. Rodriguez's avatar
    drivers/video/fbdev/kyrofb: Use arch_phys_wc_add() and pci_ioremap_wc_bar() · 9e517ac8
    Luis R. Rodriguez authored
    Convert the driver from using the x86-specific MTRR code to the
    architecture-agnostic arch_phys_wc_add(). It will avoid MTRR if
    write-combining is available, in order to take advantage of that
    also ensure the ioremapped area is requested as write-combining.
    
    There are a few motivations for this:
    
    a) Take advantage of PAT when available
    
    b) Help bury MTRR code away, MTRR is architecture-specific and on
       x86 it is being replaced by PAT.
    
    c) Help with the goal of eventually using _PAGE_CACHE_UC over
       _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
       de33c442 titled "x86 PAT: fix performance drop for glx,
       use UC minus for ioremap(), ioremap_nocache() and
       pci_mmap_page_range()")
    
    The conversion done is expressed by the following Coccinelle
    SmPL patch, it additionally required manual intervention to
    address all the ifdeffery and removal of redundant things which
    arch_phys_wc_add() already addresses such as verbo...
    9e517ac8