[PATCH] soc: fsl: Add missing of_node_put() after using device_node

2024-11-05 Thread Zhang Zekun
of_find_compatible_node() will increase the refcount of the device_node. Decrease the refcount once finish using it. Fixes: e95f287deed2 ("soc: fsl: handle RCPM errata A-008646 on SoC LS1021A") Signed-off-by: Zhang Zekun --- drivers/soc/fsl/rcpm.c | 1 + 1 file changed, 1 insertion(+) diff --gi

Re: [PATCH 00/28] vdso: Preparations for generic data storage

2024-11-05 Thread Michael Ellerman
Christophe Leroy writes: > Le 30/10/2024 à 12:39, Thomas Gleixner a écrit : >> Folks! >> >> On Thu, Oct 10 2024 at 09:01, Thomas Weißschuh wrote: >>> Historically each architecture defined their own datapage to store the >>> VDSO data. This stands in contrast to the generic nature of the VDSO >>>

Re: [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le

2024-11-05 Thread Hari Bathini
On 06/11/24 1:22 am, Segher Boessenkool wrote: Hi! On Tue, Nov 05, 2024 at 06:17:51PM +0900, Masami Hiramatsu wrote: On Tue, 5 Nov 2024 02:20:18 -0600 Segher Boessenkool wrote: On Mon, Nov 04, 2024 at 11:06:23PM +0530, Hari Bathini wrote: Seems like a bit of misunderstanding there. Functi

linux-next: build failure after merge of the ftrace tree

2024-11-05 Thread Stephen Rothwell
Hi all, After merging the ftrace tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: In file included from include/linux/ftrace.h:23, from include/linux/kvm_host.h:32, from arch/powerpc/include/asm/kvm_ppc.h:19, from arch/p

Re: [PATCH v8 2/3] modpost: Produce extended MODVERSIONS information

2024-11-05 Thread Luis Chamberlain
On Tue, Nov 05, 2024 at 04:26:51PM -0800, Matthew Maurer wrote: > On Fri, Nov 1, 2024 at 2:10 PM Luis Chamberlain wrote: > > > > On Thu, Oct 31, 2024 at 01:00:28PM -0700, Matthew Maurer wrote: > > > > The question is, if only extended moversions are used, what new tooling > > > > requirements are

Re: [PATCH v3 1/3] mm/pkey: Add PKEY_UNRESTRICTED macro

2024-11-05 Thread Michael Ellerman
Yury Khrustalev writes: > Memory protection keys (pkeys) uapi has two macros for pkeys restrictions: > > - PKEY_DISABLE_ACCESS 0x1 > - PKEY_DISABLE_WRITE 0x2 > > with implicit literal value of 0x0 that means "unrestricted". Code that > works with pkeys has to use this literal value when implyin

Re: [PATCH v8 2/3] modpost: Produce extended MODVERSIONS information

2024-11-05 Thread Matthew Maurer
On Fri, Nov 1, 2024 at 2:10 PM Luis Chamberlain wrote: > > On Thu, Oct 31, 2024 at 01:00:28PM -0700, Matthew Maurer wrote: > > > The question is, if only extended moversions are used, what new tooling > > > requirements are there? Can you test using only extended modversions? > > > > > > Luis >

[powerpc:next-test] BUILD SUCCESS 19e0a70e6c3c1bf800b8ce9eb45864aa9e1e2781

2024-11-05 Thread kernel test robot
allmodconfigclang-20 arc allnoconfiggcc-14.1.0 arc allyesconfigclang-20 arc defconfiggcc-14.1.0 arcnsim_700_defconfiggcc-14.1.0 arc randconfig-001-20241105

[powerpc:next] BUILD SUCCESS d677ce521334d8f1f327cafc8b1b7854b0833158

2024-11-05 Thread kernel test robot
randconfig-001-20241105gcc-14.1.0 arc randconfig-001-20241106gcc-14.1.0 arc randconfig-002-20241105gcc-14.1.0 arc randconfig-002-20241106gcc-14.1.0 arcvdk_hs38_smp_defconfiggcc-14.1.0 arm

[powerpc:merge] BUILD SUCCESS ad0be02f7009e3388de94b35d56336de22d79afc

2024-11-05 Thread kernel test robot
14.1.0 arc allmodconfigclang-20 arc allnoconfiggcc-14.1.0 arc allyesconfigclang-20 arc defconfiggcc-14.1.0 arcnsim_700_defconfiggcc-14.1.0 arc randconfig-00

[powerpc:fixes-test] BUILD SUCCESS 74f02dbcaa622a8fa4171dcc6e12f86d2cb007d0

2024-11-05 Thread kernel test robot
arc randconfig-001-20241105gcc-14.1.0 arc randconfig-001-20241106gcc-14.1.0 arc randconfig-002-20241105gcc-14.1.0 arc randconfig-002-20241106gcc-14.1.0 arcvdk_hs38_smp_defconfiggcc-14.1.0

[PATCH v6 2/5] perf: Hoist perf_instruction_pointer() and perf_misc_flags()

2024-11-05 Thread Colton Lewis
For clarity, rename the arch-specific definitions of these functions to perf_arch_* to denote they are arch-specifc. Define the generic-named functions in one place where they can call the arch-specific ones as needed. Signed-off-by: Colton Lewis Acked-by: Thomas Richter Acked-by: Mark Rutland

[PATCH v6 5/5] perf: Correct perf sampling with guest VMs

2024-11-05 Thread Colton Lewis
Previously any PMU overflow interrupt that fired while a VCPU was loaded was recorded as a guest event whether it truly was or not. This resulted in nonsense perf recordings that did not honor perf_event_attr.exclude_guest and recorded guest IPs where it should have recorded host IPs. Rework the s

[PATCH v6 3/5] powerpc: perf: Use perf_arch_instruction_pointer()

2024-11-05 Thread Colton Lewis
Make sure powerpc uses the arch-specific function now that those have been reorganized. Signed-off-by: Colton Lewis Acked-by: Madhavan Srinivasan Reviewed-by: Oliver Upton --- arch/powerpc/perf/callchain.c| 2 +- arch/powerpc/perf/callchain_32.c | 2 +- arch/powerpc/perf/callchain_64.c | 2

[PATCH v6 1/5] arm: perf: Drop unused functions

2024-11-05 Thread Colton Lewis
For arm's implementation, perf_instruction_pointer() and perf_misc_flags() are equivalent to the generic versions in include/linux/perf_event.h so arch/arm doesn't need to provide its own versions. Drop them here. Signed-off-by: Colton Lewis Reviewed-by: Oliver Upton --- arch/arm/include/asm/pe

[PATCH v6 4/5] x86: perf: Refactor misc flag assignments

2024-11-05 Thread Colton Lewis
Break the assignment logic for misc flags into their own respective functions to reduce the complexity of the nested logic. Signed-off-by: Colton Lewis Reviewed-by: Oliver Upton --- arch/x86/events/core.c| 31 +++ arch/x86/include/asm/perf_event.h | 2 ++

[PATCH v6 0/5] Correct perf sampling with Guest VMs

2024-11-05 Thread Colton Lewis
v6: * Apply all Reviewed-by and Acked-by trailers from previous versions * Rebase to v6.12-rc6 v5: https://lore.kernel.org/all/20240920174740.781614-1-coltonle...@google.com/ v4: https://lore.kernel.org/kvm/20240919190750.4163977-1-coltonle...@google.com/ v3: https://lore.kernel.org/kvm/20240912

Re: [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le

2024-11-05 Thread Segher Boessenkool
Hi! On Tue, Nov 05, 2024 at 06:17:51PM +0900, Masami Hiramatsu wrote: > On Tue, 5 Nov 2024 02:20:18 -0600 > Segher Boessenkool wrote: > > On Mon, Nov 04, 2024 at 11:06:23PM +0530, Hari Bathini wrote: > > > Seems like a bit of misunderstanding there. Function entry here intends > > > to mean the a

Re: [PATCH v7 6/8] x86/module: prepare module loading for ROX allocations of text

2024-11-05 Thread Nathan Chancellor
On Tue, Nov 05, 2024 at 09:02:26AM +0200, Mike Rapoport wrote: > There's a silly mistake in cfi_rewrite_endbr() in that commit, the patch > below should fix it. Can you please test? Yup, that was it! All my machines boot with this diff applied on top of next-20241105, so with that fix

Re: [PATCH v2] ASoC: fsl_mqs: Support accessing registers by scmi interface

2024-11-05 Thread Mark Brown
On Fri, 25 Oct 2024 14:29:35 +0800, Shengjiu Wang wrote: > On i.MX95, the MQS module in Always-on (AON) domain only can > be accessed by System Controller Management Interface (SCMI) > MISC Protocol. So define a specific regmap_config for the case. > > Applied to https://git.kernel.org/pub/s

Re: [PATCH v2 00/10] sysfs: constify struct bin_attribute (Part 1)

2024-11-05 Thread Bjorn Helgaas
On Sun, Nov 03, 2024 at 05:03:29PM +, Thomas Weißschuh wrote: > struct bin_attribute contains a bunch of pointer members, which when > overwritten by accident or malice can lead to system instability and > security problems. > Moving the definitions of struct bin_attribute to read-only memory >

Re: [PATCH v2 02/10] sysfs: introduce callback attribute_group::bin_size

2024-11-05 Thread Bjorn Helgaas
On Sun, Nov 03, 2024 at 05:03:31PM +, Thomas Weißschuh wrote: > Several drivers need to dynamically calculate the size of an binary > attribute. Currently this is done by assigning attr->size from the > is_bin_visible() callback. s/an binary/a binary/ > This has drawbacks: > * It is not docum

Re: [PATCH v2 05/10] sysfs: treewide: constify attribute callback of bin_is_visible()

2024-11-05 Thread Bjorn Helgaas
On Sun, Nov 03, 2024 at 05:03:34PM +, Thomas Weißschuh wrote: > The is_bin_visible() callbacks should not modify the struct > bin_attribute passed as argument. > Enforce this by marking the argument as const. > > As there are not many callback implementers perform this change > throughout the

[PATCH] soc: fsl: cpm1: qmc: Set the ret error code on platform_get_irq() failure

2024-11-05 Thread Herve Codina
A kernel test robot detected a missing error code: qmc.c:1942 qmc_probe() warn: missing error code 'ret' Indeed, the error returned by platform_get_irq() is checked and the operation is aborted in case of failure but the ret error code is not set in that case. Set the ret error code. Reported

Re: [PATCH 00/28] vdso: Preparations for generic data storage

2024-11-05 Thread Christophe Leroy
Le 30/10/2024 à 12:39, Thomas Gleixner a écrit : Folks! On Thu, Oct 10 2024 at 09:01, Thomas Weißschuh wrote: Historically each architecture defined their own datapage to store the VDSO data. This stands in contrast to the generic nature of the VDSO code itself. We plan to introduce a generi

Re: [PATCH v2 15/18] ext4: switch to using the crc32c library

2024-11-05 Thread Theodore Ts'o
On Fri, Oct 25, 2024 at 12:14:51PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Now that the crc32c() library function directly takes advantage of > architecture-specific optimizations, it is unnecessary to go through the > crypto API. Just use crc32c(). This is much simpler, and it impr

[PATCH] arch/powerpc/pseries: Fix KVM guest detection for disabling hardlockup detector

2024-11-05 Thread Gautam Menghani
As per the kernel documentation[1], hardlockup detector should be disabled in KVM guests as it may give false positives. On PPC, hardlockup detector is broken inside KVM guests because disable_hardlockup_detector() is marked as early_initcall and it uses is_kvm_guest(), which is initialized by chec

Re: [PATCH 2/2] asm-generic: add an optional pfn_valid check to page_to_phys

2024-11-05 Thread Christophe Leroy
Le 23/10/2024 à 07:36, Christoph Hellwig a écrit : page_to_pfn is usually implemented by pointer arithmetics on the memory map, which means that bogus input can lead to even more bogus output. Powerpc had a pfn_valid check on the intermediate pfn in the page_to_phys implementation when CONFIG

[PATCH v8 4/4] arm64: Kconfig: Enable HOTPLUG_SMT

2024-11-05 Thread Yicong Yang
From: Yicong Yang Enable HOTPLUG_SMT for SMT control. Signed-off-by: Yicong Yang --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index fd9df6dcc593..cccd0a07c050 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -243,

[PATCH v8 2/4] arch_topology: Support SMT control for OF based system

2024-11-05 Thread Yicong Yang
From: Yicong Yang On building the topology from the devicetree, we've already gotten the SMT thread number of each core. Update the largest SMT thread number and enable the SMT control by the end of topology parsing. The core's SMT control provides two interface to the users [1]: 1) enable/disab

[PATCH v8 3/4] arm64: topology: Support SMT control on ACPI based system

2024-11-05 Thread Yicong Yang
From: Yicong Yang For ACPI we'll build the topology from PPTT and we cannot directly get the SMT number of each core. Instead using a temporary xarray to record the heterogeneous information (from ACPI_PPTT_ACPI_IDENTICAL) and SMT information of the first core in its heterogeneous CPU cluster whe

[PATCH v8 0/4] Support SMT control on arm64

2024-11-05 Thread Yicong Yang
From: Yicong Yang The core CPU control framework supports runtime SMT control which is not yet supported on arm64. Besides the general vulnerabilities concerns we want this runtime control on our arm64 server for: - better single CPU performance in some cases - saving overall power consumption

[PATCH v8 1/4] cpu/SMT: Provide a default topology_is_primary_thread()

2024-11-05 Thread Yicong Yang
From: Yicong Yang Currently if architectures want to support HOTPLUG_SMT they need to provide a topology_is_primary_thread() telling the framework which thread in the SMT cannot offline. However arm64 doesn't have a restriction on which thread in the SMT cannot offline, a simplest choice is that

Re: [PATCH v3 08/18] powerpc/crc32: expose CRC32 functions through lib

2024-11-05 Thread Michael Ellerman
Eric Biggers writes: > From: Eric Biggers > > Move the powerpc CRC32C assembly code into the lib directory and wire it > up to the library interface. This allows it to be used without going > through the crypto API. It remains usable via the crypto API too via > the shash algorithms that use th

Re: [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le

2024-11-05 Thread Google
Hi, On Tue, 5 Nov 2024 02:20:18 -0600 Segher Boessenkool wrote: > Hi! > > On Mon, Nov 04, 2024 at 11:06:23PM +0530, Hari Bathini wrote: > > Seems like a bit of misunderstanding there. Function entry here intends > > to mean the actual start of function code (function prologue) - after > > GEP a

Re: [PATCH 1/2] powerpc/fadump: allocate memory for additional parameters early

2024-11-05 Thread Michael Ellerman
Hi Sourabh, Sourabh Jain writes: > From: Hari Bathini > > Memory for passing additional parameters to fadump capture kernel > is allocated during subsys_initcall level, using memblock. But > as slab is already available by this time, allocation happens via > the buddy allocator. This may work fo

Re: [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le

2024-11-05 Thread Google
On Mon, 4 Nov 2024 15:02:12 +0530 Hari Bathini wrote: > > > On 03/11/24 10:27 am, Masami Hiramatsu (Google) wrote: > > On Sat, 2 Nov 2024 00:49:25 +0530 > > Hari Bathini wrote: > > > >> For ppc64le, depending on the kernel configuration used, offset 16 > >> from function start address can al

Re: [PATCH 1/2] powerpc/fadump: allocate memory for additional parameters early

2024-11-05 Thread Hari Bathini
On 05/11/24 1:46 pm, Michael Ellerman wrote: Hi Sourabh, Sourabh Jain writes: From: Hari Bathini Memory for passing additional parameters to fadump capture kernel is allocated during subsys_initcall level, using memblock. But as slab is already available by this time, allocation happens v

Re: [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le

2024-11-05 Thread Segher Boessenkool
Hi! On Mon, Nov 04, 2024 at 11:06:23PM +0530, Hari Bathini wrote: > Seems like a bit of misunderstanding there. Function entry here intends > to mean the actual start of function code (function prologue) - after > GEP and function profiling sequence (mflr r0; bl mcount). What you call "function e