Re: [PATCH 05/17] powerpc: Add __attribute_const__ to ffs()-family implementations

2025-08-15 Thread Segher Boessenkool
On Fri, Aug 15, 2025 at 11:34:56AM -0500, Segher Boessenkool wrote: > On Thu, Aug 07, 2025 at 03:16:35PM +0530, Madhavan Srinivasan wrote: > > making them eligible for compiler optimization. > > You can instead use GCC for this. __builtin_ffs () exists since 2003, Erm, 1992 actually, but stuff h

Re: [PATCH 05/17] powerpc: Add __attribute_const__ to ffs()-family implementations

2025-08-15 Thread Segher Boessenkool
Hi! On Thu, Aug 07, 2025 at 03:16:35PM +0530, Madhavan Srinivasan wrote: > making them eligible for compiler optimization. You can instead use GCC for this. __builtin_ffs () exists since 2003, and has this attribute built-in, as well as tens of other optimisations that the kernel thing misses.

Re: [PATCH v4 17/24] riscv: vdso: Deduplicate CFLAGS_REMOVE_* variables

2025-08-15 Thread Palmer Dabbelt
On Mon, 11 Aug 2025 22:44:30 PDT (-0700), thomas.weisssc...@linutronix.de wrote: All vDSO objects need the same treatment. To make changes to both the list of objects and the list of removed flags easier, introduce a helper variable. Signed-off-by: Thomas Weißschuh Reviewed-by: Alexandre Ghiti

Re: [PATCH v4 18/24] riscv: vdso: Disable LTO for the vDSO

2025-08-15 Thread Palmer Dabbelt
On Mon, 11 Aug 2025 22:44:31 PDT (-0700), thomas.weisssc...@linutronix.de wrote: All the other architectures supporting LTO (x86, arm64, loongarch) do not use it for the vDSO. Its is problematic for some upcoming compile-time validation of the generated object code. The LTO object files do not c

Re: [PATCH v4 06/24] riscv: elf: Move relocation constants to UAPI

2025-08-15 Thread Palmer Dabbelt
On Mon, 11 Aug 2025 22:44:19 PDT (-0700), thomas.weisssc...@linutronix.de wrote: These constants are useful for cross-platform userspace, for example to process ELF files during kernel cross-compilation. Move them from the kernel-private architecture-specific header to the UAPI. Signed-off-by:

Re: (subset) [PATCH 00/21] treewide: remove unneeded 'fast_io' parameter in regmap_config

2025-08-15 Thread Bjorn Andersson
On Wed, 13 Aug 2025 18:14:46 +0200, Wolfram Sang wrote: > While working on a driver using regmap with MMIO, I wondered if I need > to set 'fast_io' in the config. Turned out I don't need to, so I added > documentation for it with commit ffc72771ff6e ("regmap: Annotate that > MMIO implies fast IO"

Re: [PATCH 00/17] Add __attribute_const__ to ffs()-family implementations

2025-08-15 Thread Peter Zijlstra
On Mon, Aug 04, 2025 at 09:43:56AM -0700, Kees Cook wrote: > Hi, > > While tracking down a problem where constant expressions used by > BUILD_BUG_ON() suddenly stopped working[1], we found that an added static > initializer was convincing the compiler that it couldn't track the state > of the prio

Re: [PATCH 00/14] Add interface to expose vpa dtl counters via perf

2025-08-15 Thread Athira Rajeev
> On 15 Aug 2025, at 5:47 PM, Venkat Rao Bagalkote > wrote: > > > On 15/08/25 2:03 pm, Athira Rajeev wrote: >> The pseries Shared Processor Logical Partition(SPLPAR) machines can >> retrieve a log of dispatch and preempt events from the hypervisor >> using data from Disptach Trace Log(DTL) b

Re: [PATCH 00/14] Add interface to expose vpa dtl counters via perf

