Re: [PATCH v3 0/5] powerpc: apm82181: adding customer devices

2021-07-23 Thread Christian Lamparter
Hi Andy! On 23/07/2021 21:19, Andy Shevchenko wrote: On Sun, Sep 06, 2020 at 12:06:10AM +0200, Christian Lamparter wrote: I've been holding on to these devices dts' for a while now. But ever since the recent purge of the PPC405, I'm feeling the urge to move forward. The devices in question

[PATCH v4 02/10] net/ps3_gelic: Use local dev variable

2021-07-23 Thread Geoff Levand
In an effort to make the PS3 gelic driver easier to maintain, add a local variable dev to those routines that use the device structure that makes the use the device structure more consistent. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 340 +++

[PATCH v4 09/10] net/ps3_gelic: Add new routine gelic_work_to_card

2021-07-23 Thread Geoff Levand
Add new helper routine gelic_work_to_card that converts a work_struct to a gelic_card. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c

[PATCH v4 08/10] net/ps3_gelic: Rename no to descr_count

2021-07-23 Thread Geoff Levand
In an effort to make the PS3 gelic driver easier to maintain, rename the gelic_card_init_chain parameter 'no' to 'descr_count'. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH v4 07/10] net/ps3_gelic: Add new routine gelic_unmap_link

2021-07-23 Thread Geoff Levand
Put the common code for unmaping a link into its own routine, gelic_unmap_link, and add some debugging checks. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 23 +++- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git

[PATCH v4 03/10] net/ps3_gelic: Format cleanups

2021-07-23 Thread Geoff Levand
In an effort to make the PS3 gelic driver easier to maintain, cleanup the the driver source file formatting to be more consistent. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 379 ++- 1 file changed, 193 insertions(+), 186 deletions(-) diff

[PATCH v4 10/10] net/ps3_gelic: Fix DMA mapping problems

2021-07-23 Thread Geoff Levand
Fixes several DMA mapping problems with the PS3's gelic network driver: * Change from checking the return value of dma_map_single to using the dma_mapping_error routine. * Use the correct buffer length when mapping the RX skb. * Improved error checking and debug logging. Fixes runtime

[PATCH v4 01/10] net/ps3_gelic: Add gelic_descr structures

2021-07-23 Thread Geoff Levand
In an effort to make the PS3 gelic driver easier to maintain, create two new structures, struct gelic_hw_regs and struct gelic_chain_link, and replace the corresponding members of struct gelic_descr with the new structures. struct gelic_hw_regs holds the register variables used by the gelic

[PATCH v4 04/10] net/ps3_gelic: Add new macro BUG_ON_DEBUG

2021-07-23 Thread Geoff Levand
Add a new preprocessor macro BUG_ON_DEBUG, that expands to BUG_ON when the preprocessor macro DEBUG is defined, or to WARN_ON when DEBUG is not defined. Also, replace all occurrences of BUG_ON with BUG_ON_DEBUG. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 13

[PATCH v4 00/10] DMA fixes for PS3 gelic network driver

2021-07-23 Thread Geoff Levand
Hi Dave, Jakub, This set of patches fixes various DMA related problems in the PS3 gelic network driver and adds better error checking and improved message logging. Please consider. Changes from v3: Rebase to latest net-next. Split 2 patches into 10 patches. Fix checkpatch error. Changes

[PATCH v4 06/10] net/ps3_gelic: Cleanup debug code

2021-07-23 Thread Geoff Levand
In an effort to make the PS3 gelic driver easier to maintain, change the gelic_card_enable_rxdmac routine to use the optimizer to remove debug code. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 19 +-- 1 file changed, 9 insertions(+), 10

[PATCH v4 05/10] net/ps3_gelic: Add vlan_id structure

2021-07-23 Thread Geoff Levand
In an effort to make the PS3 gelic driver easier to maintain, add a definition for the vlan_id structure. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[Bug 213837] "Kernel panic - not syncing: corrupted stack end detected inside scheduler" at building via distcc on a G5

