1. 03 Jun, 2015 15 commits
    • Luis R. Rodriguez's avatar
      video: fbdev: geode gxfb: use ioremap_wc() for framebuffer · 9ccfc4aa
      Luis R. Rodriguez authored
      The driver doesn't use mtrr_add() or arch_phys_wc_add() but
      since we know the framebuffer is isolated already on an
      ioremap() we can take advantage of write combining for
      performance where possible.
      
      In this case there are a few motivations for this:
      
      a) Take advantage of PAT when available
      
      b) 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()")
      
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-geode@lists.infradead.org
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      9ccfc4aa
    • Luis R. Rodriguez's avatar
      video: fbdev: atmel_lcdfb: use ioremap_wc() for framebuffer · 1e43a203
      Luis R. Rodriguez authored
      The driver doesn't use mtrr_add() or arch_phys_wc_add() but
      since we know the framebuffer is isolated already on an
      ioremap() we can take advantage of write combining for
      performance where possible.
      
      In this case there are a few motivations for this:
      
      a) Take advantage of PAT when available
      
      b) 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()")
      
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      1e43a203
    • Luis R. Rodriguez's avatar
      video: fbdev: tdfxfb: use arch_phys_wc_add() and ioremap_wc() · cc9866eb
      Luis R. Rodriguez authored
      This driver uses the same area for MTRR as for the ioremap().
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      cc9866eb
    • Luis R. Rodriguez's avatar
      video: fbdev: rivafb: use arch_phys_wc_add() and ioremap_wc() · 04dc78b4
      Luis R. Rodriguez authored
      This driver uses the same area for MTRR as for the ioremap().
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      04dc78b4
    • Luis R. Rodriguez's avatar
      video: fbdev: pm3fb: use arch_phys_wc_add() and ioremap_wc() · 26e25060
      Luis R. Rodriguez authored
      This driver uses the same area for MTRR as for the ioremap().
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      26e25060
    • Luis R. Rodriguez's avatar
      video: fbdev: pm2fb: use arch_phys_wc_add() and ioremap_wc() · f8f05cdc
      Luis R. Rodriguez authored
      This driver uses the same area for MTRR as for the ioremap().
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      f8f05cdc
    • Luis R. Rodriguez's avatar
      video: fbdev: i810: use arch_phys_wc_add() and ioremap_wc() · 775a8a56
      Luis R. Rodriguez authored
      The same area used for MTRR is used for the ioremap() area.
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      775a8a56
    • Luis R. Rodriguez's avatar
      video: fbdev: aty: use arch_phys_wc_add() and ioremap_wc() · f4447dde
      Luis R. Rodriguez authored
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      f4447dde
    • Luis R. Rodriguez's avatar
      video: fbdev: sisfb: use arch_phys_wc_add() and ioremap_wc() · 2cff6406
      Luis R. Rodriguez authored
      This driver uses the same area for MTRR as for the ioremap().
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      2cff6406
    • Luis R. Rodriguez's avatar
      video: fbdev: savagefb: use arch_phys_wc_add() and ioremap_wc() · 4d811d6c
      Luis R. Rodriguez authored
      This driver uses the same area for MTRR as for the ioremap().
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      4d811d6c
    • Luis R. Rodriguez's avatar
      video: fbdev: nvidia: use arch_phys_wc_add() and ioremap_wc() · 3b213c2f
      Luis R. Rodriguez authored
      This driver uses the same area for MTRR and ioremap().
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      3b213c2f
    • Luis R. Rodriguez's avatar
      video: fbdev: neofb: use arch_phys_wc_add() and ioremap_wc() · f2081b81
      Luis R. Rodriguez authored
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      f2081b81
    • Luis R. Rodriguez's avatar
      video: fbdev: matrox: use arch_phys_wc_add() and ioremap_wc() · 888ca5d2
      Luis R. Rodriguez authored
      This driver uses the same ioremap()'d area for the MTRR.
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Mikulas Patocka <mpatocka@redhat.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      888ca5d2
    • Luis R. Rodriguez's avatar
      video: fbdev: intelfb: use arch_phys_wc_add() and ioremap_wc() · 78084dcf
      Luis R. Rodriguez authored
      Although this driver gives the framebuffer layer a different
      size for the framebuffer it uses the entire aperture PCI BAR
      size for the MTRR. Since the framebuffer is included in that
      range and MTRR was used on the entire PCI BAR WC will have
      been preferred on that range as well. This propagates the
      WC preference on the same entire PCI BAR.
      
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Maik Broemme <mbroemme@plusserver.de>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      78084dcf
    • Luis R. Rodriguez's avatar
      video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc() · 05314098
      Luis R. Rodriguez authored
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Masanari Iida <standby24x7@gmail.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      05314098
  2. 29 May, 2015 2 commits
    • Luis R. Rodriguez's avatar
      video: fbdev: gbefb: add missing mtrr_del() calls · 5944d733
      Luis R. Rodriguez authored
      This driver never removed the MTRRs. Fix that.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Masanari Iida <standby24x7@gmail.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      5944d733
    • Luis R. Rodriguez's avatar
      video: fbdev: radeonfb: use arch_phys_wc_add() and ioremap_wc() · 5e200b53
      Luis R. Rodriguez authored
      Convert the driver from using the x86 specific MTRR code to
      the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
      will avoid MTRR if write-combining is available, in order to
      take advantage of that also ensure the ioremap'd 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 its 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 #ifdery and removal of redundant things which
      arch_phys_wc_add() already addresses such as verbose message
      about when MTRR fails and doing nothing when we didn't get
      an MTRR.
      
      @ mtrr_found @
      expression index, base, size;
      @@
      
      -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
      +index = arch_phys_wc_add(base, size);
      
      @ mtrr_rm depends on mtrr_found @
      expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
      @@
      
      -mtrr_del(index, base, size);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_zero_arg depends on mtrr_found @
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, 0, 0);
      +arch_phys_wc_del(index);
      
      @ mtrr_rm_fb_info depends on mtrr_found @
      struct fb_info *info;
      expression mtrr_found.index;
      @@
      
      -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
      +arch_phys_wc_del(index);
      
      @ ioremap_replace_nocache depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap_nocache(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      @ ioremap_replace_default depends on mtrr_found @
      struct fb_info *info;
      expression base, size;
      @@
      
      -info->screen_base = ioremap(base, size);
      +info->screen_base = ioremap_wc(base, size);
      
      Generated-by: Coccinelle SmPL
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      5e200b53
  3. 27 May, 2015 16 commits
  4. 07 May, 2015 2 commits
  5. 04 May, 2015 3 commits
    • Linus Torvalds's avatar
      Linux 4.1-rc2 · 5ebe6afa
      Linus Torvalds authored
      5ebe6afa
    • Linus Torvalds's avatar
      Merge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 8663da2c
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Some miscellaneous bug fixes and some final on-disk and ABI changes
        for ext4 encryption which provide better security and performance"
      
      * tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix growing of tiny filesystems
        ext4: move check under lock scope to close a race.
        ext4: fix data corruption caused by unwritten and delayed extents
        ext4 crypto: remove duplicated encryption mode definitions
        ext4 crypto: do not select from EXT4_FS_ENCRYPTION
        ext4 crypto: add padding to filenames before encrypting
        ext4 crypto: simplify and speed up filename encryption
      8663da2c
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 101a6fd3
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "One intel fix, one rockchip fix, and a bunch of radeon fixes for some
        regressions from audio rework and vm stability"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/i915/chv: Implement WaDisableShadowRegForCpd
        drm/radeon: fix userptr return value checking (v2)
        drm/radeon: check new address before removing old one
        drm/radeon: reset BOs address after clearing it.
        drm/radeon: fix lockup when BOs aren't part of the VM on release
        drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5
        drm/radeon: adjust pll when audio is not enabled
        drm/radeon: only enable audio streams if the monitor supports it
        drm/radeon: only mark audio as connected if the monitor supports it (v3)
        drm/radeon/audio: don't enable packets until the end
        drm/radeon: drop dce6_dp_enable
        drm/radeon: fix ordering of AVI packet setup
        drm/radeon: Use drm_calloc_ab for CS relocs
        drm/rockchip: fix error check when getting irq
        MAINTAINERS: add entry for Rockchip drm drivers
      101a6fd3
  6. 03 May, 2015 2 commits