All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kevin D. Kissell" <kevink@paralogos.com>
To: "Anoop P.A." <Anoop_P.A@pmc-sierra.com>
Cc: linux-mips@linux-mips.org
Subject: Re: SMTC support status in latest git head.
Date: Thu, 09 Dec 2010 10:52:16 -0800	[thread overview]
Message-ID: <4D012560.6020003@paralogos.com> (raw)
In-Reply-To: <A7DEA48C84FD0B48AAAE33F328C02014033DADDA@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>

I used to do occasional tests and damage control patches for SMTC, but 
haven't had the time and resources for the past year or so.  The 
"Calibrating delay loop" hang is an absolutely classic hang in SMTC 
systems that stems from the interrupt management system not being 
properly set up.  Ralf alluded to the intra-TC timer propagation 
protocol, but your problem could just as easily (more easily, actually) 
have to do with enable mask management. In order to keep multiple 
threads from "convoying" into interrupt handlers chasing a single event, 
SMTC manipulates the interrupt enable mask at entry into an interrupt 
exception to ensure that only the initial TC goes after it.  The 
interrupt is unmasked once the interrupt handler has quenched the source 
and invoked the IRQ ack function.  Unfortunately, generic timer 
functions don't always do the canonical source quench performed by most 
device driver interrupt handlers. I tried to make all this 
self-contained in generic architecture-specific code, but at some point 
it ended up being cleaner and more efficient to have *some* hooks in 
platform specific timer code.  It was there for Malta in the kernel.org 
mainline once upon a time, and I *thought* we'd propagated working code 
for the initial PMC-Sierra 34K-based SoC's at least as far as 
linux-mips.org, but the source tree has been considerably reorganized - 
there was a time when some of the hooks were under 
arch/mips/mips-boards/generic, which no longer exists - and I'm not sure 
where to point you.  Git and grep are your friends.

The first order of business is to break into that hung timer calibration 
loop and dump the CP0 registers for the VPE and the TCs, in particular 
checking the interrupt enable mask in Status against the pending 
interrupts in the Cause register.   If you're seeing the timer 
interrupt's bit set in Cause, but clear in Status, you need to fix the 
SMTC interrupt mask hook for your platform timer.  If that's *not* it, 
check to see if you're building for "tickless" operation.  Tickless ends 
up being really important for SMTC, and I did get it working properly 
back in 2008, but I the SMTC-specific cevt-smtc.c code uses common 
functions in cevt-r4k.c, and I've seen some patches to cevt-r4k.c going 
by that I rather doubt were ever tested against an SMTC build/platform.  
There might have been breakage there, and configuring to use a fixed 
interval timer (say, 100Hz) would be a way to test that hypothesis.

             Regards,

             Kevin K.

