Re: [PATCH bpf-next 01/11] bpf: Move insn if/else into do_check_insn()

2025-03-15 Thread Luis Gerhorst
Eduard Zingerman writes: > On Thu, 2025-03-13 at 18:21 +0100, Luis Gerhorst wrote: >> +err = do_check_insn(env, insn, pop_log, &do_print_state, regs, >> state, >> +&prev_insn_idx); > > - `regs` remains declared in do_check(), while nothing prevents >

Re: [PATCH] powerpc/powermac: replace KERN_INFO calls with pr_info

2025-03-15 Thread Denis Kirjanov
On Sun, Feb 2, 2025 at 3:28 PM Denis Kirjanov wrote: > > pr_info makes code cleaner and simplifies syntax > > Signed-off-by: Denis Kirjanov > --- Hello, ping? > arch/powerpc/platforms/powermac/feature.c | 8 > arch/powerpc/platforms/powermac/low_i2c.c | 12 ++-- > arch/powerpc

[PATCH 1/6] alpha: stop using asm-generic/iomap.h

2025-03-15 Thread Arnd Bergmann
From: Arnd Bergmann Alpha has custom definitions for ioread64()/iowrite64(), which now don't exist in the lib/iomap.c variant. This is an endless source of build failures, since alpha tries to share a couple of function declarations. Change alpha to have its own prototypes that match the definit

[PATCH v7 2/7] powerpc/pseries: Define papr_indices_io_block for papr-indices ioctls

2025-03-15 Thread Haren Myneni
To issue ibm,get-indices, ibm,set-dynamic-indicator and ibm,get-dynamic-sensor-state in the user space, the RMO buffer is allocated for the work area which is restricted under system lockdown. So instead of user space execution, the kernel will provide /dev/papr-indices interface to execute these R

Re: [PATCH 00/13] arch, mm: reduce code duplication in mem_init()

2025-03-15 Thread Dave Hansen
On 3/6/25 10:51, Mike Rapoport wrote: > 53 files changed, 151 insertions(+), 618 deletions(-) > delete mode 100644 arch/x86/include/asm/numa_32.h > delete mode 100644 arch/x86/mm/highmem_32.c Holy cow, nice work. For the x86 bits: Acked-by: Dave Hansen

[PATCH 5/9] powerpc/pseries/htmdump: Add htm info support to htmdump module

2025-03-15 Thread Athira Rajeev
Support dumping system processor configuration from Hardware Trace Macro (HTM) function via debugfs interface. Under debugfs folder "/sys/kernel/debug/powerpc/htmdump", add file "htminfo”. The interface allows only read of this file which will present the content of HTM buffer from the hcall. The

[PATCH v2 4/6] powerpc: book3s: vas: use lock guard for mutex

2025-03-15 Thread Shrikanth Hegde
use lock guards for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u This shows the use of both guard and scoped_guard Signed-off-

Re: [PATCH bpf-next 01/11] bpf: Move insn if/else into do_check_insn()

2025-03-15 Thread Eduard Zingerman
On Thu, 2025-03-13 at 18:21 +0100, Luis Gerhorst wrote: > This is required to catch the errors later and fall back to a nospec if > on a speculative path. > > Move code into do_check_insn(), replace > * "continue" with "return INSN_IDX_MODIFIED" > * "goto process_bpf_exit" with "return PROCESS_BPF

Re: [PATCH] powerpc/pseries/msi: Avoid reading PCI device registers in reduced power states

2025-03-15 Thread Vaibhav Jain
Gautam Menghani writes: > When a system is being suspended to RAM, the PCI devices are also > suspended and the PPC code ends up calling pseries_msi_compose_msg() and > this triggers the BUG_ON() in __pci_read_msi_msg() because the device at > this point is in reduced power state. In reduced powe

Re: [PATCH v4 net-next 02/14] net: enetc: add command BD ring support for i.MX95 ENETC

2025-03-15 Thread Vladimir Oltean
On Fri, Mar 14, 2025 at 06:51:06AM +0200, Wei Fang wrote: > > I don't understand the need for si->ops->setup_cbdr() and > > si->ops->teardown_cbdr()? > > Doesn't every call site know which kind of SI it is dealing with, and thus > > it can > > appropriately call the direct symbol? > > - the v1 PSI

