RE: [PATCH] powerpc: mitigate impact of decrementer reset

2014-10-08 Thread Heinz Wrobel
Paul, what if your tb wraps during the test? -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+heinz.wrobel=freescale@lists.ozlabs.org] On Behalf Of Paul Clarke Sent: Tuesday, October 07, 2014 21:13 To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc:

Re: [PATCH v3 4/7] sound/radeon: Add quirk for broken 64-bit MSI

2014-10-08 Thread Alex Deucher
On Wed, Oct 8, 2014 at 1:28 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue, 2014-10-07 at 19:47 -0400, Alex Deucher wrote: This moves the setting of the quirk flag to the audio driver. While recent ASICs have that problem fixed, they don't seem to be listed in the PCI

Re: [PATCH v3 4/7] sound/radeon: Add quirk for broken 64-bit MSI

2014-10-08 Thread Benjamin Herrenschmidt
On Tue, 2014-10-07 at 19:47 -0400, Alex Deucher wrote: This moves the setting of the quirk flag to the audio driver. While recent ASICs have that problem fixed, they don't seem to be listed in the PCI IDs of the current driver, so let's quirk all the ATI HDMI for now. The consequences

Re: [PATCH v3 4/7] sound/radeon: Add quirk for broken 64-bit MSI

2014-10-08 Thread Takashi Iwai
At Wed, 08 Oct 2014 16:28:16 +1100, Benjamin Herrenschmidt wrote: On Tue, 2014-10-07 at 19:47 -0400, Alex Deucher wrote: This moves the setting of the quirk flag to the audio driver. While recent ASICs have that problem fixed, they don't seem to be listed in the PCI IDs of the

Re: [PATCH 08/44] kernel: Move pm_power_off to common code

2014-10-08 Thread Jesper Nilsson
On Tue, Oct 07, 2014 at 07:28:10AM +0200, Guenter Roeck wrote: pm_power_off is defined for all architectures. Move it to common code. Have all architectures call do_kernel_poweroff instead of pm_power_off. Some architectures point pm_power_off to machine_power_off. For those, call

Re: [PATCH] powerpc: Reimplement __get_SP() as a function not a define

2014-10-08 Thread Li Zhong
On 三, 2014-10-01 at 15:10 +1000, Anton Blanchard wrote: Li Zhong points out an issue with our current __get_SP() implementation. If ftrace function tracing is enabled (ie -pg profiling using _mcount) we spill a stack frame on 64bit all the time. If a function calls __get_SP() and later

[PATCH v4 0/16] POWER8 Coherent Accelerator device driver

2014-10-08 Thread Michael Neuling
This is the latest version of the cxl driver. Change log below: v4: - Updates based on comments from mpe (offline and online). - Refactor the sstp lock to be an entry lock. - Fixed error paths on new status_mutex in start_work - added some missing include files - moved associating pid/mm

[PATCH v4 01/16] powerpc/cell: Move spu_handle_mm_fault() out of cell platform

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com Currently spu_handle_mm_fault() is in the cell platform. This code is generically useful for other non-cell co-processors on powerpc. This patch moves this function out of the cell platform into arch/powerpc/mm so that others may use it. Signed-off-by: Ian

[PATCH v4 02/16] powerpc/cell: Move data segment faulting code out of cell platform

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com __spu_trap_data_seg() currently contains code to determine the VSID and ESID required for a particular EA and mm struct. This code is generically useful for other co-processors. This moves the code of the cell platform so it can be used by other powerpc code.

[PATCH v4 03/16] powerpc/cell: Make spu_flush_all_slbs() generic

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This moves spu_flush_all_slbs() into a generic call copro_flush_all_slbs(). This will be useful when we add cxl which also needs a similar SLB flush call. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Michael Neuling mi...@neuling.org ---

[PATCH v4 04/16] powerpc/msi: Improve IRQ bitmap allocator

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com Currently msi_bitmap_alloc_hwirqs() will round up any IRQ allocation requests to the nearest power of 2. eg. ask for 5 IRQs and you'll get 8. This wastes a lot of IRQs which can be a scarce resource. For cxl we may require multiple IRQs for every context that

