예제 #1
0
void __glue(_CACHE, _coherent_user_range)(unsigned long start, unsigned long end)
{
	pgd_t *pgd;

	if (current->mm)
		pgd = (pgd_t *)current->mm->pgd;
	else if (current->active_mm)
		pgd = (pgd_t *)current->active_mm->pgd;
	else {
		printk("active_mm: No mm... %lx-%lx\n", start, end);
		return;
	}

	for (start &= PAGE_MASK; start < end; start += PAGE_SIZE) {
		pte_t *ptep = lookup_pte(pgd, start);
		if (ptep && pte_present(*ptep) && pte_mapped(*ptep)) {
			unsigned long k = pte_pfn(*ptep) << PAGE_SHIFT;
			unsigned long e = k + PAGE_SIZE;
			l4_cache_clean_data(k, e);
		}
	}
}
예제 #2
0
파일: tlb.c 프로젝트: CSU-GH/okl4_3.0
void remove_tlb_pte(pte_t *ptep, unsigned long address)
{
	if (pte_mapped(*ptep)) {
		struct mm_struct * curr_mm = current->mm;

#ifdef ARM_PID_RELOC
		if (address < 0x2000000)
			address += ((unsigned long)curr_mm->context.pid << 25);
#endif
#if defined(CONFIG_CELL)
		okl4_unmap_page(&curr_mm->context, address);
#elif defined(CONFIG_IGUANA)
		{
			L4_Fpage_t fpage;
			fpage = L4_FpageLog2(address, PAGE_SHIFT);
			eas_unmap(curr_mm->context.eas, fpage);
		}
#else
#error
#endif
		*ptep = pte_mkunmapped(*ptep);
	}
}