All of lore.kernel.org
 help / color / mirror / Atom feed
From: Makarand Pradhan <makarandpradhan@domain.hid>
To: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: [Xenomai-help] Powerpc alignment exception
Date: Mon, 30 Apr 2012 13:55:46 -0400	[thread overview]
Message-ID: <4F9ED222.1020806@domain.hid> (raw)

Hi,

There has been a thread on this topic in the past:

https://mail.gna.org/public/xenomai-help/2009-08/msg00023.html

A quick background: We get the alignment exception, as we pass 
-fpack-struct option to gcc and some data in structures is misaligned.

I have been testing the patch on Linux 3.0.0, Xenomai 2.6 and it seems 
to work well. Do you think, it requires any additional changes to be 
used with Xenomai 2.6?

Also, I am trying to understand how it works and have a question. Am 
summarizing my understanding below. Would appreciate your comments:

alignment_exception:

+     if (test_bit(IPIPE_NOSTACK_FLAG, &ipipe_this_cpudom_var(status)) &&
+         ipipe_trap_notify(IPIPE_TRAP_ALIGNMENT, regs))
               return;

I believe, the IPIPE_NOSTACK_FLAG is set when we are running in Linux. 
So we should invoke ipipe_trap_notify only while we are running in 
linux.  While running in the primary domain, we would go ahead and fix 
the alignment.


+     if (!ipipe_root_domain_p &&
+         ipipe_trap_notify(IPIPE_TRAP_ALIGNMENT, regs))
+             return;
+
I am not able to figure this part properly. If we are not in the root 
domain we invoke ipipe_trap_notify. (I believe root domain = Linux). So 
if we are in the primary, we would invoke ipipe_trap_notify. 
ipipe_trap_notify in turn would invoke the event handler 
(xnpod_trap_fault). This would send us to the secondary domain. All the 
same, we stay int he primary as per my tests. So, I am making a mistake 
somewhere. Would appreciate your opinion.

Rgds,
Makarand.




-- 
___________________________________________________________________________
NOTICE OF CONFIDENTIALITY:
This e-mail and any attachments may contain confidential and privileged information.  If you are
not the intended recipient, please notify the sender immediately by return e-mail and delete this
e-mail and any copies.  Any dissemination or use of this information by a person other than the
intended recipient is unauthorized and may be illegal.
_____________________________________________________________________

  



             reply	other threads:[~2012-04-30 17:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 17:55 Makarand Pradhan [this message]
2012-05-01  7:45 ` [Xenomai-help] Powerpc alignment exception Philippe Gerum
2012-05-01 14:56   ` Makarand Pradhan

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=4F9ED222.1020806@domain.hid \
    --to=makarandpradhan@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.