Re: kernel preemption while returning from interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/31/06, MHD.Tayseer Alquoatli <idoit.ief@xxxxxxxxx> wrote:
>
>
>
> On 1/30/06, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
> > Dear Gaurav.....
> >
> > I am not an expert on this issue, but allow me to share my idea...
> >
> > > 186         testl $IF_MASK,EFLAGS(%esp)     # interrupts off
> > > (exception path) ?
> >
> > you mean this check, right? Well IMHO, "cli" certainly masks interrupts,
> > but line 186 above checks whether IF (Interrupt Flag) of EFLAGS saved
> > on kernel stack is disabled. Maybe on exception path, IF flag is
> > cleared first and the handler is called? CMIIW too
>
> i'm not that much familiar with assembly code but the instruction on line
> 186 looks like dealing with some address related to the stack really, as
> Mulyadi said
> but when those values has been put on the stack ? (i.e. when have they been
> saved?)
> thanks

Line 186, checks the IF (interrupt flag) flag of EFLAG register of
CPU, which was pushed on the kernel stack while entering the interrupt
handler or system call stub.  So on this line we are just checking if
the interrupts on local CPU are disabled, if yes then we restore the
context of interrupted kernel execution path else we go and do check
for preemption.

My question was not this ...... plaese read my question again.

regards,
-Gaurav

>
> MHD.Tayseer
>
> > regards
> >
> > Mulyadi
> >
> >
> > --
> > Kernelnewbies: Help each other learn about the Linux kernel.
> > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > FAQ:           http://kernelnewbies.org/faq/
> >
> >
>
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux