From: Jan Kiszka <jan.kiszka@domain.hid>
To: Henry Bausley <hbausley@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Saving floating point registers inside ISR
Date: Thu, 05 Jun 2008 00:07:11 +0200 [thread overview]
Message-ID: <4847120F.7040905@domain.hid> (raw)
In-Reply-To: <1212614370.21088.23.camel@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]
Henry Bausley wrote:
> I am converting a 440EP power pc FSM Labs RT-Linux application to a
> Xenomai 2.4.2 posix application. Previously we saved the floating point
> registers in the ISR. I had the following code with RTLinux.
>
> //-----------------------------------------------------------------------------
> int phase_intr(xnintr_t *cookie)
> {
> rthal_fpenv_t fpustate;
Do you know how large this structure is? And do you know how much stack
space is still free when entering here, in the worst case? That may
differ from RTLinux, probably running on some older kernel.
>
> rthal_save_fpu(&fpustate);
>
> phase();
>
> rthal_restore_fpu(&fpustate);
> return (XN_ISR_HANDLED);
> }
>
> with xenomai if we do the the same thing the system hangs.
>
>
> However if we make the location where we save the registers global, or
> declare it static inside the ISR we don't have a problem. I don't want
That should ring the bell above...
> to do that since there are cases when the interrupt can be re-entered.
> Does anyone have any ideas?
>
> rthal_fpenv_t fpustate;
>
> //-----------------------------------------------------------------------------
> int phase_intr(xnintr_t *cookie)
> {
>
> rthal_save_fpu(&fpustate);
>
> phase();
>
> rthal_restore_fpu(&fpustate);
> return (XN_ISR_HANDLED);
> }
>
If the stack size is not the problem here, compare to disassembly of the
involved versions, local vs. global fpustate, and then the one from RTLinux.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2008-06-04 22:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 21:19 [Xenomai-help] Saving floating point registers inside ISR Henry Bausley
2008-06-04 22:07 ` Jan Kiszka [this message]
2008-06-05 7:41 ` Gilles Chanteperdrix
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=4847120F.7040905@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=hbausley@domain.hid \
--cc=xenomai@xenomai.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.