linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add()
@ 2015-05-29  0:30 Luis R. Rodriguez
  2015-05-29  0:30 ` [PATCH v4 2/17] video: fbdev: gbefb: add missing mtrr_del() calls Luis R. Rodriguez
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Luis R. Rodriguez @ 2015-05-29  0:30 UTC (permalink / raw)
  To: tomi.valkeinen; +Cc: linux-kernel, linux-fbdev, Luis R. Rodriguez

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

Tomi,

Upon integration onto your tree of the series, "[PATCH v3 00/17] framebuffer:
simple conversions to arch_phys_wc_add()" the 0 day build bot found a
compilation issue on the gbefb driver. I had test compiled drivers with
allyesconfig and allmodconfig but failed to test compile against MIPS. This
driver is enabled *only for MIPS*.  For the life me I could not get a MIPS
cross compiler even on debian, so what I did to test this was incorporate into
my private tree a temporary patch [0] which enables this driver to compile on
x86 and go test compile with that as a temporary patch. The compilation was
failing since I used the info struct instead of the actual private data
structure. This fixes that and moves its assignment early.  Sorry about that.

The rest of the series does not require changes for integration after these
two patch replacements. Let me know if you'd like me to respin the entire
series though, but I didn't since I figured its pointless as the patches remain
intact. For your convenience however I've rebased all these 17 patches onto
your latest tree on the for-next branch, you can pull the changes with the
details provided below. This v4 iteration only carries the two patches which
required updates. The details of the full pull request go below this.

[0] http://drvbp1.linux-foundation.org/~mcgrof/patches/tmp/enable-gbefb-x86.patch

Luis R. Rodriguez (2):
  video: fbdev: gbefb: add missing mtrr_del() calls
  video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc()

 drivers/video/fbdev/gbefb.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

The following changes since commit 36520841a443d5ee966f9632c417fcc8a25e07e3:

  video/console: use swap() in newport_bmove() (2015-05-27 12:54:49 +0300)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-framebuffer.git simple-arch_phys-20150528

for you to fetch changes up to 29b0c802f84943cac3658927452a2da4c976c632:

  video: fbdev: geode gxfb: use ioremap_wc() for framebuffer (2015-05-28 17:16:43 -0700)

----------------------------------------------------------------
Luis R. Rodriguez (17):
      video: fbdev: radeonfb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: gbefb: add missing mtrr_del() calls
      video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc()
      video: fbdev: intelfb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: matrox: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: neofb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: nvidia: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: savagefb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: sisfb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: aty: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: i810: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: pm2fb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: pm3fb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: rivafb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: tdfxfb: use arch_phys_wc_add() and ioremap_wc()
      video: fbdev: atmel_lcdfb: use ioremap_wc() for framebuffer
      video: fbdev: geode gxfb: use ioremap_wc() for framebuffer

 drivers/video/fbdev/atmel_lcdfb.c            |  3 +-
 drivers/video/fbdev/aty/aty128fb.c           | 36 ++++--------------------
 drivers/video/fbdev/aty/radeon_base.c        | 29 ++++----------------
 drivers/video/fbdev/aty/radeonfb.h           |  2 +-
 drivers/video/fbdev/gbefb.c                  | 21 +++++++-------
 drivers/video/fbdev/geode/gxfb_core.c        |  3 +-
 drivers/video/fbdev/i810/i810.h              |  3 +-
 drivers/video/fbdev/i810/i810_main.c         | 11 +++++---
 drivers/video/fbdev/i810/i810_main.h         | 26 ------------------
 drivers/video/fbdev/intelfb/intelfb.h        |  4 +--
 drivers/video/fbdev/intelfb/intelfbdrv.c     | 38 +++-----------------------
 drivers/video/fbdev/matrox/matroxfb_base.c   | 36 +++++++++---------------
 drivers/video/fbdev/matrox/matroxfb_base.h   | 27 +-----------------
 drivers/video/fbdev/neofb.c                  | 26 +++++-------------
 drivers/video/fbdev/nvidia/nv_type.h         |  7 +----
 drivers/video/fbdev/nvidia/nvidia.c          | 37 ++++---------------------
 drivers/video/fbdev/pm2fb.c                  | 31 ++++-----------------
 drivers/video/fbdev/pm3fb.c                  | 30 ++++----------------
 drivers/video/fbdev/riva/fbdev.c             | 39 +++++---------------------
 drivers/video/fbdev/riva/rivafb.h            |  4 +--
 drivers/video/fbdev/savage/savagefb.h        |  4 +--
 drivers/video/fbdev/savage/savagefb_driver.c | 17 ++----------
 drivers/video/fbdev/sis/sis.h                |  2 +-
 drivers/video/fbdev/sis/sis_main.c           | 27 ++++--------------
 drivers/video/fbdev/tdfxfb.c                 | 41 ++++------------------------
 include/video/neomagic.h                     |  5 +---
 include/video/tdfx.h                         |  2 +-
 27 files changed, 106 insertions(+), 405 deletions(-)

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

* [PATCH v4 2/17] video: fbdev: gbefb: add missing mtrr_del() calls
  2015-05-29  0:30 [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add() Luis R. Rodriguez
@ 2015-05-29  0:30 ` Luis R. Rodriguez
  2015-05-29  0:30 ` [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc() Luis R. Rodriguez
  2015-05-29  5:48 ` [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add() Tomi Valkeinen
  2 siblings, 0 replies; 9+ messages in thread
From: Luis R. Rodriguez @ 2015-05-29  0:30 UTC (permalink / raw)
  To: tomi.valkeinen
  Cc: linux-kernel, linux-fbdev, Luis R. Rodriguez, Thomas Gleixner,
	Juergen Gross, Jingoo Han, Daniel Vetter, Masanari Iida,
	Suresh Siddha, Ingo Molnar, Andy Lutomirski, Dave Airlie,
	Antonino Daplas, Jean-Christophe Plagniol-Villard

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

This driver never removed the MTRRs. Fix that.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/gbefb.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c
index 6d9ef39..4e54faa06 100644
--- a/drivers/video/fbdev/gbefb.c
+++ b/drivers/video/fbdev/gbefb.c
@@ -38,6 +38,7 @@ static struct sgi_gbe *gbe;
 struct gbefb_par {
 	struct fb_var_screeninfo var;
 	struct gbe_timing_info timing;
+	int wc_cookie;
 	int valid;
 };
 
@@ -1198,8 +1199,10 @@ static int gbefb_probe(struct platform_device *p_dev)
 		gbe_mem_phys = (unsigned long) gbe_dma_addr;
 	}
 
