Skip to contentSkip to conversation

linux-next: manual merge of the arm-soc tree with the arm-perf tree

DISCUSSION Stephen Rothwell 3 participants 3 messages Jan 2, 2024 – Jan 3, 2024 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the arm-soc tree got a conflict in:

arch/arm/kernel/perf_event_v6.c

between commit:

5cd7da19cb97 ("arm: perf: Remove PMU locking")

from the arm-perf tree and commit:

ced296f63635 ("ARM: Delete ARM11MPCore perf leftovers")

from the arm-soc tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 44 lines
Cheers,
Stephen Rothwell

diff --cc arch/arm/kernel/perf_event_v6.c
index 8fc080c9e4fb,0cbf46233d6b..000000000000
--- a/arch/arm/kernel/perf_event_v6.c
+++ b/arch/arm/kernel/perf_event_v6.c
@@@ -436,35 -386,9 +373,8 @@@ static void armv6pmu_disable_event(stru
  	val &= ~mask;
  	val |= evt;
  	armv6_pmcr_write(val);
 -	raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
  }
  
- static void armv6mpcore_pmu_disable_event(struct perf_event *event)
- {
- 	unsigned long val, mask, evt = 0;
- 	struct hw_perf_event *hwc = &event->hw;
- 	int idx = hwc->idx;
- 
- 	if (ARMV6_CYCLE_COUNTER == idx) {
- 		mask	= ARMV6_PMCR_CCOUNT_IEN;
- 	} else if (ARMV6_COUNTER0 == idx) {
- 		mask	= ARMV6_PMCR_COUNT0_IEN;
- 	} else if (ARMV6_COUNTER1 == idx) {
- 		mask	= ARMV6_PMCR_COUNT1_IEN;
- 	} else {
- 		WARN_ONCE(1, "invalid counter number (%d)\n", idx);
- 		return;
- 	}
- 
- 	/*
- 	 * Unlike UP ARMv6, we don't have a way of stopping the counters. We
- 	 * simply disable the interrupt reporting.
- 	 */
- 	val = armv6_pmcr_read();
- 	val &= ~mask;
- 	val |= evt;
- 	armv6_pmcr_write(val);
- }
- 
  static int armv6_map_event(struct perf_event *event)
  {
  	return armpmu_map_event(event, &armv6_perf_map,
#1 lore raw
Quoted 58 lines · Stephen Rothwell

Hi all,

Today's linux-next merge of the arm-soc tree got a conflict in:

arch/arm/kernel/perf_event_v6.c

between commit:

5cd7da19cb97 ("arm: perf: Remove PMU locking")

from the arm-perf tree and commit:

ced296f63635 ("ARM: Delete ARM11MPCore perf leftovers")

from the arm-soc tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 2 lines
Cheers,
Stephen Rothwell
arch/arm/kernel/perf_event_v6.c +0 -20
diff --cc arch/arm/kernel/perf_event_v6.c
index 8fc080c9e4fb,0cbf46233d6b..000000000000
@@@ -436,35 -386,9 +373,8 @@@ static void armv6pmu_disable_event(stru
  	val &= ~mask;
  	val |= evt;
  	armv6_pmcr_write(val);
 -	raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
  }
 
- static void armv6mpcore_pmu_disable_event(struct perf_event *event)
- {
- 	unsigned long val, mask, evt = 0;
- 	struct hw_perf_event *hwc = &event->hw;
- 	int idx = hwc->idx;
- 
- 	if (ARMV6_CYCLE_COUNTER == idx) {
- 		mask	= ARMV6_PMCR_CCOUNT_IEN;
- 	} else if (ARMV6_COUNTER0 == idx) {
- 		mask	= ARMV6_PMCR_COUNT0_IEN;
- 	} else if (ARMV6_COUNTER1 == idx) {
- 		mask	= ARMV6_PMCR_COUNT1_IEN;
- 	} else {
- 		WARN_ONCE(1, "invalid counter number (%d)\n", idx);
- 		return;
- 	}
- 
- 	/*
- 	 * Unlike UP ARMv6, we don't have a way of stopping the counters. We
- 	 * simply disable the interrupt reporting.

arch/arm/kernel/perf_event_v6.c

Quoted 10 lines
arch/arm/kernel/perf_event_v6.c +0 -7
- 	 */
- 	val = armv6_pmcr_read();
- 	val &= ~mask;
- 	val |= evt;
- 	armv6_pmcr_write(val);
- }
- 
  static int armv6_map_event(struct perf_event *event)
  {
  	return armpmu_map_event(event, &armv6_perf_map,

Thanks, this looks fine to me (just remove all the 11MPCore code).

Arnd -- anything you need me to do in the perf tree here other than mention this in my pull request?

Will

#2 lore raw
Quoted 9 lines · Will Deacon
Quoted 3 lines · Stephen Rothwell
  static int armv6_map_event(struct perf_event *event)
  {
  	return armpmu_map_event(event, &armv6_perf_map,

Thanks, this looks fine to me (just remove all the 11MPCore code).

Arnd -- anything you need me to do in the perf tree here other than mention this in my pull request?

No, I think we're good here as far as I can tell.

Arnd