All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] ARM bus error due to alignment
@ 2015-11-05  1:51 Lennart Sorensen
  2015-11-05 11:01 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 21+ messages in thread
From: Lennart Sorensen @ 2015-11-05  1:51 UTC (permalink / raw)
  To: xenomai

We are trying to move from gcc 4.6 to gcc 4.9 (as part of moving from
being Debian wheezy based to jessie based).

This has now brought up an unexpected change in behaviour on arm (powerpc
is fine).  We are getting bus errors with kernel complaints about
unaligned memory accesses.  Now it is certainly true that we are doing
some unaligned memory accesses, but on armv7 that is supposed to be
allowed, as long as the memory is marked as "normal memory".

gcc 4.6 and earlier never generated unaligned accesses as far as I
understand it, while gcc 4.7 and higher do generate unaligned accesses
by default on armv7 according to the gcc documentation.

Is it expected that the memory in xenomai would not be flagged as normal
memory (the other options as far as I understand it are device memory
and strongly ordered memory).

This is with 3.14 kernel and xenomai 2.6.4 with LPAE enabled on a
Cortex-A15 system.

So same code, same xenomai, same kernel with gcc 4.6 does not see this,
while with 4.9 it does.  I tried building the application with
-nno-unaligned-accesses, but I didn't rebuild the libraries that way,
so that might not be enough.  Really I think it should work fine, since I
can't see why the pages would be flagged as something other than normal
memory (unless DMA pages are somehow getting involved, since some of
this is dealing with network packets being received).

Any ideas where to investigate?

-- 
Len Soirensen


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-11-09 19:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05  1:51 [Xenomai] ARM bus error due to alignment Lennart Sorensen
2015-11-05 11:01 ` Gilles Chanteperdrix
2015-11-05 14:51   ` Lennart Sorensen
2015-11-05 14:57     ` Lennart Sorensen
2015-11-05 15:02       ` Lennart Sorensen
2015-11-05 15:15         ` Gilles Chanteperdrix
2015-11-05 15:24           ` Lennart Sorensen
2015-11-05 15:55             ` Gilles Chanteperdrix
2015-11-05 16:19               ` Lennart Sorensen
2015-11-05 16:25                 ` Gilles Chanteperdrix
2015-11-05 16:57                   ` Lennart Sorensen
2015-11-05 17:14                     ` Gilles Chanteperdrix
2015-11-05 17:24                       ` Lennart Sorensen
2015-11-05 17:52                         ` Lennart Sorensen
2015-11-05 21:18                           ` Lennart Sorensen
2015-11-05 21:28                             ` Lennart Sorensen
2015-11-05 21:40                           ` Gilles Chanteperdrix
2015-11-05 22:08                             ` Lennart Sorensen
2015-11-06 19:25                               ` Lennart Sorensen
2015-11-07 22:13                                 ` Gilles Chanteperdrix
2015-11-09 19:57                                   ` Lennart Sorensen

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.