Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1192250 > unrolled thread
| Started by | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| First post | 2015-07-25 04:50 +0200 |
| Last post | 2015-07-26 00:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 15/25] memconsole: fix __iomem mishandling, switch to memremap Dan Williams <dan.j.williams@intel.com> - 2015-07-25 04:50 +0200
Re: [PATCH v2 15/25] memconsole: fix __iomem mishandling, switch to memremap Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-07-26 00:10 +0200
| From | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| Date | 2015-07-25 04:50 +0200 |
| Subject | [PATCH v2 15/25] memconsole: fix __iomem mishandling, switch to memremap |
| Message-ID | <pPXHb-8h4-15@gated-at.bofh.it> |
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..1b25fba84f32 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_CACHE);
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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Date | 2015-07-26 00:10 +0200 |
| Subject | Re: [PATCH v2 15/25] memconsole: fix __iomem mishandling, switch to memremap |
| Message-ID | <pQfNL-Bi-1@gated-at.bofh.it> |
| In reply to | #1192250 |
Hello.
On 07/25/2015 05:39 AM, Dan Williams wrote:
> 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..1b25fba84f32 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_CACHE);
Could you maintain the existing style of the broken line alignment in this
file?
> 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);
Here's an example...
> - iounmap(memconsole);
> + memunmap(memconsole);
> return ret;
> }
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web