Re: use generic DMA mapping code in powerpc V4

2018-12-06 Thread Christian Zigotzky
Good to know. Sorry because of the email. Sent from my iPhone > On 6. Dec 2018, at 20:36, Christoph Hellwig wrote: > >> On Thu, Dec 06, 2018 at 06:10:54PM +0100, Christian Zigotzky wrote: >> Please don’t merge this code. We are still testing and trying to figure out >> where the problems are

Re: [PATCH v4 0/5] powerpc: system call table generation support

2018-12-06 Thread Satheesh Rajendran
On Fri, Dec 07, 2018 at 11:41:35AM +0530, Firoz Khan wrote: > The purpose of this patch series is, we can easily > add/modify/delete system call table support by cha- > nging entry in syscall.tbl file instead of manually > changing many files. The other goal is to unify the > system call table

[PATCH -next] powerpc/mm: drop test in pp_601

2018-12-06 Thread YueHaibing
The test selects between two identical values, so it doesn't look useful. It turns out that the tested expression can only be true anyway, so drop the test, the corresponding parameter, and the corresponding argument at the only call site. The semantic match that finds this problem is as follows:

Re: [PATCH v4 0/5] powerpc: system call table generation support

2018-12-06 Thread Firoz Khan
++ sathn...@linux.vnet.ibm.com, Hi Satheesh, On Fri, 7 Dec 2018 at 11:42, Firoz Khan wrote: > > > Changes since v3: > - split compat syscall table out from native table. > - modified the script to add new line in the generated >file. I have fixed few major issue. Could you perform boot

[PATCH v4 5/5] powerpc: generate uapi header and system call table files

2018-12-06 Thread Firoz Khan
System call table generation script must be run to gener- ate unistd_32/64.h and syscall_table_32/64/c32/spu.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32/64.h and syscall_table- _32/64/c32/spu.h files by the syscall table generation

[PATCH v4 4/5] powerpc: split compat syscall table out from native table

2018-12-06 Thread Firoz Khan
PowerPC uses a syscall table with native and compat calls interleaved, which is a slightly simpler way to define two matching tables. As we move to having the tables generated, that advantage is no longer important, but the interleaved table gets in the way of using the same scripts as on the

[PATCH v4 3/5] powerpc: add system call table generation support

2018-12-06 Thread Firoz Khan
The system call tables are in different format in all architecture and it will be difficult to manually add or modify the system calls in the respective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify

[PATCH v4 2/5] powerpc: move macro definition from asm/systbl.h

2018-12-06 Thread Firoz Khan
Move the macro definition for compat_sys_sigsuspend from asm/systbl.h to the file which it is getting included. One of the patch in this patch series is generating uapi header and syscall table files. In order to come up with a common implimentation across all architecture, we need to do this

[PATCH v4 1/5] powerpc: add __NR_syscalls along with NR_syscalls

2018-12-06 Thread Firoz Khan
NR_syscalls macro holds the number of system call exist in powerpc architecture. We have to change the value of NR_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file

[PATCH v4 0/5] powerpc: system call table generation support

2018-12-06 Thread Firoz Khan
The purpose of this patch series is, we can easily add/modify/delete system call table support by cha- nging entry in syscall.tbl file instead of manually changing many files. The other goal is to unify the system call table generation support implementation across all the architectures. The

Re: [PATCH 0/8] KVM: PPC: Implement passthrough of emulated devices for nested guests

2018-12-06 Thread Suraj Jitindar Singh
On Fri, 2018-12-07 at 14:43 +1100, Suraj Jitindar Singh wrote: > This patch series allows for emulated devices to be passed through to > nested > guests, irrespective of at which level the device is being emulated. > > Note that the emulated device must be using dma, not virtio. > > For example,

[PATCH 8/8] KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L3 guest

2018-12-06 Thread Suraj Jitindar Singh
Previously when a device was being emulated by an L1 guest for an L2 guest, that device couldn't then be passed through to an L3 guest. This was because the L1 guest had no method for accessing L3 memory. The hcall H_COPY_TOFROM_GUEST provides this access. Thus this setup for passthrough can now

[PATCH 7/8] KVM: PPC: Introduce new hcall H_COPY_TOFROM_GUEST to access quadrants 1 & 2

2018-12-06 Thread Suraj Jitindar Singh
A guest cannot access quadrants 1 or 2 as this would result in an exception. Thus introduce the hcall H_COPY_TOFROM_GUEST to be used by a guest when it wants to perform an access to quadrants 1 or 2, for example when it wants to access memory for one of its nested guests. Also provide an

[PATCH 6/8] KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L2 guest

2018-12-06 Thread Suraj Jitindar Singh
Allow for a device which is being emulated at L0 (the host) for an L1 guest to be passed through to a nested (L2) guest. The existing kvmppc_hv_emulate_mmio function can be used here. The main challenge is that for a load the result must be stored into the L2 gpr, not an L1 gpr as would normally

