|
From: Rene B. <re...@we...> - 2001-09-29 16:57:15
|
Ken Tyler wrote: > > Hello, > > Don't understand what you mean by "last page" or "upper boundary of siz= e". > > Do you mean if I : > > page =3D __get_free_pages(GFP_ATOMIC,1); > > which allocates two pages, the second of which does not have cache mode > set correctly ? Hi, OK, I`l describe it. If you use __get_free_pages(GFP_ATOMIC, 1) you get=20 2 pages and you will probably apply 8192 to the size argument of=20 kernel_set_cachemode(). Thats OK. But if you apply sizeof(struct x) to the size argument and sizeof(struct=20 x) isn`t a multiply of PAGE_SIZE then the last page is not remapped by=20 kernel_set_cachemode(). Because the loop in kernel_set_cachemode() is=20 initialized at value: size =3D size / PAGE_SIZE. If size =3D 10000, so you have to remap 3 pages, but 10000 / 4096 =3D=20 2(u_long) and the loop only remaps 2 pages. I hope now its clear what I mean. > > Thinking about yet another play with the A4091... It`s weekend, have fun... Ciao, Ren=E8 |