29 Jul, 2020

1 commit

  • [ Upstream commit f32ed8eb0e3f0d0ef4ddb854554d60ca5863a9f9 ]

    Forcefully unbinding PMU drivers during perf sampling will lead to
    a kernel panic, because the perf upper-layer framework call a NULL
    pointer in this situation.

    To solve this issue, "suppress_bind_attrs" should be set to true, so
    that bind/unbind can be disabled via sysfs and prevent unbinding PMU
    drivers during perf sampling.

    Signed-off-by: Qi Liu
    Reviewed-by: John Garry
    Link: https://lore.kernel.org/r/1594975763-32966-1-git-send-email-liuqi115@huawei.com
    Signed-off-by: Will Deacon
    Signed-off-by: Sasha Levin

    Qi Liu
     

01 Aug, 2019

1 commit

  • We don't need dev_err() messages when platform_get_irq() fails now that
    platform_get_irq() prints an error message itself when something goes
    wrong. Let's remove these prints with a simple semantic patch.

    //
    @@
    expression ret;
    struct platform_device *E;
    @@

    ret =
    (
    platform_get_irq(E, ...)
    |
    platform_get_irq_byname(E, ...)
    );

    if ( \( ret < 0 \| ret

    While we're here, remove braces on if statements that only have one
    statement (manually).

    Cc: Will Deacon
    Cc: Mark Rutland
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Greg Kroah-Hartman
    Signed-off-by: Stephen Boyd
    Signed-off-by: Will Deacon

    Stephen Boyd
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 and
    only version 2 as published by the free software foundation this
    program is distributed in the hope that it will be useful but
    without any warranty without even the implied warranty of
    merchantability or fitness for a particular purpose see the gnu
    general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 294 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190529141900.825281744@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 Jan, 2019

1 commit

  • For drivers that do not support context exclusion let's advertise the
    PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will
    prevent us from handling events where any exclusion flags are set.
    Let's also remove the now unnecessary check for exclusion flags.

    This change means that qcom_{l2|l3}_pmu will now also indicate that
    they do not support exclude_{host|guest} and that xgene_pmu does
    not also support exclude_idle and exclude_hv.

    Note that for qcom_l2_pmu we now implictly return -EINVAL instead
    of -EOPNOTSUPP. This change will result in the perf userspace
    utility retrying the perf_event_open system call with fallback
    event attributes that do not fail.

    Signed-off-by: Andrew Murray
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Will Deacon
    Cc: Arnaldo Carvalho de Melo
    Cc: Benjamin Herrenschmidt
    Cc: Borislav Petkov
    Cc: Ivan Kokshaysky
    Cc: Linus Torvalds
    Cc: Mark Rutland
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Richard Henderson
    Cc: Russell King
    Cc: Sascha Hauer
    Cc: Shawn Guo
    Cc: Thomas Gleixner
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: robin.murphy@arm.com
    Cc: suzuki.poulose@arm.com
    Link: https://lkml.kernel.org/r/1547128414-50693-9-git-send-email-andrew.murray@arm.com
    Signed-off-by: Ingo Molnar

    Andrew Murray
     

17 Mar, 2018

1 commit

  • Mark noticed that the change to sibling_list changed some iteration
    semantics; because previously we used group_list as list entry,
    sibling events would always have an empty sibling_list.

    But because we now use sibling_list for both list head and list entry,
    siblings will report as having siblings.

    Fix this with a custom for_each_sibling_event() iterator.

    Fixes: 8343aae66167 ("perf/core: Remove perf_event::group_entry")
    Reported-by: Mark Rutland
    Suggested-by: Mark Rutland
    Signed-off-by: Peter Zijlstra (Intel)
    Signed-off-by: Thomas Gleixner
    Cc: vincent.weaver@maine.edu
    Cc: alexander.shishkin@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: alexey.budankov@linux.intel.com
    Cc: valery.cherepennikov@intel.com
    Cc: eranian@google.com
    Cc: acme@redhat.com
    Cc: linux-tip-commits@vger.kernel.org
    Cc: davidcc@google.com
    Cc: kan.liang@intel.com
    Cc: Dmitry.Prohorov@intel.com
    Cc: jolsa@redhat.com
    Link: https://lkml.kernel.org/r/20180315170129.GX4043@hirez.programming.kicks-ass.net

    Peter Zijlstra
     

12 Mar, 2018

1 commit

  • Now that all the grouping is done with RB trees, we no longer need
    group_entry and can replace the whole thing with sibling_list.

    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Mark Rutland
    Cc: Alexander Shishkin
    Cc: Alexey Budankov
    Cc: Arnaldo Carvalho de Melo
    Cc: David Carrillo-Cisneros
    Cc: Dmitri Prokhorov
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Linus Torvalds
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Valery Cherepennikov
    Cc: Vince Weaver
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

02 Oct, 2017

1 commit

  • Add event names so that common events can be
    specified symbolically, for example:

    l2cache_0/total-reads/,l2cache_0/cycles/

    Event names are displayed in 'perf list'.

    Signed-off-by: Neil Leeder
    Signed-off-by: Will Deacon

    Neil Leeder
     

26 Jul, 2017

1 commit

  • The check for column exclusion did not verify that the event being
    checked was an L2 event, and not a software event.
    Software events should not be checked for column exclusion.
    This resulted in a group with both software and L2 events sometimes
    incorrectly rejecting the L2 event for column exclusion and
    not counting it.

    Add a check for PMU type before applying column exclusion logic.

    Fixes: 21bdbb7102edeaeb ("perf: add qcom l2 cache perf events driver")
    Acked-by: Mark Rutland
    Signed-off-by: Neil Leeder
    Signed-off-by: Will Deacon

    Neil Leeder
     

09 Feb, 2017

1 commit

  • Adds perf events support for L2 cache PMU.

    The L2 cache PMU driver is named 'l2cache_0' and can be used
    with perf events to profile L2 events such as cache hits
    and misses on Qualcomm Technologies processors.

    Reviewed-by: Mark Rutland
    Signed-off-by: Neil Leeder
    [will: minimise nesting in l2_cache_associate_cpu_with_cluster]
    [will: use kstrtoul for unsigned long, remove redunant .owner setting]
    Signed-off-by: Will Deacon

    Neil Leeder