2025-08-15 Thread Venkat Rao Bagalkote
On 15/08/25 2:03 pm, Athira Rajeev wrote: The pseries Shared Processor Logical Partition(SPLPAR) machines can retrieve a log of dispatch and preempt events from the hypervisor using data from Disptach Trace Log(DTL) buffer. With this information, user can retrieve when and why each dispatch & p

Re: [PATCH v4 00/24] vdso: Reject absolute relocations during build

2025-08-15 Thread Thomas Weißschuh
Hi Christophe, On Thu, Aug 14, 2025 at 03:43:09PM +0200, Christophe Leroy wrote: > Le 12/08/2025 à 07:44, Thomas Weißschuh a écrit : > > The compiler can emit absolute relocations in vDSO code, > > which are invalid in vDSO code. > > Detect them at compile-time. > > I'm a bit puzzled with this se

Re: [PATCH v6 0/4] PCI: Add support for resetting the Root Ports in a platform specific way

2025-08-15 Thread Niklas Cassel
Hello Mani, Sorry for the delayed reply. I just came back from vacation. On Thu, Jul 24, 2025 at 11:00:05AM +0530, Manivannan Sadhasivam wrote: > On Fri, Jul 18, 2025 at 12:39:50PM GMT, Niklas Cassel wrote: > > On Fri, Jul 18, 2025 at 12:28:44PM +0200, Niklas Cassel wrote: > > > On Tue, Jul 15, 2

[PATCH 14/14] powerpc/perf/vpa-dtl: Add documentation for VPA dispatch trace log PMU

2025-08-15 Thread Athira Rajeev
Documentation for vpa-dtl (Virtual Processor Area - Dispatch Trace Log) PMU interface. And how it can be used to collect the distrace trace log entries in perf data, how to process/report as part of perf report/perf script. Signed-off-by: Athira Rajeev --- Documentation/arch/powerpc/index.rst

[PATCH 13/14] tools/perf: Enable perf script to present the DTL entries