2021-07-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213837 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 298019 --> https://bugzilla.kernel.org/attachment.cgi?id=298019=edit kernel .config (5.13.4, PowerMac G5 11,2) -- You may reply to this email to add a comment. You

[Bug 213837] New: "Kernel panic - not syncing: corrupted stack end detected inside scheduler" at building via distcc on a G5

2021-07-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213837 Bug ID: 213837 Summary: "Kernel panic - not syncing: corrupted stack end detected inside scheduler" at building via distcc on a G5 Product: Memory Management

Re: [PATCH v3 0/5] powerpc: apm82181: adding customer devices

2021-07-23 Thread Andy Shevchenko
On Sun, Sep 06, 2020 at 12:06:10AM +0200, Christian Lamparter wrote: > Hello, > > I've been holding on to these devices dts' for a while now. > But ever since the recent purge of the PPC405, I'm feeling > the urge to move forward. > > The devices in question have been running with OpenWrt since

[PATCH v2 05/21] alpha: return error code from alpha_pci_map_sg()

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. pci_map_single_1() can fail for different reasons, but since the only supported type of error return is DMA_MAPPING_ERROR, we coalesce those errors into EIO. ENOMEM is returned when no page tables can

[PATCH v2 07/21] ARM/dma-mapping: don't set failed sg dma_address to DMA_MAPPING_ERROR

2021-07-23 Thread Logan Gunthorpe
Setting the ->dma_address to DMA_MAPPING_ERROR is not part of the ->map_sg calling convention, so remove it. Link: https://lore.kernel.org/linux-mips/20210716063241.gc13...@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Cc: Russell King Cc: Thomas Bogendoerfer ---

[PATCH v2 06/21] ARM/dma-mapping: return error code from .map_sg() ops

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. In the case of a DMA_MAPPING_ERROR, -EIO is returned. Otherwise, -ENOMEM or -EINVAL is returned depending on the error from __map_sg_chunk(). Signed-off-by: Martin Oliveira Signed-off-by: Logan

[PATCH v2 08/21] ia64/sba_iommu: return error code from sba_map_sg_attrs()

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. In the case of a dma_mapping_error() return -EIO as the actual cause is opaque here. sba_coalesce_chunks() may only presently fail if sba_alloc_range() fails, which in turn only fails if the iommu is

[PATCH v2 11/21] powerpc/iommu: don't set failed sg dma_address to DMA_MAPPING_ERROR

2021-07-23 Thread Logan Gunthorpe
Setting the ->dma_address to DMA_MAPPING_ERROR is not part of the ->map_sg calling convention, so remove it. Link: https://lore.kernel.org/linux-mips/20210716063241.gc13...@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Cc: Michael Ellerman Cc: Benjamin Herrenschmidt

[PATCH v2 10/21] powerpc/iommu: return error code from .map_sg() ops

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. Propagate the error up if vio_dma_iommu_map_sg() fails. ppc_iommu_map_sg() may fail either because of iommu_range_alloc() or because of tbl->it_ops->set(). The former only supports returning an error

[PATCH v2 09/21] MIPS/jazzdma: return error code from jazz_dma_map_sg()

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. vdma_alloc() may fail for different reasons, but since it only supports indicating an error via a return of DMA_MAPPING_ERROR, we coalesce the different reasons into -EIO as is documented on

[PATCH v2 03/21] iommu: Return full error code from iommu_map_sg[_atomic]()

2021-07-23 Thread Logan Gunthorpe
Convert to ssize_t return code so the return code from __iommu_map() can be returned all the way down through dma_iommu_map_sg(). Signed-off-by: Logan Gunthorpe Cc: Joerg Roedel Cc: Will Deacon --- drivers/iommu/iommu.c | 15 +++ include/linux/iommu.h | 22 +++---

[PATCH v2 04/21] dma-iommu: Return error code from iommu_dma_map_sg()

2021-07-23 Thread Logan Gunthorpe
Return appropriate error codes EINVAL or ENOMEM from iommup_dma_map_sg(). If lower level code returns ENOMEM, then we return it, other errors are coalesced into EINVAL. iommu_dma_map_sg_swiotlb() returns -EIO as its an unknown error from a call that returns DMA_MAPPING_ERROR. Signed-off-by:

[PATCH v2 12/21] s390/pci: return error code from s390_dma_map_sg()

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. So propagate the error from __s390_dma_map_sg() up. __s390_dma_map_sg() returns either -ENOMEM on allocation failure or -EINVAL which is the same as what's expected by dma_map_sgtable(). Signed-off-by:

[PATCH v2 13/21] s390/pci: don't set failed sg dma_address to DMA_MAPPING_ERROR

2021-07-23 Thread Logan Gunthorpe
Setting the ->dma_address to DMA_MAPPING_ERROR is not part of the ->map_sg calling convention, so remove it. Link: https://lore.kernel.org/linux-mips/20210716063241.gc13...@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Cc: Niklas Schnelle Cc: Gerald Schaefer Cc: Heiko

[PATCH v2 15/21] sparc/iommu: don't set failed sg dma_address to DMA_MAPPING_ERROR

2021-07-23 Thread Logan Gunthorpe
Setting the ->dma_address to DMA_MAPPING_ERROR is not part of the ->map_sg calling convention, so remove it. Link: https://lore.kernel.org/linux-mips/20210716063241.gc13...@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Cc: "David S. Miller" Cc: Niklas Schnelle Cc:

[PATCH v2 14/21] sparc/iommu: return error codes from .map_sg() ops

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. Returning an errno from __sbus_iommu_map_sg() results in sbus_iommu_map_sg_gflush() and sbus_iommu_map_sg_pflush() returning an errno, as those functions are wrappers around __sbus_iommu_map_sg().

[PATCH v2 16/21] parisc: return error code from .map_sg() ops

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. Return -EINVAL if the ioc cannot be obtained. Signed-off-by: Martin Oliveira Signed-off-by: Logan Gunthorpe Cc: "James E.J. Bottomley" Cc: Helge Deller --- drivers/parisc/ccio-dma.c | 2 +-

[PATCH v2 18/21] x86/amd_gart: return error code from gart_map_sg()

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. So make __dma_map_cont() return a valid errno (which is then propagated to gart_map_sg() via dma_map_cont()) and return it in case of failure. Also, return -EINVAL in case of invalid nents.

[PATCH v2 19/21] x86/amd_gart: don't set failed sg dma_address to DMA_MAPPING_ERROR

2021-07-23 Thread Logan Gunthorpe
Setting the ->dma_address to DMA_MAPPING_ERROR is not part of the ->map_sg calling convention, so remove it. Link: https://lore.kernel.org/linux-mips/20210716063241.gc13...@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav

[PATCH v2 17/21] xen: swiotlb: return error code from xen_swiotlb_map_sg()

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. xen_swiotlb_map_sg() may only fail if xen_swiotlb_map_page() fails, but xen_swiotlb_map_page() only supports returning errors as DMA_MAPPING_ERROR. So coalesce all errors into EIO per the documentation

[PATCH v2 01/21] dma-mapping: Allow map_sg() ops to return negative error codes

2021-07-23 Thread Logan Gunthorpe
Allow dma_map_sgtable() to pass errors from the map_sg() ops. This will be required for returning appropriate error codes when mapping P2PDMA memory. Introduce __dma_map_sg_attrs() which will return the raw error code from the map_sg operation (whether it be negative or zero). Then add a

[PATCH v2 21/21] dma-mapping: Disallow .map_sg operations from returning zero on error

2021-07-23 Thread Logan Gunthorpe
Now that all the .map_sg operations have been converted to returning proper error codes, drop the code to handle a zero return value, add a warning if a zero is returned and update the comment for the map_sg operation. Signed-off-by: Logan Gunthorpe --- kernel/dma/mapping.c | 7 --- 1 file

[PATCH v2 02/21] dma-direct: Return appropriate error code from dma_direct_map_sg()

2021-07-23 Thread Logan Gunthorpe
Now that the map_sg() op expects error codes instead of return zero on error, convert dma_direct_map_sg() to return an error code. Per the documentation for dma_map_sgtable(), -EIO is returned due to an DMA_MAPPING_ERROR with unknown cause. Signed-off-by: Logan Gunthorpe --- kernel/dma/direct.c

[PATCH v2 00/21] .map_sg() error cleanup

2021-07-23 Thread Logan Gunthorpe
Hi, This v2 of the series is spun out and expanded from my work to add P2PDMA support to DMA map operations[1]. v1 is at [2]. The main changes in v1 are to more carefully define the meaning of the error codes for dma_map_sgtable(). The P2PDMA work requires distinguishing different error

[PATCH v2 20/21] dma-mapping: return error code from dma_dummy_map_sg()

2021-07-23 Thread Logan Gunthorpe
From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. The only errno to return is -EINVAL in the case when DMA is not supported. Signed-off-by: Martin Oliveira Signed-off-by: Logan Gunthorpe --- kernel/dma/dummy.c | 2 +- 1 file changed, 1

Re: [PATCH v2 1/2] sched/topology: Skip updating masks for non-online nodes

2021-07-23 Thread Srikar Dronamraju
* Valentin Schneider [2021-07-13 17:32:14]: > On 12/07/21 18:18, Srikar Dronamraju wrote: > > Hi Valentin, > > > >> On 01/07/21 09:45, Srikar Dronamraju wrote: > >> > @@ -1891,12 +1894,30 @@ void sched_init_numa(void) > >> > void sched_domains_numa_masks_set(unsigned int cpu) > >> > { > > > >

Re: [PATCH v7 1/1] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-07-23 Thread Fabiano Rosas
"Pratik R. Sampat" writes: > Adds a generic interface to represent the energy and frequency related > PAPR attributes on the system using the new H_CALL > "H_GET_ENERGY_SCALE_INFO". > > H_GET_EM_PARMS H_CALL was previously responsible for exporting this > information in the lparcfg, however the

[Bug 213079] [bisected] IRQ problems and crashes on a PowerMac G5 with 5.12.3

2021-07-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213079 --- Comment #15 from Erhard F. (erhar...@mailbox.org) --- (In reply to Oliver O'Halloran from comment #13) > In the meanwhile, can you try the patch above? That seems to fix bug which > is causing MSIs to be unusable. I'm not 100% sure why that

Re: [PATCH v2] Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge"

2021-07-23 Thread Michael Ellerman
Will Deacon writes: > On Wed, 21 Jul 2021 17:02:13 +1000, Michael Ellerman wrote: >> This reverts commit c742199a014de23ee92055c2473d91fe5561ffdf. >> >> c742199a014d ("mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge") >> breaks arm64 in at least two ways for configurations where PUD or PMD

[Bug 205303] Compilation for PPC64 fails on warning in watchdog.o

2021-07-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205303 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|NEW |RESOLVED

[PATCH 2/8] hvsi: don't panic on tty_register_driver failure

2021-07-23 Thread Jiri Slaby
The alloc_tty_driver failure is handled gracefully in hvsi_init. But tty_register_driver is not. panic is called if that one fails. So handle the failure of tty_register_driver gracefully too. This will keep at least the console functional as it was enabled earlier by console_initcall in

Re: [PATCH 1/2] PCI/AER: Disable AER interrupt during suspend

2021-07-23 Thread Kai-Heng Feng
On Fri, Jul 23, 2021 at 1:24 PM Christoph Hellwig wrote: > > On Thu, Jul 22, 2021 at 05:23:51PM -0500, Bjorn Helgaas wrote: > > Marking both of these as "not applicable" for now because I don't > > think we really understand what's going on. > > > > Apparently a DMA occurs during suspend or

Re: [PATCH v7 1/1] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-07-23 Thread kajoljain
On 7/23/21 11:16 AM, Pratik R. Sampat wrote: > Adds a generic interface to represent the energy and frequency related > PAPR attributes on the system using the new H_CALL > "H_GET_ENERGY_SCALE_INFO". > > H_GET_EM_PARMS H_CALL was previously responsible for exporting this > information in the