linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Add pgprot_writecombine
@ 2011-03-01  6:00 Anton Blanchard
  2011-03-14 18:33 ` Nishanth Aravamudan
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Blanchard @ 2011-03-01  6:00 UTC (permalink / raw)
  To: benh, linuxppc-dev


A number of drivers are using pgprot_writecombine() to enable write
combining on userspace mappings. Implement it on powerpc.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 89f1587..88b0bd9 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -170,6 +170,7 @@ extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long addre
 #define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
 				            _PAGE_COHERENT | _PAGE_WRITETHRU))
 
+#define pgprot_writecombine pgprot_noncached_wc
 
 struct file;
 extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,

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

* Re: [PATCH] powerpc: Add pgprot_writecombine
  2011-03-01  6:00 [PATCH] powerpc: Add pgprot_writecombine Anton Blanchard
@ 2011-03-14 18:33 ` Nishanth Aravamudan
  2011-03-14 18:35   ` Steve Wise
  0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Aravamudan @ 2011-03-14 18:33 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: linuxppc-dev, swise

On 01.03.2011 [17:00:47 +1100], Anton Blanchard wrote:
> 
> A number of drivers are using pgprot_writecombine() to enable write
> combining on userspace mappings. Implement it on powerpc.

Given this patch, should drivers/infiniband/hw/cxgb4/t4.h

be updated?:

static inline pgprot_t t4_pgprot_wc(pgprot_t prot)
{
#if defined(__i386__) || defined(__x86_64__)
        return pgprot_writecombine(prot);
#elif defined(CONFIG_PPC64)
        return __pgprot((pgprot_val(prot) | _PAGE_NO_CACHE) &
                        ~(pgprot_t)_PAGE_GUARDED);
#else
        return pgprot_noncached(prot);
#endif
}

Thanks,
Nish

> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
> index 89f1587..88b0bd9 100644
> --- a/arch/powerpc/include/asm/pgtable.h
> +++ b/arch/powerpc/include/asm/pgtable.h
> @@ -170,6 +170,7 @@ extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long addre
>  #define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
>  				            _PAGE_COHERENT | _PAGE_WRITETHRU))
> 
> +#define pgprot_writecombine pgprot_noncached_wc
> 
>  struct file;
>  extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center

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

* Re: [PATCH] powerpc: Add pgprot_writecombine
  2011-03-14 18:33 ` Nishanth Aravamudan
@ 2011-03-14 18:35   ` Steve Wise
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Wise @ 2011-03-14 18:35 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: linuxppc-dev, Anton Blanchard, swise


On 03/14/2011 01:33 PM, Nishanth Aravamudan wrote:
> On 01.03.2011 [17:00:47 +1100], Anton Blanchard wrote:
>> A number of drivers are using pgprot_writecombine() to enable write
>> combining on userspace mappings. Implement it on powerpc.
> Given this patch, should drivers/infiniband/hw/cxgb4/t4.h
>
> be updated?:
>

Yes.

> static inline pgprot_t t4_pgprot_wc(pgprot_t prot)
> {
> #if defined(__i386__) || defined(__x86_64__)
>          return pgprot_writecombine(prot);
> #elif defined(CONFIG_PPC64)
>          return __pgprot((pgprot_val(prot) | _PAGE_NO_CACHE)&
>                          ~(pgprot_t)_PAGE_GUARDED);
> #else
>          return pgprot_noncached(prot);
> #endif
> }
>
> Thanks,
> Nish
>
>> Signed-off-by: Anton Blanchard<anton@samba.org>
>> ---
>>
>> diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
>> index 89f1587..88b0bd9 100644
>> --- a/arch/powerpc/include/asm/pgtable.h
>> +++ b/arch/powerpc/include/asm/pgtable.h
>> @@ -170,6 +170,7 @@ extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long addre
>>   #define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot)&  ~_PAGE_CACHE_CTL) | \
>>   				            _PAGE_COHERENT | _PAGE_WRITETHRU))
>>
>> +#define pgprot_writecombine pgprot_noncached_wc
>>
>>   struct file;
>>   extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev

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

end of thread, other threads:[~2011-03-14 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-01  6:00 [PATCH] powerpc: Add pgprot_writecombine Anton Blanchard
2011-03-14 18:33 ` Nishanth Aravamudan
2011-03-14 18:35   ` Steve Wise

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).