Hi,
Processor Freescale P1020 e500 core based.
Linux is run on core1.
Preemptive mode is disabled.
I have a problem: spin_lock_irqsave() and spin_lock_irqrestore() don't work correctly.
In my configuration spin_lock_irqsave() does nothing except block/unblock all external interrupts on e500 core.
static inline void raw_local_irq_save_ptr(unsigned long *flags)
{
unsigned long msr;
msr = mfmsr();
*flags = msr;
asm __volatile__("wrteei 0": : :"memory");
}
After calling the instruction "wrteei 0" on CPU core1 interruptions still continue to occur (Test on UART interrupts).
Also tried set MSR[EE]=0 and MSR=0 through instruction "mtmsr". After reading register MSR (throught "mfmsr") all bits remain in previous writed state. But interrupt still continue to occur.
Source code used to write in MSR register:
unsigned long msr_value = 0;
asm volatile("mtmsr %0" : : "r" (msr_value) : "memory");
How to repair spin_lock_irqsave() and spin_lock_irqrestore()?
What could be the problem?