[PATCH 5/8] KVM: PPC: Update kvmppc_st and kvmppc_ld to use quadrants

2018-12-06 Thread Suraj Jitindar Singh
The functions kvmppc_st and kvmppc_ld are used to access guest memory from the host using a guest effective address. They do so by translating through the process table to obtain a guest real address and then using kvm_read_guest or kvm_write_guest to make the access with the guest real address.

[PATCH 4/8] KVM: PPC: Add load_from_eaddr and store_to_eaddr to the kvmppc_ops struct

2018-12-06 Thread Suraj Jitindar Singh
The kvmppc_ops struct is used to store function pointers to kvm implementation specific functions. Introduce two new functions load_from_eaddr and store_to_eaddr to be used to load from and store to a guest effective address respectively. Also implement these for the kvm-hv module. If we are

[PATCH 3/8] KVM: PPC: Book3S HV: Implement functions to access quadrants 1 & 2

2018-12-06 Thread Suraj Jitindar Singh
The POWER9 radix mmu has the concept of quadrants. The quadrant number is the two high bits of the effective address and determines the fully qualified address to be used for the translation. The fully qualified address consists of the effective lpid, the effective pid and the effective address.

[PATCH 2/8] KVM: PPC: Book3S HV: Add function kvmhv_vcpu_is_radix()

2018-12-06 Thread Suraj Jitindar Singh
There exists a function kvm_is_radix() which is used to determine if a kvm instance is using the radix mmu. However this only applies to the first level (L1) guest. Add a function kvmhv_vcpu_is_radix() which can be used to determine if the current execution context of the vcpu is radix, accounting

[PATCH 1/8] KVM: PPC: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines

2018-12-06 Thread Suraj Jitindar Singh
The kvm capability KVM_CAP_SPAPR_TCE_VFIO is used to indicate the availability of in kernel tce acceleration for vfio. However it is currently the case that this is only available on a powernv machine, not for a pseries machine. Thus make this capability dependent on having the cpu feature

[PATCH] KVM: PPC: Book3S PR: Set hflag to indicate that POWER9 supports 1T segments

2018-12-06 Thread Suraj Jitindar Singh
When booting a kvm-pr guest on a POWER9 machine the following message is observed: "qemu-system-ppc64: KVM does not support 1TiB segments which guest expects" This is because the guest is expecting to be able to use 1T segments however we don't indicate support for it. This is because we don't

[PATCH 0/8] KVM: PPC: Implement passthrough of emulated devices for nested guests

2018-12-06 Thread Suraj Jitindar Singh
This patch series allows for emulated devices to be passed through to nested guests, irrespective of at which level the device is being emulated. Note that the emulated device must be using dma, not virtio. For example, passing through an emulated e1000: 1. Emulate the device at L(n) for L(n+1)

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-06 Thread Michael Ellerman
Christophe LEROY writes: > Le 05/12/2018 à 04:26, Michael Ellerman a écrit : >> Hi Dan, >> >> Thanks for the patch. >> >> Dan Carpenter writes: >>> The ipic_info[] array only has 95 elements so I have made the bounds >>> check smaller to prevent a read overflow. It was Smatch that found >>>

Re: linux-next: manual merge of the akpm-current tree with the powerpc tree

2018-12-06 Thread Joel Fernandes
On Thu, Dec 06, 2018 at 05:44:17PM +1100, Stephen Rothwell wrote: > Hi Andrew, > > Today's linux-next merge of the akpm-current tree got conflicts in: > > arch/powerpc/include/asm/book3s/32/pgalloc.h > arch/powerpc/include/asm/nohash/32/pgalloc.h > arch/powerpc/mm/pgtable-book3s64.c > >

Re: [PATCH v4] powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call

2018-12-06 Thread Dmitry V. Levin
On Mon, Dec 03, 2018 at 06:18:23AM +0300, Dmitry V. Levin wrote: > From: Elvira Khabirova > > Arch code should use tracehook_*() helpers, as documented > in include/linux/tracehook.h, > ptrace_report_syscall() is not expected to be used outside that file. > > Co-authored-by: Dmitry V. Levin >

Re: [PATCH v2 18/34] dt-bindings: arm: Convert FSL board/soc bindings to json-schema

2018-12-06 Thread Rob Herring
On Wed, Dec 5, 2018 at 8:32 PM Shawn Guo wrote: > > On Mon, Dec 03, 2018 at 03:32:07PM -0600, Rob Herring wrote: > > Convert Freescale SoC bindings to DT schema format using json-schema. > > > > Cc: Shawn Guo > > Cc: Mark Rutland > > Cc: devicet...@vger.kernel.org > > Signed-off-by: Rob Herring

Re: [PATCH v2 30/34] dt-bindings: arm: Convert Tegra board/soc bindings to json-schema

2018-12-06 Thread Rob Herring
On Tue, Dec 4, 2018 at 2:50 AM Thierry Reding wrote: > > On Mon, Dec 03, 2018 at 03:32:19PM -0600, Rob Herring wrote: > > Convert Tegra SoC bindings to DT schema format using json-schema. > > > > Cc: Mark Rutland > > Cc: Thierry Reding > > Cc: Jonathan Hunter > > Cc: devicet...@vger.kernel.org

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

2018-12-06 Thread kbuild test robot
Hi Aneesh, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.20-rc5 next-20181206] [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

Re: [PATCH v2 5/6] arch: simplify several early memory allocations

2018-12-06 Thread Mike Rapoport
On Thu, Dec 06, 2018 at 07:08:26PM +0100, Sam Ravnborg wrote: > On Mon, Dec 03, 2018 at 06:49:21PM +0200, Mike Rapoport wrote: > > On Mon, Dec 03, 2018 at 05:29:08PM +0100, Sam Ravnborg wrote: > > > Hi Mike. > > > > > > > index c37955d..2a17665 100644 > > > > --- a/arch/sparc/kernel/prom_64.c > >

Re: [PATCH v2 14/34] dt-bindings: arm: Convert Amlogic board/soc bindings to json-schema

2018-12-06 Thread Rob Herring
On Tue, Dec 4, 2018 at 8:44 AM Rob Herring wrote: > > On Tue, Dec 4, 2018 at 2:39 AM Neil Armstrong wrote: > > > > Hi Rob, > > > > You forgot linux-amlogic in CC... > > > > On 03/12/2018 22:32, Rob Herring wrote: > > > Convert Amlogic SoC bindings to DT schema format using json-schema. > > > > >

Re: [PATCH v2 2/2] kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops

2018-12-06 Thread Borislav Petkov
On Thu, Dec 06, 2018 at 08:07:40PM +, Christophe Leroy wrote: > checkpatch.pl reports the following: > > WARNING: struct kgdb_arch should normally be const > #28: FILE: arch/mips/kernel/kgdb.c:397: > +struct kgdb_arch arch_kgdb_ops = { > > This report makes sense, as all other ops

Applied "ASoC: Use of_node_name_eq for node name comparisons" to the asoc tree

2018-12-06 Thread Mark Brown
The patch ASoC: Use of_node_name_eq for node name comparisons has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and

Re: [PATCH 2/2] kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops

2018-12-06 Thread Christophe LEROY
Le 06/12/2018 à 15:07, Daniel Thompson a écrit : On Wed, Dec 05, 2018 at 04:41:11AM +, Christophe Leroy wrote: checkpatch.pl reports the following: WARNING: struct kgdb_arch should normally be const #28: FILE: arch/mips/kernel/kgdb.c:397: +struct kgdb_arch arch_kgdb_ops = {

Re: [PATCH 1/2] mips/kgdb: prepare arch_kgdb_ops for constness

2018-12-06 Thread Christophe LEROY
Le 06/12/2018 à 15:09, Daniel Thompson a écrit : On Wed, Dec 05, 2018 at 04:41:09AM +, Christophe Leroy wrote: MIPS is the only architecture modifying arch_kgdb_ops during init. This patch makes the init static, so that it can be changed to const in following patch, as recommended by

[PATCH v2 2/2] kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops

2018-12-06 Thread Christophe Leroy
checkpatch.pl reports the following: WARNING: struct kgdb_arch should normally be const #28: FILE: arch/mips/kernel/kgdb.c:397: +struct kgdb_arch arch_kgdb_ops = { This report makes sense, as all other ops struct, this one should also be const. This patch does the change. Cc: Vineet Gupta

[PATCH v2 1/2] mips/kgdb: prepare arch_kgdb_ops for constness

2018-12-06 Thread Christophe Leroy
MIPS is the only architecture modifying arch_kgdb_ops during init. This patch makes the init static, so that it can be changed to const in following patch, as recommended by checkpatch.pl Suggested-by: Paul Burton Acked-by: Daniel Thompson Acked-by: Paul Burton Signed-off-by: Christophe Leroy

Re: [PATCH v2 26/34] dt-bindings: arm: Convert Renesas board/soc bindings to json-schema

2018-12-06 Thread Rob Herring
On Wed, Dec 5, 2018 at 1:44 PM Simon Horman wrote: > > On Tue, Dec 04, 2018 at 09:08:57AM -0600, Rob Herring wrote: > > On Tue, Dec 4, 2018 at 8:57 AM Geert Uytterhoeven > > wrote: > > > > > > Hi Simon, > > > > > > On Tue, Dec 4, 2018 at 3:48 PM Simon Horman wrote: > > > > On Mon, Dec 03, 2018

Re: use generic DMA mapping code in powerpc V4

2018-12-06 Thread Christoph Hellwig
On Thu, Dec 06, 2018 at 06:10:54PM +0100, Christian Zigotzky wrote: > Please don’t merge this code. We are still testing and trying to figure out > where the problems are in the code. The ones I sent pings for were either tested successfully by you (the zone change) or are trivial cleanups that

Re: [PATCH v2 5/6] arch: simplify several early memory allocations

2018-12-06 Thread Sam Ravnborg
On Mon, Dec 03, 2018 at 06:49:21PM +0200, Mike Rapoport wrote: > On Mon, Dec 03, 2018 at 05:29:08PM +0100, Sam Ravnborg wrote: > > Hi Mike. > > > > > index c37955d..2a17665 100644 > > > --- a/arch/sparc/kernel/prom_64.c > > > +++ b/arch/sparc/kernel/prom_64.c > > > @@ -34,16 +34,13 @@ > > > > >

Re: [PATCH 1/2] mips/kgdb: prepare arch_kgdb_ops for constness

2018-12-06 Thread Paul Burton
Hi Christophe & Daniel, On Thu, Dec 06, 2018 at 02:09:02PM +, Daniel Thompson wrote: > On Wed, Dec 05, 2018 at 04:41:09AM +, Christophe Leroy wrote: > > MIPS is the only architecture modifying arch_kgdb_ops during init. > > This patch makes the init static, so that it can be changed to >

Re: [PATCH] pseries/hotplug: Add more delay in pseries_cpu_die while waiting for rtas-stop

2018-12-06 Thread Thiago Jung Bauermann
Hello Gautham, Gautham R. Shenoy writes: > From: "Gautham R. Shenoy" > > Currently running DLPAR offline/online operations in a loop on a > POWER9 system with SMT=off results in the following crash: > > [ 223.321032] cpu 112 (hwid 112) Ready to die... > [ 223.355963] Querying DEAD? cpu 113

Re: use generic DMA mapping code in powerpc V4

2018-12-06 Thread Christian Zigotzky
Please don’t merge this code. We are still testing and trying to figure out where the problems are in the code. — Christian Sent from my iPhone > On 6. Dec 2018, at 11:55, Christian Zigotzky wrote: > >> On 05 December 2018 at 3:05PM, Christoph Hellwig wrote: >> >> Thanks. Can you try a few

[PATCH] bpf: fix overflow of bpf_jit_limit when PAGE_SIZE >= 64K

2018-12-06 Thread Michael Roth
Commit ede95a63b5 introduced a bpf_jit_limit tuneable to limit BPF JIT allocations. At compile time it defaults to PAGE_SIZE * 4, and is adjusted again at init time if MODULES_VADDR is defined. For ppc64 kernels, MODULES_VADDR isn't defined, so we're stuck with the compile-time default at

Re: [PATCH bpf] bpf: fix default unprivileged allocation limit

2018-12-06 Thread Michael Roth
Quoting Sandipan Das (2018-12-06 03:27:32) > When using a large page size, the default value of the bpf_jit_limit > knob becomes invalid and users are not able to run unprivileged bpf > programs. > > The bpf_jit_limit knob is represented internally as a 32-bit signed > integer because of which

[PATCH v3 12/12] perf/core: remove unused perf_flags

2018-12-06 Thread Andrew Murray
Now that perf_flags is not used we remove it. Signed-off-by: Andrew Murray --- include/uapi/linux/perf_event.h | 2 -- tools/include/uapi/linux/perf_event.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

[PATCH v3 11/12] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For x86 PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v3 10/12] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NOEXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew Murray

