1. 18 9月, 2008 1 次提交
  2. 17 9月, 2008 1 次提交
  3. 15 9月, 2008 1 次提交
  4. 14 9月, 2008 1 次提交
  5. 12 9月, 2008 1 次提交
    • J
      x86: fix possible x86_64 and EFI regression · 0ad5bce7
      Jeremy Fitzhardinge 提交于
      Russ Anderson reported a boot crash with EFI and latest mainline:
      
       BIOS-e820: 00000000fffa0000 - 00000000fffac000 (reserved)
      Pid: 0, comm: swapper Not tainted 2.6.27-rc5-00100-gec0c15af-dirty #5
      
      Call Trace:
       [<ffffffff80849195>] early_idt_handler+0x55/0x69
       [<ffffffff80313e52>] __memcpy+0x12/0xa4
       [<ffffffff80859015>] efi_init+0xce/0x932
       [<ffffffff80869c83>] setup_early_serial8250_console+0x2d/0x36a
       [<ffffffff80238688>] __insert_resource+0x18/0xc8
       [<ffffffff8084f6de>] setup_arch+0x3a7/0x632
       [<ffffffff808499ed>] start_kernel+0x91/0x367
       [<ffffffff80849393>] x86_64_start_kernel+0xe3/0xe7
       [<ffffffff808492b0>] x86_64_start_kernel+0x0/0xe7
      
       RIP 0x10
      
      Such a crash is possible if the CPU in this system is a 64-bit
      processor which doesn't support NX (ie, old Intel P4 -based64-bit
      processors).
      
      Certainly, if we support such processors, then we should start with
      _PAGE_NX initially clear in __supported_pte_flags, and then set it once
      we've established that the processor does indeed support NX.  That will
      prevent early_ioremap - or anything else - from trying to set it.
      
      The simple fix is to simply call check_efer() earlier.
      Reported-by: NRuss Anderson <rja@sgi.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0ad5bce7
  6. 10 9月, 2008 2 次提交
    • J
      arch/x86/kernel/kdebugfs.c: introduce missing kfree · f461a1d8
      Julia Lawall 提交于
      Error handling code following a kmalloc should free the allocated data.
      Note that at the point of the change, node has not yet been stored in d, so
      it is not affected by the existing cleanup code.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      (
      if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
      |
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      )
      <... when != x
           when != if (...) { <+...x...+> }
      x->f = E
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f461a1d8
    • P
      x86: fix memmap=exactmap boot argument · d6be118a
      Prarit Bhargava 提交于
      When using kdump modifying the e820 map is yielding strange results.
      
      For example starting with
      
       BIOS-provided physical RAM map:
       BIOS-e820: 0000000000000100 - 0000000000093400 (usable)
       BIOS-e820: 0000000000093400 - 00000000000a0000 (reserved)
       BIOS-e820: 0000000000100000 - 000000003fee0000 (usable)
       BIOS-e820: 000000003fee0000 - 000000003fef3000 (ACPI data)
       BIOS-e820: 000000003fef3000 - 000000003ff80000 (ACPI NVS)
       BIOS-e820: 000000003ff80000 - 0000000040000000 (reserved)
       BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
       BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
       BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
       BIOS-e820: 00000000ff000000 - 0000000100000000 (reserved)
      
      and booting with args
      
      memmap=exactmap memmap=640K@0K memmap=5228K@16384K memmap=125188K@22252K memmap=76K#1047424K memmap=564K#1047500K
      
      resulted in:
      
       user-defined physical RAM map:
       user: 0000000000000000 - 0000000000093400 (usable)
       user: 0000000000093400 - 00000000000a0000 (reserved)
       user: 0000000000100000 - 000000003fee0000 (usable)
       user: 000000003fee0000 - 000000003fef3000 (ACPI data)
       user: 000000003fef3000 - 000000003ff80000 (ACPI NVS)
       user: 000000003ff80000 - 0000000040000000 (reserved)
       user: 00000000e0000000 - 00000000f0000000 (reserved)
       user: 00000000fec00000 - 00000000fec10000 (reserved)
       user: 00000000fee00000 - 00000000fee01000 (reserved)
       user: 00000000ff000000 - 0000000100000000 (reserved)
      
      But should have resulted in:
      
       user-defined physical RAM map:
       user: 0000000000000000 - 00000000000a0000 (usable)
       user: 0000000001000000 - 000000000151b000 (usable)
       user: 00000000015bb000 - 0000000008ffc000 (usable)
       user: 000000003fee0000 - 000000003ff80000 (ACPI data)
      
      This is happening because of an improper usage of strcmp() in the
      e820 parsing code.  The strcmp() always returns !0 and never resets the
      value for e820.nr_map and returns an incorrect user-defined map.
      
      This patch fixes the problem.
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d6be118a
  7. 09 9月, 2008 1 次提交
    • L
      x86: disable static NOPLs on 32 bits · 14469a8d
      Linus Torvalds 提交于
      On 32-bit, at least the generic nops are fairly reasonable, but the
      default nops for 64-bit really look pretty sad, and the P6 nops really do
      look better.
      
      So I would suggest perhaps moving the static P6 nop selection into the
      CONFIG_X86_64 thing.
      
      The alternative is to just get rid of that static nop selection, and just
      have two cases: 32-bit and 64-bit, and just pick obviously safe cases for
      them.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      14469a8d
  8. 07 9月, 2008 3 次提交
  9. 06 9月, 2008 7 次提交
  10. 05 9月, 2008 1 次提交
  11. 04 9月, 2008 2 次提交
  12. 03 9月, 2008 3 次提交
    • L
      Split up PIT part of TSC calibration from native_calibrate_tsc · ec0c15af
      Linus Torvalds 提交于
      The TSC calibration function is still very complicated, but this makes
      it at least a little bit less so by moving the PIT part out into a
      helper function of its own.
      Tested-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-of-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ec0c15af
    • T
      [x86] Fix TSC calibration issues · fbb16e24
      Thomas Gleixner 提交于
      Larry Finger reported at http://lkml.org/lkml/2008/9/1/90:
      An ancient laptop of mine started throwing errors from b43legacy when
      I started using 2.6.27 on it. This has been bisected to commit bfc0f594
      "x86: merge tsc calibration".
      
      The unification of the TSC code adopted mostly the 64bit code, which
      prefers PMTIMER/HPET over the PIT calibration.
      
      Larrys system has an AMD K6 CPU. Such systems are known to have
      PMTIMER incarnations which run at double speed. This results in a
      miscalibration of the TSC by factor 0.5. So the resulting calibrated
      CPU/TSC speed is half of the real CPU speed, which means that the TSC
      based delay loop will run half the time it should run. That might
      explain why the b43legacy driver went berserk.
      
      On the other hand we know about systems, where the PIT based
      calibration results in random crap due to heavy SMI/SMM
      disturbance. On those systems the PMTIMER/HPET based calibration logic
      with SMI detection shows better results.
      
      According to Alok also virtualized systems suffer from the PIT
      calibration method.
      
      The solution is to use a more wreckage aware aproach than the current
      either/or decision.
      
      1) reimplement the retry loop which was dropped from the 32bit code
      during the merge. It repeats the calibration and selects the lowest
      frequency value as this is probably the closest estimate to the real
      frequency
      
      2) Monitor the delta of the TSC values in the delay loop which waits
      for the PIT counter to reach zero. If the maximum value is
      significantly different from the minimum, then we have a pretty safe
      indicator that the loop was disturbed by an SMI.
      
      3) keep the pmtimer/hpet reference as a backup solution for systems
      where the SMI disturbance is a permanent point of failure for PIT
      based calibration
      
      4) do the loop iteration for both methods, record the lowest value and
      decide after all iterations finished.
      
      5) Set a clear preference to PIT based calibration when the result
      makes sense.
      
      The implementation does the reference calibration based on
      HPET/PMTIMER around the delay, which is necessary for the PIT anyway,
      but keeps separate TSC values to ensure the "independency" of the
      resulting calibration values.
      
      Tested on various 32bit/64bit machines including Geode 266Mhz, AMD K6
      (affected machine with a double speed pmtimer which I grabbed out of
      the dump), Pentium class machines and AMD/Intel 64 bit boxen.
      Bisected-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fbb16e24
    • L
      Un-break printk strings in x86 PCI probing code · 011fec74
      Linus Torvalds 提交于
      Breaking lines due to some imaginary problem with a long line length is
      often stupid and wrong, but never more so when it splits a string that
      is printed out into multiple lines.  This really ended up making it much
      harder to find where some error strings were printed out, because a
      simple 'grep' didn't work.
      
      I'm sure there is tons more of this particular idiocy hiding in other
      places, but this particular case hit me once more last week. So fix it.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      011fec74
  13. 30 8月, 2008 1 次提交
  14. 27 8月, 2008 1 次提交
    • H
      x86: update defconfigs · c1b362e3
      H. Peter Anvin 提交于
      Enable some option commonly used by testers in defconfig, including
      some very common device drivers and network boot support.  defconfig
      is still not meant to be a kitchen-sink configuration.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      c1b362e3
  15. 26 8月, 2008 5 次提交
  16. 25 8月, 2008 4 次提交
  17. 24 8月, 2008 1 次提交
  18. 23 8月, 2008 3 次提交
    • R
      x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs · 8735728e
      Rafael J. Wysocki 提交于
      During CPU hot-remove the sysfs directory created by
      threshold_create_bank(), defined in
      arch/x86/kernel/cpu/mcheck/mce_amd_64.c, has to be removed before
      its parent directory, created by mce_create_device(), defined in
      arch/x86/kernel/cpu/mcheck/mce_64.c .  Moreover, when the CPU in
      question is hotplugged again, obviously the latter has to be created
      before the former.  At present, the right ordering is not enforced,
      because all of these operations are carried out by CPU hotplug
      notifiers which are not appropriately ordered with respect to each
      other.  This leads to serious problems on systems with two or more
      multicore AMD CPUs, among other things during suspend and hibernation.
      
      Fix the problem by placing threshold bank CPU hotplug callbacks in
      mce_cpu_callback(), so that they are invoked at the right places,
      if defined.  Additionally, use kobject_del() to remove the sysfs
      directory associated with the kobject created by
      kobject_create_and_add() in threshold_create_bank(), to prevent the
      kernel from crashing during CPU hotplug operations on systems with
      two or more multicore AMD CPUs.
      
      This patch fixes bug #11337.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NAndi Kleen <andi@firstfloor.org>
      Tested-by: NMark Langsdorf <mark.langsdorf@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8735728e
    • R
      x86: fix: make PCI ECS for AMD CPUs hotplug capable · 91ede005
      Robert Richter 提交于
      Until now, PCI ECS setup was performed at boot time only and for cpus
      that are enabled then. This patch fixes this and adds cpu hotplug.
      
      Tests sequence (check if ECS bit is set when bringing cpu online again):
      
       # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
       00000008 00404010
       # ( perl -e 'sysseek(STDOUT, 0xC001001F, 0); print pack "l*", 8, 0x00400010' ) > /dev/cpu/1/msr
       # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
       00000008 00400010
       # echo 0 > /sys/devices/system/cpu/cpu1/online
       # echo 1 > /sys/devices/system/cpu/cpu1/online
       # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
       00000008 00404010
      Reported-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      91ede005
    • R
      x86: fix: do not run code in amd_bus.c on non-AMD CPUs · 9b4e27b5
      Robert Richter 提交于
      Jan Beulich wrote:
      
      > Even worse - this would even try to access the MSR on non-AMD CPUs
      > (currently probably prevented just by the fact that only AMD ones use
      > family values of 0x10 or higher).
      
      This patch adds cpu vendor check to the postcore_initcalls.
      Reported-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9b4e27b5
  19. 22 8月, 2008 1 次提交