Re: [PATCH bpf-next 00/11] bpf: Mitigate Spectre v1 using barriers

2025-03-15 Thread Eduard Zingerman
On Thu, 2025-03-13 at 18:21 +0100, Luis Gerhorst wrote: > This improves the expressiveness of unprivileged BPF by inserting > speculation barriers instead of rejecting the programs. > > The approach was previously presented at LPC'24 [1] and RAID'24 [2]. > > To mitigate the Spectre v1 (PHT) vulne

Re: [PATCH v4 1/2] watchdog: Add a new flag WDIOF_STOP_MAYSLEEP

2025-03-15 Thread George Cherian
Hi Julius, >> static const struct watchdog_ops adv_ec_wdt_ops = { >> diff --git a/drivers/watchdog/arm_smc_wdt.c b/drivers/watchdog/arm_smc_wdt.c >> index 8f3d0c3a005f..794cf0086912 100644 >> --- a/drivers/watchdog/arm_smc_wdt.c >> +++ b/drivers/watchdog/arm_smc_wdt.c >> @@ -90,7 +90,8 @@ static c

Re: [PATCH v8 0/7] Add character devices for indices, platform-dump and physical-attestation RTAS

2025-03-15 Thread Sathvika Vasireddy
On 3/12/25 4:20 AM, Haren Myneni wrote: Several APIs such as rtas_get_indices(), rtas_get_dynamic_sensor(), rtas_set_dynamic_indicator(), rtas_platform_dump() and rtas_physical_attestation() provided by librtas library are implemented in user space using rtas syscall in combination with writab

[PATCH 6/6] m68k/nommu: stop using GENERIC_IOMAP

2025-03-15 Thread Arnd Bergmann
From: Arnd Bergmann There is no need to go through the GENERIC_IOMAP wrapper for PIO on nommu platforms, since these always come from PCI I/O space that is itself memory mapped. Instead, the generic ioport_map() can just return the MMIO location of the ports directly by applying the PCI_IO_PA of

Re: [Kernel 6.12.17] [PowerPC e5500] KVM HV compilation error

2025-03-15 Thread Greg KH
On Wed, Mar 05, 2025 at 06:53:19AM -0800, Sean Christopherson wrote: > On Wed, Mar 05, 2025, Greg KH wrote: > > On Wed, Mar 05, 2025 at 03:14:13PM +0100, Christian Zigotzky wrote: > > > Hi All, > > > > > > The stable long-term kernel 6.12.17 cannot compile with KVM HV support > > > for e5500 Powe

Re: [PATCH bpf-next 02/11] bpf: Return -EFAULT on misconfigurations

2025-03-15 Thread Eduard Zingerman
On Thu, 2025-03-13 at 18:21 +0100, Luis Gerhorst wrote: > Mark these cases as non-recoverable to later prevent them from being > cought when they occur during speculative path verification. > > Signed-off-by: Luis Gerhorst > Acked-by: Henriette Herzog > Cc: Maximilian Ott > Cc: Milan Stephan >

Re: [PATCH bpf-next 03/11] bpf: Return -EFAULT on internal errors

2025-03-15 Thread Eduard Zingerman
On Thu, 2025-03-13 at 18:29 +0100, Luis Gerhorst wrote: > This prevents us from trying to recover from these on speculative paths > in the future. > > Signed-off-by: Luis Gerhorst > Acked-by: Henriette Herzog > Cc: Maximilian Ott > Cc: Milan Stephan > --- Same as for previous patch. Reviewed

[PATCH v9 0/7] Add character devices for indices, platform-dump

2025-03-15 Thread Haren Myneni
Several APIs such as rtas_get_indices(), rtas_get_dynamic_sensor(), rtas_set_dynamic_indicator(), rtas_platform_dump() and rtas_physical_attestation() provided by librtas library are implemented in user space using rtas syscall in combination with writable mappings of /dev/mem. But this implementa

[PATCH v9 4/7] powerpc/pseries: Add ibm,set-dynamic-indicator RTAS call support

2025-03-15 Thread Haren Myneni
The RTAS call ibm,set-dynamic-indicator is used to set the new indicator state identified by a location code. The current implementation uses rtas_set_dynamic_indicator() API provided by librtas library which allocates RMO buffer and issue this RTAS call in the user space. But /dev/mem access by th

[PATCH 2/6] sh: remove duplicate ioread/iowrite helpers

2025-03-15 Thread Arnd Bergmann
From: Arnd Bergmann The ioread/iowrite functions on sh only do memory mapped I/O like the generic verion, and never map onto non-MMIO inb/outb variants, so they just add complexity. In particular, the use of asm-generic/iomap.h ties the declaration to the x86 implementation. Remove the custom ve

[PATCH 0/6] asm-generic: io.h cleanups

2025-03-15 Thread Arnd Bergmann
From: Arnd Bergmann After the previous round of cleanups for asm-generic/io,h on the ioread64 helpers, I had another look at the architecture specific versions, especially those that caused build failures in the past. These are some simplifications that I would like to merge at the same time, pl

[PATCH 3/6] parisc: stop using asm-generic/iomap.h

2025-03-15 Thread Arnd Bergmann
From: Arnd Bergmann parisc uses custom iomap helpers to map bus specific function calls into a linear __iomem token, but it tries to use the declarations from the x86 "generic iomap" code. Untangle the two by duplicating the required declations and dropping the #include that pulls in more stuff

[PATCH linux-next] ASoC: use sysfs_emit() instead of scnprintf().

2025-03-15 Thread xie.ludan
From: XieLudan Follow the advice in Documentation/filesystems/sysfs.rst: show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: XieLudan --- sound/soc/fsl/imx-audmux.c | 26 +++--- 1 file changed, 11 ins

[PATCH v9 3/7] powerpc/pseries: Add papr-indices char driver for ibm,get-indices

2025-03-15 Thread Haren Myneni
The RTAS call ibm,get-indices is used to obtain indices and location codes for a specified indicator or sensor token. The current implementation uses rtas_get_indices() API provided by librtas library which allocates RMO buffer and issue this RTAS call in the user space. But writable mapping /dev/m

Re: [PATCH bpf-next 00/11] bpf: Mitigate Spectre v1 using barriers

2025-03-15 Thread Luis Gerhorst
Eduard Zingerman writes: > I think it would be good to have some tests checking that nospec > instructions are inserted in expected locations. > Could you please take look at use of __xlated tag in e.g. > tools/testing/selftests/bpf/progs/verifier_sdiv.c ? That looks very promising, I will look i

Soekris crypto 1411, where to find ?

2025-03-15 Thread DiTBho Down in The Bunny hole
hi this is probably not the right place to ask, but I've been searching eBay and similar places for 2 years and haven't found one yet. I support older MIPS hardware and need to find a Soekris crypto 1411 miniPCI module or two, to add VPN acceleration. Anyone have an idea where to buy it? Soekris

[PATCH v9 1/7] powerpc/pseries: Define common functions for RTAS sequence calls

2025-03-15 Thread Haren Myneni
The RTAS call can be normal where retrieves the data form the hypervisor once or sequence based RTAS call which has to issue multiple times until the complete data is obtained. For some of these sequence RTAS calls, the OS should not interleave calls with different input until the sequence is compl

[PATCH v9 6/7] powerpc/pseries: Add papr-platform-dump character driver for dump retrieval

2025-03-15 Thread Haren Myneni
ibm,platform-dump RTAS call in combination with writable mapping /dev/mem is issued to collect platform dump from the hypervisor and may need multiple calls to get the complete dump. The current implementation uses rtas_platform_dump() API provided by librtas library to issue these RTAS calls. But

[PATCH v9 7/7] powerpc/pseries: Add a char driver for physical-attestation RTAS

2025-03-15 Thread Haren Myneni
The RTAS call ibm,physical-attestation is used to retrieve information about the trusted boot state of the firmware and hypervisor on the system, and also Trusted Platform Modules (TPM) data if the system is TCG 2.0 compliant. This RTAS interface expects the caller to define different command stru

[PATCH v9 5/7] powerpc/pseries: Add ibm,get-dynamic-sensor-state RTAS call support

2025-03-15 Thread Haren Myneni
The RTAS call ibm,get-dynamic-sensor-state is used to get the sensor state identified by the location code and the sensor token. The librtas library provides an API rtas_get_dynamic_sensor() which uses /dev/mem access for work area allocation but is restricted under system lockdown. This patch pro

[PATCH v2 06/13] nios2: move pr_debug() about memory start and end to setup_arch()

2025-03-15 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" This will help with pulling out memblock_free_all() to the generic code and reducing code duplication in arch::mem_init(). Signed-off-by: Mike Rapoport (Microsoft) --- arch/nios2/kernel/setup.c | 2 ++ arch/nios2/mm/init.c | 2 -- 2 files changed, 2 inser

[PATCH 10/13] arch, mm: set high_memory in free_area_init()

2025-03-15 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" high_memory defines upper bound on the directly mapped memory. This bound is defined by the beginning of ZONE_HIGHMEM when a system has high memory and by the end of memory otherwise. All this is known to generic memory management initialization code that can se

Re: [Kernel 6.12.17] [PowerPC e5500] KVM HV compilation error

2025-03-15 Thread Greg KH
On Wed, Mar 05, 2025 at 03:54:06PM +0100, Paolo Bonzini wrote: > On Wed, Mar 5, 2025 at 3:19 PM Greg KH wrote: > > On Wed, Mar 05, 2025 at 03:14:13PM +0100, Christian Zigotzky wrote: > > > Hi All, > > > > > > The stable long-term kernel 6.12.17 cannot compile with KVM HV support > > > for e5500 P

[PATCH] dt-bindings: powerpc: Convert fsl/pmc.txt to YAML

2025-03-15 Thread J . Neuschäfer via B4 Relay
From: "J. Neuschäfer" This patch rewrites pmc.txt into YAML format. Descriptive texts are expanded or shortened in a few places to better fit today's conventions. The list of compatible strings (and combinations of them) is based on existing device trees in arch/powerpc as well as compatible str

Re: [PATCH] dt-bindings: powerpc: Convert fsl/pmc.txt to YAML

2025-03-15 Thread Rob Herring (Arm)
ndings/powerpc/fsl/pmc.example.dtb: /example-0/sata@19000: failed to match any schema with compatible: ['fsl,mpc8377-sata', 'fsl,pq-sata'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250315-fslpmc-yaml-v1-1

[PATCH 12/13] arch, mm: introduce arch_mm_preinit

2025-03-15 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Currently, implementation of mem_init() in every architecture consists of one or more of the following: * initializations that must run before page allocator is active, for instance swiotlb_init() * a call to memblock_free_all() to release all the memory to th

RE: [PATCH v3 net-next 04/13] net: enetc: add MAC filter for i.MX95 ENETC PF

2025-03-15 Thread Wei Fang
> On 3/4/25 8:21 AM, Wei Fang wrote: > > +static void enetc_mac_list_del_matched_entries(struct enetc_pf *pf, u16 > si_bit, > > + struct enetc_mac_addr *mac, > > + int mac_cnt) > > +{ > > + struct enetc_mac_list_ent

[PATCH 5/6] mips: drop GENERIC_IOMAP wrapper

2025-03-15 Thread Arnd Bergmann
From: Arnd Bergmann All PIO on MIPS platforms is memory mapped, so there is no benefit in the lib/iomap.c wrappers that switch between inb/outb and readb/writeb style accessses. In fact, the '#define PIO_RESERVED 0' setting completely disables the GENERIC_IOMAP functionality, and the '#define PI

[PATCH 4/6] powerpc: asm/io.h: remove split ioread64/iowrite64 helpers

2025-03-15 Thread Arnd Bergmann
From: Arnd Bergmann In previous kernels, there were conflicting definitions for what ioread64_lo_hi() and similar functions were supposed to do on architectures with native 64-bit MMIO. Based on the actual usage in drivers, they are in fact expected to be a pair of 32-bit accesses on all architec

[PATCH v9 2/7] powerpc/pseries: Define papr_indices_io_block for papr-indices ioctls

2025-03-15 Thread Haren Myneni
To issue ibm,get-indices, ibm,set-dynamic-indicator and ibm,get-dynamic-sensor-state in the user space, the RMO buffer is allocated for the work area which is restricted under system lockdown. So instead of user space execution, the kernel will provide /dev/papr-indices interface to execute these R