[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <78342b34-1a47-26a5-1636-0f7f64588c73@c-s.fr>
Date: Fri, 24 Aug 2018 13:10:37 +0200
From: Christophe LEROY <christophe.leroy@....fr>
To: Segher Boessenkool <segher@...nel.crashing.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
linux-fbdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] drivers/video/fbdev: use ioremap_wc() instead of
__ioremap(_PAGE_NO_CACHE)
Le 24/08/2018 à 13:05, Segher Boessenkool a écrit :
> On Fri, Aug 24, 2018 at 10:16:22AM +0000, Christophe Leroy wrote:
>> _PAGE_NO_CACHE is a target specific flag. Prefer generic functions.
>
>> #ifdef CONFIG_PPC
>> - p->screen_base = __ioremap(addr, 0x200000, _PAGE_NO_CACHE);
>> + p->screen_base = ioremap_wc(addr, 0x200000);
>> #else
>
> But that is not the same. I think you want ioremap_nocache?
>
>
No, ioremap_nocache() is _PAGE_NO_CACHE | _PAGE_GUARDED
/arch/powerpc/include/asm/io.h
#define ioremap_nocache(addr, size) ioremap((addr), (size))
/arch/powerpc/mm/pgtable_32.c:
void __iomem *
ioremap_wc(phys_addr_t addr, unsigned long size)
{
return __ioremap_caller(addr, size, _PAGE_NO_CACHE,
__builtin_return_address(0));
}
void __iomem *
ioremap(phys_addr_t addr, unsigned long size)
{
return __ioremap_caller(addr, size, _PAGE_NO_CACHE | _PAGE_GUARDED,
__builtin_return_address(0));
}
Christophe
Powered by blists - more mailing lists