[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4g30QqO2+vmhfFi6Mw3pku=BkEmvUbzxMme4nm8SkHyrQ@mail.gmail.com>
Date: Sat, 30 May 2015 14:16:28 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Juergen Gross <jgross@...e.com>, X86 ML <x86@...nel.org>,
"Kani, Toshimitsu" <toshi.kani@...com>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
Luis Rodriguez <mcgrof@...e.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Stefan Bader <stefan.bader@...onical.com>,
Andy Lutomirski <luto@...capital.net>, linux-mm@...ck.org,
geert@...ux-m68k.org, Henrique de Moraes Holschuh <hmh@....eng.br>,
Tejun Heo <tj@...nel.org>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v2 2/4] devm: fix ioremap_cache() usage
On Sat, May 30, 2015 at 1:52 PM, Arnd Bergmann <arnd@...db.de> wrote:
> On Saturday 30 May 2015, Dan Williams wrote:
>> @@ -154,7 +148,7 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res)
>> }
>>
>> if (res->flags & IORESOURCE_CACHEABLE)
>> - dest_ptr = devm_ioremap(dev, res->start, size);
>> + dest_ptr = devm_ioremap_cache(dev, res->start, size);
>> else
>> dest_ptr = devm_ioremap_nocache(dev, res->start, size);
>
> I think the existing uses of IORESOURCE_CACHEABLE are mostly bugs, so changing
> the behavior here may cause more problems than it solves.
>
Ok, but that effectively makes devm_ioremap_resource() unusable for
the cached case. How about introducing devm_ioremap_cache_resource(),
and cleaning up devm_ioremap_resource() to stop pretending that it is
honoring the memory type of the resource?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists