mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Mike Waychison <mikew@google.com>
Subject: [PATCH 12/20] memconsole: fix __iomem mishandling, switch to memremap
Date: Fri, 09 Oct 2015 18:16:41 -0400	[thread overview]
Message-ID: <20151009221641.32203.201.stgit@dwillia2-desk3.jf.intel.com> (raw)
In-Reply-To: <20151009221537.32203.5867.stgit@dwillia2-desk3.jf.intel.com>

The memconsole driver is not using proper accessors for __iomem.  Switch
to memremap to fix this issue, and this also prepares the driver for the
removal of ioremap_cache.

Cc: Mike Waychison <mikew@google.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/firmware/google/memconsole.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/google/memconsole.c b/drivers/firmware/google/memconsole.c
index 2f569aaed4c7..fd5041716860 100644
--- a/drivers/firmware/google/memconsole.c
+++ b/drivers/firmware/google/memconsole.c
@@ -52,14 +52,15 @@ static ssize_t memconsole_read(struct file *filp, struct kobject *kobp,
 	char *memconsole;
 	ssize_t ret;
 
-	memconsole = ioremap_cache(memconsole_baseaddr, memconsole_length);
+	memconsole = memremap(memconsole_baseaddr, memconsole_length,
+			MEMREMAP_WB);
 	if (!memconsole) {
-		pr_err("memconsole: ioremap_cache failed\n");
+		pr_err("memconsole: memremap failed\n");
 		return -ENOMEM;
 	}
 	ret = memory_read_from_buffer(buf, count, &pos, memconsole,
 				      memconsole_length);
-	iounmap(memconsole);
+	memunmap(memconsole);
 	return ret;
 }
 


  parent reply	other threads:[~2015-10-09 22:25 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 22:15 [PATCH 00/20] tree-wide convert to memremap() Dan Williams
2015-10-09 22:15 ` [PATCH 01/20] x86: introduce arch_memremap() Dan Williams
2015-10-09 22:15 ` [PATCH 02/20] arm: " Dan Williams
2015-10-09 22:15 ` [PATCH 03/20] ia64: " Dan Williams
2015-10-09 22:15 ` [PATCH 04/20] sh: " Dan Williams
2015-10-09 22:16 ` [PATCH 05/20] m68k: " Dan Williams
2015-10-09 22:16 ` [PATCH 06/20] arm: switch from ioremap_cache to memremap Dan Williams
2015-10-09 22:16 ` [PATCH 07/20] x86: " Dan Williams
2015-10-09 22:16 ` [PATCH 08/20] gma500: switch from acpi_os_ioremap " Dan Williams
2015-10-09 22:16 ` [PATCH 09/20] i915: " Dan Williams
2015-10-12  7:01   ` [Intel-gfx] " Daniel Vetter
2015-10-12 21:12     ` Williams, Dan J
2015-10-13  8:24       ` Daniel Vetter
2015-10-13 16:24         ` Dan Williams
2015-10-14  7:33           ` Daniel Vetter
2015-10-09 22:16 ` [PATCH 10/20] acpi: switch from ioremap_cache " Dan Williams
2015-10-09 22:16 ` [PATCH 11/20] sound, skylake: " Dan Williams
2015-10-19 15:26   ` Mark Brown
2015-10-19 15:34     ` Takashi Iwai
2015-10-19 16:08       ` Mark Brown
2015-10-19 16:59         ` Dan Williams
2015-10-09 22:16 ` Dan Williams [this message]
2015-10-09 22:16 ` [PATCH 13/20] intel-iommu: " Dan Williams
2015-10-12 21:58   ` Joerg Roedel
2015-10-12 22:05     ` Dan Williams
2015-10-12 22:19       ` Dan Williams
2015-10-14 13:22         ` Joerg Roedel
2015-10-09 22:16 ` [PATCH 14/20] pxa2xx-flash: " Dan Williams
2015-10-12 17:58   ` Brian Norris
2015-10-12 20:31     ` Brian Norris
2015-10-12 20:36       ` Dan Williams
2015-10-09 22:16 ` [PATCH 15/20] sfi: " Dan Williams
2015-10-09 22:17 ` [PATCH 16/20] fbdev: switch from ioremap_wt " Dan Williams
2015-10-09 22:17 ` [PATCH 17/20] arch: kill ioremap_cached() Dan Williams
2015-10-09 22:17 ` [PATCH 18/20] arch: kill ioremap_fullcache() Dan Williams
2015-10-09 22:17 ` [PATCH 19/20] arch: remove ioremap_cache, replace with arch_memremap Dan Williams
2015-10-09 22:17 ` [PATCH 20/20] arch: remove ioremap_wt, optionally " Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151009221641.32203.201.stgit@dwillia2-desk3.jf.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikew@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome