kernels/linux-2.4.0/arch/ppc/mm/fault.c
/* The pgtable.h claims some functions generically exist, but I
 * can't find them......
 */
The pgtable.h claims some functions generically exist, but I
can't find them
The pgtable . h claims some functions generically exist but I can ' t find them
pte_t *va_to_pte(unsigned long address)
{
	pgd_t *dir;
	pmd_t *pmd;
	pte_t *pte;
	struct mm_struct *mm;
	if (address < TASK_SIZE)
		mm = current->mm;
	else
		mm = &init_mm;
	dir = pgd_offset(mm, address & PAGE_MASK);
	if (dir) {
		pmd = pmd_offset(dir, address & PAGE_MASK);
		if (pmd && pmd_present(*pmd)) {
			pte = pte_offset(pmd, address & PAGE_MASK);
			if (pte && pte_present(*pte)) {
				return(pte);
			}
		}
		else {
			return (0);
		}
	}
	else {
		return (0);
	}
	return (0);
}
pte_t * va_to_pte ( unsigned long address ) { pgd_t * dir ; pmd_t * pmd ; pte_t * pte ; struct mm_struct * mm ; if ( address < TASK_SIZE ) mm = current -> mm ; else mm = & init_mm ; dir = pgd_offset ( mm , address & PAGE_MASK ) ; if ( dir ) { pmd = pmd_offset ( dir , address & PAGE_MASK ) ; if ( pmd && pmd_present ( * pmd ) ) { pte = pte_offset ( pmd , address & PAGE_MASK ) ; if ( pte && pte_present ( * pte ) ) { return ( pte ) ; } } else { return ( 0 ) ; } } else { return ( 0 ) ; } return ( 0 ) ; }
The pgtable.h claims some functions generically exist, but I
 can't find them......
The pgtable . h claims some functions generically exist but I can ' t find them ......