[PATCH v3 09/12] powerpc: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For PowerPC PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew

[PATCH v3 08/12] drivers/perf: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v3 07/12] drivers/perf: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew Murray

[PATCH v3 06/12] arm: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew Murray

[PATCH v3 05/12] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2018-12-06 Thread Andrew Murray
The ARM PMU driver can be used to represent a variety of ARM based PMUs. Some of these PMUs do not provide support for context exclusion, where this is the case we advertise the PERF_PMU_CAP_NO_EXCLUDE capability to ensure that perf prevents us from handling events where any exclusion flags are

[PATCH v3 04/12] alpha: perf/core: use PERF_PMU_CAP_NO_EXCLUDE

2018-12-06 Thread Andrew Murray
As the Alpha PMU doesn't support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v3 03/12] perf/core: add PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs

2018-12-06 Thread Andrew Murray
Many PMU drivers do not have the capability to exclude counting events that occur in specific contexts such as idle, kernel, guest, etc. These drivers indicate this by returning an error in their event_init upon testing the events attribute flags. This approach is error prone and often

[PATCH v3 02/12] perf/core: add function to test for event exclusion flags

2018-12-06 Thread Andrew Murray
Add a function that tests if any of the perf event exclusion flags are set on a given event. Signed-off-by: Andrew Murray --- include/linux/perf_event.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 53c500f..b2e806f

