1. 04 12月, 2008 1 次提交
    • W
      x86/oprofile: fix Intel cpu family 6 detection · 3d337c65
      William Cohen 提交于
      Alan Jenkins wrote:
      > This is on an EeePC 701, /proc/cpuinfo as attached.
      >
      > Is this expected?  Will the next release work?
      >
      > Thanks, Alan
      >
      > # opcontrol --setup --no-vmlinux
      > cpu_type 'unset' is not valid
      > you should upgrade oprofile or force the use of timer mode
      >
      > # opcontrol -v
      > opcontrol: oprofile 0.9.4 compiled on Nov 29 2008 22:44:10
      >
      > # cat /dev/oprofile/cpu_type
      > i386/p6
      > # uname -r
      > 2.6.28-rc6eeepc
      
      Hi Alan,
      
      Looking at the kernel driver code for oprofile it can return the "i386/p6" for
      the cpu_type. However, looking at the user-space oprofile code there isn't the
      matching entry in libop/op_cpu_type.c or the events/unit_mask files in
      events/i386 directory.
      
      The Intel AP-485 says this is a "Intel Pentium M processor model D". Seems like
      the oprofile kernel driver should be identifying the processor as "i386/p6_mobile"
      
      The driver identification code doesn't look quite right in nmi_init.c
      
      http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=blob;f=arch/x86/oprofile/nmi_int.c;h=022cd41ea9b4106e5884277096e80e9088a7c7a9;hb=HEAD
      
      has:
      
      409         case 10 ... 13:
      410                 *cpu_type = "i386/p6";
      411                 break;
      
      Referring to the Intel AP-485:
      case 10 and 11 should produce "i386/piii"
      case 13 should produce "i386/p6_mobile"
      
      I didn't see anything for case 12.
      
      Something like the attached patch. I don't have a celeron machine to verify that
      changes in this area of the kernel fix thing.
      
      -Will
      Signed-off-by: NWilliam Cohen <wcohen@redhat.com>
      Tested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      3d337c65
  2. 16 10月, 2008 1 次提交
  3. 14 10月, 2008 2 次提交
    • A
      oprofile: Implement Intel architectural perfmon support · b9917028
      Andi Kleen 提交于
      Newer Intel CPUs (Core1+) have support for architectural
      events described in CPUID 0xA. See the IA32 SDM Vol3b.18 for details.
      
      The advantage of this is that it can be done without knowing about
      the specific CPU, because the CPU describes by itself what
      performance events are supported. This is only a fallback
      because only a limited set of 6 events are supported.
      This allows to do profiling on Nehalem and on Atom systems
      (later not tested)
      
      This patch implements support for that in oprofile's Intel
      Family 6 profiling module. It also has the advantage of supporting
      an arbitary number of events now as reported by the CPU.
      Also allow arbitary counter widths >32bit while we're at it.
      
      Requires a patched oprofile userland to support the new
      architecture.
      
      v2: update for latest oprofile tree
          remove force_arch_perfmon
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      b9917028
    • A
      oprofile: Don't report Nehalem as core_2 · f645f640
      Andi Kleen 提交于
      This essentially reverts Linus' earlier 4b9f12a3
      commit. Nehalem is not core_2, so it shouldn't be reported as such.
      However with the earlier arch perfmon patch it will fall back to
      arch perfmon mode now, so there is no need to fake it as core_2.
      The only drawback is that Linus will need to patch the arch perfmon
      support into his oprofile binary now, but I think he can do that.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      f645f640
  4. 24 9月, 2008 1 次提交
  5. 22 9月, 2008 2 次提交
    • A
      x86, oprofile: BUG: using smp_processor_id() in preemptible code · 45f197ad
      Andrea Righi 提交于
      Add __raw access before setting per cpu variable switch_index, to avoid
      the following BUG:
      
      [  449.166827] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/6998
      [  449.166848] caller is op_nmi_init+0xf0/0x2b0 [oprofile]
      [  449.166855] Pid: 6998, comm: modprobe Not tainted 2.6.27-rc5-mm1 #29
      [  449.166860] Call Trace:
      [  449.166872]  [<ffffffff80362d67>] debug_smp_processor_id+0xd7/0xe0
      [  449.166887]  [<ffffffffa00181c0>] op_nmi_init+0xf0/0x2b0 [oprofile]
      [  449.166902]  [<ffffffffa0018000>] oprofile_init+0x0/0x60 [oprofile]
      [  449.166915]  [<ffffffffa00180a9>] oprofile_arch_init+0x9/0x30 [oprofile]
      [  449.166928]  [<ffffffffa001801e>] oprofile_init+0x1e/0x60 [oprofile]
      [  449.166937]  [<ffffffff8020903b>] _stext+0x3b/0x160
      [  449.166946]  [<ffffffff80477985>] __mutex_unlock_slowpath+0xe5/0x190
      [  449.166955]  [<ffffffff80262c1a>] trace_hardirqs_on_caller+0xca/0x140
      [  449.166965]  [<ffffffff8026f7fc>] sys_init_module+0xdc/0x210
      [  449.166972]  [<ffffffff8020b7cb>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NAndrea Righi <righi.andrea@gmail.com>
      Acked-by: NRobert Richter <robert.richter@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      45f197ad
    • A
      x86, oprofile: BUG scheduling while atomic · b61e06f2
      Andrea Righi 提交于
      nmi_shutdown() calls unregister_die_notifier() from an atomic context
      after setting preempt_disable() via get_cpu_var():
      
      [ 1049.404154] BUG: scheduling while atomic: oprofiled/7796/0x00000002
      [ 1049.404171] INFO: lockdep is turned off.
      [ 1049.404176] Modules linked in: oprofile af_packet rfcomm l2cap kvm_intel kvm i915 drm acpi_cpufreq cpufreq_userspace cpufreq_conservative cpufreq_ondemand cpufreq_powersave freq_table container sbs sbshc dm_mod arc4 ecb cryptomgr aead snd_hda_intel crypto_blkcipher snd_pcm_oss crypto_algapi snd_pcm iwlagn iwlcore snd_timer iTCO_wdt led_class btusb iTCO_vendor_support snd psmouse bluetooth mac80211 soundcore cfg80211 snd_page_alloc intel_agp video output button battery ac dcdbas evdev ext3 jbd mbcache sg sd_mod piix ata_piix libata scsi_mod dock tg3 libphy ehci_hcd uhci_hcd usbcore thermal processor fan fuse
      [ 1049.404362] Pid: 7796, comm: oprofiled Not tainted 2.6.27-rc5-mm1 #30
      [ 1049.404368] Call Trace:
      [ 1049.404384]  [<ffffffff804769fd>] thread_return+0x4a0/0x7d3
      [ 1049.404396]  [<ffffffff8026ad92>] generic_exec_single+0x52/0xe0
      [ 1049.404405]  [<ffffffff8026ae1a>] generic_exec_single+0xda/0xe0
      [ 1049.404414]  [<ffffffff8026aee3>] smp_call_function_single+0x73/0x150
      [ 1049.404423]  [<ffffffff804770c5>] schedule_timeout+0x95/0xd0
      [ 1049.404430]  [<ffffffff80476083>] wait_for_common+0x43/0x180
      [ 1049.404438]  [<ffffffff80476154>] wait_for_common+0x114/0x180
      [ 1049.404448]  [<ffffffff80236980>] default_wake_function+0x0/0x10
      [ 1049.404457]  [<ffffffff8024f810>] synchronize_rcu+0x30/0x40
      [ 1049.404463]  [<ffffffff8024f890>] wakeme_after_rcu+0x0/0x10
      [ 1049.404472]  [<ffffffff80479ca0>] _spin_unlock_irqrestore+0x40/0x80
      [ 1049.404482]  [<ffffffff80256def>] atomic_notifier_chain_unregister+0x3f/0x60
      [ 1049.404501]  [<ffffffffa03d8801>] nmi_shutdown+0x51/0x90 [oprofile]
      [ 1049.404517]  [<ffffffffa03d6134>] oprofile_shutdown+0x34/0x70 [oprofile]
      [ 1049.404532]  [<ffffffffa03d721e>] event_buffer_release+0xe/0x40 [oprofile]
      [ 1049.404543]  [<ffffffff802bdcdd>] __fput+0xcd/0x240
      [ 1049.404551]  [<ffffffff802baa74>] filp_close+0x54/0x90
      [ 1049.404560]  [<ffffffff8023e1d1>] put_files_struct+0xb1/0xd0
      [ 1049.404568]  [<ffffffff8023f82f>] do_exit+0x18f/0x930
      [ 1049.404576]  [<ffffffff8020be03>] restore_args+0x0/0x30
      [ 1049.404584]  [<ffffffff80240006>] do_group_exit+0x36/0xa0
      [ 1049.404592]  [<ffffffff8020b7cb>] system_call_fastpath+0x16/0x1b
      
      This can be easily triggered with 'opcontrol --shutdown'.
      
      Simply move get_cpu_var() above unregister_die_notifier().
      Signed-off-by: NAndrea Righi <righi.andrea@gmail.com>
      Acked-by: NRobert Richter <robert.richter@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b61e06f2
  6. 20 8月, 2008 1 次提交
    • A
      x86: fix oprofile + hibernation badness · 80a8c9ff
      Andi Kleen 提交于
      Vegard Nossum reported oprofile + hibernation problems:
      
      > Now some warnings:
      >
      > ------------[ cut here ]------------
      > WARNING: at /uio/arkimedes/s29/vegardno/git-working/linux-2.6/kernel/smp.c:328 s
      > mp_call_function_mask+0x194/0x1a0()
      
      The usual problem: the suspend function when interrupts are
      already disabled calls smp_call_function which is not allowed with
      interrupt off. But at this point all the other CPUs should be already
      down anyways, so it should be enough to just drop that.
      
      This patch should fix that problem at least by fixing cpu hotplug&
      suspend support.
      
      [ mingo@elte.hu: fixed 5 coding style errors. ]
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Tested-by: NVegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      80a8c9ff
  7. 26 7月, 2008 6 次提交
  8. 25 7月, 2008 1 次提交
  9. 26 6月, 2008 1 次提交
  10. 24 6月, 2008 1 次提交
    • V
      x86/oprofile: disable preemption in nmi_shutdown · 93e1ade5
      Vegard Nossum 提交于
      fix:
      
          BUG: using smp_processor_id() in preemptible [00000000] code: oprofiled/27301
          caller is nmi_shutdown+0x11/0x60
          Pid: 27301, comm: oprofiled Not tainted 2.6.26-rc7 #25
           [<c028a90d>] debug_smp_processor_id+0xbd/0xc0
           [<c045fba1>] nmi_shutdown+0x11/0x60
           [<c045dd4a>] oprofile_shutdown+0x2a/0x60
      
      Note that we don't need this for the other functions, since they are all
      called with on_each_cpu() (which disables preemption for us anyway).
      Signed-off-by: NVegard Nossum <vegard.nossum@gmail.com>
      Cc: Philippe Elie <phil.el@wanadoo.fr>
      Cc: oprofile-list@lists.sf.net
      Cc: Johannes Weiner <hannes@saeurebad.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      93e1ade5
  11. 20 4月, 2008 1 次提交
  12. 30 1月, 2008 1 次提交
  13. 25 1月, 2008 1 次提交
  14. 19 1月, 2008 1 次提交
  15. 18 10月, 2007 1 次提交
  16. 11 10月, 2007 1 次提交
  17. 01 6月, 2007 1 次提交
  18. 22 5月, 2007 1 次提交
  19. 09 5月, 2007 1 次提交
    • C
      move die notifier handling to common code · 1eeb66a1
      Christoph Hellwig 提交于
      This patch moves the die notifier handling to common code.  Previous
      various architectures had exactly the same code for it.  Note that the new
      code is compiled unconditionally, this should be understood as an appel to
      the other architecture maintainer to implement support for it aswell (aka
      sprinkling a notify_die or two in the proper place)
      
      arm had a notifiy_die that did something totally different, I renamed it to
      arm_notify_die as part of the patch and made it static to the file it's
      declared and used at.  avr32 used to pass slightly less information through
      this interface and I brought it into line with the other architectures.
      
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
      [bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: <linux-arch@vger.kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NBryan Wu <bryan.wu@analog.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1eeb66a1
  20. 03 5月, 2007 1 次提交
  21. 18 2月, 2007 1 次提交
  22. 26 9月, 2006 3 次提交
  23. 17 9月, 2006 1 次提交
  24. 11 7月, 2006 1 次提交
    • A
      [PATCH] x86_64: Allow oprofile for model P4 models · 1cfcea1b
      Andi Kleen 提交于
      Add it for P4 model 6 - reported to work and have a similar PMU to
      earlier P4s.
      
      Add an p4force=1 module override parameter for future use.
      
      We had a discussion about that earlier - it's a trade off between the
      PMU staying compatible or not.  I think the force parameter is a
      reasonable compromise.
      
      Cc: oprofile-list@lists.sf.net
      Cc: Asit Mallick <asit.k.mallick@intel.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1cfcea1b
  25. 27 6月, 2006 1 次提交
  26. 16 5月, 2006 1 次提交
  27. 29 3月, 2006 1 次提交
  28. 23 3月, 2006 1 次提交
    • A
      [PATCH] more for_each_cpu() conversions · 394e3902
      Andrew Morton 提交于
      When we stop allocating percpu memory for not-possible CPUs we must not touch
      the percpu data for not-possible CPUs at all.  The correct way of doing this
      is to test cpu_possible() or to use for_each_cpu().
      
      This patch is a kernel-wide sweep of all instances of NR_CPUS.  I found very
      few instances of this bug, if any.  But the patch converts lots of open-coded
      test to use the preferred helper macros.
      
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Acked-by: NKyle McMartin <kyle@parisc-linux.org>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Christian Zankel <chris@zankel.net>
      Cc: Philippe Elie <phil.el@wanadoo.fr>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Eric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      394e3902
  29. 08 9月, 2005 1 次提交
  30. 17 4月, 2005 2 次提交
    • P
      [PATCH] pm_message_t: more fixes in common and i386 · 438510f6
      Pavel Machek 提交于
      I thought I'm done with fixing u32 vs.  pm_message_t ...  unfortunately
      that turned out not to be the case as Russel King pointed out.  Here are
      fixes for Documentation and common code (mainly system devices).
      Signed-off-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      438510f6
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4