1. 18 Aug, 2008 1 commit
    • Andi Kleen's avatar
      x86: fix build warnings in real mode code · 1b72691c
      Andi Kleen authored
      This recent patch
      
      commit c3965bd1
      Author: Paul Jackson <pj@sgi.com>
      Date:   Wed May 14 08:15:34 2008 -0700
      
          x86 boot: proper use of ARRAY_SIZE instead of repeated E820MAX constant
      
      caused these new warnings during a normal build:
      
      In file included from linux-2.6/arch/x86/boot/memory.c:17:
      linux-2.6/include/linux/log2.h: In function '__ilog2_u32':
      linux-2.6/include/linux/log2.h:34: warning: implicit declaration of function 'fls'
      linux-2.6/include/linux/log2.h: In function '__ilog2_u64':
      linux-2.6/include/linux/log2.h:42: warning: implicit declaration of function 'fls64'
      linux-2.6/include/linux/log2.h: In function '__roundup_pow_of_two ':
      linux-2.6/include/linux/log2.h:63: warning: implicit declaration of function 'fls_long'
      
      I tried to fix them in log2.h, but it's difficult because the real mode
      environment is completely different from a normal kernel environment. Instead
      define an own ARRAY_SIZE macro in boot.h, similar to the other private
      macros there.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      1b72691c
  2. 13 Aug, 2008 2 commits
    • H. Peter Anvin's avatar
      x86: cleanup for setup code crashes during IST probe · c2dcfde8
      H. Peter Anvin authored
      Clean up the code for crashes during SpeedStep probing on older
      machines.
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c2dcfde8
    • Joerg Roedel's avatar
      x86: fix setup code crashes on my old 486 box · 7b27718b
      Joerg Roedel authored
      yesterday I tried to reactivate my old 486 box and wanted to install a
      current Linux with latest kernel on it. But it turned out that the
      latest kernel does not boot because the machine crashes early in the
      setup code.
      
      After some debugging it turned out that the problem is the query_ist()
      function. If this interrupt with that function is called the machine
      simply locks up. It looks like a BIOS bug. Looking for a workaround for
      this problem I wrote the attached patch. It checks for the CPUID
      instruction and if it is not implemented it does not call the speedstep
      BIOS function. As far as I know speedstep should be available since some
      Pentium earliest.
      
      Alan Cox observed that it's available since the Pentium II, so cpuid
      levels 4 and 5 can be excluded altogether.
      
      H. Peter Anvin cleaned up the code some more:
      
      > Right in concept, but I dislike the implementation (duplication of the
      > CPU detect code we already have).  Could you try this patch and see if
      > it works for you?
      
      which, with a small modification to fix a build error with it the
      resulting kernel boots on my machine.
      Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
      Signed-off-by: default avatar"H. Peter Anvin" <hpa@zytor.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7b27718b
  3. 19 Apr, 2008 1 commit
  4. 17 Apr, 2008 1 commit
    • Pavel Machek's avatar
      x86: move suspend wakeup code to C · e44b7b75
      Pavel Machek authored
      Move wakeup code to .c, so that video mode setting code can be shared
      between boot and wakeup. Remove nasty assembly code in 64-bit case by
      re-using trampoline code. Stack setup was fixed to clear high 16bits
      of %esp, maybe that fixes some machines.
      
      .c code sharing and morse code was done H. Peter Anvin, Sam Ravnborg
      reviewed kbuild related stuff, and it seems okay to him. Rafael did
      some cleanups.
      
      [rjw:
      * Made the patch stop breaking compilation on x86-32
      * Added arch/x86/kernel/acpi/sleep.h
      * Got rid of compiler warnings in arch/x86/kernel/acpi/sleep.c
      * Fixed 32-bit compilation on x86-64 systems
      * Added include/asm-x86/trampoline.h and fixed the non-SMP
        compilation on 64-bit x86
      * Removed arch/x86/kernel/acpi/sleep_32.c which was not used
      * Fixed some breakage caused by the integration of smpboot.c done
        under us in the meantime]
      Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e44b7b75
  5. 30 Jan, 2008 2 commits
  6. 26 Oct, 2007 2 commits
  7. 23 Oct, 2007 1 commit
  8. 11 Oct, 2007 1 commit
  9. 23 Aug, 2007 1 commit
    • H. Peter Anvin's avatar
      [x86 setup] Volatilize asm() statements · b015124e
      H. Peter Anvin authored
      asm() statements need to be volatile when:
      
      a. They have side effects (other than value returned).
      b. When the value returned can vary over time.
      c. When they have ordering constraints that cannot be expressed to gcc.
      
      In particular, the keyboard and timer reads were violating constraint (b),
      which resulted in the keyboard/timeout poll getting
      loop-invariant-removed when compiling with gcc 4.2.0.
      
      Thanks to an anonymous bug reporter for pointing this out.
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      b015124e
  10. 18 Jul, 2007 1 commit
    • H. Peter Anvin's avatar
      [x86 setup] Fix assembly constraints · 5593eaa8
      H. Peter Anvin authored
      Fix incorrect assembly constraints.  In particular, fix memory
      constraints used inside push..pop, which can cause invalid operation
      since gcc may generate %esp-relative references.
      
      Additionally:
      
      outl() should have "dN" not "dn".
      
      query_mca() shouldn't listen 16/32-bit registers in an 8-bit only
      context.
      
      has_eflag(): the "mask" is only used well after both the stack pointer
      and the output registers have been touched; this requires the output
      registers to be earlyclobbers (=&) and the input to exclude memory (so
      "ri", not "g").
      
      Thanks to Etienne Lorrain and Chuck Ebbert for prompting this review.
      
      Cc: Etienne Lorrain <etienne_lorrain@yahoo.fr>
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      5593eaa8
  11. 12 Jul, 2007 1 commit