lkml.org 
[lkml]   [2004]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Make drivers/char/mem.c use remap_pfn_range()
On Thu, 21 Oct 2004, William Lee Irwin III wrote:
>> Odd. I doublechecked the patches I submitted and they actually
>> covered this.

On Fri, Oct 22, 2004 at 07:24:34AM -0700, Linus Torvalds wrote:
> Andrew had a broken patch that shifted the wrong argument by PAGE_SHIFT,
> do you want to take the blame for that one (it shifted the size, not the
> pfn)?


What I posted shifted the correct argument, though vma->vm_pgoff would
have been been better, as it shifted offset right by PAGE_SHIFT, where
offset could have overflowed. I have no idea what you're referring to
about shifting the wrong argument.

This hunk appeared verbatim in my posted patch,
Message-ID: <20040925075102.GG9106@holomorphy.com>:


Index: mm3-2.6.9-rc2/drivers/char/mem.c
===================================================================
--- mm3-2.6.9-rc2.orig/drivers/char/mem.c 2004-09-25 00:21:50.622348424 -0700
+++ mm3-2.6.9-rc2/drivers/char/mem.c 2004-09-25 00:21:57.538297040 -0700
@@ -227,7 +227,7 @@
*/
vma->vm_flags |= VM_RESERVED|VM_IO;

- if (remap_page_range(vma, vma->vm_start, offset,
+ if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT,
vma->vm_end-vma->vm_start, vma->vm_page_prot))
return -EAGAIN;
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.069 / U:42.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site