* Re: Re: switching to interrupt contex when no interrupts
@ 2002-11-23 19:57 arun4linux
2002-11-24 9:39 ` george anzinger
0 siblings, 1 reply; 5+ messages in thread
From: arun4linux @ 2002-11-23 19:57 UTC (permalink / raw)
To: John K Luebs; +Cc: linux-kernel
Hello,
<<One is forced to run in interrupt context in an
interrupt handler.
>>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.
>>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:
> Hello,
>
> 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.
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: switching to interrupt contex when no interrupts
2002-11-23 19:57 Re: switching to interrupt contex when no interrupts arun4linux
@ 2002-11-24 9:39 ` george anzinger
2002-11-24 16:48 ` george anzinger
0 siblings, 1 reply; 5+ messages in thread
From: george anzinger @ 2002-11-24 9:39 UTC (permalink / raw)
To: arun4linux; +Cc: John K Luebs, linux-kernel
arun4linux wrote:
>
> Hello,
>
> <<One is forced to run in interrupt context in an
> interrupt handler.
> >>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.
>
> >>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.
>
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
>
> Thanks & Warm Regards
> Arun
>
> "John K Luebs" wrote:
>
> On Sat, Nov 23, 2002 at 07:37:33AM +0530, arun4linux wrote:
> > Hello,
> >
> > 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.
>
> >
> > 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: switching to interrupt contex when no interrupts
2002-11-24 9:39 ` george anzinger
@ 2002-11-24 16:48 ` george anzinger
0 siblings, 0 replies; 5+ messages in thread
From: george anzinger @ 2002-11-24 16:48 UTC (permalink / raw)
To: arun4linux, John K Luebs, linux-kernel
george anzinger wrote:
>
> arun4linux wrote:
> >
> > Hello,
> >
> > <<One is forced to run in interrupt context in an
> > interrupt handler.
> > >>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.
> >
> > >>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.
> >
> 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
>
> -g
>
> >
> > Thanks & Warm Regards
> > Arun
> >
> > "John K Luebs" wrote:
> >
> > On Sat, Nov 23, 2002 at 07:37:33AM +0530, arun4linux wrote:
> > > Hello,
> > >
> > > 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.
> >
> > >
> > > 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 majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
>
> --
> George Anzinger george@mvista.com
> 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: switching to interrupt contex when no interrupts
@ 2003-01-02 12:30 arun4linux
2003-01-02 16:30 ` george anzinger
0 siblings, 1 reply; 5+ messages in thread
From: arun4linux @ 2003-01-02 12:30 UTC (permalink / raw)
To: george anzinger, arun4linux, John K Luebs, linux-kernel
Hello,
I used
asm volatile ("int 41");
in my code.
My card's irq number is 9.
I get the error message.
Error: suffix or operabds invalid for 'in'
This is the case, if I change the 41 to 0x29 or 29h.
Where can I get some documentation on using asm?
Warm Regards
Arun
"george anzinger" wrote:
george anzinger wrote:
>
> arun4linux wrote:
> >
> > Hello,
> >
> > <> > interrupt handler.
> > >>Yes. But my requirement is to force my code to run in interrupt context.
> >
> > <> >
> > 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.
> >
> > >>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.
> >
> 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
>
> -g
>
> >
> > Thanks & Warm Regards
> > Arun
> >
> > "John K Luebs" wrote:
> >
> > On Sat, Nov 23, 2002 at 07:37:33AM +0530, arun4linux wrote:
> > > Hello,
> > >
> > > 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.
> >
> > >
> > > 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 majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
>
> --
> George Anzinger george@mvista.com
> 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy the best in Movies at http://www.videos.indiatimes.com
Now bid just 7 Days in Advance and get Huge Discounts on Indian Airlines Flights. So log on to http://indianairlines.indiatimes.com and Bid Now!
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: switching to interrupt contex when no interrupts
2003-01-02 12:30 arun4linux
@ 2003-01-02 16:30 ` george anzinger
0 siblings, 0 replies; 5+ messages in thread
From: george anzinger @ 2003-01-02 16:30 UTC (permalink / raw)
To: arun4linux; +Cc: John K Luebs, linux-kernel
arun4linux wrote:
>
> Hello,
>
> I used
>
> asm volatile ("int 41");
That should be: asm volatile ("int $41");
>
> in my code.
> My card's irq number is 9.
> I get the error message.
>
> Error: suffix or operabds invalid for 'in'
>
> This is the case, if I change the 41 to 0x29 or 29h.
>
> Where can I get some documentation on using asm?
I use the info file that comes with gcc. In emacs it is
^Hi, then search for gcc. There is also an info program for
browsing the info stuff, but I don't use it so don't know
much about it.
-g
>
> Warm Regards
> Arun
>
> "george anzinger" wrote:
>
> george anzinger wrote:
> >
> > arun4linux wrote:
> > >
> > > Hello,
> > >
> > > <> > interrupt handler.
> > > >>Yes. But my requirement is to force my code to run in interrupt context.
> > >
> > > <> >
> > > 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.
> > >
> > > >>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.
> > >
> > 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
> >
> > -g
> >
> > >
> > > Thanks & Warm Regards
> > > Arun
> > >
> > > "John K Luebs" wrote:
> > >
> > > On Sat, Nov 23, 2002 at 07:37:33AM +0530, arun4linux wrote:
> > > > Hello,
> > > >
> > > > 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.
> > >
> > > >
> > > > 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 majordomo@vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > Please read the FAQ at http://www.tux.org/lkml/
> >
> > --
> > George Anzinger george@mvista.com
> > 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 majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
>
> --
> George Anzinger george@mvista.com
> High-res-timers:
> http://sourceforge.net/projects/high-res-timers/
> Preemption patch:
> http://www.kernel.org/pub/linux/kernel/people/rml
>
> Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
>
> Buy the best in Movies at http://www.videos.indiatimes.com
>
> Now bid just 7 Days in Advance and get Huge Discounts on Indian Airlines Flights. So log on to http://indianairlines.indiatimes.com and Bid Now!
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
^ permalink raw reply [flat|nested] 5+ messages in thread
* switching to interrupt contex when no interrupts
@ 2002-11-23 2:07 arun4linux
0 siblings, 0 replies; 5+ messages in thread
From: arun4linux @ 2002-11-23 2:07 UTC (permalink / raw)
To: linux-kernel
Hello,
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..
Is it possible?
If so, how to achieve this.
Have a nice time
Warm Regards
Arun
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
Change the way you talk. Indiatimes presents Valufon, Your PC to Phone service with clear voice at rates far less than the normal ISD rates. Go to http://www.valufon.indiatimes.com. Choose your plan. BUY NOW.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-01-02 16:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-23 19:57 Re: switching to interrupt contex when no interrupts arun4linux
2002-11-24 9:39 ` george anzinger
2002-11-24 16:48 ` george anzinger
-- strict thread matches above, loose matches on Subject: below --
2003-01-02 12:30 arun4linux
2003-01-02 16:30 ` george anzinger
2002-11-23 2:07 arun4linux
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.