All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kevin D. Kissell" <kevink@paralogos.com>
To: Anoop P A <anoop.pa@gmail.com>
Cc: STUART VENTERS <stuart.venters@adtran.com>,
	"Anoop P.A." <Anoop_P.A@pmc-sierra.com>,
	linux-mips@linux-mips.org
Subject: Re: SMTC support status in latest git head.
Date: Thu, 06 Jan 2011 15:31:34 -0800	[thread overview]
Message-ID: <4D2650D6.4030102@paralogos.com> (raw)
In-Reply-To: <1294345396.27661.422.camel@paanoop1-desktop>

On 01/06/11 12:23, Anoop P A wrote:
> On Wed, 2011-01-05 at 11:23 -0800, Kevin D. Kissell wrote:
>> At this point, there shouldn't be a whole lot of SMTC-specific mystery
>> to get your timer running on the second VPE.  You know it's taking
>> interrupts, because of the IPIs getting through, so in principle you
>> just need to run the chain of enables from the clock peripheral itself
>> through the CIC to the CPU core and the IM bits.
> I hope we are almost there. I have made some progress with the debug . I
> think you should be able to give better insight to the observation I
> have made.
>
> 1. Without selecting CONFIG_MIPS_MT_SMTC_IM_BACKSTOP My kernel hangs in
> calibration loop itself . ( I haven't looked further into this).
That suggests a problem with Status.IM initialization and/or
the handling of irq_hwmask[].  Do you mean that this is always
true, or only if VPE1 is being booted?  You haven't mentioned it
before.

> 2. With CONFIG_MIPS_MT_SMTC_IM_BACKSTOP I found I am getting 3
> VPE1-TIMER interrupt ( one for each TC of VPE1) .However this interrupts
> are not getting carried till c0_compare_interrupt .
Would you expect them to?  I thought you were using an outboard
timer and not the CP0 Compare interrupt.
>   do_IRQ call had a SMTC hook which is modifying tccontext ( To reduce
> complexity I haven't selected SMTC affinity).
>
> Once I disabled this call . I am seeing VPE1 timer interrupts and able
> to boot completely without any issue's so far :).
So long as you've got the IM_BACKSTOP hack enabled, right?
Because otherwise, without that __DO_IRQ_SMTC_HOOK() invocation
> / # cat /proc/interrupts
>             CPU0       CPU1       CPU2       CPU3       CPU4       CPU5
> CPU6
>    1:        171     727459     727561     727533         27     727446
> 727453            MIPS  SMTC_IPI
>    6:          0          0          0          0          0          0
> 0            MIPS  MSP CIC cascade
>    8:          0          0          0          0          0          0
> 0         MSP_CIC  Softreset button
>    9:          0          0          0          0          0          0
> 0         MSP_CIC  Standby switch
>   21:          0          0          0          0          0          0
> 0         MSP_CIC  MSP PER cascade
>   25:     727507        484         11          0          0          0
> 0         MSP_CIC  timer
>   27:          0          0          0          0        258         10
> 1         MSP_CIC  serial
>   34:          0          0          0          0     727533          7
> 1         MSP_CIC  timer
>
>
> BTW following code in my cic init was setting hwmask.
>
>          /* initialize all the IRQ descriptors */
>          for (i = MSP_CIC_INTBASE ; i<  MSP_CIC_INTBASE + 32 ; i++) {
>                  set_irq_chip_and_handler(i,&msp_cic_irq_controller,
>                                           handle_level_irq);
> #ifdef CONFIG_MIPS_MT_SMTC
>                  irq_hwmask[i] = C_IRQ4;
> #endif
>          }

I'm sure I've said this before, and it's in various comments in the SMTC
code, but remember, one of the main problems that the SMTC kernel
had to solve was to prevent all TCs of a VPE from "convoying" after every
interrupt.  The way this is done is that the interrupt vector code, before
clearing EXL, masks off the Status.IM bit associated with the incoming
interrupt.  Of course, to get another interrupt from the same source
(or collection of sources), that IM bit needs to be restored.  The "correct"
mechanism for this is by having the appropriate irq_hwmask[] value set,
so that smtc_im_ack_irq(), which should be invoked on an irq "ack()"
(meaning that the source has been quenched and any new occurrence
should be considered a new interrupt), will restore the bit in Status.
This function got moved around a bit in the various SMTC prototypes,
but it proved least intrusive to put it into the xxx_mask_and_ack() 
functions
for the interrupt controllers - see irq-msc01.c and i8259.c.  If you haven't
done the same in any equivalent code for a different on-chip controller,
you'll definitely have problems.

The Backstop scheme works OK for peripheral interrupts that didn't
have an appropriate irq_hwmask[] value set up, but clock interrupts
don't follow the same code paths and can't depend on the backstop.

             Regards,

             Kevin K.

  reply	other threads:[~2011-01-06 23:31 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16 15:37 SMTC support status in latest git head 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 [this message]
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
  -- 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-08 13:48 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
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

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=4D2650D6.4030102@paralogos.com \
    --to=kevink@paralogos.com \
    --cc=Anoop_P.A@pmc-sierra.com \
    --cc=anoop.pa@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=stuart.venters@adtran.com \
    /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.