An error occurred fetching the project authors.
  1. 07 Jan, 2011 2 commits
    • Don Zickus's avatar
      x86, NMI: Remove DIE_NMI_IPI · c410b830
      Don Zickus authored
      With priorities in place and no one really understanding the difference between
      DIE_NMI and DIE_NMI_IPI, just remove DIE_NMI_IPI and convert everyone to DIE_NMI.
      
      This also simplifies default_do_nmi() a little bit.  Instead of calling the
      die_notifier in both the if and else part, just pull it out and call it before
      the if-statement.  This has the side benefit of avoiding a call to the ioport
      to see if there is an external NMI sitting around until after the (more frequent)
      internal NMIs are dealt with.
      Patch-Inspired-by: default avatarHuang Ying <ying.huang@intel.com>
      Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1294348732-15030-5-git-send-email-dzickus@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c410b830
    • Don Zickus's avatar
      x86, NMI: Add priorities to handlers · 166d7514
      Don Zickus authored
      In order to consolidate the NMI die_chain events, we need to setup the priorities
      for the die notifiers.
      
      I started by defining a bunch of common priorities that can be used by the
      notifier blocks.  Then I modified the notifier blocks to use the newly created
      priorities.
      
      Now that the priorities are straightened out, it should be easier to remove the
      event DIE_NMI_IPI.
      Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1294348732-15030-4-git-send-email-dzickus@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      166d7514
  2. 19 Dec, 2010 1 commit
  3. 15 Oct, 2010 2 commits
  4. 01 Oct, 2010 1 commit
  5. 21 Sep, 2010 1 commit
  6. 16 Sep, 2010 1 commit
  7. 01 Sep, 2010 1 commit
    • Robert Richter's avatar
      oprofile, x86: fix init_sysfs() function stub · 269f45c2
      Robert Richter authored
      The use of the return value of init_sysfs() with commit
      
       10f0412f oprofile, x86: fix init_sysfs error handling
      
      discovered the following build error for !CONFIG_PM:
      
       .../linux/arch/x86/oprofile/nmi_int.c: In function ‘op_nmi_init’:
       .../linux/arch/x86/oprofile/nmi_int.c:784: error: expected expression before ‘do’
       make[2]: *** [arch/x86/oprofile/nmi_int.o] Error 1
       make[1]: *** [arch/x86/oprofile] Error 2
      
      This patch fixes this.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: stable@kernel.org
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      269f45c2
  8. 31 Aug, 2010 1 commit
  9. 05 Aug, 2010 1 commit
    • Josh Hunt's avatar
      oprofile: add support for Intel processor model 30 · a7c55cbe
      Josh Hunt authored
      Newer Intel processors identifying themselves as model 30 are not recognized by
      oprofile.
      
      <cpuinfo snippet>
      model           : 30
      model name      : Intel(R) Xeon(R) CPU           X3470  @ 2.93GHz
      </cpuinfo snippet>
      
      Running oprofile on these machines gives the following:
      + opcontrol --init
      + opcontrol --list-events
      oprofile: available events for CPU type "Intel Architectural Perfmon"
      
      See Intel 64 and IA-32 Architectures Software Developer's Manual
      Volume 3B (Document 253669) Chapter 18 for architectural perfmon events
      This is a limited set of fallback events because oprofile doesn't know your CPU
      CPU_CLK_UNHALTED: (counter: all)
              Clock cycles when not halted (min count: 6000)
      INST_RETIRED: (counter: all)
              number of instructions retired (min count: 6000)
      LLC_MISSES: (counter: all)
              Last level cache demand requests from this core that missed the LLC
      (min count: 6000)
              Unit masks (default 0x41)
              ----------
              0x41: No unit mask
      LLC_REFS: (counter: all)
              Last level cache demand requests from this core (min count: 6000)
              Unit masks (default 0x4f)
              ----------
              0x4f: No unit mask
      BR_MISS_PRED_RETIRED: (counter: all)
              number of mispredicted branches retired (precise) (min count: 500)
      + opcontrol --shutdown
      
      Tested using oprofile 0.9.6.
      Signed-off-by: default avatarJosh Hunt <johunt@akamai.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      a7c55cbe
  10. 10 May, 2010 1 commit
  11. 06 May, 2010 2 commits
    • Robert Richter's avatar
      oprofile/x86: make AMD IBS hotplug capable · bae663bc
      Robert Richter authored
      Current IBS code is not hotplug capable. An offline cpu might not be
      initialized or deinitialized properly. This patch fixes this by
      removing on_each_cpu() functions. The IBS init/deinit code is executed
      in the per-cpu functions model->setup_ctrs() and model->cpu_down()
      which are also called by hotplug notifiers. model->cpu_down() replaces
      model->exit() that became obsolete.
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      bae663bc
    • Robert Richter's avatar
      oprofile/x86: notify cpus only when daemon is running · 3de668ee
      Robert Richter authored
      This patch moves the cpu notifier registration from nmi_init() to
      nmi_setup(). The corresponding unregistration function is now in
      nmi_shutdown(). Thus, the hotplug code is only active, if the oprofile
      daemon is running.
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      3de668ee
  12. 04 May, 2010 7 commits
    • Robert Richter's avatar
      oprofile/x86: reordering some functions · d30d64c6
      Robert Richter authored
      Reordering some functions. Necessary for the next patch. No functional
      changes.
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      d30d64c6
    • Robert Richter's avatar
      oprofile/x86: stop disabled counters in nmi handler · de654649
      Robert Richter authored
      This patch adds checks to the nmi handler. Now samples are only
      generated and counters reenabled, if the counters are running.
      Otherwise the counters are stopped, if oprofile is using the nmi. In
      other cases it will ignore the nmi notification.
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      de654649
    • Robert Richter's avatar
      oprofile/x86: protect cpu hotplug sections · 6ae56b55
      Robert Richter authored
      This patch reworks oprofile cpu hotplug code as follows:
      
      Introduce ctr_running variable to check, if counters are running or
      not. The state must be known for taking a cpu on or offline and when
      switching counters during counter multiplexing.
      
      Protect on_each_cpu() sections with get_online_cpus()/put_online_cpu()
      functions. This is necessary if notifiers or states are
      modified. Within these sections the cpu mask may not change.
      
      Switch only between counters in nmi_cpu_switch(), if counters are
      running. Otherwise the switch may restart a counter though they are
      disabled.
      
      Add nmi_cpu_setup() and nmi_cpu_shutdown() to cpu hotplug code. The
      function must also be called to avoid uninitialzed counter usage.
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      6ae56b55
    • Robert Richter's avatar
      oprofile/x86: remove CONFIG_SMP macros · 216f3d9b
      Robert Richter authored
      CPU notifier register functions also exist if CONFIG_SMP is
      disabled. This change is part of hotplug code rework and also
      necessary for later patches.
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      216f3d9b
    • Robert Richter's avatar
      oprofile/x86: fix uninitialized counter usage during cpu hotplug · 2623a1d5
      Robert Richter authored
      This fixes a NULL pointer dereference that is triggered when taking a
      cpu offline after oprofile was initialized, e.g.:
      
       $ opcontrol --init
       $ opcontrol --start-daemon
       $ opcontrol --shutdown
       $ opcontrol --deinit
       $ echo 0 > /sys/devices/system/cpu/cpu1/online
      
      See the crash dump below. Though the counter has been disabled the cpu
      notifier is still active and trying to use already freed counter data.
      
      This fix is for linux-stable. To proper fix this, the hotplug code
      must be rewritten. Thus I will leave a WARN_ON_ONCE() message with
      this patch.
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: [<ffffffff8132ad57>] op_amd_stop+0x2d/0x8e
      PGD 0
      Oops: 0000 [#1] SMP
      last sysfs file: /sys/devices/system/cpu/cpu1/online
      CPU 1
      Modules linked in:
      
      Pid: 0, comm: swapper Not tainted 2.6.34-rc5-oprofile-x86_64-standard-00210-g8c00f06 #16 Anaheim/Anaheim
      RIP: 0010:[<ffffffff8132ad57>]  [<ffffffff8132ad57>] op_amd_stop+0x2d/0x8e
      RSP: 0018:ffff880001843f28  EFLAGS: 00010006
      RAX: 0000000000000000 RBX: 0000000000000000 RCX: dead000000200200
      RDX: ffff880001843f68 RSI: dead000000100100 RDI: 0000000000000000
      RBP: ffff880001843f48 R08: 0000000000000000 R09: ffff880001843f08
      R10: ffffffff8102c9a5 R11: ffff88000184ea80 R12: 0000000000000000
      R13: ffff88000184f6c0 R14: 0000000000000000 R15: 0000000000000000
      FS:  00007fec6a92e6f0(0000) GS:ffff880001840000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000000 CR3: 000000000163b000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 0, threadinfo ffff88042fcd8000, task ffff88042fcd51d0)
      Stack:
       ffff880001843f48 0000000000000001 ffff88042e9f7d38 ffff880001843f68
      <0> ffff880001843f58 ffffffff8132a602 ffff880001843f98 ffffffff810521b3
      <0> ffff880001843f68 ffff880001843f68 ffff880001843f88 ffff88042fcd9fd8
      Call Trace:
       <IRQ>
       [<ffffffff8132a602>] nmi_cpu_stop+0x21/0x23
       [<ffffffff810521b3>] generic_smp_call_function_single_interrupt+0xdf/0x11b
       [<ffffffff8101804f>] smp_call_function_single_interrupt+0x22/0x31
       [<ffffffff810029f3>] call_function_single_interrupt+0x13/0x20
       <EOI>
       [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff81008701>] ? default_idle+0x22/0x37
       [<ffffffff8100896d>] c1e_idle+0xdf/0xe6
       [<ffffffff813f1170>] ? atomic_notifier_call_chain+0x13/0x15
       [<ffffffff810012fb>] cpu_idle+0x4b/0x7e
       [<ffffffff813e8a4e>] start_secondary+0x1ae/0x1b2
      Code: 89 e5 41 55 49 89 fd 41 54 45 31 e4 53 31 db 48 83 ec 08 89 df e8 be f8 ff ff 48 98 48 83 3c c5 10 67 7a 81 00 74 1f 49 8b 45 08 <42> 8b 0c 20 0f 32 48 c1 e2 20 25 ff ff bf ff 48 09 d0 48 89 c2
      RIP  [<ffffffff8132ad57>] op_amd_stop+0x2d/0x8e
       RSP <ffff880001843f28>
      CR2: 0000000000000000
      ---[ end trace 679ac372d674b757 ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      Pid: 0, comm: swapper Tainted: G      D    2.6.34-rc5-oprofile-x86_64-standard-00210-g8c00f06 #16
      Call Trace:
       <IRQ>  [<ffffffff813ebd6a>] panic+0x9e/0x10c
       [<ffffffff810474b0>] ? up+0x34/0x39
       [<ffffffff81031ccc>] ? kmsg_dump+0x112/0x12c
       [<ffffffff813eeff1>] oops_end+0x81/0x8e
       [<ffffffff8101efee>] no_context+0x1f3/0x202
       [<ffffffff8101f1b7>] __bad_area_nosemaphore+0x1ba/0x1e0
       [<ffffffff81028d24>] ? enqueue_task_fair+0x16d/0x17a
       [<ffffffff810264dc>] ? activate_task+0x42/0x53
       [<ffffffff8102c967>] ? try_to_wake_up+0x272/0x284
       [<ffffffff8101f1eb>] bad_area_nosemaphore+0xe/0x10
       [<ffffffff813f0f3f>] do_page_fault+0x1c8/0x37c
       [<ffffffff81028d24>] ? enqueue_task_fair+0x16d/0x17a
       [<ffffffff813ee55f>] page_fault+0x1f/0x30
       [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff8132ad57>] ? op_amd_stop+0x2d/0x8e
       [<ffffffff8132ad46>] ? op_amd_stop+0x1c/0x8e
       [<ffffffff8132a602>] nmi_cpu_stop+0x21/0x23
       [<ffffffff810521b3>] generic_smp_call_function_single_interrupt+0xdf/0x11b
       [<ffffffff8101804f>] smp_call_function_single_interrupt+0x22/0x31
       [<ffffffff810029f3>] call_function_single_interrupt+0x13/0x20
       <EOI>  [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff81008701>] ? default_idle+0x22/0x37
       [<ffffffff8100896d>] c1e_idle+0xdf/0xe6
       [<ffffffff813f1170>] ? atomic_notifier_call_chain+0x13/0x15
       [<ffffffff810012fb>] cpu_idle+0x4b/0x7e
       [<ffffffff813e8a4e>] start_secondary+0x1ae/0x1b2
      ------------[ cut here ]------------
      WARNING: at /local/rrichter/.source/linux/arch/x86/kernel/smp.c:118 native_smp_send_reschedule+0x27/0x53()
      Hardware name: Anaheim
      Modules linked in:
      Pid: 0, comm: swapper Tainted: G      D    2.6.34-rc5-oprofile-x86_64-standard-00210-g8c00f06 #16
      Call Trace:
       <IRQ>  [<ffffffff81017f32>] ? native_smp_send_reschedule+0x27/0x53
       [<ffffffff81030ee2>] warn_slowpath_common+0x77/0xa4
       [<ffffffff81030f1e>] warn_slowpath_null+0xf/0x11
       [<ffffffff81017f32>] native_smp_send_reschedule+0x27/0x53
       [<ffffffff8102634b>] resched_task+0x60/0x62
       [<ffffffff8102653a>] check_preempt_curr_idle+0x10/0x12
       [<ffffffff8102c8ea>] try_to_wake_up+0x1f5/0x284
       [<ffffffff8102c986>] default_wake_function+0xd/0xf
       [<ffffffff810a110d>] pollwake+0x57/0x5a
       [<ffffffff8102c979>] ? default_wake_function+0x0/0xf
       [<ffffffff81026be5>] __wake_up_common+0x46/0x75
       [<ffffffff81026ed0>] __wake_up+0x38/0x50
       [<ffffffff81031694>] printk_tick+0x39/0x3b
       [<ffffffff8103ac37>] update_process_times+0x3f/0x5c
       [<ffffffff8104dc63>] tick_periodic+0x5d/0x69
       [<ffffffff8104dc90>] tick_handle_periodic+0x21/0x71
       [<ffffffff81018fd0>] smp_apic_timer_interrupt+0x82/0x95
       [<ffffffff81002853>] apic_timer_interrupt+0x13/0x20
       [<ffffffff81030cb5>] ? panic_blink_one_second+0x0/0x7b
       [<ffffffff813ebdd6>] ? panic+0x10a/0x10c
       [<ffffffff810474b0>] ? up+0x34/0x39
       [<ffffffff81031ccc>] ? kmsg_dump+0x112/0x12c
       [<ffffffff813eeff1>] ? oops_end+0x81/0x8e
       [<ffffffff8101efee>] ? no_context+0x1f3/0x202
       [<ffffffff8101f1b7>] ? __bad_area_nosemaphore+0x1ba/0x1e0
       [<ffffffff81028d24>] ? enqueue_task_fair+0x16d/0x17a
       [<ffffffff810264dc>] ? activate_task+0x42/0x53
       [<ffffffff8102c967>] ? try_to_wake_up+0x272/0x284
       [<ffffffff8101f1eb>] ? bad_area_nosemaphore+0xe/0x10
       [<ffffffff813f0f3f>] ? do_page_fault+0x1c8/0x37c
       [<ffffffff81028d24>] ? enqueue_task_fair+0x16d/0x17a
       [<ffffffff813ee55f>] ? page_fault+0x1f/0x30
       [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff8132ad57>] ? op_amd_stop+0x2d/0x8e
       [<ffffffff8132ad46>] ? op_amd_stop+0x1c/0x8e
       [<ffffffff8132a602>] ? nmi_cpu_stop+0x21/0x23
       [<ffffffff810521b3>] ? generic_smp_call_function_single_interrupt+0xdf/0x11b
       [<ffffffff8101804f>] ? smp_call_function_single_interrupt+0x22/0x31
       [<ffffffff810029f3>] ? call_function_single_interrupt+0x13/0x20
       <EOI>  [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff81008701>] ? default_idle+0x22/0x37
       [<ffffffff8100896d>] ? c1e_idle+0xdf/0xe6
       [<ffffffff813f1170>] ? atomic_notifier_call_chain+0x13/0x15
       [<ffffffff810012fb>] ? cpu_idle+0x4b/0x7e
       [<ffffffff813e8a4e>] ? start_secondary+0x1ae/0x1b2
      ---[ end trace 679ac372d674b758 ]---
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      2623a1d5
    • Robert Richter's avatar
      oprofile/x86: return -EBUSY if counters are already reserved · 8617f98c
      Robert Richter authored
      In case a counter is already reserved by the watchdog or perf_event
      subsystem, oprofile ignored this counters silently. This case is
      handled now and oprofile_setup() now reports an error.
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      8617f98c
    • Robert Richter's avatar
      oprofile/x86: rework error handler in nmi_setup() · 8f5a2dd8
      Robert Richter authored
      This patch improves the error handler in nmi_setup(). Most parts of
      the code are moved to allocate_msrs(). In case of an error
      allocate_msrs() also frees already allocated memory. nmi_setup()
      becomes easier and better extendable.
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      8f5a2dd8
  13. 26 Feb, 2010 2 commits
  14. 25 Jan, 2010 2 commits
  15. 20 Jul, 2009 15 commits