Re: [PATCH 2/2] s390/pci: skip VF scanning

2018-12-18 Thread Christoph Hellwig
On Tue, Dec 18, 2018 at 11:16:50AM +0100, Sebastian Ott wrote: > Set the flag to skip scanning for VFs after SRIOV enablement. > VF creation will be triggered by the hotplug code. > > Signed-off-by: Sebastian Ott Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 1/2] PCI/IOV: provide flag to skip VF scanning

2018-12-18 Thread Christoph Hellwig
On Tue, Dec 18, 2018 at 11:16:49AM +0100, Sebastian Ott wrote: > Provide a flag to skip scanning for new VFs after SRIOV enablement. > This can be set by implementations for which the VFs are already > reported by other means. > > Signed-off-by: Sebastian Ott Looks good, Reviewed-by: Christoph

[PATCH v4] powerpc: implement CONFIG_DEBUG_VIRTUAL

2018-12-18 Thread Christophe Leroy
This patch implements CONFIG_DEBUG_VIRTUAL to warn about incorrect use of virt_to_phys() and page_to_phys() Below is the result of test_debug_virtual: [1.438746] WARNING: CPU: 0 PID: 1 at ./arch/powerpc/include/asm/io.h:808 test_debug_virtual_init+0x3c/0xd4 [1.448156] CPU: 0 PID: 1

Re: [PATCH v3] powerpc: implement CONFIG_DEBUG_VIRTUAL

2018-12-18 Thread Christophe Leroy
On 12/19/2018 06:57 AM, Christophe Leroy wrote: Le 19/12/2018 à 01:26, Michael Ellerman a écrit : Michael Ellerman writes: Christophe Leroy writes: This patch implements CONFIG_DEBUG_VIRTUAL to warn about incorrect use of virt_to_phys() and page_to_phys() This commit is breaking my

Re: [PATCH v3] powerpc: implement CONFIG_DEBUG_VIRTUAL

2018-12-18 Thread Christophe Leroy
Le 19/12/2018 à 01:26, Michael Ellerman a écrit : Michael Ellerman writes: Christophe Leroy writes: This patch implements CONFIG_DEBUG_VIRTUAL to warn about incorrect use of virt_to_phys() and page_to_phys() This commit is breaking my p5020ds booting a 32-bit kernel with: smp:

Re: [PATCH kernel v5 14/20] powerpc/powernv/npu: Add compound IOMMU groups

2018-12-18 Thread Alexey Kardashevskiy
On 19/12/2018 11:17, Michael Ellerman wrote: > Alexey Kardashevskiy writes: >> diff --git a/arch/powerpc/platforms/powernv/npu-dma.c >> b/arch/powerpc/platforms/powernv/npu-dma.c >> index dc629ee..3468eaa 100644 >> --- a/arch/powerpc/platforms/powernv/npu-dma.c >> +++

Re: [PATCH V4 0/5] NestMMU pte upgrade workaround for mprotect

2018-12-18 Thread Benjamin Herrenschmidt
On Tue, 2018-12-18 at 09:17 -0800, Christoph Hellwig wrote: > This series seems to miss patches 1 and 2. Odd, I got them... Ben.

