[powerpc:next] BUILD SUCCESS 8b4bb0ad00cb347f62e76a636ce08eb179c843fc

2022-09-02 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next branch HEAD: 8b4bb0ad00cb347f62e76a636ce08eb179c843fc powerpc/code-patching: Speed up page mapping/unmapping elapsed time: 1004m configs tested: 57 configs skipped: 2 The following configs have been built succ

[powerpc:next-test] BUILD SUCCESS 0e7991d4acafa88d5771c0227971996c00a55325

2022-09-02 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test branch HEAD: 0e7991d4acafa88d5771c0227971996c00a55325 powerpc/mm/64s: Drop p4d_leaf() elapsed time: 933m configs tested: 53 configs skipped: 2 The following configs have been built successfully. More conf

[powerpc:fixes-test] BUILD SUCCESS 6cf07810e9ef8535d60160d13bf0fd05f2af38e7

2022-09-02 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git fixes-test branch HEAD: 6cf07810e9ef8535d60160d13bf0fd05f2af38e7 powerpc/papr_scm: Ensure rc is always initialized in papr_scm_pmu_register() elapsed time: 720m configs tested: 16 configs skipped: 106 The following

[PATCH net-next v5 14/14] net: dpaa: Adjust queue depth on rate change

2022-09-02 Thread Sean Anderson
Instead of setting the queue depth once during probe, adjust it on the fly whenever we configure the link. This is a bit unusal, since usually the DPAA driver calls into the FMAN driver, but here we do the opposite. We need to add a netdev to struct mac_device for this, but it will soon live in the

[PATCH net-next v5 13/14] soc: fsl: qbman: Add CGR update function

2022-09-02 Thread Sean Anderson
This adds a function to update a CGR with new parameters. qman_create_cgr can almost be used for this (with flags=0), but it's not suitable because it also registers the callback function. The _safe variant was modeled off of qman_cgr_delete_safe. However, we handle multiple arguments and a return

[PATCH net-next v5 01/14] net: fman: Move initialization to mac-specific files

2022-09-02 Thread Sean Anderson
This moves mac-specific initialization to mac-specific files. This will make it easier to work with individual macs. It will also make it easier to refactor the initialization to simplify the control flow. No functional change intended. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (

[PATCH net-next v5 12/14] soc: fsl: qbman: Add helper for sanity checking cgr ops

2022-09-02 Thread Sean Anderson
This breaks out/combines get_affine_portal and the cgr sanity check in preparation for the next commit. No functional change intended. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v2) Changes in v2: - New drivers/soc/fsl/qbman/qman.c | 29 +++

[PATCH net-next v5 11/14] net: dpaa: Use mac_dev variable in dpaa_netdev_init

2022-09-02 Thread Sean Anderson
There are several references to mac_dev in dpaa_netdev_init. Make things a bit more concise by adding a local variable for it. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v4) Changes in v4: - Use mac_dev for calling change_addr drivers/net/ethernet/freescale/dp

[PATCH net-next v5 10/14] net: fman: Change return type of disable to void

2022-09-02 Thread Sean Anderson
When disabling, there is nothing we can do about errors. In fact, the only error which can occur is misuse of the API. Just warn in the mac driver instead. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v1) drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 5 +

[PATCH net-next v5 09/14] net: fman: Clean up error handling

2022-09-02 Thread Sean Anderson
This removes the _return label, since something like err = -EFOO; goto _return; can be replaced by the briefer return -EFOO; Additionally, this skips going to _return_of_node_put when dev_node has already been put (preventing a double put). Signed-off-by: Sean Anderson

[PATCH net-next v5 08/14] net: fman: Specify type of mac_dev for exception_cb

2022-09-02 Thread Sean Anderson
Instead of using a void pointer for mac_dev, specify its type explicitly. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- Changes in v5: - Reduce line length of tgec_config Changes in v2: - New drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +- drivers/net/ethernet/freescale/f

[PATCH net-next v5 07/14] net: fman: Use mac_dev for some params

2022-09-02 Thread Sean Anderson
Some params are already present in mac_dev. Use them directly instead of passing them through params. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v1) .../net/ethernet/freescale/fman/fman_dtsec.c| 16 +++- drivers/net/ethernet/freescale/fman/fman_

[PATCH net-next v5 06/14] net: fman: Pass params directly to mac init

