[PATCH 00/20] tree-wide convert to memremap()

STALE4022d

2 messages, 1 author, 2015-10-09 · open the first message on its own page

[PATCH 00/20] tree-wide convert to memremap()

From: Dan Williams <hidden>
Date: 2015-10-09 22:21:23

The memremap() api [1] was merged in 4.3 [2] with an initial
implementation for x86 and a conversion of the pmem driver. Complete the
conversion for the rest of the kernel.

Feel free to either ack or directly apply a conversion-patch as I will
defer the final removal patches until all the conversions have landed.

[1]: https://lwn.net/Articles/653585/
[2]: commit 92281dee825f arch: introduce memremap()

---

Dan Williams (20):
      x86: introduce arch_memremap()
      arm: introduce arch_memremap()
      ia64: introduce arch_memremap()
      sh: introduce arch_memremap()
      m68k: introduce arch_memremap()
      arm: switch from ioremap_cache to memremap
      x86: switch from ioremap_cache to memremap
      gma500: switch from acpi_os_ioremap to memremap
      i915: switch from acpi_os_ioremap to memremap
      acpi: switch from ioremap_cache to memremap
      sound, skylake: switch from ioremap_cache to memremap
      memconsole: fix __iomem mishandling, switch to memremap
      intel-iommu: switch from ioremap_cache to memremap
      pxa2xx-flash: switch from ioremap_cache to memremap
      sfi: switch from ioremap_cache to memremap
      fbdev: switch from ioremap_wt to memremap
      arch: kill ioremap_cached()
      arch: kill ioremap_fullcache()
      arch: remove ioremap_cache, replace with arch_memremap
      arch: remove ioremap_wt, optionally replace with arch_memremap


 Documentation/x86/pat.txt             |    6 +--
 arch/arc/include/asm/io.h             |    1 
 arch/arm/Kconfig                      |    1 
 arch/arm/include/asm/io.h             |    7 ---
 arch/arm/include/asm/xen/page.h       |    4 +-
 arch/arm/mm/ioremap.c                 |   12 ++++-
 arch/arm/mm/mmu.c                     |    2 -
 arch/arm/mm/nommu.c                   |   11 +++--
 arch/arm64/Kconfig                    |    1 
 arch/arm64/include/asm/acpi.h         |   11 -----
 arch/arm64/include/asm/dmi.h          |    8 ++--
 arch/arm64/include/asm/io.h           |    2 -
 arch/arm64/kernel/efi.c               |    9 ++--
 arch/arm64/kernel/smp_spin_table.c    |   19 ++++-----
 arch/arm64/mm/ioremap.c               |   20 +++------
 arch/avr32/include/asm/io.h           |    1 
 arch/frv/include/asm/io.h             |   12 -----
 arch/ia64/Kconfig                     |    1 
 arch/ia64/include/asm/io.h            |    6 ---
 arch/ia64/mm/ioremap.c                |   10 +++++
 arch/m32r/include/asm/io.h            |    1 
 arch/m68k/Kconfig                     |    1 
 arch/m68k/include/asm/io_mm.h         |   13 ------
 arch/m68k/include/asm/io_no.h         |   11 -----
 arch/m68k/include/asm/raw_io.h        |    1 
 arch/m68k/mm/kmap.c                   |   17 +++++++-
 arch/m68k/mm/sun3kmap.c               |    7 +++
 arch/metag/include/asm/io.h           |    6 ---
 arch/microblaze/include/asm/io.h      |    2 -
 arch/mn10300/include/asm/io.h         |    1 
 arch/nios2/include/asm/io.h           |    1 
 arch/s390/include/asm/io.h            |    1 
 arch/sh/Kconfig                       |    1 
 arch/sh/include/asm/io.h              |    7 ---
 arch/sh/mm/ioremap.c                  |    9 ++++
 arch/sparc/include/asm/io_32.h        |    1 
 arch/sparc/include/asm/io_64.h        |    1 
 arch/tile/include/asm/io.h            |    2 -
 arch/unicore32/include/asm/io.h       |    4 --
 arch/unicore32/mm/ioremap.c           |    8 ----
 arch/x86/Kconfig                      |    1 
 arch/x86/include/asm/efi.h            |    3 +
 arch/x86/include/asm/io.h             |    4 --
 arch/x86/kernel/crash_dump_64.c       |    6 +--
 arch/x86/kernel/kdebugfs.c            |    8 ++--
 arch/x86/kernel/ksysfs.c              |   28 ++++++-------
 arch/x86/mm/ioremap.c                 |   43 ++++++++-----------
 arch/xtensa/include/asm/io.h          |   12 -----
 drivers/acpi/apei/einj.c              |    9 ++--
 drivers/acpi/apei/erst.c              |    6 +--
 drivers/acpi/nvs.c                    |    6 +--
 drivers/acpi/osl.c                    |   70 +++++++++-----------------------
 drivers/firmware/google/memconsole.c  |    7 ++-
 drivers/gpu/drm/gma500/opregion.c     |    8 ++--
 drivers/gpu/drm/gma500/psb_drv.h      |    2 -
 drivers/gpu/drm/gma500/psb_lid.c      |    8 ++--
 drivers/gpu/drm/i915/i915_debugfs.c   |    2 -
 drivers/gpu/drm/i915/i915_drv.h       |   12 +++--
 drivers/gpu/drm/i915/intel_bios.c     |    7 +--
 drivers/gpu/drm/i915/intel_opregion.c |   73 ++++++++++++++++-----------------
 drivers/gpu/drm/i915/intel_panel.c    |    2 -
 drivers/iommu/intel-iommu.c           |   20 +++++----
 drivers/iommu/intel_irq_remapping.c   |    8 ++--
 drivers/mtd/maps/pxa2xx-flash.c       |    6 +--
 drivers/nvdimm/Kconfig                |    2 -
 drivers/sfi/sfi_core.c                |    4 +-
 drivers/video/fbdev/Kconfig           |    2 -
 drivers/video/fbdev/amifb.c           |    5 +-
 drivers/video/fbdev/atafb.c           |    5 +-
 drivers/video/fbdev/hpfb.c            |    6 +--
 include/acpi/acpi_io.h                |    6 +--
 include/asm-generic/io.h              |    8 ----
 include/asm-generic/iomap.h           |    4 --
 include/linux/io.h                    |    1 
 kernel/Makefile                       |    2 -
 kernel/memremap.c                     |   27 +++++-------
 lib/Kconfig                           |    6 ++-
 sound/soc/intel/skylake/skl-nhlt.c    |   10 ++---
 sound/soc/intel/skylake/skl.h         |    6 +--
 79 files changed, 284 insertions(+), 400 deletions(-)

