Re: [PATCH 09/15] cxl: Add kernel APIs to get & set the max irqs per context

2016-07-11 Thread Andrew Donnellan
On 11/07/16 21:50, Ian Munsie wrote: From: Ian Munsie These APIs will be used by the Mellanox CX4 support. While they function standalone to configure existing behaviour, their primary purpose is to allow the Mellanox driver to inform the cxl driver of a hardware

Re: [PATCH v3 0/7] PCI: Add support for enforcing all MMIO BARs not to share PAGE_SIZE

2016-07-11 Thread Yongji Xie
Hi Bjorn, Any comment on V3? Thanks, Yongji On 2016/6/30 18:53, Yongji Xie wrote: This series aims to add an option for PCI resource allocator to force BARs not to share PAGE_SIZE. This would make sense to VFIO driver. Because current VFIO implementation disallows to mmap sub-page(size <

Re: [PATCH] include: mman: Use bool instead of int for the return value of arch_validate_prot

2016-07-11 Thread Michael Ellerman
Chen Gang writes: > On 7/11/16 07:47, Dave Hansen wrote: >> On 07/09/2016 09:29 AM, cheng...@emindsoft.com.cn wrote: >>> -static inline int arch_validate_prot(unsigned long prot) >>> +static inline bool arch_validate_prot(unsigned long prot) >>> { >>> if (prot &

Re: [PATCH] powerpc/configs: Enable VMX crypto

2016-07-11 Thread Michael Ellerman
Anton Blanchard writes: > Hi Steven, > >> Not in ppc64_defconfig? > > Good point. The recent addition of powernv_defconfig made me forget > about ppc64_defconfig. We could do with some rationalisation here. Understatement of the century. > pseries isn't really pseries, perhaps

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-11 Thread Juergen Gross
On 11/07/16 17:10, Waiman Long wrote: > On 07/06/2016 02:52 AM, Peter Zijlstra wrote: >> On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: >>> change fomr v1: >>> a simplier definition of default vcpu_is_preempted >>> skip mahcine type check on ppc, and add config. remove

Re: [PATCH v5] tools/perf: Fix the mask in regs_dump__printf and print_sample_iregs

2016-07-11 Thread Madhavan Srinivasan
Hi Arnaldo, Any updates for this fix. Kindly let me know. Maddy On Tuesday 28 June 2016 02:24 PM, Jiri Olsa wrote: > On Thu, Jun 23, 2016 at 11:19:27AM +0530, Madhavan Srinivasan wrote: > > SNIP > >> Changelog v1: >> 1)updated commit message and patch subject >> 2)Add the fix to

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-11 Thread Arnaldo Carvalho de Melo
Em Tue, Jul 12, 2016 at 07:51:46AM +0530, Ravi Bangoria escreveu: > Hi Arnaldo, > > On Friday 08 July 2016 02:01 PM, Michael Ellerman wrote: > > Ravi Bangoria writes: > > > > > On Wednesday 06 July 2016 03:38 PM, Michael Ellerman wrote: > > > > > > I've sent

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-11 Thread Ravi Bangoria
Hi Arnaldo, On Friday 08 July 2016 02:01 PM, Michael Ellerman wrote: Ravi Bangoria writes: On Wednesday 06 July 2016 03:38 PM, Michael Ellerman wrote: I've sent v4 which enables annotate for bctr' instructions. for 'bctr', it will show down arrow(indicate

Re: [v4] powerpc: Export thread_struct.used_vr/used_vsr to user space

2016-07-11 Thread Simon Guo
On Fri, Jul 08, 2016 at 08:02:42PM +1000, Michael Ellerman wrote: > Benjamin Herrenschmidt writes: > > > On Thu, 2016-07-07 at 23:21 +1000, Benjamin Herrenschmidt wrote: > >>  > >> I think the right fix is that if a restore_sigcontext() has the MSR > >> bits set, > >>

[RFC 3/3] kexec: extend kexec_file_load system call

2016-07-11 Thread AKASHI Takahiro
Device tree blob must be passed to a second kernel on DTB-capable archs, like powerpc and arm64, but the current kernel interface lacks this support. This patch extends kexec_file_load system call by adding an extra argument to this syscall so that an arbitrary number of file descriptors can be

[RFC 2/3] kexec: add dtb info to struct kimage

2016-07-11 Thread AKASHI Takahiro
Device tree blob must be passed to a second kernel on DTB-capable archs, like powerpc and arm64, but the current kernel interface lacks this support. This patch adds dtb buffer information to struct kimage. When users don't specify dtb explicitly and the one used for the current kernel can be

[RFC 1/3] syscall: add kexec_file_load to generic unistd.h

2016-07-11 Thread AKASHI Takahiro
Currently kexec_file_load is supported only on x86, but it will be supported on powerpc and arm64 in near future. Since both archs use asm-generic/unistd.h, this patch adds the entry to this file. Signed-off-by: AKASHI Takahiro --- include/uapi/asm-generic/unistd.h |

[RFC 0/3] extend kexec_file_load system call

2016-07-11 Thread AKASHI Takahiro
Device tree blob must be passed to a second kernel on DTB-capable archs, like powerpc and arm64, but the current kernel interface lacks this support. This patch extends kexec_file_load system call by adding an extra argument to this syscall so that an arbitrary number of file descriptors can be

Re: [PATCH 14/14] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-11 Thread Andrew Donnellan
On 11/07/16 19:19, Ian Munsie wrote: I like this solution, but I'm not going to include it in v2 of this series and would rather it be submitted separately. The reason being is that this series will work as is, and I'd like to see this undergo some regression testing separate to the cx4 work,

[PATCH v2 5/5] powerpc/sparse: Make ppc_md.{halt, restart} __noreturn

2016-07-11 Thread Daniel Axtens
PowerNV marks it's halt and restart calls as __noreturn. However, ppc_md does not have this annotation. Add the annotation to ppc_md, and then to every halt/restart function that is missing it. Additionally, I have verified that all of these functions do not return. Occasionally I have added a

[PATCH v2 4/5] powerpc/sparse: Pass endianness to sparse

2016-07-11 Thread Daniel Axtens
Explicitly give sparse an endianness in the Makefile, so that it doesn't get confused. Normally we have #ifdef one and #else the other, so it doesn't usually matter, but we have been bitten by it before, and indeed this patch fixes a number of sparse errors. Suggested-by: Arnd Bergmann

[PATCH v2 3/5] powerpc/kernel: Clean up some sparse warnings

2016-07-11 Thread Daniel Axtens
In hw_breakpoint.c, mark a user NIP as __user before passing it to __get_user_inatomic. In process.c, 7b051f665c32 ("powerpc: Use probe_kernel_address in show_instructions") changed a call from __get_user to probe_kernel_address. The address space annotations for that are different: it no longer

[PATCH v2 2/5] powerpc/xics: Fully qualify cast to silence sparse

2016-07-11 Thread Daniel Axtens
Make the cast fully line up with what out_rm8 expects. Signed-off-by: Daniel Axtens --- v2: Fix issues identified by Arnd. --- arch/powerpc/sysdev/xics/icp-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/xics/icp-native.c

[PATCH v2 1/5] powerpc/kvm: Clarify __user annotations

2016-07-11 Thread Daniel Axtens
kvmppc_h_put_tce_indirect labels a u64 pointer as __user. It also labelled the u64 where get_user puts the result as __user. This isn't a pointer and so doesn't need to be labelled __user. Split the u64 value definition onto a new line to make it clear that it doesn't get the annotation.

[PATCH] powerpc/configs: Enable VMX crypto

2016-07-11 Thread Anton Blanchard
From: Anton Blanchard We see big improvements with the VMX crypto functions (often 10x or more), so enable it as a module. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/powernv_defconfig | 2 ++ arch/powerpc/configs/ppc64_defconfig | 2 ++

Re: [PATCH] powerpc/configs: Enable VMX crypto

2016-07-11 Thread Anton Blanchard via Linuxppc-dev
Hi Steven, > Not in ppc64_defconfig? Good point. The recent addition of powernv_defconfig made me forget about ppc64_defconfig. We could do with some rationalisation here. pseries isn't really pseries, perhaps we should call it ibm_defconfig, or maybe server_deconfig. ppc64_defconfig continues

Re: [PATCH 1/2] crypto: vmx - Adding asm subroutines for XTS

2016-07-11 Thread Stephen Rothwell
Hi Paulo, On Mon, 11 Jul 2016 16:07:39 -0300 Paulo Flabiano Smorigo wrote: > > diff --git a/drivers/crypto/vmx/aesp8-ppc.pl b/drivers/crypto/vmx/aesp8-ppc.pl > index 2280539..813ffcc 100644 > --- a/drivers/crypto/vmx/aesp8-ppc.pl > +++

Re: [PATCH] powerpc/configs: Enable VMX crypto

2016-07-11 Thread Stephen Rothwell
Hi Anton, On Tue, 12 Jul 2016 09:25:21 +1000 Anton Blanchard wrote: > > From: Anton Blanchard > > We see big improvements with the VMX crypto functions (often 10x or more), > so enable it as a module. > > Signed-off-by: Anton Blanchard >

[PATCH] powerpc/configs: Enable VMX crypto

2016-07-11 Thread Anton Blanchard
From: Anton Blanchard We see big improvements with the VMX crypto functions (often 10x or more), so enable it as a module. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/powernv_defconfig | 2 ++ arch/powerpc/configs/pseries_defconfig | 2 ++ 2 files

[Patch v2] rpaphp: fix slot registration for multiple slots under a PHB

2016-07-11 Thread Tyrel Datwyler
PowerVM seems to only ever provide a single hotplug slot per PHB. The under lying slot hotplug registration code assumed multiple slots, but the actual implementation is broken for multiple slots. This went unnoticed for years due to the nature of PowerVM as mentioned previously. Under qemu/kvm

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-11 Thread David Matlack via Linuxppc-dev
On Mon, Jul 11, 2016 at 12:31 PM, Paolo Bonzini wrote: > > > On 11/07/2016 19:30, David Matlack wrote: >> On Mon, Jul 11, 2016 at 10:05 AM, Paolo Bonzini wrote: >>> >>> >>> On 11/07/2016 18:51, David Matlack wrote: >> vcpus have statistics associated

[PATCH 2/2] crypto: vmx - Adding support for XTS

2016-07-11 Thread Paulo Flabiano Smorigo
From: "Leonidas S. Barbosa" This patch add XTS support using VMX-crypto driver. Signed-off-by: Leonidas S. Barbosa Signed-off-by: Paulo Flabiano Smorigo --- drivers/crypto/vmx/Makefile | 2 +-

[PATCH 1/2] crypto: vmx - Adding asm subroutines for XTS

2016-07-11 Thread Paulo Flabiano Smorigo
This patch add XTS subroutines using VMX-crypto driver. It gives a boost of 20 times using XTS. These code has been adopted from OpenSSL project in collaboration with the original author (Andy Polyakov ). Signed-off-by: Leonidas S. Barbosa

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-11 Thread David Matlack
On Mon, Jul 11, 2016 at 10:05 AM, Paolo Bonzini wrote: > > > On 11/07/2016 18:51, David Matlack wrote: >>> > vcpus have statistics associated with them which can be viewed within the >>> > debugfs. Currently it is assumed within the vcpu_stat_get() and >>> >

Re: [PATCH V2 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-11 Thread David Matlack via Linuxppc-dev
On Mon, Jul 11, 2016 at 10:07 AM, Paolo Bonzini wrote: > > > On 11/07/2016 18:57, David Matlack wrote: >> On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh >> wrote: >> > This patch introduces new halt polling functionality into the kvm_hv

Re: [PATCH V2 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-11 Thread David Matlack via Linuxppc-dev
On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh wrote: > This patch introduces new halt polling functionality into the kvm_hv kernel > module. When a vcore is idle it will poll for some period of time before > scheduling itself out. Is there any way to reuse the

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-11 Thread David Matlack
On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh wrote: > vcpus have statistics associated with them which can be viewed within the > debugfs. Currently it is assumed within the vcpu_stat_get() and > vcpu_stat_get_per_vm() functions that all of these statistics are

Re: [PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-11 Thread David Matlack via Linuxppc-dev
On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh wrote: > vcpu stats are used to collect information about a vcpu which can be viewed > in the debugfs. For example halt_attempted_poll and halt_successful_poll > are used to keep track of the number of times the vcpu

[PATCH v5 18/32] signal: Consolidate {TS,TLF}_RESTORE_SIGMASK code

2016-07-11 Thread Andy Lutomirski
In general, there's no need for the "restore sigmask" flag to live in ti->flags. alpha, ia64, microblaze, powerpc, sh, sparc (64-bit only), tile, and x86 use essentially identical alternative implementations, placing the flag in ti->status. Replace those optimized implementations with an equally

Re: [PATCH 2/2] crypto: vmx - Adding support for XTS

2016-07-11 Thread Stephan Mueller
Am Montag, 11. Juli 2016, 16:07:40 CEST schrieb Paulo Flabiano Smorigo: Hi Paulo, > From: "Leonidas S. Barbosa" > > This patch add XTS support using VMX-crypto driver. > > Signed-off-by: Leonidas S. Barbosa > Signed-off-by: Paulo

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-11 Thread Paolo Bonzini
On 11/07/2016 19:30, David Matlack wrote: > On Mon, Jul 11, 2016 at 10:05 AM, Paolo Bonzini wrote: >> >> >> On 11/07/2016 18:51, David Matlack wrote: > vcpus have statistics associated with them which can be viewed within the > debugfs. Currently it is assumed

Re: [PATCH v2] cpufreq: powernv: Replacing pstate_id with frequency table index

2016-07-11 Thread Viresh Kumar
On 30-06-16, 11:53, Akshay Adiga wrote: > Refactoring code to use frequency table index instead of pstate_id. > This abstraction will make the code independent of the pstate values. > > - No functional changes > - The highest frequency is at frequency table index 0 and the frequency > decreases

Re: [PATCH 0/9] mm: Hardened usercopy

2016-07-11 Thread Kees Cook
On Sun, Jul 10, 2016 at 8:38 AM, Andy Lutomirski wrote: > On Sun, Jul 10, 2016 at 5:03 AM, PaX Team wrote: >> On 10 Jul 2016 at 11:16, Ingo Molnar wrote: >> >>> * PaX Team wrote: >>> >>> > On 9 Jul 2016 at 14:27, Andy Lutomirski

Re: [PATCH 0/9] mm: Hardened usercopy

2016-07-11 Thread Kees Cook
On Sun, Jul 10, 2016 at 8:03 AM, PaX Team wrote: > i note that this analysis is also missing from this USERCOPY submission except > for stating what Kees assumed about USERCOPY (and apparently noone could be > bothered to read the original Kconfig help of it which clearly

Re: t1040 IFC flash driver Extended Chip Select

2016-07-11 Thread Scott Wood
On 07/11/2016 12:10 PM, Daniel Walker wrote: > On 07/11/2016 09:55 AM, Scott Wood wrote: >> On 07/11/2016 11:36 AM, Daniel Walker wrote: >>> On 07/08/2016 06:12 PM, Scott Wood wrote: On 07/07/2016 06:48 PM, Daniel Walker wrote: > On 07/07/2016 03:37 PM, Scott Wood wrote: >> On

Re: t1040 IFC flash driver Extended Chip Select

2016-07-11 Thread Scott Wood
On 07/11/2016 11:36 AM, Daniel Walker wrote: > On 07/08/2016 06:12 PM, Scott Wood wrote: >> On 07/07/2016 06:48 PM, Daniel Walker wrote: >>> On 07/07/2016 03:37 PM, Scott Wood wrote: On 07/07/2016 05:01 PM, Daniel Walker wrote: > On 07/07/2016 02:59 PM, Scott Wood wrote: >> On

Re: t1040 IFC flash driver Extended Chip Select

2016-07-11 Thread Daniel Walker
On 07/11/2016 09:55 AM, Scott Wood wrote: On 07/11/2016 11:36 AM, Daniel Walker wrote: On 07/08/2016 06:12 PM, Scott Wood wrote: On 07/07/2016 06:48 PM, Daniel Walker wrote: On 07/07/2016 03:37 PM, Scott Wood wrote: On 07/07/2016 05:01 PM, Daniel Walker wrote: On 07/07/2016 02:59 PM, Scott

Re: [PATCH V2 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-11 Thread Paolo Bonzini
On 11/07/2016 18:57, David Matlack wrote: > On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh > wrote: > > This patch introduces new halt polling functionality into the kvm_hv kernel > > module. When a vcore is idle it will poll for some period of time before > >

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-11 Thread Paolo Bonzini
On 11/07/2016 18:51, David Matlack wrote: >> > vcpus have statistics associated with them which can be viewed within the >> > debugfs. Currently it is assumed within the vcpu_stat_get() and >> > vcpu_stat_get_per_vm() functions that all of these statistics are >> > represented as 32-bit numbers.

Re: t1040 IFC flash driver Extended Chip Select

2016-07-11 Thread Daniel Walker
On 07/08/2016 06:12 PM, Scott Wood wrote: On 07/07/2016 06:48 PM, Daniel Walker wrote: On 07/07/2016 03:37 PM, Scott Wood wrote: On 07/07/2016 05:01 PM, Daniel Walker wrote: On 07/07/2016 02:59 PM, Scott Wood wrote: On 07/07/2016 04:49 PM, Daniel Walker wrote: On 07/07/2016 02:23 PM, Scott

Re: [PATCH 1/2] powerpc/pseries: Implemented indexed-count hotplug memory add

2016-07-11 Thread Tyrel Datwyler
On 06/30/2016 12:22 PM, Sahil Mehta wrote: > Indexed-count add for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be assigned (NOT > that lmbs will be added). Because of Qemu's per-DIMM memory > management, the addition of a contiguous block of memory

Re: [PATCH 3/3] powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events

2016-07-11 Thread Nathan Fontenot
On 07/07/2016 10:05 AM, John Allen wrote: > The sysfs interface used to handle PowerVM hotplug events should use the > hotplug queue as well. PRRN events will soon be placing many hotplug > events on the queue at once and we will need ordinary hotplug events to > use the queue as well in order to

Re: [PATCH 2/3] powerpc/pseries: Add support for hotplug interrupt source

2016-07-11 Thread Nathan Fontenot
On 07/07/2016 10:03 AM, John Allen wrote: > Add handler for new hotplug interrupt. For memory and CPU hotplug events, > we will add the hotplug errorlog to the hotplug workqueue. Since PCI > hotplug is not currently supported in the kernel, PCI hotplug events are > written to the rtas_log_bug and

Re: [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue

2016-07-11 Thread Nathan Fontenot
On 07/07/2016 10:00 AM, John Allen wrote: > In support of PAPR changes to add a new hotplug interrupt, introduce a > hotplug workqueue to avoid processing hotplug events in interrupt context. > We will also take advantage of the queue on PowerVM to ensure hotplug > events initiated from different

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-11 Thread Waiman Long
On 07/06/2016 02:52 AM, Peter Zijlstra wrote: On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: change fomr v1: a simplier definition of default vcpu_is_preempted skip mahcine type check on ppc, and add config. remove dedicated macro. add one patch to drop

Re: [PATCH] rpaphp: fix slot registration for multiple slots under a PHB

2016-07-11 Thread Tyrel Datwyler
On 07/08/2016 04:57 PM, Nathan Fontenot wrote: > On 07/08/2016 06:19 PM, Tyrel Datwyler wrote: >> PowerVM seems to only ever provide a single hotplug slot per PHB. >> The under lying slot hotplug registration code assumed multiple slots, >> but the actual implementation is broken for multiple

Re: [PATCH 2/2] powerpc/pseries: Implemented indexed-count hotplug memory remove

2016-07-11 Thread Nathan Fontenot
On 06/30/2016 02:24 PM, Sahil Mehta wrote: > Indexed-count remove for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be unassigned (NOT > that lmbs will be removed). Because of Qemu's per-DIMM memory > management, the removal of a contiguous block of

Re: [PATCH 1/2] powerpc/pseries: Implemented indexed-count hotplug memory add

2016-07-11 Thread Nathan Fontenot
On 06/30/2016 02:22 PM, Sahil Mehta wrote: > Indexed-count add for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be assigned (NOT > that lmbs will be added). Because of Qemu's per-DIMM memory > management, the addition of a contiguous block of memory

[patch 29/66] powerpc: numa: Convert to hotplug state machine

2016-07-11 Thread Anna-Maria Gleixner
From: Sebastian Andrzej Siewior Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Signed-off-by: Sebastian Andrzej Siewior Cc: Benjamin Herrenschmidt Cc: Paul

[patch 17/66] powerpc: perf: Convert book3s notifier to state machine callbacks

2016-07-11 Thread Anna-Maria Gleixner
From: Thomas Gleixner Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Signed-off-by: Thomas Gleixner Reviewed-by: Sebastian Andrzej Siewior Cc: Benjamin Herrenschmidt

[PATCH 15/15] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-11 Thread Ian Munsie
From: Andrew Donnellan Add a new API, cxl_check_and_switch_mode() to allow for switching of bi-modal CAPI cards, such as the Mellanox CX-4 network card. When a driver requests to switch a card to CAPI mode, use PCI hotplug infrastructure to remove all PCI devices

[PATCH 14/15] PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state

2016-07-11 Thread Ian Munsie
From: Andrew Donnellan When calling pnv_php_set_slot_power_state() with state == OPAL_PCI_SLOT_OFFLINE, remove devices from the device tree as if we're dealing with OPAL_PCI_SLOT_POWER_OFF. Cc: Gavin Shan Cc: linux-...@vger.kernel.org

[PATCH 10/15] cxl: Add preliminary workaround for CX4 interrupt limitation

2016-07-11 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 has a hardware limitation where only 4 bits of the AFU interrupt number can be passed to the XSL when sending an interrupt, limiting it to only 15 interrupts per context (AFU interrupt number 0 is invalid). In order to overcome this, we

[PATCH 08/15] cxl: Add support for using the kernel API with a real PHB

2016-07-11 Thread Ian Munsie
From: Ian Munsie This hooks up support for using the kernel API with a real PHB. After the AFU initialisation has completed it calls into the PHB code to pass it the AFU that will be used by other peer physical functions on the adapter. The cxl_pci_to_afu API is extended to

[PATCH 13/15] PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl

2016-07-11 Thread Ian Munsie
From: Andrew Donnellan The cxl driver will use infrastructure from pnv_php to handle device tree updates when switching bi-modal CAPI cards into CAPI mode. To enable this, export pnv_php_find_slot() and pnv_php_set_slot_power_state(), and add corresponding

[PATCH 12/15] cxl: Workaround PE=0 hardware limitation in Mellanox CX4

2016-07-11 Thread Ian Munsie
From: Ian Munsie The CX4 card cannot cope with a context with PE=0 due to a hardware limitation, resulting in: [ 34.166577] command failed, status limits exceeded(0x8), syndrome 0x5a7939 [ 34.166580] mlx5_core :01:00.1: Failed allocating uar, aborting Since the

[PATCH 05/15] cxl: Allow a default context to be associated with an external pci_dev

2016-07-11 Thread Ian Munsie
From: Ian Munsie The cxl kernel API has a concept of a default context associated with each PCI device under the virtual PHB. The Mellanox CX4 will also use the cxl kernel API, but it does not use a virtual PHB - rather, the AFU appears as a physical function as a peer to

[PATCH 11/15] cxl: Add support for interrupts on the Mellanox CX4

2016-07-11 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 in cxl mode uses a hybrid interrupt model, where interrupts are routed from the networking hardware to the XSL using the MSIX table, and from there will be transformed back into an MSIX interrupt using the cxl style interrupts (i.e. using

[PATCH 09/15] cxl: Add kernel APIs to get & set the max irqs per context

2016-07-11 Thread Ian Munsie
From: Ian Munsie These APIs will be used by the Mellanox CX4 support. While they function standalone to configure existing behaviour, their primary purpose is to allow the Mellanox driver to inform the cxl driver of a hardware limitation, which will be used in a future

[PATCH 07/15] powerpc/powernv: Add support for the cxl kernel api on the real phb

2016-07-11 Thread Ian Munsie
From: Ian Munsie This adds support for the peer model of the cxl kernel api to the PowerNV PHB, in which physical function 0 represents the cxl function on the card (an XSL in the case of the CX4), which other physical functions will use for memory access and interrupt

[PATCH 06/15] cxl: Do not create vPHB if there are no AFU configuration records

2016-07-11 Thread Ian Munsie
From: Ian Munsie The vPHB model of the cxl kernel API is a hierarchy where the AFU is represented by the vPHB, and it's AFU configuration records are exposed as functions under that vPHB. If there are no AFU configuration records we will create a vPHB with nothing under it,

[PATCH v2] powerpc / cxl: Add support for the Mellanox CX4 in cxl mode

2016-07-11 Thread Ian Munsie
This series adds support for the Mellanox CX4 network adapter operating in cxl mode to the cxl driver and the PowerNV PHB code. The Mellanox developers will submit a separate patch series that makes use of this in the mlx5 driver. The CX4 card can operate in either pci mode, or cxl mode. In cxl

[PATCH 04/15] cxl: Move cxl_afu_get / cxl_afu_put to base

2016-07-11 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 uses a model where the AFU is one physical function of the device, and is used by other peer physical functions of the same device. This will require those other devices to grab a reference on the AFU when they are initialised to make sure

[PATCH 03/15] cxl: Enable bus mastering for devices using CAPP DMA mode

2016-07-11 Thread Ian Munsie
From: Ian Munsie Devices that use CAPP DMA mode (such as the Mellanox CX4) require bus master to be enabled in order for the CAPI traffic to flow. This should be harmless to enable for other cxl devices, so unconditionally enable it in the adapter init flow. Signed-off-by:

[PATCH 02/15] cxl: Add cxl_slot_is_supported API

2016-07-11 Thread Ian Munsie
From: Ian Munsie This extends the check that the adapter is in a CAPI capable slot so that it may be called by external users in the kernel API. This will be used by the upcoming Mellanox CX4 support, which needs to know ahead of time if the card can be switched to cxl mode

[PATCH 01/15] powerpc/powernv: Split cxl code out into a separate file

2016-07-11 Thread Ian Munsie
From: Ian Munsie The support for using the Mellanox CX4 in cxl mode will require additions to the PHB code. In preparation for this, move the existing cxl code out of pci-ioda.c into a separate pci-cxl.c file to keep things more organised. Signed-off-by: Ian Munsie

Re: powerpc/opal: Wake up kopald polling thread before waiting for events

2016-07-11 Thread Michael Ellerman
On Mon, 2016-04-07 at 04:51:44 UTC, Benjamin Herrenschmidt wrote: > On some environments (prototype machines, some simulators, etc...) > there is no functional interrupt source to signal completion, so > we rely on the fairly slow OPAL heartbeat. > > In a number of cases, the calls complete very

Re: [v2] powerpc/pseries: start rtasd before PCI probing

2016-07-11 Thread Michael Ellerman
On Wed, 2016-15-06 at 20:26:41 UTC, Greg Kurz wrote: > A strange behaviour is observed when comparing PCI hotplug in QEMU, between > x86 and pseries. If you consider the following steps: > - start a VM > - add a PCI device via the QEMU monitor before the rtasd has started (for > example starting

Re: powerpc: Add MTD_BLOCK to powernv_defconfig

2016-07-11 Thread Michael Ellerman
On Fri, 2016-08-07 at 03:13:15 UTC, Michael Neuling wrote: > This is so we can use the powernv_flash mtd driver as an block > device. > > Signed-off-by: Michael Neuling Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/68a2d80c80e1563b8dc942d4ff cheers

Re: powerpc/eeh: fix pr_debug()s in eeh_cache.c

2016-07-11 Thread Michael Ellerman
On Fri, 2016-24-06 at 05:54:22 UTC, Andrew Donnellan wrote: > eeh_cache.c doesn't build cleanly with -DDEBUG when > CONFIG_PHYS_ADDR_T_64BIT is set, as a couple of pr_debug()s use "%lx" for > resource_size_t parameters. > > Use "%pap" instead, as it's the correct format specifier for types

Re: [v3] cxl: Refine slice error debug messages

2016-07-11 Thread Michael Ellerman
On Tue, 2016-05-07 at 11:08:06 UTC, Philippe Bergheaud wrote: > The PSL Slice Error Register (PSL_SERR_An) reports implementation > dependent AFU errors, in the form of a bitmap. The PSL_SERR_An > register content is printed in the form of hex dump debug message. > > This patch decodes the

Re: cxl: make base more explicitly non-modular

2016-07-11 Thread Michael Ellerman
On Sun, 2016-03-07 at 20:31:53 UTC, Paul Gortmaker wrote: > The Kconfig/Makefile currently controlling compilation of this code is: > > drivers/misc/cxl/Kconfig:config CXL_BASE > drivers/misc/cxl/Kconfig: bool > > drivers/misc/cxl/Makefile:obj-$(CONFIG_CXL_BASE) += base.o > >

Re: [v2] cxl: Ignore CAPI adapters misplaced in switched slots

2016-07-11 Thread Michael Ellerman
On Fri, 2016-01-07 at 11:32:52 UTC, Philippe Bergheaud wrote: > One should not attempt to switch a PHB into CAPI mode if there is > a switch between the PHB and the adapter. This patch modifies the > cxl driver to ignore CAPI adapters misplaced in switched slots. > > Signed-off-by: Philippe

Re: cxl: Fix NULL pointer dereference on kernel contexts with no AFU interrupts

2016-07-11 Thread Michael Ellerman
On Wed, 2016-29-06 at 18:55:17 UTC, Ian Munsie wrote: > From: Ian Munsie > > If a kernel context is initialised and does not have any AFU interrupts > allocated it will cause a NULL pointer dereference when the context is > detached since the irq_names list will not have

Re: [v2] cxl: Fix bug where AFU disable operation had no effect

2016-07-11 Thread Michael Ellerman
On Thu, 2016-30-06 at 16:50:40 UTC, Ian Munsie wrote: > From: Ian Munsie > > The AFU disable operation has a bug where it will not clear the enable > bit and therefore will have no effect. To date this has likely been > masked by fact that we perform an AFU reset before the

Re: [3/3] powerpc/configs: remove old symbols from defconfigs

2016-07-11 Thread Michael Ellerman
On Tue, 2016-05-07 at 06:12:35 UTC, Andrew Donnellan wrote: > Update defconfigs to remove old symbols and comments referencing old > symbols. > > Dropped: > > * AVERAGE > * INET_LRO > * EXT3_DEFAULTS_TO_ORDERED > * EXT3_FS_XATTR > * I2O > * INFINIBAND_AMSO1100 > * INFINIBAND_EHCA > * IP1000 > >

Re: [2/3] powerpc: fix typo in comment reference to CONFIG_TRACE_IRQFLAGS

2016-07-11 Thread Michael Ellerman
On Tue, 2016-05-07 at 06:12:34 UTC, Andrew Donnellan wrote: > Signed-off-by: Andrew Donnellan Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/fa2cff3f54cfec5c0b83afdb4f cheers ___ Linuxppc-dev mailing

Re: [2/2] cxl: Workaround XSL bug that does not clear the RA bit after a reset

2016-07-11 Thread Michael Ellerman
On Wed, 2016-29-06 at 18:51:26 UTC, Ian Munsie wrote: > From: Ian Munsie > > An issue was noted in our debug logs where the XSL would leave the RA > bit asserted after an AFU reset operation, which would effectively > prevent further AFU reset operations from working. > >

Re: [2/2] cxl: Fix allocating a minimum of 2 pages for the SPA

2016-07-11 Thread Michael Ellerman
On Wed, 2016-29-06 at 12:16:26 UTC, Ian Munsie wrote: > From: Ian Munsie > > The Scheduled Process Area is allocated dynamically with enough pages to > fit at least as many processes as the AFU descriptor indicated. Since > the calculation is non-trivial, it does this by

Re: [1/3] powerpc/ps3: fix typo in comment reference to CONFIG_PS3_REPOSITORY_WRITE

2016-07-11 Thread Michael Ellerman
On Tue, 2016-05-07 at 06:12:33 UTC, Andrew Donnellan wrote: > Signed-off-by: Andrew Donnellan Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/53775c43feae462e145b4bb88a cheers ___ Linuxppc-dev mailing

Re: [1/2] cxl: Fix allowing bogus AFU descriptors with 0 maximum processes

2016-07-11 Thread Michael Ellerman
On Wed, 2016-29-06 at 12:16:25 UTC, Ian Munsie wrote: > From: Ian Munsie > > If the AFU descriptor of an AFU directed AFU indicates that it supports > 0 maximum processes, we will accept that value and attempt to use it. > The SPA will still be allocated (with 2 pages due to

Re: [PATCH 14/14] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-11 Thread Ian Munsie
Excerpts from andrew.donnellan's message of 2016-07-07 18:15:06 +1000: > On 07/07/16 16:44, Andrew Donnellan wrote: > > We can match the vendor, device ID *and* class code - unfortunately > > there isn't a macro for this, which makes it a little bit less > > aesthetically pleasing, but I'm pretty

Re: [RFC] arm64: kexec_file_load support

2016-07-11 Thread Dave Young
On 07/11/16 at 04:19pm, AKASHI Takahiro wrote: > On Fri, Jul 08, 2016 at 11:48:44AM -0300, Thiago Jung Bauermann wrote: > > Am Donnerstag, 07 Juli 2016, 14:12:45 schrieb Dave Young: > > > If so maybe change a bit from your precious mentioned 7 args proposal like > > > below? > > > > > > struct

Re: [RFC] arm64: kexec_file_load support

2016-07-11 Thread AKASHI Takahiro
On Fri, Jul 08, 2016 at 11:48:44AM -0300, Thiago Jung Bauermann wrote: > Am Donnerstag, 07 Juli 2016, 14:12:45 schrieb Dave Young: > > If so maybe change a bit from your precious mentioned 7 args proposal like > > below? > > > > struct kexec_file_fd { > > enum kexec_file_type; > > int fd;

[PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-11 Thread Suraj Jitindar Singh
vcpu stats are used to collect information about a vcpu which can be viewed in the debugfs. For example halt_attempted_poll and halt_successful_poll are used to keep track of the number of times the vcpu attempts to and successfully polls. These stats are currently not used on powerpc. Implement

[PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-11 Thread Suraj Jitindar Singh
vcpus have statistics associated with them which can be viewed within the debugfs. Currently it is assumed within the vcpu_stat_get() and vcpu_stat_get_per_vm() functions that all of these statistics are represented as 32-bit numbers. The next patch adds some 64-bit statistics, so add provisioning

[PATCH V2 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-11 Thread Suraj Jitindar Singh
This patch introduces new halt polling functionality into the kvm_hv kernel module. When a vcore is idle it will poll for some period of time before scheduling itself out. When all of the runnable vcpus on a vcore have ceded (and thus the vcore is idle) we schedule ourselves out to allow

[PATCH V2 2/5] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-11 Thread Suraj Jitindar Singh
The struct kvmppc_vcore is a structure used to store various information about a virtual core for a kvm guest. The runnable_threads element of the struct provides a list of all of the currently runnable vcpus on the core (those in the KVMPPC_VCPU_RUNNABLE state). The previous implementation of

[PATCH V2 1/5] kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h

2016-07-11 Thread Suraj Jitindar Singh
The next commit will introduce a member to the kvmppc_vcore struct which references MAX_SMT_THREADS which is defined in kvm_book3s_asm.h, however this file isn't included in kvm_host.h directly. Thus compiling for certain platforms such as pmac32_defconfig and ppc64e_defconfig with KVM fails due

Re: [PATCH V2 1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles

2016-07-11 Thread Michael Ellerman
Samuel Mendoza-Jonas writes: > Commit 2def86a7200c > ("hvc: Convert to using interrupts instead of opal events") > enabled the use of interrupts in the hvc_driver for OPAL platforms. > However on machines with more than one hvc console, any console after > the first will

Re: [PATCH V2 2/2] tty/hvc: Use opal irqchip interface if available

2016-07-11 Thread Michael Ellerman
Samuel Mendoza-Jonas writes: > Update the hvc driver to use the OPAL irqchip if made available by the > running firmware. If it is not present, the driver falls back to the > existing OPAL event number. > > Signed-off-by: Samuel Mendoza-Jonas > Cc:

Re: [kernel-hardening] Re: [PATCH 9/9] mm: SLUB hardened usercopy support

2016-07-11 Thread Joonsoo Kim
On Fri, Jul 08, 2016 at 04:48:38PM -0400, Kees Cook wrote: > On Fri, Jul 8, 2016 at 1:41 PM, Kees Cook wrote: > > On Fri, Jul 8, 2016 at 12:20 PM, Christoph Lameter wrote: > >> On Fri, 8 Jul 2016, Kees Cook wrote: > >> > >>> Is check_valid_pointer() making

Re: [PATCH 1/4] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-11 Thread Suraj Jitindar Singh
On 29/06/16 22:51, Paolo Bonzini wrote: > > On 29/06/2016 06:44, Suraj Jitindar Singh wrote: >> Thanks for catching that, yeah I see. >> >> I don't think we can trivially move the struct kvmppc_vcore definition into >> kvm_book3s.h as other code in kvm_host.h (i.e. struct kvm_vcpu_arch) requires