summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/olpc_ofw.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-09-15 13:28:33 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-09-15 13:28:33 -0700
commita7f934d4f16144cb9521b62e9b8c9ac0118097da (patch)
tree3a7208a2a8c47bdd263c16df4b5c77eb64d251df /arch/x86/include/asm/olpc_ofw.h
parent17d8428e4c911f7877d8470bca7a09a4b2aa2d57 (diff)
asm alternatives: remove incorrect alignment notes
On x86-64, they were just wasteful: with the explicitly added (now unnecessary) padding, the size of the alternatives structure was 16 bytes, and an alignment of 8 bytes didn't hurt much. However, it was still silly, since the natural size and alignment for the structure is actually just 12 bytes, 4-byte aligned since commit 59e97e4d6fbc ("x86: Make alternative instruction pointers relative"). So removing the padding, and removing the extra alignment is just a good idea. On x86-32, the alignment of 4 bytes was correct, but was incorrectly hardcoded as 8 bytes in <asm/alternative-asm.h>. That header file had used to be an x86-64 only header file, but various unification efforts have made it be used for x86-32 too (ie the unification of rwlock and rwsem). That in turn caused x86-32 boot failures, because the extra alignment would result in random zero-filled words in the altinstructions section, causing oopses early at boot when doing alternative instruction replacement. So just remove all the alignment noise entirely. It's wrong, and it's unnecessary. The section itself is already properly aligned by the linker scripts, and all additions to the section had better be of the proper 12-byte format, keeping it aligned. So if the align directive were to ever make a difference, that would be an indication of a serious bug to begin with. Reported-by: Werner Landgraf <w.landgraf@ru.r> Acked-by: Andrew Lutomirski <luto@mit.edu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/include/asm/olpc_ofw.h')
0 files changed, 0 insertions, 0 deletions