[PATCH v3 24/24] cxl: Add AFU virtual PHB and kernel API

2015-05-26 Thread Michael Neuling
This patch does two things. Firstly it presents the Accelerator Function Unit (AFUs) behind the POWER Service Layer (PSL) as PCI devices on a virtual PCI Host Bridge (vPHB). This in in addition to the PSL being a PCI device itself. As part of the Coherent Accelerator Interface Architecture (CAIA

[PATCH v3 23/24] cxl: Export file ops for use by API

2015-05-26 Thread Michael Neuling
The cxl kernel API will allow drivers other than cxl to export a file descriptor which has the same userspace API. These file descriptors will be able to be used against libcxl. This exports those file ops for use by other drivers. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drive

[PATCH v3 22/24] cxl: Move include file cxl.h -> cxl-base.h

2015-05-26 Thread Michael Neuling
This moves the current include file from cxl.h -> cxl-base.h. This current include file is used only to pass information between the base driver that needs to be built into the kernel and the cxl module. This is to make way for a new include/misc/cxl.h which will contain just the kernel API for o

[PATCH v3 21/24] cxl: Cleanup Makefile

2015-05-26 Thread Michael Neuling
Cleanup Makefile by fixing line wrapping. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/cxl/Makefile b/drivers/misc/cxl/Makefile index edb494d..f9f5514 100644 --- a/drivers/mis

[PATCH v3 20/24] cxl: Rework context lifetimes

2015-05-26 Thread Michael Neuling
This reworks contexts lifetimes a bit to enable the kernel API where we may want to reuse contexts. Here we will want to start and stop contexts without freeing them. Start context does the get pid & ctx so stop context will need to do the puts. Here we move put pid & ctx to the detach context pat

[PATCH v3 19/24] cxl: Configure PSL for kernel contexts and merge code

2015-05-26 Thread Michael Neuling
This updates AFU directed and dedicated modes for contexts attached to the kernel. The SR (similar to the MSR in the core) calculation is getting quite complex and is duplicated in AFU directed and dedicated modes. This patch also merges this SR calculation for these modes. Signed-off-by: Michae

[PATCH v3 18/24] cxl: Split afu_register_irqs() function

2015-05-26 Thread Michael Neuling
Split the afu_register_irqs() function so that different parts can be useful elsewhere. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/irq.c | 31 --- 2 files changed, 25 insertions(+), 7 deletions(-) diff --g

[PATCH v3 17/24] cxl: Only check pid for userspace contexts

2015-05-26 Thread Michael Neuling
We only need to check the pid attached to this context for userspace contexts. Kernel contexts can skip this check. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/fault.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff -

[PATCH v3 16/24] cxl: Export some symbols

2015-05-26 Thread Michael Neuling
Export some symbols which will soon be used elsewhere in this driver. Now they are global we rename them so to avoid collisions. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h| 5 + drivers/misc/cxl/native.c | 10 +- 2 files changed, 10 insertio

[PATCH v3 15/24] cxl: cxl_afu_reset() -> __cxl_afu_reset()

2015-05-26 Thread Michael Neuling
Rename cxl_afu_reset() to __cxl_afu_reset() to we can reuse this function name in the API. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h| 2 +- drivers/misc/cxl/native.c | 8 drivers/misc/cxl/pci.c| 4 ++-- drivers/misc/cxl/sysfs.c | 2 +- 4 fi

[PATCH v3 14/24] cxl: Rework detach context functions

2015-05-26 Thread Michael Neuling
Rework __detach_context() and cxl_context_detach() so we can reuse them in the kernel API. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/context.c | 20 +--- drivers/misc/cxl/cxl.h | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff --g

[PATCH v3 13/24] cxl: Add cookie parameter to afu_release_irqs()

2015-05-26 Thread Michael Neuling
Add cookie parameter to afu_release_irqs() so that we can pass in a different cookie than the context structure. This will be useful for other kernel drivers that want to call this but get their own cookie back in the interrupt handler. Update all existing call sites. Signed-off-by: Michael Neul

[PATCH v3 12/24] cxl: Dump debug info on the AFU configuration record

2015-05-26 Thread Michael Neuling
Now that we parse the AFU Configuration record, dump some info on it when in debug mode. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/pci.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.

[PATCH v3 11/24] cxl: Fix error path on probe

2015-05-26 Thread Michael Neuling
When probing we call pci_enable_device() but don't call pci_disable_device() on fail. This causes refcounting issues in the PCI subsystem if a second driver tries to bind to the same device. This patch adds the pci_disable_device() to the probe error path. This error path is hit when this cxl driv

[PATCH v3 10/24] cxl: Re-order card init to check the VSEC earlier

2015-05-26 Thread Michael Neuling
From: Ian Munsie When we expose AFUs as virtual PCI devices, they may look like the physical CAPI PCI card. ie they may have the same vendor/device IDs. We want to avoid these AFUs binding to this driver and any init this driver may do. Re-order card init to check the VSEC earlier before assig

[PATCH v3 09/24] cxl: Remove unnecessarily verbose print in cxl_remove()

2015-05-26 Thread Michael Neuling
Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index a9c90d2..8076aa3 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -1119,8 +1119,6 @@ static

[PATCH v3 08/24] cxl: Add shutdown hook

2015-05-26 Thread Michael Neuling
Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- drivers/misc/cxl/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index b80f867..a9c90d2 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -1135,4 +1135,5 @@ struct

[PATCH v3 07/24] cxl: Document external user of existing API

2015-05-26 Thread Michael Neuling
Now that libcxl is public, let's document it. Signed-off-by: Michael Neuling Acked-by: Ian Munsie --- Documentation/ABI/testing/sysfs-class-cxl | 22 ++ Documentation/powerpc/cxl.txt | 4 2 files changed, 26 insertions(+) diff --git a/Documentation/ABI/tes

[PATCH v3 06/24] powerpc/pci: Add pcibios_disable_device() hook

2015-05-26 Thread Michael Neuling
This adds a hook into the powerpc pci code for pci_disable_device() calls. The generic code already provides a weak pcibios_disable_device() symbol, so we just need to provide our own in powerpc and it'll get picked up. This is passed directly to the phb controller ops, provided one exists. Sign

[PATCH v3 05/24] powerpc/pci: Add shutdown hook to pci_controller_ops

2015-05-26 Thread Michael Neuling
Currently pnv_pci_shutdown() calls the PHB shutdown code for all PHBs in the system. It dereferences the private_data assuming it's a powernv PHB, which won't be the case when we have different PHB in the systems (like when we add vPHBs for CXL). This moves the shutdown hook to the pci_controller

[PATCH v3 04/24] powerpc: Add cxl context to device archdata

2015-05-26 Thread Michael Neuling
Add cxl context pointer to archdata. We'll want to create one of these for cxl PCI devices. Put them here until we can get a pci_dev specific private data. This location was suggested by benh. Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/device.h | 3 +++ 1 file changed, 3 inse

[PATCH v3 03/24] powerpc/pci: Add release_device() hook to phb ops

2015-05-26 Thread Michael Neuling
Add release_device() hook to phb ops so we can clean up for specific phbs. Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch/powerpc/kernel/pci-hotplug.c | 5 + 2 files changed, 7 insertions(+) diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arc

[PATCH v3 02/24] powerpc/pci: Export symbols for CXL

2015-05-26 Thread Michael Neuling
From: Daniel Axtens Export pcibios_claim_one_bus, pcibios_scan_phb and pcibios_alloc_controller. These will be used by the CXL driver. Signed-off-by: Daniel Axtens --- arch/powerpc/kernel/pci-common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/pci-common.c b/ar

[PATCH v3 01/24] powerpc/copro: Fix faulting kernel segments

2015-05-26 Thread Michael Neuling
This fixes calculating the key bits (KP and KS) in the SLB VSID for kernel mappings. I'm not CCing this to stable as there are no uses of this currently. Signed-off-by: Michael Neuling --- arch/powerpc/mm/copro_fault.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/a

[PATCH v3 00/24] cxl: Add AFU virtual PHB and in kernel API

2015-05-26 Thread Michael Neuling
This patch series adds the ability to present AFUs as PCI devices on a virtual PHB. It also adds an in kernel API (to the existing userspace API) so AFU drivers can be written as kernel drivers. This series is dependant on Daniel DMA set mask and MSI PCI controller ops patch series. v3: Cleans u

Re: [PATCH] fbuffer: improve toggle cursor performance

2015-05-26 Thread Thomas Huth
On Wed, 27 May 2015 02:11:13 +0200 Greg Kurz wrote: > SLOF currently calls hv-logical-load and hv-logical-store for every pixel > when enabling or disabling the cursor. This is suboptimal when writing one > char at a time to the console since terminal-write always toggles the cursor. > And this i

Re: [PATCH] fbuffer: improve toggle cursor performance

2015-05-26 Thread Nikunj A Dadhania
Greg Kurz writes: > SLOF currently calls hv-logical-load and hv-logical-store for every pixel > when enabling or disabling the cursor. This is suboptimal when writing one > char at a time to the console since terminal-write always toggles the cursor. > And this is precisely what grub is doing whe

Re: [v3] powerpc/mpc85xx: Add MDIO bus muxing support to the board device tree(s)

2015-05-26 Thread Scott Wood
On Thu, Apr 30, 2015 at 09:29:22AM +0300, Igal.Liberman wrote: > From: Igal Liberman > > Describe the PHY topology for all configurations supported by each board > > Based on prior work by Andy Fleming > > Signed-off-by: Igal Liberman > Signed-off-by: Shruti Kanetkar > Signed-off-by: Emil Me

[PATCH] fbuffer: improve toggle cursor performance

2015-05-26 Thread Greg Kurz
SLOF currently calls hv-logical-load and hv-logical-store for every pixel when enabling or disabling the cursor. This is suboptimal when writing one char at a time to the console since terminal-write always toggles the cursor. And this is precisely what grub is doing when the user wants to edit a m

[PATCH v3 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-26 Thread Sam Bobroff
In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is accessed as such. This patch corrects places where it is accessed as a 32 bit field by a 64 bit kernel. In some cases this is via a 32 bit load or store inst

Re: [PATCH v2 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-26 Thread Sam Bobroff
On Tue, May 26, 2015 at 10:35:08AM +0200, Alexander Graf wrote: > > > On 26.05.15 02:27, Sam Bobroff wrote: > > In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 > > bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is > > accessed as such. > > > > This patch

Re: [PATCH] powerpc/perf: Fix book3s kernel to userspace backtraces

2015-05-26 Thread Benjamin Herrenschmidt
On Tue, 2015-05-26 at 15:10 +1000, Anton Blanchard wrote: > When we take a PMU exception or a software event we call > perf_read_regs(). This overloads regs->result with a boolean that > describes if we should use the sampled instruction address register > (SIAR) or the regs. > > If the exception

Re: [alsa-devel] [PATCH] ASoC: fsl_spdif: Don't try to round-up for clock divisor calculation

2015-05-26 Thread Nicolin Chen
On Tue, May 26, 2015 at 07:02:48PM +0800, Zidan Wang wrote: > On Mon, May 25, 2015 at 08:24:25AM -0700, Nicolin Chen wrote: > > On Mon, May 25, 2015 at 12:13:45PM -0300, Fabio Estevam wrote: > > > Hi Nicolin, > > > > > > On Mon, May 25, 2015 at 12:11 PM, Nicolin Chen > > > wrote: > > > > > > >

Re: [PATCH v3 2/2] powerpc: add support for csum_add()

2015-05-26 Thread Scott Wood
On Tue, 2015-05-26 at 13:57 +, David Laight wrote: > From: Scott Wood ... > > > I'd also have thought that the 64bit C version above would be > > > generally 'good'. > > > > It doesn't generate the addc/addze sequence. At least with GCC > > 4.8.2, > > it does something like: > > > > mr

Re: [PATCH V2] QorIQ/TMU: add TMU node to device tree for QorIQ T104x

2015-05-26 Thread Scott Wood
On Tue, 2015-05-26 at 01:33 -0500, Jia Hongtao-B38951 wrote: > Hi Scott, > > Eduardo indicated that "calibration" property should add "fsl" > prefix. > I updated the patch. > Any other comments? > If not I will send V3 soon. > > Thanks. I'd go with "fsl,tmu-calibration" rather than "fsl,calibra

Re: [PATCH] ppc64 ftrace: mark data_access callees "notrace" (pt.1)

2015-05-26 Thread Torsten Duwe
On Wed, May 20, 2015 at 11:03:25AM +0200, Torsten Duwe wrote: > On Tue, May 19, 2015 at 01:27:07PM +1000, Michael Ellerman wrote: > > On Mon, 2015-05-18 at 14:29 +0200, Jiri Kosina wrote: > > > > > > ftrace already handles recursion protection by itself (depending on the > > > per-ftrace-ops FTRA

RE: [PATCH v3 2/2] powerpc: add support for csum_add()

2015-05-26 Thread David Laight
From: Scott Wood ... > > I'd also have thought that the 64bit C version above would be generally > > 'good'. > > It doesn't generate the addc/addze sequence. At least with GCC 4.8.2, > it does something like: > > mr tmp0, csum > li tmp1, 0 > li tmp2, 0 > a

Re: [PATCH RESEND v7 2/2] mmc: host: sdhci: Add support to disable SDR104/SDR50/DDR50 based on capability register 0.

2015-05-26 Thread Ulf Hansson
On 21 May 2015 at 10:43, Suman Tripathi wrote: > The sdhci framework disables SDR104/SDR50/DDR50 based on only quirk. > This patch adds the support to disable SDR104/SDR50/DDR50 based on > reading the capability register 0. > > Signed-off-by: Suman Tripathi > --- > --- > drivers/mmc/host/sdhci.c

Re: [PATCH] powerpc/perf: Fix book3s kernel to userspace backtraces

2015-05-26 Thread Anton Blanchard
Hi Laurentiu, > > + if ((TRAP(regs) == 0xf00) && regs->result) > > + return true; > > + > > + return false; > > Why not just > > return (TRAP(regs) == 0xf00) && regs->result; Could do, it just read a little easier to my tired eyes. Anton __

Re: [PATCH RESEND v7 1/2] arm64: dts: Add the arasan mmc nodes in apm-storm.dtsi

2015-05-26 Thread Suman Tripathi
Hi , On Thu, May 21, 2015 at 2:13 PM, Suman Tripathi wrote: > This patch adds the arasan mmc nodes to reuse the of-arasan > driver for APM X-Gene SoC. > > Signed-off-by: Suman Tripathi > --- > --- > arch/arm64/boot/dts/apm/apm-mustang.dts | 4 +++ > arch/arm64/boot/dts/apm/apm-storm.dtsi | 4

Re: [PATCH] powerpc/perf: Fix book3s kernel to userspace backtraces

2015-05-26 Thread Laurentiu Tudor
On 05/26/2015 08:10 AM, Anton Blanchard wrote: > When we take a PMU exception or a software event we call > perf_read_regs(). This overloads regs->result with a boolean that > describes if we should use the sampled instruction address register > (SIAR) or the regs. > > If the exception is in kerne

Re: [PATCH RESEND v7 2/2] mmc: host: sdhci: Add support to disable SDR104/SDR50/DDR50 based on capability register 0.

2015-05-26 Thread Suman Tripathi
On Thu, May 21, 2015 at 2:13 PM, Suman Tripathi wrote: > The sdhci framework disables SDR104/SDR50/DDR50 based on only quirk. > This patch adds the support to disable SDR104/SDR50/DDR50 based on > reading the capability register 0. > > Signed-off-by: Suman Tripathi > --- > --- > drivers/mmc/host

Re: [alsa-devel] [PATCH] ASoC: fsl_spdif: Don't try to round-up for clock divisor calculation

2015-05-26 Thread Zidan Wang
On Mon, May 25, 2015 at 08:24:25AM -0700, Nicolin Chen wrote: > On Mon, May 25, 2015 at 12:13:45PM -0300, Fabio Estevam wrote: > > Hi Nicolin, > > > > On Mon, May 25, 2015 at 12:11 PM, Nicolin Chen > > wrote: > > > > > Hi Mark, > > > > > > Is that possible for you to provisionally revert this p

[PATCH] powerpc/85xx: Replace CONFIG_USB_ISP1760_HCD by CONFIG_USB_ISP1760

2015-05-26 Thread Geert Uytterhoeven
Since commit 100832abf065bc18 ("usb: isp1760: Make HCD support optional"), CONFIG_USB_ISP1760_HCD is automatically selected when needed. Enabling that option in the defconfig is now a no-op, and no longer enables ISP1760 HCD support. Re-enable the ISP1760 driver in the defconfig by enabling USB_I

Re: [RFC] sound: ppc: keywest: check if DEQ was already instantiated

2015-05-26 Thread Dan DeVoto
Hi, I applied this patch ("check if DEQ was already instantiated") on top of "sound: ppc: keywest: drop using attach adapter" and sound works great. Everything works as expected. Below is my dmesg output. Regards, Dan On Sat, 5/23/15, Wolfram Sang wrote: > Due to changes in i2c-powermac, f

Re: [PATCH v2 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-26 Thread Alexander Graf
On 26.05.15 02:27, Sam Bobroff wrote: > In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 > bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is > accessed as such. > > This patch corrects places where it is accessed as a 32 bit field by a > 64 bit kernel. I