23 Dec, 2011

1 commit

  • This change fixes a linking problem, which happens if oprofile
    is selected to be compiled as built-in:

    `oprofile_arch_exit' referenced in section `.init.text' of
    arch/arm/oprofile/built-in.o: defined in discarded section
    `.exit.text' of arch/arm/oprofile/built-in.o

    The problem is appeared after commit 87121ca504, which
    introduced oprofile_arch_exit() calls from __init function. Note
    that the aforementioned commit has been backported to stable
    branches, and the problem is known to be reproduced at least
    with 3.0.13 and 3.1.5 kernels.

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Robert Richter
    Cc: Will Deacon
    Cc: oprofile-list
    Cc:
    Link: http://lkml.kernel.org/r/20111222151540.GB16765@erda.amd.com
    Signed-off-by: Ingo Molnar

    Vladimir Zapolskiy
     

16 Feb, 2011

1 commit


10 Feb, 2011

1 commit

  • Since tail is the previous fp - 1, we need to compare the new fp with tail + 1
    to ensure that we don't end up passing in the same tail again, in order to
    avoid a potential infinite loop in the perf interrupt handler (which has been
    observed to occur). A similar fix seems to be needed in the OProfile code.

    Acked-by: Will Deacon
    Signed-off-by: Rabin Vincent
    Signed-off-by: Russell King

    Rabin Vincent
     

27 Jan, 2011

1 commit

  • Always allow backtraces when using oprofile on ARM, even if a PMU
    isn't present. Restores functionality originally introduced in commit
    1b7b56982fdcd9d85effd76f3928cf5d6eb26155 ("oprofile: Always allow
    backtraces on ARM") by Richard Purdie.

    It is not that obvious, but there is now only one oprofile_arch_init()
    function. So the .backtrace callback is available also in timer mode.

    Implemented by removing code and using stubs for oprofile_perf_{init,
    exit} provided by . This allows cleaning of other
    architecture specific implementations too.

    Cc: stable@kernel.org # 37.x
    Signed-off-by: Ari Kauppi
    Acked-by: Will Deacon
    Signed-off-by: Robert Richter

    Ari Kauppi
     

11 Oct, 2010

5 commits

  • Move the perf-events backend from arch/arm/oprofile into
    drivers/oprofile so that the code can be shared between architectures.

    This allows each architecture to maintain only a single copy of the PMU
    accessor functions instead of one for both perf and OProfile. It also
    becomes possible for other architectures to delete much of their
    OProfile code in favour of the common code now available in
    drivers/oprofile/oprofile_perf.c.

    Signed-off-by: Matt Fleming
    Tested-by: Will Deacon
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • In preparation for moving the majority of this oprofile code into an
    architecture-neutral place separate the architecture-independent code
    into oprofile_perf_init() and oprofile_perf_exit().

    Signed-off-by: Matt Fleming
    Tested-by: Will Deacon
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • In preparation for moving the generic functions out of this file, give
    the functions more general names (e.g. remove "arm" from the names).

    Signed-off-by: Matt Fleming
    Tested-by: Will Deacon
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • Make op_name_from_perf_id() global so that we have a way for each
    architecture to construct an oprofile name for op->cpu_type. We need to
    remove the argument from the function prototype so that we can hide all
    implementation details inside the function.

    Signed-off-by: Matt Fleming
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • The number of counters for the registered pmu is needed in a few places
    so provide a helper function that returns this number.

    Signed-off-by: Matt Fleming
    Tested-by: Will Deacon
    Acked-by: Paul Mundt
    Acked-by: Peter Zijlstra
    Signed-off-by: Robert Richter

    Matt Fleming
     

31 Aug, 2010

2 commits


17 May, 2010

3 commits

  • This is a reworking of an original patch posted by Aaro Koskinen:

    oprofile does not work with PM, because sysdev_suspend() is done with
    interrupts disabled and oprofile needs a mutex. Implementing oprofile
    as a platform device solves this problem.

    Cc: Aaro Koskinen
    Signed-off-by: Will Deacon
    Signed-off-by: Aaro Koskinen
    Signed-off-by: Russell King

    Will Deacon
     
  • Enable hardware perf-events if CPU_HAS_PMU and select
    HAVE_OPROFILE if HAVE_PERF_EVENTS. If no hardware support
    is present, OProfile will fall back to timer mode.

    This patch also removes the old OProfile drivers in favour
    of the code implemented by perf.

    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • There are currently two hardware performance monitoring subsystems in
    the kernel for ARM: OProfile and perf-events. This creates the
    following problems:

    1.) Duplicate PMU accessor code. Inevitable code drift may lead to
    bugs in one framework that are fixed in the other.

    2.) Locking issues. OProfile doesn't reprogram hardware counters
    between profiling runs if the events to be monitored have not been
    changed. This means that other profiling frameworks cannot use the
    counters if OProfile is in use.

    3.) Due to differences in the two frameworks, it may not be possible to
    compare the results obtained by OProfile with those obtained by perf.

    This patch removes the OProfile PMU driver code and replaces it with
    calls to perf, therefore solving the issues mentioned above.

    The only userspace-visible change is the lack of SCU counter support
    for 11MPCore. This is currently unsupported by OProfile userspace tools anyway and therefore shouldn't cause any problems.

    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Jamie Iles
    Cc: Jean Pihet
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     

13 Feb, 2010

1 commit


22 Dec, 2009

1 commit

  • On Oprofile ARMv7 the PMNC_D bit was set to lower the PMU IRQs
    and so to decrease the risk of errata #628216 from appearing.
    The effect of setting the PMNC_D bit is that the CCNT counter
    is divided by 64, making the program counter events count
    inaccurate.
    The new OMAP3 r4 cores should have that errata fixed.

    The PMNC_D bit should not be set, this patch fixes it.

    Signed-off-by: Jean Pihet
    Signed-off-by: Russell King

    Jean PIHET
     

18 Oct, 2009

1 commit


30 May, 2009

1 commit


29 Mar, 2009

1 commit

  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits)
    [ARM] 5435/1: fix compile warning in sanity_check_meminfo()
    [ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
    [ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
    [ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
    imxfb: Fix TFT mode
    i.MX21/27: remove ifdef CONFIG_FB_IMX
    imxfb: add clock support
    mxc: add arch_reset() function
    clkdev: add possibility to get a clock based on the device name
    i.MX1: remove fb support from mach-imx
    [ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined
    Gemini: Add support for Teltonika RUT100
    Gemini: gpiolib based GPIO support v2
    MAINTAINERS: add myself as Gemini architecture maintainer
    ARM: Add Gemini architecture v3
    [ARM] OMAP: Fix compile for omap2_init_common_hw()
    MAINTAINERS: Add myself as Faraday ARM core variant maintainer
    ARM: Add support for FA526 v2
    [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
    [ARM] collie: fix two minor formatting nits
    ...

    Linus Torvalds
     

12 Feb, 2009

1 commit


13 Jan, 2009

1 commit


13 Dec, 2008

1 commit

  • Impact: change existing irq_chip API

    Not much point with gentle transition here: the struct irq_chip's
    setaffinity method signature needs to change.

    Fortunately, not widely used code, but hits a few architectures.

    Note: In irq_select_affinity() I save a temporary in by mangling
    irq_desc[irq].affinity directly. Ingo, does this break anything?

    (Folded in fix from KOSAKI Motohiro)

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Reviewed-by: Grant Grundler
    Acked-by: Ingo Molnar
    Cc: ralf@linux-mips.org
    Cc: grundler@parisc-linux.org
    Cc: jeremy@xensource.com
    Cc: KOSAKI Motohiro

    Rusty Russell
     

06 Sep, 2008

2 commits


01 Sep, 2008

2 commits


07 Aug, 2008

2 commits


26 Jun, 2008

1 commit


29 Apr, 2008

1 commit


25 Jan, 2008

1 commit


20 Oct, 2007

1 commit

  • Quoting Randy:

    "It seems sad that this patch sources Kconfig.marker, a 7-line file,
    20-something times. Yes, you (we) don't want to put those 7 lines into
    20-something different files, so sourcing is the right thing.

    However, what you did for avr32 seems more on the right track to me: make
    _one_ Instrumentation support menu that includes PROFILING, OPROFILE, KPROBES,
    and MARKERS and then use (source) that in all of the arches."

    Signed-off-by: Mathieu Desnoyers
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     

03 Jun, 2007

1 commit


30 May, 2007

1 commit

  • Fix lockdep warnings, caused by 'set_affinity' being called without
    the correct locks taken and local interrupts disabled:

    =================================
    [ INFO: inconsistent lock state ]
    2.6.22-rc2 #1
    ---------------------------------
    inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
    swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
    (irq_controller_lock){++..}, at: [] gic_set_cpu+0x60/0xa0
    {in-hardirq-W} state was registered at:
    [] lock_acquire+0x58/0x6c
    [] _spin_lock+0x40/0x50
    [] gic_mask_irq+0x2c/0x6c
    [] handle_level_irq+0x11c/0x14c
    [] asm_do_IRQ+0x60/0x84
    [] __irq_svc+0x4c/0xc0
    [] __alloc_bootmem_nopanic+0x74/0x88
    [] __alloc_bootmem+0x18/0x3c
    [] alloc_large_system_hash+0x16c/0x200
    [] inode_init_early+0x5c/0xa4
    [] vfs_caches_init_early+0x24/0xa0
    [] start_kernel+0x220/0x2fc
    [] 0x8078
    irq event stamp: 88438
    hardirqs last enabled at (88438): [] preempt_return+0x20/0x2c
    hardirqs last disabled at (88436): [] __do_softirq+0xb0/0x138
    softirqs last enabled at (88437): [] __do_softirq+0x104/0x138
    softirqs last disabled at (88428): [] irq_exit+0x68/0x7c

    other info that might help us debug this:
    no locks held by swapper/1.

    stack backtrace:
    [] (dump_stack+0x0/0x14) from [] (print_usage_bug+0x138/0x168)
    [] (print_usage_bug+0x0/0x168) from [] (mark_lock+0x484/0x6a0)
    [] (mark_lock+0x0/0x6a0) from [] (__lock_acquire+0x3c0/0x10c8)
    [] (__lock_acquire+0x0/0x10c8) from [] (lock_acquire+0x58/0x6c)
    [] (lock_acquire+0x0/0x6c) from [] (_spin_lock+0x40/0x50)
    [] (_spin_lock+0x0/0x50) from [] (gic_set_cpu+0x60/0xa0)
    [] (gic_set_cpu+0x0/0xa0) from [] (em_route_irq+0x38/0x40)
    [] (em_route_irq+0x0/0x40) from [] (em_setup+0x18/0xa4)
    [] (em_setup+0x0/0xa4) from [] (oprofile_arch_init+0x24/0xe8)
    [] (oprofile_arch_init+0x0/0xe8) from [] (oprofile_init+0x1c/0x64)
    [] (oprofile_init+0x0/0x64) from [] (kernel_init+0x154/0x368)
    [] (kernel_init+0x0/0x368) from [] (do_exit+0x0/0x904)
    oprofile: using arm/mpcore

    Signed-off-by: Russell King

    Russell King
     

28 Apr, 2007

1 commit


02 Mar, 2007

1 commit


07 Feb, 2007

3 commits


14 Nov, 2006

1 commit