* when interrupt came, the kernel save pt_regs->eip always the same?
[not found] ` <41d311580812130740k6e0c139kacb5bad33b5b8fd4@mail.gmail.com>
@ 2008-12-13 15:48 ` pl ice
2008-12-13 16:55 ` Zwane Mwaikambo
0 siblings, 1 reply; 4+ messages in thread
From: pl ice @ 2008-12-13 15:48 UTC (permalink / raw)
To: linux-kernel
HI,
These day i wanted get cpu context ,when interrupt came.BUT i
found when interrupt came kernel saved cpu context in struct pt_regs
and delivered to do_IRQ ,and i print the pt_regs->eip,they alway same
on the same interrupt?
The interrupt can come anytime,i think the eip will be very
different every time.BUT i debug kernel ,print eip in the function
do_IRQ,found it didn't run as i thought.Can anybody tell me why?
sincerely yours
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: when interrupt came, the kernel save pt_regs->eip always the same?
2008-12-13 15:48 ` when interrupt came, the kernel save pt_regs->eip always the same? pl ice
@ 2008-12-13 16:55 ` Zwane Mwaikambo
2008-12-14 2:59 ` pl ice
0 siblings, 1 reply; 4+ messages in thread
From: Zwane Mwaikambo @ 2008-12-13 16:55 UTC (permalink / raw)
To: pl ice; +Cc: linux-kernel
On Sat, 13 Dec 2008, pl ice wrote:
> HI,
> These day i wanted get cpu context ,when interrupt came.BUT i
> found when interrupt came kernel saved cpu context in struct pt_regs
> and delivered to do_IRQ ,and i print the pt_regs->eip,they alway same
> on the same interrupt?
> The interrupt can come anytime,i think the eip will be very
> different every time.BUT i debug kernel ,print eip in the function
> do_IRQ,found it didn't run as i thought.Can anybody tell me why?
If the cpu is idle, you have a higher probability that the idle function
is in regs->eip
Zwane
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: when interrupt came, the kernel save pt_regs->eip always the same?
2008-12-13 16:55 ` Zwane Mwaikambo
@ 2008-12-14 2:59 ` pl ice
2008-12-21 20:11 ` Jiri Slaby
0 siblings, 1 reply; 4+ messages in thread
From: pl ice @ 2008-12-14 2:59 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: linux-kernel
And the prototype about irq_handler changed, the 3th parameter "struct
pt_regs" removed,How do i get the struct pt_regs in my interrupt
handler because kernel doesn't deliver to me?
2008/12/14 Zwane Mwaikambo <zwane@infradead.org>:
> On Sat, 13 Dec 2008, pl ice wrote:
>
>> HI,
>> These day i wanted get cpu context ,when interrupt came.BUT i
>> found when interrupt came kernel saved cpu context in struct pt_regs
>> and delivered to do_IRQ ,and i print the pt_regs->eip,they alway same
>> on the same interrupt?
>> The interrupt can come anytime,i think the eip will be very
>> different every time.BUT i debug kernel ,print eip in the function
>> do_IRQ,found it didn't run as i thought.Can anybody tell me why?
>
> If the cpu is idle, you have a higher probability that the idle function
> is in regs->eip
>
> Zwane
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: when interrupt came, the kernel save pt_regs->eip always the same?
2008-12-14 2:59 ` pl ice
@ 2008-12-21 20:11 ` Jiri Slaby
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2008-12-21 20:11 UTC (permalink / raw)
To: pl ice; +Cc: Zwane Mwaikambo, linux-kernel
Sorry for the repost, following the thread now.
BTW. do not top-post.
On 12/14/2008 03:59 AM, pl ice wrote:
> And the prototype about irq_handler changed, the 3th parameter "struct
> pt_regs" removed,How do i get the struct pt_regs in my interrupt
> handler because kernel doesn't deliver to me?
get_irq_regs() should do that.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-21 20:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <41d311580812130732u58f480ecgc21cb6f16365d45a@mail.gmail.com>
[not found] ` <41d311580812130740k6e0c139kacb5bad33b5b8fd4@mail.gmail.com>
2008-12-13 15:48 ` when interrupt came, the kernel save pt_regs->eip always the same? pl ice
2008-12-13 16:55 ` Zwane Mwaikambo
2008-12-14 2:59 ` pl ice
2008-12-21 20:11 ` Jiri Slaby
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.