[PATCH V4 0/7] Enable NX 842 compression engine on Power9

2017-08-31 Thread Haren Myneni
P9 introduces Virtual Accelerator Switchboard (VAS) to communicate with NX 842 engine. icswx function is used to access NX before. On powerNV systems, NX-842 driver invokes VAS functions for configuring RxFIFO (receive window) per each NX engine. VAS uses this FIFO to communicate the request to NX

[PATCH V4 1/7] crypto/nx: Rename nx842_powernv_function as icswx function

2017-08-31 Thread Haren Myneni
Rename nx842_powernv_function to nx842_powernv_exec. nx842_powernv_exec points to nx842_exec_icswx and will be point to VAS exec function which will be added later for P9 NX support. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-842-powernv.c | 20 +--- 1 file changed, 13

[PATCH V4 2/7] crypto/nx: Create nx842_configure_crb function

2017-08-31 Thread Haren Myneni
Configure CRB is moved to nx842_configure_crb() so that it can be used for icswx and VAS exec functions. VAS function will be added later with P9 support. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-842-powernv.c | 57 +- 1 file changed, 38 insertion

[PATCH V4 3/7] crypto/nx: Create nx842_delete_coprocs function

2017-08-31 Thread Haren Myneni
Move deleting coprocessors info upon exit or failure to nx842_delete_coprocs(). Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-842-powernv.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/crypto/nx/nx-842-powernv.c b/drivers/crypto

[PATCH V4 4/7] crypto/nx: Add nx842_add_coprocs_list function

2017-08-31 Thread Haren Myneni
Updating coprocessor list is moved to nx842_add_coprocs_list(). This function will be used for both icswx and VAS functions. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-842-powernv.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/nx/nx-8

[PATCH V4 5/7] crypto/nx: Use kzalloc for workmem allocation

2017-08-31 Thread Haren Myneni
Send window is opened / closed for each crypto session. So initializes txwin in workmem. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-842.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c index d94e25df503b..da3

[PATCH V4 6/7] crypto/nx: Add P9 NX specific error codes for 842 engine

2017-08-31 Thread Haren Myneni
This patch adds changes for checking P9 specific 842 engine error codes. These errros are reported in coprocessor status block (CSB) for failures. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/icswx.h | 3 +++ drivers/crypto/nx/nx-842-powernv.c | 18 ++ drivers/cry

[PATCH V4 7/7] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-31 Thread Haren Myneni
This patch adds P9 NX support for 842 compression engine. Virtual Accelerator Switchboard (VAS) is used to access 842 engine on P9. For each NX engine per chip, setup receive window using vas_rx_win_open() which configures RxFIFo with FIFO address, lpid, pid and tid values. This unique (lpid, pid

Re: [PATCH 4/4] powerpc/smp: Add Power9 scheduler topology

2017-08-31 Thread Michael Ellerman
Oliver O'Halloran writes: > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 46f071cedf31..7b2ed0d6fc96 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1043,7 +1081,19 @@ void __init smp_cpus_done(unsigned int max_cpus) > > dump_n

Re: [PATCH v2 14/20] mm: Provide speculative fault infrastructure

2017-08-31 Thread Peter Zijlstra
On Thu, Aug 31, 2017 at 12:25:16PM +0530, Anshuman Khandual wrote: > On 08/30/2017 03:02 PM, Laurent Dufour wrote: > > On 30/08/2017 07:58, Peter Zijlstra wrote: > >> On Wed, Aug 30, 2017 at 10:33:50AM +0530, Anshuman Khandual wrote: > >>> diff --git a/mm/filemap.c b/mm/filemap.c > >>> index a49702

[patch 22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage

2017-08-31 Thread Thomas Gleixner
Both the perf reconfiguration and the powerpc watchdog_nmi_reconfigure() need to be done in two steps. 1) Stop all NMIs 2) Read the new parameters and start NMIs Right now watchdog_nmi_reconfigure() is a combination of both. To allow a clean reconfiguration add a 'run' argument and spli

[patch 29/29] lockup_detector: Cleanup hotplug locking mess

2017-08-31 Thread Thomas Gleixner
All watchdog thread related functions are delegated to the smpboot thread infrastructure, which handles serialization against CPU hotplug correctly. The sysctl interface is completely decoupled from anything which requires CPU hotplug protection. No need to protect the sysctl writes against cpu h

Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-31 Thread Haren Myneni
Thanks MIchael and Dan for your review comments. On 08/29/2017 06:32 AM, Dan Streetman wrote: > On Mon, Aug 28, 2017 at 7:25 PM, Michael Ellerman wrote: >> Hi Haren, >> >> Some comments inline ... >> >> Haren Myneni writes: >> >>> diff --git a/drivers/crypto/nx/nx-842-powernv.c >>> b/drivers/c

Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()

2017-08-31 Thread Frederic Barrat
Le 30/08/2017 à 23:01, Benjamin Herrenschmidt a écrit : On Wed, 2017-08-30 at 15:59 +0200, Frederic Barrat wrote: It's not clear why it makes sense for these to be empty. Either for the general idea of the "flush_all_mm()" API, or for your intended use by CXL. I was not too sure what to do f