[PATCH v3 01/12] perf/doc: update design.txt for exclude_{host|guest} flags

2018-12-06 Thread Andrew Murray
Update design.txt to reflect the presence of the exclude_host and exclude_guest perf flags. Signed-off-by: Andrew Murray --- tools/perf/design.txt | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/design.txt b/tools/perf/design.txt index a28dca2..0453ba2 100644 ---

[PATCH v3 00/12] perf/core: Generalise event exclusion checking

2018-12-06 Thread Andrew Murray
Many PMU drivers do not have the capability to exclude counting events that occur in specific contexts such as idle, kernel, guest, etc. These drivers indicate this by returning an error in their event_init upon testing the events attribute flags. However this approach requires that each time a

Re: [PATCH v2] misc: cxl: Use device_type helpers to access the node type

2018-12-06 Thread Frederic Barrat
Le 05/12/2018 à 20:16, Rob Herring a écrit : Remove directly accessing device_type property and use the of_node_is_type accessor instead. While not using it here, this is part of eventually removing the struct device_node.type pointer. Cc: Frederic Barrat Cc: Arnd Bergmann Cc: Greg

[PATCH 7/7] powerpc/mm: Fallback to RAM if the altmap is unusable

2018-12-06 Thread Oliver O'Halloran
The "altmap" is used to provide a pool of memory that is reserved for the vmemmap backing of hot-plugged memory. This is useful when adding large amount of ZONE_DEVICE memory to a system with a limited amount of normal memory. On ppc64 we use huge pages to map the vmemmap which requires the

[PATCH 6/7] powerpc/papr_scm: Use ibm,unit-guid as the iset cookie

2018-12-06 Thread Oliver O'Halloran
The interleave set cookie is used to determine if a label stored in the metadata space should be applied to the current region. This is important in the case of NVDIMMs since the firmware may change the interleaving configuration of a DIMM which would invalidate the existing labels. In our case

[PATCH 5/7] powerpc/papr_scm: Fix DIMM device registration race

2018-12-06 Thread Oliver O'Halloran
When a new nvdimm device is registered with libnvdimm via nvdimm_create() it is added as a device on the nvdimm bus. The probe function for the DIMM driver is potentially quite slow so actually registering and probing the device is done in an async domain rather than immediately after device

[PATCH 4/7] powerpc/papr_scm: Remove endian conversions

2018-12-06 Thread Oliver O'Halloran
The return values of a h-call are returned in the CPU registers and written to the provided buffer by the plpar_hcall() wrapper. As a result the values written to memory are always in the native endian and should not be byte swapped. The inital implementation of the H-Call interface was done in

[PATCH 3/7] powerpc/papr_scm: Update DT properties

2018-12-06 Thread Oliver O'Halloran
The ibm,unit-sizes property was originally specified as an array of two u32s corresponding to the memory block size, and the number of blocks available in that region. A fairly last-minute change to the SCM DT specification was splitting that into two seperate u64 properties: ibm,block-sizes and

[PATCH 2/7] powerpc/papr_scm: Fix resource end address

2018-12-06 Thread Oliver O'Halloran
Fix an off-by-one error in the memory resource range. This resource is used to determine the address range of the memory to be hot-plugged as ZONE_DEVICE memory. The current end address results in the kernel attempting to map an additional memblock and the hypervisor may reject the mapping

[PATCH 1/7] powerpc/papr_scm: Use depend instead of select

2018-12-06 Thread Oliver O'Halloran
Making PAPR_SCM select LIBNVDIMM results in circular dependencies in Kconfig when another symbol depends on it. Fix this by replacing the select with a depends. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Reported-by: Alastair D'Silva Signed-off-by: Oliver O'Halloran

papr SCM driver fixes

2018-12-06 Thread Oliver O'Halloran
Various bug fixes for the papr_scm driver that were found while bringing up the PowerVM implementation of the interface. There's a few minor bugs there were a result of bugs in the original QEMU implementation, a few due to the memory layouts being different and one due to a change to the DT

Re: [PATCH v2 08/34] dt-bindings: arm: Convert PMU binding to json-schema

2018-12-06 Thread Will Deacon
On Wed, Dec 05, 2018 at 09:42:04AM -0600, Rob Herring wrote: > On Wed, Dec 5, 2018 at 4:08 AM Will Deacon wrote: > > On Mon, Dec 03, 2018 at 03:31:57PM -0600, Rob Herring wrote: > > > +properties: > > > + compatible: > > > +oneOf: > > > + - items: > > > + - enum: > > > +