Re: [PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-18 Thread Christoph Hellwig
On Wed, Dec 19, 2018 at 08:50:57AM +0530, Aneesh Kumar K.V wrote: > That was done considering that ptep_modify_prot_start/commit was defined > in asm-generic/pgtable.h. I was trying to make sure I didn't break > anything with the patch. Also s390 do have that EXPORT_SYMBOL() for the > same.

Re: [PATCH kernel v5 10/20] powerpc/iommu_api: Move IOMMU groups setup to a single place

2018-12-18 Thread Alexey Kardashevskiy
On 19/12/2018 10:35, Michael Ellerman wrote: > Alexey Kardashevskiy writes: > >> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c >> b/arch/powerpc/platforms/powernv/pci-ioda.c >> index b86a6e0..1168b185 100644 >> --- a/arch/powerpc/platforms/powernv/pci-ioda.c >> +++

Re: [PATCH v2 5/5] powerpc/perf: Trace imc PMU functions

2018-12-18 Thread Madhavan Srinivasan
On 14/12/18 2:41 PM, Anju T Sudhakar wrote: Add PMU functions to support trace-imc. Reviewed-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 175 1 file changed, 175 insertions(+) diff --git

Re: [PATCH v2 4/5] powerpc/perf: Trace imc events detection and cpuhotplug

2018-12-18 Thread Madhavan Srinivasan
On 14/12/18 2:41 PM, Anju T Sudhakar wrote: Patch detects trace-imc events, does memory initilizations for each online cpu, and registers cpuhotplug call-backs. Reviewed-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 91

Re: [PATCH v2 2/5] powerpc/perf: Rearrange setting of ldbar for thread-imc

2018-12-18 Thread Madhavan Srinivasan
On 14/12/18 2:41 PM, Anju T Sudhakar wrote: LDBAR holds the memory address allocated for each cpu. For thread-imc the mode bit (i.e bit 1) of LDBAR is set to accumulation. Currently, ldbar is loaded with per cpu memory address and mode set to accumulation at boot time. To enable trace-imc,

Re: [PATCH v2 1/5] powerpc/include: Add data structures and macros for IMC trace mode

2018-12-18 Thread Madhavan Srinivasan
On 14/12/18 2:41 PM, Anju T Sudhakar wrote: Add the macros needed for IMC (In-Memory Collection Counters) trace-mode and data structure to hold the trace-imc record data. Also, add the new type "OPAL_IMC_COUNTERS_TRACE" in 'opal-api.h', since there is a new switch case added in the opal-calls

Re: [PATCH v2] powerpc/perf: Fix loop exit condition in nest_imc_event_init

2018-12-18 Thread Madhavan Srinivasan
On 18/12/18 11:50 AM, Anju T Sudhakar wrote: The data structure (i.e struct imc_mem_info) to hold the memory address information for nest imc units is allocated based on the number of nodes in the system. nest_imc_event_init() traverse this struct array to calculate the memory base address

Re: [RFC PATCH kernel] vfio/spapr_tce: Get rid of possible infinite loop

2018-12-18 Thread Alexey Kardashevskiy
On 08/10/2018 21:18, Michael Ellerman wrote: > Serhii Popovych writes: >> Alexey Kardashevskiy wrote: >>> As a part of cleanup, the SPAPR TCE IOMMU subdriver releases preregistered >>> memory. If there is a bug in memory release, the loop in >>> tce_iommu_release() becomes infinite; this

Re: [PATCH] powerpc/prom: move the device tree if not in declared memory.

2018-12-18 Thread Michael Ellerman
Christophe Leroy writes: > If the device tree doesn't reside in the memory which is declared > inside it, it has to be moved as well as this memory will not be > mapped by the kernel. I worry this will break some obscure platform, but I'll merge it anyway and we'll see :) cheers > diff --git

Re: [PATCH kernel v5 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-18 Thread Alexey Kardashevskiy
On 19/12/2018 09:37, Alex Williamson wrote: > On Thu, 13 Dec 2018 17:17:34 +1100 > Alexey Kardashevskiy wrote: > >> POWER9 Witherspoon machines come with 4 or 6 V100 GPUs which are not >> pluggable PCIe devices but still have PCIe links which are used >> for config space and MMIO. In addition

[PATCH V5 3/3] powerpc/mm/iommu: Allow large IOMMU page size only for hugetlb backing

2018-12-18 Thread Aneesh Kumar K.V
THP pages can get split during different code paths. An incremented reference count do imply we will not split the compound page. But the pmd entry can be converted to level 4 pte entries. Keep the code simpler by allowing large IOMMU page size only if the guest ram is backed by hugetlb pages.

[PATCH V5 2/3] powerpc/mm/iommu: Allow migration of cma allocated pages during mm_iommu_get

2018-12-18 Thread Aneesh Kumar K.V
Current code doesn't do page migration if the page allocated is a compound page. With HugeTLB migration support, we can end up allocating hugetlb pages from CMA region. Also THP pages can be allocated from CMA region. This patch updates the code to handle compound pages correctly. This use the

[PATCH V5 1/3] mm: Add get_user_pages_cma_migrate

2018-12-18 Thread Aneesh Kumar K.V
This helper does a get_user_pages_fast and if it find pages in the CMA area it will try to migrate them before taking page reference. This makes sure that we don't keep non-movable pages (due to page reference count) in the CMA area. Not able to move pages out of CMA area result in CMA allocation

[PATCH V5 0/3] mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2018-12-18 Thread Aneesh Kumar K.V
ppc64 use CMA area for the allocation of guest page table (hash page table). We won't be able to start guest if we fail to allocate hash page table. We have observed hash table allocation failure because we failed to migrate pages out of CMA region because they were pinned. This happen when we

Re: [PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-18 Thread Aneesh Kumar K.V
Christoph Hellwig writes: > On Tue, Dec 18, 2018 at 03:11:37PM +0530, Aneesh Kumar K.V wrote: >> +EXPORT_SYMBOL(huge_ptep_modify_prot_start); > > The only user of this function is the one you added in the last patch > in mm/hugetlb.c, so there is no need to export this function. > >> + >> +void

Re: [PATCH V4 0/5] NestMMU pte upgrade workaround for mprotect

2018-12-18 Thread Aneesh Kumar K.V
Christoph Hellwig writes: > This series seems to miss patches 1 and 2. https://lore.kernel.org/linuxppc-dev/20181218094137.13732-2-aneesh.ku...@linux.ibm.com/ https://lore.kernel.org/linuxppc-dev/20181218094137.13732-3-aneesh.ku...@linux.ibm.com/ -aneesh

Re: [PATCH v3] powerpc: implement CONFIG_DEBUG_VIRTUAL

2018-12-18 Thread Michael Ellerman
Michael Ellerman writes: > Christophe Leroy writes: > >> This patch implements CONFIG_DEBUG_VIRTUAL to warn about >> incorrect use of virt_to_phys() and page_to_phys() > > This commit is breaking my p5020ds booting a 32-bit kernel with: > > smp: Bringing up secondary CPUs ... > __ioremap():

Re: [PATCH] powerpc/ptrace: fix empty-body warning

2018-12-18 Thread Michael Ellerman
Hi Mathieu, Mathieu Malaterre writes: > In commit a225f1567405 ("powerpc/ptrace: replace ptrace_report_syscall() > with a tracehook call") an empty body if(); was added. > > Replace ; with {} to remove a warning (treated as error) reported by gcc > using W=1: > > arch/powerpc/kernel/ptrace.c:

Re: [PATCH kernel v5 14/20] powerpc/powernv/npu: Add compound IOMMU groups

2018-12-18 Thread Michael Ellerman
Alexey Kardashevskiy writes: > diff --git a/arch/powerpc/platforms/powernv/npu-dma.c > b/arch/powerpc/platforms/powernv/npu-dma.c > index dc629ee..3468eaa 100644 > --- a/arch/powerpc/platforms/powernv/npu-dma.c > +++ b/arch/powerpc/platforms/powernv/npu-dma.c > @@ -372,8 +358,263 @@ struct npu {

Re: [PATCH v2 0/2] of: phandle_cache, fix refcounts, remove stale entry

2018-12-18 Thread Michael Ellerman
Rob Herring writes: > On Mon, Dec 17, 2018 at 1:56 AM wrote: >> >> From: Frank Rowand >> >> Non-overlay dynamic devicetree node removal may leave the node in >> the phandle cache. Subsequent calls to of_find_node_by_phandle() >> will incorrectly find the stale entry. This bug exposed the

Re: [PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread Michael Ellerman
Rob Herring writes: > On Tue, Dec 18, 2018 at 2:33 PM Frank Rowand wrote: >> >> On 12/18/18 12:09 PM, Frank Rowand wrote: >> > On 12/18/18 12:01 PM, Rob Herring wrote: >> >> On Tue, Dec 18, 2018 at 12:57 PM Frank Rowand >> >> wrote: >> >>> >> >>> On 12/17/18 2:52 AM, Michael Ellerman wrote: >>

Re: [PATCH kernel v5 10/20] powerpc/iommu_api: Move IOMMU groups setup to a single place

2018-12-18 Thread Michael Ellerman
Alexey Kardashevskiy writes: > diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c > b/arch/powerpc/platforms/powernv/pci-ioda.c > index b86a6e0..1168b185 100644 > --- a/arch/powerpc/platforms/powernv/pci-ioda.c > +++ b/arch/powerpc/platforms/powernv/pci-ioda.c > @@ -2735,12 +2733,68 @@

Re: [PATCH kernel v5 03/20] powerpc/vfio/iommu/kvm: Do not pin device memory

2018-12-18 Thread Michael Ellerman
Alexey Kardashevskiy writes: > diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c > index f0dc680..cbcc615 100644 > --- a/arch/powerpc/kernel/iommu.c > +++ b/arch/powerpc/kernel/iommu.c > @@ -993,15 +994,19 @@ int iommu_tce_check_gpa(unsigned long page_shift, > unsigned long

Re: [PATCH kernel v5 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-18 Thread Alex Williamson
On Thu, 13 Dec 2018 17:17:34 +1100 Alexey Kardashevskiy wrote: > POWER9 Witherspoon machines come with 4 or 6 V100 GPUs which are not > pluggable PCIe devices but still have PCIe links which are used > for config space and MMIO. In addition to that the GPUs have 6 NVLinks > which are connected

[RFC PATCH] ASoC: fsl: Add Audio Mixer CPU DAI driver

2018-12-18 Thread Viorel Suman
This patch implements Audio Mixer CPU DAI driver for NXP iMX8 SOCs. The Audio Mixer is a on-chip functional module that allows mixing of two audio streams into a single audio stream. Audio Mixer datasheet is available here: https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf

Re: [PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread Rob Herring
On Tue, Dec 18, 2018 at 2:33 PM Frank Rowand wrote: > > On 12/18/18 12:09 PM, Frank Rowand wrote: > > On 12/18/18 12:01 PM, Rob Herring wrote: > >> On Tue, Dec 18, 2018 at 12:57 PM Frank Rowand > >> wrote: > >>> > >>> On 12/17/18 2:52 AM, Michael Ellerman wrote: > Hi Frank, > >

[PATCH] powerpc/ptrace: fix empty-body warning

2018-12-18 Thread Mathieu Malaterre
In commit a225f1567405 ("powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call") an empty body if(); was added. Replace ; with {} to remove a warning (treated as error) reported by gcc using W=1: arch/powerpc/kernel/ptrace.c: In function ‘do_syscall_trace_enter’:

Re: [PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread Frank Rowand
On 12/18/18 12:09 PM, Frank Rowand wrote: > On 12/18/18 12:01 PM, Rob Herring wrote: >> On Tue, Dec 18, 2018 at 12:57 PM Frank Rowand wrote: >>> >>> On 12/17/18 2:52 AM, Michael Ellerman wrote: Hi Frank, frowand.l...@gmail.com writes: > From: Frank Rowand > >

Re: [PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread Frank Rowand
On 12/18/18 12:01 PM, Rob Herring wrote: > On Tue, Dec 18, 2018 at 12:57 PM Frank Rowand wrote: >> >> On 12/17/18 2:52 AM, Michael Ellerman wrote: >>> Hi Frank, >>> >>> frowand.l...@gmail.com writes: From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node

Re: [PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread Rob Herring
On Tue, Dec 18, 2018 at 12:57 PM Frank Rowand wrote: > > On 12/17/18 2:52 AM, Michael Ellerman wrote: > > Hi Frank, > > > > frowand.l...@gmail.com writes: > >> From: Frank Rowand > >> > >> Non-overlay dynamic devicetree node removal may leave the node in > >> the phandle cache. Subsequent calls

Re: [PATCH v3 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread Frank Rowand
On 12/18/18 11:40 AM, frowand.l...@gmail.com wrote: > From: Frank Rowand > > Non-overlay dynamic devicetree node removal may leave the node in > the phandle cache. Subsequent calls to of_find_node_by_phandle() > will incorrectly find the stale entry. Remove the node from the > cache. > > Add

Re: [PATCH v3 1/2] of: of_node_get()/of_node_put() nodes held in phandle cache

2018-12-18 Thread Frank Rowand
On 12/18/18 11:40 AM, frowand.l...@gmail.com wrote: > From: Frank Rowand > > The phandle cache contains struct device_node pointers. The refcount > of the pointers was not incremented while in the cache, allowing use > after free error after kfree() of the node. Add the proper increment > and

[PATCH v3 0/2] of: phandle_cache, fix refcounts, remove stale entry

2018-12-18 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. This bug exposed the foloowing phandle cache refcount bug. The refcount of phandle_cache entries is not

[PATCH v3 1/2] of: of_node_get()/of_node_put() nodes held in phandle cache

2018-12-18 Thread frowand . list
From: Frank Rowand The phandle cache contains struct device_node pointers. The refcount of the pointers was not incremented while in the cache, allowing use after free error after kfree() of the node. Add the proper increment and decrement of the use count. Fixes: 0b3ce78e90fc ("of: cache

[PATCH v3 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. Remove the node from the cache. Add paranoia checks in of_find_node_by_phandle() as a second level of

Re: [PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread Frank Rowand
On 12/17/18 2:52 AM, Michael Ellerman wrote: > Hi Frank, > > frowand.l...@gmail.com writes: >> From: Frank Rowand >> >> Non-overlay dynamic devicetree node removal may leave the node in >> the phandle cache. Subsequent calls to of_find_node_by_phandle() >> will incorrectly find the stale entry.

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Christophe Leroy
Le 18/12/2018 à 18:04, Jonathan Neuschäfer a écrit : On Tue, Dec 18, 2018 at 04:04:42PM +0100, Christophe Leroy wrote: Stupid of me. In fact at the time being, BATS cover both RO and RW data areas, so it can definitly not be mapped with PAGE_KERNEL_ROX. In fact, as I have CONFIG_BDI_SWITCH in

Re: [PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-18 Thread Christoph Hellwig
On Tue, Dec 18, 2018 at 03:11:37PM +0530, Aneesh Kumar K.V wrote: > +EXPORT_SYMBOL(huge_ptep_modify_prot_start); The only user of this function is the one you added in the last patch in mm/hugetlb.c, so there is no need to export this function. > + > +void huge_ptep_modify_prot_commit(struct

Re: [PATCH V3 3/5] arch/powerpc/mm: Nest MMU workaround for mprotect RW upgrade.

2018-12-18 Thread Christoph Hellwig
On Wed, Dec 05, 2018 at 08:39:29AM +0530, Aneesh Kumar K.V wrote: > +pte_t ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr, > + pte_t *ptep) > +{ > + unsigned long pte_val; > + > + /* > + * Clear the _PAGE_PRESENT so that no hardware

Re: [PATCH V4 0/5] NestMMU pte upgrade workaround for mprotect

2018-12-18 Thread Christoph Hellwig
This series seems to miss patches 1 and 2.

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Jonathan Neuschäfer
On Tue, Dec 18, 2018 at 04:04:42PM +0100, Christophe Leroy wrote: > Stupid of me. In fact at the time being, BATS cover both RO and RW data > areas, so it can definitly not be mapped with PAGE_KERNEL_ROX. > > In fact, as I have CONFIG_BDI_SWITCH in my setup, PAGE_KERNEL_TEXT is > PAGE_KERNEL_X on

Re: [PATCH] powerpc/83xx: handle machine check caused by watchdog timer

2018-12-18 Thread kbuild test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v4.20-rc7 next-20181218] [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

Re: [PATCH v2 0/2] of: phandle_cache, fix refcounts, remove stale entry

2018-12-18 Thread Rob Herring
On Mon, Dec 17, 2018 at 1:56 AM wrote: > > From: Frank Rowand > > Non-overlay dynamic devicetree node removal may leave the node in > the phandle cache. Subsequent calls to of_find_node_by_phandle() > will incorrectly find the stale entry. This bug exposed the foloowing > phandle cache

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Christophe Leroy
Le 18/12/2018 à 15:55, Christophe Leroy a écrit : Le 18/12/2018 à 15:15, Christophe Leroy a écrit : Le 18/12/2018 à 15:07, Jonathan Neuschäfer a écrit : On Tue, Dec 18, 2018 at 09:18:42AM +, Christophe Leroy wrote: The only difference I see then are the flags. Everything else is

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Christophe Leroy
Le 18/12/2018 à 15:15, Christophe Leroy a écrit : Le 18/12/2018 à 15:07, Jonathan Neuschäfer a écrit : On Tue, Dec 18, 2018 at 09:18:42AM +, Christophe Leroy wrote: The only difference I see then are the flags. Everything else is seems identical. I know you tried already, but would

Re: [PATCH V4 0/3] * mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2018-12-18 Thread Michal Hocko
On Fri 07-12-18 15:12:26, Andrew Morton wrote: > On Wed, 21 Nov 2018 14:52:56 +0530 "Aneesh Kumar K.V" > wrote: > > > Subject: [PATCH V4 0/3] * mm/kvm/vfio/ppc64: Migrate compound pages out of > > CMA region > > Asterisk in title is strange? > > > ppc64 use CMA area for the allocation of

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Christophe Leroy
Le 18/12/2018 à 15:07, Jonathan Neuschäfer a écrit : On Tue, Dec 18, 2018 at 09:18:42AM +, Christophe Leroy wrote: The only difference I see then are the flags. Everything else is seems identical. I know you tried already, but would you mind trying once more with the following change ?

Re: [PATCH v2] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK

2018-12-18 Thread Horia Geanta
On 12/13/2018 9:34 AM, Christophe Leroy wrote: > [2.364486] WARNING: CPU: 0 PID: 60 at ./arch/powerpc/include/asm/io.h:837 > dma_nommu_map_page+0x44/0xd4 > [2.373579] CPU: 0 PID: 60 Comm: cryptomgr_test Tainted: GW > 4.20.0-rc5-00560-g6bfb52e23a00-dirty #531 > [

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Jonathan Neuschäfer
On Tue, Dec 18, 2018 at 09:18:42AM +, Christophe Leroy wrote: > The only difference I see then are the flags. Everything else is seems > identical. > > I know you tried already, but would you mind trying once more with the > following change ? > [...] > - setbat(idx, PAGE_OFFSET

Re: [PATCH v3] powerpc: implement CONFIG_DEBUG_VIRTUAL

2018-12-18 Thread Michael Ellerman
Christophe Leroy writes: > This patch implements CONFIG_DEBUG_VIRTUAL to warn about > incorrect use of virt_to_phys() and page_to_phys() This commit is breaking my p5020ds booting a 32-bit kernel with: smp: Bringing up secondary CPUs ... __ioremap(): phys addr 0x7fef5000 is RAM lr

Re: [PATCH V4 1/3] mm: Add get_user_pages_cma_migrate

2018-12-18 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > This helper does a get_user_pages_fast and if it find pages in the CMA area > it will try to migrate them before taking page reference. This makes sure that > we don't keep non-movable pages (due to page reference count) in the CMA area. > Not able to move pages out

powerpc syscall_set_return_value() is confused (was Re: [PATCH v6 18/27] powerpc: define syscall_get_error())

2018-12-18 Thread Michael Ellerman
Hi Dmitry, "Dmitry V. Levin" writes: > syscall_get_error() is required to be implemented on this > architecture in addition to already implemented syscall_get_nr(), > syscall_get_arguments(), syscall_get_return_value(), and > syscall_get_arch() functions in order to extend the generic > ptrace

[PATCH 2/2] s390/pci: skip VF scanning

2018-12-18 Thread Sebastian Ott
Set the flag to skip scanning for VFs after SRIOV enablement. VF creation will be triggered by the hotplug code. Signed-off-by: Sebastian Ott --- arch/s390/pci/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 9f6f392a4461..4266a4de3160

[PATCH 1/2] PCI/IOV: provide flag to skip VF scanning

2018-12-18 Thread Sebastian Ott
Provide a flag to skip scanning for new VFs after SRIOV enablement. This can be set by implementations for which the VFs are already reported by other means. Signed-off-by: Sebastian Ott --- drivers/pci/iov.c | 48 include/linux/pci.h | 1 + 2

[PATCH V3 2/2] Tools: Replace open encodings for NUMA_NO_NODE

2018-12-18 Thread Anshuman Khandual
From: Stephen Rothwell This replaces all open encodings in tools with NUMA_NO_NODE. Also linux/numa.h is now needed for the perf build. Signed-off-by: Anshuman Khandual Signed-off-by: Stephen Rothwell --- tools/include/linux/numa.h | 16 tools/perf/bench/numa.c| 6

[PATCH V3 1/2] mm: Replace all open encodings for NUMA_NO_NODE

2018-12-18 Thread Anshuman Khandual
At present there are multiple places where invalid node number is encoded as -1. Even though implicitly understood it is always better to have macros in there. Replace these open encodings for an invalid node number with the global macro NUMA_NO_NODE. This helps remove NUMA related assumptions

[PATCH V3 0/2] Replace all open encodings for NUMA_NO_NODE

2018-12-18 Thread Anshuman Khandual
Changes in V3: - Dropped all references to NUMA_NO_NODE as per Lubomir Rinetl - Split the patch into two creating a new one specifically for tools - Folded Stephen's linux-next build fix into the second patch Changes in V2: (https://patchwork.kernel.org/patch/10698089/) - Added inclusion of

[PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-18 Thread Aneesh Kumar K.V
NestMMU requires us to mark the pte invalid and flush the tlb when we do a RW upgrade of pte. We fixed a variant of this in the fault path in commit Fixes: bd5050e38aec ("powerpc/mm/radix: Change pte relax sequence to handle nest MMU hang") Signed-off-by: Aneesh Kumar K.V ---

[PATCH V4 4/5] mm/hugetlb: Add prot_modify_start/commit sequence for hugetlb update

2018-12-18 Thread Aneesh Kumar K.V
Architectures like ppc64 requires to do a conditional tlb flush based on the old and new value of pte. Follow the regular pte change protection sequence for hugetlb too. This allow the architectures to override the update sequence. Signed-off-by: Aneesh Kumar K.V --- include/linux/hugetlb.h |

[PATCH V4 3/5] arch/powerpc/mm: Nest MMU workaround for mprotect RW upgrade.

2018-12-18 Thread Aneesh Kumar K.V
NestMMU requires us to mark the pte invalid and flush the tlb when we do a RW upgrade of pte. We fixed a variant of this in the fault path in commit Fixes: bd5050e38aec ("powerpc/mm/radix: Change pte relax sequence to handle nest MMU hang") Do the same for mprotect upgrades. Hugetlb is handled

[PATCH V4 2/5] mm: update ptep_modify_prot_commit to take old pte value as arg

2018-12-18 Thread Aneesh Kumar K.V
Architectures like ppc64 requires to do a conditional tlb flush based on the old and new value of pte. Enable that by passing old pte value as the arg. Signed-off-by: Aneesh Kumar K.V --- arch/s390/include/asm/pgtable.h | 3 ++- arch/s390/mm/pgtable.c | 2 +-

[PATCH V4 1/5] mm: Update ptep_modify_prot_start/commit to take vm_area_struct as arg

2018-12-18 Thread Aneesh Kumar K.V
Some architecture may want to call flush_tlb_range from these helpers. Signed-off-by: Aneesh Kumar K.V --- arch/s390/include/asm/pgtable.h | 4 ++-- arch/s390/mm/pgtable.c| 6 -- arch/x86/include/asm/paravirt.h | 11 ++-

[PATCH V4 0/5] NestMMU pte upgrade workaround for mprotect

2018-12-18 Thread Aneesh Kumar K.V
We can upgrade pte access (R -> RW transition) via mprotect. We need to make sure we follow the recommended pte update sequence as outlined in commit bd5050e38aec ("powerpc/mm/radix: Change pte relax sequence to handle nest MMU hang") for such updates. This patch series do that. Changes from V3:

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-18 Thread Christophe Leroy
On 12/18/2018 03:05 AM, Jonathan Neuschäfer wrote: On Mon, Dec 17, 2018 at 10:29:18AM +0100, Christophe Leroy wrote: With patches 1-3: [0.00] setbat(0, c000, , 0100, 311) [0.00] setbat(2, c100, 0100, 0080, 311) [0.00] setbat(4, d000,