Re: MAP_NR for 2.4
On Fri, Oct 20, 2000 at 12:38:57PM +0530, [EMAIL PROTECTED] wrote: > for using MAP_NR with 2.4, i think you can use > macro like > > #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >>PAGE_SHIFT) This only works for contiguous memory. Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: MAP_NR
In article <[EMAIL PROTECTED]>, Mike Galbraith <[EMAIL PROTECTED]> wrote: >On Thu, 19 Oct 2000 [EMAIL PROTECTED] wrote: > >> can anyone tell the subsitute for MAP_NR in version 2.4? >> or is MAP_NR still there? > >Hi, > >MAP_NR() became virt_to_page() as of test6-pre8. Not quite. The expression "(mem_map + MAP_NR(x))" has become "virt_to_page(x)". There is nothing that is exactly the same as MAP_NR(), because the concept doesn't really exist any more (there are now architectures out there that have multiple page maps, so a single number is not sufficient to describe the page). Now, in 99% of all cases, this is how MAP_NR() was used, and most of the time it's a simple 1:1 translation. In some cases there was one level of indirection, something like int i; for (i = MAP_NR(x) ; i < MAP_NR(y); i++) { ... ... i + mem_map ... ... } and in those cases it needs to be slightly rewritten to use "struct page" pointers instead, ie something like struct page *page, *end; page = virt_to_page(x); end = virt_to_page(y); do { .. } while (++page < end); rather than just a simple expression replacement. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: MAP_NR
In article [EMAIL PROTECTED], Mike Galbraith [EMAIL PROTECTED] wrote: On Thu, 19 Oct 2000 [EMAIL PROTECTED] wrote: can anyone tell the subsitute for MAP_NR in version 2.4? or is MAP_NR still there? Hi, MAP_NR() became virt_to_page() as of test6-pre8. Not quite. The expression "(mem_map + MAP_NR(x))" has become "virt_to_page(x)". There is nothing that is exactly the same as MAP_NR(), because the concept doesn't really exist any more (there are now architectures out there that have multiple page maps, so a single number is not sufficient to describe the page). Now, in 99% of all cases, this is how MAP_NR() was used, and most of the time it's a simple 1:1 translation. In some cases there was one level of indirection, something like int i; for (i = MAP_NR(x) ; i MAP_NR(y); i++) { ... ... i + mem_map ... ... } and in those cases it needs to be slightly rewritten to use "struct page" pointers instead, ie something like struct page *page, *end; page = virt_to_page(x); end = virt_to_page(y); do { .. } while (++page end); rather than just a simple expression replacement. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: MAP_NR for 2.4
On Fri, Oct 20, 2000 at 12:38:57PM +0530, [EMAIL PROTECTED] wrote: for using MAP_NR with 2.4, i think you can use macro like #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) PAGE_SHIFT) This only works for contiguous memory. Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: MAP_NR
On Thu, 19 Oct 2000 [EMAIL PROTECTED] wrote: > can anyone tell the subsitute for MAP_NR in version 2.4? > or is MAP_NR still there? Hi, MAP_NR() became virt_to_page() as of test6-pre8. -Mike - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
RE: MAP_NR for 2.4
for using MAP_NR with 2.4, i think you can use macro like #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >>PAGE_SHIFT) regards anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
RE: MAP_NR for 2.4
for using MAP_NR with 2.4, i think you can use macro like #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) PAGE_SHIFT) regards anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: MAP_NR
On Thu, 19 Oct 2000 [EMAIL PROTECTED] wrote: can anyone tell the subsitute for MAP_NR in version 2.4? or is MAP_NR still there? Hi, MAP_NR() became virt_to_page() as of test6-pre8. -Mike - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: MAP_NR
On Thu, 19 Oct 2000 [EMAIL PROTECTED] wrote: > can anyone tell the subsitute for MAP_NR in version 2.4? > or is MAP_NR still there? > e.g. int i = MAP_NR(buffer); becomes struct page *p = virt_to_page(buffer); I believe ... john - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
MAP_NR
can anyone tell the subsitute for MAP_NR in version 2.4? or is MAP_NR still there? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
MAP_NR
can anyone tell the subsitute for MAP_NR in version 2.4? or is MAP_NR still there? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: MAP_NR
On Thu, 19 Oct 2000 [EMAIL PROTECTED] wrote: can anyone tell the subsitute for MAP_NR in version 2.4? or is MAP_NR still there? e.g. int i = MAP_NR(buffer); becomes struct page *p = virt_to_page(buffer); I believe ... john - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: pte_pagenr/MAP_NR deleted in pre6
On Thu, Aug 17, 2000 at 12:41:52PM -0700, David S. Miller wrote: > ISA is a dead hardware technology and therefore how it works is pretty > much fixed in stone. > > Perhaps some older MIPS machines supporting ISA could benefit from > an API similar to the PCI dma stuff, as Alan mentioned. But that is > the only case which has any merit in my mind. ISA isn't really a consideration for MIPS. All that ISA hardware couldn't be supported by treating it the same as on a x86 system. That's not top efficient but justified given the importance of ISA for MIPS boxes - nearly NIL. Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: pte_pagenr/MAP_NR deleted in pre6
On Thu, Aug 17, 2000 at 12:36:51PM -0700, Kanoj Sarcar wrote: > >Except for the x86 36bit abortion do we need a long long paddr_t on any > >32bit platform ? > > > > Sparc32, mips32... > > > > Not for Indys on mips32. Is there a mips32 port on another machine > (currently in Linux, or port ongoing) that requires this? No. Right now mips32 assumes that all memory is accessible in KSEG0 which limits it to 512mb - $\epsilon$. I don't know of any 32-bit CPU configuration which supports memory than that and for 64-bit processors the policy should be to use mips64 - it's so much saner. Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: pte_pagenr/MAP_NR deleted in pre6
On Thu, Aug 17, 2000 at 12:36:51PM -0700, Kanoj Sarcar wrote: Except for the x86 36bit abortion do we need a long long paddr_t on any 32bit platform ? Sparc32, mips32... Not for Indys on mips32. Is there a mips32 port on another machine (currently in Linux, or port ongoing) that requires this? No. Right now mips32 assumes that all memory is accessible in KSEG0 which limits it to 512mb - $\epsilon$. I don't know of any 32-bit CPU configuration which supports memory than that and for 64-bit processors the policy should be to use mips64 - it's so much saner. Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: pte_pagenr/MAP_NR deleted in pre6
On Thu, Aug 17, 2000 at 12:41:52PM -0700, David S. Miller wrote: ISA is a dead hardware technology and therefore how it works is pretty much fixed in stone. Perhaps some older MIPS machines supporting ISA could benefit from an API similar to the PCI dma stuff, as Alan mentioned. But that is the only case which has any merit in my mind. ISA isn't really a consideration for MIPS. All that ISA hardware couldn't be supported by treating it the same as on a x86 system. That's not top efficient but justified given the importance of ISA for MIPS boxes - nearly NIL. Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/