Messages in this thread |  | | | Date | Mon, 10 Oct 2005 21:49:38 +0500 | | From | Fawad Lateef <> | | Subject | Re: Need for SHIFT and MASK |
| |
On 10/10/05, Vivek Kutal <vivek.kutal@gmail.com> wrote: > > And as far as SHIFT, MASK, SIZE macros are concerned they are used in > > creating Page Translation Tables and also used to get the translation > > from linear to physical > > how are these macros used to create page translation tables (functions > like pgd_alloc(), pmd_alloc() & pte_alloc() are used for this > purpose)and the translation (virtual/linear to physical)is done by > the processor and not by the OS. > >
Actually I don't mean by mentioning "SHIFT, MASK, SZIE macros are used in creating Page Translation Table" that you will see them in pgd_alloc() etc but they are used in many memory initialization fucntions at the boot time ...... and for example look http://lxr.linux.no/source/arch/i386/mm/init.c#L207 !!!!!! These Macros are might be there for the compatibility reasons tooo as you can see the PAGE_SIZE can be changed but if you use PAGE_SIZE in every module/place you won't be concerned about the actual size of the page at that moment or in Architecture ...........
-- Fawad Lateef - 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/
|  |