On 12/08/10 05:48, Anoop P.A. wrote:
> Hi list,
>
> Any body is aware of SMTC support status in latest git sources?. I have tried testing SMTC kernel for malta in qemu / OVP without any success ( emulators not working for 34k).
>
> I am trying to bring up SMTC Linux support for an mips34K based soc ( MSP71xx family).
>
> While booting , kernel getting hung on calibrate loop delay. I am getting only one interrupt from timer. With similar smtc platform support file (  changed to map smp_ops structure)  2.6.24-stable branch kernel ( where latest timer structure introduced) boots fine.
>
> [    0.000000] Linux version 2.6.37-rc1-pmc-00197-g5bfd3ba-dirty (paanoop1@paanoop1-desktop) (gcc version 4.5.1 (GCC) ) #168 SMP PREEMPT Wed Dec 8 19:19:490
> [    0.000000] DSPRAM0: PA=1c100000,Size=00008000,enabled
> [    0.000000] UART clock set to 50000000
> [    0.000000] CPU revision is: 00019548 (MIPS 34Kc)
> [    0.000000] Determined physical RAM map:
> [    0.000000]  memory: 00001000 @ 00000000 (reserved)
> [    0.000000]  memory: 000ff000 @ 00001000 (usable)
> [    0.000000]  memory: 003f2000 @ 00100000 (reserved)
> [    0.000000]  memory: 0fad9200 @ 004f2000 (usable)
> [    0.000000] Wasting 32 bytes for tracking 1 unused pages
> [    0.000000] Zone PFN ranges:
> [    0.000000]   Normal   0x00000000 ->  0x0000ffcb
> [    0.000000] Movable zone start PFN for each node
> [    0.000000] early_node_map[1] active PFN ranges
> [    0.000000]     0: 0x00000000 ->  0x0000ffcb
> [    0.000000] 6 available secondary CPU TC(s)
> [    0.000000] PERCPU: Embedded 7 pages/cpu @81203000 s6464 r8192 d14016 u32768
> [    0.000000] pcpu-alloc: s6464 r8192 d14016 u32768 alloc=8*4096
> [    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64971
> [    0.000000] Kernel command line: console=ttyS0,57600
> [    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
> [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
> [    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
> [    0.000000] Primary data cache 64kB, 4-way, PIPT, no aliases, linesize 32 bytes
> [    0.000000] Writing ErrCtl register=00000000
> [    0.000000] Readback ErrCtl register=00000000
> [    0.000000] Memory: 254360k/257888k available (3081k kernel code, 3528k reserved, 653k data, 200k init, 0k highmem)
> [    0.000000] Preemptable hierarchical RCU implementation.
> [    0.000000] NR_IRQS:128
> [    0.000000] console [ttyS0] enabled
> [    0.000000] Clock rate set to 600000000
> [    0.000000] Calibrating delay loop...
>
> Any idea to debug the issue ?.
>
> Thanks,
> Anoop
>
>
>
>    

  parent reply	other threads:[~2010-12-09 18:52 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 13:48 SMTC support status in latest git head Anoop P.A.
2010-12-08 13:48 ` Anoop P.A.
2010-12-09 17:07 ` Ralf Baechle
2010-12-09 18:52 ` Kevin D. Kissell [this message]
2010-12-14 15:25   ` Anoop P.A.
2010-12-14 15:25     ` Anoop P.A.
2010-12-14 18:32     ` Kevin D. Kissell
2010-12-14 18:50       ` Ralf Baechle
2010-12-15 19:18       ` Anoop P A
2010-12-15 19:58         ` Kevin D. Kissell
2010-12-16 13:03           ` Anoop P A
2010-12-16 18:43             ` Kevin D. Kissell
  -- strict thread matches above, loose matches on Subject: below --
2010-12-14 21:27 STUART VENTERS
2010-12-14 21:27 ` STUART VENTERS
2010-12-14 23:01 ` Kevin D. Kissell
2010-12-16 15:37 STUART VENTERS
2010-12-16 15:37 ` STUART VENTERS
     [not found] ` <4D0A677C.6040104@paralogos.com>
2010-12-16 19:58   ` Kevin D. Kissell
2010-12-17 21:35     ` Kevin D. Kissell
2010-12-20 10:44       ` Anoop P A
     [not found]         ` <4D10F7A9.1020306@paralogos.com>
2010-12-21 20:06           ` Anoop P.A.
2010-12-21 20:06             ` Anoop P.A.
2010-12-21 20:29             ` Anoop P.A.
2010-12-21 20:29               ` Anoop P.A.
2010-12-22 10:27               ` Kevin D. Kissell
2010-12-22 11:35                 ` Anoop P A
2010-12-22 11:37                   ` Kevin D. Kissell
2010-12-22 11:51                     ` Anoop P A
2010-12-22 13:03                       ` Kevin D. Kissell
2010-12-22 16:34                         ` STUART VENTERS
2010-12-22 16:34                           ` STUART VENTERS
2010-12-23 21:09                         ` STUART VENTERS
2010-12-23 21:09                           ` STUART VENTERS
2010-12-24 12:32                           ` Kevin D. Kissell
2010-12-24 14:39                             ` Anoop P A
2010-12-24 14:53                               ` Kevin D. Kissell
2010-12-24 16:02                                 ` Anoop P A
2010-12-24 23:34                                   ` Kevin D. Kissell
2010-12-25  7:32                                     ` Anoop P A
2010-12-25 15:17                                       ` Kevin D. Kissell
2010-12-27 15:49                                     ` STUART VENTERS
2010-12-27 15:49                                       ` STUART VENTERS
2010-12-27 17:19                                       ` Anoop P A
2010-12-28  8:19                                         ` Anoop P A
2010-12-28  8:43                                           ` Kevin D. Kissell
2010-12-31 12:27                                             ` Anoop P A
2011-01-01  8:42                                               ` Kevin D. Kissell
2011-01-03 15:12                                                 ` Anoop P A
2011-01-03 16:14                                                   ` Kevin D. Kissell
2011-01-03 19:20                                                     ` Anoop P A
2011-01-04  8:17                                                       ` Kevin D. Kissell
2011-01-04 13:02                                                         ` Anoop P A
2011-01-04 14:37                                                           ` Anoop P A
2011-01-04 17:21                                                             ` Kevin D. Kissell
2011-01-04 17:54                                                               ` Anoop P A
2011-01-04 18:33                                                                 ` Kevin D. Kissell
2011-01-05 13:11                                                                   ` Anoop P A
2011-01-05 19:23                                                                     ` Kevin D. Kissell
2011-01-06 20:23                                                                       ` Anoop P A
2011-01-06 23:31                                                                         ` Kevin D. Kissell
2011-01-07  7:56                                                                           ` Anoop P A
2011-01-07 18:46                                                                             ` Kevin D. Kissell
2011-01-08 19:33                                                                               ` Anoop P A
2011-01-10 19:30                                                                             ` Kevin D. Kissell
2011-01-11  4:05                                                                               ` Anoop P A
2011-01-13  7:53                                                                               ` Kevin D. Kissell
2011-01-04 17:40                                                           ` Kevin D. Kissell
2011-01-05 13:09                                                             ` Anoop P A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D012560.6020003@paralogos.com \
    --to=kevink@paralogos.com \
    --cc=Anoop_P.A@pmc-sierra.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.