lkml.org 
[lkml]   [2008]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] UIO: only call pgprot_noncached if defined
There seem to be archs that cannot easily implement a sensible
pgprot_noncached() function, so we should merge this patch. UIO doesn't
compile on these archs right now.

Thanks,
Hans

On Wed, Oct 29, 2008 at 01:26:17PM -0400, Mike Frysinger wrote:
> Not all arches support pgprot_noncached (like the Blackfin port). Other
> drivers seem to handle this by checking to see if it is defined, so let's
> do that in the UIO driver as well.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Signed-off-by: Hans J. Koch <hjk@linutronix.de>

> ---
> drivers/uio/uio.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
> index f9b4647..c43dbea 100644
> --- a/drivers/uio/uio.c
> +++ b/drivers/uio/uio.c
> @@ -529,7 +529,9 @@ static int uio_mmap_physical(struct vm_area_struct *vma)
>
> vma->vm_flags |= VM_IO | VM_RESERVED;
>
> +#ifdef pgprot_noncached
> vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> +#endif
>
> return remap_pfn_range(vma,
> vma->vm_start,
> --
> 1.6.0.2


\
 
 \ /
  Last update: 2008-11-05 12:39    [W:0.089 / U:1.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site