[PATCH v2] perf test powerpc: Fix 'Object code reading' test

2017-08-31 Thread Ravi Bangoria
'Object code reading' test always fails on powerpc guest. Two reasons for the failure are: 1. When elf section is too big (size beyond 'unsigned int' max value). objdump fails to disassemble from such section. This was fixed with commit 0f6329bd7fc ("binutils/objdump: Fix disassemble for huge elf

Re: [PATCH v2] perf test powerpc: Fix 'Object code reading' test

2017-08-31 Thread Adrian Hunter
On 31/08/17 12:14, Ravi Bangoria wrote: > 'Object code reading' test always fails on powerpc guest. Two reasons > for the failure are: > > 1. When elf section is too big (size beyond 'unsigned int' max value). > objdump fails to disassemble from such section. This was fixed with > commit 0f6329bd7

Re: [PATCH] powerpc/powernv: Turn on SCSI_AACRAID in powernv_defconfig

2017-08-31 Thread Stewart Smith
Michael Ellerman writes: > OK. So maybe when the petitboot kernel moves up to 4.14 they may want to > flip it back to being a module. Yeah. We tend to keep all RAID adapters as modules because they almost all uniquely try to undo all boot time optimization done by anybody, anywhere, ever. > I th

Re: Question: handling early hotplug interrupts

2017-08-31 Thread Michael Ellerman
Nathan Fontenot writes: > On 08/30/2017 01:09 AM, Michael Ellerman wrote: ... >> >> So this is simply a case of the init calls being out of order. >> >> We either need to create the pseries_hp_wq earlier, or register the >> event sources IRQs later. I'm not sure which is better. > > Perhaps I'm

Re: Build failures in powerpc ptrace selftests

2017-08-31 Thread Simon Guo
Hi Seth, On Wed, Aug 30, 2017 at 08:05:25AM -0500, Seth Forshee wrote: > With gcc 7 from Ubuntu 17.10 I'm getting the follwing error building the > ptrace selftests for powerpc: > > ptrace-tm-vsx.c: In function ‘tm_vsx’: > ptrace-tm-vsx.c:42:2: error: PIC register clobbered by ‘r2’ in ‘asm’ >

Re: [PATCH] powerpc/pseries: Don't attempt to acquire drc during memory hot add for assigned lmbs

2017-08-31 Thread Michael Ellerman
Nathan Fontenot writes: ... > > Hopefully that helps clarify things. Yep thanks. In short, read the code better Michael :) I folded in this hunk, which will keep the compiler happy and is also correct I believe. Basically in the success case (lmbs_added == lmbs_to_add) we explicitly set rc to 0.

Re: [PATCH] powerpc/pseries: Don't attempt to acquire drc during memory hot add for assigned lmbs

2017-08-31 Thread Michael Ellerman
John Allen writes: > On 08/30/2017 09:35 AM, Nathan Fontenot wrote: >> On 08/29/2017 09:35 PM, Michael Ellerman wrote: >>> John Allen writes: >>> Check if an LMB is assigned before attempting to call dlpar_acquire_drc in order to avoid any unnecessary rtas calls. This substantially red

[PATCH v2] of: Restrict DMA configuration

2017-08-31 Thread Robin Murphy
Moving DMA configuration to happen later at driver probe time had the unnoticed side-effect that we now perform DMA configuration for *every* device represented in DT, rather than only those explicitly created by the of_platform and PCI code. As Christoph points out, this is not really the best th

[PATCH] [RESEND] KVM:PPC:Book3s: fix memory leak in kvm_vm_ioctl_get_htab_fd

2017-08-31 Thread nixiaoming
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); but no free when anon_inode_getfd return fail so, add kfree(ctx) to fix memory leak Signed-off-by: nixiaoming Reviewed-by: Paolo Bonzini --- arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s_6

Re: powerpc: squash lines for simple wrapper functions

2017-08-31 Thread Michael Ellerman
On Tue, 2016-09-06 at 11:21:50 UTC, Masahiro Yamada wrote: > Remove unneeded variables and assignments. > > Signed-off-by: Masahiro Yamada Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/7f2462acb6a995f2b0005192c0ba8e cheers

Re: powerpc: asm: convert directive .llong to .8byte

