All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-04-21 20:20 ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: bhelgaas, mst, plagnioj, tomi.valkeinen
  Cc: linux-fbdev, luto, cocci, Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This series adds pci_ioremap_wc_bar() and makes use of it
on a few framebuffer device drivers.

Luis R. Rodriguez (4):
  pci: add pci_ioremap_wc_bar()
  video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
  video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
  video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer

 drivers/pci/pci.c                | 14 ++++++++++++++
 drivers/video/fbdev/gxt4500.c    |  2 +-
 drivers/video/fbdev/i740fb.c     | 35 ++++++-----------------------------
 drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
 include/linux/pci.h              |  1 +
 include/video/kyro.h             |  4 +---
 6 files changed, 34 insertions(+), 55 deletions(-)

-- 
2.3.2.209.gd67f9d5.dirty



^ permalink raw reply	[flat|nested] 39+ messages in thread

* [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-04-21 20:20 ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This series adds pci_ioremap_wc_bar() and makes use of it
on a few framebuffer device drivers.

Luis R. Rodriguez (4):
  pci: add pci_ioremap_wc_bar()
  video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
  video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
  video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer

 drivers/pci/pci.c                | 14 ++++++++++++++
 drivers/video/fbdev/gxt4500.c    |  2 +-
 drivers/video/fbdev/i740fb.c     | 35 ++++++-----------------------------
 drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
 include/linux/pci.h              |  1 +
 include/video/kyro.h             |  4 +---
 6 files changed, 34 insertions(+), 55 deletions(-)

-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-04-21 20:20 ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This series adds pci_ioremap_wc_bar() and makes use of it
on a few framebuffer device drivers.

Luis R. Rodriguez (4):
  pci: add pci_ioremap_wc_bar()
  video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
  video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
  video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer

 drivers/pci/pci.c                | 14 ++++++++++++++
 drivers/video/fbdev/gxt4500.c    |  2 +-
 drivers/video/fbdev/i740fb.c     | 35 ++++++-----------------------------
 drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
 include/linux/pci.h              |  1 +
 include/video/kyro.h             |  4 +---
 6 files changed, 34 insertions(+), 55 deletions(-)

-- 
2.3.2.209.gd67f9d5.dirty

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [PATCH v3 1/4] pci: add pci_ioremap_wc_bar()
  2015-04-21 20:20 ` Luis R. Rodriguez
  (?)
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: bhelgaas, mst, plagnioj, tomi.valkeinen
  Cc: linux-fbdev, luto, cocci, Luis R. Rodriguez, Toshi Kani,
	Suresh Siddha, Ingo Molnar, Thomas Gleixner, Juergen Gross,
	Daniel Vetter, Dave Airlie, Antonino Daplas,
	Ville Syrjälä,
	Mel Gorman, Vlastimil Babka, Borislav Petkov, Davidlohr Bueso,
	linux-kernel

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This lets drivers take advantage of PAT when available. This
should help with the transition of converting video drivers over
to ioremap_wc() to help with the goal of eventually using
_PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on
ioremap_nocache() (de33c442e titled "x86 PAT: fix performance
drop for glx, use UC minus for ioremap(), ioremap_nocache() and
pci_mmap_page_range()")

Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Bjorn Helgaas <bhelgaas@google.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: Ville Syrjälä <syrjala@sci.fi>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/pci/pci.c   | 14 ++++++++++++++
 include/linux/pci.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 687af72..fd14f10 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -138,6 +138,20 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
 	return ioremap_nocache(res->start, resource_size(res));
 }
 EXPORT_SYMBOL_GPL(pci_ioremap_bar);
+
+void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar)
+{
+	/*
+	 * Make sure the BAR is actually a memory resource, not an IO resource
+	 */
+	if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
+		WARN_ON(1);
+		return NULL;
+	}
+	return ioremap_wc(pci_resource_start(pdev, bar),
+			  pci_resource_len(pdev, bar));
+}
+EXPORT_SYMBOL_GPL(pci_ioremap_wc_bar);
 #endif
 
 #define PCI_FIND_CAP_TTL	48
diff --git a/include/linux/pci.h b/include/linux/pci.h
index bc50bb0..490ca41 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1667,6 +1667,7 @@ static inline void pci_mmcfg_late_init(void) { }
 int pci_ext_cfg_avail(void);
 
 void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
+void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar);
 
 #ifdef CONFIG_PCI_IOV
 int pci_iov_virtfn_bus(struct pci_dev *dev, int id);
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH v3 1/4] pci: add pci_ioremap_wc_bar()
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This lets drivers take advantage of PAT when available. This
should help with the transition of converting video drivers over
to ioremap_wc() to help with the goal of eventually using
_PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on
ioremap_nocache() (de33c442e titled "x86 PAT: fix performance
drop for glx, use UC minus for ioremap(), ioremap_nocache() and
pci_mmap_page_range()")

Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Bjorn Helgaas <bhelgaas@google.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: Ville Syrjälä <syrjala@sci.fi>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/pci/pci.c   | 14 ++++++++++++++
 include/linux/pci.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 687af72..fd14f10 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -138,6 +138,20 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
 	return ioremap_nocache(res->start, resource_size(res));
 }
 EXPORT_SYMBOL_GPL(pci_ioremap_bar);
+
+void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar)
+{
+	/*
+	 * Make sure the BAR is actually a memory resource, not an IO resource
+	 */
+	if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
+		WARN_ON(1);
+		return NULL;
+	}
+	return ioremap_wc(pci_resource_start(pdev, bar),
+			  pci_resource_len(pdev, bar));
+}
+EXPORT_SYMBOL_GPL(pci_ioremap_wc_bar);
 #endif
 
 #define PCI_FIND_CAP_TTL	48
diff --git a/include/linux/pci.h b/include/linux/pci.h
index bc50bb0..490ca41 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1667,6 +1667,7 @@ static inline void pci_mmcfg_late_init(void) { }
 int pci_ext_cfg_avail(void);
 
 void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
+void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar);
 
 #ifdef CONFIG_PCI_IOV
 int pci_iov_virtfn_bus(struct pci_dev *dev, int id);
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 1/4] pci: add pci_ioremap_wc_bar()
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This lets drivers take advantage of PAT when available. This
should help with the transition of converting video drivers over
to ioremap_wc() to help with the goal of eventually using
_PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on
ioremap_nocache() (de33c442e titled "x86 PAT: fix performance
drop for glx, use UC minus for ioremap(), ioremap_nocache() and
pci_mmap_page_range()")

Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Bjorn Helgaas <bhelgaas@google.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: Ville Syrj?l? <syrjala@sci.fi>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: linux-fbdev at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/pci/pci.c   | 14 ++++++++++++++
 include/linux/pci.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 687af72..fd14f10 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -138,6 +138,20 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
 	return ioremap_nocache(res->start, resource_size(res));
 }
 EXPORT_SYMBOL_GPL(pci_ioremap_bar);
+
+void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar)
+{
+	/*
+	 * Make sure the BAR is actually a memory resource, not an IO resource
+	 */
+	if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
+		WARN_ON(1);
+		return NULL;
+	}
+	return ioremap_wc(pci_resource_start(pdev, bar),
+			  pci_resource_len(pdev, bar));
+}
+EXPORT_SYMBOL_GPL(pci_ioremap_wc_bar);
 #endif
 
 #define PCI_FIND_CAP_TTL	48
diff --git a/include/linux/pci.h b/include/linux/pci.h
index bc50bb0..490ca41 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1667,6 +1667,7 @@ static inline void pci_mmcfg_late_init(void) { }
 int pci_ext_cfg_avail(void);
 
 void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
+void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar);
 
 #ifdef CONFIG_PCI_IOV
 int pci_iov_virtfn_bus(struct pci_dev *dev, int id);
-- 
2.3.2.209.gd67f9d5.dirty

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH v3 2/4] video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
  2015-04-21 20:20 ` Luis R. Rodriguez
  (?)
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: bhelgaas, mst, plagnioj, tomi.valkeinen
  Cc: linux-fbdev, luto, cocci, Luis R. Rodriguez, Jingoo Han,
	Geert Uytterhoeven, Rob Clark, Benoit Taine, Suresh Siddha,
	Ingo Molnar, Thomas Gleixner, Juergen Gross, Daniel Vetter,
	Dave Airlie, Antonino Daplas, linux-kernel

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e 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: Bjorn Helgaas <bhelgaas@google.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Benoit Taine <benoit.taine@lip6.fr>
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: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/i740fb.c | 35 ++++++-----------------------------
 1 file changed, 6 insertions(+), 29 deletions(-)

diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c
index a2b4204..452e116 100644
--- a/drivers/video/fbdev/i740fb.c
+++ b/drivers/video/fbdev/i740fb.c
@@ -27,24 +27,15 @@
 #include <linux/console.h>
 #include <video/vga.h>
 
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
-
 #include "i740_reg.h"
 
 static char *mode_option;
-
-#ifdef CONFIG_MTRR
 static int mtrr = 1;
-#endif
 
 struct i740fb_par {
 	unsigned char __iomem *regs;
 	bool has_sgram;
-#ifdef CONFIG_MTRR
-	int mtrr_reg;
-#endif
+	int wc_cookie;
 	bool ddc_registered;
 	struct i2c_adapter ddc_adapter;
 	struct i2c_algo_bit_data ddc_algo;
@@ -1040,7 +1031,7 @@ static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 		goto err_request_regions;
 	}
 
-	info->screen_base = pci_ioremap_bar(dev, 0);
+	info->screen_base = pci_ioremap_wc_bar(dev, 0);
 	if (!info->screen_base) {
 		dev_err(info->device, "error remapping base\n");
 		ret = -ENOMEM;
@@ -1144,13 +1135,9 @@ static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 
 	fb_info(info, "%s frame buffer device\n", info->fix.id);
 	pci_set_drvdata(dev, info);
-#ifdef CONFIG_MTRR
-	if (mtrr) {
-		par->mtrr_reg = -1;
-		par->mtrr_reg = mtrr_add(info->fix.smem_start,
-				info->fix.smem_len, MTRR_TYPE_WRCOMB, 1);
-	}
-#endif
+	if (mtrr)
+		par->wc_cookie = arch_phys_wc_add(info->fix.smem_start,
+						  info->fix.smem_len);
 	return 0;
 
 err_reg_framebuffer:
@@ -1177,13 +1164,7 @@ static void i740fb_remove(struct pci_dev *dev)
 
 	if (info) {
 		struct i740fb_par *par = info->par;
-
-#ifdef CONFIG_MTRR
-		if (par->mtrr_reg >= 0) {
-			mtrr_del(par->mtrr_reg, 0, 0);
-			par->mtrr_reg = -1;
-		}
-#endif
+		arch_phys_wc_del(par->wc_cookie);
 		unregister_framebuffer(info);
 		fb_dealloc_cmap(&info->cmap);
 		if (par->ddc_registered)
@@ -1287,10 +1268,8 @@ static int  __init i740fb_setup(char *options)
 	while ((opt = strsep(&options, ",")) != NULL) {
 		if (!*opt)
 			continue;
-#ifdef CONFIG_MTRR
 		else if (!strncmp(opt, "mtrr:", 5))
 			mtrr = simple_strtoul(opt + 5, NULL, 0);
-#endif
 		else
 			mode_option = opt;
 	}
@@ -1327,7 +1306,5 @@ MODULE_DESCRIPTION("fbdev driver for Intel740");
 module_param(mode_option, charp, 0444);
 MODULE_PARM_DESC(mode_option, "Default video mode ('640x480-8@60', etc)");
 
-#ifdef CONFIG_MTRR
 module_param(mtrr, int, 0444);
 MODULE_PARM_DESC(mtrr, "Enable write-combining with MTRR (1=enable, 0=disable, default=1)");
-#endif
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH v3 2/4] video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e 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: Bjorn Helgaas <bhelgaas@google.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Benoit Taine <benoit.taine@lip6.fr>
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: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/i740fb.c | 35 ++++++-----------------------------
 1 file changed, 6 insertions(+), 29 deletions(-)

diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c
index a2b4204..452e116 100644
--- a/drivers/video/fbdev/i740fb.c
+++ b/drivers/video/fbdev/i740fb.c
@@ -27,24 +27,15 @@
 #include <linux/console.h>
 #include <video/vga.h>
 
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
-
 #include "i740_reg.h"
 
 static char *mode_option;
-
-#ifdef CONFIG_MTRR
 static int mtrr = 1;
-#endif
 
 struct i740fb_par {
 	unsigned char __iomem *regs;
 	bool has_sgram;
-#ifdef CONFIG_MTRR
-	int mtrr_reg;
-#endif
+	int wc_cookie;
 	bool ddc_registered;
 	struct i2c_adapter ddc_adapter;
 	struct i2c_algo_bit_data ddc_algo;
@@ -1040,7 +1031,7 @@ static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 		goto err_request_regions;
 	}
 
-	info->screen_base = pci_ioremap_bar(dev, 0);
+	info->screen_base = pci_ioremap_wc_bar(dev, 0);
 	if (!info->screen_base) {
 		dev_err(info->device, "error remapping base\n");
 		ret = -ENOMEM;
@@ -1144,13 +1135,9 @@ static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 
 	fb_info(info, "%s frame buffer device\n", info->fix.id);
 	pci_set_drvdata(dev, info);
-#ifdef CONFIG_MTRR
-	if (mtrr) {
-		par->mtrr_reg = -1;
-		par->mtrr_reg = mtrr_add(info->fix.smem_start,
-				info->fix.smem_len, MTRR_TYPE_WRCOMB, 1);
-	}
-#endif
+	if (mtrr)
+		par->wc_cookie = arch_phys_wc_add(info->fix.smem_start,
+						  info->fix.smem_len);
 	return 0;
 
 err_reg_framebuffer:
@@ -1177,13 +1164,7 @@ static void i740fb_remove(struct pci_dev *dev)
 
 	if (info) {
 		struct i740fb_par *par = info->par;
-
-#ifdef CONFIG_MTRR
-		if (par->mtrr_reg >= 0) {
-			mtrr_del(par->mtrr_reg, 0, 0);
-			par->mtrr_reg = -1;
-		}
-#endif
+		arch_phys_wc_del(par->wc_cookie);
 		unregister_framebuffer(info);
 		fb_dealloc_cmap(&info->cmap);
 		if (par->ddc_registered)
@@ -1287,10 +1268,8 @@ static int  __init i740fb_setup(char *options)
 	while ((opt = strsep(&options, ",")) != NULL) {
 		if (!*opt)
 			continue;
-#ifdef CONFIG_MTRR
 		else if (!strncmp(opt, "mtrr:", 5))
 			mtrr = simple_strtoul(opt + 5, NULL, 0);
-#endif
 		else
 			mode_option = opt;
 	}
@@ -1327,7 +1306,5 @@ MODULE_DESCRIPTION("fbdev driver for Intel740");
 module_param(mode_option, charp, 0444);
 MODULE_PARM_DESC(mode_option, "Default video mode ('640x480-8@60', etc)");
 
-#ifdef CONFIG_MTRR
 module_param(mtrr, int, 0444);
 MODULE_PARM_DESC(mtrr, "Enable write-combining with MTRR (1=enable, 0=disable, default=1)");
-#endif
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 2/4] video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e 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: Bjorn Helgaas <bhelgaas@google.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Benoit Taine <benoit.taine@lip6.fr>
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 at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/i740fb.c | 35 ++++++-----------------------------
 1 file changed, 6 insertions(+), 29 deletions(-)

diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c
index a2b4204..452e116 100644
--- a/drivers/video/fbdev/i740fb.c
+++ b/drivers/video/fbdev/i740fb.c
@@ -27,24 +27,15 @@
 #include <linux/console.h>
 #include <video/vga.h>
 
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
-
 #include "i740_reg.h"
 
 static char *mode_option;
-
-#ifdef CONFIG_MTRR
 static int mtrr = 1;
-#endif
 
 struct i740fb_par {
 	unsigned char __iomem *regs;
 	bool has_sgram;
-#ifdef CONFIG_MTRR
-	int mtrr_reg;
-#endif
+	int wc_cookie;
 	bool ddc_registered;
 	struct i2c_adapter ddc_adapter;
 	struct i2c_algo_bit_data ddc_algo;
@@ -1040,7 +1031,7 @@ static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 		goto err_request_regions;
 	}
 
-	info->screen_base = pci_ioremap_bar(dev, 0);
+	info->screen_base = pci_ioremap_wc_bar(dev, 0);
 	if (!info->screen_base) {
 		dev_err(info->device, "error remapping base\n");
 		ret = -ENOMEM;
@@ -1144,13 +1135,9 @@ static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 
 	fb_info(info, "%s frame buffer device\n", info->fix.id);
 	pci_set_drvdata(dev, info);
-#ifdef CONFIG_MTRR
-	if (mtrr) {
-		par->mtrr_reg = -1;
-		par->mtrr_reg = mtrr_add(info->fix.smem_start,
-				info->fix.smem_len, MTRR_TYPE_WRCOMB, 1);
-	}
-#endif
+	if (mtrr)
+		par->wc_cookie = arch_phys_wc_add(info->fix.smem_start,
+						  info->fix.smem_len);
 	return 0;
 
 err_reg_framebuffer:
@@ -1177,13 +1164,7 @@ static void i740fb_remove(struct pci_dev *dev)
 
 	if (info) {
 		struct i740fb_par *par = info->par;
-
-#ifdef CONFIG_MTRR
-		if (par->mtrr_reg >= 0) {
-			mtrr_del(par->mtrr_reg, 0, 0);
-			par->mtrr_reg = -1;
-		}
-#endif
+		arch_phys_wc_del(par->wc_cookie);
 		unregister_framebuffer(info);
 		fb_dealloc_cmap(&info->cmap);
 		if (par->ddc_registered)
@@ -1287,10 +1268,8 @@ static int  __init i740fb_setup(char *options)
 	while ((opt = strsep(&options, ",")) != NULL) {
 		if (!*opt)
 			continue;
-#ifdef CONFIG_MTRR
 		else if (!strncmp(opt, "mtrr:", 5))
 			mtrr = simple_strtoul(opt + 5, NULL, 0);
-#endif
 		else
 			mode_option = opt;
 	}
@@ -1327,7 +1306,5 @@ MODULE_DESCRIPTION("fbdev driver for Intel740");
 module_param(mode_option, charp, 0444);
 MODULE_PARM_DESC(mode_option, "Default video mode ('640x480-8 at 60', etc)");
 
-#ifdef CONFIG_MTRR
 module_param(mtrr, int, 0444);
 MODULE_PARM_DESC(mtrr, "Enable write-combining with MTRR (1=enable, 0=disable, default=1)");
-#endif
-- 
2.3.2.209.gd67f9d5.dirty

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH v3 3/4] video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
  2015-04-21 20:20 ` Luis R. Rodriguez
  (?)
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: bhelgaas, mst, plagnioj, tomi.valkeinen
  Cc: linux-fbdev, luto, cocci, Luis R. Rodriguez, Jingoo Han,
	Geert Uytterhoeven, Laurent Pinchart, Suresh Siddha, Ingo Molnar,
	Thomas Gleixner, Juergen Gross, Daniel Vetter, Dave Airlie,
	Antonino Daplas, linux-kernel

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e 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: Geert Uytterhoeven <geert@linux-m68k.org>
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: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
 include/video/kyro.h             |  4 +---
 2 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c
index 65041e1..5bb0153 100644
--- a/drivers/video/fbdev/kyro/fbdev.c
+++ b/drivers/video/fbdev/kyro/fbdev.c
@@ -22,9 +22,6 @@
 #include <linux/pci.h>
 #include <asm/io.h>
 #include <linux/uaccess.h>
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
 
 #include <video/kyro.h>
 
@@ -84,9 +81,7 @@ static device_info_t deviceInfo;
 static char *mode_option = NULL;
 static int nopan = 0;
 static int nowrap = 1;
-#ifdef CONFIG_MTRR
 static int nomtrr = 0;
-#endif
 
 /* PCI driver prototypes */
 static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -570,10 +565,8 @@ static int __init kyrofb_setup(char *options)
 			nopan = 1;
 		} else if (strcmp(this_opt, "nowrap") == 0) {
 			nowrap = 1;
-#ifdef CONFIG_MTRR
 		} else if (strcmp(this_opt, "nomtrr") == 0) {
 			nomtrr = 1;
-#endif
 		} else {
 			mode_option = this_opt;
 		}
@@ -691,17 +684,16 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	currentpar->regbase = deviceInfo.pSTGReg =
 		ioremap_nocache(kyro_fix.mmio_start, kyro_fix.mmio_len);
+	if (!currentpar->regbase)
+		goto out_free_fb;
 
-	info->screen_base = ioremap_nocache(kyro_fix.smem_start,
-					    kyro_fix.smem_len);
+	info->screen_base = pci_ioremap_wc_bar(pdev, 0);
+	if (!info->screen_base)
+		goto out_unmap_regs;
 
-#ifdef CONFIG_MTRR
 	if (!nomtrr)
-		currentpar->mtrr_handle =
-			mtrr_add(kyro_fix.smem_start,
-				 kyro_fix.smem_len,
-				 MTRR_TYPE_WRCOMB, 1);
-#endif
+		currentpar->wc_cookie = arch_phys_wc_add(kyro_fix.smem_start,
+							 kyro_fix.smem_len);
 
 	kyro_fix.ypanstep	= nopan ? 0 : 1;
 	kyro_fix.ywrapstep	= nowrap ? 0 : 1;
@@ -745,8 +737,10 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 
 out_unmap:
-	iounmap(currentpar->regbase);
 	iounmap(info->screen_base);
+out_unmap_regs:
+	iounmap(currentpar->regbase);
+out_free_fb:
 	framebuffer_release(info);
 
 	return -EINVAL;
@@ -770,12 +764,7 @@ static void kyrofb_remove(struct pci_dev *pdev)
 	iounmap(info->screen_base);
 	iounmap(par->regbase);
 
-#ifdef CONFIG_MTRR
-	if (par->mtrr_handle)
-		mtrr_del(par->mtrr_handle,
-			 info->fix.smem_start,
-			 info->fix.smem_len);
-#endif
+	arch_phys_wc_del(par->wc_cookie);
 
 	unregister_framebuffer(info);
 	framebuffer_release(info);
diff --git a/include/video/kyro.h b/include/video/kyro.h
index c563968..b958c2e 100644
--- a/include/video/kyro.h
+++ b/include/video/kyro.h
@@ -35,9 +35,7 @@ struct kyrofb_info {
 	/* Useful to hold depth here for Linux */
 	u8 PIXDEPTH;
 
-#ifdef CONFIG_MTRR
-	int mtrr_handle;
-#endif
+	int wc_cookie;
 };
 
 extern int kyro_dev_init(void);
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH v3 3/4] video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e 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: Geert Uytterhoeven <geert@linux-m68k.org>
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: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
 include/video/kyro.h             |  4 +---
 2 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c
index 65041e1..5bb0153 100644
--- a/drivers/video/fbdev/kyro/fbdev.c
+++ b/drivers/video/fbdev/kyro/fbdev.c
@@ -22,9 +22,6 @@
 #include <linux/pci.h>
 #include <asm/io.h>
 #include <linux/uaccess.h>
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
 
 #include <video/kyro.h>
 
@@ -84,9 +81,7 @@ static device_info_t deviceInfo;
 static char *mode_option = NULL;
 static int nopan = 0;
 static int nowrap = 1;
-#ifdef CONFIG_MTRR
 static int nomtrr = 0;
-#endif
 
 /* PCI driver prototypes */
 static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -570,10 +565,8 @@ static int __init kyrofb_setup(char *options)
 			nopan = 1;
 		} else if (strcmp(this_opt, "nowrap") = 0) {
 			nowrap = 1;
-#ifdef CONFIG_MTRR
 		} else if (strcmp(this_opt, "nomtrr") = 0) {
 			nomtrr = 1;
-#endif
 		} else {
 			mode_option = this_opt;
 		}
@@ -691,17 +684,16 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	currentpar->regbase = deviceInfo.pSTGReg  		ioremap_nocache(kyro_fix.mmio_start, kyro_fix.mmio_len);
+	if (!currentpar->regbase)
+		goto out_free_fb;
 
-	info->screen_base = ioremap_nocache(kyro_fix.smem_start,
-					    kyro_fix.smem_len);
+	info->screen_base = pci_ioremap_wc_bar(pdev, 0);
+	if (!info->screen_base)
+		goto out_unmap_regs;
 
-#ifdef CONFIG_MTRR
 	if (!nomtrr)
-		currentpar->mtrr_handle -			mtrr_add(kyro_fix.smem_start,
-				 kyro_fix.smem_len,
-				 MTRR_TYPE_WRCOMB, 1);
-#endif
+		currentpar->wc_cookie = arch_phys_wc_add(kyro_fix.smem_start,
+							 kyro_fix.smem_len);
 
 	kyro_fix.ypanstep	= nopan ? 0 : 1;
 	kyro_fix.ywrapstep	= nowrap ? 0 : 1;
@@ -745,8 +737,10 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 
 out_unmap:
-	iounmap(currentpar->regbase);
 	iounmap(info->screen_base);
+out_unmap_regs:
+	iounmap(currentpar->regbase);
+out_free_fb:
 	framebuffer_release(info);
 
 	return -EINVAL;
@@ -770,12 +764,7 @@ static void kyrofb_remove(struct pci_dev *pdev)
 	iounmap(info->screen_base);
 	iounmap(par->regbase);
 
-#ifdef CONFIG_MTRR
-	if (par->mtrr_handle)
-		mtrr_del(par->mtrr_handle,
-			 info->fix.smem_start,
-			 info->fix.smem_len);
-#endif
+	arch_phys_wc_del(par->wc_cookie);
 
 	unregister_framebuffer(info);
 	framebuffer_release(info);
diff --git a/include/video/kyro.h b/include/video/kyro.h
index c563968..b958c2e 100644
--- a/include/video/kyro.h
+++ b/include/video/kyro.h
@@ -35,9 +35,7 @@ struct kyrofb_info {
 	/* Useful to hold depth here for Linux */
 	u8 PIXDEPTH;
 
-#ifdef CONFIG_MTRR
-	int mtrr_handle;
-#endif
+	int wc_cookie;
 };
 
 extern int kyro_dev_init(void);
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 3/4] video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e 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: Geert Uytterhoeven <geert@linux-m68k.org>
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 at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
 include/video/kyro.h             |  4 +---
 2 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c
index 65041e1..5bb0153 100644
--- a/drivers/video/fbdev/kyro/fbdev.c
+++ b/drivers/video/fbdev/kyro/fbdev.c
@@ -22,9 +22,6 @@
 #include <linux/pci.h>
 #include <asm/io.h>
 #include <linux/uaccess.h>
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
 
 #include <video/kyro.h>
 
@@ -84,9 +81,7 @@ static device_info_t deviceInfo;
 static char *mode_option = NULL;
 static int nopan = 0;
 static int nowrap = 1;
-#ifdef CONFIG_MTRR
 static int nomtrr = 0;
-#endif
 
 /* PCI driver prototypes */
 static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -570,10 +565,8 @@ static int __init kyrofb_setup(char *options)
 			nopan = 1;
 		} else if (strcmp(this_opt, "nowrap") == 0) {
 			nowrap = 1;
-#ifdef CONFIG_MTRR
 		} else if (strcmp(this_opt, "nomtrr") == 0) {
 			nomtrr = 1;
-#endif
 		} else {
 			mode_option = this_opt;
 		}
@@ -691,17 +684,16 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	currentpar->regbase = deviceInfo.pSTGReg =
 		ioremap_nocache(kyro_fix.mmio_start, kyro_fix.mmio_len);
+	if (!currentpar->regbase)
+		goto out_free_fb;
 
-	info->screen_base = ioremap_nocache(kyro_fix.smem_start,
-					    kyro_fix.smem_len);
+	info->screen_base = pci_ioremap_wc_bar(pdev, 0);
+	if (!info->screen_base)
+		goto out_unmap_regs;
 
-#ifdef CONFIG_MTRR
 	if (!nomtrr)
-		currentpar->mtrr_handle =
-			mtrr_add(kyro_fix.smem_start,
-				 kyro_fix.smem_len,
-				 MTRR_TYPE_WRCOMB, 1);
-#endif
+		currentpar->wc_cookie = arch_phys_wc_add(kyro_fix.smem_start,
+							 kyro_fix.smem_len);
 
 	kyro_fix.ypanstep	= nopan ? 0 : 1;
 	kyro_fix.ywrapstep	= nowrap ? 0 : 1;
@@ -745,8 +737,10 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 
 out_unmap:
-	iounmap(currentpar->regbase);
 	iounmap(info->screen_base);
+out_unmap_regs:
+	iounmap(currentpar->regbase);
+out_free_fb:
 	framebuffer_release(info);
 
 	return -EINVAL;
@@ -770,12 +764,7 @@ static void kyrofb_remove(struct pci_dev *pdev)
 	iounmap(info->screen_base);
 	iounmap(par->regbase);
 
-#ifdef CONFIG_MTRR
-	if (par->mtrr_handle)
-		mtrr_del(par->mtrr_handle,
-			 info->fix.smem_start,
-			 info->fix.smem_len);
-#endif
+	arch_phys_wc_del(par->wc_cookie);
 
 	unregister_framebuffer(info);
 	framebuffer_release(info);
diff --git a/include/video/kyro.h b/include/video/kyro.h
index c563968..b958c2e 100644
--- a/include/video/kyro.h
+++ b/include/video/kyro.h
@@ -35,9 +35,7 @@ struct kyrofb_info {
 	/* Useful to hold depth here for Linux */
 	u8 PIXDEPTH;
 
-#ifdef CONFIG_MTRR
-	int mtrr_handle;
-#endif
+	int wc_cookie;
 };
 
 extern int kyro_dev_init(void);
-- 
2.3.2.209.gd67f9d5.dirty

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH v3 4/4] video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
  2015-04-21 20:20 ` Luis R. Rodriguez
  (?)
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: bhelgaas, mst, plagnioj, tomi.valkeinen
  Cc: linux-fbdev, luto, cocci, Luis R. Rodriguez, Laurent Pinchart,
	Rob Clark, Geert Uytterhoeven, Suresh Siddha, Ingo Molnar,
	Thomas Gleixner, Juergen Gross, Daniel Vetter, Dave Airlie,
	Antonino Daplas, linux-kernel

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e titled "x86 PAT: fix performance drop for glx,
   use UC minus for ioremap(), ioremap_nocache() and
   pci_mmap_page_range()")

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
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: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/gxt4500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/gxt4500.c b/drivers/video/fbdev/gxt4500.c
index 135d78a..f19133a 100644
--- a/drivers/video/fbdev/gxt4500.c
+++ b/drivers/video/fbdev/gxt4500.c
@@ -662,7 +662,7 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	info->fix.smem_start = fb_phys;
 	info->fix.smem_len = pci_resource_len(pdev, 1);
-	info->screen_base = pci_ioremap_bar(pdev, 1);
+	info->screen_base = pci_ioremap_wc_bar(pdev, 1);
 	if (!info->screen_base) {
 		dev_err(&pdev->dev, "gxt4500: cannot map framebuffer\n");
 		goto err_unmap_regs;
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH v3 4/4] video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e titled "x86 PAT: fix performance drop for glx,
   use UC minus for ioremap(), ioremap_nocache() and
   pci_mmap_page_range()")

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
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: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/gxt4500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/gxt4500.c b/drivers/video/fbdev/gxt4500.c
index 135d78a..f19133a 100644
--- a/drivers/video/fbdev/gxt4500.c
+++ b/drivers/video/fbdev/gxt4500.c
@@ -662,7 +662,7 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	info->fix.smem_start = fb_phys;
 	info->fix.smem_len = pci_resource_len(pdev, 1);
-	info->screen_base = pci_ioremap_bar(pdev, 1);
+	info->screen_base = pci_ioremap_wc_bar(pdev, 1);
 	if (!info->screen_base) {
 		dev_err(&pdev->dev, "gxt4500: cannot map framebuffer\n");
 		goto err_unmap_regs;
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 4/4] video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
@ 2015-04-21 20:20   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:20 UTC (permalink / raw)
  To: cocci

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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
   de33c442e titled "x86 PAT: fix performance drop for glx,
   use UC minus for ioremap(), ioremap_nocache() and
   pci_mmap_page_range()")

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
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 at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/gxt4500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/gxt4500.c b/drivers/video/fbdev/gxt4500.c
index 135d78a..f19133a 100644
--- a/drivers/video/fbdev/gxt4500.c
+++ b/drivers/video/fbdev/gxt4500.c
@@ -662,7 +662,7 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	info->fix.smem_start = fb_phys;
 	info->fix.smem_len = pci_resource_len(pdev, 1);
-	info->screen_base = pci_ioremap_bar(pdev, 1);
+	info->screen_base = pci_ioremap_wc_bar(pdev, 1);
 	if (!info->screen_base) {
 		dev_err(&pdev->dev, "gxt4500: cannot map framebuffer\n");
 		goto err_unmap_regs;
-- 
2.3.2.209.gd67f9d5.dirty

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-04-21 20:20 ` Luis R. Rodriguez
@ 2015-04-29 21:08   ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-29 21:08 UTC (permalink / raw)
  To: cocci

On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> This series adds pci_ioremap_wc_bar() and makes use of it
> on a few framebuffer device drivers.
>
> Luis R. Rodriguez (4):
>   pci: add pci_ioremap_wc_bar()
>   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer

Bjorn,

any feedback on this series?

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-04-29 21:08   ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-04-29 21:08 UTC (permalink / raw)
  To: cocci

On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> This series adds pci_ioremap_wc_bar() and makes use of it
> on a few framebuffer device drivers.
>
> Luis R. Rodriguez (4):
>   pci: add pci_ioremap_wc_bar()
>   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer

Bjorn,

any feedback on this series?

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-04-29 21:08   ` [Cocci] " Luis R. Rodriguez
@ 2015-05-19 17:53     ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-19 17:53 UTC (permalink / raw)
  To: cocci

On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
> <mcgrof@do-not-panic.com> wrote:
> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >
> > This series adds pci_ioremap_wc_bar() and makes use of it
> > on a few framebuffer device drivers.
> >
> > Luis R. Rodriguez (4):
> >   pci: add pci_ioremap_wc_bar()
> >   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
> 
> Bjorn,
> 
> any feedback on this series?

Hey Bjorn, any feedback on this series ?

  Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-05-19 17:53     ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-19 17:53 UTC (permalink / raw)
  To: cocci

On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
> <mcgrof@do-not-panic.com> wrote:
> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >
> > This series adds pci_ioremap_wc_bar() and makes use of it
> > on a few framebuffer device drivers.
> >
> > Luis R. Rodriguez (4):
> >   pci: add pci_ioremap_wc_bar()
> >   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
> 
> Bjorn,
> 
> any feedback on this series?

Hey Bjorn, any feedback on this series ?

  Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-05-19 17:53     ` [Cocci] " Luis R. Rodriguez
@ 2015-05-20 20:54       ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-20 20:54 UTC (permalink / raw)
  To: cocci

On Tue, May 19, 2015 at 10:53 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
>> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
>> <mcgrof@do-not-panic.com> wrote:
>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
>> >
>> > This series adds pci_ioremap_wc_bar() and makes use of it
>> > on a few framebuffer device drivers.
>> >
>> > Luis R. Rodriguez (4):
>> >   pci: add pci_ioremap_wc_bar()
>> >   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>> >   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>> >   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
>>
>> Bjorn,
>>
>> any feedback on this series?
>
> Hey Bjorn, any feedback on this series ?

I meant this series. Also Tomi, do I get your Acks for these as well?
Since they depend on pci parts do you mind if we route them through
the PCI tree? I'll poke you soon about another similar type of patch
which has dependencies on another development tree.

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-05-20 20:54       ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-20 20:54 UTC (permalink / raw)
  To: cocci

On Tue, May 19, 2015 at 10:53 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
>> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
>> <mcgrof@do-not-panic.com> wrote:
>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
>> >
>> > This series adds pci_ioremap_wc_bar() and makes use of it
>> > on a few framebuffer device drivers.
>> >
>> > Luis R. Rodriguez (4):
>> >   pci: add pci_ioremap_wc_bar()
>> >   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>> >   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>> >   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
>>
>> Bjorn,
>>
>> any feedback on this series?
>
> Hey Bjorn, any feedback on this series ?

I meant this series. Also Tomi, do I get your Acks for these as well?
Since they depend on pci parts do you mind if we route them through
the PCI tree? I'll poke you soon about another similar type of patch
which has dependencies on another development tree.

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH v3 1/4] pci: add pci_ioremap_wc_bar()
  2015-04-21 20:20   ` Luis R. Rodriguez
@ 2015-05-20 21:02     ` Bjorn Helgaas
  -1 siblings, 0 replies; 39+ messages in thread
From: Bjorn Helgaas @ 2015-05-20 21:02 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: mst, plagnioj, tomi.valkeinen, linux-fbdev, luto, cocci,
	Luis R. Rodriguez, Toshi Kani, Suresh Siddha, Ingo Molnar,
	Thomas Gleixner, Juergen Gross, Daniel Vetter, Dave Airlie,
	Antonino Daplas, Ville Syrjälä,
	Mel Gorman, Vlastimil Babka, Borislav Petkov, Davidlohr Bueso,
	linux-kernel

On Tue, Apr 21, 2015 at 01:20:31PM -0700, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> 
> This lets drivers take advantage of PAT when available. This
> should help with the transition of converting video drivers over
> to ioremap_wc() to help with the goal of eventually using
> _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on
> ioremap_nocache() (de33c442e titled "x86 PAT: fix performance
> drop for glx, use UC minus for ioremap(), ioremap_nocache() and
> pci_mmap_page_range()")
> 
> Cc: Toshi Kani <toshi.kani@hp.com>
> Cc: Bjorn Helgaas <bhelgaas@google.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: Ville Syrjälä <syrjala@sci.fi>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Davidlohr Bueso <dbueso@suse.de>
> Cc: linux-fbdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>

I don't have any objection to this, and I can apply the follow-on patches
as well, given the appropriate acks and prerequisite patches (ioremap_wc()
implementation).

> ---
>  drivers/pci/pci.c   | 14 ++++++++++++++
>  include/linux/pci.h |  1 +
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 687af72..fd14f10 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -138,6 +138,20 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
>  	return ioremap_nocache(res->start, resource_size(res));
>  }
>  EXPORT_SYMBOL_GPL(pci_ioremap_bar);
> +
> +void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar)
> +{
> +	/*
> +	 * Make sure the BAR is actually a memory resource, not an IO resource
> +	 */
> +	if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
> +		WARN_ON(1);
> +		return NULL;
> +	}
> +	return ioremap_wc(pci_resource_start(pdev, bar),
> +			  pci_resource_len(pdev, bar));
> +}
> +EXPORT_SYMBOL_GPL(pci_ioremap_wc_bar);
>  #endif
>  
>  #define PCI_FIND_CAP_TTL	48
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index bc50bb0..490ca41 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1667,6 +1667,7 @@ static inline void pci_mmcfg_late_init(void) { }
>  int pci_ext_cfg_avail(void);
>  
>  void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
> +void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar);
>  
>  #ifdef CONFIG_PCI_IOV
>  int pci_iov_virtfn_bus(struct pci_dev *dev, int id);
> -- 
> 2.3.2.209.gd67f9d5.dirty
> 

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH v3 1/4] pci: add pci_ioremap_wc_bar()
@ 2015-05-20 21:02     ` Bjorn Helgaas
  0 siblings, 0 replies; 39+ messages in thread
From: Bjorn Helgaas @ 2015-05-20 21:02 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: mst, plagnioj, tomi.valkeinen, linux-fbdev, luto, cocci,
	Luis R. Rodriguez, Toshi Kani, Suresh Siddha, Ingo Molnar,
	Thomas Gleixner, Juergen Gross, Daniel Vetter, Dave Airlie,
	Antonino Daplas, Ville Syrjälä,
	Mel Gorman, Vlastimil Babka, Borislav Petkov, Davidlohr Bueso,
	linux-kernel

On Tue, Apr 21, 2015 at 01:20:31PM -0700, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> 
> This lets drivers take advantage of PAT when available. This
> should help with the transition of converting video drivers over
> to ioremap_wc() to help with the goal of eventually using
> _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on
> ioremap_nocache() (de33c442e titled "x86 PAT: fix performance
> drop for glx, use UC minus for ioremap(), ioremap_nocache() and
> pci_mmap_page_range()")
> 
> Cc: Toshi Kani <toshi.kani@hp.com>
> Cc: Bjorn Helgaas <bhelgaas@google.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: Ville Syrjälä <syrjala@sci.fi>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Davidlohr Bueso <dbueso@suse.de>
> Cc: linux-fbdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>

I don't have any objection to this, and I can apply the follow-on patches
as well, given the appropriate acks and prerequisite patches (ioremap_wc()
implementation).

> ---
>  drivers/pci/pci.c   | 14 ++++++++++++++
>  include/linux/pci.h |  1 +
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 687af72..fd14f10 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -138,6 +138,20 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
>  	return ioremap_nocache(res->start, resource_size(res));
>  }
>  EXPORT_SYMBOL_GPL(pci_ioremap_bar);
> +
> +void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar)
> +{
> +	/*
> +	 * Make sure the BAR is actually a memory resource, not an IO resource
> +	 */
> +	if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
> +		WARN_ON(1);
> +		return NULL;
> +	}
> +	return ioremap_wc(pci_resource_start(pdev, bar),
> +			  pci_resource_len(pdev, bar));
> +}
> +EXPORT_SYMBOL_GPL(pci_ioremap_wc_bar);
>  #endif
>  
>  #define PCI_FIND_CAP_TTL	48
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index bc50bb0..490ca41 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1667,6 +1667,7 @@ static inline void pci_mmcfg_late_init(void) { }
>  int pci_ext_cfg_avail(void);
>  
>  void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
> +void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar);
>  
>  #ifdef CONFIG_PCI_IOV
>  int pci_iov_virtfn_bus(struct pci_dev *dev, int id);
> -- 
> 2.3.2.209.gd67f9d5.dirty
> 

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH v3 1/4] pci: add pci_ioremap_wc_bar()
  2015-05-20 21:02     ` Bjorn Helgaas
@ 2015-05-20 21:06       ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-20 21:06 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Michael S. Tsirkin, Jean-Christophe Plagniol-Villard,
	Tomi Valkeinen, linux-fbdev, Andy Lutomirski, cocci, Toshi Kani,
	Suresh Siddha, Ingo Molnar, Thomas Gleixner, Juergen Gross,
	Daniel Vetter, Dave Airlie, Antonino Daplas,
	Ville Syrjälä,
	Mel Gorman, Vlastimil Babka, Borislav Petkov, Davidlohr Bueso,
	linux-kernel

On Wed, May 20, 2015 at 2:02 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Apr 21, 2015 at 01:20:31PM -0700, Luis R. Rodriguez wrote:
>> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>>
>> This lets drivers take advantage of PAT when available. This
>> should help with the transition of converting video drivers over
>> to ioremap_wc() to help with the goal of eventually using
>> _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on
>> ioremap_nocache() (de33c442e titled "x86 PAT: fix performance
>> drop for glx, use UC minus for ioremap(), ioremap_nocache() and
>> pci_mmap_page_range()")
>>
>> Cc: Toshi Kani <toshi.kani@hp.com>
>> Cc: Bjorn Helgaas <bhelgaas@google.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: Ville Syrjälä <syrjala@sci.fi>
>> Cc: Mel Gorman <mgorman@suse.de>
>> Cc: Vlastimil Babka <vbabka@suse.cz>
>> Cc: Borislav Petkov <bp@suse.de>
>> Cc: Davidlohr Bueso <dbueso@suse.de>
>> Cc: linux-fbdev@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
>
> I don't have any objection to this, and I can apply the follow-on patches
> as well, given the appropriate acks and prerequisite patches (ioremap_wc()
> implementation).

OK great, ioremap_wc() has been upstream for a long time. So I'll wait
for Tomi's review of the fbdev changes. Once I get those I can resend
in a series bundled together with the other pending pci / fbdev
changes we just discussed to make things clear.

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH v3 1/4] pci: add pci_ioremap_wc_bar()
@ 2015-05-20 21:06       ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-20 21:06 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Michael S. Tsirkin, Jean-Christophe Plagniol-Villard,
	Tomi Valkeinen, linux-fbdev, Andy Lutomirski, cocci, Toshi Kani,
	Suresh Siddha, Ingo Molnar, Thomas Gleixner, Juergen Gross,
	Daniel Vetter, Dave Airlie, Antonino Daplas,
	Ville Syrjälä,
	Mel Gorman, Vlastimil Babka, Borislav Petkov, Davidlohr Bueso,
	linux-kernel

On Wed, May 20, 2015 at 2:02 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Apr 21, 2015 at 01:20:31PM -0700, Luis R. Rodriguez wrote:
>> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>>
>> This lets drivers take advantage of PAT when available. This
>> should help with the transition of converting video drivers over
>> to ioremap_wc() to help with the goal of eventually using
>> _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on
>> ioremap_nocache() (de33c442e titled "x86 PAT: fix performance
>> drop for glx, use UC minus for ioremap(), ioremap_nocache() and
>> pci_mmap_page_range()")
>>
>> Cc: Toshi Kani <toshi.kani@hp.com>
>> Cc: Bjorn Helgaas <bhelgaas@google.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: Ville Syrjälä <syrjala@sci.fi>
>> Cc: Mel Gorman <mgorman@suse.de>
>> Cc: Vlastimil Babka <vbabka@suse.cz>
>> Cc: Borislav Petkov <bp@suse.de>
>> Cc: Davidlohr Bueso <dbueso@suse.de>
>> Cc: linux-fbdev@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
>
> I don't have any objection to this, and I can apply the follow-on patches
> as well, given the appropriate acks and prerequisite patches (ioremap_wc()
> implementation).

OK great, ioremap_wc() has been upstream for a long time. So I'll wait
for Tomi's review of the fbdev changes. Once I get those I can resend
in a series bundled together with the other pending pci / fbdev
changes we just discussed to make things clear.

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-05-20 20:54       ` Luis R. Rodriguez
@ 2015-05-21 21:23         ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-21 21:23 UTC (permalink / raw)
  To: cocci

On Wed, May 20, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> On Tue, May 19, 2015 at 10:53 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
>> On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
>>> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
>>> <mcgrof@do-not-panic.com> wrote:
>>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
>>> >
>>> > This series adds pci_ioremap_wc_bar() and makes use of it
>>> > on a few framebuffer device drivers.
>>> >
>>> > Luis R. Rodriguez (4):
>>> >   pci: add pci_ioremap_wc_bar()
>>> >   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>>> >   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>>> >   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
>>>
>>> Bjorn,
>>>
>>> any feedback on this series?
>>
>> Hey Bjorn, any feedback on this series ?
>
> I meant this series. Also Tomi, do I get your Acks for these as well?
> Since they depend on pci parts do you mind if we route them through
> the PCI tree? I'll poke you soon about another similar type of patch
> which has dependencies on another development tree.

Bjorn, Tomi, please let me know if this series is OK, if so I'll
resubmit rebased onto Bjorn's pci tree.

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-05-21 21:23         ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-21 21:23 UTC (permalink / raw)
  To: cocci

On Wed, May 20, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> On Tue, May 19, 2015 at 10:53 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
>> On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
>>> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
>>> <mcgrof@do-not-panic.com> wrote:
>>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
>>> >
>>> > This series adds pci_ioremap_wc_bar() and makes use of it
>>> > on a few framebuffer device drivers.
>>> >
>>> > Luis R. Rodriguez (4):
>>> >   pci: add pci_ioremap_wc_bar()
>>> >   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>>> >   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>>> >   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
>>>
>>> Bjorn,
>>>
>>> any feedback on this series?
>>
>> Hey Bjorn, any feedback on this series ?
>
> I meant this series. Also Tomi, do I get your Acks for these as well?
> Since they depend on pci parts do you mind if we route them through
> the PCI tree? I'll poke you soon about another similar type of patch
> which has dependencies on another development tree.

Bjorn, Tomi, please let me know if this series is OK, if so I'll
resubmit rebased onto Bjorn's pci tree.

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-04-21 20:20 ` Luis R. Rodriguez
                   ` (6 preceding siblings ...)
  (?)
@ 2015-05-26  8:03 ` Tomi Valkeinen
  2015-05-26 19:49     ` [Cocci] " Luis R. Rodriguez
  -1 siblings, 1 reply; 39+ messages in thread
From: Tomi Valkeinen @ 2015-05-26  8:03 UTC (permalink / raw)
  To: linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

Hi Louis,

On 21/04/15 23:20, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> 
> This series adds pci_ioremap_wc_bar() and makes use of it
> on a few framebuffer device drivers.
> 
> Luis R. Rodriguez (4):
>   pci: add pci_ioremap_wc_bar()
>   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
> 
>  drivers/pci/pci.c                | 14 ++++++++++++++
>  drivers/video/fbdev/gxt4500.c    |  2 +-
>  drivers/video/fbdev/i740fb.c     | 35 ++++++-----------------------------
>  drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
>  include/linux/pci.h              |  1 +
>  include/video/kyro.h             |  4 +---
>  6 files changed, 34 insertions(+), 55 deletions(-)

About this and other related series: rather than having multiple
different patch series containing fbdev changes, going via separate
trees, I would very much prefer to get all the requisite pci/mtrr
related patches merged in the next merge window, and only then change
the fbdev drivers in one series, merged via fbdev tree.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-05-26  8:03 ` Tomi Valkeinen
@ 2015-05-26 19:49     ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-26 19:49 UTC (permalink / raw)
  To: cocci

On Tue, May 26, 2015 at 11:03:51AM +0300, Tomi Valkeinen wrote:
> Hi Louis,
> 
> On 21/04/15 23:20, Luis R. Rodriguez wrote:
> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> > 
> > This series adds pci_ioremap_wc_bar() and makes use of it
> > on a few framebuffer device drivers.
> > 
> > Luis R. Rodriguez (4):
> >   pci: add pci_ioremap_wc_bar()
> >   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
> > 
> >  drivers/pci/pci.c                | 14 ++++++++++++++
> >  drivers/video/fbdev/gxt4500.c    |  2 +-
> >  drivers/video/fbdev/i740fb.c     | 35 ++++++-----------------------------
> >  drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
> >  include/linux/pci.h              |  1 +
> >  include/video/kyro.h             |  4 +---
> >  6 files changed, 34 insertions(+), 55 deletions(-)
> 
> About this and other related series: rather than having multiple
> different patch series containing fbdev changes, going via separate
> trees, I would very much prefer to get all the requisite pci/mtrr
> related patches merged in the next merge window, and only then change
> the fbdev drivers in one series, merged via fbdev tree.

Tomi, OK, I'll ask Bjorn to drop the framebuffer driver specific changes on the
pci_iomap_wc() series then and wait until he takes only the bus specific
changes for this and the pci_iomap_wc() series. Likewise I  will wait for
the x86 require changes (ioremap_uc() and pat_enabled()) stuff to be exported
before sending you the changes required for the framebuffer tree.

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-05-26 19:49     ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-05-26 19:49 UTC (permalink / raw)
  To: cocci

On Tue, May 26, 2015 at 11:03:51AM +0300, Tomi Valkeinen wrote:
> Hi Louis,
> 
> On 21/04/15 23:20, Luis R. Rodriguez wrote:
> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> > 
> > This series adds pci_ioremap_wc_bar() and makes use of it
> > on a few framebuffer device drivers.
> > 
> > Luis R. Rodriguez (4):
> >   pci: add pci_ioremap_wc_bar()
> >   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
> > 
> >  drivers/pci/pci.c                | 14 ++++++++++++++
> >  drivers/video/fbdev/gxt4500.c    |  2 +-
> >  drivers/video/fbdev/i740fb.c     | 35 ++++++-----------------------------
> >  drivers/video/fbdev/kyro/fbdev.c | 33 +++++++++++----------------------
> >  include/linux/pci.h              |  1 +
> >  include/video/kyro.h             |  4 +---
> >  6 files changed, 34 insertions(+), 55 deletions(-)
> 
> About this and other related series: rather than having multiple
> different patch series containing fbdev changes, going via separate
> trees, I would very much prefer to get all the requisite pci/mtrr
> related patches merged in the next merge window, and only then change
> the fbdev drivers in one series, merged via fbdev tree.

Tomi, OK, I'll ask Bjorn to drop the framebuffer driver specific changes on the
pci_iomap_wc() series then and wait until he takes only the bus specific
changes for this and the pci_iomap_wc() series. Likewise I  will wait for
the x86 require changes (ioremap_uc() and pat_enabled()) stuff to be exported
before sending you the changes required for the framebuffer tree.

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-05-20 20:54       ` Luis R. Rodriguez
  (?)
  (?)
@ 2015-06-16  7:15       ` Tomi Valkeinen
  2015-06-16 19:05           ` Luis R. Rodriguez
  -1 siblings, 1 reply; 39+ messages in thread
From: Tomi Valkeinen @ 2015-06-16  7:15 UTC (permalink / raw)
  To: linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]



