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: Fri, 07 Jan 2011 10:46:24 -0800 [thread overview]
Message-ID: <4D275F80.2000307@paralogos.com> (raw)
In-Reply-To: <1294387019.27661.458.camel@paanoop1-desktop>
On 01/06/11 23:56, Anoop P A wrote:
> On Thu, 2011-01-06 at 15:31 -0800, Kevin D. Kissell wrote:
>> I'm sure I've said this before, and it's in various comments in the SMTC
>> code, but...
As an aside to this conversation, would it be possible to create a
Documentation/mips/SMTC.txt file that would actually propagate
upstream, so that I'd stop being the sole repository of SMTC folklore?
I only maintain it as a hobby.
> Ok. Well thanks much for your detailed explanation. Well I hope I found
> the root cause . smtc_clockevent_init() was overriding irq_hwmask even
> if are using platform specific get_c0_compare_int. With following patch
> everything seems to be working for me.
> ------------------------------------------------------------------------
> diff --git a/arch/mips/kernel/cevt-smtc.c b/arch/mips/kernel/cevt-smtc.c
> index 2e72d30..a25fc59 100644
> --- a/arch/mips/kernel/cevt-smtc.c
> +++ b/arch/mips/kernel/cevt-smtc.c
> @@ -310,9 +310,14 @@ int __cpuinit smtc_clockevent_init(void)
> return 0;
> /*
> * And we need the hwmask associated with the c0_compare
> - * vector to be initialized.
> + * vector to be initialized. However incase of platform
> + * specific get_co_compare_int, don't override irq_hwmask
> + * expect platform code to set a valid mask value.
> */
> - irq_hwmask[irq] = (0x100<< cp0_compare_irq);
> +
> + if (!get_c0_compare_int)
> + irq_hwmask[irq] = (0x100<< cp0_compare_irq);
> +
> if (cp0_timer_irq_installed)
> return 0;
> -----------------------------------------------------------------------
I'm still not clear on one point that, to me, is pretty important when
engineering a fix here. Are you, in fact, using the Count/Compare
interrupt system, but having the externalization of the compare
interrupt routed back through an intervening interrupt controller,
or is your timer coming from another source?
In the former case, I think you're on the right track as to the
possible cause of a problem, but the fix should actually be simpler
and rather more elegant. Why can't you simply see to it that
cp0_compare_irq is set to the right value, either at compile time,
or in your earliest platform initialization of the interrupt controller?
That would be a one-line, inline change and spare us another
cryptic conditional.
In the later case, you'll presumably be having lots of other problems,
as cevt-smtc.c is intertwined with cevt-r4k.c and the Count/Compare
paradigm.
Regards,
Kevin K.
next prev parent reply other threads:[~2011-01-07 18:46 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
2011-01-07 7:56 ` Anoop P A
2011-01-07 18:46 ` Kevin D. Kissell [this message]
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=4D275F80.2000307@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox