linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/8] genirq, perf: Cleanup the abuse of irq_set_affinity_hint()
@ 2021-05-18  9:17 Thomas Gleixner
  2021-05-18  9:17 ` [patch 1/8] genirq: Export affinity setter for modules Thomas Gleixner
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Thomas Gleixner @ 2021-05-18  9:17 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Robin Murphy, Nitesh Lal, Jesse Brandeburg,
	Marc Zyngier, Will Deacon, Mark Rutland, linux-arm-kernel,
	Frank Li, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Shaokun Zhang

The modular PMU drivers use irq_set_affinity_hint() to set the affinity
for the PMU interrupts, which relies on the undocumented side effect that
this function actually sets the affinity under the hood.

Setting an hint is clearly not a guarantee and for these PMU interrupts an
affinity hint, which is supposed to guide userspace for setting affinity,
is beyond pointless, because the affinity of these interrupts cannot be
modified from user space.

Aside of that the error checks are bogus because the only error which is
returned from irq_set_affinity_hint() is when there is no irq descriptor
for the interrupt number, but not when the affinity set fails. That's on
purpose because the hint can point to an offline CPU.

Sigh, if people would at least talk if something is missing...

Clean up the mess by exposing irq_set_affinity() and converting the drivers
over to that.

Thanks,

	tglx
---
 drivers/perf/arm-ccn.c                        |    6 +---
 drivers/perf/arm-cmn.c                        |    9 +-----
 drivers/perf/arm_dmc620_pmu.c                 |    5 +--
 drivers/perf/arm_dsu_pmu.c                    |    8 +----
 drivers/perf/arm_smmuv3_pmu.c                 |   10 ++-----
 drivers/perf/fsl_imx8_ddr_perf.c              |    5 +--
 drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c |    3 --
 drivers/perf/hisilicon/hisi_uncore_hha_pmu.c  |    3 --
 drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c  |    3 --
 drivers/perf/hisilicon/hisi_uncore_pa_pmu.c   |    3 --
 drivers/perf/hisilicon/hisi_uncore_pmu.c      |    4 +-
 drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c |    3 --
 include/linux/interrupt.h                     |   35 +-------------------------
 kernel/irq/manage.c                           |   33 +++++++++++++++++++++++-
 14 files changed, 49 insertions(+), 81 deletions(-)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-05-25  2:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  9:17 [patch 0/8] genirq, perf: Cleanup the abuse of irq_set_affinity_hint() Thomas Gleixner
2021-05-18  9:17 ` [patch 1/8] genirq: Export affinity setter for modules Thomas Gleixner
2021-05-18  9:17 ` [patch 2/8] perf/arm-ccn: Use irq_set_affinity() Thomas Gleixner
2021-05-18  9:17 ` [patch 3/8] perf/arm-cmn: " Thomas Gleixner
2021-05-18  9:17 ` [patch 4/8] perf/arm-dmc620: " Thomas Gleixner
2021-05-18  9:17 ` [patch 5/8] perf/arm-dsu: " Thomas Gleixner
2021-05-18 11:31   ` John Garry
2021-05-18 15:50     ` Thomas Gleixner
2021-05-18  9:17 ` [patch 6/8] perf/arm-smmuv3: " Thomas Gleixner
2021-05-18  9:17 ` [patch 7/8] perf/imx_ddr: " Thomas Gleixner
2021-05-18  9:17 ` [patch 8/8] perf/hisi: " Thomas Gleixner
2021-05-18 10:11 ` [patch 0/8] genirq, perf: Cleanup the abuse of irq_set_affinity_hint() Mark Rutland
2021-05-18 10:48 ` Will Deacon
2021-05-18 15:51   ` Thomas Gleixner
2021-05-19  9:08     ` Thomas Gleixner
2021-05-24 20:20       ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).