[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1316027810.3466.78.camel@mfleming-mobl1.ger.corp.intel.com>
Date: Wed, 14 Sep 2011 20:16:50 +0100
From: Matt Fleming <matt@...sole-pimps.org>
To: huang ying <huang.ying.caritas@...il.com>
Cc: Zhang Rui <rui.zhang@...el.com>,
LKML <linux-kernel@...r.kernel.org>,
Matthew Garrett <mjg59@...f.ucam.org>, x86@...nel.org
Subject: Re: [PATCH] EFI: Do not use __pa() to get the physical address of
an ioremapped memory range
On Tue, 2011-09-13 at 16:48 +0800, huang ying wrote:
> On Mon, Sep 12, 2011 at 10:52 PM, Matt Fleming <matt@...sole-pimps.org> wrote:
> > On Fri, 2011-09-02 at 13:12 +0800, huang ying wrote:
> >> On Thu, Sep 1, 2011 at 8:28 PM, Matt Fleming <matt@...sole-pimps.org> wrote:
> >> >
> >> > Hmm.. does anyone know why we ioremap_cache() the memory on
> >> > CONFIG_X86_32 instead of ioremap_nocache()? In the case of
> >> > EFI_MEMORY_MAPPED_IO the memory really needs to be uncached. Then if
> >> > we've ioremap'd the memory we should skip set_memory_uc() altogether,
> >> > no?
> >>
> >> Because whether the mapping should be cached is determined by md->attr
> >> instead of md->type. And besides UC, we may add WC, etc support.
> >
> > Confused.
> >
> > The CONFIG_X86_64 version of efi_ioremap() looks like this,
> >
> > void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size,
> > u32 type)
> > {
> > unsigned long last_map_pfn;
> >
> > if (type == EFI_MEMORY_MAPPED_IO)
> > return ioremap(phys_addr, size);
> >
> > Which uses md->type to figure out if we should call ioremap(), which on
> > x86 is #define'd to ioremap_nocache(). CONFIG_X86_32 doesn't do this,
> > but it looks to me like it should.
>
> I don't think this type based solution is the perfect one.
Why? What else would you suggest?
--
Matt Fleming, Intel Open Source Technology Center
--
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