[PATCH] cpufreq: powerpc: add missing MODULE_DESCRIPTION() macros

2024-06-14 Thread Jeff Johnson
odule_init(cbe_cpufreq_init); module_exit(cbe_cpufreq_exit); +MODULE_DESCRIPTION("cpufreq driver for Cell BE processors"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Christian Krafft "); --- base-commit: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670 change-id: 20240614-md-powerpc-drivers-cpufreq-6d345e48164e

Re: [PATCH v2 00/14] Introducing TIF_NOTIFY_IPI flag

2024-06-14 Thread Chen Yu
On 2024-06-14 at 12:48:37 +0200, Vincent Guittot wrote: > On Fri, 14 Jun 2024 at 11:28, Peter Zijlstra wrote: > > > > On Thu, Jun 13, 2024 at 06:15:59PM +, K Prateek Nayak wrote: > > > Effects of call_function_single_prep_ipi() > > > == > > > > > > To pu

Re: [PATCH v2 00/14] Introducing TIF_NOTIFY_IPI flag

2024-06-14 Thread Vincent Guittot
On Fri, 14 Jun 2024 at 11:28, Peter Zijlstra wrote: > > On Thu, Jun 13, 2024 at 06:15:59PM +, K Prateek Nayak wrote: > > Effects of call_function_single_prep_ipi() > > == > > > > To pull a TIF_POLLING thread out of idle to process an IPI, the sender > >

Re: [PATCH 00/14] replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-14 Thread Jason A. Donenfeld
On Fri, Jun 14, 2024 at 02:35:33PM +0200, Uladzislau Rezki wrote: > + /* Should a destroy process be deferred? */ > + if (s->flags & SLAB_DEFER_DESTROY) { > + list_move_tail(&s->list, &slab_caches_defer_destroy); > + schedule_delayed_work(&slab_caches_defer_destroy_w

[PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-14 Thread Anjali K
Reading the dispatch trace log from /sys/kernel/debug/powerpc/dtl/cpu-* results in a BUG() when the config CONFIG_HARDENED_USERCOPY is enabled as shown below. kernel BUG at mm/usercopy.c:102! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA p

[PATCH 2/2] tools/perf: Fix parallel-perf python script to replace new python syntax ":=" usage

2024-06-14 Thread Athira Rajeev
perf test "perf script tests" fails as below in systems with python 3.6 File "/home/athira/linux/tools/perf/tests/shell/../../scripts/python/parallel-perf.py", line 442 if line := p.stdout.readline(): ^ SyntaxError: invalid syntax --- Cleaning up ---

[PATCH 1/2] tools/perf: Fix the string match for "/tmp/perf-$PID.map" files in dso__load

2024-06-14 Thread Athira Rajeev
Perf test for perf probe of function from different CU fails as below: ./perf test -vv "test perf probe of function from different CU" 116: test perf probe of function from different CU: --- start --- test child forked, pid 2679 Failed to find symbol foo in

[V4 16/16] tools/perf: Set instruction name to be used with insn-stat when using raw instruction

2024-06-14 Thread Athira Rajeev
Since the "ins.name" is not set while using raw instruction, perf annotate with insn-stat gives wrong data: Result from "./perf annotate --data-type --insn-stat": Annotate Instruction stats total 615, ok 419 (68.1%), bad 196 (31.9%) Name : Good Bad -

[V4 15/16] tools/perf: Add support for global_die to capture name of variable in case of register defined variable

2024-06-14 Thread Athira Rajeev
In case of register defined variable (found using find_data_type_global_reg), if the type of variable happens to be base type (example, long unsigned int), perf report captures it as: 12.85% long unsigned int long unsigned int +0 (no field) The above data type is actually referring to sampl

[V4 14/16] tools/perf: Add support to find global register variables using find_data_type_global_reg

2024-06-14 Thread Athira Rajeev
There are cases where define a global register variable and associate it with a specified register. Example, in powerpc, two registers are defined to represent variable: 1. r13: represents local_paca register struct paca_struct *local_paca asm("r13"); 2. r1: represents stack_pointer register void

[V4 13/16] tools/perf: Add support to use libcapstone in powerpc

2024-06-14 Thread Athira Rajeev
Now perf uses the capstone library to disassemble the instructions in x86. capstone is used (if available) for perf annotate to speed up. Currently it only supports x86 architecture. Patch includes changes to enable this in powerpc. For now, only for data type sort keys, this method is used and onl

[V4 12/16] tools/perf: Use capstone_init and remove open_capstone_handle from disasm.c

2024-06-14 Thread Athira Rajeev
capstone_init is made availbale for all archs to use and updated to enable support for CS_ARCH_PPC as well. Patch removes open_capstone_handle and uses capstone_init in all the places. Signed-off-by: Athira Rajeev --- tools/perf/util/disasm.c | 42 +++- tools/p

[V4 11/16] tools/perf: Make capstone_init non-static so that it can be used during symbol disassemble

2024-06-14 Thread Athira Rajeev
symbol__disassemble_capstone in util/disasm.c calls function open_capstone_handle to open/init the capstone. We already have a capstone_init function in "util/print_insn.c". But capstone_init is defined as a static function in util/print_insn.c. Change this and also add the function in print_insn.h

[V4 10/16] tools/perf: Update instruction tracking for powerpc

2024-06-14 Thread Athira Rajeev
Add instruction tracking function "update_insn_state_powerpc" for powerpc. Example sequence in powerpc: ld r10,264(r3) mr r31,r3 < ld r9,312(r31) Consider ithe sample is pointing to: "ld r9,312(r31)". Here the memory reference is hit at "312(r31)" where 312 is the offset and r31 is

[V4 07/16] tools/perf: Add support to identify memory instructions of opcode 31 in powerpc

2024-06-14 Thread Athira Rajeev
There are memory instructions in powerpc with opcode as 31. Example: "ldx RT,RA,RB" , Its X form is as below: __ | 31 | RT | RA | RB | 21 |/| -- 06 111621 30 31 The opcode for "ldx" i

[V4 09/16] tools/perf: Add more instructions for instruction tracking

2024-06-14 Thread Athira Rajeev
Add few more instructions and use opcode as search key to find if it is supported by the architecture. Added ones are: addi, addic, addic., addis, subfic and mulli Signed-off-by: Athira Rajeev --- tools/perf/arch/powerpc/annotate/instructions.c | 14 ++ 1 file changed, 14 insertions(

[V4 08/16] tools/perf: Add some of the arithmetic instructions to support instruction tracking in powerpc

2024-06-14 Thread Athira Rajeev
Data type profiling has concept of instruction tracking. Example sequence in powerpc: ld r10,264(r3) mr r31,r3 < ld r9,312(r31) or differently lwz r10,264(r3) add r31, r3, RB lwz r9, 0(r31) If a sample is hit at

[V4 06/16] tools/perf: Update parameters for reg extract functions to use raw instruction on powerpc

2024-06-14 Thread Athira Rajeev
Use the raw instruction code and macros to identify memory instructions, extract register fields and also offset. The implementation addresses the D-form, X-form, DS-form instructions. Two main functions are added. New parse function "load_store__parse" as instruction ops parser for memory instruct

[V4 05/16] tools/perf: Add disasm_line__parse to parse raw instruction for powerpc

2024-06-14 Thread Athira Rajeev
Currently, the perf tool infrastructure disasm_line__parse function to parse disassembled line. Example snippet from objdump: objdump --start-address= --stop-address= -d --no-show-raw-insn -C c10224b4: lwz r10,0(r9) This line "lwz r10,0(r9)" is parsed to extract instruction

[V4 04/16] tools/perf: Use sort keys to determine whether to pick objdump to disassemble

2024-06-14 Thread Athira Rajeev
perf annotate can be done in different ways. One way is to directly use "perf annotate" command, other way to annotate specific symbol is to do "perf report" and press "a" on the sample in UI mode. The approach preferred in powerpc to parse sample for data type profiling is: - Read directly from DS

[V4 03/16] tools/perf: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility

2024-06-14 Thread Athira Rajeev
Add support to capture and parse raw instruction in powerpc. Currently, the perf tool infrastructure uses two ways to disassemble and understand the instruction. One is objdump and other option is via libcapstone. Currently, the perf tool infrastructure uses "--no-show-raw-insn" option with "objdu

[V4 02/16] tools/perf: Add "update_insn_state" callback function to handle arch specific instruction tracking

2024-06-14 Thread Athira Rajeev
Add "update_insn_state" callback to "struct arch" to handle instruction tracking. Currently updating instruction state is handled by static function "update_insn_state_x86" which is defined in "annotate-data.c". Make this as a callback for specific arch and move to archs specific file "arch/x86/ann

[V4 01/16] tools/perf: Move the data structures related to register type to header file

2024-06-14 Thread Athira Rajeev
Data type profiling uses instruction tracking by checking each instruction and updating the register type state in some data structures. This is useful to find the data type in cases when the register state gets transferred from one reg to another. Example, in x86, "mov" instruction and in powerpc,

[V4 00/16] Add data type profiling support for powerpc

2024-06-14 Thread Athira Rajeev
The patchset from Namhyung added support for data type profiling in perf tool. This enabled support to associate PMU samples to data types they refer using DWARF debug information. With the upstream perf, currently it possible to run perf report or perf annotate to view the data type information on

Re: [Patch v2 1/2] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs

2024-06-14 Thread Mark Brown
On Fri, Jun 14, 2024 at 06:46:46PM +0200, Piotr Wojtaszczyk wrote: > On Fri, Jun 14, 2024 at 6:42 PM Mark Brown wrote: > > On Fri, Jun 14, 2024 at 06:24:50PM +0200, Piotr Wojtaszczyk wrote: > > > Ok. Later I will add a sound card driver to phytec3250 board which uses > > > arch/arm/configs/lpc32x

Re: [Patch v2 1/2] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs

2024-06-14 Thread Piotr Wojtaszczyk
On Fri, Jun 14, 2024 at 6:42 PM Mark Brown wrote: > > On Fri, Jun 14, 2024 at 06:24:50PM +0200, Piotr Wojtaszczyk wrote: > > On Tue, Jun 11, 2024 at 12:36 PM Mark Brown wrote: > > > > On a quick scan I can't see any architecture dependency for build, > > > please add an || COMPILE_TEST for improv

Re: [PATCH v3 0/4] Add audio support for LPC32XX CPUs

2024-06-14 Thread Mark Brown
On Fri, Jun 14, 2024 at 06:34:48PM +0200, Piotr Wojtaszczyk wrote: > This pach set is to bring back audio to machines with a LPC32XX CPU. > The legacy LPC32XX SoC used to have audio spport in linux 2.6.27. > The support was dropped due to lack of interest from mainaeners. Please don't send new pat

Re: [Patch v2 1/2] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs

2024-06-14 Thread Mark Brown
On Fri, Jun 14, 2024 at 06:24:50PM +0200, Piotr Wojtaszczyk wrote: > On Tue, Jun 11, 2024 at 12:36 PM Mark Brown wrote: > > On a quick scan I can't see any architecture dependency for build, > > please add an || COMPILE_TEST for improved coverage. As for all the > > other things enabled in this

[PATCH v3 4/4] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs

2024-06-14 Thread Piotr Wojtaszczyk
This driver was ported from an old version in linux 2.6.27 and adjusted for the new ASoC framework and DMA API. Signed-off-by: Piotr Wojtaszczyk --- Changes for v3: - Split previous commit for separate subsystems - Add support and as a maintainer for the driver - Replaced `SND_SOC` config depend

[PATCH v3 3/4] ARM: lpc32xx: Add pl08x virtual dma channels for spi and i2s

2024-06-14 Thread Piotr Wojtaszczyk
Some of the signals are multiplexed, multiplexer configured at a signal request. Signed-off-by: Piotr Wojtaszczyk --- Changes for v3: - Split previous commit for separate subsystems - Add pl08x virtual dma channels for i2s1 - Add dma mux handling, required when requesting tx dma signal for i2s1

[PATCH v3 2/4] ARM: dts: lpc32xx: Add missing properties for the i2s interfaces

2024-06-14 Thread Piotr Wojtaszczyk
The 'dma-vc-names' correspond to virtual pl08x dma channels declared in the 'phy3250.c' platform file. Signed-off-by: Piotr Wojtaszczyk --- Changes for v3: - Split previous commit for separate subsystems - Add properties to match dt binding arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi | 8 1

[PATCH v3 1/4] ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding

2024-06-14 Thread Piotr Wojtaszczyk
Add nxp,lpc3220-i2s DT binding documentation. Signed-off-by: Piotr Wojtaszczyk --- Changes for v3: - Added '$ref: dai-common.yaml#' and '#sound-dai-cells' - Dropped all clock-names, references - Dropped status property from the example - Added interrupts property - 'make dt_binding_check' pass C

[PATCH v3 0/4] Add audio support for LPC32XX CPUs

2024-06-14 Thread Piotr Wojtaszczyk
This pach set is to bring back audio to machines with a LPC32XX CPU. The legacy LPC32XX SoC used to have audio spport in linux 2.6.27. The support was dropped due to lack of interest from mainaeners. Piotr Wojtaszczyk (4): ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding ARM: dts: lpc32x

Re: [Patch v2 1/2] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs

2024-06-14 Thread Piotr Wojtaszczyk
On Tue, Jun 11, 2024 at 12:36 PM Mark Brown wrote: > > +config SND_SOC_FSL_LPC3XXX > > + tristate "SoC Audio for NXP LPC32XX CPUs" > > + depends on ARCH_LPC32XX && SND_SOC > > On a quick scan I can't see any architecture dependency for build, > please add an || COMPILE_TEST for improved co

[PATCH 2/3] PCI: Track Flit Mode Status & print it with link status

2024-06-14 Thread Ilpo Järvinen
PCIe r6.0 added Flit mode that mainly alters HW behavior but some OS visible changes are also because of it. The OS visible changes include differences in the layout of some capabilities and interpretation of the TLP headers (in diagnostics situations). To be able to determine which mode the PCIe

[PATCH 0/3] PCI: Add support for logging Flit Mode TLPs (PCIe6)

2024-06-14 Thread Ilpo Järvinen
This series adds support for Flit Mode (PCIe6). The series is built on top of the TLP Logging refactoring series: https://lore.kernel.org/linux-pci/20240514113109.6690-1-ilpo.jarvi...@linux.intel.com/ Important note to maintainer: The series carries pcie_update_link_speed() refactoring change

[PATCH 3/3] PCI: Handle TLP Log in Flit mode

2024-06-14 Thread Ilpo Järvinen
Flit mode introduced in PCIe r6.0 alters how the TLP Header Log is presented through AER and DPC Capability registers. The TLP Prefix Log Register is not present with Flit mode and the register becomes extension for TLP Header Log (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13). Adapt pcie_read_tlp_log() an

[PATCH 1/3] PCI: Refactor pcie_update_link_speed()

2024-06-14 Thread Ilpo Järvinen
pcie_update_link_speed() is passed the Link Status register but not all callers have that value at hand nor need the value. Refactor pcie_update_link_speed() to include reading the Link Status register into pcie_update_link_speed() and create __pcie_update_link_speed() which can be used by the hot

Re: [PATCH 00/14] replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-14 Thread Uladzislau Rezki
On Fri, Jun 14, 2024 at 07:17:29AM -0700, Paul E. McKenney wrote: > On Fri, Jun 14, 2024 at 02:35:33PM +0200, Uladzislau Rezki wrote: > > On Thu, Jun 13, 2024 at 11:13:52AM -0700, Paul E. McKenney wrote: > > > On Thu, Jun 13, 2024 at 07:58:17PM +0200, Uladzislau Rezki wrote: > > > > On Thu, Jun 13,

Re: [PATCH v5 02/18] mm: Define __pte_leaf_size() to also take a PMD entry

2024-06-14 Thread Oscar Salvador
On Thu, Jun 13, 2024 at 04:43:57PM +, LEROY Christophe wrote: > I can test whatever you want on my 8xx boards. > > I have two types of board: > - One with MPC866 microcontroller and 32Mbytes memory > - One with MPC885 microcontroller and 128Mbytes memory That is great. I will code up some tes

Re: [PATCH 00/14] replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-14 Thread Paul E. McKenney
On Fri, Jun 14, 2024 at 02:35:33PM +0200, Uladzislau Rezki wrote: > On Thu, Jun 13, 2024 at 11:13:52AM -0700, Paul E. McKenney wrote: > > On Thu, Jun 13, 2024 at 07:58:17PM +0200, Uladzislau Rezki wrote: > > > On Thu, Jun 13, 2024 at 10:45:59AM -0700, Paul E. McKenney wrote: > > > > On Thu, Jun 13,

Re: [PATCH 1/3] tools/perf: Fix the nrcpus in perf bench futex to enable the run when all CPU's are not online

2024-06-14 Thread Namhyung Kim
On Fri, 07 Jun 2024 10:13:52 +0530, Athira Rajeev wrote: > Perf bench futex fails as below when attempted to run on > on a powerpc system: > > ./perf bench futex all > Running futex/hash benchmark... > Run summary [PID 626307]: 80 threads, each operating on 1024 [private] > futexes for 10 secs

Re: [PATCH v3 6/6] powerpc/iommu: Reimplement the iommu_table_group_ops for pSeries

2024-06-14 Thread kernel test robot
or pSeries config: powerpc64-randconfig-r133-20240614 (https://download.01.org/0day-ci/archive/20240614/202406142110.r97ts8xm-...@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 78ee473784e5ef6f0b19ce4cb111fb6e4d23c6b2) reproduce: (https://download.01.o

Re: [PATCH 00/14] replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-14 Thread Uladzislau Rezki
On Thu, Jun 13, 2024 at 11:13:52AM -0700, Paul E. McKenney wrote: > On Thu, Jun 13, 2024 at 07:58:17PM +0200, Uladzislau Rezki wrote: > > On Thu, Jun 13, 2024 at 10:45:59AM -0700, Paul E. McKenney wrote: > > > On Thu, Jun 13, 2024 at 07:38:59PM +0200, Uladzislau Rezki wrote: > > > > On Thu, Jun 13,

[PATCH] KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()

2024-06-14 Thread Michael Ellerman
Al reported a possible use-after-free (UAF) in kvm_spapr_tce_attach_iommu_group(). It looks up `stt` from tablefd, but then continues to use it after doing fdput() on the returned fd. After the fdput() the tablefd is free to be closed by another thread. The close calls kvm_spapr_tce_release() and

Re: Please backport 2d43cc701b96 to v6.9 and v6.6

2024-06-14 Thread Michael Ellerman
Greg KH writes: > On Fri, Jun 14, 2024 at 05:54:50PM +1000, Michael Ellerman wrote: >> Hi stable team, >> >> Can you please backport: >> 2d43cc701b96 ("powerpc/uaccess: Fix build errors seen with GCC 13/14") >> >> To v6.9 and v6.6. >> >> It was marked for backporting, but hasn't been picked u

[PATCH v6.1] powerpc/uaccess: Fix build errors seen with GCC 13/14

2024-06-14 Thread Michael Ellerman
commit 2d43cc701b96f910f50915ac4c2a0cae5deb734c upstream. Building ppc64le_defconfig with GCC 14 fails with assembler errors: CC fs/readdir.o /tmp/ccdQn0mD.s: Assembler messages: /tmp/ccdQn0mD.s:212: Error: operand out of domain (18 is not a multiple of 4) /tmp/ccdQn0mD.s:226: Erro

[PATCH v5.15] powerpc/uaccess: Fix build errors seen with GCC 13/14

2024-06-14 Thread Michael Ellerman
commit 2d43cc701b96f910f50915ac4c2a0cae5deb734c upstream. Building ppc64le_defconfig with GCC 14 fails with assembler errors: CC fs/readdir.o /tmp/ccdQn0mD.s: Assembler messages: /tmp/ccdQn0mD.s:212: Error: operand out of domain (18 is not a multiple of 4) /tmp/ccdQn0mD.s:226: Erro

[PATCH v5.10] powerpc/uaccess: Fix build errors seen with GCC 13/14

2024-06-14 Thread Michael Ellerman
commit 2d43cc701b96f910f50915ac4c2a0cae5deb734c upstream. Building ppc64le_defconfig with GCC 14 fails with assembler errors: CC fs/readdir.o /tmp/ccdQn0mD.s: Assembler messages: /tmp/ccdQn0mD.s:212: Error: operand out of domain (18 is not a multiple of 4) /tmp/ccdQn0mD.s:226: Erro

Re: [PATCH v2 00/14] Introducing TIF_NOTIFY_IPI flag

2024-06-14 Thread Peter Zijlstra
On Thu, Jun 13, 2024 at 06:15:59PM +, K Prateek Nayak wrote: > Effects of call_function_single_prep_ipi() > == > > To pull a TIF_POLLING thread out of idle to process an IPI, the sender > sets the TIF_NEED_RESCHED bit in the idle task's thread info in >

Re: Please backport 2d43cc701b96 to v6.9 and v6.6

2024-06-14 Thread Greg KH
On Fri, Jun 14, 2024 at 05:54:50PM +1000, Michael Ellerman wrote: > Hi stable team, > > Can you please backport: > 2d43cc701b96 ("powerpc/uaccess: Fix build errors seen with GCC 13/14") > > To v6.9 and v6.6. > > It was marked for backporting, but hasn't been picked up AFAICS. I'm not > sure if

Re: [kvm-unit-tests PATCH] build: retain intermediate .aux.o targets

2024-06-14 Thread Nicholas Piggin
On Fri Jun 14, 2024 at 11:08 AM AEST, Segher Boessenkool wrote: > On Fri, Jun 14, 2024 at 10:43:39AM +1000, Nicholas Piggin wrote: > > On Wed Jun 12, 2024 at 6:28 PM AEST, Segher Boessenkool wrote: > > > On Wed, Jun 12, 2024 at 02:42:32PM +1000, Nicholas Piggin wrote: > > > > arm, powerpc, riscv, b

Re: [PATCH 10/26] xen-blkfront: don't disable cache flushes when they fail

2024-06-14 Thread Roger Pau Monné
On Thu, Jun 13, 2024 at 04:05:08PM +0200, Christoph Hellwig wrote: > On Wed, Jun 12, 2024 at 05:56:15PM +0200, Roger Pau Monné wrote: > > Right. AFAICT advertising "feature-barrier" and/or > > "feature-flush-cache" could be done based on whether blkback > > understand those commands, not on whethe

Please backport 2d43cc701b96 to v6.9 and v6.6

2024-06-14 Thread Michael Ellerman
Hi stable team, Can you please backport: 2d43cc701b96 ("powerpc/uaccess: Fix build errors seen with GCC 13/14") To v6.9 and v6.6. It was marked for backporting, but hasn't been picked up AFAICS. I'm not sure if it clashed with the asm_goto_output changes or something. But it backports cleanly