Re: [PATCH 7/8] UML - add virt_to_pte

2007-11-17 Thread Jeff Dike
On Sat, Nov 17, 2007 at 11:50:07AM +0100, Roel Kluin wrote: > > + if (!pte_present(*pte)) > > + pte = NULL; > > shouldn't you check again for (pte == NULL)? No, because if the page isn't mapped, handle_page_fault would have returned non-zero, and we would have already returned. This

Re: [PATCH 7/8] UML - add virt_to_pte

2007-11-17 Thread Roel Kluin
Jeff Dike wrote: > Turn um_virt_to_phys into virt_to_pte, cleaning up a horrid interface. > > It's also made non-static and declared in pgtable.h because it'll be > needed when the stubs get a vma. > > Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> > --- > arch/um/kernel/skas/uaccess.c | 56 >

Re: [PATCH 7/8] UML - add virt_to_pte

2007-11-17 Thread Roel Kluin
Jeff Dike wrote: Turn um_virt_to_phys into virt_to_pte, cleaning up a horrid interface. It's also made non-static and declared in pgtable.h because it'll be needed when the stubs get a vma. Signed-off-by: Jeff Dike [EMAIL PROTECTED] --- arch/um/kernel/skas/uaccess.c | 56

Re: [PATCH 7/8] UML - add virt_to_pte

2007-11-17 Thread Jeff Dike
On Sat, Nov 17, 2007 at 11:50:07AM +0100, Roel Kluin wrote: + if (!pte_present(*pte)) + pte = NULL; shouldn't you check again for (pte == NULL)? No, because if the page isn't mapped, handle_page_fault would have returned non-zero, and we would have already returned. This is

[PATCH 7/8] UML - add virt_to_pte

2007-11-16 Thread Jeff Dike
Turn um_virt_to_phys into virt_to_pte, cleaning up a horrid interface. It's also made non-static and declared in pgtable.h because it'll be needed when the stubs get a vma. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- arch/um/kernel/skas/uaccess.c | 56

[PATCH 7/8] UML - add virt_to_pte

2007-11-16 Thread Jeff Dike
Turn um_virt_to_phys into virt_to_pte, cleaning up a horrid interface. It's also made non-static and declared in pgtable.h because it'll be needed when the stubs get a vma. Signed-off-by: Jeff Dike [EMAIL PROTECTED] --- arch/um/kernel/skas/uaccess.c | 56