[PATCH v4 05/16] powerpc/mm: Export mmu_kernel_ssize and mmu_linear_psize

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com Export mmu_kernel_ssize and mmu_linear_psize. These are needed by the cxl driver which has it's own MMU. To setup the MMU cxl needs access to these. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Michael Neuling mi...@neuling.org ---

[PATCH v4 06/16] powerpc/powernv: Split out set MSI IRQ chip code

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com Some of the MSI IRQ code in pnv_pci_ioda_msi_setup() is generically useful so split it out. This will be used by some of the cxl PCIe code later. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Michael Neuling mi...@neuling.org ---

[PATCH v4 07/16] cxl: Add new header for call backs and structs

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This new header adds callbacks and structs needed by the rest of the kernel to hook into the cxl infrastructure. This adds the cxl_ctx_in_use() function for use in the mm code to see if any cxl contexts are currently in use. This is used by the tlbie() to

[PATCH v4 08/16] powerpc/powerpc: Add new PCIe functions for allocating cxl interrupts

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This adds a number of functions for allocating IRQs under powernv PCIe for cxl. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/pnv-pci.h| 31 ++

[PATCH v4 09/16] powerpc/mm: Add new hash_page_mm()

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This adds a new function hash_page_mm() based on the existing hash_page(). This version allows any struct mm to be passed in, rather than assuming current. This is useful for servicing co-processor faults which are not in the context of the current running

[PATCH v4 10/16] powerpc/opal: Add PHB to cxl mode call

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This adds the OPAL call to change a PHB into cxl mode. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/include/asm/opal.h| 2 ++ arch/powerpc/platforms/powernv/opal-wrappers.S |

[PATCH v4 11/16] powerpc/mm: Add hooks for cxl

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This adds hooks into the core powerpc mm code for cxl. The core powerpc code sometimes uses local tlbie. Unfortunately this won't work with the current cxl driver as it relies on snooping tlbie broadcasts. The cxl hardware can have TLB entries invalidated

[PATCH v4 12/16] cxl: Add base builtin support

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This adds the base cxl support that cannot be built as a module. Specifically it adds the cxl callbacks that are called from the core powerpc mm code which must always exist irrespective of if the cxl module is loaded or not. This is similar to how cell works

[PATCH v4 14/16] cxl: Add userspace header file

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This adds a header file for use by userspace programs wanting to interact with the kernel cxl driver. It defines structs and magic numbers required for userspace to interact with devices in /dev/cxl/afuM.N. Further documentation on this interface is added in

[PATCH v4 15/16] cxl: Add driver to Kbuild and Makefiles

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Michael Neuling mi...@neuling.org --- drivers/misc/cxl/Kconfig | 17 + drivers/misc/cxl/Makefile | 2 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/misc/cxl/Kconfig

[PATCH v4 16/16] cxl: Add documentation for userspace APIs

2014-10-08 Thread Michael Neuling
From: Ian Munsie imun...@au1.ibm.com This documentation gives an overview of the hardware architecture, userspace APIs via /dev/cxl/afuM.N and the syfs files. It also adds a MAINTAINERS file entry for cxl. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Michael Neuling

Re: [PATCH] tools/perf/powerpc: Fix build break

2014-10-08 Thread Aneesh Kumar K.V
Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com writes: CC arch/powerpc/util/skip-callchain-idx.o arch/powerpc/util/skip-callchain-idx.c: In function ‘check_return_reg’: arch/powerpc/util/skip-callchain-idx.c:55:3: error: implicit declaration of function ‘pr_debug’

Re: powerpc: mitigate impact of decrementer reset

2014-10-08 Thread Preeti U Murthy
On 10/08/2014 08:22 AM, Michael Ellerman wrote: On Tue, 2014-07-10 at 19:13:24 UTC, Paul Clarke wrote: The POWER ISA defines an always-running decrementer which can be used to schedule interrupts after a certain time interval has elapsed. The decrementer counts down at the same frequency as

