1. 01 9月, 2007 2 次提交
    • L
      x86: be even more careful about checking the stack frame on dumping · 36ad4885
      Linus Torvalds 提交于
      lguest didn't initialize the kernel stack the way a real i386 kernel
      does, and ended up triggering a corner-case in the stack frame checking
      that doesn't happen on naive i386, and that the stack dumping didn't
      handle quite right.
      
      This makes the frame handling more correct, and tries to clarify the
      code at the same time so that it's a bit more obvious what is going on.
      
      Thanks to Rusty Russell for debugging the lguest failure-
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      36ad4885
    • H
      [x86 setup] Don't rely on the VESA BIOS being register-clean · 4221d014
      H. Peter Anvin 提交于
      The VESA BIOS is specified to be register-clean.  However, we have now
      found at least one system which violates that.  Thus, be as paranoid
      about VESA calls as about everything else.
      
      Huge thanks to Will Simoneau for reporting, diagnosing, and testing
      this out on Dell Inspiron 5150.
      
      Cc: Will Simoneau <simoneau@ele.uri.edu>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      4221d014
  2. 31 8月, 2007 1 次提交
    • D
      hugepage: fix broken check for offset alignment in hugepage mappings · dec4ad86
      David Gibson 提交于
      For hugepage mappings, the file offset, like the address and size, needs to
      be aligned to the size of a hugepage.
      
      In commit 68589bc3, the check for this was
      moved into prepare_hugepage_range() along with the address and size checks.
       But since BenH's rework of the get_unmapped_area() paths leading up to
      commit 4b1d8929, prepare_hugepage_range()
      is only called for MAP_FIXED mappings, not for other mappings.  This means
      we're no longer ever checking for an aligned offset - I've confirmed that
      mmap() will (apparently) succeed with a misaligned offset on both powerpc
      and i386 at least.
      
      This patch restores the check, removing it from prepare_hugepage_range()
      and putting it back into hugetlbfs_file_mmap().  I'm putting it there,
      rather than in the get_unmapped_area() path so it only needs to go in one
      place, than separately in the half-dozen or so arch-specific
      implementations of hugetlb_get_unmapped_area().
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Cc: Adam Litke <agl@us.ibm.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dec4ad86
  3. 24 8月, 2007 2 次提交
    • H
      [x86 setup] Make sure AH=00h when setting a video mode · 71351b98
      H. Peter Anvin 提交于
      Passing a u8 into a register doesn't mean gcc will zero-extend it.
      Also, don't depend on thhe register not to change.
      
      Per bug report from Saul Tamari.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      71351b98
    • 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
  4. 23 8月, 2007 3 次提交
  5. 22 8月, 2007 1 次提交
  6. 21 8月, 2007 1 次提交
    • L
      ACPI: boot correctly with "nosmp" or "maxcpus=0" · 61ec7567
      Len Brown 提交于
      In MPS mode, "nosmp" and "maxcpus=0" boot a UP kernel with IOAPIC disabled.
      However, in ACPI mode, these parameters didn't completely disable
      the IO APIC initialization code and boot failed.
      
      init/main.c:
      	Disable the IO_APIC if "nosmp" or "maxcpus=0"
      	undefine disable_ioapic_setup() when it doesn't apply.
      
      i386:
      	delete ioapic_setup(), it was a duplicate of parse_noapic()
      	delete undefinition of disable_ioapic_setup()
      
      x86_64:
      	rename disable_ioapic_setup() to parse_noapic() to match i386
      	define disable_ioapic_setup() in header to match i386
      
      http://bugzilla.kernel.org/show_bug.cgi?id=1641Acked-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      61ec7567
  7. 19 8月, 2007 4 次提交
  8. 15 8月, 2007 3 次提交
    • H
      [x86 setup] edd.c: make sure MBR signatures actually get reported · 9a5f35d4
      H. Peter Anvin 提交于
      When filling in the MBR signature array, the setup code failed to advance
      boot_params.edd_mbr_sig_buf_entries, which resulted in the valid data
      being ignored.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      9a5f35d4
    • H
      [x86 setup] Don't use EDD to get the MBR signature · c1a6e2b0
      H. Peter Anvin 提交于
      At least one machine has been identified in the field which advertises
      EDD for all drives but locks up if one attempts an extended read from
      a non-primary drive.
      
      The MBR is always at CHS 0-0-1, so there is no reason to use an
      extended read, other than the possibility that the BIOS cannot handle
      it.
      
      Although this might break as many machines as it fixes (a small number
      either way), the current state is a regression but the reverse is not.
      Therefore revert to the previous state of not using extended read.
      
      Quite probably the Right Thing to do is to read using plain (CHS) read
      and extended read on failure, but that change would definitely have to
      go through -mm first.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      c1a6e2b0
    • H
      [x86 setup] The current display page is returned in %bh, not %bl · 362cea33
      H. Peter Anvin 提交于
      The current display page is an 8-bit number, even though struct
      screen_info gives it a 16-bit number.  The number is returned in %bh,
      so it needs to be >> 8 before storing.
      
      Special thanks to Jeff Chua for detailed bug reporting.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      362cea33
  9. 13 8月, 2007 1 次提交
  10. 12 8月, 2007 9 次提交
    • L
      i386: Fix broken mmiocfg accesses · c1502e28
      Linus Torvalds 提交于
      Commit 3320ad99 broke mmio config space
      accesses totally on i386 - it dropped the "reg" offset to the address.
      
      Cc: dean gaudet <dean@arctic.org>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c1502e28
    • C
      i386: Fix double fault handler · 3dab307e
      Chuck Ebbert 提交于
      The new percpu code has apparently broken the doublefault handler
      when CONFIG_DEBUG_SPINLOCK is set. Doublefault is handled by
      a hardware task, making the check
      
              SPIN_BUG_ON(lock->owner == current, lock, "recursion");
      
      fault because it uses the FS register to access the percpu data
      for current, and that register is zero in the new TSS. (The trace
      I saw was on 2.6.20 where it was GS, but it looks like this will
      still happen with FS on 2.6.22.)
      
      Initializing FS in the doublefault_tss should fix it.
      
      AK: Also fix broken ptr_ok() and turn printks into KERN_EMERG
      AK: And add a PANIC prefix to make clear the system will hang
      AK: (e.g. x86-64 will recover)
      Signed-off-by: NChuck Ebbert <cebbert@redhat.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3dab307e
    • A
      i386: Fix start_kernel warning · 5fe4486c
      Andi Kleen 提交于
      Fix
      
      WARNING: vmlinux.o(.text+0x183): Section mismatch: reference to .init.text:start_kernel (between 'is386' and 'check_x87')
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5fe4486c
    • A
      i386: Use global flag to disable broken local apic timer on AMD CPUs. · d3f7eae1
      Andi Kleen 提交于
      The Averatec 2370 and some other Turion laptop BIOS seems to program the
      ENABLE_C1E MSR inconsistently between cores. This confuses the lapic
      use heuristics because when C1E is enabled anywhere it seems to affect
      the complete chip.
      
      Use a global flag instead of a per cpu flag to handle this.
      If any CPU has C1E enabled disabled lapic use.
      
      Thanks to Cal Peake for debugging.
      
      Cc: tglx@linutronix.de
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d3f7eae1
    • A
      i386: really stop MCEs during code patching · d2d0251f
      Adrian Bunk 提交于
      It's CONFIG_X86_MCE, not CONFIG_MCE.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d2d0251f
    • A
      i386: Make patching more robust, fix paravirt issue · ab144f5e
      Andi Kleen 提交于
      Commit 19d36ccd "x86: Fix alternatives
      and kprobes to remap write-protected kernel text" uses code which is
      being patched for patching.
      
      In particular, paravirt_ops does patching in two stages: first it
      calls paravirt_ops.patch, then it fills any remaining instructions
      with nop_out().  nop_out calls text_poke() which calls
      lookup_address() which calls pgd_val() (aka paravirt_ops.pgd_val):
      that call site is one of the places we patch.
      
      If we always do patching as one single call to text_poke(), we only
      need make sure we're not patching the memcpy in text_poke itself.
      This means the prototype to paravirt_ops.patch needs to change, to
      marshal the new code into a buffer rather than patching in place as it
      does now.  It also means all patching goes through text_poke(), which
      is known to be safe (apply_alternatives is also changed to make a
      single patch).
      
      AK: fix compilation on x86-64 (bad rusty!)
      AK: fix boot on x86-64 (sigh)
      AK: merged with other patches
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ab144f5e
    • A
      x86: Disable CLFLUSH support again · d3f3c934
      Andi Kleen 提交于
      It turns out CLFLUSH support is still not complete; we
      flush the wrong pages.  Again disable it for the release.
      Noticed by Jan Beulich who then also noticed a stupid typo later.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d3f3c934
    • D
      x86: Work around mmio config space quirk on AMD Fam10h · 3320ad99
      dean gaudet 提交于
      Some broken devices have been discovered to require %al/%ax/%eax registers
      for MMIO config space accesses.  Modify mmconfig.c to use these registers
      explicitly (rather than modify the global readb/writeb/etc inlines).
      
      AK: also changed i386 to always use eax
      AK: moved change to extended space probing to different patch
      AK: reworked with inlines according to Linus' requirements.
      AK: improve comments.
      Signed-off-by: Ndean gaudet <dean@arctic.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3320ad99
    • M
      finish i386 and x86-64 sysdata conversion · 73c59afc
      Muli Ben-Yehuda 提交于
      This patch finishes the i386 and x86-64 ->sysdata conversion and hopefully
      also fixes Riku's and Andy's observed bugs.  It is based on Yinghai Lu's
      and Andy Whitcroft's patches (thanks!) with some changes:
      
      - introduce pci_scan_bus_with_sysdata() and use it instead of
        pci_scan_bus() where appropriate. pci_scan_bus_with_sysdata() will
        allocate the sysdata structure and then call pci_scan_bus().
      - always allocate pci_sysdata dynamically. The whole point of this
        sysdata work is to make it easy to do root-bus specific things
        (e.g., support PCI domains and IOMMU's). I dislike using a default
        struct pci_sysdata in some places and a dynamically allocated
        pci_sysdata elsewhere - the potential for someone indavertantly
        changing the default structure is too high.
      - this patch only makes the minimal changes necessary, i.e., the NUMA node is
        always initialized to -1. Patches to do the right thing with regards
        to the NUMA node can build on top of this (either add a 'node'
        parameter to pci_scan_bus_with_sysdata() or just update the node
        when it becomes known).
      
      The patch was compile tested with various configurations (e.g., NUMAQ,
      VISWS) and run-time tested on i386 and x86-64.  Unfortunately none of my
      machines exhibited the bugs so caveat emptor.
      
      Andy, could you please see if this fixes the NUMA issues you've seen?
      Riku, does this fix "pci=noacpi" on your laptop?
      Signed-off-by: NMuli Ben-Yehuda <muli@il.ibm.com>
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Cc: <riku.seppala@kymp.net>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      73c59afc
  11. 08 8月, 2007 1 次提交
  12. 03 8月, 2007 1 次提交
  13. 02 8月, 2007 1 次提交
  14. 01 8月, 2007 9 次提交
  15. 31 7月, 2007 1 次提交