2017-08-31 Thread Michael Ellerman
On Thu, 2017-03-09 at 05:42:12 UTC, "Tobin C. Harding" wrote: > .llong is an undocumented PPC specific directive. The generic > equivalent is .quad, but even better (because it's self describing) is > .8byte. > > Convert directives .llong -> .8byte > > Signed-off-by: Tobin C. Harding Applied to

Re: powerpc/configs: Enable function trace by default

2017-08-31 Thread Michael Ellerman
On Thu, 2017-04-13 at 07:03:09 UTC, Balbir Singh wrote: > We expect to have these configs on by default, most > distros turn them off, its always good to have them on > so that we can use them and hopefully not break them > > Signed-off-by: Balbir Singh > Acked-by: Naveen N. Rao Applied to powe

Re: powerpc/configs: Enable THP and 64K for ppc64(le)_defconfig

2017-08-31 Thread Michael Ellerman
On Thu, 2017-04-13 at 07:20:45 UTC, Balbir Singh wrote: > Enable 64K page size and THP. I use ppc64le_defconfig when I need > a single config across guest and host, but having 4K page size > as default is not what I expect. I could move these over to > server.config and merge if ppc64_defconfig is

Re: powerpc/mm: Fix mapped range information print during boot

2017-08-31 Thread Michael Ellerman
On Wed, 2017-05-03 at 09:32:35 UTC, Michael Ellerman wrote: > diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c > index c28165d8970b..519cfef569d1 100644 > --- a/arch/powerpc/mm/pgtable-radix.c > +++ b/arch/powerpc/mm/pgtable-radix.c > @@ -8,9 +8,14 @@ > * as publishe

Re: [v3, 2/3] powerpc/powernv: Enable removal of memory for in memory tracing

2017-08-31 Thread Michael Ellerman
On Thu, 2017-06-01 at 05:34:39 UTC, Rashmica Gupta wrote: > The hardware trace macro feature requires access to a chunk of real > memory. This patch provides a debugfs interface to do this. By > writing an integer containing the size of memory to be unplugged into > /sys/kernel/debug/powerpc/memtra

Re: [v3, 3/3] Add documentation for the powerpc memtrace debugfs files

2017-08-31 Thread Michael Ellerman
On Thu, 2017-06-01 at 05:34:40 UTC, Rashmica Gupta wrote: > CONFIG_PPC64_HARDWARE_TRACING must be set to use this feature. This can only > be used on powernv platforms. > > Signed-off-by: Rashmica Gupta Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/1f84c2624a2d75c9f69214ed83

Re: Update MAINTAINERS

2017-08-31 Thread Michael Ellerman
On Thu, 2017-06-01 at 16:05:41 UTC, Murilo Opsfelder Araujo wrote: > drivers/watchdog/wdrtas.c is of insterest of linuxppc maintainers. > > Signed-off-by: Murilo Opsfelder Araujo Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/d8895268f06546ad3744acce37798e cheers

Re: powerpc/uprobes: Implement arch_uretprobe_is_alive()

2017-08-31 Thread Michael Ellerman
On Wed, 2017-06-14 at 15:44:00 UTC, "Naveen N. Rao" wrote: > This helper is used to detect if a uprobe'd function has returned > through a setjmp/longjmp, rather than branching to the LR that was > updated previously by us. This fixes a SIGSEGV that gets generated when > programs use setjmp/longjmp

Re: powerpc/kprobes: Don't save/restore DAR/DSISR to/from pt_regs for optprobes

2017-08-31 Thread Michael Ellerman
On Thu, 2017-06-08 at 19:16:55 UTC, "Naveen N. Rao" wrote: > We don't save/restore these across a trap, or with KPROBES_ON_FTRACE. > > Signed-off-by: Naveen N. Rao Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/ec4189c4e8eea0c5e7c9b71cb1502c cheers

Re: powerpc: conditionally compile platform-specific serial drivers

2017-08-31 Thread Michael Ellerman
On Tue, 2017-06-27 at 14:29:51 UTC, Hannes Reinecke wrote: > mpsc.c and mpc52xx-psc.c are platform-specific serial drivers, and > should be compiled for the respective platforms only. > > Signed-off-by: Hannes Reinecke > Reviewed-by: Torsten Duwe Applied to powerpc next, thanks. https://git.ke

Re: powerpc: remapping too much memory

2017-08-31 Thread Michael Ellerman
On Wed, 2017-06-28 at 11:49:07 UTC, Dan Carpenter wrote: > There is a cut and paste error here so we use "sizeof(struct mpc83xx_pmc)" > to remap the memory for "clock_regs". That sizeof() is 20 bytes and we > only need to remap 12 bytes. It presumably doesn't affect run time too > much... > > I

Re: [v2, 1/3] powerpc: do not call ppc_md.panic in fadump panic notifier

2017-08-31 Thread Michael Ellerman
On Wed, 2017-07-05 at 03:56:25 UTC, Nicholas Piggin wrote: > If fadump is not registered, and no other crash or debug handlers are > registered, the powerpc panic handler stops the guest before the generic > panic code can push out debug information to the console. > > Currently, system reset inje

Re: [v2, 1/3] powerpc/powernv: handle the platform error reboot in ppc_md.restart

2017-08-31 Thread Michael Ellerman
On Wed, 2017-07-19 at 06:59:10 UTC, Nicholas Piggin wrote: > Unrecovered MCE and HMI errors are sent through a special restart OPAL > call to log the platform error. The downside is that they don't go > through normal Linux crash paths, so they don't give much information > to the Linux console. >

Re: [v2, 4/9] powerpc/64s/radix: Remove bolted-SLB address limit for per-cpu stacks

2017-08-31 Thread Michael Ellerman
On Sun, 2017-08-13 at 01:33:41 UTC, Nicholas Piggin wrote: > Radix MMU does not take SLB or TLB interrupts when accessing kernel > linear address. Remove this restriction for radix mode. > > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/d550719

Re: [v2, 2/9] powerpc/powernv: powernv platform is not constrained by RMA

2017-08-31 Thread Michael Ellerman
On Sun, 2017-08-13 at 01:33:39 UTC, Nicholas Piggin wrote: > Remove incorrect comment about real mode address restrictions on > powernv (bare metal), and unnecessary clamping to ppc64_rma_size. > > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/

Re: [v2, 6/9] powerpc/64s/radix: Do not allocate SLB shadow structures

2017-08-31 Thread Michael Ellerman
On Sun, 2017-08-13 at 01:33:43 UTC, Nicholas Piggin wrote: > These are unused in radix mode. > > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/b68b1d7487195d17bdd7e06f183acf cheers

Re: powerpc: powernv: Fix build error on const discarding

2017-08-31 Thread Michael Ellerman
On Wed, 2017-08-16 at 12:34:44 UTC, Corentin Labbe wrote: > When building a random powerpc kernel I hit this build error: > CC arch/powerpc/platforms/powernv/opal-imc.o > arch/powerpc/platforms/powernv/opal-imc.c: In function «  > disable_nest_pmu_counters »: > arch/powerpc/platforms/pow

Re: [01/46] powerpc/configs: Update for symbol movement only

2017-08-31 Thread Michael Ellerman
On Wed, 2017-08-23 at 05:37:21 UTC, Michael Ellerman wrote: > Update defconfigs for symbols that have moved around, without their > value changing. > > Signed-off-by: Michael Ellerman Series applied to powerpc next. https://git.kernel.org/powerpc/c/980b4503b9efd97bcb51d5508d82fb cheers

Re: [1/5] powerpc/oops: Fix the oops markers to use pr_cont()

2017-08-31 Thread Michael Ellerman
On Wed, 2017-08-23 at 13:56:20 UTC, Michael Ellerman wrote: > When we oops we print a few markers for significant config options > such as PREEMPT, SMP etc. Currently these appear on separate lines > because we're not using pr_cont() properly. Fix it. > > Signed-off-by: Michael Ellerman Series a

Re: [v3, 1/4] KVM: PPC: Book3S HV: POWER9 does not require secondary thread management

2017-08-31 Thread Michael Ellerman
On Fri, 2017-08-25 at 04:30:33 UTC, Nicholas Piggin wrote: > POWER9 CPUs have independent MMU contexts per thread, so KVM does not > need to quiesce secondary threads, so the hwthread_req/hwthread_state > protocol does not have to be used. So patch it away on POWER9, and patch > away the branch fro

Re: [v3, 2/4] powerpc/64s: idle POWER9 can execute stop without a sync sequence

2017-08-31 Thread Michael Ellerman
On Fri, 2017-08-25 at 04:30:34 UTC, Nicholas Piggin wrote: > Reviewed-by: Gautham R. Shenoy > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/56ee52408ed0bd4af400c04ad60f98 cheers

Re: [v3, 3/4] powerpc/64s: idle POWER9 can execute stop in virtual mode

2017-08-31 Thread Michael Ellerman
On Fri, 2017-08-25 at 04:30:35 UTC, Nicholas Piggin wrote: > The hardware can execute stop in any context, and KVM does not > require real mode because siblings do not share MMU state. This > saves a switch to real-mode when going idle. > > Acked-by: Gautham R. Shenoy > Signed-off-by: Nicholas Pi

Re: powerpc/44x: mask and shift to zero bug

2017-08-31 Thread Michael Ellerman
On Fri, 2017-08-25 at 10:33:40 UTC, Dan Carpenter wrote: > My static checker complains that 0x1800 >> 13 is zero. Looking at > the context, it seems like a copy and paste bug from the line below and > probably 0x3 << 13 or 0x6000 was intended. > > Fixes: 2af59f7d5c3e ("[POWERPC] 4xx: Add

Re: powerpc/64: Fix watchdog configuration regressions

2017-08-31 Thread Michael Ellerman
On Mon, 2017-08-28 at 04:27:19 UTC, Nicholas Piggin wrote: > This fixes a couple more bits of fallout from the new hard lockup watchdog > patch. > > It restores the required hw_nmi_get_sample_period() function for the > perf watchdog, and removes some function declarations on 64e that are only > d

Re: powerpc/512x: clk: constify clk_div_table

2017-08-31 Thread Michael Ellerman
On Mon, 2017-08-28 at 06:05:15 UTC, Arvind Yadav wrote: > clk_div_table are not supposed to change at runtime. > mpc512x_clk_divtable function working with const > clk_div_table. So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav Applied to powerpc next, thanks. https://git

Re: [v2] powerpc/mm/cxl: Add barrier when setting mm cpumask

2017-08-31 Thread Michael Ellerman
On Mon, 2017-08-28 at 08:35:44 UTC, "Aneesh Kumar K.V" wrote: > We need to add memory barrier so that the page table walk doesn't happen > before the cpumask is set and made visible to the other cpus. We need > to use a sync here instead of lwsync because lwsync is not sufficient for > store/load o

Re: [v8, 01/10] powerpc/vas: Define macros, register fields and structures

2017-08-31 Thread Michael Ellerman
On Tue, 2017-08-29 at 06:23:31 UTC, Sukadev Bhattiprolu wrote: > Define macros for the VAS hardware registers and bit-fields as well > as couple of data structures needed by the VAS driver. > > Signed-off-by: Sukadev Bhattiprolu Series applied to powerpc next, thanks. https://git.kernel.org/pow

Re: powerpc/xmon: convert 0.16x to 0.16lx

2017-08-31 Thread Michael Ellerman
On Tue, 2017-08-29 at 07:22:36 UTC, Balbir Singh wrote: > Otherwise we lose the top 8 nibbles and effectively print only > the last 32 bits. > > Fixes: e0ddf7a ("powerpc/xmon: Dump ISA 2.07 SPRs") > Fixes: 1846193 ("powerpc/xmon: Dump ISA 2.06 SPRs") > > Signed-off-by: Balbir Singh Applied to p

Re: [kernel, v2, 1/6] powerpc/pci: Remove unused parameter from add_one_dev_pci_data()

2017-08-31 Thread Michael Ellerman
On Tue, 2017-08-29 at 07:33:59 UTC, Alexey Kardashevskiy wrote: > pdev is always NULL, remove it. > > To make checkpatch.pl happy, this also removes the "out of memory" > message. > > Signed-off-by: Alexey Kardashevskiy > Reviewed-by: Andrew Donnellan > Acked-by: Russell Currey Series applied

Re: powerpc/kernel: Change retrieval of pci_dn

2017-08-31 Thread Michael Ellerman
On Tue, 2017-08-29 at 13:11:51 UTC, "Bryant G. Ly" wrote: > For a PCI device it's pci_dn can be retrieved from > pdev->dev.archdata.firmware_data, PCI_DN(devnode), or parent's list. > Thus, we should just use the existing function pci_get_pdn_by_devfn > to get the pci_dn. > > Signed-off-by: Bryant

Re: [1/2] powerpc/xmon: hdec is now 64bits

2017-08-31 Thread Michael Ellerman
On Wed, 2017-08-30 at 00:27:44 UTC, Balbir Singh wrote: > ISA 300 defines hypervisor decrementer to be 64 bits in length. > This patch extends the print format for all archs to be 64 bits > > Signed-off-by: Balbir Singh Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/cf

Re: [v2,2/3] cxl: Fix driver use count

2017-08-31 Thread Michael Ellerman
On Wed, 2017-08-30 at 10:15:49 UTC, Frederic Barrat wrote: > cxl keeps a driver use count, which is used with the hash memory model > on p8 to know when to upgrade local TLBIs to global and to trigger > callbacks to manage the MMU for PSL8. > > If a process opens a context and closes without attac

Re: selftests/powerpc: Force ptrace tests to build -fno-pie

2017-08-31 Thread Michael Ellerman
On Wed, 2017-08-30 at 10:45:12 UTC, Michael Neuling wrote: > Currently these tests won't build with a `--enable-default-pie` > compiler as they require r30 to be clobbered. This gives > an error: > ptrace-tm-spd-gpr.c:41:2: error: PIC register clobbered by 'r30' in 'asm' > > This forces these te

[PATCH] powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

2017-08-31 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug") clears the PECE1 bit of the LPCR via stop-api during CPU-Hotplug to prevent wakeup due to a decrementer on an offlined CPU which is in a deep stop state. In the case where the stop

Re: [PATCH] powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

2017-08-31 Thread Nicholas Piggin
On Thu, 31 Aug 2017 17:17:41 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via > stop-api only on Hotplug") clears the PECE1 bit of the LPCR via > stop-api during CPU-Hotplug to prevent wakeup due to a decrementer on

Re: Build failures in powerpc ptrace selftests

2017-08-31 Thread Seth Forshee
On Thu, Aug 31, 2017 at 01:41:47AM +0800, Simon Guo wrote: > Hi Seth, > On Wed, Aug 30, 2017 at 08:05:25AM -0500, Seth Forshee wrote: > > With gcc 7 from Ubuntu 17.10 I'm getting the follwing error building the > > ptrace selftests for powerpc: > > > > ptrace-tm-vsx.c: In function ‘tm_vsx’: > >

Re: [PATCH 4/4] powerpc/smp: Add Power9 scheduler topology

2017-08-31 Thread Srikar Dronamraju
> +static struct sched_domain_topology_level power9_topology[] = { > +#ifdef CONFIG_SCHED_SMT > + { cpu_smt_mask, powerpc_smt_flags, SD_INIT_NAME(SMT) }, > +#endif > + { shared_cache_mask, powerpc_shared_cache_flags, SD_INIT_NAME(CACHE) }, > + { cpu_cpu_mask, SD_INIT_NAME(DIE) }, > +

Re: [PATCH] powerpc/powernv: Turn on SCSI_AACRAID in powernv_defconfig

2017-08-31 Thread Michael Ellerman
Stewart Smith writes: > Michael Ellerman writes: >> OK. So maybe when the petitboot kernel moves up to 4.14 they may want to >> flip it back to being a module. > > Yeah. We tend to keep all RAID adapters as modules because they almost > all uniquely try to undo all boot time optimization done by

Re: [PATCH v2] of: Restrict DMA configuration

2017-08-31 Thread Christoph Hellwig
Thanks Robin. I'll wait for any additional comments until tomorrow and will apply it unless anyone objects.

Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-31 Thread Dan Streetman
On Tue, Aug 29, 2017 at 5:54 PM, Haren Myneni wrote: > On 08/29/2017 02:23 PM, Benjamin Herrenschmidt wrote: >> On Tue, 2017-08-29 at 09:58 -0400, Dan Streetman wrote: + + ret = -EINVAL; + if (coproc && coproc->vas.rxwin) { + wmem->txwin = nx842_alloc_

Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-31 Thread Dan Streetman
On Thu, Aug 31, 2017 at 3:44 AM, Haren Myneni wrote: > Thanks MIchael and Dan for your review comments. > > > On 08/29/2017 06:32 AM, Dan Streetman wrote: >> On Mon, Aug 28, 2017 at 7:25 PM, Michael Ellerman >> wrote: >>> Hi Haren, >>> >>> Some comments inline ... >>> >>> Haren Myneni writes: >

Re: [PATCH 04/12] x86: make dma_cache_sync a no-op

2017-08-31 Thread Thomas Gleixner
On Sun, 27 Aug 2017, Christoph Hellwig wrote: > x86 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't > make any sense to do any work in dma_cache_sync given that it must be a > no-op when dma_alloc_attrs returns coherent memory. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH RFC] Interface to set SPRN_TIDR

2017-08-31 Thread felix
On 31/08/2017 01:32, Sukadev Bhattiprolu wrote: Michael Neuling [mi...@neuling.org] wrote: Suka, Please CC Christophe who as an alternative way of doing this. We ned to get agreement across all users of TIDR/AS_notify... Mikey, Thanks. There is overlap between the two patches. I will send a p

Re: [PATCH] powerpc/powernv: Turn on SCSI_AACRAID in powernv_defconfig

2017-08-31 Thread Brian King
On 08/31/2017 07:37 AM, Michael Ellerman wrote: > Stewart Smith writes: > >> Michael Ellerman writes: >>> OK. So maybe when the petitboot kernel moves up to 4.14 they may want to >>> flip it back to being a module. >> >> Yeah. We tend to keep all RAID adapters as modules because they almost >> a

[PATCH] powerpc/signal: Properly handle return value from uprobe_deny_signal()

2017-08-31 Thread Naveen N. Rao
When a uprobe is installed on an instruction that we currently do not emulate, we copy the instruction into a xol buffer and single step that instruction. If that instruction generates a fault, we abort the single stepping before invoking the signal handler. Once the signal handler is done, the upr

Re: [PATCH v2] perf test powerpc: Fix 'Object code reading' test

2017-08-31 Thread Arnaldo Carvalho de Melo
Em Thu, Aug 31, 2017 at 12:15:29PM +0300, Adrian Hunter escreveu: > On 31/08/17 12:14, Ravi Bangoria wrote: > > 'Object code reading' test always fails on powerpc guest. Two reasons > > for the failure are: > > > > 1. When elf section is too big (size beyond 'unsigned int' max value). > > objdump

Re: [GIT PULL] Please pull JSON files for POWER9 PMU events

2017-08-31 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 30, 2017 at 04:15:06PM -0700, Sukadev Bhattiprolu escreveu: > > Hi Arnaldo, > > Please pull an update to the JSON files for POWER9 PMU events. This > removes alternate event codes from the JSON files which seem to confuse > perf. > > The following changes since commit 1b2f76d77a277bb

Re: [PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-31 Thread Bjorn Helgaas
On Wed, Aug 30, 2017 at 02:02:06PM -0500, Bjorn Helgaas wrote: > On Fri, Aug 11, 2017 at 06:19:33PM +1000, Alexey Kardashevskiy wrote: > > From: Gavin Shan > > > > The PowerNV platform is the only user of pcibios_sriov_disable(). > > The IOV BAR could be shifted by pci_iov_update_resource(). The

Re: [PATCH RFC] Interface to set SPRN_TIDR

2017-08-31 Thread Sukadev Bhattiprolu
felix [fe...@linux.vnet.ibm.com] wrote: > On 31/08/2017 01:32, Sukadev Bhattiprolu wrote: > > Michael Neuling [mi...@neuling.org] wrote: > > > Suka, > > > > > > Please CC Christophe who as an alternative way of doing this. We ned to > > > get > > > agreement across all users of TIDR/AS_notify...

[PATCH] uprobe: Warn if unable to install breakpoint

2017-08-31 Thread Naveen N. Rao
When we try to install a uprobe breakpoint in uprobe_mmap(), we ignore all errors encountered in the process per this comment at the top of the function: /* * Called from mmap_region/vma_adjust with mm->mmap_sem acquired. * * Currently we ignore all errors and always return 0, th

Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-31 Thread Haren Myneni
On 08/31/2017 06:40 AM, Dan Streetman wrote: > On Thu, Aug 31, 2017 at 3:44 AM, Haren Myneni > wrote: >> Thanks MIchael and Dan for your review comments. >> >> >> On 08/29/2017 06:32 AM, Dan Streetman wrote: >>> On Mon, Aug 28, 2017 at 7:25 PM, Michael Ellerman >>> wrote: Hi Haren, >>

Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-31 Thread Haren Myneni
On 08/31/2017 06:31 AM, Dan Streetman wrote: > On Tue, Aug 29, 2017 at 5:54 PM, Haren Myneni > wrote: >> On 08/29/2017 02:23 PM, Benjamin Herrenschmidt wrote: >>> On Tue, 2017-08-29 at 09:58 -0400, Dan Streetman wrote: > + > + ret = -EINVAL; > + if (coproc && coproc->vas.r

[PATCH V12] powerpc/vphn: Update CPU topology when VPHN enabled

2017-08-31 Thread Michael Bringmann
powerpc/numa: On Power systems with shared configurations of CPUs and memory, there are some issues with the association of additional CPUs and memory to nodes when hot-adding resources. This patch addresses some of those problems. First, it corrects the currently broken capability to set the top

Re: [PATCH v2] of: Restrict DMA configuration

2017-08-31 Thread Rob Herring
On Thu, Aug 31, 2017 at 5:32 AM, Robin Murphy wrote: > Moving DMA configuration to happen later at driver probe time had the > unnoticed side-effect that we now perform DMA configuration for *every* > device represented in DT, rather than only those explicitly created by > the of_platform and PCI

[PATCH 00/13] mmu_notifier kill invalidate_page callback v2

2017-08-31 Thread jglisse
From: Jérôme Glisse (Sorry for so many list cross-posting and big cc) Changes since v1: - remove more dead code in kvm (no testing impact) - more accurate end address computation (patch 2) in page_mkclean_one and try_to_unmap_one - added tested-by/reviewed-by gotten so far Tested as b

[PATCH 03/13] powerpc/powernv: update to new mmu_notifier semantic

2017-08-31 Thread jglisse
From: Jérôme Glisse Call to mmu_notifier_invalidate_page() are replaced by call to mmu_notifier_invalidate_range() and thus call are bracketed by call to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: linuxppc-dev@lists

Re: [RFC Part1 PATCH v3 17/17] X86/KVM: Clear encryption attribute when SEV is active

2017-08-31 Thread Borislav Petkov
On Mon, Jul 24, 2017 at 02:07:57PM -0500, Brijesh Singh wrote: > The guest physical memory area holding the struct pvclock_wall_clock and > struct pvclock_vcpu_time_info are shared with the hypervisor. Hypervisor > periodically updates the contents of the memory. When SEV is active, we > must clear

[PATCH 19/31] timer: Remove open-coded casts for .data and .function

2017-08-31 Thread Kees Cook
This standardizes the callback and data prototypes in several places that perform casting, in an effort to remove more open-coded .data and .function uses in favor of setup_timer(). Cc: Samuel Ortiz Cc: Tyrel Datwyler Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: "Jam

[PATCH 19/17] powerpc: Wrap register number correctly for string load/store instructions

2017-08-31 Thread Paul Mackerras
Michael Ellerman reported that emulate_loadstore() was trying to access element 32 of regs->gpr[], which doesn't exist, when emulating a string store instruction. This is because the string load and store instructions (lswi, lswx, stswi and stswx) are defined to wrap around from register 31 to reg

Re: [PATCH 19/31] timer: Remove open-coded casts for .data and .function

2017-08-31 Thread Tyrel Datwyler
On 08/31/2017 04:29 PM, Kees Cook wrote: > This standardizes the callback and data prototypes in several places that > perform casting, in an effort to remove more open-coded .data and > .function uses in favor of setup_timer(). > > Cc: Samuel Ortiz > Cc: Tyrel Datwyler > Cc: Benjamin Herrenschm

Re: [PATCH 19/31] timer: Remove open-coded casts for .data and .function

2017-08-31 Thread Tyrel Datwyler
On 08/31/2017 04:29 PM, Kees Cook wrote: > This standardizes the callback and data prototypes in several places that > perform casting, in an effort to remove more open-coded .data and > .function uses in favor of setup_timer(). > > Cc: Samuel Ortiz > Cc: Tyrel Datwyler > Cc: Benjamin Herrenschm

[PATCH] selftests/powerpc: fix build error in powerpc ptrace selftests.

2017-08-31 Thread wei . guo . simon
From: Simon Guo GCC 7 will take "r2" in clobber list as an error will it will get following build errors for powerpc ptrace selftests even with -fno-pic option: ptrace-tm-vsx.c: In function ‘tm_vsx’: ptrace-tm-vsx.c:42:2: error: PIC register clobbered by ‘r2’ in ‘asm’ asm __volatile__(

Re: [PATCH] uprobe: Warn if unable to install breakpoint

2017-08-31 Thread Michael Ellerman
"Naveen N. Rao" writes: > When we try to install a uprobe breakpoint in uprobe_mmap(), we ignore > all errors encountered in the process per this comment at the top of > the function: > /* > * Called from mmap_region/vma_adjust with mm->mmap_sem acquired. > * > * Currently we i

Re: [PATCH] powerpc/powernv: Turn on SCSI_AACRAID in powernv_defconfig

2017-08-31 Thread Michael Ellerman
Brian King writes: > On 08/31/2017 07:37 AM, Michael Ellerman wrote: >> Stewart Smith writes: >> >>> Michael Ellerman writes: OK. So maybe when the petitboot kernel moves up to 4.14 they may want to flip it back to being a module. >>> >>> Yeah. We tend to keep all RAID adapters as mo

[RFC PATCH] powerpc: tick broadcast handler should call tick_receive_broadcast

2017-08-31 Thread Nicholas Piggin
Recently looking through the broadcast timers code, and I wonder if we should be calling tick_receive_broadcast() here? Our __timer_interrupt() works on the decrementer clockevent device, but we should be working on the broadcast device I think? We must get away with it somehow, but I see most othe

Re: [PATCH v3 1/8] powerpc/xive: introduce a common routine xive_queue_page_alloc()

2017-08-31 Thread Benjamin Herrenschmidt
On Wed, 2017-08-30 at 21:46 +0200, Cédric Le Goater wrote: > This routine will be used in the spapr backend. Also introduce a short > xive_alloc_order() helper. > > Signed-off-by: Cédric Le Goater > Reviewed-by: David Gibson Acked-by: Benjamin Herrenschmidt > --- > arch/powerpc/sysdev/xive/c

Re: [PATCH v3 2/8] powerpc/xive: guest exploitation of the XIVE interrupt controller

2017-08-31 Thread Benjamin Herrenschmidt
On Wed, 2017-08-30 at 21:46 +0200, Cédric Le Goater wrote: > This is the framework for using XIVE in a PowerVM guest. The support > is very similar to the native one in a much simpler form. > > Each source is associated with an Event State Buffer (ESB). This is a > two bit state machine which is u

Re: [PATCH v3 3/8] powerpc/xive: rename xive_poke_esb() in xive_esb_read()

2017-08-31 Thread Benjamin Herrenschmidt
On Wed, 2017-08-30 at 21:46 +0200, Cédric Le Goater wrote: > xive_poke_esb() is performing a load/read so it is better named as > xive_esb_read() as we will need to introduce a xive_esb_write() > routine. Also use the XIVE_ESB_LOAD_EOI offset when EOI'ing LSI > interrupts. > > Signed-off-by: Cédri

Re: [PATCH v3 4/8] powerpc/xive: introduce xive_esb_write()

2017-08-31 Thread Benjamin Herrenschmidt
On Wed, 2017-08-30 at 21:46 +0200, Cédric Le Goater wrote: > Some source support MMIO stores on the ESB page to perform EOI. Let's > introduce a specific routine for this case even if this should be the > only use of it. > > Signed-off-by: Cédric Le Goater > Reviewed-by: David Gibson Acked-by: B

Re: [PATCH v3 5/8] powerpc/xive: add the HW IRQ number under xive_irq_data

2017-08-31 Thread Benjamin Herrenschmidt
On Wed, 2017-08-30 at 21:46 +0200, Cédric Le Goater wrote: > It will be required later by the H_INT_ESB hcall. > > Signed-off-by: Cédric Le Goater Acked-by: Benjamin Herrenschmidt A little but unfortunate as the number is available in the irq_data but that would mean changing more of our intern

Re: [PATCH v3 8/8] powerpc/xive: improve debugging macros

2017-08-31 Thread Benjamin Herrenschmidt
On Wed, 2017-08-30 at 21:46 +0200, Cédric Le Goater wrote: > Having the CPU identifier in the debug logs is helpful when tracking > issues. Also add some more logging and fix a compile issue in > xive_do_source_eoi(). > > Signed-off-by: Cédric Le Goater Acked-by: Benjamin Herrenschmidt > --- >

Re: [PATCH v3 6/8] powerpc/xive: introduce H_INT_ESB hcall

2017-08-31 Thread Benjamin Herrenschmidt
On Wed, 2017-08-30 at 21:46 +0200, Cédric Le Goater wrote: > The H_INT_ESB hcall() is used to issue a load or store to the ESB page > instead of using the MMIO pages. This can be used as a workaround on > some HW issues. The OS knows that this hcall should be used on an > interrupt source when the

Re: [FIX PATCH v0] powerpc: Fix memory unplug failure on radix guest

2017-08-31 Thread Bharata B Rao
On Thu, Aug 10, 2017 at 02:53:48PM +0530, Bharata B Rao wrote: > For a PowerKVM guest, it is possible to specify a DIMM device in > addition to the system RAM at boot time. When such a cold plugged DIMM > device is removed from a radix guest, we hit the following warning in the > guest kernel resul