2025-08-15 Thread Athira Rajeev
Enable perf script to present the DTL entries. Process the dispatch trace log details in arch_perf_sample__fprintf_synth_evt() defined in buiultin-script.c file for config value: PERF_SYNTH_POWERPC_VPA_DTL. Sample output: ./perf record -a -e sched:*,vpa_dtl/dtl_all/ -c 10 sleep 1 [

[PATCH 12/14] tools/perf: Add support for printing synth event details via default callback

2025-08-15 Thread Athira Rajeev
Introduce arch_perf_sample__fprintf_synth_evt to add support for printing arch specific synth event details. The process_event() function in "builtin-script.c" invokes perf_sample__fprintf_synth() for displaying PERF_TYPE_SYNTH type events. if (attr->type == PERF_TYPE_SYNTH && PRINT_FIELD(SYNTH

[PATCH 11/14] tools/perf: Process the DTL entries in queue and deliver samples

2025-08-15 Thread Athira Rajeev
Create samples from DTL entries for displaying in perf report and perf script. When the different PERF_RECORD_XX records are processed from perf session, powerpc_vpadtl_process_event() will be invoked. For each of the PERF_RECORD_XX record, compare the timestamp of perf record with timestamp of top

[PATCH 10/14] tools/perf: Allocate and setup aux buffer queue to help co-relate with other events across CPU's

2025-08-15 Thread Athira Rajeev
When the Dispatch Trace Log data is collected along with other events like sched tracepoint events, it needs to be correlated and present interleaved along with these events. Perf events can be collected parallely across the CPUs. Hence it needs to be ensured events/dtl entries are processed in tim

[PATCH 09/14] tools/perf: Add event name as vpa-dtl of PERF_TYPE_SYNTH type to present DTL samples

2025-08-15 Thread Athira Rajeev
Dispatch Trace Log details are captured as-is in PERF_RECORD_AUXTRACE records. To present dtl entries as samples, create an event with name as "vpa-dtl" and type PERF_TYPE_SYNTH. Add perf_synth_id, "PERF_SYNTH_POWERPC_VPA_DTL" as config value for the event. Create a sample id to be a fixed offset f

[PATCH 08/14] tools/perf: process auxtrace events and display in perf report -D

2025-08-15 Thread Athira Rajeev
Add vpa dtl pmu auxtrace process function for "perf report -D". The auxtrace event processing functions are defined in file "util/powerpc-vpadtl.c". Data structures used includes "struct powerpc_vpadtl_queue", "struct powerpc_vpadtl" to store the auxtrace buffers in queue. Different PERF_RECORD_XXX

[PATCH 07/14] tools/perf: Add basic CONFIG_AUXTRACE support for VPA pmu on powerpc

2025-08-15 Thread Athira Rajeev
The powerpc PMU collecting Dispatch Trace Log (DTL) entries makes use of AUX support in perf infrastructure. The PMU driver has the functionality to collect trace entries in the aux buffer. On the tools side, this data is made available as PERF_RECORD_AUXTRACE records. This record is generated by "

[PATCH 06/14] powerpc/perf/vpa-dtl: Handle the writing of perf record when aux wake up is needed

2025-08-15 Thread Athira Rajeev
Handle the case when the aux buffer is going to be full and data needs to be written to the data file. perf_aux_output_begin() function checks if there is enough space depending on the values of aux_wakeup and aux_watermark which is part of "struct perf_buffer". Inorder to maintain where to write t

[PATCH 05/14] powerpc/perf/vpa-dtl: Add support to capture DTL data in aux buffer

2025-08-15 Thread Athira Rajeev
vpa dtl pmu has one hrtimer added per vpa-dtl pmu thread. When the hrtimer expires, in the timer handler, code is added to save the DTL data to perf event record via vpa_dtl_capture_aux() function. The DTL (Dispatch Trace Log) contains information about dispatch/preempt, enqueue time etc. We direct

[PATCH 04/14] powerpc/perf/vpa-dtl: Add support to setup and free aux buffer for capturing DTL data

2025-08-15 Thread Athira Rajeev
vpa dtl pmu has one hrtimer added per vpa-dtl pmu thread. When the hrtimer expires, in the timer handler, code is added to save the DTL data to perf event record. DTL (Dispatch Trace Log) contains information about dispatch/preempt, enqueue time etc. We directly copy the DTL buffer data as part of

[PATCH 03/14] docs: ABI: sysfs-bus-event_source-devices-vpa-dtl: Document sysfs event format entries for vpa_dtl pmu

2025-08-15 Thread Athira Rajeev
From: Kajol Jain Details are added for the vpa_dtl pmu event and format attributes in the ABI documentation. Signed-off-by: Kajol Jain --- .../sysfs-bus-event_source-devices-vpa-dtl| 25 +++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/ABI/testing/sys

[PATCH 02/14] powerpc/vpa_dtl: Add interface to expose vpa dtl counters via perf

2025-08-15 Thread Athira Rajeev
From: Kajol Jain The pseries Shared Processor Logical Partition(SPLPAR) machines can retrieve a log of dispatch and preempt events from the hypervisor using data from Disptach Trace Log(DTL) buffer. With this information, user can retrieve when and why each dispatch & preempt has occurred. Added

[PATCH 00/14] Add interface to expose vpa dtl counters via perf

2025-08-15 Thread Athira Rajeev
The pseries Shared Processor Logical Partition(SPLPAR) machines can retrieve a log of dispatch and preempt events from the hypervisor using data from Disptach Trace Log(DTL) buffer. With this information, user can retrieve when and why each dispatch & preempt has occurred. The vpa-dtl PMU exposes t

[PATCH 01/14] powerpc/time: Expose boot_tb via accessor

2025-08-15 Thread Athira Rajeev
From: Aboorva Devarajan - Define accessor function get_boot_tb() to safely return boot_tb. - Tag boot_tb as __ro_after_init (only initialized once and never updated). - Add a debug log to output the boot timebase during initialization. Signed-off-by: Aboorva Devarajan --- arch/powerpc/include/