Re: [PATCH] powerpc/perf: Dereference bhrb entries safely

2017-12-18 Thread Ravi Bangoria
Hi Balbir, Sorry was away for few days. On 12/14/2017 05:54 PM, Balbir Singh wrote: > On Tue, Dec 12, 2017 at 11:29 PM, Ravi Bangoria > wrote: >> It may very well happen that branch instructions recorded by >> bhrb entries already get unmapped before they get processed by >> the kernel. Hence, t

Re: [alsa-devel] [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Takashi Iwai
On Mon, 18 Dec 2017 01:28:44 +0100, Joe Perches wrote: > > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for these

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

2017-12-18 Thread Alexey Kardashevskiy
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. When will you have root and when you won't? imho it should always be either one or anot

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

2017-12-18 Thread Benjamin Herrenschmidt
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 object and lets udev know of error. > > When devic

[PATCH V4 12/26] powerpc/powermac: deprecate pci_get_bus_and_slot()

2017-12-18 Thread Sinan Kaya
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Getting ready to remove pci_get_bus_and_slot() function in favor of pci_get_domain_bus_and_slot(). Hard-code the domain nu

[PATCH V4 02/26] powerpc/PCI: deprecate pci_get_bus_and_slot()

2017-12-18 Thread Sinan Kaya
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Getting ready to remove pci_get_bus_and_slot() function in favor of pci_get_domain_bus_and_slot(). Use pci_get_domain_bus_

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

2017-12-18 Thread Russell Currey
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 object and lets udev know of error. > > When devic

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

2017-12-18 Thread Bjorn Helgaas
[+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 object and lets udev know of error. > When device resumes a change is also set reporting device as > online. Therefo

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Martin K. Petersen
Joe, > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. SCSI bits look OK. Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 11/13] cxl: Remove support for "Processing accelerators" class

2017-12-18 Thread Andrew Donnellan
On 19/12/17 02:21, Frederic Barrat wrote: The cxl driver currently declares in its table of supported PCI devices the class "Processing accelerators". Therefore it may be called to probe for opencapi devices, which generates errors, as the config space of a cxl device is not compatible with openc

Re: [PATCH 07/13] ocxl: Add AFU interrupt support

2017-12-18 Thread Benjamin Herrenschmidt
On Mon, 2017-12-18 at 16:21 +0100, Frederic Barrat wrote: > Add user APIs through ioctl to allocate, free, and be notified of an > AFU interrupt. > > For opencapi, an AFU can trigger an interrupt on the host by sending a > specific command targeting a 64-bit object handle. On POWER9, this is > imp

Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE

2017-12-18 Thread Nicholas Piggin
On Mon, 18 Dec 2017 12:56:22 -0600 Josh Poimboeuf wrote: > On Mon, Dec 18, 2017 at 03:33:34PM +1000, Nicholas Piggin wrote: > > On Sun, 17 Dec 2017 20:58:54 -0600 > > Josh Poimboeuf wrote: > > > > > On Fri, Dec 15, 2017 at 07:40:09PM +1000, Nicholas Piggin wrote: > > > > On Tue, 12 Dec 2017

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Darrick J. Wong
On Sun, Dec 17, 2017 at 04:28:44PM -0800, Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for the

Re: [PATCH 02/13] powerpc/powernv: Set correct configuration space size for opencapi devices

2017-12-18 Thread Andrew Donnellan
On 19/12/17 02:21, Frederic Barrat wrote: From Andrew Donnellan Good try :) That should be "From: ..." git format-patch/send-email will handle this automatically if the commit author is set correctly, ie: git commit --amend --author="Andrew Donnellan " The configuration space for ope

Re: [PATCH 03/13] powerpc/powernv: Add opal calls for opencapi

2017-12-18 Thread Andrew Donnellan
On 19/12/17 02:21, Frederic Barrat wrote: Add opal calls to interact with the NPU: OPAL_NPU_SPA_SETUP: set the Shared Process Area (SPA) The SPA is a table containing one entry (Process Element) per memory context which can be accessed by the opencapi device. OPAL_NPU_SPA_CLEAR_CACHE: clear the

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

2017-12-18 Thread Ram Pai
On Mon, Dec 18, 2017 at 02:28:14PM -0800, Dave Hansen wrote: > On 12/18/2017 02:18 PM, Ram Pai wrote: > > b) minimum number of keys available to the application. > > if libraries consumes a few, they could provide a library > > interface to the application informing the number available to

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

2017-12-18 Thread Caleb Crome
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 already existing on the top of

Re: [PATCH 00/13] New driver to support OpenCAPI devices on POWER9

