Re: [PATCH 4/4] Hugetlb: Copy on Write support

From: Rohit Seth
Date: Wed Nov 09 2005 - 20:46:51 EST


On Wed, 2005-11-09 at 17:39 -0600, Adam Litke wrote:

>
> +#define huge_ptep_set_wrprotect(mm, addr, ptep) \
> + ptep_set_wrprotect(mm, addr, ptep)
> +static inline void set_huge_ptep_writable(struct vm_area_struct *vma,
> + unsigned long address, pte_t *ptep)
> +{
> + pte_t entry;
> +
> + entry = pte_mkwrite(pte_mkdirty(*ptep));
> + ptep_set_access_flags(vma, address, ptep, entry, 1);
> + update_mmu_cache(vma, address, entry);
> +}

lazy_mmu_prot_update will need to called here to make caches coherent
for some archs.

-rohit

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/