[powerpc:next] BUILD SUCCESS 90bae4d99beb1f31d8bde7c438a36e8875ae6090

2023-08-30 Thread kernel test robot
gcc i386 allyesconfig gcc i386 buildonly-randconfig-001-20230829 clang i386 buildonly-randconfig-001-20230830 clang i386 buildonly-randconfig-002-20230829 clang i386 buildonly-randconfig-002-20230830 clang i386 buildonly-randconfig-003-202308

[powerpc:merge] BUILD SUCCESS 54ab446adbe66e7b3bf489afbba93ce402d67884

2023-08-30 Thread kernel test robot
-randconfig-001-20230830 clang i386 buildonly-randconfig-002-20230830 clang i386 buildonly-randconfig-003-20230830 clang i386 buildonly-randconfig-004-20230830 clang i386 buildonly-randconfig-005-20230830 clang i386 buildonly-randconfig-006-20230830 clang

Re: [PATCH v2 1/2] maple_tree: Disable mas_wr_append() when other readers are possible

2023-08-30 Thread Michael Ellerman
Andreas Schwab writes: > This breaks booting on ppc32: Does enabling CONFIG_DEBUG_ATOMIC_SLEEP fix the crash? It did for me on qemu. cheers > Kernel attemptd to writ user page (1ff0) - exploit attempt? (uid: 0) > BUG: Unable to handle kernel data access on write at 0x1ff0 > Faulting

Re: [PATCH RFC 1/2] powerpc/pseries: papr-vpd char driver for VPD retrieval

2023-08-30 Thread Michael Ellerman
Michal Suchánek writes: > Hello, > > thanks for working on this. > > On Tue, Aug 22, 2023 at 04:33:39PM -0500, Nathan Lynch via B4 Relay wrote: >> From: Nathan Lynch >> >> PowerVM LPARs may retrieve Vital Product Data (VPD) for system >> components using the ibm,get-vpd RTAS function. >> >> We

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-30 Thread Christophe Leroy
Le 28/08/2023 à 01:17, Erhard Furtner a écrit : > On Thu, 24 Aug 2023 21:36:26 +1000 > Michael Ellerman wrote: > >>> printk: bootconsole [udbg0] enabled >>> Total memory = 2048MB; using 4096kB for hash table >>> mapin_ram:125 >>> mmu_mapin_ram:169 0 3000 140 200 >>>

Re: (subset) [PATCH v2 4/4] powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT

2023-08-30 Thread Michael Ellerman
On Wed, 23 Aug 2023 15:53:17 +1000, Michael Ellerman wrote: > lppaca_shared_proc() takes a pointer to the lppaca which is typically > accessed through get_lppaca(). With DEBUG_PREEMPT enabled, this leads > to checking if preemption is enabled, for example: > > BUG: using smp_processor_id() in

Re: [PATCH] powerpc/powermac: Fix unused function warning

2023-08-30 Thread Michael Ellerman
On Tue, 22 Aug 2023 00:09:49 +1000, Michael Ellerman wrote: > Clang reports: > arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function > 'simple_feature_tweak' > > It's only used inside the #ifndef CONFIG_PPC64 block, so move it in > there to fix the warning. While at it drop

Re: [PATCH] powerpc/eeh: Use pci_dev_id() to simplify the code

2023-08-30 Thread Michael Ellerman
On Tue, 15 Aug 2023 10:33:03 +0800, Jialin Zhang wrote: > PCI core API pci_dev_id() can be used to get the BDF number for a pci > device. We don't need to compose it mannually. Use pci_dev_id() to > simplify the code a little bit. > > Applied to powerpc/next. [1/1] powerpc/eeh: Use

Re: [PATCH] powerpc/mpc5xxx: Add missing fwnode_handle_put()

2023-08-30 Thread Michael Ellerman
On Wed, 22 Mar 2023 11:04:23 +0800, Liang He wrote: > In mpc5xxx_fwnode_get_bus_frequency(), we should add > fwnode_handle_put() when break out of the iteration > fwnode_for_each_parent_node() as it will automatically > increase and decrease the refcounter. > > Applied to powerpc/next. [1/1]

Re: [PATCH] powerpc/64s: Move CPU -mtune options into Kconfig

2023-08-30 Thread Michael Ellerman
On Thu, 30 Mar 2023 10:43:08 +1100, Michael Ellerman wrote: > Currently the -mtune options are set in the Makefile, depending on what > the compiler supports. > > One downside of doing it that way is that the chosen -mtune option is > not recorded in the .config. > > Another downside is that if

Re: [PATCH] powerpc/iommu: Fix notifiers being shared by PCI and VIO buses