2017-12-18 Thread Andrew Donnellan
On 19/12/17 02:21, Frederic Barrat wrote: This series adds support for Open Coherent Accelerator (ocxl) devices on POWER9 processor. OpenCAPI is a consortium developing the specifications for an interface between processors and accelerators, allowing sharing the host memory with the accelerators,

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

2017-12-18 Thread Nicolin Chen
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 already existing on the top of the mainline tree, I would like to treat this mail as a separate

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

2017-12-18 Thread Bryant G. Ly
When enabling SR-IOV in pseries platform, the VF bar properties for a PF are reported on the device node in the device tree. This patch adds the IOV Bar resources to Linux structures from the device tree for later use when configuring SR-IOV by PF driver. Signed-off-by: Bryant G. Ly Signed-off-b

[PATCH v2 6/7] pseries/pci: Associate PEs to VFs in configure SR-IOV

2017-12-18 Thread Bryant G. Ly
After initial validation of SR-IOV resources, firmware will associate PEs to the dynamic VFs created within this call. This patch adds the association of PEs to the PF array of PE numbers indexed by VF. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/platforms/pserie

[PATCH v2 1/7] platform/pseries: Update VF config space after EEH

2017-12-18 Thread Bryant G. Ly
Add EEH platform operations for pseries to update VF config space. With this change after EEH, the VF will have updated config space for pseries platform. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/include/asm/eeh.h | 1 + arch/powerpc/kernel/eeh.

[PATCH v2 5/7] powerpc/kernel: Add EEH notify resume sysfs

2017-12-18 Thread Bryant G. Ly
Introduce a method for notify resume to be called from sysfs. In this patch one can now call notify resume from sysfs when is supported by platform. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/kernel/eeh_sysfs.c | 46 - 1 f

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

2017-12-18 Thread Bryant G. Ly
Devices can go offline when EEH is reported. This patch adds a change to the kernel object and lets udev know of error. When device resumes a change is also set reporting device as online. Therefore, EEH events are better propagated to user space for devices in powerpc arch. Signed-off-by: Bryant

[PATCH v2 3/7] platforms/pseries: Set eeh_pe of EEH_PE_VF type

2017-12-18 Thread Bryant G. Ly
To correctly use EEH code one has to make sure that the EEH_PE_VF is set for dynamic created VFs. Therefore this patch allocates an eeh_pe of eeh type EEH_PE_VF and associates PE with parent. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/include/asm/pci-bridge.h

[PATCH v2 4/7] powerpc/kernel Add EEH operations to notify resume

2017-12-18 Thread Bryant G. Ly
When pseries SR-IOV is enabled and after a PF driver has resumed from EEH, platform has to be notified of the event so the child VFs can be allowed to resume their normal recovery path. This patch makes the EEH operation allow unfreeze platform dependent code and adds the call to pseries EEH code.

[PATCH v1 0/7] SR-IOV Enablement on PowerVM

2017-12-18 Thread Bryant G. Ly
This patch series will enable SR-IOV on PowerVM. A specific set of lids for PFW/PHYP is required. They are planned to release with 920 at the moment. For IBM internal testers let me know of a system you want to test on and we can put on the lids required or we can provide a system to run the tests

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

2017-12-18 Thread Dave Hansen
On 12/18/2017 02:18 PM, Ram Pai wrote: > b) minimum number of keys available to the application. > if libraries consumes a few, they could provide a library > interface to the application informing the number available to > the application. The library interface can leverage (b)

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

2017-12-18 Thread Caleb Crome
On Sun, Dec 17, 2017 at 7:13 PM, Timur Tabi wrote: > > On 12/17/17 8:51 PM, Nicolin Chen wrote: >> >> Nicolin Chen (11): >>ASoC: fsl_ssi: Rename fsl_ssi_private to fsl_ssi >>ASoC: fsl_ssi: Cache pdev->dev pointer >>ASoC: fsl_ssi: Refine all comments >>ASoC: fsl_ssi: Rename register

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

2017-12-18 Thread Ram Pai
On Mon, Dec 18, 2017 at 10:54:26AM -0800, Dave Hansen wrote: > On 11/06/2017 12:57 AM, Ram Pai wrote: > > Expose useful information for programs using memory protection keys. > > Provide implementation for powerpc and x86. > > > > On a powerpc system with pkeys support, here is what is shown: > >

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Alexandre Belloni
On 17/12/2017 at 16:28:44 -0800, Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for these modifi

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Dave Chinner
On Sun, Dec 17, 2017 at 04:28:44PM -0800, Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for the

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Alex Deucher
On Sun, Dec 17, 2017 at 7:28 PM, Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for these modifie

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Paul Moore
On Sun, Dec 17, 2017 at 7:28 PM, Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for these modifie

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

