Re: [PATCH v2] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Kefeng Wang
On 2021/3/17 13:48, Christophe Leroy wrote: Le 17/03/2021 à 02:52, Kefeng Wang a écrit : mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, so using void argument and move it into mm_init(). Acked-by: Dave Hansen Signed-off-by: Kefeng Wang ---

Re: [PATCH v2] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Christophe Leroy
Le 17/03/2021 à 02:52, Kefeng Wang a écrit : mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, so using void argument and move it into mm_init(). Acked-by: Dave Hansen Signed-off-by: Kefeng Wang --- v2: - Cleanup 'str' line suggested by Christophe

Re: [PATCH v9 5/8] powerpc: Set ARCH_HAS_STRICT_MODULE_RWX

2021-03-16 Thread Christophe Leroy
Le 17/03/2021 à 03:15, Jordan Niethe a écrit : On Tue, Mar 16, 2021 at 5:51 PM Christophe Leroy wrote: Le 16/03/2021 à 04:17, Jordan Niethe a écrit : From: Russell Currey To enable strict module RWX on powerpc, set: CONFIG_STRICT_MODULE_RWX=y You should also have

Re: [PATCH] powerpc: arch/powerpc/kernel/setup_64.c - cleanup warnings

2021-03-16 Thread heying (H)
Thank you for your reply. 在 2021/3/17 11:04, Daniel Axtens 写道: Hi He Ying, Thank you for this patch. I'm not sure what the precise rules for Fixes are, but I wonder if this should have: Fixes: 9a32a7e78bd0 ("powerpc/64s: flush L1D after user accesses") Fixes: f79643787e0a ("powerpc/64s:

Re: [PATCH] powerpc: arch/powerpc/kernel/setup_64.c - cleanup warnings

2021-03-16 Thread Daniel Axtens
Hi He Ying, Thank you for this patch. I'm not sure what the precise rules for Fixes are, but I wonder if this should have: Fixes: 9a32a7e78bd0 ("powerpc/64s: flush L1D after user accesses") Fixes: f79643787e0a ("powerpc/64s: flush L1D on kernel entry") Those are the commits that added the

Re: [PATCH 03/14] swiotlb: move orig addr and size validation into swiotlb_bounce

2021-03-16 Thread Konrad Rzeszutek Wilk
On Mon, Mar 01, 2021 at 08:44:25AM +0100, Christoph Hellwig wrote: > Move the code to find and validate the original buffer address and size > from the callers into swiotlb_bounce. This means a tiny bit of extra > work in the swiotlb_map path, but avoids code duplication and a leads to > a better

Re: [PATCH v9 5/8] powerpc: Set ARCH_HAS_STRICT_MODULE_RWX

2021-03-16 Thread Jordan Niethe
On Tue, Mar 16, 2021 at 5:51 PM Christophe Leroy wrote: > > > > Le 16/03/2021 à 04:17, Jordan Niethe a écrit : > > From: Russell Currey > > > > To enable strict module RWX on powerpc, set: > > > > CONFIG_STRICT_MODULE_RWX=y > > > > You should also have CONFIG_STRICT_KERNEL_RWX=y set to have

[PATCH v2] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Kefeng Wang
mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, so using void argument and move it into mm_init(). Acked-by: Dave Hansen Signed-off-by: Kefeng Wang --- v2: - Cleanup 'str' line suggested by Christophe and ACK arch/alpha/mm/init.c | 1 -

[PATCH AUTOSEL 4.4 02/14] powerpc/4xx: Fix build errors from mfdcr()

2021-03-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eead089311f4d935ab5d1d8fbb0c42ad44699ada ] lkp reported a build error in fsp2.o: CC arch/powerpc/platforms/44x/fsp2.o {standard input}:577: Error: unsupported relocation against base Which comes from: pr_err("GESR0: 0x%08x\n", mfdcr(base +

[PATCH AUTOSEL 4.9 10/16] net: wan: fix error return code of uhdlc_init()

2021-03-16 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 62765d39553cfd1ad340124fe1e280450e8c89e2 ] When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of uhdlc_init() is assigned. To fix this bug, ret is assigned with -ENOMEM in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH AUTOSEL 4.9 02/16] powerpc/4xx: Fix build errors from mfdcr()

2021-03-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eead089311f4d935ab5d1d8fbb0c42ad44699ada ] lkp reported a build error in fsp2.o: CC arch/powerpc/platforms/44x/fsp2.o {standard input}:577: Error: unsupported relocation against base Which comes from: pr_err("GESR0: 0x%08x\n", mfdcr(base +

[PATCH AUTOSEL 4.14 13/21] net: wan: fix error return code of uhdlc_init()

2021-03-16 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 62765d39553cfd1ad340124fe1e280450e8c89e2 ] When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of uhdlc_init() is assigned. To fix this bug, ret is assigned with -ENOMEM in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH AUTOSEL 4.14 02/21] powerpc/4xx: Fix build errors from mfdcr()