On 22/05/15 00:23, Luis R. Rodriguez wrote:
> On Wed, May 20, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
>> On Tue, May 19, 2015 at 10:53 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
>>> On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
>>>> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
>>>> <mcgrof@do-not-panic.com> wrote:
>>>>> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>>>>>
>>>>> This series adds pci_ioremap_wc_bar() and makes use of it
>>>>> on a few framebuffer device drivers.
>>>>>
>>>>> Luis R. Rodriguez (4):
>>>>>   pci: add pci_ioremap_wc_bar()
>>>>>   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>>>>>   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
>>>>>   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
>>>>
>>>> Bjorn,
>>>>
>>>> any feedback on this series?
>>>
>>> Hey Bjorn, any feedback on this series ?
>>
>> I meant this series. Also Tomi, do I get your Acks for these as well?
>> Since they depend on pci parts do you mind if we route them through
>> the PCI tree? I'll poke you soon about another similar type of patch
>> which has dependencies on another development tree.
> 
> Bjorn, Tomi, please let me know if this series is OK, if so I'll
> resubmit rebased onto Bjorn's pci tree.

For the fbdev patches:

Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-06-16  7:15       ` Tomi Valkeinen
  2015-06-16 19:05           ` Luis R. Rodriguez
@ 2015-06-16 19:05           ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-06-16 19:05 UTC (permalink / raw)
  To: Tomi Valkeinen, Bjorn Helgaas
  Cc: Michael S. Tsirkin, Jean-Christophe Plagniol-Villard,
	Borislav Petkov, linux-fbdev, cocci, Andy Lutomirski, linux-pci

