lkml.org 
[lkml]   [2005]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectremap_pfm_range() Linux-2.6.10

History....

For many years we had:

struct vm_area_struct *vma;

remap_page_range(vma->vm_start, base_addr, len, prot)

Then somebody needed the pointer so it became:

remap_page_range(vma, vma->vm_start, base_addr, len, prot)

Then they changed its name:

remap_pfn_range(vma, vma->vm_start, base_addr >> PAGE_SHIFT, len, prot)

Now, here's the $US0.02 question. Why wasn't PAGE_SHIFT put inside
the new function? The base address cannot ever be used without
PAGE_SHIFT. In previous versions, information hiding was properly
used to hide the implementation details. Now, part of the implementation
detail is exposed to interface code.

Is this going to be removed in the future, forcing another change
to all drivers that use memory-mapping or is this now considered
the correct way to implement a kernel function?

If you are going to put PAGE_SHIFT inside the function, please
do it now so we don't have to modify all the drivers again.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
-
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:09    [W:0.075 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site