2021-03-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eead089311f4d935ab5d1d8fbb0c42ad44699ada ] lkp reported a build error in fsp2.o: CC arch/powerpc/platforms/44x/fsp2.o {standard input}:577: Error: unsupported relocation against base Which comes from: pr_err("GESR0: 0x%08x\n", mfdcr(base +

[PATCH AUTOSEL 4.19 14/23] net: wan: fix error return code of uhdlc_init()

2021-03-16 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 62765d39553cfd1ad340124fe1e280450e8c89e2 ] When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of uhdlc_init() is assigned. To fix this bug, ret is assigned with -ENOMEM in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH AUTOSEL 4.19 02/23] powerpc/4xx: Fix build errors from mfdcr()

2021-03-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eead089311f4d935ab5d1d8fbb0c42ad44699ada ] lkp reported a build error in fsp2.o: CC arch/powerpc/platforms/44x/fsp2.o {standard input}:577: Error: unsupported relocation against base Which comes from: pr_err("GESR0: 0x%08x\n", mfdcr(base +

[PATCH AUTOSEL 5.4 18/37] net: wan: fix error return code of uhdlc_init()

2021-03-16 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 62765d39553cfd1ad340124fe1e280450e8c89e2 ] When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of uhdlc_init() is assigned. To fix this bug, ret is assigned with -ENOMEM in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH AUTOSEL 5.4 02/37] powerpc/4xx: Fix build errors from mfdcr()

2021-03-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eead089311f4d935ab5d1d8fbb0c42ad44699ada ] lkp reported a build error in fsp2.o: CC arch/powerpc/platforms/44x/fsp2.o {standard input}:577: Error: unsupported relocation against base Which comes from: pr_err("GESR0: 0x%08x\n", mfdcr(base +

[PATCH AUTOSEL 5.10 23/54] net: wan: fix error return code of uhdlc_init()

2021-03-16 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 62765d39553cfd1ad340124fe1e280450e8c89e2 ] When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of uhdlc_init() is assigned. To fix this bug, ret is assigned with -ENOMEM in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH AUTOSEL 5.10 04/54] powerpc/4xx: Fix build errors from mfdcr()

2021-03-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eead089311f4d935ab5d1d8fbb0c42ad44699ada ] lkp reported a build error in fsp2.o: CC arch/powerpc/platforms/44x/fsp2.o {standard input}:577: Error: unsupported relocation against base Which comes from: pr_err("GESR0: 0x%08x\n", mfdcr(base +

[PATCH AUTOSEL 5.11 24/61] net: wan: fix error return code of uhdlc_init()

2021-03-16 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 62765d39553cfd1ad340124fe1e280450e8c89e2 ] When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of uhdlc_init() is assigned. To fix this bug, ret is assigned with -ENOMEM in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH AUTOSEL 5.11 05/61] powerpc/4xx: Fix build errors from mfdcr()

