linux/arch/x86
Linus Torvalds a7f934d4f1 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
59e97e4d6f ("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>
2011-09-15 13:28:33 -07:00
..
boot x86, build: Do not set the root_dev field in bzImage 2011-05-25 12:46:05 -07:00
configs cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
crypto crypto: ghash-intel - Fix set but not used in ghash_async_setkey() 2011-06-30 07:43:42 +08:00
ia32 All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
include/asm asm alternatives: remove incorrect alignment notes 2011-09-15 13:28:33 -07:00
kernel x86, perf: Check that current->mm is alive before getting user callchain 2011-08-31 15:56:31 +02:00
kvm Merge branch 'kvm-updates/3.1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2011-08-16 11:14:44 -07:00
lguest lguest: Fix translation count about wikipedia's cpuid page 2011-07-22 14:39:50 +09:30
lib atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
math-emu
mm x86: fix mm/fault.c build 2011-08-15 19:10:50 -07:00
net net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
oprofile x86, perf: Make copy_from_user_nmi() a library function 2011-07-21 20:41:57 +02:00
pci Fix pointer dereference before call to pcie_bus_configure_settings 2011-09-09 19:49:58 -07:00
platform sfi: table irq 0xFF means 'no interrupt' 2011-08-26 09:03:29 -07:00
power
tools
vdso Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-08-23 18:09:08 -07:00
video
xen Merge branch 'upstream/bugfix' of git://github.com/jsgf/linux-xen 2011-09-12 17:22:31 -07:00
.gitignore
Kbuild net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
Kconfig Merge commit 'v3.0' into x86/vdso 2011-08-04 16:13:20 -07:00
Kconfig.cpu x86: Add support for cmpxchg_double 2011-06-25 12:17:32 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile
Makefile_32.cpu x86, cpu: Move AMD Elan Kconfig under "Processor family" 2011-04-08 13:01:25 -07:00