1. 29 Jul, 2019 1 commit
  2. 15 Jul, 2019 2 commits
  3. 27 Jun, 2019 2 commits
  4. 19 Jun, 2019 2 commits
  5. 13 Jun, 2019 1 commit
  6. 05 Jun, 2019 1 commit
  7. 30 May, 2019 1 commit
  8. 21 May, 2019 3 commits
  9. 13 May, 2019 1 commit
  10. 23 Apr, 2019 2 commits
    • Robin Murphy's avatar
      perf/arm-ccn: Clean up CPU hotplug handling · 9bcb929f
      Robin Murphy authored
      Like arm-cci, arm-ccn has the same issue of disabling preemption around
      operations which can take mutexes. Again, remove the definite bug by
      simply not trying to fight the theoretical races. And since we are
      touching the hotplug handling code, take the opportunity to streamline
      it, as there's really no need to store a full-sized cpumask to keep
      track of a single CPU ID.
      Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      9bcb929f
    • Robin Murphy's avatar
      perf/arm-cci: Remove broken race mitigation · 0d2e2a82
      Robin Murphy authored
      Uncore PMU drivers face an awkward cyclic dependency wherein:
      
       - They have to pick a valid online CPU to associate with before
         registering the PMU device, since it will get exposed to userspace
         immediately.
       - The PMU registration has to be be at least partly complete before
         hotplug events can be handled, since trying to migrate an
         uninitialised context would be bad.
       - The hotplug handler has to be ready as soon as a CPU is chosen, lest
         it go offline without the user-visible cpumask value getting updated.
      
      The arm-cci driver has tried to solve this by using get_cpu() to pick
      the current CPU and prevent it from disappearing while both
      registrations are performed, but that results in taking mutexes with
      preemption disabled, which makes certain configurations very unhappy:
      
      [ 1.983337] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:2004
      [ 1.983340] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
      [ 1.983342] Preemption disabled at:
      [ 1.983353] [<ffffff80089801f4>] cci_pmu_probe+0x1dc/0x488
      [ 1.983360] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.18.20-rt8-yocto-preempt-rt #1
      [ 1.983362] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
      [ 1.983364] Call trace:
      [ 1.983369] dump_backtrace+0x0/0x158
      [ 1.983372] show_stack+0x24/0x30
      [ 1.983378] dump_stack+0x80/0xa4
      [ 1.983383] ___might_sleep+0x138/0x160
      [ 1.983386] __might_sleep+0x58/0x90
      [ 1.983391] __rt_mutex_lock_state+0x30/0xc0
      [ 1.983395] _mutex_lock+0x24/0x30
      [ 1.983400] perf_pmu_register+0x2c/0x388
      [ 1.983404] cci_pmu_probe+0x2bc/0x488
      [ 1.983409] platform_drv_probe+0x58/0xa8
      
      It is not feasible to resolve all the possible races outside of the perf
      core itself, so address the immediate bug by following the example of
      nearly every other PMU driver and not even trying to do so. Registering
      the hotplug notifier first should minimise the window in which things
      can go wrong, so that's about as much as we can reasonably do here. This
      also revealed an additional race in assigning the global pointer too
      late relative to the hotplug notifier, which gets fixed in the process.
      Reported-by: default avatarLi, Meng <Meng.Li@windriver.com>
      Tested-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
      Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      0d2e2a82
  11. 04 Apr, 2019 3 commits
  12. 08 Feb, 2019 1 commit
  13. 06 Feb, 2019 1 commit
  14. 31 Jan, 2019 1 commit
  15. 21 Jan, 2019 3 commits
    • Andrew Murray's avatar
      perf/drivers: Strengthen exclusion checks with PERF_PMU_CAP_NO_EXCLUDE · a66b0010
      Andrew Murray authored
      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: default avatarAndrew Murray <andrew.murray@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      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.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a66b0010
    • Andrew Murray's avatar
      For drivers that do not support context exclusion let's advertise the · 30656398
      Andrew Murray authored
      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.
      Signed-off-by: default avatarAndrew Murray <andrew.murray@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      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-8-git-send-email-andrew.murray@arm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      30656398
    • Andrew Murray's avatar
      perf/core, arch/arm: Use PERF_PMU_CAP_NO_EXCLUDE conditionally · 1d899c0e
      Andrew Murray authored
      The ARM PMU driver can be used to represent a variety of ARM based
      PMUs. Some of these PMUs do not provide support for context
      exclusion, where this is the case we advertise the
      PERF_PMU_CAP_NO_EXCLUDE capability to ensure that perf prevents us
      from handling events where any exclusion flags are set.
      
      Where an ARM PMU driver has the set_event_filter function implemented,
      we rely on it to perform exclusion checks. At present some of these
      functions do not test for all of the available exclude flags.
      Signed-off-by: default avatarAndrew Murray <andrew.murray@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      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-6-git-send-email-andrew.murray@arm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1d899c0e
  16. 04 Jan, 2019 1 commit
  17. 06 Dec, 2018 1 commit
  18. 29 Nov, 2018 1 commit
  19. 21 Nov, 2018 2 commits
  20. 12 Oct, 2018 1 commit
  21. 01 Oct, 2018 1 commit
  22. 26 Jul, 2018 1 commit
  23. 24 Jul, 2018 1 commit
  24. 10 Jul, 2018 4 commits
  25. 07 Jul, 2018 1 commit
    • Randy Dunlap's avatar
      headers: separate linux/mod_devicetable.h from linux/platform_device.h · ac316725
      Randy Dunlap authored
      At over 4000 #includes, <linux/platform_device.h> is the 9th most
      #included header file in the Linux kernel.  It does not need
      <linux/mod_devicetable.h>, so drop that header and explicitly add
      <linux/mod_devicetable.h> to source files that need it.
      
         4146 #include <linux/platform_device.h>
      
      After this patch, there are 225 files that use <linux/mod_devicetable.h>,
      for a reduction of around 3900 times that <linux/mod_devicetable.h>
      does not have to be read & parsed.
      
          225 #include <linux/mod_devicetable.h>
      
      This patch was build-tested on 20 different arch-es.
      
      It also makes these drivers SubmitChecklist#1 compliant.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: kbuild test robot <lkp@intel.com> # drivers/media/platform/vimc/
      Reported-by: kbuild test robot <lkp@intel.com> # drivers/pinctrl/pinctrl-u300.c
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ac316725
  26. 04 Jul, 2018 1 commit