Re: [PATCH] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Tue, Nov 19, 2019 at 05:17:03PM +, Robin Murphy wrote: > TBH I can't see it being a massive problem even if the DMA patch, driver > and DTS patch went entirely separately via the respective DMA, PCI, and > arm-soc trees in the same cycle. Bisecting over a merge window is a big > enough

Re: [PATCH v4 2/2] powerpc/irq: inline call_do_irq() and call_do_softirq()

2019-11-21 Thread Segher Boessenkool
On Thu, Nov 21, 2019 at 05:14:45PM +1100, Michael Ellerman wrote: > Christophe Leroy writes: > That breaks 64-bit with GCC9: > > arch/powerpc/kernel/irq.c: In function 'do_IRQ': > arch/powerpc/kernel/irq.c:650:2: error: PIC register clobbered by 'r2' in > 'asm' > 650 | asm volatile( >

Re: [PATCH v4 0/3] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-21 Thread Dave Young
On 11/11/19 at 01:31pm, Bhupesh Sharma wrote: > Changes since v3: > > - v3 can be seen here: > http://lists.infradead.org/pipermail/kexec/2019-March/022590.html > - Addressed comments from James and exported TCR_EL1.T1SZ in vmcoreinfo > instead of PTRS_PER_PGD. > - Added a new

Re: [Very RFC 06/46] powerpc/iov: Move VF pdev fixup into pcibios_fixup_iov()

2019-11-21 Thread Christoph Hellwig
On Wed, Nov 20, 2019 at 12:28:19PM +1100, Oliver O'Halloran wrote: > Move this out of the PHB's dma_dev_setup() callback and into the > ppc_md.pcibios_fixup_iov callback. This ensures that the VF PE's > pdev pointer is always valid for the whole time the device is > added the bus. > > This isn't

Re: [PATCH v7 05/24] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2019-11-21 Thread Christoph Hellwig
So while this looks correct and I still really don't see the major benefit of the new code organization, especially as it bloats all put_page callers. I'd love to see code size change stats for an allyesconfig on this commit.

Re: [PATCH v7 06/24] goldish_pipe: rename local pin_user_pages() routine

2019-11-21 Thread John Hubbard
On 11/21/19 12:08 AM, Christoph Hellwig wrote: On Wed, Nov 20, 2019 at 11:13:36PM -0800, John Hubbard wrote: +static int pin_goldfish_pages(unsigned long first_page, + unsigned long last_page, + unsigned int last_page_size, +

Re: [PATCH v7 17/24] mm/gup: track FOLL_PIN pages

2019-11-21 Thread Jan Kara
On Wed 20-11-19 23:13:47, John Hubbard wrote: > Add tracking of pages that were pinned via FOLL_PIN. > > As mentioned in the FOLL_PIN documentation, callers who effectively set > FOLL_PIN are required to ultimately free such pages via put_user_page(). > The effect is similar to FOLL_GET, and may

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christoph Hellwig
On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: > /* > * DMA addressing mode. > * > * 0 : 32 bit addressing for all chips. > * 1 : 40 bit addressing when supported by chip. > * 2 : 64 bit addressing when supported by chip, > * limited to 16 segments of 4 GB -> 64

Re: [PATCH v7 06/24] goldish_pipe: rename local pin_user_pages() routine

2019-11-21 Thread Christoph Hellwig
On Wed, Nov 20, 2019 at 11:13:36PM -0800, John Hubbard wrote: > +static int pin_goldfish_pages(unsigned long first_page, > + unsigned long last_page, > + unsigned int last_page_size, > + int is_write, > +

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread Jan Kara
On Thu 21-11-19 00:29:59, John Hubbard wrote: > > > > Otherwise this looks fine and might be a worthwhile cleanup to feed > > Andrew for 5.5 independent of the gut of the changes. > > > > Reviewed-by: Christoph Hellwig > > > > Thanks for the reviews! Say, it sounds like your view here is that

Re: [PATCH v2] tty: Fix Kconfig indentation

2019-11-21 Thread Greg Kroah-Hartman
On Thu, Nov 21, 2019 at 04:20:08AM +0100, Krzysztof Kozlowski wrote: > Adjust indentation from spaces to tab (+optional two spaces) as in > coding style with command like: > $ sed -e 's/^/\t/' -i */Kconfig > > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes since v1: > 1.

Re: generic DMA bypass flag

2019-11-21 Thread Christoph Hellwig
Robin, does this mean you ACK this series for the powerpc use case? Alexey and other ppc folks: can you take a look?

Re: [PATCH v7 04/24] mm: Cleanup __put_devmap_managed_page() vs ->page_free()

2019-11-21 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Nicolas Saenz Julienne
On Thu, 2019-11-21 at 08:31 +0100, Christoph Hellwig wrote: > On Tue, Nov 19, 2019 at 05:17:03PM +, Robin Murphy wrote: > > TBH I can't see it being a massive problem even if the DMA patch, driver > > and DTS patch went entirely separately via the respective DMA, PCI, and > > arm-soc trees

[PATCH v7 18/24] media/v4l2-core: pin_user_pages (FOLL_PIN) and put_user_page() conversion

2019-11-21 Thread John Hubbard
1. Change v4l2 from get_user_pages() to pin_user_pages(). 2. Because all FOLL_PIN-acquired pages must be released via put_user_page(), also convert the put_page() call over to put_user_pages_dirty_lock(). Acked-by: Hans Verkuil Cc: Ira Weiny Signed-off-by: John Hubbard ---

Re: [Very RFC 04/46] powernv/pci: Move dma_{dev|bus}_setup into pci-ioda.c

2019-11-21 Thread Christoph Hellwig
> +#ifdef CONFIG_PCI_IOV > + struct pnv_ioda_pe *pe; > + > + /* Fix the VF pdn PE number */ > + if (pdev->is_virtfn) { > + list_for_each_entry(pe, >ioda.pe_list, list) { > + if (pe->rid == ((pdev->bus->number << 8) | > +

Re: [PATCH v7 03/24] mm/gup: move try_get_compound_head() to top, fix minor issues

2019-11-21 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v7 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-21 Thread John Hubbard
On 11/21/19 12:10 AM, Christoph Hellwig wrote: Should this be two patches, one for th core infrastructure and one for the user? These changes also look like another candidate to pre-load. OK, I'll split them up. thanks, -- John Hubbard NVIDIA

[PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-21 Thread John Hubbard
And get rid of the mmap_sem calls, as part of that. Note that get_user_pages_fast() will, if necessary, fall back to __gup_longterm_unlocked(), which takes the mmap_sem as needed. Reviewed-by: Jan Kara Reviewed-by: Jason Gunthorpe Reviewed-by: Ira Weiny Signed-off-by: John Hubbard ---

Re: [PATCH v2] tty: Fix Kconfig indentation

2019-11-21 Thread Greg Kroah-Hartman
On Thu, Nov 21, 2019 at 03:22:27PM +0800, Krzysztof Kozlowski wrote: > On Thu, 21 Nov 2019 at 15:21, Greg Kroah-Hartman > wrote: > > > > On Thu, Nov 21, 2019 at 04:20:08AM +0100, Krzysztof Kozlowski wrote: > > > Adjust indentation from spaces to tab (+optional two spaces) as in > > > coding style

Re: [PATCH v7 01/24] mm/gup: pass flags arg to __gup_device_* functions

2019-11-21 Thread Christoph Hellwig
On Wed, Nov 20, 2019 at 11:13:31PM -0800, John Hubbard wrote: > A subsequent patch requires access to gup flags, so > pass the flags argument through to the __gup_device_* > functions. Looks fine, but why not fold this into the patch using the flags. Also you can use up your full 73 chars per

Re: [PATCH v7 01/24] mm/gup: pass flags arg to __gup_device_* functions

2019-11-21 Thread John Hubbard
On 11/21/19 12:06 AM, Christoph Hellwig wrote: On Wed, Nov 20, 2019 at 11:13:31PM -0800, John Hubbard wrote: A subsequent patch requires access to gup flags, so pass the flags argument through to the __gup_device_* functions. Looks fine, but why not fold this into the patch using the flags.

Re: [Y2038] [PATCH 3/8] powerpc: fix vdso32 for ppc64le

2019-11-21 Thread Arnd Bergmann
On Wed, Nov 20, 2019 at 10:49 PM Ben Hutchings wrote: > On Wed, 2019-11-20 at 20:35 +0100, Arnd Bergmann wrote: > > On Wed, Nov 20, 2019 at 8:13 PM Ben Hutchings > > wrote: > > > On Fri, 2019-11-08 at 21:34 +0100, Arnd Bergmann wrote: > > > > On little-endian 32-bit application running on 64-bit

[PATCH v7 12/24] IB/{core, hw, umem}: set FOLL_PIN via pin_user_pages*(), fix up ODP

2019-11-21 Thread John Hubbard
Convert infiniband to use the new pin_user_pages*() calls. Also, revert earlier changes to Infiniband ODP that had it using put_user_page(). ODP is "Case 3" in Documentation/core-api/pin_user_pages.rst, which is to say, normal get_user_pages() and put_page() is the API to use there. The new

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread Christoph Hellwig
On Wed, Nov 20, 2019 at 11:13:32PM -0800, John Hubbard wrote: > There are four locations in gup.c that have a fair amount of code > duplication. This means that changing one requires making the same > changes in four places, not to mention reading the same code four > times, and wondering if there

Re: [PATCH v7 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-21 Thread Christoph Hellwig
Should this be two patches, one for th core infrastructure and one for the user? These changes also look like another candidate to pre-load.

Re: [PATCH v7 08/24] media/v4l2-core: set pages dirty upon releasing DMA buffers

2019-11-21 Thread Christoph Hellwig
On Wed, Nov 20, 2019 at 11:13:38PM -0800, John Hubbard wrote: > After DMA is complete, and the device and CPU caches are synchronized, > it's still required to mark the CPU pages as dirty, if the data was > coming from the device. However, this driver was just issuing a > bare put_page() call,

Re: [PATCH v7 05/24] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2019-11-21 Thread John Hubbard
On 11/21/19 12:05 AM, Christoph Hellwig wrote: So while this looks correct and I still really don't see the major benefit of the new code organization, especially as it bloats all put_page callers. I'd love to see code size change stats for an allyesconfig on this commit. Right, I'm running

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread Jan Kara
On Thu 21-11-19 00:29:59, John Hubbard wrote: > On 11/21/19 12:03 AM, Christoph Hellwig wrote: > > Otherwise this looks fine and might be a worthwhile cleanup to feed > > Andrew for 5.5 independent of the gut of the changes. > > > > Reviewed-by: Christoph Hellwig > > > > Thanks for the

Re: [PATCH v2] tty: Fix Kconfig indentation

2019-11-21 Thread Krzysztof Kozlowski
On Thu, 21 Nov 2019 at 15:21, Greg Kroah-Hartman wrote: > > On Thu, Nov 21, 2019 at 04:20:08AM +0100, Krzysztof Kozlowski wrote: > > Adjust indentation from spaces to tab (+optional two spaces) as in > > coding style with command like: > > $ sed -e 's/^/\t/' -i */Kconfig > > > >

Re: [Very RFC 31/46] powernv/pci: Remove open-coded PE lookup in pnv_pci_ioda_dma_dev_setup()

2019-11-21 Thread Christoph Hellwig
On Wed, Nov 20, 2019 at 12:28:44PM +1100, Oliver O'Halloran wrote: > Use the helper to look up the pnv_ioda_pe for the device we're configuring DMA > for. In the VF case there's no need set pdn->pe_number since nothing looks at > it any more. > > Signed-off-by: Oliver O'Halloran > --- >

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-21 Thread Christoph Hellwig
On Wed, Nov 20, 2019 at 11:13:37PM -0800, John Hubbard wrote: > And get rid of the mmap_sem calls, as part of that. Note > that get_user_pages_fast() will, if necessary, fall back to > __gup_longterm_unlocked(), which takes the mmap_sem as needed. > > Reviewed-by: Jan Kara > Reviewed-by: Jason

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread John Hubbard
On 11/21/19 12:03 AM, Christoph Hellwig wrote: On Wed, Nov 20, 2019 at 11:13:32PM -0800, John Hubbard wrote: There are four locations in gup.c that have a fair amount of code duplication. This means that changing one requires making the same changes in four places, not to mention reading the

[PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Nicolas Saenz Julienne
Using a mask to represent bus DMA constraints has a set of limitations. The biggest one being it can only hold a power of two (minus one). The DMA mapping code is already aware of this and treats dev->bus_dma_mask as a limit. This quirk is already used by some architectures although still rare.

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christian Zigotzky
On 21 November 2019 at 01:16 pm, Christian Zigotzky wrote: On 21 November 2019 at 08:29 am, Christoph Hellwig wrote: On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: /*   *  DMA addressing mode.   *   *  0 : 32 bit addressing for all chips.   *  1 : 40 bit addressing when

[PATCH v2 03/11] powerpc/powernv/ioda: set up PE on opencapi device when enabling

2019-11-21 Thread Frederic Barrat
The PE for an opencapi device was set as part of a late PHB fixup operation, when creating the PHB. To use the PCI hotplug framework, this is not going to work, as the PHB stays the same, it's only the devices underneath which are updated. For regular PCI devices, it is done as part of the

[PATCH v2 09/11] pci/hotplug/pnv-php: Relax check when disabling slot

2019-11-21 Thread Frederic Barrat
The driver only allows to disable a slot in the POPULATED state. However, if an error occurs while enabling the slot, say because the link couldn't be trained, then the POPULATED state may not be reached, yet the power state of the slot is on. So allow to disable a slot in the REGISTERED state.

[PATCH v2 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node

2019-11-21 Thread Frederic Barrat
Unlike real PCI slots, opencapi slots are directly associated to the (virtual) opencapi PHB, there's no intermediate bridge. So when looking for a slot ID, we must start the search from the device node itself and not its parent. Also, the slot ID is not attached to a specific bdfn, so let's build

[PATCH v2 02/11] powerpc/powernv/ioda: Protect PE list

2019-11-21 Thread Frederic Barrat
Protect the PHB's list of PE. Probably not needed as long as it was populated during PHB creation, but it feels right and will become required once we can add/remove opencapi devices on hotplug. Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change

[PATCH v2 08/11] pci/hotplug/pnv-php: Register opencapi slots

2019-11-21 Thread Frederic Barrat
Add the opencapi PHBs to the list of PHBs being scanned to look for slots. Signed-off-by: Frederic Barrat --- Changelog: v2: - fix unregistration (Andrew) drivers/pci/hotplug/pnv_php.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/pci/hotplug/pnv_php.c

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Robin Murphy
On 21/11/2019 12:21 pm, Christian Zigotzky wrote: On 21 November 2019 at 01:16 pm, Christian Zigotzky wrote: On 21 November 2019 at 08:29 am, Christoph Hellwig wrote: On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: /*   *  DMA addressing mode.   *   *  0 : 32 bit

[PATCH v2 04/11] powerpc/powernv/ioda: Release opencapi device

2019-11-21 Thread Frederic Barrat
With hotplug, an opencapi device can now go away. It needs to be released, mostly to clean up its PE state. We were previously not defining any device callback. We can reuse the standard PCI release callback, it does a bit too much for an opencapi device, but it's harmless, and only needs minor

[PATCH v2 06/11] pci/hotplug/pnv-php: Remove erroneous warning

2019-11-21 Thread Frederic Barrat
On powernv, when removing a device through hotplug, the following warning is logged: Invalid refcount <.> on <...> It may be incorrect, the refcount may be set to a higher value than 1 and be valid. of_detach_node() can drop more than one reference. As it doesn't seem trivial to assert the

Re: [Y2038] [PATCH 08/23] y2038: ipc: remove __kernel_time_t reference from headers

2019-11-21 Thread Arnd Bergmann
On Wed, Nov 20, 2019 at 11:49 PM Ben Hutchings wrote: > > On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote: > [...] > > --- a/arch/x86/include/uapi/asm/sembuf.h > > +++ b/arch/x86/include/uapi/asm/sembuf.h > > @@ -21,9 +21,9 @@ struct semid64_ds { > > unsigned long sem_ctime;

[PATCH] drivers: net: Fix Kconfig indentation, continued

2019-11-21 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style. This fixes various indentation mixups (seven spaces, tab+one space, etc). Signed-off-by: Krzysztof Kozlowski --- drivers/net/Kconfig | 64 +-- drivers/net/caif/Kconfig

[PATCH v2 11/11] ocxl: Add PCI hotplug dependency to Kconfig

2019-11-21 Thread Frederic Barrat
The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change drivers/misc/ocxl/Kconfig | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-21 Thread Jason Gunthorpe
On Thu, Nov 21, 2019 at 12:07:46AM -0800, Christoph Hellwig wrote: > On Wed, Nov 20, 2019 at 11:13:37PM -0800, John Hubbard wrote: > > And get rid of the mmap_sem calls, as part of that. Note > > that get_user_pages_fast() will, if necessary, fall back to > > __gup_longterm_unlocked(), which takes

[PATCH v2 00/11] opencapi: enable card reset and link retraining

2019-11-21 Thread Frederic Barrat
This is the linux part of the work to use the PCI hotplug framework to control an opencapi card so that it can be reset and re-read after flashing a new FPGA image. The changes required in skiboot are now upstream. On an old skiboot, this series will do nothing. A virtual PCI slot is created for

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christian Zigotzky
On 21 November 2019 at 08:29 am, Christoph Hellwig wrote: On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: /* * DMA addressing mode. * * 0 : 32 bit addressing for all chips. * 1 : 40 bit addressing when supported by chip. * 2 : 64 bit addressing when supported

Re: [PATCH v2 1/4] powerpc/kvm/book3s: Fixes possible 'use after release' of kvm

2019-11-21 Thread Leonardo Bras
On Thu, 2019-11-14 at 15:43 -0300, Leonardo Bras wrote: > > If the kvm_put_kvm() you've moved actually caused the last > > reference > > to > > be dropped that would mean that our caller had passed us a kvm > > struct > > without holding a reference to it, and that would be a bug in our > >

[PATCH] tty: Fix Kconfig indentation, continued

2019-11-21 Thread Krzysztof Kozlowski
Adjust indentation from seven spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- drivers/tty/Kconfig | 28 ++-- drivers/tty/hvc/Kconfig | 28

[PATCH v2 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2019-11-21 Thread Frederic Barrat
The pci_dn structure used to store a pointer to the struct pci_dev, so taking a reference on the device was required. However, the pci_dev pointer was later removed from the pci_dn structure, but the reference was kept for the npu device. See commit 902bdc57451c ("powerpc/powernv/idoa: Remove

[PATCH v2 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-11-21 Thread Frederic Barrat
When changing the slot state, if opal hits an error and tells as such in the asynchronous reply, the warning "Wrong msg" is logged, which is rather confusing. Instead we can reuse the better message which is already used when we couldn't submit the asynchronous opal request initially.

Re: [Y2038] [PATCH 07/23] y2038: vdso: powerpc: avoid timespec references

2019-11-21 Thread Arnd Bergmann
On Wed, Nov 20, 2019 at 11:43 PM Ben Hutchings wrote: > > On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote: > [...] > > --- a/arch/powerpc/kernel/vdso32/gettimeofday.S > > +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S > > @@ -15,10 +15,8 @@ > > /* Offset for the low 32-bit part of a

[PATCH v2 10/11] pci/hotplug/pnv-php: Wrap warnings in macro

2019-11-21 Thread Frederic Barrat
An opencapi slot doesn't have an associated bridge device. It's not needed for operation, but any warning is displayed through pci_warn() which uses the pci_dev struct of the assocated bridge device. So wrap those warning so that a different trace mechanism can be used if it's an opencapi slot.

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Nicolas Saenz Julienne
On Thu, 2019-11-21 at 16:24 +0100, Christoph Hellwig wrote: > On Thu, Nov 21, 2019 at 10:26:44AM +0100, Nicolas Saenz Julienne wrote: > > Using a mask to represent bus DMA constraints has a set of limitations. > > The biggest one being it can only hold a power of two (minus one). The > > DMA

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 10:26:44AM +0100, Nicolas Saenz Julienne wrote: > Using a mask to represent bus DMA constraints has a set of limitations. > The biggest one being it can only hold a power of two (minus one). The > DMA mapping code is already aware of this and treats dev->bus_dma_mask > as a

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 03:55:39PM +, Robin Murphy wrote: > Hmm, there's no functional dependency though, is there? AFAICS it's > essentially just a context conflict. Is it worth simply dropping (or > postponing) the local renaming in __dma_direct_optimal_gfp_mask(), or > perhaps even

Re: [Y2038] [PATCH 07/23] y2038: vdso: powerpc: avoid timespec references

2019-11-21 Thread Christophe Leroy
Arnd Bergmann a écrit : On Wed, Nov 20, 2019 at 11:43 PM Ben Hutchings wrote: On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote: [...] > --- a/arch/powerpc/kernel/vdso32/gettimeofday.S > +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S > @@ -15,10 +15,8 @@ > /* Offset for the low

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 05:34:48PM +0100, Christian Zigotzky wrote: > I modified the patch and compiled a new RC8 of kernel 5.4 today. (patch > attached) > > We have to wait to Rolands test results with his SCSI PCI card. I tested it > today but my TV card doesn't work with this patch. I think

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 04:24:57PM +0100, Christoph Hellwig wrote: > On Thu, Nov 21, 2019 at 10:26:44AM +0100, Nicolas Saenz Julienne wrote: > > Using a mask to represent bus DMA constraints has a set of limitations. > > The biggest one being it can only hold a power of two (minus one). The > >

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Robin Murphy
On 21/11/2019 3:26 pm, Christoph Hellwig wrote: On Thu, Nov 21, 2019 at 04:24:57PM +0100, Christoph Hellwig wrote: On Thu, Nov 21, 2019 at 10:26:44AM +0100, Nicolas Saenz Julienne wrote: Using a mask to represent bus DMA constraints has a set of limitations. The biggest one being it can only

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 05:07:54PM +, Robin Murphy wrote: > ^^ super-nit only because I can't not see my editor currently highlighting > the typo: "accessible" > > Regardless of that though, > > Reviewed-by: Robin Murphy Applied for real now with that typo fixed and on top of the pulled in

Re: generic DMA bypass flag

2019-11-21 Thread Robin Murphy
On 21/11/2019 7:34 am, Christoph Hellwig wrote: Robin, does this mean you ACK this series for the powerpc use case? Yeah, I think we've nailed down sufficient justification now for having a generalised flag, so at that point it makes every bit of sense to convert PPC's private equivalent.

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Will Deacon
On Thu, Nov 21, 2019 at 05:02:17PM +0100, Christoph Hellwig wrote: > On Thu, Nov 21, 2019 at 03:55:39PM +, Robin Murphy wrote: > > Hmm, there's no functional dependency though, is there? AFAICS it's > > essentially just a context conflict. Is it worth simply dropping (or > > postponing) the

Re: lockdep warning while booting POWER9 PowerNV

2019-11-21 Thread Qian Cai
> On Sep 4, 2019, at 11:55 PM, Michael Ellerman wrote: > > Bart Van Assche writes: >> On 8/30/19 2:13 PM, Qian Cai wrote: >>> https://raw.githubusercontent.com/cailca/linux-mm/master/powerpc.config >>> >>> Once in a while, booting an IBM POWER9 PowerNV system (8335-GTH) would >>> generate

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christian Zigotzky
On 21. Nov 2019, at 19:02, Christoph Hellwig wrote: On Thu, Nov 21, 2019 at 05:34:48PM +0100, Christian Zigotzky wrote: I modified the patch and compiled a new RC8 of kernel 5.4 today. (patch attached) We have to wait to Rolands test results with his SCSI PCI card. I tested it today but my TV

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christian Zigotzky
Am 21.11.19 um 14:33 schrieb Robin Murphy: On 21/11/2019 12:21 pm, Christian Zigotzky wrote: On 21 November 2019 at 01:16 pm, Christian Zigotzky wrote: On 21 November 2019 at 08:29 am, Christoph Hellwig wrote: On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: /*   *  DMA

Re: [PATCH v7 05/24] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2019-11-21 Thread Dan Williams
On Thu, Nov 21, 2019 at 12:57 AM John Hubbard wrote: > > On 11/21/19 12:05 AM, Christoph Hellwig wrote: > > So while this looks correct and I still really don't see the major > > benefit of the new code organization, especially as it bloats all > > put_page callers. > > > > I'd love to see code

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 04:53:48PM +, Will Deacon wrote: > Please go ahead and pull in our for-next/zone-dma branch if you need it. > We're not going to rebase it, and I suspect we won't even be queueing > anything else there at this stage in the game. Ok. I've pulled it in and will wait

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Robin Murphy
On 21/11/2019 9:26 am, Nicolas Saenz Julienne wrote: Using a mask to represent bus DMA constraints has a set of limitations. The biggest one being it can only hold a power of two (minus one). The DMA mapping code is already aware of this and treats dev->bus_dma_mask as a limit. This quirk is

Re: [Y2038] [PATCH 3/8] powerpc: fix vdso32 for ppc64le

2019-11-21 Thread Ben Hutchings
On Thu, 2019-11-21 at 11:02 +0100, Arnd Bergmann wrote: > On Wed, Nov 20, 2019 at 10:49 PM Ben Hutchings > wrote: > > On Wed, 2019-11-20 at 20:35 +0100, Arnd Bergmann wrote: > > > On Wed, Nov 20, 2019 at 8:13 PM Ben Hutchings > > > wrote: > > > > On Fri, 2019-11-08 at 21:34 +0100, Arnd Bergmann

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread John Hubbard
On 11/21/19 1:49 AM, Jan Kara wrote: On Thu 21-11-19 00:29:59, John Hubbard wrote: On 11/21/19 12:03 AM, Christoph Hellwig wrote: Otherwise this looks fine and might be a worthwhile cleanup to feed Andrew for 5.5 independent of the gut of the changes. Reviewed-by: Christoph Hellwig Thanks

Re: [PATCH] drivers: net: Fix Kconfig indentation, continued

2019-11-21 Thread David Miller
From: Krzysztof Kozlowski Date: Thu, 21 Nov 2019 21:28:28 +0800 > Adjust indentation from spaces to tab (+optional two spaces) as in > coding style. This fixes various indentation mixups (seven spaces, > tab+one space, etc). > > Signed-off-by: Krzysztof Kozlowski Applied to net-next.

Re: [PATCH v7 05/24] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2019-11-21 Thread John Hubbard
On 11/21/19 8:59 AM, Dan Williams wrote: On Thu, Nov 21, 2019 at 12:57 AM John Hubbard wrote: On 11/21/19 12:05 AM, Christoph Hellwig wrote: So while this looks correct and I still really don't see the major benefit of the new code organization, especially as it bloats all put_page callers.

Re: [PATCH v7 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-21 Thread John Hubbard
On 11/21/19 1:35 PM, Alex Williamson wrote: On Wed, 20 Nov 2019 23:13:39 -0800 John Hubbard wrote: As it says in the updated comment in gup.c: current FOLL_LONGTERM behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the FS DAX check requirement on vmas. However, the

Re: [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage()

2019-11-21 Thread Michael Ellerman
Christophe Leroy writes: > __get_datapage() is only a few instructions to retrieve the > address of the page where the kernel stores data to the VDSO. > > By inlining this function into its users, a bl/blr pair and > a mflr/mtlr pair is avoided, plus a few reg moves. > > The improvement is

Re: [Very RFC 09/46] powerpc/eeh: Pass eeh_dev to eeh_ops->{read|write}_config()

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > Switch the eeh_ops->{read|write}_config methods to take an eeh_dev structure > rather than a pci_dn structure to specify the target device. This removes a > lot of the uses of pci_dn in both the EEH core and in the platform EEH > support. > >

Re: [PATCH v2 08/11] pci/hotplug/pnv-php: Register opencapi slots

2019-11-21 Thread Andrew Donnellan
On 22/11/19 12:49 am, Frederic Barrat wrote: Add the opencapi PHBs to the list of PHBs being scanned to look for slots. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread John Hubbard
On 11/21/19 1:54 AM, Jan Kara wrote: On Thu 21-11-19 00:29:59, John Hubbard wrote: Otherwise this looks fine and might be a worthwhile cleanup to feed Andrew for 5.5 independent of the gut of the changes. Reviewed-by: Christoph Hellwig Thanks for the reviews! Say, it sounds like your view

Re: [Very RFC 11/46] powerpc/eeh: Convert various printfs to use edev, not pci_dn

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > We use the pci_dn to retrieve the domain, bus, device, and function numbers > for > an EEH device. We now have that in the eeh_dev so covert the various printk()s > we have around the place to source that information from the eeh_dev. > >

Re: [PATCH v7 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-21 Thread Alex Williamson
On Wed, 20 Nov 2019 23:13:39 -0800 John Hubbard wrote: > As it says in the updated comment in gup.c: current FOLL_LONGTERM > behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the > FS DAX check requirement on vmas. > > However, the corresponding restriction in

RE: [PATCH v1 1/4] arm64: dts: ls1028a-rdb: enable emmc hs400 mode

2019-11-21 Thread Yinbo Zhu
Hi My hs400 series patches for ls1028 need do any changes? Regards, Yinbo Zhu. -Original Message- From: Yinbo Zhu Sent: 2019年8月14日 15:27 To: Rob Herring ; Mark Rutland ; Catalin Marinas ; Will Deacon ; Adrian Hunter ; Ulf Hansson ; Leo Li ; Claudiu Manoil ; Amit Jain (aj) ;

Re: [PATCH v2 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node

2019-11-21 Thread Andrew Donnellan
On 22/11/19 12:49 am, Frederic Barrat wrote: Unlike real PCI slots, opencapi slots are directly associated to the (virtual) opencapi PHB, there's no intermediate bridge. So when looking for a slot ID, we must start the search from the device node itself and not its parent. Also, the slot ID is

Re: [Very RFC 08/46] powerpc/eeh: Calculate VF index rather than looking it up in pci_dn

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > Find the VF index based on the BDFN of the device rather than using a cached > value in the pci_dn. This is probably slower than looking up the cached value > in the pci_dn, but it's done infrequently (only in the EEH recovery path) and > it's

[PATCH AUTOSEL 4.19 107/219] powerpc/xmon: fix dump_segments()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 32c8c4c621897199e690760c2d57054f8b84b6e6 ] mfsrin() takes segment num from bits 31-28 (IBM bits 0-3). Signed-off-by: Christophe Leroy [mpe: Clarify bit numbering] Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.19 118/219] powerpc/perf: Fix unit_sel/cache_sel checks

2019-11-21 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 2d46d4877b1afd14059393a48bdb8ce27955174c ] Raw event code has couple of fields "unit" and "cache" in it, to capture the "unit" to monitor for a given pmcxsel and cache reload qualifier to program in MMCR1. isa207_get_constraint() refers "unit" field

[PATCH AUTOSEL 4.19 120/219] powerpc/prom: fix early DEBUG messages

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 ] This patch fixes early DEBUG messages in prom.c: - Use %px instead of %p to see the addresses - Cast memblock_phys_mem_size() with (unsigned long long) to avoid build failure when phys_addr_t is not 64 bits.

[PATCH AUTOSEL 4.19 121/219] powerpc/mm: Make NULL pointer deferences explicit on bad page faults.

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 49a502ea23bf9dec47f8f3c3960909ff409cd1bb ] As several other arches including x86, this patch makes it explicit that a bad page fault is a NULL pointer dereference when the fault address is lower than PAGE_SIZE In the mean time, this page makes all

[PATCH AUTOSEL 4.19 122/219] powerpc/44x/bamboo: Fix PCI range

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 3cfb9ebe906b51f2942b1e251009bb251efd2ba6 ] The bamboo dts has a bug: it uses a non-naturally aligned range for PCI memory space. This isnt' supported by the code, thus causing PCI to break on this system. This is due to the fact that while the

[PATCH AUTOSEL 4.19 151/219] net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()

2019-11-21 Thread Sasha Levin
From: Wen Yang [ Upstream commit 40752b3eae29f8ca2378e978a02bd6dbeeb06d16 ] This patch fixes potential double frees if register_hdlc_device() fails. Signed-off-by: Wen Yang Reviewed-by: Peng Hao CC: Zhao Qiang CC: "David S. Miller" CC: net...@vger.kernel.org CC:

Re: [Very RFC 14/46] powernv/eeh: Remove un-necessary call to eeh_add_device_early()

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > eeh_add_device_early() is used to initialise the EEH state for a PCI device > based on the contents of it's devicetree node. It doesn't do anything > unless EEH_FLAG_PROBE_MODE_DEVTREE is set and that only happens on pseries. > > Remove the call

[PATCH AUTOSEL 4.14 126/127] powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()

2019-11-21 Thread Sasha Levin
From: Gen Zhang [ Upstream commit efa9ace68e487ddd29c2b4d6dd23242158f1f607 ] In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). kstrdup() may return NULL, so it should be checked and handle error. And prop should be freed if 'prop->name' is NULL. Signed-off-by: Gen Zhang

[PATCH AUTOSEL 4.9 49/91] powerpc/44x/bamboo: Fix PCI range

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 3cfb9ebe906b51f2942b1e251009bb251efd2ba6 ] The bamboo dts has a bug: it uses a non-naturally aligned range for PCI memory space. This isnt' supported by the code, thus causing PCI to break on this system. This is due to the fact that while the

[PATCH AUTOSEL 4.4 41/68] powerpc/mm: Make NULL pointer deferences explicit on bad page faults.

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 49a502ea23bf9dec47f8f3c3960909ff409cd1bb ] As several other arches including x86, this patch makes it explicit that a bad page fault is a NULL pointer dereference when the fault address is lower than PAGE_SIZE In the mean time, this page makes all

[PATCH AUTOSEL 4.4 42/68] powerpc/44x/bamboo: Fix PCI range

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 3cfb9ebe906b51f2942b1e251009bb251efd2ba6 ] The bamboo dts has a bug: it uses a non-naturally aligned range for PCI memory space. This isnt' supported by the code, thus causing PCI to break on this system. This is due to the fact that while the

[PATCH AUTOSEL 4.19 132/219] powerpc/83xx: handle machine check caused by watchdog timer

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 0deae39cec6dab3a66794f3e9e83ca4dc30080f1 ] When the watchdog timer is set in interrupt mode, it causes a machine check when it times out. The purpose of this mode is to ease debugging, not to crash the kernel and reboot the machine. This patch

[PATCH AUTOSEL 4.19 134/219] powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 505a314fb28ce122091691c51426fa85c084e115 ] HMIs will crash the kernel due to BRANCH_LINK_TO_FAR(hmi_exception_realmode) Calling into the OPD instead of the actual code. Fixes: 2337d207288f ("powerpc/64: CONFIG_RELOCATABLE support for hmi

[PATCH AUTOSEL 4.14 065/127] powerpc/prom: fix early DEBUG messages

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 ] This patch fixes early DEBUG messages in prom.c: - Use %px instead of %p to see the addresses - Cast memblock_phys_mem_size() with (unsigned long long) to avoid build failure when phys_addr_t is not 64 bits.

[PATCH AUTOSEL 4.14 077/127] powerpc/pseries: Fix node leak in update_lmb_associativity_index()

2019-11-21 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 47918bc68b7427e961035949cc1501a864578a69 ] In update_lmb_associativity_index() we lookup dr_node using of_find_node_by_path() which takes a reference for us. In the non-error case we forget to drop the reference. Note that find_aa_index() does modify

  1   2   >