On Tue, Jun 16, 2015 at 10:15:38AM +0300, Tomi Valkeinen wrote:
> On 22/05/15 00:23, Luis R. Rodriguez wrote:
> > On Wed, May 20, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >> On Tue, May 19, 2015 at 10:53 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >>> On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
> >>>> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
> >>>> <mcgrof@do-not-panic.com> wrote:
> >>>>> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >>>>>
> >>>>> This series adds pci_ioremap_wc_bar() and makes use of it
> >>>>> on a few framebuffer device drivers.
> >>>>>
> >>>>> Luis R. Rodriguez (4):
> >>>>>   pci: add pci_ioremap_wc_bar()
> >>>>>   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >>>>>   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >>>>>   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
> >>>>
> >>>> Bjorn,
> >>>>
> >>>> any feedback on this series?
> >>>
> >>> Hey Bjorn, any feedback on this series ?
> >>
> >> I meant this series. Also Tomi, do I get your Acks for these as well?
> >> Since they depend on pci parts do you mind if we route them through
> >> the PCI tree? I'll poke you soon about another similar type of patch
> >> which has dependencies on another development tree.
> > 
> > Bjorn, Tomi, please let me know if this series is OK, if so I'll
> > resubmit rebased onto Bjorn's pci tree.
> 
> For the fbdev patches:
> 
> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Thanks Tomi,

