1. 31 10月, 2008 2 次提交
  2. 23 10月, 2008 1 次提交
  3. 22 10月, 2008 1 次提交
    • L
      x86/proc: fix /proc/cpuinfo cpu offline bug · bc8bcc79
      Lai Jiangshan 提交于
      Impact: fix missing CPUs in /proc/cpuinfo after CPU hotunplug/hotreplug
      
      In my test, I found that if a cpu has been offline,
      the next cpus may not be shown in the /proc/cpuinfo.
      
      if one read() cannot consume the whole /proc/cpuinfo,
      c_start() will be called again in the next read() calls.
      And *pos has been increased by 1 by the caller(seq_read()).
      if this time the cpu#*pos is offline, c_start() will return
      NULL, and the next cpus can not be shown.
      
      this fix use next_cpu_nr(*pos - 1, cpu_online_map) to
      search the next unshown cpu.
      
      the most easy way to reproduce this bug:
      1) offline cpu#1             (cpu#0 is online)
      2) dd ibs=2 if=/proc/cpuinfo
         the result is that only cpu#0 is shown.
         cpu#2 and cpu#3 .... cannot be shown in /proc/cpuinfo
         it's bug.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bc8bcc79
  4. 21 10月, 2008 2 次提交
  5. 16 10月, 2008 1 次提交
  6. 14 10月, 2008 1 次提交
    • I
      ftrace: mark lapic_wd_event() notrace · 8b1fa1d7
      Ingo Molnar 提交于
      it can be called in the NMI path:
      
      [    0.645999] calling  ftrace_dynamic_init+0x0/0xd6
      [    0.647521] ------------[ cut here ]------------
      [    0.647521] WARNING: at kernel/trace/ftrace.c:348 ftrace_record_ip+0x4e/0x252()
      [    0.647521] Modules linked in:
      [    0.647521] Pid: 15, comm: kstop1 Not tainted 2.6.27-rc1-tip #22686
      [    0.647521]
      [    0.647521] Call Trace:
      [    0.647521]  <NMI>  [<ffffffff8024593f>] warn_on_slowpath+0x5d/0x84
      [    0.647521]  [<ffffffff80220b99>] ? lapic_wd_event+0xb/0x5c
      [    0.647521]  [<ffffffff80287b3b>] ftrace_record_ip+0x4e/0x252
      [    0.647521]  [<ffffffff80211274>] mcount_call+0x5/0x31
      [    0.647521]  [<ffffffff80220b9e>] ? lapic_wd_event+0x10/0x5c
      [    0.647521]  [<ffffffff8083f3ec>] nmi_watchdog_tick+0x19d/0x1ad
      [    0.647521]  [<ffffffff8083e875>] default_do_nmi+0x75/0x1e3
      [    0.647521]  [<ffffffff8083f0b3>] do_nmi+0x5d/0x94
      [    0.647521]  [<ffffffff8083e2d2>] nmi+0xa2/0xc2
      [    0.647521]  [<ffffffff802b48c3>] ? check_bytes_and_report+0x11/0xcc
      [    0.647521]  <<EOE>>  [<ffffffff80211274>] ? mcount_call+0x5/0x31
      [    0.647521]  [<ffffffff802b49df>] check_object+0x61/0x1b0
      [    0.647521]  [<ffffffff802b502a>] __slab_free+0x169/0x2ae
      [    0.647521]  [<ffffffff80242dbf>] ? __cleanup_sighand+0x25/0x27
      [    0.647521]  [<ffffffff80242dbf>] ? __cleanup_sighand+0x25/0x27
      [    0.647521]  [<ffffffff802b60cd>] kmem_cache_free+0x85/0xb9
      [    0.647521]  [<ffffffff80242dbf>] __cleanup_sighand+0x25/0x27
      [    0.647521]  [<ffffffff80247b3d>] release_task+0x256/0x339
      [    0.647521]  [<ffffffff802490b4>] do_exit+0x764/0x7ef
      [    0.647521]  [<ffffffff8027624c>] __xchg+0x0/0x38
      [    0.647521]  [<ffffffff8027619a>] ? stop_cpu+0x0/0xb2
      [    0.647521]  [<ffffffff8027619a>] ? stop_cpu+0x0/0xb2
      [    0.647521]  [<ffffffff8025922f>] kthread+0x4e/0x7b
      [    0.647521]  [<ffffffff80212979>] child_rip+0xa/0x11
      [    0.647521]  [<ffffffff80211c17>] ? restore_args+0x0/0x30
      [    0.647521]  [<ffffffff802283a5>] ? native_load_tls+0x14/0x2e
      [    0.647521]  [<ffffffff802591e1>] ? kthread+0x0/0x7b
      [    0.647521]  [<ffffffff8021296f>] ? child_rip+0x0/0x11
      [    0.647521]
      [    0.647521] ---[ end trace 4eaa2a86a8e2da22 ]---
      [    0.672032] initcall ftrace_dynamic_init+0x0/0xd6 returned 0 after 19 msecs
      
      also mark it no-kprobes while at it.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8b1fa1d7
  7. 13 10月, 2008 3 次提交
  8. 11 10月, 2008 1 次提交
  9. 10 10月, 2008 6 次提交
  10. 05 10月, 2008 3 次提交
  11. 03 10月, 2008 3 次提交
  12. 30 9月, 2008 4 次提交
  13. 28 9月, 2008 4 次提交
  14. 23 9月, 2008 3 次提交
    • T
      CPUFREQ: powernow-k8: Try to detect old BIOS, not supporting CPU freq on a recent AMD CPUs. · 2fd47094
      Thomas Renninger 提交于
      Make use of FW_BUG interface to give vendors and users the ability to
      automatically check for powernow-k8 related BIOS bugs by:
      dmesg |grep "Firmware Bug"
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2fd47094
    • A
      x86, NMI watchdog: setup before enabling NMI watchdog · b3e15bde
      Aristeu Rozanski 提交于
      There's a small window when NMI watchdog is being set up that if any NMIs
      are triggered, the NMI code will make make use of not initalized wd_ops
      elements:
      	void setup_apic_nmi_watchdog(void *unused)
      	{
      		if (__get_cpu_var(wd_enabled))
      			return;
      
      		/* cheap hack to support suspend/resume */
      		/* if cpu0 is not active neither should the other cpus */
      		if (smp_processor_id() != 0 && atomic_read(&nmi_active) <= 0)
      			return;
      
      		switch (nmi_watchdog) {
      		case NMI_LOCAL_APIC:
      			/* enable it before to avoid race with handler */
      -->			__get_cpu_var(wd_enabled) = 1;
      -->			if (lapic_watchdog_init(nmi_hz) < 0) {
      (...)
      	asmlinkage notrace __kprobes void default_do_nmi(struct pt_regs *regs)
      	{
      	(...)
      			if (nmi_watchdog_tick(regs, reason))
      				return;
      (...)
      	notrace __kprobes int
      	nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
      	{
      	(...)
      		if (!__get_cpu_var(wd_enabled))
      			return rc;
      		switch (nmi_watchdog) {
      		case NMI_LOCAL_APIC:
      			rc |= lapic_wd_event(nmi_hz);
      (...)
      int lapic_wd_event(unsigned nmi_hz)
      {
      	struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
      	u64 ctr;
      
      -->	rdmsrl(wd->perfctr_msr, ctr);
      
      and wd->*_msr will be initialized on each processor type specific setup, after
      enabling NMIs for PMIs. Since the counter was just set, the chances of an
      performance counter generated NMI is minimal, but any other unknown NMI would
      trigger the problem. This patch fixes the problem by setting everything up
      before enabling performance counter generated NMIs and will set wd_enabled
      using a callback function.
      Signed-off-by: NAristeu Rozanski <aris@redhat.com>
      Acked-by: NDon Zickus <dzickus@redhat.com>
      Acked-by: NPrarit Bhargava <prarit@redhat.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b3e15bde
    • A
      x86, NMI watchdog: when booting with reset_devices, clear the performance counters · 28b166a7
      Aristeu Rozanski 提交于
      P4s have a quirk that makes necessary to clear P4_CCCR_OVF bit on the CCCR
      everytime the PMI is triggered. When booting the kernel with reset_devices
      (more specific kdump case), the counters reach zero and the PMI will be
      generated. This is not a problem on other processors but on P4s, it'll
      continue to generate NMIs until that bit is cleared. Since there may be
      other users of the performance counters, clear and disable all of them
      when booting with reset_devices option.
      
      We have a P4 box here that crashes because of this problem. Since the kdump
      kernel usually boots with only one processor active, the second logical
      unit won't be set up, therefore, MSR_P4_IQ_CCCR1 (and other performance
      counter registers) won't be cleared and P4_CCCR_OVF may be still set because
      the previous kernel was using this register. An NMI is triggered because of
      the MSR_P4_IQ_CCCR1 right after the NMI delivery is enabled, triggering the
      race fixed on my previous email.
      Signed-off-by: NAristeu Rozanski <aris@redhat.com>
      Acked-by: NDon Zickus <dzickus@redhat.com>
      Acked-by: NPrarit Bhargava <prarit@redhat.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      28b166a7
  15. 22 9月, 2008 1 次提交
  16. 19 9月, 2008 1 次提交
    • Y
      x86: fix arch/x86/kernel/cpu/mtrr/main.c warning · 279b0bbb
      Yinghai Lu 提交于
      fix this warning reported by Andrew Morton:
      
      > arch/x86/kernel/cpu/mtrr/main.c: In function 'mtrr_bp_init':
      > arch/x86/kernel/cpu/mtrr/main.c:1170: warning: 'extra_remove_base' may be used uninitialized in this function
      
      the warning is bogus but the logic that prevents uninitialized use
      is a bit convoluted so simplify it all.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      279b0bbb
  17. 17 9月, 2008 1 次提交
  18. 14 9月, 2008 2 次提交