2022-09-02 Thread Sean Anderson
Instead of having the mac init functions call back into the fman core to get their params, just pass them directly to the init functions. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v1) .../net/ethernet/freescale/fman/fman_dtsec.c | 10 ++ .../net/ethernet/

[PATCH net-next v5 05/14] net: fman: Map the base address once

2022-09-02 Thread Sean Anderson
We don't need to remap the base address from the resource twice (once in mac_probe() and again in set_fman_mac_params()). We still need the resource to get the end address, but we can use a single function call to get both at once. While we're at it, use platform_get_mem_or_io and devm_request_res

[PATCH net-next v5 04/14] net: fman: Remove internal_phy_node from params

2022-09-02 Thread Sean Anderson
This member was used to pass the phy node between mac_probe and the mac-specific initialization function. But now that the phy node is gotten in the initialization function, this parameter does not serve a purpose. Remove it, and do the grabbing of the node/grabbing of the phy in the same place. S

[PATCH net-next v5 03/14] net: fman: Inline several functions into initialization

2022-09-02 Thread Sean Anderson
There are several small functions which were only necessary because the initialization functions didn't have access to the mac private data. Now that they do, just do things directly. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v4) Changes in v4: - weer -> were

[PATCH net-next v5 02/14] net: fman: Mark mac methods static

2022-09-02 Thread Sean Anderson
These methods are no longer accessed outside of the driver file, so mark them as static. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v1) .../net/ethernet/freescale/fman/fman_dtsec.c | 48 ++- .../net/ethernet/freescale/fman/fman_memac.c | 45 ++

[PATCH net-next v5 00/14] net: dpaa: Cleanups in preparation for phylink conversion (part 2)

2022-09-02 Thread Sean Anderson
This series contains several cleanup patches for dpaa/fman. While they are intended to prepare for a phylink conversion, they stand on their own. This series was originally submitted as part of [1]. [1] https://lore.kernel.org/netdev/20220715215954.1449214-1-sean.ander...@seco.com Changes in v5:

Re: [RESEND PATCH net-next v4 00/25] net: dpaa: Cleanups in preparation for phylink conversion

2022-09-02 Thread Sean Anderson
On 9/2/22 5:32 PM, Sean Anderson wrote: > Hi Jakub, > > On 8/18/22 3:28 PM, Jakub Kicinski wrote: >> On Thu, 18 Aug 2022 15:14:04 -0400 Sean Anderson wrote: >>> > Ack, no question. I'm trying to tell you got to actually get stuff in. >>> > It's the first week after the merge window and people a

[PATCH v5 0/8] phy: Add support for Lynx 10G SerDes

2022-09-02 Thread Sean Anderson
This adds support for the Lynx 10G SerDes found on the QorIQ T-series and Layerscape series. Due to limited time and hardware, only support for the LS1046ARDB is added in this initial series. There is a sketch for LS1088ARDB support, but it is incomplete. Dynamic reconfiguration does not work. Tha

[PATCH v5 8/8] [WIP] arm64: dts: ls1088ardb: Add serdes bindings

2022-09-02 Thread Sean Anderson
This is a first stab at adding serdes support on the LS1088A. Linux hangs around when the serdes is initialized if the si5341 is enabled, so it's commented out. The MC firmware needs to be fairly new (it must support DPAA2_MAC_FEATURE_PROTOCOL_CHANGE), and the DPC needs to set the macs to MAC_LINK_

[PATCH v5 7/8] arm64: dts: ls1046ardb: Add serdes bindings