there are two fbdev series that depend on PCI symbols I am introducing, this
series and the pci_iomap_wc() series [0]. You've now provided Acks for the fbdev
part of both series.

Can the fbdev parts go through Bjorn's tree? We last discussed if the series
was important to be fully merged or not by v4.2 and I recentlty provided a
long winded review of the entire series to help maintainers pick and choose
and decide [1].

Based on this can the fbdev patches from both of these series go through Bjorn's tree?
Another alternative that seems to be practiced for situations like this is for
most of the merge window to trickle in and then towards the end send dependent
API changes such as this one, but I think that would then have to go through
your tree and since I realize you are busy I am not sure if this would work
well to get this in, in time for v4.2.

[0] http://lkml.kernel.org/r/1430415364-19679-1-git-send-email-mcgrof@do-not-panic.com
[1] http://lkml.kernel.org/r/CAB=NE6UgtdSoBsA=8+ueYRAZHDnWUSmQAoHhAaefqudBrSY7Zw@mail.gmail.com

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-06-16 19:05           ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-06-16 19:05 UTC (permalink / raw)
  To: cocci

On Tue, Jun 16, 2015 at 10:15:38AM +0300, Tomi Valkeinen wrote:
> On 22/05/15 00:23, Luis R. Rodriguez wrote:
> > On Wed, May 20, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >> On Tue, May 19, 2015 at 10:53 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >>> On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
> >>>> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
> >>>> <mcgrof@do-not-panic.com> wrote:
> >>>>> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >>>>>
> >>>>> This series adds pci_ioremap_wc_bar() and makes use of it
> >>>>> on a few framebuffer device drivers.
> >>>>>
> >>>>> Luis R. Rodriguez (4):
> >>>>>   pci: add pci_ioremap_wc_bar()
> >>>>>   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >>>>>   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >>>>>   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
> >>>>
> >>>> Bjorn,
> >>>>
> >>>> any feedback on this series?
> >>>
> >>> Hey Bjorn, any feedback on this series ?
> >>
> >> I meant this series. Also Tomi, do I get your Acks for these as well?
> >> Since they depend on pci parts do you mind if we route them through
> >> the PCI tree? I'll poke you soon about another similar type of patch
> >> which has dependencies on another development tree.
> > 
> > Bjorn, Tomi, please let me know if this series is OK, if so I'll
> > resubmit rebased onto Bjorn's pci tree.
> 
> For the fbdev patches:
> 
> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Thanks Tomi,

