Re: [PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-20 Thread Gautham R Shenoy
On Tue, Dec 19, 2017 at 09:21:52PM +1100, Balbir Singh wrote: > On Tue, Dec 19, 2017 at 8:20 PM, Gautham R Shenoy > wrote: > > Hi Viresh, > > On Mon, Dec 18, 2017 at 01:59:35PM +0530, Viresh Kumar wrote: > >> On 18-12-17, 10:41, Abhishek wrote: > >> > We need to do it in this way as the current im

Re: [PATCH] KVM: PPC: Book3S: fix XIVE migration of pending interrupts

2017-12-20 Thread Laurent Vivier
On 12/12/2017 13:02, Cédric Le Goater wrote: > When restoring a pending interrupt, we are setting the Q bit to force > a retrigger in xive_finish_unmask(). But we also need to force an EOI > in this case to reach the same initial state : P=1, Q=0. > > This can be done by not setting 'old_p' for pe

Re: [PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread christophe lombard
Le 20/12/2017 à 07:31, Vaibhav Jain a écrit : Hi Christophe, Thanks for the changes to the patch. Few minor review comments: Thanks for the review. Christophe Lombard writes: @@ -362,3 +363,17 @@ void cxl_context_mm_count_put(struct cxl_context *ctx) if (ctx->mm)

Re: [PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread Vaibhav Jain
Hi Chritophe, christophe lombard writes: > Le 20/12/2017 à 07:31, Vaibhav Jain a écrit : >> EINVAL might be a better return value instead of ENODEV in this case. > > This return code has been already discussed (with mpe) on the first > version of the patch. "Either ENODEV or ENXIO would be best

[PATCH] cxl: Check if vphb exists before iterating over AFU devices

2017-12-20 Thread Vaibhav Jain
commit 12841f87b7a8ceb3d54f171660f72a86941bfcb3 upstream, for 4.9. During an eeh a kernel-oops is reported if no vPHB is allocated to the AFU. This happens as during AFU init, an error in creation of vPHB is a non-fatal error. Hence afu->phb should always be checked for NULL before iterating over

Re: [-next PATCH 0/4] sysfs and DEVICE_ATTR_

2017-12-20 Thread Felipe Balbi
Hi, Joe Perches writes: > drivers/usb/phy/phy-tahvo.c| 2 +- Acked-by: Felipe Balbi -- balbi

Re: [PATCH v4 00/11] ASoC: fsl_ssi: Clean up - coding style level

2017-12-20 Thread Arnaud Mouiche
On 19/12/2017 01:25, Caleb Crome wrote: On Mon, Dec 18, 2017 at 3:02 PM, Nicolin Chen wrote: On Mon, Dec 18, 2017 at 02:19:08PM -0800, Caleb Crome wrote: Acked-by: Timur Tabi --- To Mark --- Mark, can you still take these changes first? Since this failed test that Caleb reported here is

Re: [PATCH 09/13] ocxl: Add trace points

2017-12-20 Thread Frederic Barrat
Le 18/12/2017 à 17:48, Philippe Ombredanne a écrit : --- /dev/null +++ b/drivers/misc/ocxl/trace.h @@ -0,0 +1,189 @@ +/* + * Copyright 2017 IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as publ

WARNING: CPU: 0 PID: 2777 at arch/powerpc/mm/hugetlbpage.c:354 h,ugetlb_free_pgd_range+0xc8/0x1e4

2017-12-20 Thread Christophe LEROY
Trying to malloc() with libhugetlbfs, it runs indefinitly doing page faults in do_page_fault()/hugetlb_fault(). When interrupting the blocked app with CTRL+C, I get the following WARNING: Any idea of what can be wrong ? I'm on a 8xx with 512k huge pages. [162980.035629] WARNING: CPU: 0 PID: 277

Re: [PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread christophe lombard
Le 20/12/2017 à 09:46, Vaibhav Jain a écrit : Hi Chritophe, christophe lombard writes: Le 20/12/2017 à 07:31, Vaibhav Jain a écrit : EINVAL might be a better return value instead of ENODEV in this case. This return code has been already discussed (with mpe) on the first version of the patc

Re: [PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread Vaibhav Jain
christophe lombard writes: > Le 20/12/2017 à 09:46, Vaibhav Jain a écrit : >>> In fact, it does not matter. I don't know what the userspace could do >>> with this value. >> Without libcxl knowing the tidr value, it cannot enforce the condition >> that only threads that have called attach can issu

[RFC PATCH 0/8] use r14 for a per-cpu kernel register

2017-12-20 Thread Nicholas Piggin
This makes r14 a fixed register and used to store per-cpu stuff in the kernel, including read-write fields that are retained over interrupts. It ends up being most useful for speeding up per-cpu pointer dereferencing and soft-irq masking and testing. But it can also reduce the number of loads and s

[RFC PATCH 1/8] powerpc/64s: stop using r14 register

2017-12-20 Thread Nicholas Piggin
--- arch/powerpc/Makefile | 1 + arch/powerpc/crypto/md5-asm.S | 40 +++ arch/powerpc/crypto/sha1-powerpc-asm.S | 10 +- arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- arch/powerpc/include/asm/ppc_asm.h | 21 +++- arc

[RFC PATCH 2/8] powerpc/64s: poison r14 register while in kernel

2017-12-20 Thread Nicholas Piggin
Poison r14 register with the PIR SPR, an a magic number. This means it must be treated like r13, saving and restoring the register on kernel entry/exit, but not restoring it when returning back to kernel However r14 will not be a constant like r13, but may be modified by the kernel, which means it

[RFC PATCH 3/8] powerpc/64s: put the per-cpu data_offset in r14

2017-12-20 Thread Nicholas Piggin
Shifted left by 16 bits, so the low 16 bits of r14 remain available. This allows per-cpu pointers to be dereferenced with a single extra shift whereas previously it was a load and add. --- arch/powerpc/include/asm/paca.h | 5 + arch/powerpc/include/asm/percpu.h | 2 +- arch/powerpc/kernel/

[RFC PATCH 4/8] powerpc/64s: put io_sync bit into r14

2017-12-20 Thread Nicholas Piggin
This simplifies spin unlock code and mmio primitives. This may not be the best use of an r14 bit, but it was a simple first proof of concept after the per-cpu data_offset, and so it can stay until we get low on bits. --- arch/powerpc/include/asm/io.h | 11 -- arch/powerpc/include/asm

[RFC PATCH 5/8] powerpc/64s: put work_pending bit into r14

2017-12-20 Thread Nicholas Piggin
Similarly, may not be worth an r14 bit, but... --- arch/powerpc/include/asm/paca.h | 4 ++-- arch/powerpc/kernel/time.c | 15 +++ arch/powerpc/xmon/xmon.c| 1 - 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc

[RFC PATCH 6/8] powerpc/64s: put irq_soft_mask bits into r14

2017-12-20 Thread Nicholas Piggin
Put the STD and PMI interrupt mask bits into r14. This benefits IRQ disabling (enabling to a lesser extent), and soft mask check in the interrupt entry handler. --- arch/powerpc/include/asm/exception-64s.h | 6 +- arch/powerpc/include/asm/hw_irq.h| 98 arc

[RFC PATCH 7/8] powerpc/64s: put irq_soft_mask and irq_happened bits into r14

2017-12-20 Thread Nicholas Piggin
This should be split into two patches. irq_happened and soft_mask. It may not be worth putting all irq_happened bits into r14, just a single "an irq did happen" bit may be good enough to then load a paca variable. --- arch/powerpc/include/asm/hw_irq.h| 23 + arch/powerpc/include/as

[RFC PATCH 8/8] powerpc/64s: inline local_irq_enable/restore

2017-12-20 Thread Nicholas Piggin
This does increase kernel text size by about 0.4%, but code is often improved by putting the interrupt-replay call out of line, and gcc function "shrink wrapping" can more often avoid setting up a stack frame, e.g., _raw_spin_unlock_irqrestore fastpath before: <_raw_spin_unlock_irqrestore>

Re: [PATCH] cxl: Check if vphb exists before iterating over AFU devices

2017-12-20 Thread Greg KH
On Wed, Dec 20, 2017 at 03:07:06PM +0530, Vaibhav Jain wrote: > commit 12841f87b7a8ceb3d54f171660f72a86941bfcb3 upstream, for 4.9. Thanks, do we also need this for 4.4? If so, can you provide a backport? thanks, greg k-h

Re: [PATCH v4 1/2] powerpc/powernv: Enable tunneled operations

2017-12-20 Thread Frederic Barrat
Le 15/12/2017 à 14:48, Philippe Bergheaud a écrit : P9 supports PCI tunneled operations (atomics and as_notify). This patch adds support for tunneled operations on powernv, with a new API, to be called by device drivers: pnv_pci_get_tunnel_ind() Tell driver the 16-bit ASN indication used b

Re: [PATCH v4 00/11] ASoC: fsl_ssi: Clean up - coding style level

2017-12-20 Thread Nicolin Chen
On Wed, Dec 20, 2017 at 12:40:37PM +0100, Arnaud Mouiche wrote: > >>>Ugh, so it's basically quite broken again -- before these patches. > >>I remember Arnaud reviewed one of my changes back to September. > >>So I suppose the test should be fine at that time -- so a change > >>being merged recently

[PATCH V5] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread Christophe Lombard
The POWER9 core supports a new feature: ASB_Notify which requires the support of the Special Purpose Register: TIDR. The ASB_Notify command, generated by the AFU, will attempt to wake-up the host thread identified by the particular LPID:PID:TID. This patch assign a unique TIDR (thread id) for the

Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-12-20 Thread Ram Pai
On Wed, Dec 20, 2017 at 08:34:56AM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2017-12-18 at 14:28 -0800, Dave Hansen wrote: > > > We do not have generic support for something like that on ppc. > > > The kernel looks at the device tree to determine what hardware features > > > are available. But

Re: [PATCH v4 2/2] cxl: read PHB indications from the device tree

2017-12-20 Thread Frederic Barrat
Le 15/12/2017 à 14:48, Philippe Bergheaud a écrit : Configure the P9 XSL_DSNCTL register with PHB indications found in the device tree, or else use legacy hard-coded values. Signed-off-by: Philippe Bergheaud --- Changelog: v2: New patch. Use the new device tree property "ibm,phb-indications"

Re: [RFC PATCH 3/8] powerpc/64s: put the per-cpu data_offset in r14

2017-12-20 Thread Gabriel Paubert
On Thu, Dec 21, 2017 at 12:52:01AM +1000, Nicholas Piggin wrote: > Shifted left by 16 bits, so the low 16 bits of r14 remain available. > This allows per-cpu pointers to be dereferenced with a single extra > shift whereas previously it was a load and add. > --- > arch/powerpc/include/asm/paca.h

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-20 Thread Matthew Wilcox
On Mon, Dec 18, 2017 at 01:35:47PM -0700, Ross Zwisler wrote: > What I'm hoping to do with this series is to just provide a sysfs > representation of the HMAT so that applications can know which NUMA nodes to > select with existing utilities like numactl. This series does not currently > alter any

Re: [PATCH V5] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread Frederic Barrat
--- a/drivers/misc/cxl/file.c +++ b/drivers/misc/cxl/file.c @@ -173,7 +173,7 @@ static long afu_ioctl_start_work(struct cxl_context *ctx, * flags are set it's invalid */ if (work.reserved1 || work.reserved2 || work.reserved3 || - work.reserved4 || work.reserve

Re: [PATCH 2/2] ps3: Improve a size determination in five functions

2017-12-20 Thread Geoff Levand
Hi, On 12/16/2017 05:54 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 16 Dec 2017 14:21:04 +0100 > > Replace the specification of data structures by variable references > as the parameter for the operator "sizeof" to make the corresponding size > determination a bit safer acco

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-20 Thread Dave Hansen
On 12/20/2017 10:19 AM, Matthew Wilcox wrote: > I don't know what the right interface is, but my laptop has a set of > /sys/devices/system/memory/memoryN/ directories. Perhaps this is the > right place to expose write_bw (etc). Those directories are already too redundant and wasteful. I think we

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-20 Thread Ross Zwisler
On Wed, Dec 20, 2017 at 10:19:37AM -0800, Matthew Wilcox wrote: > On Mon, Dec 18, 2017 at 01:35:47PM -0700, Ross Zwisler wrote: > > What I'm hoping to do with this series is to just provide a sysfs > > representation of the HMAT so that applications can know which NUMA nodes to > > select with exis

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-20 Thread Matthew Wilcox
On Wed, Dec 20, 2017 at 12:22:21PM -0800, Dave Hansen wrote: > On 12/20/2017 10:19 AM, Matthew Wilcox wrote: > > I don't know what the right interface is, but my laptop has a set of > > /sys/devices/system/memory/memoryN/ directories. Perhaps this is the > > right place to expose write_bw (etc). >

Re: ps3: Improve a size determination in five functions

2017-12-20 Thread SF Markus Elfring
> Some observations: > > o Your patch fixes no bug nor replaces any depreciated feature. How do you think about information from the section “14) Allocating memory” in the document “coding-style.rst” for the shown source code transformation? > o There will be no functional change; … Yes. - T

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-20 Thread Ross Zwisler
On Wed, Dec 20, 2017 at 01:16:49PM -0800, Matthew Wilcox wrote: > On Wed, Dec 20, 2017 at 12:22:21PM -0800, Dave Hansen wrote: > > On 12/20/2017 10:19 AM, Matthew Wilcox wrote: > > > I don't know what the right interface is, but my laptop has a set of > > > /sys/devices/system/memory/memoryN/ direc

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-20 Thread Dan Williams
On Wed, Dec 20, 2017 at 1:24 PM, Ross Zwisler wrote: > On Wed, Dec 20, 2017 at 01:16:49PM -0800, Matthew Wilcox wrote: >> On Wed, Dec 20, 2017 at 12:22:21PM -0800, Dave Hansen wrote: >> > On 12/20/2017 10:19 AM, Matthew Wilcox wrote: >> > > I don't know what the right interface is, but my laptop h

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-20 Thread Ross Zwisler
On Wed, Dec 20, 2017 at 02:29:56PM -0800, Dan Williams wrote: > On Wed, Dec 20, 2017 at 1:24 PM, Ross Zwisler > wrote: > > On Wed, Dec 20, 2017 at 01:16:49PM -0800, Matthew Wilcox wrote: > >> On Wed, Dec 20, 2017 at 12:22:21PM -0800, Dave Hansen wrote: > >> > On 12/20/2017 10:19 AM, Matthew Wilcox

Re: [net] Revert "net: core: maybe return -EEXIST in __dev_alloc_name"

2017-12-20 Thread Rasmus Villemoes
On Tue, Dec 19 2017, Michael Ellerman wrote: > Hi Johannes, > >> From: Johannes Berg >> >> This reverts commit d6f295e9def0; some userspace (in the case > > This revert seems to have broken networking on one of my powerpc > machines, according to git bisect. > > The symptom is DHCP fails and I

Re: ps3: Improve a size determination in five functions

2017-12-20 Thread Geoff Levand
On 12/20/2017 01:20 PM, SF Markus Elfring wrote: >> o Your patch fixes no bug nor replaces any depreciated feature. > > How do you think about information from the section “14) Allocating memory” > in the document “coding-style.rst” for the shown source code transformation? In terms of importanc

Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-12-20 Thread Benjamin Herrenschmidt
On Wed, 2017-12-20 at 09:50 -0800, Ram Pai wrote: > The argument against this patch is -- it should not be baked into > the ABI as yet, since we do not have clarity on what applications need. > > As it stands today the only way to figure out the information from > userspace is by probing the kern

Re: [-next PATCH 4/4] treewide: Use DEVICE_ATTR_WO

2017-12-20 Thread Zhang Rui
On Tue, 2017-12-19 at 10:15 -0800, Joe Perches wrote: > Convert DEVICE_ATTR uses to DEVICE_ATTR_WO where possible. > > Done with perl script: > > $ git grep -w --name-only DEVICE_ATTR | \ >   xargs perl -i -e 'local $/; while (<>) { > s/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,\s*\(?(?:\s*S_IWUSR\s*|\s*0200

RE: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-20 Thread Elliott, Robert (Persistent Memory)
> -Original Message- > From: Linux-nvdimm [mailto:linux-nvdimm-boun...@lists.01.org] On Behalf Of > Ross Zwisler ... > > On Wed, Dec 20, 2017 at 10:19:37AM -0800, Matthew Wilcox wrote: ... > > initiator is a CPU? I'd have expected you to expose a memory controller > > abstraction rather

Re: [PATCH v2 2/7] powerpc/kernel: Add uevents in EEH error/resume

2017-12-20 Thread Juan Alvarez
On 12/18/17 10:59 PM, Russell Currey wrote: > On Mon, 2017-12-18 at 22:50 -0600, Bjorn Helgaas wrote: >> [+cc Keith, Gabriele, Dongdong] >> >> On Mon, Dec 18, 2017 at 04:38:03PM -0600, Bryant G. Ly wrote: >>> Devices can go offline when EEH is reported. This patch adds >>> a change to the kernel o

Re: [PATCH v2 2/7] powerpc/kernel: Add uevents in EEH error/resume

2017-12-20 Thread Juan Alvarez
On 12/19/17 12:27 AM, Benjamin Herrenschmidt wrote: > On Mon, 2017-12-18 at 22:50 -0600, Bjorn Helgaas wrote: >> [+cc Keith, Gabriele, Dongdong] >> >> On Mon, Dec 18, 2017 at 04:38:03PM -0600, Bryant G. Ly wrote: >>> Devices can go offline when EEH is reported. This patch adds >>> a change to the

Re: [PATCH v1 7/7] pseries/setup: Add Initialization of VF Bars

2017-12-20 Thread Juan Alvarez
On 12/19/17 12:38 AM, Alexey Kardashevskiy wrote: > On 19/12/17 06:29, Juan Alvarez wrote: >> This is PF only path. Yes either we have a root returned otherwise >> will fall back to iomem_resource. > You have removed context from my response, do not do that please. My apologies. I will not do tha

Re: [PATCH] cxl: Check if vphb exists before iterating over AFU devices

2017-12-20 Thread Vaibhav Jain
Greg KH writes: > On Wed, Dec 20, 2017 at 03:07:06PM +0530, Vaibhav Jain wrote: >> commit 12841f87b7a8ceb3d54f171660f72a86941bfcb3 upstream, for 4.9. > > Thanks, do we also need this for 4.4? If so, can you provide a > backport? > Thanks Greg for applying this patch on 4.9 stable tree. I have do

[PATCH] cxl: Check if vphb exists before iterating over AFU devices

2017-12-20 Thread Vaibhav Jain
commit 12841f87b7a8ceb3d54f171660f72a86941bfcb3 upstream, for 4.3. During an eeh a kernel-oops is reported if no vPHB is allocated to the AFU. This happens as during AFU init, an error in creation of vPHB is a non-fatal error. Hence afu->phb should always be checked for NULL before iterating over

Re: [PATCH] powerpc/powernv : Add support to enable sensor groups

2017-12-20 Thread Shilpasri G Bhat
Hi, On 12/04/2017 10:11 AM, Stewart Smith wrote: > Shilpasri G Bhat writes: >> On 11/28/2017 05:07 PM, Michael Ellerman wrote: >>> Shilpasri G Bhat writes: >>> Adds support to enable/disable a sensor group. This can be used to select the sensor groups that needs to be copied to main me