Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755094AbbGYWCj (ORCPT ); Sat, 25 Jul 2015 18:02:39 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:33034 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754872AbbGYWCh (ORCPT ); Sat, 25 Jul 2015 18:02:37 -0400 Subject: Re: [PATCH v2 15/25] memconsole: fix __iomem mishandling, switch to memremap To: Dan Williams , tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com References: <20150725023649.8664.59145.stgit@dwillia2-desk3.amr.corp.intel.com> <20150725023923.8664.66965.stgit@dwillia2-desk3.amr.corp.intel.com> Cc: linux-arch@vger.kernel.org, toshi.kani@hp.com, linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org, Mike Waychison , rmk+kernel@arm.linux.org.uk, hch@lst.de, linux-arm-kernel@lists.infradead.org From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <55B40778.4010909@cogentembedded.com> Date: Sun, 26 Jul 2015 01:02:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150725023923.8664.66965.stgit@dwillia2-desk3.amr.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1662 Lines: 51 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 > Signed-off-by: Dan Williams > --- > 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/