Re: Problem when disabled interrupt in system call (ppc8270)

2009-10-16 Thread Gabriel Paubert
On Fri, Oct 16, 2009 at 09:12:34AM +0800, wilbur.chan wrote: > ppc 8270, kernel 2.6.21.7 > > I took the following steps: > > > In a system call function , say , sys_reboot, interrupt was disabled > by local_irq_disable. > > Then , value at the address of 0xc50 was set to a value , say , >

Re: Problem when disabled interrupt in system call (ppc8270)

2009-10-15 Thread wilbur.chan
2009/10/16, Benjamin Herrenschmidt : > On Fri, 2009-10-16 at 09:12 +0800, wilbur.chan wrote: > >> static inline unsigned long local_irq_disable(void) >> { >> unsigned long flags, zero; >> >> __asm__ __volatile__("li %1,0; lbz %0,%2(13); stb %1,%2(13)" >> : "=r" (flags), "=&r" (zero)

Re: Problem when disabled interrupt in system call (ppc8270)

2009-10-15 Thread Benjamin Herrenschmidt
On Fri, 2009-10-16 at 09:12 +0800, wilbur.chan wrote: > static inline unsigned long local_irq_disable(void) > { > unsigned long flags, zero; > > __asm__ __volatile__("li %1,0; lbz %0,%2(13); stb %1,%2(13)" > : "=r" (flags), "=&r" (zero) > : "i" (offsetof(struct paca_struct

Problem when disabled interrupt in system call (ppc8270)

2009-10-15 Thread wilbur.chan
ppc 8270, kernel 2.6.21.7 I took the following steps: In a system call function , say , sys_reboot, interrupt was disabled by local_irq_disable. Then , value at the address of 0xc50 was set to a value , say , 0x1234. Code was like this : sys_reboot() { local_irq_disable(); *(volatile un