Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7404533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:16:07+00:00 2026-05-29T05:16:07+00:00

I am considering an upcoming situation in an embedded Linux project (no hardware yet)

  • 0

I am considering an upcoming situation in an embedded Linux project (no hardware yet) where two external chips will need to share a single physical IRQ line. This line is capable in hardware of edge triggering but not level triggered interrupts.

Looking at the shared irq support in Linux, I understand that the way this would work with two separate drivers is that each would have their interrupt handler called, check their hardware and handle if appropriate.

However I imagine the following race condition and would like to know if I’m missing something or what might be done to work around this. Let’s say there are two external interrupt sources, devices A and B:

  1. device B interrupt occurs, IRQ goes active
  2. IRQ edge causes Linux core interrupt handler to run
  3. ISR for device A runs, finds no interrupt pending
  4. device A interrupt occurs, IRQ stays active (wire-OR)
  5. ISR for device B runs, finds interrupt pending, handles and clears it
  6. core interrupt handler exits
  7. IRQ stays active, no more edges are generated, IRQ is locked up

It seems that for this to be fixed, the core interrupt handler would have to check the IRQ level after running all handlers, and if still active, run them all again. Will Linux do this? I don’t think the interrupt core knows how to check the level of an IRQ line.

Is this race something that can actually happen, and if so how do I deal with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:16:08+00:00Added an answer on May 29, 2026 at 5:16 am

    Basically, with the hardware you’ve described, doing a wired-or for the interrupts will NEVER work correctly on it’s own.

    If you want to do wired-or, you really need to be using level-sensitive IRQ inputs. If that’s not feasible, then perhaps you can add in some kind of interrupt controller. That device would take N level-sensitive inputs, and have one output, and some kind of ‘clear’. When the interrupt controller gets a clear it would lower it’s output, then re-assert the output if any of it’s inputs were still asserted.

    On the software side, you could look at is running the IRQ line to another processor input. This would allow you to at least check the state, but the Linux core ISR handling isn’t going to know anything about this, and so you’ll have to patch in something to get it to check it and cycle through the ISRs again. Also, this means that in heavy interrupt loading situations you’re NEVER going to get out of this ISR. Given that you’re doing a wire-or on the IRQs, I’m kind of assuming these devices won’t be interrupting too often.

    One other thing is to look really hard at the processor. There may be some kind of trick you can pull with the interrupt setup in order to get it to recognize the interrupt again.

    I wouldn’t try anything too tricky myself, I’d either separate the sources onto separate IRQ inputs, change to a level-sensitive input, or add an interrupt controller chip.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am considering Erlang as a potential for my upcoming project. I need a
An upcoming project of mine is considering a design that involves (what I'm calling)
I have an embedded (updatable) tree structure in an array - considering the upcoming
I'm considering to use AutoMapper in the upcoming project and trying to find possible
Considering the following two usage scenarios (exactly as you see them, that is, the
Considering an array of strings: $array = ('hello', 'hello1', 'hello2'); I need to preg_quote($value,'/');
considering that each shipment takes two minutes and I have 500 users to send,
For some caching I'm thinking of doing for an upcoming project, I've been thinking
I'm considering using CouchDB for an upcoming site, but I'm a little confused as
Considering next two classes : struct Base { virtual ~Base() { } virtual void

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.