19 Oct, 2010

5 commits

  • Remove a couple of pointless header file includes.
    Fixes a compile bug caused by header file include dependencies with
    "irq: Add tracepoint to softirq_raise" within linux-next.

    Reported-by: Sachin Sant
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky
    [ cherry-picked from the s390 tree to fix "2bf2160: irq: Add tracepoint to softirq_raise" ]
    Signed-off-by: Ingo Molnar

    Heiko Carstens
     
  • Ugly #include dependencies. We need to have local_softirq_pending()
    defined before it gets used in . But
    provides the definition *after* this #include chain:



    Signed-off-by: Tony Luck
    [ cherry-picked from the ia64 tree to fix "2bf2160: irq: Add tracepoint to softirq_raise" ]
    Signed-off-by: Ingo Molnar

    Tony Luck
     
  • Commit c3f00c70 ("perf: Separate find_get_context() from event
    initialization") changed the generic perf_event code to call
    perf_event_alloc, which calls the arch-specific event_init code,
    before looking up the context for the new event. Unfortunately,
    power_pmu_event_init uses event->ctx->task to see whether the
    new event is a per-task event or a system-wide event, and thus
    crashes since event->ctx is NULL at the point where
    power_pmu_event_init gets called.

    (The reason it needs to know whether it is a per-task event is
    because there are some hardware events on Power systems which
    only count when the processor is not idle, and there are some
    fixed-function counters which count such events. For example,
    the "run cycles" event counts cycles when the processor is not
    idle. If the user asks to count cycles, we can use "run cycles"
    if this is a per-task event, since the processor is running when
    the task is running, by definition. We can't use "run cycles"
    if the user asks for "cycles" on a system-wide counter.)

    Fortunately the information we need is in the
    event->attach_state field, so we just use that instead.

    Signed-off-by: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Peter Zijlstra
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar
    Reported-by: Alexey Kardashevskiy
    Signed-off-by: Ingo Molnar

    Paul Mackerras
     
  • Provide a mechanism that allows running code in IRQ context. It is
    most useful for NMI code that needs to interact with the rest of the
    system -- like wakeup a task to drain buffers.

    Perf currently has such a mechanism, so extract that and provide it as
    a generic feature, independent of perf so that others may also
    benefit.

    The IRQ context callback is generated through self-IPIs where
    possible, or on architectures like powerpc the decrementer (the
    built-in timer facility) is set to generate an interrupt immediately.

    Architectures that don't have anything like this get to do with a
    callback from the timer tick. These architectures can call
    irq_work_run() at the tail of any IRQ handlers that might enqueue such
    work (like the perf IRQ handler) to avoid undue latencies in
    processing the work.

    Signed-off-by: Peter Zijlstra
    Acked-by: Kyle McMartin
    Acked-by: Martin Schwidefsky
    [ various fixes ]
    Signed-off-by: Huang Ying
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • PERF_COUNT_HW_CACHE_DTLB:READ:MISS had a bogus umask value of 0 which
    counts nothing. Needed to be 0x7 (to count all possibilities).

    PERF_COUNT_HW_CACHE_ITLB:READ:MISS had a bogus umask value of 0 which
    counts nothing. Needed to be 0x3 (to count all possibilities).

    Signed-off-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    Cc: Robert Richter
    Cc: # as far back as it applies
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     

15 Oct, 2010

6 commits


14 Oct, 2010

3 commits

  • Since the text_poke_smp() definately depends on actual
    stop_machine() on smp, add that dependency to Kconfig.

    Signed-off-by: Masami Hiramatsu
    Cc: Rusty Russell
    Cc: Ananth N Mavinakayanahalli
    Cc: 2nddept-manager@sdl.hitachi.co.jp
    Cc: Mathieu Desnoyers
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     
  • Use __stop_machine() in text_poke_smp() because the caller
    must get online_cpus before calling text_poke_smp(), but
    stop_machine() do it again. We don't need it.

    Signed-off-by: Masami Hiramatsu
    Cc: Rusty Russell
    Cc: Ananth N Mavinakayanahalli
    Cc: 2nddept-manager@sdl.hitachi.co.jp
    Cc: Mathieu Desnoyers
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     
  • Fix this linux-next build failure that Stephen reported:

    arch/arm/kernel/perf_event.c: In function 'armpmu_event_init':
    arch/arm/kernel/perf_event.c:543: error: request for member 'num_events' in something not a structure or union

    Reported-by: Stephen Rothwell
    Cc: Peter Zijlstra
    Cc: paulus
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

12 Oct, 2010

2 commits


11 Oct, 2010

7 commits

  • Now that we've got a generic perf-events based oprofile backend we might
    as well make use of it seeing as SH doesn't do anything special with its
    oprofile backend. Also introduce a new CONFIG_HW_PERF_EVENTS symbol so
    that we can fallback to using the timer interrupt for oprofile if the
    CPU doesn't support perf events.

    Also, to avoid a section mismatch warning we need to annotate
    oprofile_arch_exit() with an __exit marker.

    Signed-off-by: Matt Fleming
    Acked-by: Paul Mundt
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • 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
     
  • Introduce perf_pmu_name() helper function that returns the name of the
    pmu. This gives us a generic way to get the name of a pmu regardless of
    how an architecture identifies it internally.

    Signed-off-by: Matt Fleming
    Acked-by: Peter Zijlstra
    Acked-by: Paul Mundt
    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
     

08 Oct, 2010

1 commit


07 Oct, 2010

2 commits

  • * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus:
    MIPS: Octeon: Place cnmips_cu2_setup in __init memory.
    MIPS: Don't place cu2 notifiers in __cpuinitdata
    MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin
    MIPS: Alchemy: Resolve prom section mismatches
    MIPS: Fix syscall 64 bit number comments.
    MIPS: Hookup fanotify_init, fanotify_mark, and prlimit64 syscalls.
    MIPS: TX49xx: Rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
    MIPS: N32: Fix getdents64 syscall for n32
    MIPS: Remove pr_ uses of KERN_
    MIPS: PNX8550: Sort out machine halt, restart and powerdown functions.
    MIPS: GIC: Remove dependencies from Malta files.
    MIPS: Kconfig: Fix and clarify kconfig help text for VSMP and SMTC.
    MIPS: DMA: Fix computation of DMA flags from device's coherent_dma_mask.
    MIPS: Audit: Fix hang in entry.S.
    MIPS: Document why RELOC_HIDE is there.
    MIPS: Octeon: Determine if helper needs to be built
    MIPS: Use generic atomic64 for 32-bit kernels
    MIPS: RM7000: Symbol should be static
    MIPS: kspd: Adjust confusing if indentation
    MIPS: Fix a typo.

    Linus Torvalds
     
  • * 'v2.6.36-rc6-urgent-fixes' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
    xen: do not initialize PV timers on HVM if !xen_have_vector_callback
    xen: do not set xenstored_ready before xenbus_probe on hvm

    Linus Torvalds
     

06 Oct, 2010

3 commits

  • Since powerpc uses -Werror on arch powerpc, the build was broken like
    this:

    cc1: warnings being treated as errors
    arch/powerpc/kernel/module.c: In function 'module_finalize':
    arch/powerpc/kernel/module.c:66: error: unused variable 'err'

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf trace scripting: Fix extern struct definitions
    perf ui hist browser: Fix segfault on 'a' for annotate
    perf tools: Fix build breakage
    perf, x86: Handle in flight NMIs on P4 platform
    oprofile, ARM: Release resources on failure
    oprofile: Add Support for Intel CPU Family 6 / Model 29

    Linus Torvalds
     
  • With all the recent module loading cleanups, we've minimized the code
    that sits under module_mutex, fixing various deadlocks and making it
    possible to do most of the module loading in parallel.

    However, that whole conversion totally missed the rather obscure code
    that adds a new module to the list for BUG() handling. That code was
    doubly obscure because (a) the code itself lives in lib/bugs.c (for
    dubious reasons) and (b) it gets called from the architecture-specific
    "module_finalize()" rather than from generic code.

    Calling it from arch-specific code makes no sense what-so-ever to begin
    with, and is now actively wrong since that code isn't protected by the
    module loading lock any more.

    So this commit moves the "module_bug_{finalize,cleanup}()" calls away
    from the arch-specific code, and into the generic code - and in the
    process protects it with the module_mutex so that the list operations
    are now safe.

    Future fixups:
    - move the module list handling code into kernel/module.c where it
    belongs.
    - get rid of 'module_bug_list' and just use the regular list of modules
    (called 'modules' - imagine that) that we already create and maintain
    for other reasons.

    Reported-and-tested-by: Thomas Gleixner
    Cc: Rusty Russell
    Cc: Adrian Bunk
    Cc: Andrew Morton
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 Oct, 2010

11 commits