[fusion] get_mmu_context() in mpc8xx

Heikki Lindholm holindho at cs.helsinki.fi
Tue Aug 30 15:19:09 CEST 2005


Studencki Pawel kirjoitti:
> hello,
> 
> have you tested your linux mpc8xx port with hackbench? running it in a
> script like this one:
> 
> while true; do dd if=/dev/null of=bigfile bs=1048000 count=1024 2>/dev/null;
> done &
> while true; do ./hackbench 1; done & 
> 
> 
> in one of patches discussed on ppc-linux mailing list you protect
> destroy_context() with preempt_disable() and preempt_enable().
> But it does nothing when working with adeos. ADEOS uses get_mmu_context(mm)
> in (include/nucleus/asm-ppc/system.h)
> and this code can preempt native linux call. 
> 
> I try to protect destroy_context() with:
> 
> #ifdef CONFIG_ADEOS_CORE
>         adeos_hw_local_irq_disable(); 
> #endif
> 
> 
> and
> 
> #ifdef CONFIG_ADEOS_CORE
>         adeos_hw_local_irq_enable(); 
> #endif

If you do this, you should at least use the flags versions (maybe 
adeos_lock/unlock_cpu) so that you don't accidentally enable interrupts 
when they were disabled to begin with. I'm not sure whether 
xnarch_switch_to even gets called with irqs enabled...you might want to 
check that, too.

-- Heikki Lindholm




More information about the Rtai mailing list