[PATCH] Celleb: improve htab lock
Arnd Bergmann
arnd at arndb.de
Thu Feb 8 17:51:44 EST 2007
On Thursday 08 February 2007 07:18, Ishizaki Kou wrote:
> s);
> + local_irq_save(flags);
> + spin_lock(&beat_htab_lock);
> dummy1 = beat_lpar_hpte_getword0(slot);
>
> if ((dummy1 & ~0x7FUL) != (want_v & ~0x7FUL)) {
> DBG_LOW("not found !\n");
> - spin_unlock_irqrestore(&beat_htab_lock, flags);
> + spin_unlock(&beat_htab_lock);
> + local_irq_restore(flags);
> return;
> }
>
> lpar_rc = beat_write_htab_entry(0, slot, 0, 0, HPTE_V_VALID, 0,
> &dummy1, &dummy2);
> - spin_unlock_irqrestore(&beat_htab_lock, flags);
> + spin_unlock(&beat_htab_lock);
> + local_irq_restore(flags);
The function normally used here would be spin_lock_irq()/spin_unlock_irq(),
which does spin_{,un}lock along with local_irq_{save,restore}.
Arnd <><
More information about the Linuxppc-dev
mailing list