there are two fbdev series that depend on PCI symbols I am introducing, this
series and the pci_iomap_wc() series [0]. You've now provided Acks for the fbdev
part of both series.

Can the fbdev parts go through Bjorn's tree? We last discussed if the series
was important to be fully merged or not by v4.2 and I recentlty provided a
long winded review of the entire series to help maintainers pick and choose
and decide [1].

Based on this can the fbdev patches from both of these series go through Bjorn's tree?
Another alternative that seems to be practiced for situations like this is for
most of the merge window to trickle in and then towards the end send dependent
API changes such as this one, but I think that would then have to go through
your tree and since I realize you are busy I am not sure if this would work
well to get this in, in time for v4.2.

[0] http://lkml.kernel.org/r/1430415364-19679-1-git-send-email-mcgrof@do-not-panic.com
[1] http://lkml.kernel.org/r/CAB=NE6UgtdSoBsA=8+ueYRAZHDnWUSmQAoHhAaefqudBrSY7Zw@mail.gmail.com

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-06-16 19:05           ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-06-16 19:05 UTC (permalink / raw)
  To: cocci

On Tue, Jun 16, 2015 at 10:15:38AM +0300, Tomi Valkeinen wrote:
> On 22/05/15 00:23, Luis R. Rodriguez wrote:
> > On Wed, May 20, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >> On Tue, May 19, 2015 at 10:53 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >>> On Wed, Apr 29, 2015 at 02:08:47PM -0700, Luis R. Rodriguez wrote:
> >>>> On Tue, Apr 21, 2015 at 1:20 PM, Luis R. Rodriguez
> >>>> <mcgrof@do-not-panic.com> wrote:
> >>>>> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >>>>>
> >>>>> This series adds pci_ioremap_wc_bar() and makes use of it
> >>>>> on a few framebuffer device drivers.
> >>>>>
> >>>>> Luis R. Rodriguez (4):
> >>>>>   pci: add pci_ioremap_wc_bar()
> >>>>>   video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >>>>>   video: fbdev: kyrofb: use arch_phys_wc_add() and pci_ioremap_wc_bar()
> >>>>>   video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer
> >>>>
> >>>> Bjorn,
> >>>>
> >>>> any feedback on this series?
> >>>
> >>> Hey Bjorn, any feedback on this series ?
> >>
> >> I meant this series. Also Tomi, do I get your Acks for these as well?
> >> Since they depend on pci parts do you mind if we route them through
> >> the PCI tree? I'll poke you soon about another similar type of patch
> >> which has dependencies on another development tree.
> > 
> > Bjorn, Tomi, please let me know if this series is OK, if so I'll
> > resubmit rebased onto Bjorn's pci tree.
> 
> For the fbdev patches:
> 
> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Thanks Tomi,

