linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Timer interrupt on Linux 3.0.3
@ 2011-09-16 11:43 Vineeth
  2011-09-16 17:03 ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Vineeth @ 2011-09-16 11:43 UTC (permalink / raw)
  To: linux-embedded, linuxppc-embedded, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

Hi,

We are porting Linux on MPC7410 based board. As there was some issue with
the processor DECrementer and timebase registers, we were using an external
count down timer as our DECementer. We used timer_interrupt() function in
arch/powerpc/kernel/time.c as our interrupt handler. Things were working
fine.

lately we moved to Linux 3.0.3. What we found was even without a proper
timer, the kernel with initramfs worked (except the calls like sleep,delay
ofcourse); Is there any major difference in the scheduler ? or the way
context switch happens ? is it not depended on the timer interrupt or the
timer ??

Thanks
Vineeth

[-- Attachment #2: Type: text/html, Size: 660 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Timer interrupt on Linux 3.0.3
  2011-09-16 11:43 Timer interrupt on Linux 3.0.3 Vineeth
@ 2011-09-16 17:03 ` Scott Wood
  2011-09-21  6:56   ` Vineeth
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2011-09-16 17:03 UTC (permalink / raw)
  To: Vineeth; +Cc: linuxppc-dev, linux-embedded

On 09/16/2011 06:43 AM, Vineeth wrote:
> Hi,
> 
> We are porting Linux on MPC7410 based board. As there was some issue
> with the processor DECrementer and timebase registers,

What was the issue?  You really should try to make this work rather than
hack around it.

> lately we moved to Linux 3.0.3. What we found was even without a proper
> timer, the kernel with initramfs worked (except the calls like
> sleep,delay ofcourse); Is there any major difference in the scheduler ?
> or the way context switch happens ? is it not depended on the timer
> interrupt or the timer ??

If your timer is broken then you won't get timeslice expiration, but
basic scheduling should still work.  Most scheduling (depending on type
of load, of course) will be triggered by processes blocking or being
woken up by I/O, not timeslice expiration.

-Scott

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Timer interrupt on Linux 3.0.3
  2011-09-16 17:03 ` Scott Wood
@ 2011-09-21  6:56   ` Vineeth
  2011-09-21 19:41     ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Vineeth @ 2011-09-21  6:56 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev, linux-embedded

[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]

>> What was the issue?  You really should try to make this work rather than
>> hack around it.

what we found was the decrementer is not generating an exception when it
becomes 0. and the timebase registers are not getting incremented too. The
exceptions are enabled in MSR registers.

we are using embedded60x port of linux3.0.3; we've written the dts file with
proper clock-frequency/timebase-frequency values.

Do you think we might've missed some configuration in the timer perspective
?


On Fri, Sep 16, 2011 at 10:33 PM, Scott Wood <scottwood@freescale.com>wrote:

> On 09/16/2011 06:43 AM, Vineeth wrote:
> > Hi,
> >
> > We are porting Linux on MPC7410 based board. As there was some issue
> > with the processor DECrementer and timebase registers,
>
> What was the issue?  You really should try to make this work rather than
> hack around it.
>
> > lately we moved to Linux 3.0.3. What we found was even without a proper
> > timer, the kernel with initramfs worked (except the calls like
> > sleep,delay ofcourse); Is there any major difference in the scheduler ?
> > or the way context switch happens ? is it not depended on the timer
> > interrupt or the timer ??
>
> If your timer is broken then you won't get timeslice expiration, but
> basic scheduling should still work.  Most scheduling (depending on type
> of load, of course) will be triggered by processes blocking or being
> woken up by I/O, not timeslice expiration.
>
> -Scott
>
>

[-- Attachment #2: Type: text/html, Size: 1918 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Timer interrupt on Linux 3.0.3
  2011-09-21  6:56   ` Vineeth
@ 2011-09-21 19:41     ` Scott Wood
  2011-09-22  6:22       ` MohanReddy koppula
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2011-09-21 19:41 UTC (permalink / raw)
  To: Vineeth; +Cc: linuxppc-dev, linux-embedded

On 09/21/2011 01:56 AM, Vineeth wrote:
>>> What was the issue?  You really should try to make this work rather than
>>> hack around it.
> 
> what we found was the decrementer is not generating an exception when it
> becomes 0. and the timebase registers are not getting incremented too.

Does the decrementer actually tick until it reaches zero, or do it and
the timebase never tick?

Is the TBEN input to the CPU asserted?

-Scott

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Timer interrupt on Linux 3.0.3
  2011-09-21 19:41     ` Scott Wood
@ 2011-09-22  6:22       ` MohanReddy koppula
  2011-09-26  9:11         ` Vineeth
  0 siblings, 1 reply; 6+ messages in thread
From: MohanReddy koppula @ 2011-09-22  6:22 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev, linux-embedded, Vineeth

I had the same issue with an MPC885 board. My kernel was 2.6.33. On
that board decrementer exception was not working. I replaced the
board, took new board (MPC885 only, just another board) and the same
kernel worked fine. I don't know how the problem was solved.

-Mohan

On 9/22/11, Scott Wood <scottwood@freescale.com> wrote:
> On 09/21/2011 01:56 AM, Vineeth wrote:
>>>> What was the issue?  You really should try to make this work rather than
>>>> hack around it.
>>
>> what we found was the decrementer is not generating an exception when it
>> becomes 0. and the timebase registers are not getting incremented too.
>
> Does the decrementer actually tick until it reaches zero, or do it and
> the timebase never tick?
>
> Is the TBEN input to the CPU asserted?
>
> -Scott
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Timer interrupt on Linux 3.0.3
  2011-09-22  6:22       ` MohanReddy koppula
@ 2011-09-26  9:11         ` Vineeth
  0 siblings, 0 replies; 6+ messages in thread
From: Vineeth @ 2011-09-26  9:11 UTC (permalink / raw)
  To: Scott Wood, linuxppc-dev, linux-embedded; +Cc: mohanreddykv

[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]

Hi,

there's a good news which is pretty bad. Good news is that we identified why
our processor timer not working. its because the TBEN in our board is pulled
LOW. which means the decrementer and the timebase registers wont work.

The board design cannot be changed !!! but we have an MPC107 connected with
our processor. Our plan is to use the timer of MPC107 and register our
timer_interrupt function with this timer interrupt. I think that's the only
workaround left now.

Thanks
Vineeth

On Thu, Sep 22, 2011 at 11:52 AM, MohanReddy koppula <mohanreddykv@gmail.com
> wrote:

> I had the same issue with an MPC885 board. My kernel was 2.6.33. On
> that board decrementer exception was not working. I replaced the
> board, took new board (MPC885 only, just another board) and the same
> kernel worked fine. I don't know how the problem was solved.
>
> -Mohan
>
> On 9/22/11, Scott Wood <scottwood@freescale.com> wrote:
> > On 09/21/2011 01:56 AM, Vineeth wrote:
> >>>> What was the issue?  You really should try to make this work rather
> than
> >>>> hack around it.
> >>
> >> what we found was the decrementer is not generating an exception when it
> >> becomes 0. and the timebase registers are not getting incremented too.
> >
> > Does the decrementer actually tick until it reaches zero, or do it and
> > the timebase never tick?
> >
> > Is the TBEN input to the CPU asserted?
> >
> > -Scott
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
> >
>

[-- Attachment #2: Type: text/html, Size: 2239 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-26  9:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-16 11:43 Timer interrupt on Linux 3.0.3 Vineeth
2011-09-16 17:03 ` Scott Wood
2011-09-21  6:56   ` Vineeth
2011-09-21 19:41     ` Scott Wood
2011-09-22  6:22       ` MohanReddy koppula
2011-09-26  9:11         ` Vineeth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).