+	par = info->par;
 #ifdef CONFIG_X86
-	mtrr_add(gbe_mem_phys, gbe_mem_size, MTRR_TYPE_WRCOMB, 1);
+	par->wc_cookie = mtrr_add(gbe_mem_phys, gbe_mem_size,
+				   MTRR_TYPE_WRCOMB, 1);
 #endif
 
 	/* map framebuffer memory into tiles table */
@@ -1215,7 +1218,6 @@ static int gbefb_probe(struct platform_device *p_dev)
 	/* reset GBE */
 	gbe_reset();
 
-	par = info->par;
 	/* turn on default video mode */
 	if (fb_find_mode(&par->var, info, mode_option, NULL, 0,
 			 default_mode, 8) == 0)
@@ -1240,6 +1242,10 @@ static int gbefb_probe(struct platform_device *p_dev)
 	return 0;
 
 out_gbe_unmap:
+#ifdef CONFIG_MTRR
+	if (par->wc_cookie >= 0)
+		mtrr_del(par->wc_cookie, 0, 0);
+#endif
 	if (gbe_dma_addr)
 		dma_free_coherent(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
 out_tiles_free:
@@ -1256,9 +1262,14 @@ out_release_framebuffer:
 static int gbefb_remove(struct platform_device* p_dev)
 {
 	struct fb_info *info = platform_get_drvdata(p_dev);
+	struct gbefb_par *par = info->par;
 
 	unregister_framebuffer(info);
 	gbe_turn_off();
+#ifdef CONFIG_MTRR
+	if (par->wc_cookie >= 0)
+		mtrr_del(par->wc_cookie, 0, 0);
+#endif
 	if (gbe_dma_addr)
 		dma_free_coherent(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
 	dma_free_coherent(NULL, GBE_TLB_SIZE * sizeof(uint16_t),
-- 
2.3.2.209.gd67f9d5.dirty


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

* [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc()
  2015-05-29  0:30 [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add() Luis R. Rodriguez
  2015-05-29  0:30 ` [PATCH v4 2/17] video: fbdev: gbefb: add missing mtrr_del() calls Luis R. Rodriguez
@ 2015-05-29  0:30 ` Luis R. Rodriguez
  2015-05-29  6:41   ` Ingo Molnar
  2015-05-29  5:48 ` [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add() Tomi Valkeinen
  2 siblings, 1 reply; 9+ messages in thread
From: Luis R. Rodriguez @ 2015-05-29  0:30 UTC (permalink / raw)
  To: tomi.valkeinen
  Cc: linux-kernel, linux-fbdev, Luis R. Rodriguez, Thomas Gleixner,
	Juergen Gross, Jingoo Han, Daniel Vetter, Masanari Iida,
	Suresh Siddha, Ingo Molnar, Andy Lutomirski, Dave Airlie,
	Antonino Daplas, Jean-Christophe Plagniol-Villard

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: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 drivers/video/fbdev/gbefb.c | 26 +++++++-------------------
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c
index 4e54faa06..d2601808 100644
--- a/drivers/video/fbdev/gbefb.c
+++ b/drivers/video/fbdev/gbefb.c
@@ -22,9 +22,6 @@
 #include <linux/module.h>
 #include <linux/io.h>
 
-#ifdef CONFIG_X86
-#include <asm/mtrr.h>
-#endif
 #ifdef CONFIG_MIPS
 #include <asm/addrspace.h>
 #endif
@@ -1176,8 +1173,8 @@ static int gbefb_probe(struct platform_device *p_dev)
 
 	if (gbe_mem_phys) {
 		/* memory was allocated at boot time */
-		gbe_mem = devm_ioremap_nocache(&p_dev->dev, gbe_mem_phys,
-					       gbe_mem_size);
+		gbe_mem = devm_ioremap_wc(&p_dev->dev, gbe_mem_phys,
+					  gbe_mem_size);
 		if (!gbe_mem) {
 			printk(KERN_ERR "gbefb: couldn't map framebuffer\n");
 			ret = -ENOMEM;
@@ -1188,8 +1185,8 @@ static int gbefb_probe(struct platform_device *p_dev)
 	} else {
 		/* try to allocate memory with the classical allocator
 		 * this has high chance to fail on low memory machines */
-		gbe_mem = dma_alloc_coherent(NULL, gbe_mem_size, &gbe_dma_addr,
-					     GFP_KERNEL);
+		gbe_mem = dma_alloc_writecombine(NULL, gbe_mem_size,
+						 &gbe_dma_addr, GFP_KERNEL);
 		if (!gbe_mem) {
 			printk(KERN_ERR "gbefb: couldn't allocate framebuffer memory\n");
 			ret = -ENOMEM;
@@ -1200,10 +1197,7 @@ static int gbefb_probe(struct platform_device *p_dev)
 	}
 
 	par = info->par;
-#ifdef CONFIG_X86
-	par->wc_cookie = mtrr_add(gbe_mem_phys, gbe_mem_size,
-				   MTRR_TYPE_WRCOMB, 1);
-#endif
+	par->wc_cookie = arch_phys_wc_add(gbe_mem_phys, gbe_mem_size);
 
 	/* map framebuffer memory into tiles table */
 	for (i = 0; i < (gbe_mem_size >> TILE_SHIFT); i++)
@@ -1242,10 +1236,7 @@ static int gbefb_probe(struct platform_device *p_dev)
 	return 0;
 
 out_gbe_unmap:
-#ifdef CONFIG_MTRR
-	if (par->wc_cookie >= 0)
-		mtrr_del(par->wc_cookie, 0, 0);
-#endif
+	arch_phys_wc_del(par->wc_cookie);
 	if (gbe_dma_addr)
 		dma_free_coherent(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
 out_tiles_free:
@@ -1266,10 +1257,7 @@ static int gbefb_remove(struct platform_device* p_dev)
 
 	unregister_framebuffer(info);
 	gbe_turn_off();
-#ifdef CONFIG_MTRR
-	if (par->wc_cookie >= 0)
-		mtrr_del(par->wc_cookie, 0, 0);
-#endif
+	arch_phys_wc_del(par->wc_cookie);
 	if (gbe_dma_addr)
 		dma_free_coherent(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
 	dma_free_coherent(NULL, GBE_TLB_SIZE * sizeof(uint16_t),
-- 
2.3.2.209.gd67f9d5.dirty


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

* Re: [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add()
  2015-05-29  0:30 [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add() Luis R. Rodriguez
  2015-05-29  0:30 ` [PATCH v4 2/17] video: fbdev: gbefb: add missing mtrr_del() calls Luis R. Rodriguez
  2015-05-29  0:30 ` [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc() Luis R. Rodriguez
@ 2015-05-29  5:48 ` Tomi Valkeinen
  2015-05-29 21:04   ` Luis R. Rodriguez
  2 siblings, 1 reply; 9+ messages in thread
From: Tomi Valkeinen @ 2015-05-29  5:48 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-kernel, linux-fbdev, Luis R. Rodriguez

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



On 29/05/15 03:30, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> 
> Tomi,
> 
> Upon integration onto your tree of the series, "[PATCH v3 00/17] framebuffer:
> simple conversions to arch_phys_wc_add()" the 0 day build bot found a
> compilation issue on the gbefb driver. I had test compiled drivers with
> allyesconfig and allmodconfig but failed to test compile against MIPS. This
> driver is enabled *only for MIPS*.  For the life me I could not get a MIPS
> cross compiler even on debian, so what I did to test this was incorporate into
> my private tree a temporary patch [0] which enables this driver to compile on
> x86 and go test compile with that as a temporary patch. The compilation was
> failing since I used the info struct instead of the actual private data
> structure. This fixes that and moves its assignment early.  Sorry about that.
> 
> The rest of the series does not require changes for integration after these
> two patch replacements. Let me know if you'd like me to respin the entire
> series though, but I didn't since I figured its pointless as the patches remain
> intact. For your convenience however I've rebased all these 17 patches onto
> your latest tree on the for-next branch, you can pull the changes with the
> details provided below. This v4 iteration only carries the two patches which
> required updates. The details of the full pull request go below this.

Thanks, I've updated the two patches, and pushed the series to my for-next.

 Tomi


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

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

* Re: [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc()
  2015-05-29  0:30 ` [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc() Luis R. Rodriguez
@ 2015-05-29  6:41   ` Ingo Molnar
  2015-05-30  0:32     ` Luis R. Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2015-05-29  6:41 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: tomi.valkeinen, linux-kernel, linux-fbdev, Luis R. Rodriguez,
	Thomas Gleixner, Juergen Gross, Jingoo Han, Daniel Vetter,
	Masanari Iida, Suresh Siddha, Ingo Molnar, Andy Lutomirski,
	Dave Airlie, Antonino Daplas, Jean-Christophe Plagniol-Villard


* Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote:

> +		gbe_mem = devm_ioremap_wc(&p_dev->dev, gbe_mem_phys,
> +					  gbe_mem_size);

> +		gbe_mem = dma_alloc_writecombine(NULL, gbe_mem_size,
> +						 &gbe_dma_addr, GFP_KERNEL);

> +	par->wc_cookie = arch_phys_wc_add(gbe_mem_phys, gbe_mem_size);

> +	arch_phys_wc_del(par->wc_cookie);

> +	arch_phys_wc_del(par->wc_cookie);

Could we _please_ rename dma_*_writecombine() to dma_*_wc(), so that the naming is 
coherent across the various APIs?

Thanks,

	Ingo

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

* Re: [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add()
  2015-05-29  5:48 ` [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add() Tomi Valkeinen
@ 2015-05-29 21:04   ` Luis R. Rodriguez
  0 siblings, 0 replies; 9+ messages in thread
From: Luis R. Rodriguez @ 2015-05-29 21:04 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: Luis R. Rodriguez, linux-kernel, linux-fbdev

On Fri, May 29, 2015 at 08:48:46AM +0300, Tomi Valkeinen wrote:
> 
> 
> On 29/05/15 03:30, Luis R. Rodriguez wrote:
> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> > 
> > Tomi,
> > 
> > Upon integration onto your tree of the series, "[PATCH v3 00/17] framebuffer:
> > simple conversions to arch_phys_wc_add()" the 0 day build bot found a
> > compilation issue on the gbefb driver. I had test compiled drivers with
> > allyesconfig and allmodconfig but failed to test compile against MIPS. This
> > driver is enabled *only for MIPS*.  For the life me I could not get a MIPS
> > cross compiler even on debian, so what I did to test this was incorporate into
> > my private tree a temporary patch [0] which enables this driver to compile on
> > x86 and go test compile with that as a temporary patch. The compilation was
> > failing since I used the info struct instead of the actual private data
> > structure. This fixes that and moves its assignment early.  Sorry about that.
> > 
> > The rest of the series does not require changes for integration after these
> > two patch replacements. Let me know if you'd like me to respin the entire
> > series though, but I didn't since I figured its pointless as the patches remain
> > intact. For your convenience however I've rebased all these 17 patches onto
> > your latest tree on the for-next branch, you can pull the changes with the
> > details provided below. This v4 iteration only carries the two patches which
> > required updates. The details of the full pull request go below this.
> 
> Thanks, I've updated the two patches, and pushed the series to my for-next.

And yet another corner case, which compilation would not have picked up but
only grammar would. Best handled now before it being merged.  The same gbefb
MIPS patch had a missing change from dma_free_coherent() to
dma_free_writecombine(), this is needed since the gbefb is changed to use
dma_alloc_writecombine(). The change required is illustrated below. Terribly
sorry about that...  I'll send a v5 pull request unless you want that to
go separately. Meanwhile I've verified the other series I have for MTRR
and none of them use these APIs so this is the only one with this
inconsistancy.

diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c
index d2601808..b63d55f 100644
--- a/drivers/video/fbdev/gbefb.c
+++ b/drivers/video/fbdev/gbefb.c
@@ -1238,7 +1238,7 @@ static int gbefb_probe(struct platform_device *p_dev)
 out_gbe_unmap:
 	arch_phys_wc_del(par->wc_cookie);
 	if (gbe_dma_addr)
-		dma_free_coherent(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
+		dma_free_writecombine(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
 out_tiles_free:
 	dma_free_coherent(NULL, GBE_TLB_SIZE * sizeof(uint16_t),
 			  (void *)gbe_tiles.cpu, gbe_tiles.dma);
@@ -1259,7 +1259,7 @@ static int gbefb_remove(struct platform_device* p_dev)
 	gbe_turn_off();
 	arch_phys_wc_del(par->wc_cookie);
 	if (gbe_dma_addr)
-		dma_free_coherent(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
+		dma_free_writecombine(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
 	dma_free_coherent(NULL, GBE_TLB_SIZE * sizeof(uint16_t),
 			  (void *)gbe_tiles.cpu, gbe_tiles.dma);
 	release_mem_region(GBE_BASE, sizeof(struct sgi_gbe));

  Luis

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

* Re: [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc()
  2015-05-29  6:41   ` Ingo Molnar
@ 2015-05-30  0:32     ` Luis R. Rodriguez
  2015-06-01  8:53       ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: Luis R. Rodriguez @ 2015-05-30  0:32 UTC (permalink / raw)
  To: Ingo Molnar, tomi.valkeinen, Dave Airlie
  Cc: Luis R. Rodriguez, linux-kernel, linux-fbdev, Thomas Gleixner,
	Juergen Gross, Jingoo Han, Daniel Vetter, Masanari Iida,
	Suresh Siddha, Ingo Molnar, Andy Lutomirski, Antonino Daplas,
	Jean-Christophe Plagniol-Villard

On Fri, May 29, 2015 at 08:41:44AM +0200, Ingo Molnar wrote:
> 
> * Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote:
> 
> > +		gbe_mem = devm_ioremap_wc(&p_dev->dev, gbe_mem_phys,
> > +					  gbe_mem_size);
> 
> > +		gbe_mem = dma_alloc_writecombine(NULL, gbe_mem_size,
> > +						 &gbe_dma_addr, GFP_KERNEL);
> 
> > +	par->wc_cookie = arch_phys_wc_add(gbe_mem_phys, gbe_mem_size);
> 
> > +	arch_phys_wc_del(par->wc_cookie);
> 
> > +	arch_phys_wc_del(par->wc_cookie);
> 
> Could we _please_ rename dma_*_writecombine() to dma_*_wc(), so that the naming is 
> coherent across the various APIs?

Sure, OK done. Will send once this series is merged and visible on linux-next.
But who's tree should this go through? Since it depends on this series which
goes through Tomi's tree should it go through there?

 Luis

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

* Re: [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc()
  2015-05-30  0:32     ` Luis R. Rodriguez
@ 2015-06-01  8:53       ` Ingo Molnar
  2015-06-01 15:57         ` Luis R. Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2015-06-01  8:53 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: tomi.valkeinen, Dave Airlie, Luis R. Rodriguez, linux-kernel,
	linux-fbdev, Thomas Gleixner, Juergen Gross, Jingoo Han,
	Daniel Vetter, Masanari Iida, Suresh Siddha, Ingo Molnar,
	Andy Lutomirski, Antonino Daplas,
	Jean-Christophe Plagniol-Villard


* Luis R. Rodriguez <mcgrof@suse.com> wrote:

> On Fri, May 29, 2015 at 08:41:44AM +0200, Ingo Molnar wrote:
> > 
> > * Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote:
> > 
> > > +		gbe_mem = devm_ioremap_wc(&p_dev->dev, gbe_mem_phys,
> > > +					  gbe_mem_size);
> > 
> > > +		gbe_mem = dma_alloc_writecombine(NULL, gbe_mem_size,
> > > +						 &gbe_dma_addr, GFP_KERNEL);
> > 
> > > +	par->wc_cookie = arch_phys_wc_add(gbe_mem_phys, gbe_mem_size);
> > 
> > > +	arch_phys_wc_del(par->wc_cookie);
> > 
> > > +	arch_phys_wc_del(par->wc_cookie);
> > 
> > Could we _please_ rename dma_*_writecombine() to dma_*_wc(), so that the naming is 
> > coherent across the various APIs?
> 
> Sure, OK done. Will send once this series is merged and visible on linux-next. 
> But who's tree should this go through? Since it depends on this series which 
> goes through Tomi's tree should it go through there?

So we could do the rename near the end of the merge window, when all the patches 
have drained from maintainer trees into Linus's tree. Mind keeping it in your tree 
until then?

Thanks,

	Ingo

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

* Re: [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc()
  2015-06-01  8:53       ` Ingo Molnar
@ 2015-06-01 15:57         ` Luis R. Rodriguez
  0 siblings, 0 replies; 9+ messages in thread
From: Luis R. Rodriguez @ 2015-06-01 15:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Tomi Valkeinen, Dave Airlie, linux-kernel, linux-fbdev,
	Thomas Gleixner, Juergen Gross, Jingoo Han, Daniel Vetter,
	Masanari Iida, Suresh Siddha, Ingo Molnar, Andy Lutomirski,
	Antonino Daplas, Jean-Christophe Plagniol-Villard

On Mon, Jun 1, 2015 at 1:53 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Luis R. Rodriguez <mcgrof@suse.com> wrote:
>
>> On Fri, May 29, 2015 at 08:41:44AM +0200, Ingo Molnar wrote:
>> >
>> > * Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote:
>> >
>> > > +         gbe_mem = devm_ioremap_wc(&p_dev->dev, gbe_mem_phys,
>> > > +                                   gbe_mem_size);
>> >
>> > > +         gbe_mem = dma_alloc_writecombine(NULL, gbe_mem_size,
>> > > +                                          &gbe_dma_addr, GFP_KERNEL);
>> >
>> > > + par->wc_cookie = arch_phys_wc_add(gbe_mem_phys, gbe_mem_size);
>> >
>> > > + arch_phys_wc_del(par->wc_cookie);
>> >
>> > > + arch_phys_wc_del(par->wc_cookie);
>> >
>> > Could we _please_ rename dma_*_writecombine() to dma_*_wc(), so that the naming is
>> > coherent across the various APIs?
>>
>> Sure, OK done. Will send once this series is merged and visible on linux-next.
>> But who's tree should this go through? Since it depends on this series which
>> goes through Tomi's tree should it go through there?
>
> So we could do the rename near the end of the merge window, when all the patches
> have drained from maintainer trees into Linus's tree.

OK.

> Mind keeping it in your tree until then?

You got it.

 Luis

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

end of thread, other threads:[~2015-06-01 15:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29  0:30 [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add() Luis R. Rodriguez
2015-05-29  0:30 ` [PATCH v4 2/17] video: fbdev: gbefb: add missing mtrr_del() calls Luis R. Rodriguez
2015-05-29  0:30 ` [PATCH v4 3/17] video: fbdev: gbefb: use arch_phys_wc_add() and devm_ioremap_wc() Luis R. Rodriguez
2015-05-29  6:41   ` Ingo Molnar
2015-05-30  0:32     ` Luis R. Rodriguez
2015-06-01  8:53       ` Ingo Molnar
2015-06-01 15:57         ` Luis R. Rodriguez
2015-05-29  5:48 ` [PATCH v4 0/17] framebuffer: simple conversions to arch_phys_wc_add() Tomi Valkeinen
2015-05-29 21:04   ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).