Re: ptep_establish/establish_pte needs set_pte_atomic and all set_ptemust be written in asm

From: Rik van Riel
Date: Sat Sep 25 2004 - 19:37:01 EST


On Sun, 26 Sep 2004, Andrea Arcangeli wrote:

> But even ppc64 is wrong as far as C is concerned,

Looks fine to me. From include/asm-ppc64/pgtable.h

static inline void set_pte(pte_t *ptep, pte_t pte)
{
if (pte_present(*ptep)) {
pte_clear(ptep);
flush_tlb_pending();
}
*ptep = __pte(pte_val(pte)) & ~_PAGE_HPTEFLAGS;
}


--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

-
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/