2023-08-30 Thread Michael Ellerman
On Wed, 22 Mar 2023 14:53:22 +1100, Russell Currey wrote: > fail_iommu_setup() registers the fail_iommu_bus_notifier struct to both > PCI and VIO buses. struct notifier_block is a linked list node, so this > causes any notifiers later registered to either bus type to also be > registered to the

Re: [PATCH 1/2] powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n

2023-08-30 Thread Michael Ellerman
On Tue, 09 May 2023 19:15:59 +1000, Nicholas Piggin wrote: > With JUMP_LABEL=n, hcall_tracepoint_refcount's address is being tested > instead of its value. This results in the tracing slowpath always being > taken unnecessarily. > > Applied to powerpc/next. [1/2] powerpc/pseries: Fix hcall

Re: [PATCH v2] reapply: powerpc/xmon: Relax frame size for clang

2023-08-30 Thread Michael Ellerman
On Mon, 28 Aug 2023 13:39:06 -0700, Nick Desaulniers wrote: > This is a manual revert of commit > 7f3c5d099b6f8452dc4dcfe4179ea48e6a13d0eb, but using > ccflags-$(CONFIG_CC_IS_CLANG) which is shorter. > > Turns out that this is reproducible still under specific compiler > versions (mea culpa: I

Re: [PATCH] powerpc: Drop zalloc_maybe_bootmem()

2023-08-30 Thread Michael Ellerman
On Wed, 23 Aug 2023 15:54:30 +1000, Michael Ellerman wrote: > The only callers of zalloc_maybe_bootmem() are PCI setup routines. These > used to be called early during boot before slab setup, and also during > runtime due to hotplug. > > But commit 5537fcb319d0 ("powerpc/pci: Add

Re: [PATCH] cxl: Drop unused detach_spa()

2023-08-30 Thread Michael Ellerman
On Wed, 23 Aug 2023 14:48:03 +1000, Michael Ellerman wrote: > Clang warns: > drivers/misc/cxl/native.c:272:20: error: unused function 'detach_spa' > [-Werror,-Wunused-function] > > It was created as part of some refactoring in commit 05155772f642 ("cxl: > Allocate and release the SPA with the

Re: [PATCH 1/4] powerpc/pseries: Move VPHN constants into vphn.h

2023-08-30 Thread Michael Ellerman
On Wed, 23 Aug 2023 15:53:14 +1000, Michael Ellerman wrote: > These don't have any particularly good reason to belong in lppaca.h, > move them into their own header. > > Applied to powerpc/next. [1/4] powerpc/pseries: Move VPHN constants into vphn.h

Re: [PATCH 1/2] powerpc/powernv: Fix fortify source warnings in opal-prd.c

2023-08-30 Thread Michael Ellerman
On Tue, 22 Aug 2023 00:28:19 +1000, Michael Ellerman wrote: > As reported by Mahesh & Aneesh, opal_prd_msg_notifier() triggers a > FORTIFY_SOURCE warning: > > memcpy: detected field-spanning write (size 32) of single field > ">msg" at arch/powerpc/platforms/powernv/opal-prd.c:355 (size 4) >

Re: [PATCH] powerpc: fix debugfs_create_dir error checking

2023-08-30 Thread Michael Ellerman
On Sun, 28 May 2023 13:16:44 +0530, mirim...@outlook.com wrote: > The debugfs_create_dir returns ERR_PTR incase of an error and the > correct way of checking it by using the IS_ERR inline function, and > not the simple null comparision. This patch fixes this. > > Applied to powerpc/next. [1/1]

Re: [PATCH] powerpc: dts: add missing space before {

2023-08-30 Thread Michael Ellerman
On Wed, 05 Jul 2023 16:57:43 +0200, Krzysztof Kozlowski wrote: > Add missing whitespace between node name/label and opening {. > > Applied to powerpc/next. [1/1] powerpc: dts: add missing space before { https://git.kernel.org/powerpc/c/11073886cc4a2746845e8d113cadec2578c85033 cheers

Re: [PATCH] powerpc/config: Disable SLAB_DEBUG_ON in skiroot

2023-08-30 Thread Michael Ellerman
On Wed, 05 Jul 2023 12:00:56 +0930, Joel Stanley wrote: > In 5.10 commit 5e84dd547bce ("powerpc/configs/skiroot: Enable some more > hardening options") set SLUB_DEUBG_ON. > > When 5.14 came around, commit 792702911f58 ("slub: force on > no_hash_pointers when slub_debug is enabled") print all the

Re: [PATCH] powerpc/85xx: Mark some functions static and add missing includes to fix no previous prototype error

2023-08-30 Thread Michael Ellerman
On Tue, 22 Aug 2023 08:13:13 +0200, Christophe Leroy wrote: > corenet{32/64}_smp_defconfig leads to: > > CC arch/powerpc/sysdev/ehv_pic.o > arch/powerpc/sysdev/ehv_pic.c:45:6: error: no previous prototype for > 'ehv_pic_unmask_irq' [-Werror=missing-prototypes] >45 | void

Re: [PATCH] powerpc/64e: Fix circular dependency with CONFIG_SMP disabled

2023-08-30 Thread Michael Ellerman
On Tue, 22 Aug 2023 08:07:50 +0200, Christophe Leroy wrote: > asm/percpu.h includes asm/paca.h which needs struct tlb_core_data > which is defined in mmu-e500.h > > asm/percpu.h is included from asm/mmu.h in a #ifdef CONFIG_E500 > before the inclusion of mmu-e500.h > > To fix that, move the

Re: [PATCH 1/2] powerpc/mm/book3s64: Fix build error with SPARSEMEM disabled

2023-08-30 Thread Michael Ellerman
On Mon, 28 Aug 2023 13:16:57 +0530, Aneesh Kumar K.V wrote: > With CONFIG_SPARSEMEM disabled the below kernel build error is observed. > > arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier > 'SECTION_SIZE_BITS' > > CONFIG_MEMORY_HOTPLUG depends on CONFIG_SPARSEMEM and it is

Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"

2023-08-30 Thread Kees Cook
On Tue, Aug 29, 2023 at 11:57:19PM +0900, Masahiro Yamada wrote: > The attached patch will work too. > > I dropped the "in the first line" restriction > because SPDX might be placed in the first line > of config fragments. Good call. Yes, this looks excellent; thank you! Do you want to send a

Re: Recent Power changes and stack_trace_save_tsk_reliable?

2023-08-30 Thread Joe Lawrence
On 8/30/23 02:37, Michael Ellerman wrote: > Michael Ellerman writes: >> Joe Lawrence writes: >>> Hi ppc-dev list, >>> >>> We noticed that our kpatch integration tests started failing on ppc64le >>> when targeting the upstream v6.4 kernel, and then confirmed that the >>> in-tree livepatching

Re: [PATCH 1/9] ARM: Remove

2023-08-30 Thread Arnd Bergmann
On Thu, Aug 17, 2023, at 12:07, Geert Uytterhoeven wrote: > As of commit b7fb14d3ac63117e ("ide: remove the legacy ide driver") in > v5.14, there are no more generic users of . > > Signed-off-by: Geert Uytterhoeven > --- Acked-by: Arnd Bergmann

Re: [PATCH v2 1/2] maple_tree: Disable mas_wr_append() when other readers are possible

2023-08-30 Thread Andreas Schwab
This breaks booting on ppc32: Kernel attemptd to writ user page (1ff0) - exploit attempt? (uid: 0) BUG: Unable to handle kernel data access on write at 0x1ff0 Faulting instruction address: 0xc0009554 Vector: 300 (Data Access) at [c0b09d10] pc: c0009554: do_softirq_own_stack+0x18/0x30

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-08-30 Thread Ackerley Tng
Binbin Wu writes: >> >> >> +static long kvm_gmem_allocate(struct inode *inode, loff_t offset, loff_t >> len) >> +{ >> +struct address_space *mapping = inode->i_mapping; >> +pgoff_t start, index, end; >> +int r; >> + >> +/* Dedicated guest is immutable by default. */ >> +if

Re: [PATCH] macintosh/ams: linux/platform_device.h is needed

2023-08-30 Thread Randy Dunlap
Hi, On 8/29/23 22:46, Christophe Leroy wrote: > > > Le 30/08/2023 à 00:58, Randy Dunlap a écrit : >> ams.h uses struct platform_device, so the header should be used >> to prevent build errors: >> >> drivers/macintosh/ams/ams-input.c: In function 'ams_input_enable': >>

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-08-30 Thread Binbin Wu
On 7/19/2023 7:44 AM, Sean Christopherson wrote: [...] + +static struct folio *kvm_gmem_get_folio(struct file *file, pgoff_t index) +{ + struct folio *folio; + + /* TODO: Support huge pages. */ + folio = filemap_grab_folio(file->f_mapping, index); + if (!folio)

Re: [PATCH] crypto: vmx: Improved AES/XTS performance of 6-way unrolling for ppc.

2023-08-30 Thread Danny Tsen
Hi Michael, I just submitted the v2 patch. Thanks. -Danny On 8/29/23 11:37 PM, Michael Ellerman wrote: Danny Tsen writes: Improve AES/XTS performance of 6-way unrolling for PowerPC up to 17% with tcrypt. This is done by using one instruction, vpermxor, to replace xor and vsldoi. This

[PATCH v2] crypto: vmx: Improved AES/XTS performance of 6-way unrolling for ppc.

2023-08-30 Thread Danny Tsen
Improve AES/XTS performance of 6-way unrolling for PowerPC up to 17% with tcrypt. This is done by using one instruction, vpermxor, to replace xor and vsldoi. The same changes were applied to OpenSSL code and a pull request was submitted. This patch has been tested with the kernel crypto module

RE: [PATCH] kbuild: single-quote the format string of printf

2023-08-30 Thread David Laight
... > All of "\\n", "\n", '\n' are the same. and \\n (without any quote characters at all). Personally I'd use 'format' for printf. To make it obvious that nothing is to be expanded. But it isn't really worth changing existing 'stuff'. David - Registered Address Lakeside, Bramley Road,

[PATCH] powerpc/smp: Dynamically build powerpc topology

2023-08-30 Thread Srikar Dronamraju
Currently there are four powerpc specific sched topologies. These are all statically defined. However not all these topologies are used by all powerpc systems. To avoid unnecessary degenerations by the scheduler , masks and flags are compared. However if the sched topologies are build

Re: [PATCH] kbuild: single-quote the format string of printf

2023-08-30 Thread Masahiro Yamada
On Wed, Aug 30, 2023 at 10:00 AM Nicolas Schier wrote: > > On Tue 29 Aug 2023 20:35:31 GMT, Masahiro Yamada wrote: > > Use single-quotes to avoid escape sequences (\\n). > > > > Signed-off-by: Masahiro Yamada > > --- > > Is this really necessary? Testing w/ GNU Make 4.3, bash 5.2.15 or > dash

[PATCH 4/4] powerpc/smp: Disable MC domain for shared processor

2023-08-30 Thread Srikar Dronamraju
Like L2-cache info, coregroup information which is used to determine MC sched domains is only present on dedicated LPARs. i.e PowerVM doesn't export coregroup information for shared processor LPARs. Hence disable creating MC domains on shared LPAR Systems. Signed-off-by: Srikar Dronamraju ---

[PATCH 2/4] powerpc/smp: Move shared_processor static key to smp.h

2023-08-30 Thread Srikar Dronamraju
The ability to detect if the system is running in a shared processor mode is helpful in few more generic cases not just in paravirtualization. For example: At boot time, different scheduler/ topology flags may be set based on the processor mode. Hence move it to a more generic file.

[PATCH 3/4] powerpc/smp: Enable Asym packing for cores on shared processor

2023-08-30 Thread Srikar Dronamraju
If there are shared processor lpars, underlying Hypervisor can have more virtual cores to handle that actual physical cores. Starting with Power 9, a core has 2 nearly independent thread groups. On a shared processors lpars, it helps to pack threads to lesser number of cores so that the overall

[PATCH 0/4] powerpc/smp: Shared processor sched optimizations

2023-08-30 Thread Srikar Dronamraju
PowerVM systems configured in shared processors mode have some unique challenges. Some device-tree properties will be missing on a shared processor. Hence some sched domains may not make sense for shared processor systems. Most shared processor systems are over-provisioned. Underlying PowerVM

[PATCH 1/4] powerpc/smp: Cache CPU has Asymmetric SMP

2023-08-30 Thread Srikar Dronamraju
Currently cpu feature flag is checked whenever powerpc_smt_flags gets called. This is an unnecessary overhead. CPU_FTR_ASYM_SMT is set based on the processor and all processors will either have this set or will have it unset. Hence only check for the feature flag once and cache it to be used

Re: [PATCH] powerpc: Hide empty pt_regs at base of the stack

2023-08-30 Thread Joel Stanley
On Thu, 24 Aug 2023 at 06:42, Michael Ellerman wrote: > > A thread started via eg. user_mode_thread() runs in the kernel to begin > with and then may later return to userspace. While it's running in the > kernel it has a pt_regs at the base of its kernel stack, but that > pt_regs is all zeroes. >

Re: [PATCH RFC 1/2] powerpc/pseries: papr-vpd char driver for VPD retrieval

2023-08-30 Thread Michal Suchánek
Hello, thanks for working on this. On Tue, Aug 22, 2023 at 04:33:39PM -0500, Nathan Lynch via B4 Relay wrote: > From: Nathan Lynch > > PowerVM LPARs may retrieve Vital Product Data (VPD) for system > components using the ibm,get-vpd RTAS function. > > We can expose this to user space with a

Re: Recent Power changes and stack_trace_save_tsk_reliable?

2023-08-30 Thread Michael Ellerman
Michael Ellerman writes: > Joe Lawrence writes: >> Hi ppc-dev list, >> >> We noticed that our kpatch integration tests started failing on ppc64le >> when targeting the upstream v6.4 kernel, and then confirmed that the >> in-tree livepatching kselftests similarly fail, too. From the kselftest >>