Re: [PATCH 08/34] powerpc/dma: untangle vio_dma_mapping_ops from dma_iommu_ops

2018-12-06 Thread Christoph Hellwig
ping? On Wed, Nov 14, 2018 at 09:22:48AM +0100, Christoph Hellwig wrote: > vio_dma_mapping_ops currently does a lot of indirect calls through > dma_iommu_ops, which not only make the code harder to follow but are > also expensive in the post-spectre world. Unwind the indirect calls > by calling

Re: [PATCH 14/34] powerpc/dart: remove dead cleanup code in iommu_init_early_dart

2018-12-06 Thread Christoph Hellwig
ping? On Wed, Nov 14, 2018 at 09:22:54AM +0100, Christoph Hellwig wrote: > If dart_init failed we didn't have a chance to setup dma or controller > ops yet, so there is no point in resetting them. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/sysdev/dart_iommu.c | 11 +-- >

Re: [PATCH 19/34] cxl: drop the dma_set_mask callback from vphb

2018-12-06 Thread Christoph Hellwig
ping? On Wed, Nov 14, 2018 at 09:22:59AM +0100, Christoph Hellwig wrote: > The CXL code never even looks at the dma mask, so there is no good > reason for this sanity check. Remove it because it gets in the way > of the dma ops refactoring. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH 06/34] powerpc/dma: split the two __dma_alloc_coherent implementations

2018-12-06 Thread Christoph Hellwig
ping? On Wed, Nov 14, 2018 at 09:22:46AM +0100, Christoph Hellwig wrote: > The implemementation for the CONFIG_NOT_COHERENT_CACHE case doesn't share > any code with the one for systems with coherent caches. Split it off > and merge it with the helpers in dma-noncoherent.c that have no other >

Re: [PATCH 07/34] powerpc/dma: remove the no-op dma_nommu_unmap_{page, sg} routines

2018-12-06 Thread Christoph Hellwig
ping? On Wed, Nov 14, 2018 at 09:22:47AM +0100, Christoph Hellwig wrote: > These methods are optional, no need to implement no-op versions. > > Signed-off-by: Christoph Hellwig > Acked-by: Benjamin Herrenschmidt > --- > arch/powerpc/kernel/dma.c | 16 > 1 file changed, 16

Re: [PATCH 03/34] powerpc/dma: remove the unused ARCH_HAS_DMA_MMAP_COHERENT define

2018-12-06 Thread Christoph Hellwig
ping? On Wed, Nov 14, 2018 at 09:22:43AM +0100, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Acked-by: Benjamin Herrenschmidt > --- > arch/powerpc/include/asm/dma-mapping.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/powerpc/include/asm/dma-mapping.h >

Re: [PATCH 04/34] powerpc/dma: remove the unused ISA_DMA_THRESHOLD export

2018-12-06 Thread Christoph Hellwig
ping? On Wed, Nov 14, 2018 at 09:22:44AM +0100, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Acked-by: Benjamin Herrenschmidt > --- > arch/powerpc/kernel/setup_32.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/powerpc/kernel/setup_32.c

Re: [PATCH 05/34] powerpc/dma: remove the unused dma_iommu_ops export

2018-12-06 Thread Christoph Hellwig
ping? On Wed, Nov 14, 2018 at 09:22:45AM +0100, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/kernel/dma-iommu.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c > index

Re: [PATCH 01/34] powerpc: use mm zones more sensibly

2018-12-06 Thread Christoph Hellwig
Ben / Michael, can we get this one queued up for 4.21 to prepare for the DMA work later on? On Wed, Nov 14, 2018 at 09:22:41AM +0100, Christoph Hellwig wrote: > Powerpc has somewhat odd usage where ZONE_DMA is used for all memory on > common 64-bit configfs, and ZONE_DMA32 is used for 31-bit

Re: [PATCH 02/34] powerpc: allow NOT_COHERENT_CACHE for amigaone

2018-12-06 Thread Christoph Hellwig
powerpc maintainers, can you pick this up as this is a bug fix for the currently existing powerpc Kconfig code? On Wed, Nov 14, 2018 at 09:22:42AM +0100, Christoph Hellwig wrote: > AMIGAONE select NOT_COHERENT_CACHE, so we better allow it. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH 1/2] mips/kgdb: prepare arch_kgdb_ops for constness

2018-12-06 Thread Daniel Thompson
On Wed, Dec 05, 2018 at 04:41:09AM +, Christophe Leroy wrote: > MIPS is the only architecture modifying arch_kgdb_ops during init. > This patch makes the init static, so that it can be changed to > const in following patch, as recommended by checkpatch.pl > > Suggested-by: Paul Burton >

Re: [PATCH 2/2] kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops

