All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Zeffertt <ajz@cambridgebroadband.com>
To: Liu Dave-r63238 <DaveLiu@freescale.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: local_irq_save not masking interrupts
Date: Tue, 26 Sep 2006 11:28:00 +0100	[thread overview]
Message-ID: <451900B0.7010006@cambridgebroadband.com> (raw)
In-Reply-To: <995B09A8299C2C44B59866F6391D263516C42D@zch01exm21.fsl.freescale.net>

Liu Dave-r63238 wrote:
> <snip>
>> 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?
> 
> Really? local_irq_save not working?
> I don't believe it. 
> Please check if exist any re-enable the interrupt in the critical
> section.
> 
> -DAve


Well, mpc832xemds_phy_interrupt_enable() does nothing except call
request_irq(,,SA_SHIRQ,,).  I suspect that request_irq() is somehow
reenabling interrupts, but I can't see where it might be doing so.

Is this a possible?

Alex

  reply	other threads:[~2006-09-26 10:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=451900B0.7010006@cambridgebroadband.com \
    --to=ajz@cambridgebroadband.com \
    --cc=DaveLiu@freescale.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.