1. 18 8月, 2008 1 次提交
    • A
      x86: fix build warnings in real mode code · 1b72691c
      Andi Kleen 提交于
      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: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1b72691c
  2. 14 8月, 2008 1 次提交
  3. 13 8月, 2008 1 次提交
    • J
      x86: fix setup code crashes on my old 486 box · 7b27718b
      Joerg Roedel 提交于
      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: NJoerg Roedel <joro@8bytes.org>
      Signed-off-by: N"H. Peter Anvin" <hpa@zytor.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7b27718b
  4. 20 4月, 2008 1 次提交
  5. 17 4月, 2008 1 次提交
    • P
      x86: move suspend wakeup code to C · e44b7b75
      Pavel Machek 提交于
      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: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e44b7b75
  6. 30 1月, 2008 2 次提交
  7. 26 10月, 2007 2 次提交
  8. 24 10月, 2007 1 次提交
  9. 11 10月, 2007 1 次提交
  10. 24 8月, 2007 1 次提交
    • H
      [x86 setup] Volatilize asm() statements · b015124e
      H. Peter Anvin 提交于
      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: NH. Peter Anvin <hpa@zytor.com>
      b015124e
  11. 19 7月, 2007 1 次提交
    • H
      [x86 setup] Fix assembly constraints · 5593eaa8
      H. Peter Anvin 提交于
      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: NH. Peter Anvin <hpa@zytor.com>
      5593eaa8
  12. 13 7月, 2007 1 次提交