2018-12-06 Thread Daniel Thompson
On Wed, Dec 05, 2018 at 04:41:11AM +, Christophe Leroy wrote: > checkpatch.pl reports the following: > > WARNING: struct kgdb_arch should normally be const > #28: FILE: arch/mips/kernel/kgdb.c:397: > +struct kgdb_arch arch_kgdb_ops = { > > This report makes sense, as all other ops

Re: [PATCH] ASoC: Use of_node_name_eq for node name comparisons

2018-12-06 Thread Rob Herring
On Wed, Dec 5, 2018 at 7:53 PM Nicolin Chen wrote: > > Hi Rob, > > On Thu, Dec 6, 2018 at 3:51 AM Rob Herring wrote: > > > > Convert string compares of DT node names to use of_node_name_eq helper > > instead. This removes direct access to the node name pointer. > > > > For the FSL ASoC card, the

[Resend PATCH V5 7/10] KVM: Make kvm_set_spte_hva() return int

2018-12-06 Thread lantianyu1986
From: Lan Tianyu The patch is to make kvm_set_spte_hva() return int and caller can check return value to determine flush tlb or not. Signed-off-by: Lan Tianyu --- arch/arm/include/asm/kvm_host.h | 2 +- arch/arm64/include/asm/kvm_host.h | 2 +- arch/mips/include/asm/kvm_host.h| 2 +-

[Resend PATCH V5 6/10] KVM: Replace old tlb flush function with new one to flush a specified range.

2018-12-06 Thread lantianyu1986
From: Lan Tianyu This patch is to replace kvm_flush_remote_tlbs() with kvm_flush_ remote_tlbs_with_address() in some functions without logic change. Signed-off-by: Lan Tianyu --- arch/x86/kvm/mmu.c | 31 +-- arch/x86/kvm/paging_tmpl.h | 3 ++- 2 files

[Resend PATCH V5 5/10] KVM/MMU: Add tlb flush with range helper function

2018-12-06 Thread lantianyu1986
From: Lan Tianyu This patch is to add wrapper functions for tlb_remote_flush_with_range callback and flush tlb directly in kvm_mmu_zap_collapsible_spte(). kvm_mmu_zap_collapsible_spte() returns flush request to the slot_handle_leaf() and the latter does flush on demand. When range flush is

[Resend PATCH V5 4/10] KVM/VMX: Add hv tlb range flush support

2018-12-06 Thread lantianyu1986
From: Lan Tianyu This patch is to register tlb_remote_flush_with_range callback with hv tlb range flush interface. Signed-off-by: Lan Tianyu --- Change since v4: - Use new function kvm_fill_hv_flush_list_func() to fill flush request. Change since v3: - Merge Vitaly's

[Resend PATCH V5 3/10] x86/Hyper-v: Add trace in the hyperv_nested_flush_guest_mapping_range()

2018-12-06 Thread lantianyu1986
From: Lan Tianyu This patch is to trace log in the hyperv_nested_flush_ guest_mapping_range(). Signed-off-by: Lan Tianyu --- arch/x86/hyperv/nested.c| 1 + arch/x86/include/asm/trace/hyperv.h | 14 ++ 2 files changed, 15 insertions(+) diff --git

[Resend PATCH V5 2/10] x86/hyper-v: Add HvFlushGuestAddressList hypercall support

2018-12-06 Thread lantianyu1986
From: Lan Tianyu Hyper-V provides HvFlushGuestAddressList() hypercall to flush EPT tlb with specified ranges. This patch is to add the hypercall support. Reviewed-by: Michael Kelley Signed-off-by: Lan Tianyu --- Change sincd v4: - Expose function hyperv_fill_flush_guest_mapping_list()

[Resend PATCH V5 1/10] KVM: Add tlb_remote_flush_with_range callback in kvm_x86_ops

2018-12-06 Thread lantianyu1986
From: Lan Tianyu Add flush range call back in the kvm_x86_ops and platform can use it to register its associated function. The parameter "kvm_tlb_range" accepts a single range and flush list which contains a list of ranges. Signed-off-by: Lan Tianyu --- Change since v1: Change "end_gfn"

[Resend PATCH V5 0/10] x86/KVM/Hyper-v: Add HV ept tlb range flush hypercall support in KVM

2018-12-06 Thread lantianyu1986
From: Lan Tianyu For nested memory virtualization, Hyper-v doesn't set write-protect L1 hypervisor EPT page directory and page table node to track changes while it relies on guest to tell it changes via HvFlushGuestAddressLlist hypercall. HvFlushGuestAddressLlist hypercall provides a way to

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-06 Thread Dan Carpenter
On Wed, Dec 05, 2018 at 02:26:47PM +1100, Michael Ellerman wrote: > Can smatch help us find things like this that are defined non-static but > never used? > It's too tricky because it depends on the .config as well. regards, dan carpenter

[PATCH] pseries/hotplug: Add more delay in pseries_cpu_die while waiting for rtas-stop