there are two fbdev series that depend on PCI symbols I am introducing, this
series and the pci_iomap_wc() series [0]. You've now provided Acks for the fbdev
part of both series.

Can the fbdev parts go through Bjorn's tree? We last discussed if the series
was important to be fully merged or not by v4.2 and I recentlty provided a
long winded review of the entire series to help maintainers pick and choose
and decide [1].

Based on this can the fbdev patches from both of these series go through Bjorn's tree?
Another alternative that seems to be practiced for situations like this is for
most of the merge window to trickle in and then towards the end send dependent
API changes such as this one, but I think that would then have to go through
your tree and since I realize you are busy I am not sure if this would work
well to get this in, in time for v4.2.

[0] http://lkml.kernel.org/r/1430415364-19679-1-git-send-email-mcgrof at do-not-panic.com
[1] http://lkml.kernel.org/r/CAB=NE6UgtdSoBsA=8+ueYRAZHDnWUSmQAoHhAaefqudBrSY7Zw at mail.gmail.com

 Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-06-16 19:05           ` Luis R. Rodriguez
@ 2015-06-17  6:05             ` Tomi Valkeinen
  -1 siblings, 0 replies; 39+ messages in thread
From: Tomi Valkeinen @ 2015-06-17  6:05 UTC (permalink / raw)
  To: Luis R. Rodriguez, Bjorn Helgaas
  Cc: Michael S. Tsirkin, Jean-Christophe Plagniol-Villard,
	Borislav Petkov, linux-fbdev, cocci, Andy Lutomirski, linux-pci

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