Re: [PATCH v4 13/16] cxl: Driver code for powernv PCIe based cards for userspace access

2014-10-08 Thread Ian Munsie
Excerpts from Michael Neuling's message of 2014-10-08 19:55:02 +1100: +static ssize_t afu_read(struct file *file, char __user *buf, size_t count, +loff_t *off) ... +for (;;) { +prepare_to_wait(ctx-wq, wait, TASK_INTERRUPTIBLE); +if (ctx_event_pending(ctx)) +

[PATCH] CXL: Fix afu_read() not doing finish_wait() on signal or non-blocking

2014-10-08 Thread Ian Munsie
If afu_read() returned due to a signal or the AFU file descriptor being opened non-blocking it would not call finish_wait() before returning, which could lead to a crash later when something else wakes up the wait queue. This patch restructures the wait logic to ensure that the cleanup is done

回复: [PATCH 08/44] kernel: Move pm_power_off to common code

2014-10-08 Thread Xuetao Guan
- Guenter Roeck li...@roeck-us.net 写道: pm_power_off is defined for all architectures. Move it to common code. Have all architectures call do_kernel_poweroff instead of pm_power_off. Some architectures point pm_power_off to machine_power_off. For those, call do_kernel_poweroff from

Re: [PATCH] powerpc: mitigate impact of decrementer reset

2014-10-08 Thread Paul Clarke
On 10/08/2014 12:37 AM, Heinz Wrobel wrote: what if your tb wraps during the test? Per the Power ISA, Time Base is 64 bits, monotonically increasing, and is writable only in hypervisor state. To my understanding, it is set to zero at boot (although this is not prescribed). Also, as noted

Re: [PATCH V3 3/3] powerpc, ptrace: Enable support for miscellaneous registers

2014-10-08 Thread Anshuman Khandual
On 08/28/2014 03:05 AM, Sukadev Bhattiprolu wrote: Anshuman Khandual [khand...@linux.vnet.ibm.com] wrote: | This patch enables get and set of miscellaneous registers through ptrace | PTRACE_GETREGSET/PTRACE_SETREGSET interface by implementing new powerpc | specific register set REGSET_MISC

Re: [PATCH v2 1/2] spi: fsl-spi: Fix parameter ram offset setup for CPM1

2014-10-08 Thread leroy christophe
Le 07/10/2014 02:15, Scott Wood a écrit : On Sat, 2014-10-04 at 14:02 +0200, christophe leroy wrote: Le 03/10/2014 22:29, Scott Wood a écrit : On Fri, 2014-10-03 at 18:49 +0200, Christophe Leroy wrote: On CPM1, the SPI parameter RAM has a default location. In fsl_spi_cpm_get_pram() there was

Re: [PATCH v2 1/2] spi: fsl-spi: Fix parameter ram offset setup for CPM1

2014-10-08 Thread Scott Wood
On Wed, 2014-10-08 at 18:21 +0200, leroy christophe wrote: Le 07/10/2014 02:15, Scott Wood a écrit : On Sat, 2014-10-04 at 14:02 +0200, christophe leroy wrote: What should it look like if that offset had to be in the device tree ? If the offset is not relocatable or discoverable, it should

Re: [PATCH 2/2] spi: fsl-spi: Allow dynamic allocation of CPM1 parameter RAM

2014-10-08 Thread leroy christophe
Le 07/10/2014 02:19, Scott Wood a écrit : On Sat, 2014-10-04 at 12:15 +0200, christophe leroy wrote: Le 03/10/2014 22:24, Scott Wood a écrit : On Fri, 2014-10-03 at 22:15 +0200, christophe leroy wrote: Le 03/10/2014 16:44, Mark Brown a écrit : On Fri, Oct 03, 2014 at 02:56:09PM +0200,

Re: [PATCH V3 3/3] powerpc, ptrace: Enable support for miscellaneous registers

