linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/video/fbdev: use ioremap_wc() instead of __ioremap(_PAGE_NO_CACHE)
@ 2018-08-24 10:16 Christophe Leroy
  2018-08-24 11:05 ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: Christophe Leroy @ 2018-08-24 10:16 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: dri-devel, linux-fbdev, linux-kernel, linuxppc-dev

_PAGE_NO_CACHE is a target specific flag. Prefer generic functions.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 drivers/video/fbdev/chipsfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/chipsfb.c b/drivers/video/fbdev/chipsfb.c
index f103665cad43..48fbc22d6867 100644
--- a/drivers/video/fbdev/chipsfb.c
+++ b/drivers/video/fbdev/chipsfb.c
@@ -401,7 +401,7 @@ static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
 #endif /* CONFIG_PMAC_BACKLIGHT */
 
 #ifdef CONFIG_PPC
-	p->screen_base = __ioremap(addr, 0x200000, _PAGE_NO_CACHE);
+	p->screen_base = ioremap_wc(addr, 0x200000);
 #else
 	p->screen_base = ioremap(addr, 0x200000);
 #endif
-- 
2.13.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers/video/fbdev: use ioremap_wc() instead of __ioremap(_PAGE_NO_CACHE)
  2018-08-24 10:16 [PATCH] drivers/video/fbdev: use ioremap_wc() instead of __ioremap(_PAGE_NO_CACHE) Christophe Leroy
@ 2018-08-24 11:05 ` Segher Boessenkool
  2018-08-24 11:10   ` Christophe LEROY
  0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2018-08-24 11:05 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Bartlomiej Zolnierkiewicz, linux-fbdev, linuxppc-dev,
	linux-kernel, dri-devel

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?


Segher

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers/video/fbdev: use ioremap_wc() instead of __ioremap(_PAGE_NO_CACHE)
  2018-08-24 11:05 ` Segher Boessenkool
@ 2018-08-24 11:10   ` Christophe LEROY
  0 siblings, 0 replies; 3+ messages in thread
From: Christophe LEROY @ 2018-08-24 11:10 UTC (permalink / raw)
  To: Segher Boessenkool
  Cc: Bartlomiej Zolnierkiewicz, linux-fbdev, linuxppc-dev,
	linux-kernel, dri-devel



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-24 11:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-24 10:16 [PATCH] drivers/video/fbdev: use ioremap_wc() instead of __ioremap(_PAGE_NO_CACHE) Christophe Leroy
2018-08-24 11:05 ` Segher Boessenkool
2018-08-24 11:10   ` Christophe LEROY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).