1. 18 Aug, 2008 6 commits
    • David Fries's avatar
      x86: fix i486 suspend to disk CR4 oops · e532c06f
      David Fries authored
      arch/x86/power/cpu_32.c __save_processor_state calls read_cr4()
      only a i486 CPU doesn't have the CR4 register.  Trying to read it
      produces an invalid opcode oops during suspend to disk.
      
      Use the safe rc4 reading op instead. If the value to be written is
      zero the write is skipped.
      
      arch/x86/power/hibernate_asm_32.S
      done: swapped the use of %eax and %ecx to use jecxz for
      the zero test and jump over store to %cr4.
      restore_image: s/%ecx/%eax/ to be consistent with done:
      
      In addition to __save_processor_state, acpi_save_state_mem,
      efi_call_phys_prelog, and efi_call_phys_epilog had checks added
      (acpi restore was in assembly and already had a check for
      non-zero).  There were other reads and writes of CR4, but MCE and
      virtualization shouldn't be executed on a i486 anyway.
      Signed-off-by: default avatarDavid Fries <david@fries.net>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e532c06f
    • Marcin Slusarz's avatar
      x86: mpparse.c: fix section mismatch warning · 39e00fe2
      Marcin Slusarz authored
      WARNING: vmlinux.o(.text+0x118f7): Section mismatch in reference from the function construct_ioapic_table() to the function .init.text:MP_bus_info()
      The function construct_ioapic_table() references
      the function __init MP_bus_info().
      This is often because construct_ioapic_table lacks a __init
      annotation or the annotation of MP_bus_info is wrong.
      
      construct_ioapic_table is called only from construct_default_ISA_mptable which is __init
      Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      39e00fe2
    • Marcin Slusarz's avatar
      x86: mmconf: fix section mismatch warning · c72a5efe
      Marcin Slusarz authored
      WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x1591): Section mismatch in reference from the function init_amd() to the function .init.text:check_enable_amd_mmconf_dmi()
      The function __cpuinit init_amd() references
      a function __init check_enable_amd_mmconf_dmi().
      If check_enable_amd_mmconf_dmi is only used by init_amd then
      annotate check_enable_amd_mmconf_dmi with a matching annotation.
      
      check_enable_amd_mmconf_dmi is only called from init_amd which is __cpuinit
      Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c72a5efe
    • Marcin Slusarz's avatar
      x86: fix MP_processor_info section mismatch warning · 67d0c9eb
      Marcin Slusarz authored
      WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x1fe7): Section mismatch in reference from the function MP_processor_info() to the variable .init.data:x86_quirks
      The function __cpuinit MP_processor_info() references
      a variable __initdata x86_quirks.
      If x86_quirks is only used by MP_processor_info then
      annotate x86_quirks with a matching annotation.
      
      MP_processor_info uses x86_quirks which is __init and is used only from
      smp_read_mpc and construct_default_ISA_mptable which are __init
      Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      67d0c9eb
    • Marcin Slusarz's avatar
      x86, tsc: fix section mismatch warning · d554d9a4
      Marcin Slusarz authored
      WARNING: vmlinux.o(.text+0x7950): Section mismatch in reference from the function native_calibrate_tsc() to the function .init.text:tsc_read_refs()
      The function native_calibrate_tsc() references
      the function __init tsc_read_refs().
      This is often because native_calibrate_tsc lacks a __init
      annotation or the annotation of tsc_read_refs is wrong.
      
      tsc_read_refs is called from native_calibrate_tsc which is not __init
      and native_calibrate_tsc cannot be marked __init
      Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d554d9a4
    • Mathieu Desnoyers's avatar
      x86: correct register constraints for 64-bit atomic operations · 3c3b5c3b
      Mathieu Desnoyers authored
      x86_64 add/sub atomic ops does not seems to accept integer values bigger
      than 32 bits as immediates. Intel's add/sub documentation specifies they
      have to be passed as registers.
      
      The only operations in the x86-64 architecture which accept arbitrary
      64-bit immediates is "movq" to any register; similarly, the only
      operation which accept arbitrary 64-bit displacement is "movabs" to or
      from al/ax/eax/rax.
      
      http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Machine-Constraints.html
      
      states :
      
      e
          32-bit signed integer constant, or a symbolic reference known to fit
          that range (for immediate operands in sign-extending x86-64
          instructions).
      Z
          32-bit unsigned integer constant, or a symbolic reference known to
          fit that range (for immediate operands in zero-extending x86-64
          instructions).
      
      Since add/sub does sign extension, using the "e" constraint seems appropriate.
      
      It applies to 2.6.27-rc, 2.6.26, 2.6.25...
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3c3b5c3b
  2. 15 Aug, 2008 22 commits
  3. 14 Aug, 2008 12 commits