Re: [PATCH v1 1/1] misc: IBM Virtual Management Channel Driver

2018-04-25 Thread Linus Walleij
I don't know why I'm included in review of this driver, but why not :) it is good to include people. Thanks for your patch! It looks exciting and complicated, I like that kind of stuff. On Mon, Apr 23, 2018 at 4:46 PM, Bryant G. Ly wrote: > This driver is a logical device which provides an > in

[PATCH V2] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Shilpasri G Bhat
gpstate_timer_handler() uses synchronous smp_call to set the pstate on the requested core. This causes the below hard lockup: [c03fe566b320] [c01d5340] smp_call_function_single+0x110/0x180 (unreliable) [c03fe566b390] [c01d55e0] smp_call_function_any+0x180/0x250 [c03fe5

Re: [PATCH V2] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Viresh Kumar
On 25-04-18, 14:32, Shilpasri G Bhat wrote: > gpstate_timer_handler() uses synchronous smp_call to set the pstate > on the requested core. This causes the below hard lockup: > > [c03fe566b320] [c01d5340] smp_call_function_single+0x110/0x180 > (unreliable) > [c03fe566b390] [c00

Re: [PATCH 2/3] powerpc/powernv: Fix OPAL RTC driver OPAL_BUSY loops

2018-04-25 Thread Alexandre Belloni
On 25/04/2018 13:28:27+1000, Michael Ellerman wrote: > Alexandre Belloni writes: > > On 10/04/2018 23:01:36+1000, Nicholas Piggin wrote: > >> On Tue, 10 Apr 2018 14:07:28 +0200 > >> Alexandre Belloni wrote: > >> > > Fixes ("powerpc/powernv: Add RTC and NVRAM support plus RTAS > >> > > fallback

Re: [PATCH V2] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Shilpasri G Bhat
Hi, On 04/25/2018 02:47 PM, Viresh Kumar wrote: > On 25-04-18, 14:32, Shilpasri G Bhat wrote: >> gpstate_timer_handler() uses synchronous smp_call to set the pstate >> on the requested core. This causes the below hard lockup: >> >> [c03fe566b320] [c01d5340] smp_call_function_single+0x1

Re: [PATCH V2] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Viresh Kumar
On 25-04-18, 15:32, Shilpasri G Bhat wrote: > Hi, > > On 04/25/2018 02:47 PM, Viresh Kumar wrote: > > On 25-04-18, 14:32, Shilpasri G Bhat wrote: > >> gpstate_timer_handler() uses synchronous smp_call to set the pstate > >> on the requested core. This causes the below hard lockup: > >> > >> [c

[PATCH V3] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Shilpasri G Bhat
gpstate_timer_handler() uses synchronous smp_call to set the pstate on the requested core. This causes the below hard lockup: [c03fe566b320] [c01d5340] smp_call_function_single+0x110/0x180 (unreliable) [c03fe566b390] [c01d55e0] smp_call_function_any+0x180/0x250 [c03fe5

[PATCH v3 1/2] cxl: Set the PBCQ Tunnel BAR register when enabling capi mode

2018-04-25 Thread Philippe Bergheaud
Skiboot used to set the default Tunnel BAR register value when capi mode was enabled. This approach was ok for the cxl driver, but prevented other drivers from choosing different values. Skiboot versions > 5.11 will not set the default value any longer. This patch modifies the cxl driver to set/re

[PATCH v3 2/2] cxl: Report the tunneled operations status

2018-04-25 Thread Philippe Bergheaud
Failure to synchronize the tunneled operations does not prevent the initialization of the cxl card. This patch reports the tunneled operations status via /sys. Signed-off-by: Philippe Bergheaud --- v3: Added this patch to report the tunneled operations status. --- drivers/misc/cxl/cxl.h | 1 +

Re: [PATCH V3] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Nicholas Piggin
On Wed, 25 Apr 2018 16:29:31 +0530 Shilpasri G Bhat wrote: > gpstate_timer_handler() uses synchronous smp_call to set the pstate > on the requested core. This causes the below hard lockup: > > [c03fe566b320] [c01d5340] smp_call_function_single+0x110/0x180 > (unreliable) > [c03fe

[PATCH v2] powerpc: Fix smp_send_stop NMI IPI handling

2018-04-25 Thread Nicholas Piggin
The NMI IPI handler for a receiving CPU increments nmi_ipi_busy_count over the handler function call, which causes later smp_send_nmi_ipi() callers to spin until the call is finished. The smp_send_stop function never returns, so the busy count is never decremeted, which can cause the system to han

[PATCH 00/11] KVM: PPC: reconstruct mmio emulation with analyse_instr()

2018-04-25 Thread wei . guo . simon
From: Simon Guo We already have analyse_instr() which analyzes instructions for the instruction type, size, addtional flags, etc. What kvmppc_emulate_loadstore() did is somehow duplicated and it will be good to utilize analyse_instr() to reconstruct the code. The advantage is that the code logic

[PATCH 02/11] KVM: PPC: mov nip/ctr/lr/xer registers to pt_regs in kvm_vcpu_arch

2018-04-25 Thread wei . guo . simon
From: Simon Guo This patch moves nip/ctr/lr/xer registers from scattered places in kvm_vcpu_arch to pt_regs structure. cr register is "unsigned long" in pt_regs and u32 in vcpu->arch. It will need more consideration and may move in later patches. Signed-off-by: Simon Guo --- arch/powerpc/incl

[PATCH 01/11] KVM: PPC: add pt_regs into kvm_vcpu_arch and move vcpu->arch.gpr[] into it

2018-04-25 Thread wei . guo . simon
From: Simon Guo Current regs are scattered at kvm_vcpu_arch structure and it will be more neat to organize them into pt_regs structure. Also it will enable reconstruct MMIO emulation code with analyse_instr() later. Signed-off-by: Simon Guo --- arch/powerpc/include/asm/kvm_book3s.h | 4 +--

[PATCH 03/11] KVM: PPC: Fix a mmio_host_swabbed uninitialized usage issue when VMX store

2018-04-25 Thread wei . guo . simon
From: Simon Guo When KVM emulates VMX store, it will invoke kvmppc_get_vmx_data() to retrieve VMX reg val. kvmppc_get_vmx_data() will check mmio_host_swabbed to decide which double word of vr[] to be used. But the mmio_host_swabbed can be uninitiazed during VMX store procedure: kvmppc_emulate_lo

[PATCH 04/11] KVM: PPC: fix incorrect element_size for stxsiwx in analyse_instr

2018-04-25 Thread wei . guo . simon
From: Simon Guo stwsiwx will place contents of word element 1 of VSR into word storage of EA. So the element size of stwsiwx should be 4. This patch correct the size from 8 to 4. Signed-off-by: Simon Guo --- arch/powerpc/lib/sstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 05/11] KVM: PPC: add GPR RA update skeleton for MMIO emulation

2018-04-25 Thread wei . guo . simon
From: Simon Guo To optimize kvm emulation code with analyse_instr, adds new mmio_update_ra flag to aid with GPR RA update. This patch arms RA update at load/store emulation path for both qemu mmio emulation or coalesced mmio emulation. Signed-off-by: Simon Guo --- arch/powerpc/include/asm/kvm

[PATCH 06/11] KVM: PPC: add KVMPPC_VSX_COPY_WORD_LOAD_DUMP type support for mmio emulation

2018-04-25 Thread wei . guo . simon
From: Simon Guo Some VSX instruction like lxvwsx will splat word into VSR. This patch adds VSX copy type KVMPPC_VSX_COPY_WORD_LOAD_DUMP to support this. Signed-off-by: Simon Guo --- arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/powerpc.c | 23 +++ 2

[PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_intr() input

2018-04-25 Thread wei . guo . simon
From: Simon Guo This patch reconstructs non-SIMD LOAD/STORE instruction MMIO emulation with analyse_intr() input. It utilizes the BYTEREV/UPDATE/SIGNEXT properties exported by analyse_instr() and invokes kvmppc_handle_load(s)/kvmppc_handle_store() accordingly. It also move CACHEOP type handling

[PATCH 08/11] KVM: PPC: add giveup_ext() hook for PPC KVM ops

2018-04-25 Thread wei . guo . simon
From: Simon Guo Currently HV will save math regs(FP/VEC/VSX) when trap into host. But PR KVM will only save math regs when qemu task switch out of CPU. To emulate FP/VEC/VSX load, PR KVM need to flush math regs firstly and then be able to update saved VCPU FPR/VEC/VSX area reasonably. This patc

[PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_intr() input

2018-04-25 Thread wei . guo . simon
From: Simon Guo This patch reconstructs LOAD_FP/STORE_FP instruction MMIO emulation with analyse_intr() input. It utilizes the FPCONV/UPDATE properties exported by analyse_instr() and invokes kvmppc_handle_load(s)/kvmppc_handle_store() accordingly. The FP regs need to be flushed so that the righ

[PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_intr() input

2018-04-25 Thread wei . guo . simon
From: Simon Guo This patch reconstructs LOAD_VMX/STORE_VMX instruction MMIO emulation with analyse_intr() input. When emulating the store, the VMX reg will need to be flushed so that the right reg val can be retrieved before writing to IO MEM. Suggested-by: Paul Mackerras Signed-off-by: Simon G

[PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_intr() input

2018-04-25 Thread wei . guo . simon
From: Simon Guo This patch reconstructs LOAD_VSX/STORE_VSX instruction MMIO emulation with analyse_intr() input. It utilizes VSX_FPCONV/VSX_SPLAT/SIGNEXT exported by analyse_instr() and handle accordingly. When emulating VSX store, the VSX reg will need to be flushed so that the right reg val ca

Re: [PATCH v1 1/1] misc: IBM Virtual Management Channel Driver

2018-04-25 Thread kbuild test robot
Hi Bryant, I love your patch! Perhaps something to improve: [auto build test WARNING on char-misc/char-misc-testing] [also build test WARNING on v4.17-rc2 next-20180424] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.co

[PATCH] powerpc: Fix deadlock with multiple calls to smp_send_stop

2018-04-25 Thread Nicholas Piggin
smp_send_stop can lock up the IPI path for any subsequent calls, because the receiving CPUs spin in their handler function. This started becoming a problem with the addition of an smp_send_stop call in the reboot path, because panics can reboot after doing their own smp_send_stop. The NMI IPI hand

[PATCH] powerpc/xics: add missing of_node_put() in error path

2018-04-25 Thread YueHaibing
The device node obtained with of_find_compatible_node() should be released by calling of_node_put(). But it was not released when of_get_property() failed. Signed-off-by: YueHaibing --- arch/powerpc/sysdev/xics/xics-common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/sy

[GIT PULL, PATCH v4 00/16] y2038: IPC system call conversion

2018-04-25 Thread Arnd Bergmann
Hi Thomas, This is a small update to last week's patch series, I hope I have worked out all the remaining issues now. If nothing else comes up, please pull into tip for 4.18. The commits are based on top of what you already pulled into timers/core, so you can either add these to the same branch or

[PATCH v4 01/16] y2038: asm-generic: Extend sysvipc data structures

2018-04-25 Thread Arnd Bergmann
Most architectures now use the asm-generic copy of the sysvipc data structures (msqid64_ds, semid64_ds, shmid64_ds), which use 32-bit __kernel_time_t on 32-bit architectures but have padding behind them to allow extending the type to 64-bit. Unfortunately, that fails on all big-endian architecture

[PATCH v4 08/16] y2038: parisc: Extend sysvipc data structures

2018-04-25 Thread Arnd Bergmann
parisc, uses a nonstandard variation of the generic sysvipc data structures, intended to have the padding moved around so it can deal with big-endian 32-bit user space that has 64-bit time_t. Unlike most architectures, parisc actually succeeded in defining this right for big-endian CPUs, but as ev

[PATCH v4 09/16] y2038: sparc: Extend sysvipc data structures

2018-04-25 Thread Arnd Bergmann
sparc, uses a nonstandard variation of the generic sysvipc data structures, intended to have the padding moved around so it can deal with big-endian 32-bit user space that has 64-bit time_t. Unlike most architectures, sparc actually succeeded in defining this right for big-endian CPUs, but as ever

[PATCH v4 11/16] y2038: xtensa: Extend sysvipc data structures

2018-04-25 Thread Arnd Bergmann
xtensa, uses a nonstandard variation of the generic sysvipc data structures, intended to have the padding moved around so it can deal with big-endian 32-bit user space that has 64-bit time_t. xtensa tries hard to define the structures so they work in both big-endian and little-endian systems with

[PATCH v4 02/16] y2038: x86: Extend sysvipc data structures

2018-04-25 Thread Arnd Bergmann
This extends the x86 copy of the sysvipc data structures to deal with 32-bit user space that has 64-bit time_t and wants to see timestamps beyond 2038. Fortunately, x86 has padding for this purpose in all the data structures, so we can just add extra fields. With msgid64_ds and shmid64_ds, the dat

[PATCH v4 12/16] y2038: ipc: Use ktime_get_real_seconds consistently

2018-04-25 Thread Arnd Bergmann
In some places, we still used get_seconds() instead of ktime_get_real_seconds(), and I'm changing the remaining ones now to all use ktime_get_real_seconds() so we use the full available range for timestamps instead of overflowing the 'unsigned long' return value in year 2106 on 32-bit kernels. Sig

[PATCH v4 13/16] y2038: ipc: Report long times to user space

2018-04-25 Thread Arnd Bergmann
The shmid64_ds/semid64_ds/msqid64_ds data structures have been extended to contain extra fields for storing the upper bits of the time stamps, this patch does the other half of the job and and fills the new fields on 32-bit architectures as well as 32-bit tasks running on a 64-bit kernel in compat

[PATCH v4 03/16] y2038: alpha: Remove unneeded ipc uapi header files

2018-04-25 Thread Arnd Bergmann
The alpha ipcbuf/msgbuf/sembuf/shmbuf header files are all identical to the version from asm-generic. This patch removes the files and replaces them with 'generic-y' statements as part of the y2038 series. Since there is no 32-bit syscall support for alpha, we don't need the other changes, but it'

[PATCH v4 04/16] y2038: ia64: Remove unneeded ipc uapi header files

2018-04-25 Thread Arnd Bergmann
The ia64 ipcbuf/msgbuf/sembuf/shmbuf header files are all identical to the version from asm-generic. This patch removes the files and replaces them with 'generic-y' statements as part of the y2038 changes. While ia64 no longer has a compat mode and doesn't need the file any more, it seem nicer to

[PATCH v4 10/16] y2038: powerpc: Extend sysvipc data structures

2018-04-25 Thread Arnd Bergmann
powerpc, uses a nonstandard variation of the generic sysvipc data structures, intended to have the padding moved around so it can deal with big-endian 32-bit user space that has 64-bit time_t. powerpc has the same definition as parisc and sparc, but now also supports little-endian mode, which is n

[PATCH v4 16/16] y2038: ipc: Redirect ipc(SEMTIMEDOP, ...) to compat_ksys_semtimedop

2018-04-25 Thread Arnd Bergmann
32-bit architectures implementing 64BIT_TIME and COMPAT_32BIT_TIME need to have the traditional semtimedop() behavior with 32-bit timestamps for sys_ipc() by calling compat_ksys_semtimedop(), while those that are not yet converted need to keep using ksys_semtimedop() like 64-bit architectures do.

[PATCH v4 15/16] y2038: ipc: Enable COMPAT_32BIT_TIME

2018-04-25 Thread Arnd Bergmann
Three ipc syscalls (mq_timedsend, mq_timedreceive and and semtimedop) take a timespec argument. After we move 32-bit architectures over to useing 64-bit time_t based syscalls, we need seperate entry points for the old 32-bit based interfaces. This changes the #ifdef guards for the existing 32-bit

[PATCH v4 14/16] y2038: ipc: Use __kernel_timespec

2018-04-25 Thread Arnd Bergmann
This is a preparatation for changing over __kernel_timespec to 64-bit times, which involves assigning new system call numbers for mq_timedsend(), mq_timedreceive() and semtimedop() for compatibility with future y2038 proof user space. The existing ABIs will remain available through compat code. S

[PATCH v4 05/16] y2038: s390: Remove unneeded ipc uapi header files

2018-04-25 Thread Arnd Bergmann
The s390 msgbuf/sembuf/shmbuf header files are all identical to the version from asm-generic. This patch removes the files and replaces them with 'generic-y' statements, to avoid having to modify each copy when we extend sysvipc to deal with 64-bit time_t in 32-bit user space. Note that unlike al

[PATCH v4 07/16] y2038: mips: Extend sysvipc data structures

2018-04-25 Thread Arnd Bergmann
MIPS is the weirdest case for sysvipc, because each of the three data structures is done differently: * msqid64_ds has padding in the right place so we could in theory extend this one to just have 64-bit values instead of time_t. As this does not work for most of the other combinations, we j

[PATCH v4 06/16] y2038: arm64: Extend sysvipc compat data structures

2018-04-25 Thread Arnd Bergmann
Both 32-bit amd 64-bit ARM use the asm-generic header files for their sysvipc data structures, so no special care is needed to make those work beyond y2038, with the one exception of compat mode: Since there is no asm-generic definition of the compat mode IPC structures, ARM64 provides its own copy

[PATCH v2 0/1] misc: IBM Virtual Management Channel Driver (VMC)

2018-04-25 Thread Bryant G. Ly
Steven Royer had previously attempted to upstream this driver two years ago, but never got the chance to address the concerns from Greg Kroah-Hartman. The thread with the initial upstream is: https://lkml.org/lkml/2016/2/16/918 I have addressed the following: Version 1: - Documentation - Use of

[PATCH v2 1/1] misc: IBM Virtual Management Channel Driver (VMC)

2018-04-25 Thread Bryant G. Ly
This driver is a logical device which provides an interface between the hypervisor and a management partition. This interface is like a message passing interface. This management partition is intended to provide an alternative to HMC-based system management. VMC enables the Management LPAR to prov

Re: [PATCH 5/6 v2] bus: fsl-mc: supoprt dma configure for devices on fsl-mc bus

2018-04-25 Thread kbuild test robot
Hi Nipun, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17-rc2 next-20180424] [cannot apply to iommu/next glikely/devicetree/next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the

Re: [PATCH V3] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Viresh Kumar
On 25-04-18, 16:29, Shilpasri G Bhat wrote: > gpstate_timer_handler() uses synchronous smp_call to set the pstate > on the requested core. This causes the below hard lockup: > > [c03fe566b320] [c01d5340] smp_call_function_single+0x110/0x180 > (unreliable) > [c03fe566b390] [c00

Re: [PATCH V3] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Vaidyanathan Srinivasan
* Shilpa Bhat [2018-04-25 16:29:31]: > gpstate_timer_handler() uses synchronous smp_call to set the pstate > on the requested core. This causes the below hard lockup: > > [c03fe566b320] [c01d5340] smp_call_function_single+0x110/0x180 > (unreliable) > [c03fe566b390] [c01d

Re: OOM killer invoked while still one forth of mem is available

2018-04-25 Thread Christophe LEROY
Le 25/04/2018 à 21:57, David Rientjes a écrit : On Tue, 24 Apr 2018, christophe leroy wrote: Hi Allthough there is still about one forth of memory available (7976kB among 32MB), oom-killer is invoked and makes a victim. What could be the reason and how could it be solved ? [ 54.400754] S

[PATCH] powerpc: Add NVDIMM to powernv_defconfig

2018-04-25 Thread Michael Neuling
This enables greater testing NVDIMMs as it becomes more prevalent. This is also the minimal required to enable persistent memory in mambo. This adds 100KB to the kernel text and 170KB to the vmlinux Signed-off-by: Michael Neuling --- arch/powerpc/configs/powernv_defconfig | 2 ++ 1 file changed

[PATCH] powerpc: paste - Mask XERSO bit in CR

2018-04-25 Thread Haren Myneni
NX can set 3rd bit in CR register for XER[SO] (Summation overflow) which is not used for paste return value. So. mask this bit to get proper return status. Signed-off-by: Haren Myneni diff --git a/arch/powerpc/platforms/powernv/copy-paste.h b/arch/powerpc/platforms/powernv/copy-paste.h