linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* local_irq_save not masking interrupts
@ 2006-09-26 10:00 Alex Zeffertt
  2006-09-26 10:19 ` Liu Dave-r63238
  2006-09-27 16:52 ` Esben Nielsen
  0 siblings, 2 replies; 9+ messages in thread
From: Alex Zeffertt @ 2006-09-26 10:00 UTC (permalink / raw)
  To: linuxppc-embedded

Hi list,

I'm having a strange problem with interrupts.  My platform is the
MPC832xEMDS and the BSP I'm using (from Freescale) uses Linux-2.6.11.

In the code below I enter a critical section with local_irq_save(),
call request_irq() (from mpc832xemds_phy_interrupt_enable) 4 times,
then exit the critical section using local_irq_restore.

     /* Enable interrupts from PHYs */
     local_irq_save(flags);
     for (i = 0; i < driver_data->num_phys; i++) {
         struct atm_dev *dev = driver_data->dev_data[i]->dev;
         printk("%s/%d\n",__FUNCTION__,__LINE__);
         RETURN_ON_ERROR(mpc832xemds_phy_interrupt_enable(dev));
     }
     local_irq_restore(flags);

The problem is that I get an interrupt *before* exiting the critical
section.  This causes a problem for me, because the interrupts are
shared and the correct handler has not yet been registered, so the
interrupt never gets deasserted.

My question is: why is local_irq_save()/local_irq_restore() not
working?

TIA,

Alex

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-09-27 16:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-26 10:00 local_irq_save not masking interrupts Alex Zeffertt
2006-09-26 10:19 ` Liu Dave-r63238
2006-09-26 10:28   ` Alex Zeffertt
2006-09-26 16:02     ` Scott Wood
2006-09-26 16:17       ` Alex Zeffertt
2006-09-26 16:27         ` Scott Wood
2006-09-26 16:42           ` Alex Zeffertt
2006-09-26 16:52             ` Scott Wood
2006-09-27 16:52 ` Esben Nielsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).