From: "Kevin D. Kissell" <kevink@paralogos.com>
To: Chung-Chi Lo <linolo@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Config7.WII and IPI mechanism in SMTC linux
Date: Wed, 06 Aug 2008 23:58:51 -0500 [thread overview]
Message-ID: <489A810B.8030301@paralogos.com> (raw)
In-Reply-To: <3f696b20807302341n39d53172q39adf8e10c6249bb@mail.gmail.com>
The original SMTC code was written for MIPS kernels which guaranteed
that interrupts were never disabled when the WAIT instruction is executed.
It was later noted that going into WAIT with interrupts disabled is
desirable
in most MIPS implementations, and a patch was propagated which did this,
but also broke SMTC. There is a way to make SMTC work in spite of this,
and I had thought that it had been implemented, at least internally to MIPS,
but it may be that the necessary patch hasn't yet been written or
published.
The last time I checked, the WAIT-with-interrupts-off behavior was a
configuration
option. If that's true in the sources you're using, turn it off if
you're building
for SMTC. If you want further assistance, contact me by direct email.
Regards,
Kevin K.
Chung-Chi Lo wrote:
> Hello,
>
> My platform is MIPS 34K cpu core and Config7.WII=1.
>
> If Config7.WII=1 and a TC is idle, the TC will execute "wait"
> instruction with TCSTATUS.IXMT=1
> to disable interrupt.
>
> But in 34K, interrupts are not TC-specific. So some TCs will not get
> real interrupts to break "wait"
> instruction. Even in SMTC's IPI mechanism, the IPI mechanism is to
> program TCRestart if target
> TC is in the same VPE.
>
> In function smtc_send_ipi, it detects if TC's interrupt is disabled,
> then enqueue IPI message to
> target TC's queue. So some TCs are always idle and cannot break "wait"
> instruction. I don't know
> if I miss something and please comment on this problem. Thanks.
>
> if ((tcstatus & TCSTATUS_IXMT) != 0) {
> /*
> * Spin-waiting here can deadlock,
> * so we queue the message for the target TC.
> */
> write_tc_c0_tchalt(0);
> UNLOCK_CORE_PRA();
> .....
> smtc_ipi_nq(&IPIQ[cpu], pipi);
> }
>
> --
> Lino, Chung-Chi Lo
>
>
>
prev parent reply other threads:[~2008-08-07 4:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 6:41 Config7.WII and IPI mechanism in SMTC linux Chung-Chi Lo
2008-08-07 4:58 ` Kevin D. Kissell [this message]
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=489A810B.8030301@paralogos.com \
--to=kevink@paralogos.com \
--cc=linolo@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox