[PATCH 3/6] usb: add a HCD_DMA flag instead of guestimating DMA capabilities

2019-08-11 Thread Christoph Hellwig
The usb core is the only major place in the kernel that checks for a non-NULL device dma_mask to see if a device is DMA capable. This is generally a bad idea, as all major busses always set up a DMA mask, even if the device is not DMA capable - in fact bus layers like PCI can't even know if a devi

[PATCH 1/6] usb: don't create dma pools for HCDs with a localmem_pool

2019-08-11 Thread Christoph Hellwig
If the HCD provides a localmem pool we will never use the DMA pools, so don't create them. Fixes: b0310c2f09bb ("USB: use genalloc for USB HCs with local memory") Signed-off-by: Christoph Hellwig --- drivers/usb/core/buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --gi

[PATCH 6/6] driver core: initialize a default DMA mask for platform device

2019-08-11 Thread Christoph Hellwig
We still treat devices without a DMA mask as defaulting to 32-bits for both mask, but a few releases ago we've started warning about such cases, as they require special cases to work around this sloppyness. Add a dma_mask field to struct platform_object so that we can initialize the dma_mask pointe

[PATCH 5/6] dma-mapping: remove is_device_dma_capable

2019-08-11 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/dma-mapping.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index f7d1eea32c78..14702e2d6fa8 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapp

next take at setting up a dma mask by default for platform devices

2019-08-11 Thread Christoph Hellwig
Hi all, this is another attempt to make sure the dma_mask pointer is always initialized for platform devices. Not doing so lead to lots of boilerplate code, and makes platform devices different from all our major busses like PCI where we always set up a dma_mask. In the long run this should also

[PATCH 4/6] usb/max3421: remove the dummy {un, }map_urb_for_dma methods

2019-08-11 Thread Christoph Hellwig
Now that we have an explicit HCD_DMA flag, there is not need to override these methods. Signed-off-by: Christoph Hellwig --- drivers/usb/host/max3421-hcd.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index

[PATCH 2/6] usb: add a hcd_uses_dma helper

2019-08-11 Thread Christoph Hellwig
The USB buffer allocation code is the only place in the usb core (and in fact the whole kernel) that uses is_device_dma_capable, while the URB mapping code uses the uses_dma flag in struct usb_bus. Switch the buffer allocation to use the uses_dma flag used by the rest of the USB code, and create a

[Bug 204371] BUG kmalloc-4k (Tainted: G W ): Object padding overwritten

2019-08-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204371 --- Comment #12 from Erhard F. (erhar...@mailbox.org) --- On Fri, 09 Aug 2019 12:31:26 + bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=204371 > Tried a few LTS kernels on the G4 DP. Looks like 4.19

[Bug 204371] BUG kmalloc-4k (Tainted: G W ): Object padding overwritten

2019-08-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204371 --- Comment #13 from Erhard F. (erhar...@mailbox.org) --- On Fri, 09 Aug 2019 12:31:26 + bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=204371 > [...] [ 22.809365] =

[PATCH] dmaengine: fsldma: Mark expected switch fall-through

2019-08-11 Thread Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through. Fix the following warning (Building: powerpc-ppa8548_defconfig powerpc): drivers/dma/fsldma.c: In function ‘fsl_dma_chan_probe’: drivers/dma/fsldma.c:1165:26: warning: this statement may fall through [-Wimplicit-fallthrough=] chan->tog

Re: [PATCH 1/2] powerpc: Allow flush_icache_range to work across ranges >4GB

2019-08-11 Thread Alastair D'Silva
On Fri, 2019-08-09 at 10:59 +0200, Christophe Leroy wrote: > > Le 09/08/2019 à 02:45, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > When calling flush_icache_range with a size >4GB, we were masking > > off the upper 32 bits, so we would incorrectly flush a range > > smaller > > t

Re: [PATCH v3 1/3] powerpc/spinlocks: Refactor SHARED_PROCESSOR

2019-08-11 Thread kbuild test robot
Hi "Christopher, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc4 next-20190809] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commi

[PATCH] powerpc: Avoid clang warnings around setjmp and longjmp

2019-08-11 Thread Nathan Chancellor
Commit aea447141c7e ("powerpc: Disable -Wbuiltin-requires-header when setjmp is used") disabled -Wbuiltin-requires-header because of a warning about the setjmp and longjmp declarations. r367387 in clang added another diagnostic around this, complaining that there is no jmp_buf declaration. In fil

[PATCH 1/2] KVM: PPC: Book3S HV: Fix race in re-enabling XIVE escalation interrupts

2019-08-11 Thread Paul Mackerras
Escalation interrupts are interrupts sent to the host by the XIVE hardware when it has an interrupt to deliver to a guest VCPU but that VCPU is not running anywhere in the system. Hence we disable the escalation interrupt for the VCPU being run when we enter the guest and re-enable it when the gue

[PATCH 2/2] powerpc/xive: Implement get_irqchip_state method for XIVE to fix shutdown race

2019-08-11 Thread Paul Mackerras
Testing has revealed the existence of a race condition where a XIVE interrupt being shut down can be in one of the XIVE interrupt queues (of which there are up to 8 per CPU, one for each priority) at the point where free_irq() is called. If this happens, can return an interrupt number which has be

[PATCH 0/2] powerpc/xive: Fix race condition leading to host crashes and hangs

2019-08-11 Thread Paul Mackerras
This series fixes a race condition that has been observed in testing on POWER9 machines running KVM guests. An interrupt being freed by free_irq() can have an instance present in a XIVE interrupt queue, which can then be presented to the generic interrupt code after the data structures for it have

Re: [PATCH] powerpc: Avoid clang warnings around setjmp and longjmp

2019-08-11 Thread Christophe Leroy
Le 12/08/2019 à 04:32, Nathan Chancellor a écrit : Commit aea447141c7e ("powerpc: Disable -Wbuiltin-requires-header when setjmp is used") disabled -Wbuiltin-requires-header because of a warning about the setjmp and longjmp declarations. r367387 in clang added another diagnostic around this, c

Re: [PATCH 1/2] powerpc: Allow flush_icache_range to work across ranges >4GB

2019-08-11 Thread Christophe Leroy
Le 12/08/2019 à 03:19, Alastair D'Silva a écrit : On Fri, 2019-08-09 at 10:59 +0200, Christophe Leroy wrote: Le 09/08/2019 à 02:45, Alastair D'Silva a écrit : From: Alastair D'Silva When calling flush_icache_range with a size >4GB, we were masking off the upper 32 bits, so we would incorr

Re: [PATCH v4 03/25] powerpc/fadump: Improve fadump documentation

2019-08-11 Thread Mahesh Jagannath Salgaonkar
On 7/16/19 5:02 PM, Hari Bathini wrote: > The figures depicting FADump's (Firmware-Assisted Dump) memory layout > are missing some finer details like different memory regions and what > they represent. Improve the documentation by updating those details. > > Signed-off-by: Hari Bathini > --- > D