]> err.no Git - linux-2.6/commit
[JFFS2] Don't pack on-medium structures, because GCC emits crappy code
authorDavid Woodhouse <dwmw2@infradead.org>
Sun, 14 May 2006 23:49:43 +0000 (00:49 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Sun, 14 May 2006 23:49:43 +0000 (00:49 +0100)
commit3e68fbb59b3d4e6b47b65e9928b5929e02179759
tree6ff2574161328a89f81f637ac42ce639e8ba31d3
parent52239da1b06ff445bf71d35e04d8ce74e4c6fe7b
[JFFS2] Don't pack on-medium structures, because GCC emits crappy code

If we use __attribute__((packed)), GCC will _also_ assume that the
structures aren't sensibly aligned, and it'll emit code to cope with
that instead of straight word load/save. This can be _very_ suboptimal
on architectures like ARM.

Ideally, we want an attribute which just tells GCC not to do any
padding, without the alignment side-effects. In the absense of that,
we'll just drop the 'packed' attribute and hope that everything stays as
it was (which to be fair is fairly much what we expect). And add some
paranoia checks in the initialisation code, which should be optimised
away completely in the normal case.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
fs/jffs2/super.c
include/linux/jffs2.h