2022-09-02 Thread Sean Anderson
This adds appropriate bindings for the macs which use the SerDes. The 156.25MHz fixed clock is a crystal. The 100MHz clocks (there are actually 3) come from a Renesas 6V49205B at address 69 on i2c0. There is no driver for this device (and as far as I know all you can do with the 100MHz clocks is ga

[PATCH v5 6/8] arm64: dts: ls1088a: Add serdes bindings

2022-09-02 Thread Sean Anderson
This adds bindings for the SerDes devices. They are disabled by default to prevent any breakage on existing boards. Signed-off-by: Sean Anderson --- (no changes since v4) Changes in v4: - Convert to new bindings Changes in v3: - New arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 18 +++

[PATCH v5 5/8] arm64: dts: ls1046a: Add serdes bindings

2022-09-02 Thread Sean Anderson
This adds bindings for the SerDes devices. They are disabled by default to prevent any breakage on existing boards. Signed-off-by: Sean Anderson --- (no changes since v4) Changes in v4: - Convert to new bindings Changes in v3: - Describe modes in device tree Changes in v2: - Use one phy cell

[PATCH v5 4/8] phy: fsl: Add Lynx 10G SerDes driver

2022-09-02 Thread Sean Anderson
This adds support for the Lynx 10G "SerDes" devices found on various NXP QorIQ SoCs. There may be up to four SerDes devices on each SoC, each supporting up to eight lanes. Protocol support for each SerDes is highly heterogeneous, with each SoC typically having a totally different selection of suppo

[PATCH v5 3/8] dt-bindings: clock: Add ids for Lynx 10g PLLs

2022-09-02 Thread Sean Anderson
This adds ids for the Lynx 10g SerDes's internal PLLs. These may be used with assigned-clock* to specify a particular frequency to use. For example, to set the second PLL (at offset 0x20)'s frequency, use LYNX10G_PLLa(1). These are for use only in the device tree, and are not otherwise used by the

[PATCH v5 2/8] dt-bindings: phy: Add Lynx 10G phy binding

2022-09-02 Thread Sean Anderson
This adds a binding for the SerDes module found on QorIQ processors. Each phy is a subnode of the top-level device, possibly supporting multiple lanes and protocols. This "thick" #phy-cells is used due to allow for better organization of parameters. Note that the particular parameters necessary to

[PATCH v5 1/8] dt-bindings: phy: Add 2500BASE-X and 10GBASE-R

2022-09-02 Thread Sean Anderson
This adds some modes necessary for Lynx 10G support. 2500BASE-X, also known as 2.5G SGMII, is 1000BASE-X/SGMII overclocked to 3.125 GHz, with autonegotiation disabled. 10GBASE-R, also known as XFI, is the protocol spoken between the PMA and PMD ethernet layers for 10GBASE-T and 10GBASE-S/L/E. It is

Re: [RESEND PATCH net-next v4 00/25] net: dpaa: Cleanups in preparation for phylink conversion

2022-09-02 Thread Sean Anderson
Hi Jakub, On 8/18/22 3:28 PM, Jakub Kicinski wrote: > On Thu, 18 Aug 2022 15:14:04 -0400 Sean Anderson wrote: >> > Ack, no question. I'm trying to tell you got to actually get stuff in. >> > It's the first week after the merge window and people are dumping code >> > the had written over the dead t

[PATCH 2/2] powerpc: Include e500v1_power_isa.dtsi for remaining e500v1 platforms

2022-09-02 Thread Pali Rohár
There are still some board device tree files without Power ISA properties which have Freescale e500v1 cores, namely those which are based on Freescale mpc8540, mpc8541, mpc8555 and mpc8560 processors. So include newly introduced e500v1_power_isa.dtsi file in devices tree files with those processor

[PATCH 1/2] powerpc: Fix SPE Power ISA properties for e500v1 platforms

2022-09-02 Thread Pali Rohár
Commit 2eb28006431c ("powerpc/e500v2: Add Power ISA properties to comply with ePAPR 1.1") introduced new include file e500v2_power_isa.dtsi and should have used it for all e500v2 platforms. But apparently it was used also for e500v1 platforms mpc8540, mpc8541, mpc8555 and mpc8560. e500v1 cores com

Re: [PATCH v4 0/8] phy: Add support for Lynx 10G SerDes

2022-09-02 Thread Sean Anderson
Hi Vinod, On 9/2/22 1:41 PM, Vinod Koul wrote: > On 30-08-22, 17:44, Sean Anderson wrote: > >> >> ping? >> >> Vinod/Kishon: any comments on the driver itself? > > Not sure why this is not in my queue or pw, can you please rebase and > resend It's marked as "changes requested" [1]. However, I

Re: [PATCH v2 1/3] dt-bindings: reset: syscon-reboot: Add priority property

2022-09-02 Thread Rob Herring
On Wed, Aug 31, 2022 at 09:26:17AM +0200, Arnd Bergmann wrote: > On Wed, Aug 31, 2022, at 1:00 AM, Pali Rohár wrote: > > a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml > > b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml > > index da2509724812..4c8b0d0a0111 10

Re: [PATCH v4 2/4] mm/migrate_device.c: Add missing flush_cache_page()

2022-09-02 Thread Peter Xu
On Fri, Sep 02, 2022 at 10:35:52AM +1000, Alistair Popple wrote: > Currently we only call flush_cache_page() for the anon_exclusive case, > however in both cases we clear the pte so should flush the cache. > > Signed-off-by: Alistair Popple > Fixes: 8c3328f1f36a ("mm/migrate: migrate_vma() unmap

Re: [PATCH 1/3] dt-bindings: reset: syscon-reboot: Add priority property

2022-09-02 Thread Rob Herring
On Mon, Aug 22, 2022 at 03:50:50PM +0200, Pali Rohár wrote: > On Monday 22 August 2022 07:47:28 Rob Herring wrote: > > On Sat, Aug 20, 2022 at 12:29:23PM +0200, Pali Rohár wrote: > > > This new optional priority property allows to specify custom priority > > > level > > > of reset device. Default

Re: [PATCH v4 1/4] mm/migrate_device.c: Flush TLB while holding PTL

2022-09-02 Thread Peter Xu
On Fri, Sep 02, 2022 at 10:35:51AM +1000, Alistair Popple wrote: > When clearing a PTE the TLB should be flushed whilst still holding the > PTL to avoid a potential race with madvise/munmap/etc. For example > consider the following sequence: > > CPU0 CPU1 >

[PATCH v2] hugetlb: simplify hugetlb handling in follow_page_mask

2022-09-02 Thread Mike Kravetz
During discussions of this series [1], it was suggested that hugetlb handling code in follow_page_mask could be simplified. At the beginning of follow_page_mask, there currently is a call to follow_huge_addr which 'may' handle hugetlb pages. ia64 is the only architecture which provides a follow_h

Re: [PATCH v4 0/8] phy: Add support for Lynx 10G SerDes

2022-09-02 Thread Vinod Koul
On 30-08-22, 17:44, Sean Anderson wrote: > > ping? > > Vinod/Kishon: any comments on the driver itself? Not sure why this is not in my queue or pw, can you please rebase and resend Thanks -- ~Vinod

Re: [PATCH v2] powerpc: Fix irq_soft_mask_set() and irq_soft_mask_return() with sanitizer

2022-09-02 Thread Segher Boessenkool
On Fri, Sep 02, 2022 at 10:57:27AM -0500, Peter Bergner wrote: > On 8/31/22 5:45 PM, Segher Boessenkool wrote: > > Yes, this is guaranteed. > > Agree with Segher here. That said, there was a gcc bug a long time > ago where gcc copied r13 into a temporary register and used it from there. r13

Re: [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings

2022-09-02 Thread Segher Boessenkool
Hi! On Fri, Sep 02, 2022 at 09:11:48AM -0700, Nathan Chancellor wrote: > On Fri, Sep 02, 2022 at 10:59:54AM -0500, Segher Boessenkool wrote: > > Maybe add -Wno-implicit-fallthrough? This code is a copy from outside > > the kernel, no one has ever wanted to maintain it, if nothing else (the > > mo

Re: [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings

2022-09-02 Thread Nathan Chancellor
On Fri, Sep 02, 2022 at 10:59:54AM -0500, Segher Boessenkool wrote: > On Fri, Sep 02, 2022 at 08:37:23AM -0700, Nathan Chancellor wrote: > > On Fri, Sep 02, 2022 at 12:08:55PM +0200, Christophe Leroy wrote: > > > This should have been detected by gcc at build time, but due to > > > '-w' flag it wen

Re: [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings

2022-09-02 Thread Christophe Leroy
Le 02/09/2022 à 17:59, Segher Boessenkool a écrit : > On Fri, Sep 02, 2022 at 08:37:23AM -0700, Nathan Chancellor wrote: >> On Fri, Sep 02, 2022 at 12:08:55PM +0200, Christophe Leroy wrote: >>> This should have been detected by gcc at build time, but due to >>> '-w' flag it went undetected. >>> >

Re: [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings

2022-09-02 Thread Segher Boessenkool
On Fri, Sep 02, 2022 at 08:37:23AM -0700, Nathan Chancellor wrote: > On Fri, Sep 02, 2022 at 12:08:55PM +0200, Christophe Leroy wrote: > > This should have been detected by gcc at build time, but due to > > '-w' flag it went undetected. > > > > Removing that flag leads to many warnings hence error

[PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings

2022-09-02 Thread Christophe Leroy
As reported by Nathan, the module_init() macro was not taken into account because the header was missing. That means spe_mathemu_init() was never called. This should have been detected by gcc at build time, but due to '-w' flag it went undetected. Removing that flag leads to many warnings hence e

[PATCH v2 1/2] powerpc/math_emu/efp: Include module.h

2022-09-02 Thread Christophe Leroy
From: Nathan Chancellor When building with a recent version of clang, there are a couple of errors around the call to module_init(): arch/powerpc/math-emu/math_efp.c:927:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] modu

Re: [PATCH v2] powerpc: Fix irq_soft_mask_set() and irq_soft_mask_return() with sanitizer

2022-09-02 Thread Peter Bergner
On 8/31/22 5:45 PM, Segher Boessenkool wrote: > On Tue, Aug 30, 2022 at 09:10:02AM +, Christophe Leroy wrote: >> Le 30/08/2022 à 11:01, Nicholas Piggin a écrit : >>> On Tue Aug 30, 2022 at 3:24 PM AEST, Christophe Leroy wrote: > This is still slightly concerning to me. Is there any guarante

Re: [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings

2022-09-02 Thread Nathan Chancellor
Hi Christophe, On Fri, Sep 02, 2022 at 12:08:55PM +0200, Christophe Leroy wrote: > As reported by Nathan, the module_init() macro was not taken into > account because the header was missing. That means spe_mathemu_init() > was never called. > > This should have been detected by gcc at build time,

[PATCH v2] powerpc/vdso: link with -z noexecstack

2022-09-02 Thread Christophe Leroy
With recent binutils, the following warning appears: VDSO32L arch/powerpc/kernel/vdso/vdso32.so.dbg /opt/gcc-12.2.0-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/12.2.0/../../../../powerpc64-linux/bin/ld: warning: arch/powerpc/kernel/vdso/getcpu-32.o: missing .note.GNU-stack section im

Re: [PATCH] powerpc/vdso: link with -z noexecstack

2022-09-02 Thread Christophe Leroy
Le 02/09/2022 à 17:16, Segher Boessenkool a écrit : > Hi! > > On Fri, Sep 02, 2022 at 09:57:09AM +0200, Christophe Leroy wrote: >> --- a/arch/powerpc/kernel/Makefile >> +++ b/arch/powerpc/kernel/Makefile >> @@ -128,7 +128,8 @@ extra-y += vmlinux.lds >> >> obj-$(CONF

Re: [PATCH] powerpc/vdso: link with -z noexecstack

2022-09-02 Thread Segher Boessenkool
Hi! On Fri, Sep 02, 2022 at 09:57:09AM +0200, Christophe Leroy wrote: > --- a/arch/powerpc/kernel/Makefile > +++ b/arch/powerpc/kernel/Makefile > @@ -128,7 +128,8 @@ extra-y += vmlinux.lds > > obj-$(CONFIG_RELOCATABLE)+= reloc_$(BITS).o > > -obj-$(CONFIG_PPC32)

Re: [PATCH] powerpc/math_emu/efp: Include module.h

2022-09-02 Thread Segher Boessenkool
On Fri, Sep 02, 2022 at 08:43:49AM +, Christophe Leroy wrote: > Le 01/09/2022 à 21:47, Segher Boessenkool a écrit : > > On Thu, Sep 01, 2022 at 05:41:33AM +, Christophe Leroy wrote: > >> I think it would be worth a GCC bug report. > > > > We need a stand-alone testcase for this. When you

Re: [PATCH kernel 0/3] powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains

2022-09-02 Thread Jason Gunthorpe
On Fri, Sep 02, 2022 at 05:33:30PM +1000, Michael Ellerman wrote: > Jason Gunthorpe writes: > > On Thu, Jul 14, 2022 at 06:18:19PM +1000, Alexey Kardashevskiy wrote: > >> Here is another take on iommu_ops on POWER to make VFIO work > >> again on POWERPC64. > >> > >> The tree with all prerequisite

Re: [PATCH v3] powerpc/code-patching: Speed up page mapping/unmapping

2022-09-02 Thread Michael Ellerman
On Mon, 15 Aug 2022 21:48:40 +1000, Michael Ellerman wrote: > From: Christophe Leroy > > Since commit 591b4b268435 ("powerpc/code-patching: Pre-map patch area") > the patch area is premapped so intermediate page tables are already > allocated. > > Use __set_pte_at() directly instead of the heavy

Re: [PATCH] powerpc/papr_scm: Ensure rc is always initialized in papr_scm_pmu_register()

2022-09-02 Thread Michael Ellerman
On Tue, 30 Aug 2022 08:12:56 -0700, Nathan Chancellor wrote: > Clang warns: > > arch/powerpc/platforms/pseries/papr_scm.c:492:6: warning: variable 'rc' is > used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] > if (!p->stat_buffer_len) > ^~

Re: [PATCH] powerpc: Fix hard_irq_disable() with sanitizer

2022-09-02 Thread Michael Ellerman
On Tue, 23 Aug 2022 18:36:35 +0200, Christophe Leroy wrote: > As reported by Zhouyi Zhou, WRITE_ONCE() is not atomic > as expected when KASAN or KCSAN are compiled in. > > Fix it by re-implementing it using inline assembly. > > Applied to powerpc/fixes. [1/1] powerpc: Fix hard_irq_disable() wi

Re: [PATCH] Revert "powerpc/irq: Don't open code irq_soft_mask helpers"

2022-09-02 Thread Michael Ellerman
On Wed, 31 Aug 2022 23:10:52 +1000, Michael Ellerman wrote: > This reverts commit ef5b570d3700fbb8628a58da0487486ceeb713cd. > > Zhouyi reported that commit is causing crashes when running rcutorture > with KASAN enabled: > > BUG: using smp_processor_id() in preemptible [] code: > rcu_t

[PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings

2022-09-02 Thread Christophe Leroy
As reported by Nathan, the module_init() macro was not taken into account because the header was missing. That means spe_mathemu_init() was never called. This should have been detected by gcc at build time, but due to '-w' flag it went undetected. Removing that flag leads to many warnings hence e

[PATCH v2 1/2] powerpc/math_emu/efp: Include module.h

2022-09-02 Thread Christophe Leroy
From: Nathan Chancellor When building with a recent version of clang, there are a couple of errors around the call to module_init(): arch/powerpc/math-emu/math_efp.c:927:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] modu

[PATCH 2/2] powerpc/math-emu: Remove -w build flag and fix warnings

2022-09-02 Thread Christophe Leroy
As reported by Nathan, the module_init() macro was not taken into account because the header was missing. That means spe_mathemu_init() was never called. This should have been detected by gcc at build time, but due to '-w' flag it went undetected. Removing that flag leads to many warnings hence e

[PATCH 1/2] powerpc/math_emu/efp: Include module.h

2022-09-02 Thread Christophe Leroy
From: Nathan Chancellor When building with a recent version of clang, there are a couple of errors around the call to module_init(): arch/powerpc/math-emu/math_efp.c:927:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] modu

[PATCH v2 4/4] powerpc/pseries: Move dtl scanning and steal time accounting to pseries platform

2022-09-02 Thread Nicholas Piggin
dtl is the PAPR Dispatch Trace Log, which is entirely a pseries feature. The pseries platform alrady has a file dealing with the dtl, so move scanning for stolen time accounting there from kernel/time.c. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/cputime.h | 2 +- arch/powerp

[PATCH v2 3/4] powerpc/64: Remove PPC64 special case for cputime accounting default

2022-09-02 Thread Nicholas Piggin
Distro kernels tend to be moving to VIRT_CPU_ACCOUNTING_GEN, and there is not much reason why PPC64 should be special here. Remove the special case and make the ppc64 and pseries defconfigs use GEN accounting (others will use TICK, as-per Kconfig defaults). VIRT_CPU_ACCOUNTING_NATIVE does provide

[PATCH v2 2/4] powerpc/pseries: Implement CONFIG_PARAVIRT_TIME_ACCOUNTING

2022-09-02 Thread Nicholas Piggin
CONFIG_VIRT_CPU_ACCOUNTING_GEN under pseries does not provide stolen time accounting unless CONFIG_PARAVIRT_TIME_ACCOUNTING is enabled. Implement this using the VPA accumulated wait counters. Note this will not work on current KVM hosts because KVM does not implement the VPA dispatch counters (yet

[PATCH v2 1/4] powerpc/pseries: Add wait interval counter definitions to struct lppaca

2022-09-02 Thread Nicholas Piggin
The hypervisor exposes accumulated partition scheduling interval times in the VPA (lppaca). These can be used to implement a simple stolen time in the guest without complex and costly dtl scanning. Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/lppaca.h |

[PATCH v2 0/4] powerpc: stolen time accounting for VIRT_CPU_ACCOUNTING_GEN

2022-09-02 Thread Nicholas Piggin
pseries provides stolen time accounting when VIRT_CPU_ACCOUNTING_NATIVE is selected, but not when VIRT_CPU_ACCOUNTING_GEN is. We like GEN because it's less code in arch/powerpc, allows full nohz, and distros have moved to it, so this series adds stolen time accounting for GEN, and moves our pseries

Re: [PATCH] powerpc/math_emu/efp: Include module.h

2022-09-02 Thread Christophe Leroy
Le 01/09/2022 à 21:47, Segher Boessenkool a écrit : > On Thu, Sep 01, 2022 at 05:41:33AM +, Christophe Leroy wrote: >> I think it would be worth a GCC bug report. > > We need a stand-alone testcase for this. When you have created one, at > least 98% of the time you discover the bug is in us

Re: [PATCH v2 08/16] objtool: Fix SEGFAULT

2022-09-02 Thread Peter Zijlstra
On Fri, Sep 02, 2022 at 08:06:28AM +, Christophe Leroy wrote: > > > Le 01/09/2022 à 21:20, Peter Zijlstra a écrit : > > On Mon, Aug 29, 2022 at 11:22:15AM +0530, Sathvika Vasireddy wrote: > >> From: Christophe Leroy > >> > >> find_insn() will return NULL in case of failure. Check insn in ord

Re: [PATCH v2 08/16] objtool: Fix SEGFAULT

2022-09-02 Thread Christophe Leroy
Le 01/09/2022 à 21:20, Peter Zijlstra a écrit : > On Mon, Aug 29, 2022 at 11:22:15AM +0530, Sathvika Vasireddy wrote: >> From: Christophe Leroy >> >> find_insn() will return NULL in case of failure. Check insn in order >> to avoid a kernel Oops for NULL pointer dereference. >> >> Signed-off-by:

[PATCH] powerpc/vdso: link with -z noexecstack

2022-09-02 Thread Christophe Leroy
With recent binutils, the following warning appears: VDSO32L arch/powerpc/kernel/vdso/vdso32.so.dbg /opt/gcc-12.2.0-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/12.2.0/../../../../powerpc64-linux/bin/ld: warning: arch/powerpc/kernel/vdso/getcpu-32.o: missing .note.GNU-stack section im

Re: [RFC PATCH RESEND 00/28] per-VMA locks proposal

2022-09-02 Thread Peter Zijlstra
On Thu, Sep 01, 2022 at 10:34:48AM -0700, Suren Baghdasaryan wrote: > This is a proof of concept for per-vma locks idea that was discussed > during SPF [1] discussion at LSF/MM this year [2], which concluded with > suggestion that “a reader/writer semaphore could be put into the VMA > itself; that

Re: [PATCH v2 07/16] powerpc: Skip objtool from running on VDSO files

2022-09-02 Thread Michael Ellerman
Peter Zijlstra writes: > On Mon, Aug 29, 2022 at 11:22:14AM +0530, Sathvika Vasireddy wrote: >> Do not run objtool on VDSO files, by using >> OBJECT_FILES_NON_STANDARD >> >> Suggested-by: Christophe Leroy >> Signed-off-by: Sathvika Vasireddy >> --- >> arch/powerpc/kernel/vdso/Makefile | 2 ++ >

Re: [PATCH kernel 0/3] powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains

2022-09-02 Thread Michael Ellerman
Jason Gunthorpe writes: > On Thu, Jul 14, 2022 at 06:18:19PM +1000, Alexey Kardashevskiy wrote: >> Here is another take on iommu_ops on POWER to make VFIO work >> again on POWERPC64. >> >> The tree with all prerequisites is here: >> https://github.com/aik/linux/tree/kvm-fixes-wip >> >> The previ

[PATCH linux-next] crypto: nx - Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: ye xingchen Return the value set_msg_len() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/crypto/nx/nx-aes-ccm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/crypto/nx/nx-aes