Hi Luis,

On 16/06/15 22:05, Luis R. Rodriguez wrote:

> Can the fbdev parts go through Bjorn's tree? We last discussed if the series
> was important to be fully merged or not by v4.2 and I recentlty provided a
> long winded review of the entire series to help maintainers pick and choose
> and decide [1].
> 
> Based on this can the fbdev patches from both of these series go through Bjorn's tree?

Yes, they can go through Bjorn's tree if there are no non-trivial
conflicts with the main fbdev stuff. linux-next should contain all the
fbdev patches going for 4.2.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-06-17  6:05             ` Tomi Valkeinen
  0 siblings, 0 replies; 39+ messages in thread
From: Tomi Valkeinen @ 2015-06-17  6:05 UTC (permalink / raw)
  To: Luis R. Rodriguez, Bjorn Helgaas
  Cc: Michael S. Tsirkin, Jean-Christophe Plagniol-Villard,
	Borislav Petkov, linux-fbdev, cocci, Andy Lutomirski, linux-pci

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

Hi Luis,

On 16/06/15 22:05, Luis R. Rodriguez wrote:

> Can the fbdev parts go through Bjorn's tree? We last discussed if the series
> was important to be fully merged or not by v4.2 and I recentlty provided a
> long winded review of the entire series to help maintainers pick and choose
> and decide [1].
> 
> Based on this can the fbdev patches from both of these series go through Bjorn's tree?

Yes, they can go through Bjorn's tree if there are no non-trivial
conflicts with the main fbdev stuff. linux-next should contain all the
fbdev patches going for 4.2.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
  2015-06-17  6:05             ` Tomi Valkeinen
  (?)
