lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <23db2d80-cfc4-4c15-a4fe-11e677185344@gmail.com>
Date: Wed, 12 Feb 2025 09:46:38 +0800
From: Nick Chan <towinchenmi@...il.com>
To: Will Deacon <will@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Catalin Marinas <catalin.marinas@....com>
Cc: Marc Zyngier <maz@...nel.org>, linux-arm-kernel@...ts.infradead.org,
 linux-perf-users@...r.kernel.org, devicetree@...r.kernel.org,
 asahi@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/10] drivers/perf: apple_m1: Support per-implementation
 event tables


Nick Chan 於 2025/2/12 凌晨12:07 寫道:
> Use per-implementation event tables to allow supporting implementations
> with a different list of events and event affinities.
>
> Signed-off-by: Nick Chan <towinchenmi@...il.com>
> ---
>  drivers/perf/apple_m1_cpu_pmu.c | 65 +++++++++++++++++++++++++----------------
>  1 file changed, 40 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/perf/apple_m1_cpu_pmu.c b/drivers/perf/apple_m1_cpu_pmu.c
> index 06fd317529fcbab0f1485228efe8470be565407c..1bf7ce5c09846c699d66bdfcca129f418a9dad9e 100644
> --- a/drivers/perf/apple_m1_cpu_pmu.c
> +++ b/drivers/perf/apple_m1_cpu_pmu.c
[...]
>  static void m1_pmu_reset(void *info)
> @@ -572,25 +588,16 @@ static int m1_pmu_set_event_filter(struct hw_perf_event *event,
>  	return 0;
>  }
>  
> -static int m1_pmu_init(struct arm_pmu *cpu_pmu, u32 flags)
> +static int apple_pmu_init_common(struct arm_pmu *cpu_pmu, u32 flags)
>  {
>  	cpu_pmu->handle_irq	  = m1_pmu_handle_irq;
>  	cpu_pmu->enable		  = m1_pmu_enable_event;
>  	cpu_pmu->disable	  = m1_pmu_disable_event;
>  	cpu_pmu->read_counter	  = m1_pmu_read_counter;
>  	cpu_pmu->write_counter	  = m1_pmu_write_counter;
> -	cpu_pmu->get_event_idx	  = m1_pmu_get_event_idx;
>  	cpu_pmu->clear_event_idx  = m1_pmu_clear_event_idx;
>  	cpu_pmu->start		  = m1_pmu_start;
>  	cpu_pmu->stop		  = m1_pmu_stop;
> -
> -	if (flags & ARMPMU_EVT_47BIT)
> -		cpu_pmu->map_event = m1_pmu_map_event;
> -	else if (flags & ARMPMU_EVT_63BIT)
> -		cpu_pmu->map_event = m2_pmu_map_event;
> -	else
> -		return WARN_ON(-EINVAL);
> -
>  	cpu_pmu->reset		  = m1_pmu_reset;
>  	cpu_pmu->set_event_filter = m1_pmu_set_event_filter;

[...]

The flags parameter is no longer used, so I will send a v2 with the parameter dropped.

Nick Chan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