[PATCH 16/20] fbdev: switch from ioremap_wt to memremap

From: Dan Williams <hidden>
Date: 2015-10-09 22:22:49

In preparation for deprecating ioremap_wt() convert its usage in
drivers/video/fbdev to memremap.

Cc: Jean-Christophe Plagniol-Villard <redacted>
Cc: Tomi Valkeinen <redacted>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Dan Williams <redacted>
---
 drivers/video/fbdev/amifb.c |    5 +++--
 drivers/video/fbdev/atafb.c |    5 +++--
 drivers/video/fbdev/hpfb.c  |    6 +++---
 3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/amifb.c b/drivers/video/fbdev/amifb.c
index 1d702e13aaff..0cde451046d0 100644
--- a/drivers/video/fbdev/amifb.c
+++ b/drivers/video/fbdev/amifb.c
@@ -52,6 +52,7 @@
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/uaccess.h>
+#include <linux/io.h>
 
 #include <asm/irq.h>
 #include <asm/amigahw.h>
@@ -3705,8 +3706,8 @@ default_chipset:
 	 * access the videomem with writethrough cache
 	 */
 	info->fix.smem_start = (u_long)ZTWO_PADDR(videomemory);
-	videomemory = (u_long)ioremap_wt(info->fix.smem_start,
-					 info->fix.smem_len);
+	videomemory = (u_long)memremap(info->fix.smem_start, info->fix.smem_len,
+			MEMREMAP_WT);
 	if (!videomemory) {
 		dev_warn(&pdev->dev,
 			 "Unable to map videomem cached writethrough\n");
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index d6ce613e12ad..5615e8c31ea2 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -55,12 +55,12 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 
 #include <asm/setup.h>
 #include <linux/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/atarihw.h>
 #include <asm/atariints.h>
@@ -3185,7 +3185,8 @@ int __init atafb_init(void)
 		/* Map the video memory (physical address given) to somewhere
 		 * in the kernel address space.
 		 */
-		external_screen_base = ioremap_wt(external_addr, external_len);
+		external_screen_base = memremap(external_addr, external_len,
+				MEMREMAP_WT);
 		if (external_vgaiobase)
 			external_vgaiobase  			  (unsigned long)ioremap(external_vgaiobase, 0x10000);
diff --git a/drivers/video/fbdev/hpfb.c b/drivers/video/fbdev/hpfb.c
index 9476d196f510..d08c320b06fc 100644
--- a/drivers/video/fbdev/hpfb.c
+++ b/drivers/video/fbdev/hpfb.c
@@ -14,8 +14,8 @@
 #include <linux/init.h>
 #include <linux/fb.h>
 #include <linux/dio.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/uaccess.h>
 
 static struct fb_info fb_info = {
@@ -241,8 +241,8 @@ static int hpfb_init_one(unsigned long phys_base, unsigned long virt_base)
 	fb_info.fix.line_length = fb_width;
 	fb_height = (in_8(fb_regs + HPFB_FBHMSB) << 8) | in_8(fb_regs + HPFB_FBHLSB);
 	fb_info.fix.smem_len = fb_width * fb_height;
-	fb_start = (unsigned long)ioremap_wt(fb_info.fix.smem_start,
-					     fb_info.fix.smem_len);
+	fb_start = (unsigned long) memremap(fb_info.fix.smem_start,
+					     fb_info.fix.smem_len, MEMREMAP_WT);
 	hpfb_defined.xres = (in_8(fb_regs + HPFB_DWMSB) << 8) | in_8(fb_regs + HPFB_DWLSB);
 	hpfb_defined.yres = (in_8(fb_regs + HPFB_DHMSB) << 8) | in_8(fb_regs + HPFB_DHLSB);
 	hpfb_defined.xres_virtual = hpfb_defined.xres;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help