2021-03-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eead089311f4d935ab5d1d8fbb0c42ad44699ada ] lkp reported a build error in fsp2.o: CC arch/powerpc/platforms/44x/fsp2.o {standard input}:577: Error: unsupported relocation against base Which comes from: pr_err("GESR0: 0x%08x\n", mfdcr(base +

Re: [PATCH v9 7/8] powerpc/mm: implement set_memory_attr()

2021-03-16 Thread Jordan Niethe
On Tue, Mar 16, 2021 at 6:25 PM Christophe Leroy wrote: > > > > Le 16/03/2021 à 04:17, Jordan Niethe a écrit : > > From: Christophe Leroy > > Can you please update the whole series with my new email address: > christophe.le...@csgroup.eu Of course, I shall do that. > > > > > > > In addition to

Re: [PATCH v9 3/8] powerpc/kprobes: Mark newly allocated probes as RO

2021-03-16 Thread Jordan Niethe
On Tue, Mar 16, 2021 at 5:44 PM Christophe Leroy wrote: > > > > Le 16/03/2021 à 04:17, Jordan Niethe a écrit : > > From: Russell Currey > > > > With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will be one > > W+X page at boot by default. This can be tested with > >

Re: [PATCH v9 3/8] powerpc/kprobes: Mark newly allocated probes as RO

2021-03-16 Thread Jordan Niethe
On Tue, Mar 16, 2021 at 5:44 PM Christophe Leroy wrote: > > > > Le 16/03/2021 à 04:17, Jordan Niethe a écrit : > > From: Russell Currey > > > > With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will be one > > W+X page at boot by default. This can be tested with > >

Re: [PATCH v9 2/8] powerpc/lib/code-patching: Set up Strict RWX patching earlier

2021-03-16 Thread Jordan Niethe
On Tue, Mar 16, 2021 at 5:32 PM Christophe Leroy wrote: > > > > Le 16/03/2021 à 04:17, Jordan Niethe a écrit : > > setup_text_poke_area() is a late init call so it runs before > > mark_rodata_ro() and after the init calls. This lets all the init code > > patching simply write to their locations.

Re: [PATCH 02/14] swiotlb: remove the alloc_size parameter to swiotlb_tbl_unmap_single

2021-03-16 Thread Konrad Rzeszutek Wilk
On Mon, Mar 01, 2021 at 08:44:24AM +0100, Christoph Hellwig wrote: > Now that swiotlb remembers the allocation size there is no need to pass > it back to swiotlb_tbl_unmap_single. Reviewed-by: Konrad Rzeszutek Wilk

Re: [PATCH 10/14] powerpc/64: use interrupt restart table to speed up return from interrupt

2021-03-16 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of March 17, 2021 5:34 am: > > > Le 15/03/2021 à 23:03, Nicholas Piggin a écrit : >> The restart table facility is used to return from interrupt without >> disabling MSR EE or RI. > > What happens when an interrupt happens between the point you restore

[PATCH next v1 0/3] printk: remove safe buffers

2021-03-16 Thread John Ogness
implemented for this series. This series falls in line with the printk-rework plan as presented [0] at Linux Plumbers in Lisbon 2019. This series is based on next-20210316. John Ogness [0] https://linuxplumbersconf.org/event/4/contributions/290/attachments/276/463/lpc2019_jogness_printk.pdf (slide 23

[PATCH next v1 2/3] printk: remove safe buffers

2021-03-16 Thread John Ogness
With @logbuf_lock removed, the high level printk functions for storing messages are lockless. Messages can be stored from any context, so there is no need for the NMI and safe buffers anymore. Remove the NMI and safe buffers. Although the safe buffers are removed, the NMI and safe context

Re: [PATCH] MAINTAINERS: Update Spidernet network driver

2021-03-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 16 Mar 2021 10:13:52 -0700 you wrote: > Change the Spidernet network driver from supported to > maintained, add the linuxppc-dev ML, and add myself as > a 'maintainer'. > > Cc: Ishizaki Kou > Signed-off-by: Geoff

Re: [PATCH] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Dave Hansen
On 3/16/21 7:26 AM, Kefeng Wang wrote: > diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c > index 5430c81eefc9..aa8387aab9c1 100644 > --- a/arch/x86/mm/init_64.c > +++ b/arch/x86/mm/init_64.c > @@ -1350,8 +1350,6 @@ void __init mem_init(void) > kclist_add(_vsyscall, (void

Re: [PATCH 10/14] powerpc/64: use interrupt restart table to speed up return from interrupt

2021-03-16 Thread Christophe Leroy
Le 15/03/2021 à 23:03, Nicholas Piggin a écrit : The restart table facility is used to return from interrupt without disabling MSR EE or RI. What happens when an interrupt happens between the point you restore the user r1 and the rfi which returns to user ? If an interrupt happens there,

Re: [PATCH] net: ethernet: fs-enet: remove casting dma_alloc_coherent

2021-03-16 Thread Christophe Leroy
Le 11/12/2020 à 17:55, David Laight a écrit : From: Christophe Leroy Sent: 11 December 2020 16:43 Le 11/12/2020 à 17:07, David Laight a écrit : From: Christophe Leroy Sent: 11 December 2020 15:22 Le 11/12/2020 à 09:52, Xu Wang a écrit : Remove casting the values returned by

Re: [PATCH v2] ASoC: imx-hdmi: fix platform_no_drv_owner.cocci warnings

2021-03-16 Thread Mark Brown
On Thu, 4 Mar 2021 17:08:01 +0800, Yang Li wrote: > ./sound/soc/fsl/imx-hdmi.c:226:3-8: No need to set .owner here. The core > will do it. > > Remove .owner field if calls are used which set it automatically Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

Re: [PATCH] ASoC: hdmi-codec: fix platform_no_drv_owner.cocci warnings

2021-03-16 Thread Mark Brown
On Wed, 3 Mar 2021 16:54:11 +0800, Yang Li wrote: > ./sound/soc/fsl/imx-hdmi.c:226:3-8: No need to set .owner here. The core > will do it. > > Remove .owner field if calls are used which set it automatically Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

[PATCH v1 0/2] PS3 Updates

2021-03-16 Thread Geoff Levand
Hi Michael, Here are two minor updates for PS3. The first exports the firmware version to the proc FS, and the second re-aligns the DTB to save a little space in the PS3's limited flash memory. -Geoff The following changes since commit f40ddce88593482919761f74910f42f4b84c004b: Linux 5.11

[PATCH v1 1/2] powerpc/ps3: Add firmware version to proc

2021-03-16 Thread Geoff Levand
Add a new proc FS entry /proc/ps3/firmware-version that exports the PS3's firmware version. The firmware version is available through an LV1 hypercall, and we've been printing it to the boot log, but haven't provided an easy way for user utilities to get it. Signed-off-by: Geoff Levand ---

[PATCH v1 2/2] powerpc/ps3: Re-align DTB in image

2021-03-16 Thread Geoff Levand
Change the PS3 linker script to align the DTB at 8 bytes, the same alignment as that of the of the 'generic' powerpc linker script. Signed-off-by: Geoff Levand --- arch/powerpc/boot/zImage.ps3.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] MAINTAINERS: Update Spidernet network driver

2021-03-16 Thread Geoff Levand
Change the Spidernet network driver from supported to maintained, add the linuxppc-dev ML, and add myself as a 'maintainer'. Cc: Ishizaki Kou Signed-off-by: Geoff Levand --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH 18/18] iommu: remove iommu_domain_{get,set}_attr

2021-03-16 Thread Christoph Hellwig
Remove the now unused iommu attr infrastructure. Signed-off-by: Christoph Hellwig --- drivers/iommu/iommu.c | 26 -- include/linux/iommu.h | 36 2 files changed, 62 deletions(-) diff --git a/drivers/iommu/iommu.c

[PATCH 17/18] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG

2021-03-16 Thread Christoph Hellwig
Use an explicit set_pgtable_quirks method instead that just passes the actual quirk bitmask instead. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 +- drivers/iommu/arm/arm-smmu/arm-smmu.c | 64 +

[PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-16 Thread Christoph Hellwig
From: Robin Murphy Instead make the global iommu_dma_strict paramete in iommu.c canonical by exporting helpers to get and set it and use those directly in the drivers. This make sure that the iommu.strict parameter also works for the AMD and Intel IOMMU drivers on x86. As those default to lazy

[PATCH 15/18] iommu: remove iommu_set_cmd_line_dma_api and iommu_cmd_line_dma_api

2021-03-16 Thread Christoph Hellwig
Don't obsfucate the trivial bit flag check. Signed-off-by: Christoph Hellwig --- drivers/iommu/iommu.c | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 58d1d11a8d5c10..052cef11ae30df 100644 ---

[PATCH 14/18] iommu: remove DOMAIN_ATTR_NESTING

2021-03-16 Thread Christoph Hellwig
Use an explicit enable_nesting method instead. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 43 - drivers/iommu/arm/arm-smmu/arm-smmu.c | 30 +++--- drivers/iommu/intel/iommu.c | 31

[PATCH 13/18] iommu: remove DOMAIN_ATTR_GEOMETRY

2021-03-16 Thread Christoph Hellwig
The geometry information can be trivially queried from the iommu_domain struture. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/iommu.c | 20 +++- drivers/vfio/vfio_iommu_type1.c | 26 -- drivers/vhost/vdpa.c|

[PATCH 12/18] iommu: remove DOMAIN_ATTR_PAGING

2021-03-16 Thread Christoph Hellwig
DOMAIN_ATTR_PAGING is never used. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/iommu.c | 5 - include/linux/iommu.h | 1 - 2 files changed, 6 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b212bf0261820b..9a4cda390993e6 100644 ---

[PATCH 11/18] iommu/fsl_pamu: remove the snoop_id field

2021-03-16 Thread Christoph Hellwig
The snoop_id is always set to ~(u32)0. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 5 ++--- drivers/iommu/fsl_pamu_domain.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c

[PATCH 10/18] iommu/fsl_pamu: enable the liodn when attaching a device

2021-03-16 Thread Christoph Hellwig
Instead of a separate call to enable all devices from the list, just enablde the liodn one the device is attached to the iommu domain. This also remove the DOMAIN_ATTR_FSL_PAMU_ENABLE iommu_attr. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 47

[PATCH 09/18] iommu/fsl_pamu: merge handle_attach_device into fsl_pamu_attach_device

2021-03-16 Thread Christoph Hellwig
No good reason to split this functionality over two functions. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 59 +++-- 1 file changed, 20 insertions(+), 39 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c

[PATCH 08/18] iommu/fsl_pamu: merge pamu_set_liodn and map_liodn

2021-03-16 Thread Christoph Hellwig
Merge the two fuctions that configure the ppaace into a single coherent function. I somehow doubt we need the two pamu_config_ppaace calls, but keep the existing behavior just to be on the safe side. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 65

[PATCH 07/18] iommu/fsl_pamu: replace DOMAIN_ATTR_FSL_PAMU_STASH with a direct call

2021-03-16 Thread Christoph Hellwig
Add a fsl_pamu_configure_l1_stash API that qman_portal can call directly instead of indirecting through the iommu attr API. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- arch/powerpc/include/asm/fsl_pamu_stash.h | 12 +++- drivers/iommu/fsl_pamu_domain.c | 16

[PATCH 06/18] iommu/fsl_pamu: remove ->domain_window_enable

2021-03-16 Thread Christoph Hellwig
The only thing that fsl_pamu_window_enable does for the current caller is to fill in the prot value in the only dma_window structure, and to propagate a few values from the iommu_domain_geometry struture into the dma_window. Remove the dma_window entirely, hardcode the prot value and otherwise

[PATCH 05/18] iommu/fsl_pamu: remove support for multiple windows

2021-03-16 Thread Christoph Hellwig
The only domains allocated forces use of a single window. Remove all the code related to multiple window support, as well as the need for qman_portal to force a single window. Remove the now unused DOMAIN_ATTR_WINDOWS iommu_attr. Signed-off-by: Christoph Hellwig Acked-by: Li Yang ---

[PATCH 04/18] iommu/fsl_pamu: merge iommu_alloc_dma_domain into fsl_pamu_domain_alloc

2021-03-16 Thread Christoph Hellwig
Keep the functionality to allocate the domain together. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 34 ++--- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c

[PATCH 03/18] iommu/fsl_pamu: remove support for setting DOMAIN_ATTR_GEOMETRY

2021-03-16 Thread Christoph Hellwig
The default geometry is the same as the one set by qman_port given that FSL_PAMU depends on having 64-bit physical and thus DMA addresses. Remove the support to update the geometry and remove the now pointless geom_size field. Signed-off-by: Christoph Hellwig Acked-by: Li Yang ---

[PATCH 02/18] iommu/fsl_pamu: remove fsl_pamu_get_domain_attr

2021-03-16 Thread Christoph Hellwig
None of the values returned by this function are ever queried. Also remove the DOMAIN_ATTR_FSL_PAMUV1 enum value that is not otherwise used. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 30 -- include/linux/iommu.h

Re: [PATCH RESEND] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Christophe Leroy
Le 16/03/2021 à 16:29, Kefeng Wang a écrit : mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, so using void argument and move it into mm_init(). Signed-off-by: Kefeng Wang --- Resend with 'str' line cleanup, and only test on ARM64 qemu.

[PATCH 01/18] iommu: remove the unused domain_window_disable method

2021-03-16 Thread Christoph Hellwig
domain_window_disable is wired up by fsl_pamu, but never actually called. Signed-off-by: Christoph Hellwig Acked-by: Li Yang --- drivers/iommu/fsl_pamu_domain.c | 48 - include/linux/iommu.h | 2 -- 2 files changed, 50 deletions(-) diff --git

cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver v2

2021-03-16 Thread Christoph Hellwig
Hi all, there are a bunch of IOMMU APIs that are entirely unused, or only used as a private communication channel between the FSL PAMU driver and it's only consumer, the qbman portal driver. So this series drops a huge chunk of entirely unused FSL PAMU functionality, then drops all kinds of

[PATCH RESEND] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Kefeng Wang
mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, so using void argument and move it into mm_init(). Signed-off-by: Kefeng Wang --- Resend with 'str' line cleanup, and only test on ARM64 qemu. arch/alpha/mm/init.c | 1 - arch/arc/mm/init.c

Re: [PATCH] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Kefeng Wang
On 2021/3/16 22:47, Christophe Leroy wrote: Le 16/03/2021 à 15:26, Kefeng Wang a écrit : mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, cleanup it by using void argument and move it into mm_init(). Signed-off-by: Kefeng Wang ---  

Re: [PATCH] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Christophe Leroy
Le 16/03/2021 à 15:26, Kefeng Wang a écrit : mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, cleanup it by using void argument and move it into mm_init(). Signed-off-by: Kefeng Wang --- arch/alpha/mm/init.c | 1 - arch/arc/mm/init.c

[PATCH] mm: Move mem_init_print_info() into mm_init()

2021-03-16 Thread Kefeng Wang
mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, cleanup it by using void argument and move it into mm_init(). Signed-off-by: Kefeng Wang --- arch/alpha/mm/init.c | 1 - arch/arc/mm/init.c | 1 - arch/arm/mm/init.c

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-16 Thread Robin Murphy
On 2021-03-15 08:33, Christoph Hellwig wrote: On Fri, Mar 12, 2021 at 04:18:24PM +, Robin Murphy wrote: Let me know what you think of the version here: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/iommu-cleanup I'll happily switch the patch to you as the author if

Re: [PATCH] powerpc/numa: Fix topology_physical_package_id() on pSeries

2021-03-16 Thread Cédric Le Goater
On 3/16/21 12:28 PM, Srikar Dronamraju wrote: > * C?dric Le Goater [2021-03-12 15:31:54]: > >> Initial commit 15863ff3b8da ("powerpc: Make chip-id information >> available to userspace") introduce a cpu_to_chip_id() routine for the >> PowerNV platform using the "ibm,chip-id" property to query

[PATCH] powerpc/numa: Fix topology_physical_package_id() on pSeries

2021-03-16 Thread Cédric Le Goater
The topology-id of a CPU in a pSeries machine can be queried from sysfs but under PowerVM the value is always -1 even if NUMA nodes are defined. This is because the topology_physical_package_id() routine is using the "ibm,chip-id" property which is not specified in PAPR. Under QEMU/KVM, things

Re: [PATCH] powerpc/numa: Fix topology_physical_package_id() on pSeries

2021-03-16 Thread Srikar Dronamraju
* C?dric Le Goater [2021-03-12 15:31:54]: > Initial commit 15863ff3b8da ("powerpc: Make chip-id information > available to userspace") introduce a cpu_to_chip_id() routine for the > PowerNV platform using the "ibm,chip-id" property to query the chip id > of a CPU. But PAPR does not specify such

[PATCH] powerpc/64s: Fix hash fault to use TRAP accessor

2021-03-16 Thread Nicholas Piggin
Hash faults use the trap vector to decide whether this is an instruction or data fault. This should use the TRAP accessor rather than open access regs->trap. This won't cause a problem at the moment because 64s only uses trap flags for system call interrupts (the norestart flag), but that could

Re: [PATCH v2 04/11] powerpc/64e/interrupt: use new interrupt return

2021-03-16 Thread Christophe Leroy
Le 16/03/2021 à 11:41, Nicholas Piggin a écrit : Update the new C and asm interrupt return code to account for 64e specifics, switch over to use it. The now-unused old ret_from_except code, that was moved to 64e after the 64s conversion, is removed. Signed-off-by: Nicholas Piggin ---

[PATCH v2 11/11] powerpc: move norestart trap flag to bit 0

2021-03-16 Thread Nicholas Piggin
Compact the trap flags down to use the low 4 bits of regs.trap. A few 64e interrupt trap numbers set bit 4. Although they tended to be trivial so it wasn't a real problem[1], it is not the right thing to do, and confusing. [*] E.g., 0x310 hypercall goes to unknown_exception, which prints

[PATCH v2 10/11] powerpc: remove partial register save logic

2021-03-16 Thread Nicholas Piggin
All subarchitectures always save all GPRs to pt_regs interrupt frames now. Remove FULL_REGS and associated bits. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h| 17 ++--- arch/powerpc/kernel/align.c | 6 --

[PATCH v2 09/11] powerpc: clean up do_page_fault

2021-03-16 Thread Nicholas Piggin
search_exception_tables + __bad_page_fault can be substituted with bad_page_fault, do_page_fault no longer needs to return a value to asm for any sub-architecture, and __bad_page_fault can be static. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/bug.h| 5 +

[PATCH v2 08/11] powerpc/64e/interrupt: handle bad_page_fault in C

2021-03-16 Thread Nicholas Piggin
With non-volatile registers saved on interrupt, bad_page_fault can now be called by do_page_fault. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64e.S | 6 -- arch/powerpc/mm/fault.c | 5 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git

[PATCH v2 07/11] powerpc/64e/interrupt: Use new interrupt context tracking scheme

2021-03-16 Thread Nicholas Piggin
With the new interrupt exit code, context tracking can be managed more precisely, so remove the last of the 64e workarounds and switch to the new context tracking code already used by 64s. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 28

[PATCH v2 06/11] powerpc/64e/interrupt: reconcile irq soft-mask state in C

2021-03-16 Thread Nicholas Piggin
Use existing 64s interrupt entry wrapper code to reconcile irqs in C. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 8 +++--- arch/powerpc/kernel/entry_64.S | 18 ++--- arch/powerpc/kernel/exceptions-64e.S | 39 +--- 3 files

[PATCH v2 05/11] powerpc/64e/interrupt: NMI save irq soft-mask state in C

2021-03-16 Thread Nicholas Piggin
64e non-maskable interrupts save the state of the irq soft-mask in asm. This can be done in C in interrupt wrappers as 64s does. Signed-off-by: Nicholas Piggin I haven't been able to test this with qemu because it doesn't seem to cause FSL bookE WDT interrupts. This makes WatchdogException an

[PATCH v2 04/11] powerpc/64e/interrupt: use new interrupt return

2021-03-16 Thread Nicholas Piggin
Update the new C and asm interrupt return code to account for 64e specifics, switch over to use it. The now-unused old ret_from_except code, that was moved to 64e after the 64s conversion, is removed. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/asm-prototypes.h | 2 -

[PATCH v2 03/11] powerpc/interrupt: update common interrupt code for

2021-03-16 Thread Nicholas Piggin
This makes adjustments to 64-bit asm and common C interrupt return code to be usable by the 64e subarchitecture. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/entry_64.S | 9 +++-- arch/powerpc/kernel/interrupt.c | 35 - 2 files changed, 28

[PATCH v2 02/11] powerpc/64e/interrupt: always save nvgprs on interrupt

2021-03-16 Thread Nicholas Piggin
In order to use the C interrupt return, nvgprs must always be saved. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h| 9 + arch/powerpc/kernel/entry_64.S | 13 - arch/powerpc/kernel/exceptions-64e.S | 27 +++ 3 files

[PATCH v2 01/11] powerpc/syscall: switch user_exit_irqoff and trace_hardirqs_off order

2021-03-16 Thread Nicholas Piggin
user_exit_irqoff() -> __context_tracking_exit -> vtime_user_exit warns in __seqprop_assert due to lockdep thinking preemption is enabled because trace_hardirqs_off() has not yet been called. Switch the order of these two calls, which matches their ordering in interrupt_enter_prepare. Fixes:

[PATCH v2 00/11] Move 64e to new interrupt return code

2021-03-16 Thread Nicholas Piggin
Since RFC: - Rebased on Christophe's v3 ppc32 conversion - Fixed up small details, adds some powerpc-wide cleanups at the end. Since v1: - Christophe's review comments accounted for: - Split common code interrupt changes for 64e from 64e conversion. - Removed unnecessary ifdef additions from

RE: [PATCH] powerpc/vdso32: Add missing _restgpr_31_x to fix build failure

2021-03-16 Thread David Laight
From: Segher Boessenkool > Sent: 16 March 2021 00:00 ... > > Although you may need to disable loop unrolling (often dubious at best) > > and either force or disable some function inlining. > > The cases where GCC does loop unrolling at -O2 always help quite a lot. > Or, do you have a

Re: [PATCH 03/10] powerpc/64e/interrupt: use new interrupt return

2021-03-16 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of March 16, 2021 5:29 pm: > > > Le 16/03/2021 à 08:25, Nicholas Piggin a écrit : >> Excerpts from Nicholas Piggin's message of March 16, 2021 5:04 pm: >>> Excerpts from Christophe Leroy's message of March 15, 2021 11:30 pm: Le 15/03/2021 à

Re: [PATCH 12/14] powerpc/64s: system call avoid setting MSR[RI] until we set MSR[EE]

2021-03-16 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of March 16, 2021 5:21 pm: > > > Le 15/03/2021 à 23:04, Nicholas Piggin a écrit : >> This extends the MSR[RI]=0 window a little further into the system >> call in order to pair RI and EE enabling with a single mtmsrd. > > Time ago, I proposed to delay

Re: [PATCH] powerpc/64s: power4 nap fixup in C

2021-03-16 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of March 16, 2021 5:16 pm: > > > Le 12/03/2021 à 02:20, Nicholas Piggin a écrit : >> There is no need for this to be in asm, use the new intrrupt entry wrapper. >> >> Signed-off-by: Nicholas Piggin >> --- >> Hopefully this works on a real G5 now, but I

[PATCH v1 4/4] powerpc: Fix arch_stack_walk() to have running function as first entry

2021-03-16 Thread Christophe Leroy
It seems like other architectures, namely x86 and arm64 and riscv at least, include the running function as top entry when saving stack trace with save_stack_trace_regs(). Functionnalities like KFENCE expect it. Do the same on powerpc, it allows KFENCE and other users to properly identify the

[PATCH v1 2/4] powerpc: Rename 'tsk' parameter into 'task'

2021-03-16 Thread Christophe Leroy
To better match generic code, rename 'tsk' to 'task' in some stacktrace functions in preparation of following patch which converts powerpc to generic ARCH_STACKWALK. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/stacktrace.c | 16 1 file changed, 8 insertions(+), 8

[PATCH v1 3/4] powerpc: Convert stacktrace to generic ARCH_STACKWALK

2021-03-16 Thread Christophe Leroy
This patch converts powerpc stacktrace to the generic ARCH_STACKWALK implemented by commit 214d8ca6ee85 ("stacktrace: Provide common infrastructure") Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/stacktrace.c | 91

[PATCH v1 1/4] powerpc: Activate HAVE_RELIABLE_STACKTRACE for all

2021-03-16 Thread Christophe Leroy
CONFIG_HAVE_RELIABLE_STACKTRACE is applicable to all, no reason to limit it to book3s/64le Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 2 +- arch/powerpc/kernel/stacktrace.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/Kconfig

Re: [PATCH v3 28/32] powerpc/64s: interrupt implement exit logic in C

2021-03-16 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of March 15, 2021 11:41 pm: > > > Le 25/02/2020 à 18:35, Nicholas Piggin a écrit : >> Implement the bulk of interrupt return logic in C. The asm return code >> must handle a few cases: restoring full GPRs, and emulating stack store. >> >> The stack store

[PATCH] selftests: remove duplicate include

2021-03-16 Thread menglong8 . dong
From: Zhang Yunkai 'assert.h' included in 'sparsebit.c' is duplicated. It is also included in the 161th line. 'string.h' included in 'mincore_selftest.c' is duplicated. It is also included in the 15th line. 'sched.h' included in 'tlbie_test.c' is duplicated. It is also included in the 33th line.

Re: [PATCH 03/10] powerpc/64e/interrupt: use new interrupt return

2021-03-16 Thread Christophe Leroy
Le 16/03/2021 à 08:25, Nicholas Piggin a écrit : Excerpts from Nicholas Piggin's message of March 16, 2021 5:04 pm: Excerpts from Christophe Leroy's message of March 15, 2021 11:30 pm: Le 15/03/2021 à 04:17, Nicholas Piggin a écrit : Update the new C and asm interrupt return code to

Re: [PATCH 03/10] powerpc/64e/interrupt: use new interrupt return

2021-03-16 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of March 16, 2021 5:04 pm: > Excerpts from Christophe Leroy's message of March 15, 2021 11:30 pm: >> >> >> Le 15/03/2021 à 04:17, Nicholas Piggin a écrit : >>> Update the new C and asm interrupt return code to account for 64e >>> specifics, switch over to

Re: [PATCH v9 7/8] powerpc/mm: implement set_memory_attr()

2021-03-16 Thread Christophe Leroy
Le 16/03/2021 à 04:17, Jordan Niethe a écrit : From: Christophe Leroy Can you please update the whole series with my new email address: christophe.le...@csgroup.eu In addition to the set_memory_xx() functions which allows to change the memory attributes of not (yet) used memory

Re: [PATCH] scsi: ibmvfc: Switch to using the new API kobj_to_dev()

2021-03-16 Thread Martin K. Petersen
On Mon, 22 Feb 2021 14:47:09 +0800, Yang Li wrote: > fixed the following coccicheck: > ./drivers/scsi/ibmvscsi/ibmvfc.c:3161:60-61: WARNING opportunity for > kobj_to_dev() Applied to 5.13/scsi-queue, thanks! [1/1] scsi: ibmvfc: Switch to using the new API kobj_to_dev()

Re: [PATCH 12/14] powerpc/64s: system call avoid setting MSR[RI] until we set MSR[EE]

2021-03-16 Thread Christophe Leroy
Le 15/03/2021 à 23:04, Nicholas Piggin a écrit : This extends the MSR[RI]=0 window a little further into the system call in order to pair RI and EE enabling with a single mtmsrd. Time ago, I proposed to delay that on PPC32 and Michael objected, see

Re: [PATCH] powerpc/64s: power4 nap fixup in C

2021-03-16 Thread Christophe Leroy
Le 12/03/2021 à 02:20, Nicholas Piggin a écrit : There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- Hopefully this works on a real G5 now, but I couldn't reproduce the problem with QEMU. Thanks, Nick

Re: [PATCH 10/10] powerpc: move norestart trap flag to bit 0

2021-03-16 Thread Christophe Leroy
Le 16/03/2021 à 08:11, Nicholas Piggin a écrit : Excerpts from Christophe Leroy's message of March 15, 2021 6:14 pm: Le 15/03/2021 à 04:17, Nicholas Piggin a écrit : Compact the trap flags down to use the low 4 bits of regs.trap. A few 64e interrupt trap numbers set bit 4. Although they

Re: [PATCH 10/10] powerpc: move norestart trap flag to bit 0

2021-03-16 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of March 15, 2021 6:14 pm: > > > Le 15/03/2021 à 04:17, Nicholas Piggin a écrit : >> Compact the trap flags down to use the low 4 bits of regs.trap. >> >> A few 64e interrupt trap numbers set bit 4. Although they tended to be >> trivial so it wasn't a

Re: [PATCH 07/10] powerpc/64e/interrupt: handle bad_page_fault in C

2021-03-16 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of March 16, 2021 12:07 am: > > > Le 15/03/2021 à 04:17, Nicholas Piggin a écrit : >> With non-volatile registers saved on interrupt, bad_page_fault >> can now be called by do_page_fault. >> >> Signed-off-by: Nicholas Piggin >> --- >>

  1   2   >