Hello Sanjay On 9/7/05, sanjay kumar <tousanjay@xxxxxxxxxxx> wrote: > Hi Fawad, > > My understanding differs from you. See my responses > inline. > > --- Fawad Lateef <fawadlateef@xxxxxxxxx> wrote: > > > > > The page pointer returned by the alloc_pages will > > already be mapped on > > to the lower memory (ZONE_NORMAL) > > > > No its not the case. Only if allocated pages comes > from normal zone,they are already mapped (what we call > direct mapping). This is not true for pages allocated > from High memory zone. > > > > > AFAIK, No need to map the pages, they are already > > mapped if in highmemory ..... > > Pages are not already mapped if in high memory, they > need to be explicitly mapped using "kmap" or > "kmap_atomic" to get their virutal addresses. > Here in my module, pages can come from normal zone or > high memory zone (I have passed GFP_HIGHUSER to > alloc_pages())and so I need to explicitly kmap them. > OK, GFP_HIGHUSER will get the pages from HIGHMEM and you have to map them ..... I said they are already mapped b/c I till now havn't used the GFP_HIGHUSER flag with alloc_pages, so I was unable to remember that GFP_HIGHUSER can be used to get pages from highmemory .... Thanks for making me remember !!!!!! -- Fawad Lateef -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/