Skip to contentSkip to conversation

switching to interrupt contex when no interrupts

DISCUSSION arun4linux 2 participants 3 messages Nov 23, 2002 – Nov 24, 2002

lore
Share & tools
lore

arun4linux

author
#0 lore raw

Hello,

<<One is forced to run in interrupt context in an
interrupt handler.

Quoted 1 line
Quoted 1 line

Yes. But my requirement is to force my code to run in interrupt context.

<<Possibility is undefined here because what you said makes no sense.

You will get a better answer from the list if you describe what you are trying to do (in concrete terms), not how you think you might do it.

Quoted 1 line
Quoted 1 line

My requirement is to simulate a PCI based controller and its behaviour in software. I knew the different type of interrupts and the timings my device produces.

I need to simulate this PCI device, its interrupts in sequence and I have to process them in my driver software.

Hope this make sense now.

Anyway, my requrirement is to simulate the interrupts and process them in the interrupt context.

It would be helpful, if anyone could help me how to do it.
My idea is to use task queues and bottom halves for this. But I'd like to get clarified on simulating interrupts (rasing the process/task context to interrupt context) and its consequences.

Thanks & Warm Regards
Arun

"John K Luebs" wrote:

On Sat, Nov 23, 2002 at 07:37:33AM +0530, arun4linux wrote:
&gt; Hello,
&gt;
&gt; I'd like to force my kernel module to run at interrupt context at some specific points/time and then come back from interrrupt contex after executing that particular portion of code..

You seem to be over complexifying what interrupt context is. It is simply a generic term for a context that executes on account of an architecture interrupt. One is forced to run in interrupt context in an interrupt handler.

You "run" in interrupt context by calling request_irq attached to the interrupt line that you are interested in installing a handler for.

&gt;
&gt; Is it possible?

Possibility is undefined here because what you said makes no sense.

You will get a better answer from the list if you describe what you are trying to do (in concrete terms), not how you think you might do it.

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in

#1 lore raw
Quoted 13 lines · arun4linux wrote:

Hello,

<<One is forced to run in interrupt context in an
interrupt handler.

Quoted 1 line
Quoted 1 line

Yes. But my requirement is to force my code to run in interrupt context.

<<Possibility is undefined here because what you said makes no sense.

You will get a better answer from the list if you describe what you are trying to do (in concrete terms), not how you think you might do it.

Quoted 1 line
Quoted 1 line

My requirement is to simulate a PCI based controller and its behaviour in software. I knew the different type of interrupts and the timings my device produces.

Quoted 9 lines

I need to simulate this PCI device, its interrupts in sequence and I have to process them in my driver software.

Hope this make sense now.

Anyway, my requrirement is to simulate the interrupts and process them in the interrupt context.

It would be helpful, if anyone could help me how to do it.
My idea is to use task queues and bottom halves for this. But I'd like to get clarified on simulating interrupts (rasing the process/task context to interrupt context) and its consequences.

Why simulate the interrupts when you can just program them? On the x86 machine the "int x" instruction generates an interrupt to irq "x"+32. You do need to be in kernel land to do this, but then I assume that is not a problem.

-g

Quoted 36 lines

Thanks & Warm Regards
Arun

"John K Luebs" wrote:

On Sat, Nov 23, 2002 at 07:37:33AM +0530, arun4linux wrote:
&gt; Hello,
&gt;
&gt; I'd like to force my kernel module to run at interrupt context at some specific points/time and then come back from interrrupt contex after executing that particular portion of code..

You seem to be over complexifying what interrupt context is. It is simply a generic term for a context that executes on account of an architecture interrupt. One is forced to run in interrupt context in an interrupt handler.

You "run" in interrupt context by calling request_irq attached to the interrupt line that you are interested in installing a handler for.

&gt;
&gt; Is it possible?

Possibility is undefined here because what you said makes no sense.

You will get a better answer from the list if you describe what you are trying to do (in concrete terms), not how you think you might do it.

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 5 lines
George Anzinger   [email protected]
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
#2 lore raw
Quoted 21 lines · george anzinger
Quoted 19 lines · arun4linux wrote:

Hello,

<<One is forced to run in interrupt context in an
interrupt handler.

Quoted 1 line
Quoted 1 line

Yes. But my requirement is to force my code to run in interrupt context.

<<Possibility is undefined here because what you said makes no sense.

You will get a better answer from the list if you describe what you are trying to do (in concrete terms), not how you think you might do it.

Quoted 1 line
Quoted 1 line

My requirement is to simulate a PCI based controller and its behaviour in software. I knew the different type of interrupts and the timings my device produces.

I need to simulate this PCI device, its interrupts in sequence and I have to process them in my driver software.

Hope this make sense now.

Anyway, my requrirement is to simulate the interrupts and process them in the interrupt context.

Quoted 7 lines
Quoted 3 lines

It would be helpful, if anyone could help me how to do it.
My idea is to use task queues and bottom halves for this. But I'd like to get clarified on simulating interrupts (rasing the process/task context to interrupt context) and its consequences.

Why simulate the interrupts when you can just program them? On the x86 machine the "int x" instruction generates an interrupt to irq "x"+32. You do need to be in kernel land to do this, but then I assume that is not a problem.

Uh, make that "x"-32, i.e. "int 34" give irq 2.

-g

Quoted 51 lines

-g

Quoted 29 lines

Thanks & Warm Regards
Arun

"John K Luebs" wrote:

On Sat, Nov 23, 2002 at 07:37:33AM +0530, arun4linux wrote:
&gt; Hello,
&gt;
&gt; I'd like to force my kernel module to run at interrupt context at some specific points/time and then come back from interrrupt contex after executing that particular portion of code..

You seem to be over complexifying what interrupt context is. It is simply a generic term for a context that executes on account of an architecture interrupt. One is forced to run in interrupt context in an interrupt handler.

You "run" in interrupt context by calling request_irq attached to the interrupt line that you are interested in installing a handler for.

&gt;
&gt; Is it possible?

Possibility is undefined here because what you said makes no sense.

You will get a better answer from the list if you describe what you are trying to do (in concrete terms), not how you think you might do it.

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

Quoted 7 lines

Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
George Anzinger [email protected]
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 5 lines
George Anzinger   [email protected]
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml