Home
last modified time | relevance | path

Searched hist:"3 e68fbb5" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/jffs2/
H A Dsuper.c3e68fbb5 Sun May 14 18:49:43 CDT 2006 David Woodhouse <dwmw2@infradead.org> [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>
3e68fbb5 Sun May 14 18:49:43 CDT 2006 David Woodhouse <dwmw2@infradead.org> [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>