Re: [PATCH v3 05/10] VAS: Define helpers to init window context

2017-03-24 Thread Michael Neuling
> > > + val = 0ULL; > > > + if (user_win) { > > > + val = SET_FIELD(VAS_XLATE_MSR_DR, val, true); > > > + val = SET_FIELD(VAS_XLATE_MSR_TA, val, false); > > > + val = SET_FIELD(VAS_XLATE_MSR_PR, val, true); > > > + val = SET_FIELD(VAS_XLATE_MSR_US, val, false); > >

Re: Build failure -- powerpc/boot: Add OPAL console to epapr wrappers

2017-03-24 Thread Oliver O'Halloran
On Sat, Mar 25, 2017 at 4:00 AM, Daniel Walker wrote: > I get this build failure, > > > In file included from arch/powerpc/boot/fdt.c:51: > ../arch/powerpc/boot/libfdt_env.h:9: error: redefinition of typedef > 'uint32_t' > ../arch/powerpc/boot/types.h:20: note: previous

Re: AW: problem with cuImage.mpc834x_mds image

2017-03-24 Thread Scott Wood
On Fri, 2017-03-24 at 22:27 +0100, Giuseppe Lippolis wrote: > > > Therefore the code crash during the call in: > bl  setup_common_caches > > > I'm using the iomega_150d based on the MPC8347. > > Do you have some tips about the setup_common_caches? Once caching is enabled[1] you

Re: [PATCH v3 06/10] VAS: Define helpers to alloc/free windows

2017-03-24 Thread Sukadev Bhattiprolu
Michael Neuling [michael.neul...@au1.ibm.com] wrote: > On Thu, 2017-03-16 at 20:33 -0700, Sukadev Bhattiprolu wrote: > > Define helpers to allocate/free VAS window objects. These will > > be used in follow-on patches when opening/closing windows. > > > > Signed-off-by: Sukadev Bhattiprolu

Re: [PATCH v3 05/10] VAS: Define helpers to init window context

2017-03-24 Thread Sukadev Bhattiprolu
Michael Neuling [mi...@neuling.org] wrote: > On Thu, 2017-03-16 at 20:33 -0700, Sukadev Bhattiprolu wrote: > >  #ifdef CONFIG_PPC_4K_PAGES > > @@ -336,9 +337,6 @@ struct vas_window { > >   /* Feilds applicable only to receive windows */ > >   enum vas_cop_type cop; > >   atomic_t num_txwins;

Re: [PATCH v3 01/10] VAS: Define macros, register fields and structures

2017-03-24 Thread Sukadev Bhattiprolu
Michael Neuling [mi...@neuling.org] wrote: > On Thu, 2017-03-16 at 20:33 -0700, Sukadev Bhattiprolu wrote: > > Define macros for the VAS hardware registers and bit-fields as well > > as couple of data structures needed by the VAS driver. > > > > > Signed-off-by: Sukadev Bhattiprolu

AW: problem with cuImage.mpc834x_mds image

2017-03-24 Thread Giuseppe Lippolis
> On Fri, 2016-05-27 at 23:12 +0200, Giuseppe Lippolis wrote: > > Dear All, > > I'm trying with buildroot to build the linux-4.4.3 for an iomega 150d > > machine mounting the mpc8347E sys. [...] > > Finalizing device tree... flat tree at 0x94d120 > > > > > > But at this point the process crash

Re: [PATCH v3 03/10] VAS: Define vas_init() and vas_exit()

2017-03-24 Thread Sukadev Bhattiprolu
Michael Neuling [michael.neul...@au1.ibm.com] wrote: > On Thu, 2017-03-16 at 20:33 -0700, Sukadev Bhattiprolu wrote: > > Implement vas_init() and vas_exit() functions for a new VAS module. > > This VAS module is essentially a library for other device drivers > > and kernel users of the NX

Re: [PATCH v3 04/10] VAS: Define helpers for access MMIO regions

2017-03-24 Thread Sukadev Bhattiprolu
Michael Neuling [michael.neul...@au1.ibm.com] wrote: > > +static inline void get_uwc_mmio_bar(struct vas_window *window, > > + uint64_t *start, int *len) > > +{ > > + uint64_t pbaddr; > > + > > + pbaddr = window->vinst->uwc_bar_start; > > + *start = pbaddr + window->winid *

Re: [PATCH guest kernel] vfio/powerpc/spapr_tce: Enforce IOMMU type compatibility check

2017-03-24 Thread Alex Williamson
On Fri, 24 Mar 2017 17:44:06 +1100 Alexey Kardashevskiy wrote: > The existing SPAPR TCE driver advertises both VFIO_SPAPR_TCE_IOMMU and > VFIO_SPAPR_TCE_v2_IOMMU types to the userspace and the userspace usually > picks the v2. > > Normally the userspace would create a container,

Re: [PATCH kernel v11 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-03-24 Thread Alex Williamson
On Wed, 22 Mar 2017 15:21:56 +1100 Alexey Kardashevskiy wrote: > This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO > without passing them to user space which saves time on switching > to user

Re: [PATCH kernel v11 04/10] powerpc/vfio_spapr_tce: Add reference counting to iommu_table

2017-03-24 Thread Alex Williamson
On Wed, 22 Mar 2017 15:21:50 +1100 Alexey Kardashevskiy wrote: > So far iommu_table obejcts were only used in virtual mode and had > a single owner. We are going to change this by implementing in-kernel > acceleration of DMA mapping requests. The proposed acceleration > will

[v2 1/5] sparc64: simplify vmemmap_populate

2017-03-24 Thread Pavel Tatashin
Remove duplicating code, by using common functions vmemmap_pud_populate and vmemmap_pgd_populate functions. Signed-off-by: Pavel Tatashin Reviewed-by: Shannon Nelson --- arch/sparc/mm/init_64.c | 23 ++- 1 files

[v2 0/5] parallelized "struct page" zeroing

2017-03-24 Thread Pavel Tatashin
Changelog: v1 - v2 - Per request, added s390 to deferred "struct page" zeroing - Collected performance data on x86 which proofs the importance to keep memset() as prefetch (see below). When deferred struct page initialization feature is enabled, we get a

[v2 3/5] mm: add "zero" argument to vmemmap allocators

2017-03-24 Thread Pavel Tatashin
Allow clients to request non-zeroed memory from vmemmap allocator. The following two public function have a new boolean argument called zero: __vmemmap_alloc_block_buf() vmemmap_alloc_block() When zero is true, memory that is allocated by memblock allocator is zeroed (the current behavior), when

[v2 5/5] mm: teach platforms not to zero struct pages memory

2017-03-24 Thread Pavel Tatashin
If we are using deferred struct page initialization feature, most of "struct page"es are getting initialized after other CPUs are started, and hence we are benefiting from doing this job in parallel. However, we are still zeroing all the memory that is allocated for "struct pages" using the boot

[v2 4/5] mm: zero struct pages during initialization

2017-03-24 Thread Pavel Tatashin
When deferred struct page initialization is enabled, do not expect that the memory that was allocated for struct pages was zeroed by the allocator. Zero it when "struct pages" are initialized. Also, a defined boolean VMEMMAP_ZERO is provided to tell platforms whether they should zero memory or

[v2 2/5] mm: defining memblock_virt_alloc_try_nid_raw

2017-03-24 Thread Pavel Tatashin
A new version of memblock_virt_alloc_* allocations: - Does not zero the allocated memory - Does not panic if request cannot be satisfied Signed-off-by: Pavel Tatashin Reviewed-by: Shannon Nelson --- include/linux/bootmem.h |3 +++

Re: [PATCH v2] ASoC: imx-wm8960: Let codec driver enable/disable its MCLK

2017-03-24 Thread Nicolin Chen
On Fri, Mar 24, 2017 at 11:14:48AM +0200, Daniel Baluta wrote: > From: Daniel Baluta > > WM8962 needs its MCLK when powerup in wm8962_resume(). Thus it's better > to control the MCLK in codec driver. Thus remove the clock enable in > machine driver accordingly. > > While

Build failure -- powerpc/boot: Add OPAL console to epapr wrappers

2017-03-24 Thread Daniel Walker
I get this build failure, In file included from arch/powerpc/boot/fdt.c:51: ../arch/powerpc/boot/libfdt_env.h:9: error: redefinition of typedef 'uint32_t' ../arch/powerpc/boot/types.h:20: note: previous declaration of 'uint32_t' was here ../arch/powerpc/boot/libfdt_env.h:10: error:

[PATCH v3 1/7] Add multibyte memset functions

2017-03-24 Thread Matthew Wilcox
From: Matthew Wilcox memset16(), memset32() and memset64() are like memset(), but allow the caller to fill the destination with a multibyte pattern. memset_l() and memset_p() allow the caller to use unsigned long and pointer values respectively. memset64() is currently

[PATCH v3 5/7] zram: Convert to using memset_l

2017-03-24 Thread Matthew Wilcox
From: Matthew Wilcox zram was the motivation for creating memset_l(). Minchan Kim sees a 7% performance improvement on x86 with 100MB of non-zero deduplicatable data: perf stat -r 10 dd if=/dev/zram0 of=/dev/null vanilla:0.232050465 seconds time elapsed

[PATCH v3 2/7] ARM: Implement memset16, memset32 & memset64

2017-03-24 Thread Matthew Wilcox
From: Matthew Wilcox ARM is only 32-bit, so it doesn't really need a memset64, but it was essentially free to add it to the existing implementation. Signed-off-by: Matthew Wilcox Reviewed-by: Russell King ---

[PATCH v3 6/7] sym53c8xx_2: Convert to use memset32

2017-03-24 Thread Matthew Wilcox
From: Matthew Wilcox memset32() can be used to initialise these three arrays. Minor code footprint reduction. Signed-off-by: Matthew Wilcox --- drivers/scsi/sym53c8xx_2/sym_hipd.c | 11 +++ 1 file changed, 3 insertions(+), 8

[PATCH v3 7/7] vga: Optimise console scrolling

2017-03-24 Thread Matthew Wilcox
From: Matthew Wilcox Where possible, call memset16(), memmove() or memcpy() instead of using open-coded loops. If an architecture doesn't define VT_BUF_HAVE_RW, we can do that from the generic code. For the architectures which do have special RW routines, usually we can

[PATCH v3 0/7] Add memsetN functions

2017-03-24 Thread Matthew Wilcox
From: Matthew Wilcox zram was recently enhanced to support compressing pages with a repeating pattern up to the size of an unsigned long. As part of the discussion, we noted it would be nice if architectures had optimised routines to fill regions of memory with patterns

[PATCH v3 3/7] x86: Implement memset16, memset32 & memset64

2017-03-24 Thread Matthew Wilcox
From: Matthew Wilcox These are single instructions on x86. There's no 64-bit instruction for x86-32, but we don't yet have any user for memset64() on 32-bit architectures, so don't bother to implement it. Signed-off-by: Matthew Wilcox ---

[PATCH v3 4/7] alpha: Add support for memset16

2017-03-24 Thread Matthew Wilcox
From: Matthew Wilcox Alpha already had an optimised memset-16-bit-quantity assembler routine called memsetw(). It has a slightly different calling convention from memset16() in that it takes a byte count, not a count of words. That's the same convention used by ARM's

[PATCH v2] cxl: Enable PCI device IDs for future IBM CXL adapters

2017-03-24 Thread Matthew R. Ochs
Add support for future IBM Coherent Accelerator (CXL) devices with an IDs of 0x0623 and 0x0628. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Acked-by: Frederic Barrat --- Changes in v2: - Add

Re: [PATCH 1/4] crypto: powerpc - Factor out the core CRC vpmsum algorithm

2017-03-24 Thread Herbert Xu
Daniel Axtens wrote: > The core nuts and bolts of the crc32c vpmsum algorithm will > also work for a number of other CRC algorithms with different > polynomials. Factor out the function into a new asm file. > > To handle multiple users of the function, a user simply > provides

Re: [PATCH 3/3] powerpc/powernv: Introduce address translation services for Nvlink2

2017-03-24 Thread kbuild test robot
Hi Alistair, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.11-rc3 next-20170324] [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/commits/Alistair-Popple/drivers-of-base-c-Add

Re: [v7] powerpc/powernv: add hdat attribute to sysfs

2017-03-24 Thread kbuild test robot
Hi Matt, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.11-rc3 next-20170324] [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/commits/Matt-Brown/powerpc-powernv-add-hdat-attribute

Re: [PATCH 3/3] powerpc/powernv: Introduce address translation services for Nvlink2

2017-03-24 Thread Michael Ellerman
Alistair Popple writes: > diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h > index 6095575..fc61fca 100644 > --- a/arch/powerpc/include/asm/tlb.h > +++ b/arch/powerpc/include/asm/tlb.h > @@ -63,15 +63,21 @@ static inline void >

Re: [PATCH 2/5] KVM: PPC: Book3S: Add MMIO emulation for FP and VSX instructions

2017-03-24 Thread kbuild test robot
Hi Bin, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.11-rc3 next-20170324] [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/commits/Paul-Mackerras/KVM-PPC-Improve-MMIO-emulation

[RESEND PATCH v4 5/5] powerpc/fadump: update documentation about crashkernel parameter reuse

2017-03-24 Thread Hari Bathini
As we are reusing crashkernel parameter instead of fadump_reserve_mem parameter to specify the memory to reserve for fadump's crash kernel, update the documentation accordingly. Signed-off-by: Hari Bathini --- Documentation/powerpc/firmware-assisted-dump.txt | 23

[RESEND PATCH v4 3/5] powerpc/fadump: remove dependency with CONFIG_KEXEC

2017-03-24 Thread Hari Bathini
Now that crashkernel parameter parsing and vmcoreinfo related code is moved under CONFIG_CRASH_CORE instead of CONFIG_KEXEC_CORE, remove dependency with CONFIG_KEXEC for CONFIG_FA_DUMP. While here, get rid of definitions of fadump_append_elf_note() & fadump_final_note() functions to reuse similar

[RESEND PATCH v4 4/5] powerpc/fadump: reuse crashkernel parameter for fadump memory reservation

2017-03-24 Thread Hari Bathini
fadump supports specifying memory to reserve for fadump's crash kernel with fadump_reserve_mem kernel parameter. This parameter currently supports passing a fixed memory size, like fadump_reserve_mem= only. This patch aims to add support for other syntaxes like range-based memory size :[,:,:,...]

[RESEND PATCH v4 1/5] crash: move crashkernel parsing and vmcore related code under CONFIG_CRASH_CORE

2017-03-24 Thread Hari Bathini
Traditionally, kdump is used to save vmcore in case of a crash. Some architectures like powerpc can save vmcore using architecture specific support instead of kexec/kdump mechanism. Such architecture specific support also needs to reserve memory, to be used by dump capture kernel. crashkernel

[RESEND PATCH v4 2/5] ia64: reuse append_elf_note() and final_note() functions

2017-03-24 Thread Hari Bathini
Get rid of multiple definitions of append_elf_note() & final_note() functions. Reuse these functions compiled under CONFIG_CRASH_CORE Also, define Elf_Word and use it instead of generic u32 or the more specific Elf64_Word. Signed-off-by: Hari Bathini Acked-by: Dave

[RESEND PATCH v4 0/5] kexec/fadump: remove dependency with CONFIG_KEXEC and reuse crashkernel parameter for fadump

2017-03-24 Thread Hari Bathini
Traditionally, kdump is used to save vmcore in case of a crash. Some architectures like powerpc can save vmcore using architecture specific support instead of kexec/kdump mechanism. Such architecture specific support also needs to reserve memory, to be used by dump capture kernel. crashkernel

Re: [v1 0/5] parallelized "struct page" zeroing

2017-03-24 Thread Heiko Carstens
On Fri, Mar 24, 2017 at 09:51:09AM +0100, Christian Borntraeger wrote: > On 03/24/2017 12:01 AM, Pavel Tatashin wrote: > > When deferred struct page initialization feature is enabled, we get a > > performance gain of initializing vmemmap in parallel after other CPUs are > > started. However, we

[PATCH v2] ASoC: imx-wm8960: Let codec driver enable/disable its MCLK

2017-03-24 Thread Daniel Baluta
From: Daniel Baluta WM8962 needs its MCLK when powerup in wm8962_resume(). Thus it's better to control the MCLK in codec driver. Thus remove the clock enable in machine driver accordingly. While at it, get rid of imx_wm8962_remove function since it is now empty.

Re: [PATCH v3 06/10] VAS: Define helpers to alloc/free windows

2017-03-24 Thread Michael Neuling
On Thu, 2017-03-16 at 20:33 -0700, Sukadev Bhattiprolu wrote: > Define helpers to allocate/free VAS window objects. These will > be used in follow-on patches when opening/closing windows. > > Signed-off-by: Sukadev Bhattiprolu > --- >  drivers/misc/vas/vas-window.c |

Re: [v1 0/5] parallelized "struct page" zeroing

2017-03-24 Thread Christian Borntraeger
On 03/24/2017 12:01 AM, Pavel Tatashin wrote: > When deferred struct page initialization feature is enabled, we get a > performance gain of initializing vmemmap in parallel after other CPUs are > started. However, we still zero the memory for vmemmap using one boot CPU. > This patch-set fixes the

Re: [v2 PATCH] powernv-cpuidle: Validate DT property array size

2017-03-24 Thread Shilpasri G Bhat
On 03/15/2017 01:45 PM, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > The various properties associated with powernv idle states such as > names, flags, residency-ns, latencies-ns, psscr, psscr-mask are > exposed in the device-tree as property arrays such

Re: [PATCH v2 1/2] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration

2017-03-24 Thread Gautham R Shenoy
On Thu, Mar 23, 2017 at 8:52 PM, Vaidyanathan Srinivasan wrote: > drv->cpumask defaults to cpu_possible_mask in __cpuidle_driver_init(). > On PowerNV platform cpu_present could be less than cpu_possible in cases > where firmware detects the cpu, but it is not available

Re: [PATCH] ASoC: WM8962: Let codec driver enable/disable its MCLK

2017-03-24 Thread Nicolin Chen
On Fri, Mar 24, 2017 at 09:37:00AM +0200, Daniel Baluta wrote: > On Fri, Mar 24, 2017 at 6:58 AM, Nicolin Chen wrote: > > On Thu, Mar 23, 2017 at 02:01:50PM +0200, Daniel Baluta wrote: > >> From: Nicolin Chen > >> > >> WM8962 needs its MCLK when

Re: [PATCH] ASoC: WM8962: Let codec driver enable/disable its MCLK

2017-03-24 Thread Daniel Baluta
On Fri, Mar 24, 2017 at 6:58 AM, Nicolin Chen wrote: > On Thu, Mar 23, 2017 at 02:01:50PM +0200, Daniel Baluta wrote: >> From: Nicolin Chen >> >> WM8962 needs its MCLK when powerup in wm8962_resume(). Thus it's better >> to control the MCLK in codec

[PATCH kernel] KVM: PPC: Preserve storage control bits

2017-03-24 Thread Alexey Kardashevskiy
PR KVM page fault handler performs eaddr to pte translation for a guest, however kvmppc_mmu_book3s_64_xlate() does not preserve WIMG bits (storage control) in the kvmppc_pte struct. If PR KVM is running as a second level guest under HV KVM, and PR KVM tries inserting HPT entry, this fails in HV

[PATCH kernel] KVM: PPC: Exit KVM on failed mapping

2017-03-24 Thread Alexey Kardashevskiy
At the moment kvmppc_mmu_map_page() returns -1 if mmu_hash_ops.hpte_insert() fails for any reason so the page fault handler resumes the guest and it faults on the same address again. This adds distinction to kvmppc_mmu_map_page() to return -EIO if mmu_hash_ops.hpte_insert() failed for a reason

[PATCH kernel] KVM: PPC: Get rid of unused local variable

2017-03-24 Thread Alexey Kardashevskiy
@is_mmio has never been used since introduction in commit 2f4cf5e42d13 ("Add book3s.c") from 2009. Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/kvm/book3s_pr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c

[PATCH guest kernel] vfio/powerpc/spapr_tce: Enforce IOMMU type compatibility check

2017-03-24 Thread Alexey Kardashevskiy
The existing SPAPR TCE driver advertises both VFIO_SPAPR_TCE_IOMMU and VFIO_SPAPR_TCE_v2_IOMMU types to the userspace and the userspace usually picks the v2. Normally the userspace would create a container, attach an IOMMU group to it and only then set the IOMMU type (which would normally be v2).

[PATCH guest kernel] powerpc/pseries: Enable VFIO

2017-03-24 Thread Alexey Kardashevskiy
This enables VFIO on pseries host in order to allow VFIO in nested guest under PR KVM or DPDK in a HV guest. This adds support of the VFIO_SPAPR_TCE_IOMMU type. This adds exchange() callback to allow TCE updates by the SPAPR TCE IOMMU driver in VFIO. This initializes DMA32 window parameters in