From: "Fu, Chao-Ying" <fu@mips.com>
To: "Adam Nemet" <anemet@caviumnetworks.com>
Cc: <gcc-patches@gcc.gnu.org>, "Lau, David" <davidlau@mips.com>
Subject: RE: [PATCH] MIPS function attributes for interrupt handlers
Date: Fri, 17 Oct 2008 11:40:00 -0000 [thread overview]
Message-ID: <94BD67F8AF3ED34FA362C662BA1F12C501007E8A@MTVEXCHANGE.mips.com> (raw)
Nemet wrote:
> > +
> > + /* If this interrupt is using a shadow register set,
> we need to
> > + get the stack pointer from the previous register set. */
> > + /* Trumping that concern, at least for the time
> being, is that we
> > + want the first four instructions of the interrupt
> handler to be
> > + the same for all handler functions. This lets
> there be cache lines
> > + locked to those instructions, lowering the latency. */
> > + /* if (current_function_type == SRS_CONTEXT_SAVE) */
> > + fprintf (file, "\trdpgpr\t$sp, $sp\n");
>
> You seems to be using MIPS32r2 instructions in the prologue.
> I think this should be emitted in RTL.
Ok.
> It seems that ipl7 implies two things: use the shadow
> register set and that all interrupts should remain masked.
> It seems the second can be useful even if the processor does
> not support shadow registers. One idea would be to split the
> two and make them explicit (e.g. use_shadow_register_set and
> keep_interrupts_masked attributes).
>
Yes. You are right. Single and ipl0-ipl6 generate
same code that doesn't use shadow register sets, and allows nested
interrupts. Ipl7 uses a shadow register set and doesn't allow
nested interrupts.
Using your two attributes allow a new combination.
> > +@item at_vector
> > +@cindex install interrupt handler at the address of
> exception vector
> > +on MIPS Using this attribute on MIPS indicates that the specific
> > +interrupt handler should be located at the address of the
> exception
> > +vector (from 0 to 63).
> > +
> > +@smallexample
> > +void f () __attribute__ ((interrupt(single)))
> > +__attribute__((at_vector (20))); @end smallexample
> > +
> > +The single interrupt handler f is installed at the
> exception vectors
> > +20 which section name is ".vector_20".
>
> I think we shouldn't suggest here that we install this
> function at a certain address but be clear that all this does
> is to put the function into a named section.
Ok.
Regards,
Chao-ying
next reply other threads:[~2008-10-17 4:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-17 11:40 Fu, Chao-Ying [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-10-23 9:06 Ross Ridge
2008-10-14 20:29 Fu, Chao-Ying
2008-10-15 23:47 ` Richard Sandiford
2008-10-20 23:03 ` Mark Mitchell
2008-10-20 23:24 ` Adam Nemet
2008-10-21 16:15 ` Weddington, Eric
2008-10-21 17:01 ` Mark Mitchell
2008-10-21 23:11 ` Richard Sandiford
2008-10-21 23:49 ` Mark Mitchell
2008-10-22 0:16 ` Thiemo Seufer
2008-10-22 1:05 ` Mark Mitchell
2008-10-22 6:36 ` Thiemo Seufer
2008-10-22 6:54 ` Mark Mitchell
2008-10-22 7:30 ` Weddington, Eric
2008-10-22 10:03 ` Richard Sandiford
2008-10-22 17:43 ` Mark Mitchell
2008-10-22 20:28 ` Richard Sandiford
2008-10-28 5:07 ` Fu, Chao-Ying
2008-10-29 8:05 ` Richard Sandiford
2008-10-16 22:34 ` Adam Nemet
2009-02-25 7:01 ` Fu, Chao-Ying
2009-02-25 9:35 ` Adam Nemet
2009-02-25 17:51 ` Daniel Jacobowitz
2009-02-26 9:48 ` Fu, Chao-Ying
2009-02-27 20:46 ` Maciej W. Rozycki
2009-02-28 10:15 ` Fu, Chao-Ying
2009-02-28 18:39 ` Maciej W. Rozycki
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=94BD67F8AF3ED34FA362C662BA1F12C501007E8A@MTVEXCHANGE.mips.com \
--to=fu@mips.com \
--cc=anemet@caviumnetworks.com \
--cc=davidlau@mips.com \
--cc=gcc-patches@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).