2014-10-08 Thread Sukadev Bhattiprolu
Anshuman Khandual [khand...@linux.vnet.ibm.com] wrote: | On 08/28/2014 03:05 AM, Sukadev Bhattiprolu wrote: | | I see these in arch/powerpc/include/asm/processor.h | | #ifdef CONFIG_PPC64 | unsigned long dscr; | int dscr_inherit; | unsigned long

Re: [PATCH] tools/perf/powerpc: Fix build break

2014-10-08 Thread Sukadev Bhattiprolu
Aneesh Kumar K.V [aneesh.ku...@linux.vnet.ibm.com] wrote: | Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com writes: | |CC arch/powerpc/util/skip-callchain-idx.o | arch/powerpc/util/skip-callchain-idx.c: In function ‘check_return_reg’: | arch/powerpc/util/skip-callchain-idx.c:55:3:

Re: [PATCH 2/2] spi: fsl-spi: Allow dynamic allocation of CPM1 parameter RAM

2014-10-08 Thread Scott Wood
On Wed, 2014-10-08 at 18:46 +0200, leroy christophe wrote: Le 07/10/2014 02:19, Scott Wood a écrit : On Sat, 2014-10-04 at 12:15 +0200, christophe leroy wrote: Le 03/10/2014 22:24, Scott Wood a écrit : On Fri, 2014-10-03 at 22:15 +0200, christophe leroy wrote: Le 03/10/2014 16:44, Mark

Re: [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX

2014-10-08 Thread David Miller
From: Christophe Leroy christophe.le...@c-s.fr Date: Tue, 7 Oct 2014 15:04:53 +0200 (CEST) When using a MPC8xx as a router, 'perf' shows a significant time spent in fs_enet_interrupt() and fs_enet_start_xmit(). 'perf annotate' shows that the time spent in fs_enet_start_xmit is indeed spent

Re: [PATCH] powerpc/fsl: Add support for pci(e) machine check exception on E500MC / E5500

2014-10-08 Thread Scott Wood
On Tue, 2014-10-07 at 22:08 -0500, Jia Hongtao-B38951 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, September 30, 2014 2:36 AM To: Guenter Roeck Cc: Benjamin Herrenschmidt; Paul Mackerras; Michael Ellerman; linuxppc- d...@lists.ozlabs.org;

[PATCH] CXL: Fix afu_read() not doing finish_wait() on signal or non-blocking

2014-10-08 Thread Ian Munsie
From: Ian Munsie imun...@au1.ibm.com If afu_read() returned due to a signal or the AFU file descriptor being opened non-blocking it would not call finish_wait() before returning, which could lead to a crash later when something else wakes up the wait queue. This patch restructures the wait logic

RE: [PATCH] powerpc/fsl: Add support for pci(e) machine check exception on E500MC / E5500

2014-10-08 Thread Hongtao Jia
-Original Message- From: Wood Scott-B07421 Sent: Thursday, October 09, 2014 7:48 AM To: Jia Hongtao-B38951 Cc: Guenter Roeck; Benjamin Herrenschmidt; Paul Mackerras; Michael Ellerman; linuxppc-dev@lists.ozlabs.org; linux-ker...@vger.kernel.org; Jojy G Varghese; Guenter Roeck

Re: [PATCH V3 2/3] powerpc, ptrace: Enable support for transactional memory register sets

2014-10-08 Thread Anshuman Khandual
On 08/28/2014 03:05 AM, Sukadev Bhattiprolu wrote: Anshuman Khandual [khand...@linux.vnet.ibm.com] wrote: | This patch enables get and set of transactional memory related register | sets through PTRACE_GETREGSET/PTRACE_SETREGSET interface by implementing | four new powerpc specific register

Re: [PATCH 0/2] net: fs_enet: Remove non NAPI RX and add NAPI for TX

2014-10-08 Thread leroy christophe
Le 08/10/2014 22:03, David Miller a écrit : From: Christophe Leroy christophe.le...@c-s.fr Date: Tue, 7 Oct 2014 15:04:53 +0200 (CEST) When using a MPC8xx as a router, 'perf' shows a significant time spent in fs_enet_interrupt() and fs_enet_start_xmit(). 'perf annotate' shows that the time