2017-12-18 Thread Philippe Ombredanne
Frederic, On Mon, Dec 18, 2017 at 4:21 PM, Frederic Barrat wrote: > Define a few trace points so that we can use the standard tracing > mechanism for debug and/or monitoring. > > Signed-off-by: Frederic Barrat > --- /dev/null > +++ b/drivers/misc/ocxl/trace.h > @@ -0,0 +1,189 @@ > +/* > + * C

Re: ps3: Improve a size determination in five functions

2017-12-18 Thread Geoff Levand
On 12/18/2017 12:45 PM, SF Markus Elfring wrote: >> but you are also removing empty lines and changing the coding format. > > * Why do you not like such a change combination? > > * Do you really want to integrate further update steps in this case? I want to keep the coding style consistent throu

Re: ps3: Improve a size determination in five functions

2017-12-18 Thread SF Markus Elfring
>> 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 according to the Linux coding style convention. > > This would be OK, Thanks. > but you are also removing empty lines

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

2017-12-18 Thread Juan Alvarez
This is PF only path. Yes either we have a root returned otherwise will fall back to iomem_resource. On 12/18/17 1:21 AM, Alexey Kardashevskiy wrote: > @dev here is a VF, right? I am not familiar with powervn much but from what > I see - the devices are sitting on a root bus of their own PHB and

Re: [PATCH v1 4/7] powerpc/kernel Add EEH operations to notify resume

2017-12-18 Thread Juan Alvarez
Yes, way less. So our current design only supports less than or equal to 256 VFs per PF. That is 256*2 bytes. On 12/17/17 11:02 PM, Alexey Kardashevskiy wrote: > It is kind of assumed that the number of VFs is always less than 2048 minus > rtas call parameters (RTAS_DATA_BUF_SIZE==4096 now)?

Re: [PATCH v1 3/7] platforms/pseries: Set eeh_pe of EEH_PE_VF type

2017-12-18 Thread Juan Alvarez
Here we need to set the config_addr as PHYP (platform) does not enable the PE until the PE is bound to a VM, reason why we disable VF autoprobe. On 12/17/17 10:34 PM, Alexey Kardashevskiy wrote: > powernv does this from eeh_ops::probe, and so does pseries_eeh_probe(), do > you still need this h

Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE

2017-12-18 Thread Josh Poimboeuf
On Mon, Dec 18, 2017 at 03:33:34PM +1000, Nicholas Piggin wrote: > On Sun, 17 Dec 2017 20:58:54 -0600 > Josh Poimboeuf wrote: > > > On Fri, Dec 15, 2017 at 07:40:09PM +1000, Nicholas Piggin wrote: > > > On Tue, 12 Dec 2017 08:05:01 -0600 > > > Josh Poimboeuf wrote: > > > > > > > On Tue, Dec 1

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

2017-12-18 Thread Dave Hansen
On 11/06/2017 12:57 AM, Ram Pai wrote: > Expose useful information for programs using memory protection keys. > Provide implementation for powerpc and x86. > > On a powerpc system with pkeys support, here is what is shown: > > $ head /sys/kernel/mm/protection_keys/* > ==> /sys/kernel/mm/protectio

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

2017-12-18 Thread Bryant G. Ly
On 12/17/17 9:54 PM, Alexey Kardashevskiy wrote: > On 14/12/17 02:32, Bryant G. Ly wrote: >> Devices can go offline when EEH is reported. This patch adds >> a change to the kernel object and lets udev know of error. >> When device resumes a change is also set reporting device as >> online. Theref

Re: [PATCH 0/2] PS3: Adjustments for six function implementations

2017-12-18 Thread Geoff Levand
Hi, On 12/16/2017 05:50 AM, SF Markus Elfring wrote: > Markus Elfring (2): > Delete an error message for a failed memory allocation in two functions > Improve a size determination in five functions As I mentioned before, please keep your commit message subjects to 50 chars or less. -Geoff

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Rafael J. Wysocki
On Monday, December 18, 2017 1:28:44 AM CET Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for t

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

2017-12-18 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 1/2] ps3: Delete an error message for a failed memory allocation in two functions

2017-12-18 Thread Geoff Levand
On 12/16/2017 05:51 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 16 Dec 2017 12:32:42 +0100 > > Omit an extra message for a memory allocation failure in these functions. This is OK, I'll add it to my ps3-queue branch. -Geoff

Re: [PATCH] Fix parse_args cycle limit check.

2017-12-18 Thread Randy Dunlap
On 12/18/2017 09:34 AM, Michal Suchánek wrote: > On Fri, 15 Dec 2017 15:49:09 -0800 > Randy Dunlap wrote: > >> On 12/15/2017 01:41 PM, Michal Suchanek wrote: >>> Actually args are supposed to be renamed to next so both and args >>> hold the previous argument so both can be passed to the callback.

Re: [PATCH] Fix parse_args cycle limit check.

2017-12-18 Thread Michal Suchánek
On Fri, 15 Dec 2017 15:49:09 -0800 Randy Dunlap wrote: > On 12/15/2017 01:41 PM, Michal Suchanek wrote: > > Actually args are supposed to be renamed to next so both and args > > hold the previous argument so both can be passed to the callback. > > This additionla patch > >

Re: Mac Mini G4 defconfig ?

2017-12-18 Thread Doug Anderson
Hi, On Sun, Dec 17, 2017 at 2:54 AM, Mathieu Malaterre wrote: > On Fri, Dec 15, 2017 at 10:01 PM, Mathieu Malaterre wrote: >> On Fri, Dec 15, 2017 at 9:52 PM, Mathieu Malaterre wrote: >>> On Fri, Dec 15, 2017 at 8:50 PM, Mathieu Malaterre wrote: Hi there, Does anyone has working

Re: [PATCH 13/13] ocxl: add MAINTAINERS entry

2017-12-18 Thread Joe Perches
On Mon, 2017-12-18 at 16:21 +0100, Frederic Barrat wrote: > Signed-off-by: Frederic Barrat > Signed-off-by: Andrew Donnellan > --- > MAINTAINERS | 12 > 1 file changed, 12 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index a6e86e20761e..edc9e1db352b 100644 > --- a/MAI

[PATCH 13/13] ocxl: add MAINTAINERS entry

2017-12-18 Thread Frederic Barrat
Signed-off-by: Frederic Barrat Signed-off-by: Andrew Donnellan --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a6e86e20761e..edc9e1db352b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3919,6 +3919,18 @@ F: drivers/scsi/cxlf

[PATCH 12/13] ocxl: Documentation

2017-12-18 Thread Frederic Barrat
ocxl.rst gives a quick, high-level view of opencapi. Update ioctl-number.txt to reflect ioctl numbers being used by the ocxl driver Signed-off-by: Frederic Barrat --- Documentation/accelerators/ocxl.rst | 151 +++ Documentation/ioctl/ioctl-number.txt | 1 + 2

[PATCH 11/13] cxl: Remove support for "Processing accelerators" class

2017-12-18 Thread Frederic Barrat
The cxl driver currently declares in its table of supported PCI devices the class "Processing accelerators". Therefore it may be called to probe for opencapi devices, which generates errors, as the config space of a cxl device is not compatible with opencapi. So remove support for the generic clas

[PATCH 10/13] ocxl: Add Makefile and Kconfig

2017-12-18 Thread Frederic Barrat
OCXL_BASE triggers the platform support needed by the driver. Signed-off-by: Frederic Barrat --- drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/ocxl/Kconfig | 25 + drivers/misc/ocxl/Makefile | 10 ++ 4 files changed, 37 insert

[PATCH 09/13] ocxl: Add trace points

2017-12-18 Thread Frederic Barrat
Define a few trace points so that we can use the standard tracing mechanism for debug and/or monitoring. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/afu_irq.c | 5 ++ drivers/misc/ocxl/context.c | 2 + drivers/misc/ocxl/link.c| 11 ++- drivers/misc/ocxl/trace.c | 13 +++ dri

[PATCH 08/13] ocxl: Add a kernel API for other opencapi drivers

2017-12-18 Thread Frederic Barrat
Some of the functions done by the generic driver should also be needed by other opencapi drivers: attaching a context to an adapter, translation fault handling, AFU interrupt allocation... So to avoid code duplication, the driver provides a kernel API that other drivers can use, similar to calling

[PATCH 06/13] ocxl: Driver code for 'generic' opencapi devices

2017-12-18 Thread Frederic Barrat
Add an ocxl driver to handle generic opencapi devices. Of course, it's not meant to be the only opencapi driver, any device is free to implement its own. But if a host application only needs basic services like attaching to an opencapi adapter, have translation faults handled or allocate AFU interr

[PATCH 07/13] ocxl: Add AFU interrupt support

2017-12-18 Thread Frederic Barrat
Add user APIs through ioctl to allocate, free, and be notified of an AFU interrupt. For opencapi, an AFU can trigger an interrupt on the host by sending a specific command targeting a 64-bit object handle. On POWER9, this is implemented by mapping a special page in the address space of a process a

[PATCH 05/13] powerpc/powernv: Capture actag information for the device

2017-12-18 Thread Frederic Barrat
In the opencapi protocol, host memory contexts are referenced by a 'actag'. During setup, a driver must tell the device how many actags it can used, and what values are acceptable. On POWER9, the NPU can handle 64 actags per link, so they must be shared between all the PCI functions of the link. T

[PATCH 03/13] powerpc/powernv: Add opal calls for opencapi

2017-12-18 Thread Frederic Barrat
Add opal calls to interact with the NPU: OPAL_NPU_SPA_SETUP: set the Shared Process Area (SPA) The SPA is a table containing one entry (Process Element) per memory context which can be accessed by the opencapi device. OPAL_NPU_SPA_CLEAR_CACHE: clear the context cache The NPU keeps a cache of rece

[PATCH 04/13] powerpc/powernv: Add platform-specific services for opencapi

2017-12-18 Thread Frederic Barrat
Implement a few platform-specific calls which can be used by drivers: - provide the Transaction Layer capabilities of the host, so that the driver can find some common ground and configure the device and host appropriately. - provide the hw interrupt to be used for translation faults raised b

[PATCH 02/13] powerpc/powernv: Set correct configuration space size for opencapi devices

2017-12-18 Thread Frederic Barrat
>From Andrew Donnellan The configuration space for opencapi devices doesn't have a PCI Express capability, therefore confusing linux in thinking it's of an old PCI type with a 256-byte configuration space size, instead of the desired 4k. So add a PCI fixup to declare the correct size. Signed-of

[PATCH 01/13] powerpc/powernv: Introduce new PHB type for opencapi links

2017-12-18 Thread Frederic Barrat
The NPU was already abstracted by opal as a virtual PHB for nvlink, but it helps to be able to differentiate between a nvlink or opencapi PHB, as it's not completely transparent to linux. In particular, PE assignment differs and we'll also need the information in later patches. So rename existing

[PATCH 00/13] New driver to support OpenCAPI devices on POWER9

2017-12-18 Thread Frederic Barrat
This series adds support for Open Coherent Accelerator (ocxl) devices on POWER9 processor. OpenCAPI is a consortium developing the specifications for an interface between processors and accelerators, allowing sharing the host memory with the accelerators, using virtual addresses. The OpenCAPI dev

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Andy Shevchenko
On Mon, Dec 18, 2017 at 2:28 AM, Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for these modifie

Re: [v3 PATCH 1/3] powernv-cpufreq: Add helper to extract pstate from PMSR

2017-12-18 Thread Gautham R Shenoy
Hi Balbir, On Sun, Dec 17, 2017 at 02:04:03PM +1100, Balbir Singh wrote: > On Wed, Dec 13, 2017 at 5:57 PM, Gautham R. Shenoy > wrote: > > From: "Gautham R. Shenoy" > > > > On POWERNV platform, the fields for pstates in the Power Management > > Status Register (PMSR) and the Power Management Con

Re: [v3 PATCH 3/3] powernv-cpufreq: Treat pstates as opaque 8-bit values

2017-12-18 Thread Gautham R Shenoy
Hi Balbir, On Sun, Dec 17, 2017 at 02:17:02PM +1100, Balbir Singh wrote: > On Wed, Dec 13, 2017 at 5:57 PM, Gautham R. Shenoy [..snip..] > > > > -static inline int extract_pstate(u64 pmsr_val, unsigned int shift) > > +static inline u8 extract_pstate(u64 pmsr_val, unsigned int shift) > > { > > -

Re: [v3 PATCH 2/3] powernv-cpufreq: Fix pstate_to_idx() to handle non-continguous pstates

2017-12-18 Thread Gautham R Shenoy
Hi Balbir, On Sun, Dec 17, 2017 at 02:15:25PM +1100, Balbir Singh wrote: > On Wed, Dec 13, 2017 at 5:57 PM, Gautham R. Shenoy > wrote: > > From: "Gautham R. Shenoy" > > > > The code in powernv-cpufreq, makes the following two assumptions which > > are not guaranteed by the device-tree bindings:

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

2017-12-18 Thread Viresh Kumar
On 18-12-17, 10:41, Abhishek wrote: > We need to do it in this way as the current implementation takes the max of > the PMSR of the cores. Thus, when the frequency is required to be ramped up, > it suffices to write to just the local PMSR, but when the frequency is to be > ramped down, if we don't