Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 3 participants 4 messages Mar 12, 2025 – Mar 13, 2025 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

drivers/perf/apple_m1_cpu_pmu.c

between commit:

c2e793da59fc ("perf: apple_m1: Don't disable counter in m1_pmu_enable_event()")

from the arm-perf tree and commit:

75ecffc361bb ("drivers/perf: apple_m1: Refactor event select/filter configuration")

from the kvm-arm 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 · 20 lines
Cheers,
Stephen Rothwell

diff --cc drivers/perf/apple_m1_cpu_pmu.c
index 39349ecec3c1,6be703619a97..000000000000
--- a/drivers/perf/apple_m1_cpu_pmu.c
+++ b/drivers/perf/apple_m1_cpu_pmu.c
@@@ -396,7 -428,11 +428,7 @@@ static void m1_pmu_enable_event(struct 
  	user = event->hw.config_base & M1_PMU_CFG_COUNT_USER;
  	kernel = event->hw.config_base & M1_PMU_CFG_COUNT_KERNEL;
  
- 	m1_pmu_configure_counter(event->hw.idx, evt, user, kernel);
 -	m1_pmu_disable_counter_interrupt(event->hw.idx);
 -	m1_pmu_disable_counter(event->hw.idx);
 -	isb();
 -
+ 	m1_pmu_configure_counter(event->hw.idx, event->hw.config_base);
  	m1_pmu_enable_counter(event->hw.idx);
  	m1_pmu_enable_counter_interrupt(event->hw.idx);
  	isb();
#1 lore raw
Quoted 34 lines · Stephen Rothwell

Hi all,

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

drivers/perf/apple_m1_cpu_pmu.c

between commit:

c2e793da59fc ("perf: apple_m1: Don't disable counter in m1_pmu_enable_event()")

from the arm-perf tree and commit:

75ecffc361bb ("drivers/perf: apple_m1: Refactor event select/filter configuration")

from the kvm-arm 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
drivers/perf/apple_m1_cpu_pmu.c +0 -0
diff --cc drivers/perf/apple_m1_cpu_pmu.c
index 39349ecec3c1,6be703619a97..000000000000
@@@ -396,7 -428,11 +428,7 @@@ static void m1_pmu_enable_event(struct 
  	user = event->hw.config_base & M1_PMU_CFG_COUNT_USER;
  	kernel = event->hw.config_base & M1_PMU_CFG_COUNT_KERNEL;

drivers/perf/apple_m1_cpu_pmu.c

Quoted 10 lines
drivers/perf/apple_m1_cpu_pmu.c +1 -1
 
- 	m1_pmu_configure_counter(event->hw.idx, evt, user, kernel);
 -	m1_pmu_disable_counter_interrupt(event->hw.idx);
 -	m1_pmu_disable_counter(event->hw.idx);
 -	isb();
 -
+ 	m1_pmu_configure_counter(event->hw.idx, event->hw.config_base);
  	m1_pmu_enable_counter(event->hw.idx);
  	m1_pmu_enable_counter_interrupt(event->hw.idx);
  	isb();

Looks fine to me but I'd also be happy to stick the first two patches on a shared branch to avoid this. Oliver?

Will

#2 lore raw
Quoted 36 lines · Will Deacon
Quoted 35 lines · Stephen Rothwell

Hi all,

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

drivers/perf/apple_m1_cpu_pmu.c

between commit:

c2e793da59fc ("perf: apple_m1: Don't disable counter in m1_pmu_enable_event()")

from the arm-perf tree and commit:

75ecffc361bb ("drivers/perf: apple_m1: Refactor event select/filter configuration")

from the kvm-arm 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
drivers/perf/apple_m1_cpu_pmu.c +0 -0
diff --cc drivers/perf/apple_m1_cpu_pmu.c
index 39349ecec3c1,6be703619a97..000000000000
@@@ -396,7 -428,11 +428,7 @@@ static void m1_pmu_enable_event(struct 
  	user = event->hw.config_base & M1_PMU_CFG_COUNT_USER;
  	kernel = event->hw.config_base & M1_PMU_CFG_COUNT_KERNEL;
Quoted 12 lines

drivers/perf/apple_m1_cpu_pmu.c

Quoted 9 lines
drivers/perf/apple_m1_cpu_pmu.c +1 -1
- 	m1_pmu_configure_counter(event->hw.idx, evt, user, kernel);
 -	m1_pmu_disable_counter_interrupt(event->hw.idx);
 -	m1_pmu_disable_counter(event->hw.idx);
 -	isb();
 -
+ 	m1_pmu_configure_counter(event->hw.idx, event->hw.config_base);
  	m1_pmu_enable_counter(event->hw.idx);
  	m1_pmu_enable_counter_interrupt(event->hw.idx);
  	isb();

Looks fine to me but I'd also be happy to stick the first two patches on a shared branch to avoid this. Oliver?

Agreed!

git://git.kernel.org/pub/scm/linux/kernel/git/oupton/linux.git perf/m1-guest-events

Thanks,
Oliver

#3 lore raw
Quoted 50 lines · Oliver Upton
Quoted 36 lines · Will Deacon
Quoted 35 lines · Stephen Rothwell

Hi all,

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

drivers/perf/apple_m1_cpu_pmu.c

between commit:

c2e793da59fc ("perf: apple_m1: Don't disable counter in m1_pmu_enable_event()")

from the arm-perf tree and commit:

75ecffc361bb ("drivers/perf: apple_m1: Refactor event select/filter configuration")

from the kvm-arm 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
drivers/perf/apple_m1_cpu_pmu.c +0 -0
diff --cc drivers/perf/apple_m1_cpu_pmu.c
index 39349ecec3c1,6be703619a97..000000000000
@@@ -396,7 -428,11 +428,7 @@@ static void m1_pmu_enable_event(struct 
  	user = event->hw.config_base & M1_PMU_CFG_COUNT_USER;
  	kernel = event->hw.config_base & M1_PMU_CFG_COUNT_KERNEL;
Quoted 12 lines

drivers/perf/apple_m1_cpu_pmu.c

Quoted 9 lines
drivers/perf/apple_m1_cpu_pmu.c +1 -1
- 	m1_pmu_configure_counter(event->hw.idx, evt, user, kernel);
 -	m1_pmu_disable_counter_interrupt(event->hw.idx);
 -	m1_pmu_disable_counter(event->hw.idx);
 -	isb();
 -
+ 	m1_pmu_configure_counter(event->hw.idx, event->hw.config_base);
  	m1_pmu_enable_counter(event->hw.idx);
  	m1_pmu_enable_counter_interrupt(event->hw.idx);
  	isb();

Looks fine to me but I'd also be happy to stick the first two patches on a shared branch to avoid this. Oliver?

Quoted 3 lines

Agreed!

git://git.kernel.org/pub/scm/linux/kernel/git/oupton/linux.git perf/m1-guest-events

Cheers, man. I'll pull that in shortly...

Will