@ 2015-06-17 17:32               ` Luis R. Rodriguez
  -1 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-06-17 17:32 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Bjorn Helgaas, Michael S. Tsirkin,
	Jean-Christophe Plagniol-Villard, Borislav Petkov, linux-fbdev,
	cocci, Andy Lutomirski, linux-pci

On Wed, Jun 17, 2015 at 09:05:54AM +0300, Tomi Valkeinen wrote:
> Hi Luis,
> 
> On 16/06/15 22:05, Luis R. Rodriguez wrote:
> 
> > Can the fbdev parts go through Bjorn's tree? We last discussed if the series
> > was important to be fully merged or not by v4.2 and I recentlty provided a
> > long winded review of the entire series to help maintainers pick and choose
> > and decide [1].
> > 
> > Based on this can the fbdev patches from both of these series go through Bjorn's tree?
> 
> Yes, they can go through Bjorn's tree if there are no non-trivial
> conflicts with the main fbdev stuff. linux-next should contain all the
> fbdev patches going for 4.2.

Great, thanks Tomi.

  Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-06-17 17:32               ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-06-17 17:32 UTC (permalink / raw)
  To: cocci

On Wed, Jun 17, 2015 at 09:05:54AM +0300, Tomi Valkeinen wrote:
> Hi Luis,
> 
> On 16/06/15 22:05, Luis R. Rodriguez wrote:
> 
> > Can the fbdev parts go through Bjorn's tree? We last discussed if the series
> > was important to be fully merged or not by v4.2 and I recentlty provided a
> > long winded review of the entire series to help maintainers pick and choose
> > and decide [1].
> > 
> > Based on this can the fbdev patches from both of these series go through Bjorn's tree?
> 
> Yes, they can go through Bjorn's tree if there are no non-trivial
> conflicts with the main fbdev stuff. linux-next should contain all the
> fbdev patches going for 4.2.

Great, thanks Tomi.

  Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [Cocci] [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar()
@ 2015-06-17 17:32               ` Luis R. Rodriguez
  0 siblings, 0 replies; 39+ messages in thread
From: Luis R. Rodriguez @ 2015-06-17 17:32 UTC (permalink / raw)
  To: cocci

On Wed, Jun 17, 2015 at 09:05:54AM +0300, Tomi Valkeinen wrote:
> Hi Luis,
> 
> On 16/06/15 22:05, Luis R. Rodriguez wrote:
> 
> > Can the fbdev parts go through Bjorn's tree? We last discussed if the series
> > was important to be fully merged or not by v4.2 and I recentlty provided a
> > long winded review of the entire series to help maintainers pick and choose
> > and decide [1].
> > 
> > Based on this can the fbdev patches from both of these series go through Bjorn's tree?
> 
> Yes, they can go through Bjorn's tree if there are no non-trivial
> conflicts with the main fbdev stuff. linux-next should contain all the
> fbdev patches going for 4.2.

Great, thanks Tomi.

  Luis

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2015-06-17 17:32 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 20:20 [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar() Luis R. Rodriguez
2015-04-21 20:20 ` [Cocci] " Luis R. Rodriguez
2015-04-21 20:20 ` Luis R. Rodriguez
2015-04-21 20:20 ` [PATCH v3 1/4] pci: add pci_ioremap_wc_bar() Luis R. Rodriguez
2015-04-21 20:20   ` [Cocci] " Luis R. Rodriguez
2015-04-21 20:20   ` Luis R. Rodriguez
2015-05-20 21:02   ` Bjorn Helgaas
2015-05-20 21:02     ` Bjorn Helgaas
2015-05-20 21:06     ` Luis R. Rodriguez
2015-05-20 21:06       ` Luis R. Rodriguez
2015-04-21 20:20 ` [PATCH v3 2/4] video: fbdev: i740fb: use arch_phys_wc_add() and pci_ioremap_wc_bar() Luis R. Rodriguez
2015-04-21 20:20   ` [Cocci] " Luis R. Rodriguez
2015-04-21 20:20   ` Luis R. Rodriguez
2015-04-21 20:20 ` [PATCH v3 3/4] video: fbdev: kyrofb: " Luis R. Rodriguez
2015-04-21 20:20   ` [Cocci] " Luis R. Rodriguez
2015-04-21 20:20   ` Luis R. Rodriguez
2015-04-21 20:20 ` [PATCH v3 4/4] video: fbdev: gxt4500: use pci_ioremap_wc_bar() for framebuffer Luis R. Rodriguez
2015-04-21 20:20   ` [Cocci] " Luis R. Rodriguez
2015-04-21 20:20   ` Luis R. Rodriguez
2015-04-29 21:08 ` [PATCH v3 0/4] pci: add and use pci_ioremap_wc_bar() Luis R. Rodriguez
2015-04-29 21:08   ` [Cocci] " Luis R. Rodriguez
2015-05-19 17:53   ` Luis R. Rodriguez
2015-05-19 17:53     ` [Cocci] " Luis R. Rodriguez
2015-05-20 20:54     ` Luis R. Rodriguez
2015-05-20 20:54       ` Luis R. Rodriguez
2015-05-21 21:23       ` Luis R. Rodriguez
2015-05-21 21:23         ` Luis R. Rodriguez
2015-06-16  7:15       ` Tomi Valkeinen
2015-06-16 19:05         ` Luis R. Rodriguez
2015-06-16 19:05           ` Luis R. Rodriguez
2015-06-16 19:05           ` Luis R. Rodriguez
2015-06-17  6:05           ` Tomi Valkeinen
2015-06-17  6:05             ` Tomi Valkeinen
2015-06-17 17:32             ` Luis R. Rodriguez
2015-06-17 17:32               ` Luis R. Rodriguez
2015-06-17 17:32               ` Luis R. Rodriguez
2015-05-26  8:03 ` Tomi Valkeinen
2015-05-26 19:49   ` Luis R. Rodriguez
2015-05-26 19:49     ` [Cocci] " Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.