kernel-ark/arch/x86/boot
David Woodhouse 5fbbc25a99 x86, boot: Fix word-size assumptions in has_eflag() inline asm
Commit dd78b97367 ("x86, boot: Move CPU
flags out of cpucheck") introduced ambiguous inline asm in the
has_eflag() function. In 16-bit mode want the instruction to be
'pushfl', but we just say 'pushf' and hope the compiler does what we
wanted.

When building with 'clang -m16', it won't, because clang doesn't use
the horrid '.code16gcc' hack that even 'gcc -m16' uses internally.

Say what we mean and don't make the compiler make assumptions.

[ hpa: ideally we would be able to use the gcc %zN construct here, but
  that is broken for 64-bit integers in gcc < 4.5.

  The code with plain "pushf/popf" is fine for 32- or 64-bit mode, but
  not for 16-bit mode; in 16-bit mode those are 16-bit instructions in
  .code16 mode, and 32-bit instructions in .code16gcc mode. ]

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Link: http://lkml.kernel.org/r/1391079628.26079.82.camel@shinybook.infradead.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-01-30 08:04:32 -08:00
..
compressed Merge branch 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-01-20 14:45:50 -08:00
tools x86, build: move build output statistics away from stderr 2013-09-26 14:05:41 -07:00
.gitignore x86: remove offsets.h from .gitignore and dontdiff 2012-11-19 14:10:53 +01:00
a20.c
apm.c
bioscall.S x86, boot: Move intcall() to the .inittext section 2014-01-04 14:29:08 -08:00
bitops.h
boot.h x86, boot: Move CPU flags out of cpucheck 2013-10-13 03:12:02 -07:00
cmdline.c x86, boot: Pass cmd_line_ptr with unsigned long instead 2013-01-29 15:26:09 -08:00
code16gcc.h
copy.S x86, boot: Use .code16 instead of .code16gcc 2014-01-04 13:59:06 -08:00
cpu.c
cpucheck.c x86, boot: Rename get_flags() and check_flags() to *_cpuflags() 2013-10-13 04:08:56 -07:00
cpuflags.c x86, boot: Fix word-size assumptions in has_eflag() inline asm 2014-01-30 08:04:32 -08:00
cpuflags.h x86, boot: Rename get_flags() and check_flags() to *_cpuflags() 2013-10-13 04:08:56 -07:00
ctype.h
early_serial_console.c
edd.c
header.S x86: Add xloadflags bit for EFI runtime support on kexec 2013-12-29 13:09:06 +00:00
install.sh
main.c keyboard: Use BIOS Keyboard variable to set Numlock 2012-05-08 14:19:41 -07:00
Makefile Merge commit 'f4bcd8ccddb02833340652e9f46f5127828eb79d' into x86/build 2014-01-29 09:07:00 -08:00
mca.c
memory.c
mkcpustr.c UAPI: Partition the header include path sets and add uapi/ header directories 2012-10-02 18:01:26 +01:00
mtools.conf.in
pm.c
pmjump.S
printf.c x86/boot: Fix a sanity check in printf.c 2013-08-14 11:48:41 +02:00
regs.c
setup.ld x86, boot: Define the 2.12 bzImage boot protocol 2013-01-27 15:56:37 -08:00
string.c
tty.c
version.c
vesa.h
video-bios.c
video-mode.c
video-vesa.c
video-vga.c
video.c
video.h x86, boot: Use __attribute__((used)) to ensure videocard structs are emitted 2014-01-22 04:21:45 -08:00