2018-12-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently running DLPAR offline/online operations in a loop on a POWER9 system with SMT=off results in the following crash: [ 223.321032] cpu 112 (hwid 112) Ready to die... [ 223.355963] Querying DEAD? cpu 113 (113) shows 2 [ 223.356233] cpu 114 (hwid 114) Ready to

RE: [v11 1/7] dmaengine: fsldma: Replace DMA_IN/OUT by FSL_DMA_IN/OUT

2018-12-06 Thread Peng Ma
Hi Vinod, Thanks for your apply, I have finished update DTS patch, please review. Best Regards, Peng >-Original Message- >From: Vinod Koul >Sent: 2018年12月6日 1:49 >To: Peng Ma >Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo >Li ;

RE: [v11 6/7] arm64: dts: ls1046a: add qdma device tree nodes

2018-12-06 Thread Peng Ma
Hi Shawn, Thanks for your review , I have used GIC_SPI and IRQ_TYPE_xxx to my dtsi, please check and review. Best Regard, Peng >-Original Message- >From: Shawn Guo >Sent: 2018年12月6日 9:06 >To: Peng Ma >Cc: vk...@kernel.org; robh...@kernel.org; mark.rutl...@arm.com; Leo

Re: use generic DMA mapping code in powerpc V4

2018-12-06 Thread Christian Zigotzky
On 05 December 2018 at 3:05PM, Christoph Hellwig wrote: Thanks. Can you try a few stepping points in the tree? First just with commit 7fd3bb05b73beea1f9840b505aa09beb9c75a8c6 (the first one) applied? Second with all commits up to 5da11e49df21f21dac25a2491aa788307bdacb6b And if that still

Re: [PATCH RFC 7/7] mm: better document PG_reserved

2018-12-06 Thread David Hildenbrand
On 05.12.18 19:13, David Hildenbrand wrote: > On 05.12.18 18:32, Matthew Wilcox wrote: >> On Wed, Dec 05, 2018 at 04:05:12PM +0100, David Hildenbrand wrote: >>> On 05.12.18 15:35, Matthew Wilcox wrote: On Wed, Dec 05, 2018 at 01:28:51PM +0100, David Hildenbrand wrote: > I don't see a

Re: [PATCH v2 17/34] dt-bindings: arm: Convert TI davinci board/soc bindings to json-schema

2018-12-06 Thread Sekhar Nori
On 04/12/18 3:02 AM, Rob Herring wrote: > Convert TI Davinci SoC bindings to DT schema format using json-schema. > > Cc: Sekhar Nori > Cc: Kevin Hilman > Cc: Mark Rutland > Cc: devicet...@vger.kernel.org > Signed-off-by: Rob Herring Reviewed-by: Sekhar Nori Thanks, Sekhar

Re: [PATCH] ALSA: Use of_node_name_eq for node name comparisons

2018-12-06 Thread Takashi Iwai
On Wed, 05 Dec 2018 20:50:46 +0100, Rob Herring wrote: > > Convert string compares of DT node names to use of_node_name_eq helper > instead. This removes direct access to the node name pointer. > > A couple of open coded iterating thru the child node names are converted > to use

Re: [PATCH] ALSA: soundbus: Remove direct OF name and type accesses

2018-12-06 Thread Takashi Iwai
On Wed, 05 Dec 2018 20:50:48 +0100, Rob Herring wrote: > > Convert soundbus uevent and sysfs OF node name and device type usage to > use printf specifier and helper functions instead of directly accessing > the name and type pointers. This will allow the eventual removal of the > pointers. > >

[PATCH bpf] bpf: fix default unprivileged allocation limit

2018-12-06 Thread Sandipan Das
When using a large page size, the default value of the bpf_jit_limit knob becomes invalid and users are not able to run unprivileged bpf programs. The bpf_jit_limit knob is represented internally as a 32-bit signed integer because of which the default value, i.e. PAGE_SIZE * 4, overflows in

[PATCH bpf] bpf: powerpc: fix broken uapi for BPF_PROG_TYPE_PERF_EVENT

2018-12-06 Thread Sandipan Das
Now that there are different variants of pt_regs for userspace and kernel, the uapi for the BPF_PROG_TYPE_PERF_EVENT program type must be changed by exporting the user_pt_regs structure instead of the pt_regs structure that is in-kernel only. Fixes: 002af9391bfb ("powerpc: Split user/kernel

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-06 Thread Julia Lawall
On Thu, 6 Dec 2018, Christophe LEROY wrote: > > > Le 05/12/2018 à 04:26, Michael Ellerman a écrit : > > Hi Dan, > > > > Thanks for the patch. > > > > Dan Carpenter writes: > > > The ipic_info[] array only has 95 elements so I have made the bounds > > > check smaller to prevent a read overflow.