Re: [PATCH] powerpc: Fail remap_4k_pfn() if PFN doesn't fit inside PTE

2014-07-10 Thread Madhusudanan Kandasamy
Hi Stephen, Thanks for the suggestion, I'll send a new patch. On Thursday 10 July 2014 04:19 AM, Stephen Rothwell wrote: Hi Madhusudanan, On Wed, 09 Jul 2014 21:38:31 +0530 Madhusudanan Kandasamy kma...@linux.vnet.ibm.com wrote: diff --git a/arch/powerpc/include/asm/pte-hash64-64k.h

[PATCH V2] powerpc: Fail remap_4k_pfn() if PFN doesn't fit inside PTE

2014-07-10 Thread Madhusudanan Kandasamy
V2 : Rewritten to avoid helper function as suggested by Stephen Rothwell. remap_4k_pfn() silently truncates upper bits of input 4K PFN if it cannot be contained in PTE. This leads invalid memory mapping and could result in a system crash when the memory is accessed. This patch fails remap_4k_pfn()

[PATCH] powerpc/kvm: Create proper names for the kvm_host_state PMU fields

2014-07-10 Thread Michael Ellerman
We have two arrays in kvm_host_state that contain register values for the PMU. Currently we only create an asm-offsets symbol for the base of the arrays, and do the array offset in the assembly code. Creating an asm-offsets symbol for each field individually makes the code much nicer to read,

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-10 Thread Alexander Gordeev
On Wed, Jul 09, 2014 at 10:06:48AM -0600, Bjorn Helgaas wrote: Out of curiosity, do you have a pointer to this? It looks like it I.e. ICH8 chapter 12.1.30 or ICH10 chapter 14.1.27 uses one vector per port, and I'm wondering if the reason it requests 16 is because there's some possibility of

Re: [PATCH] powerpc/kvm: Create proper names for the kvm_host_state PMU fields

2014-07-10 Thread Alexander Graf
On 10.07.14 11:34, Michael Ellerman wrote: We have two arrays in kvm_host_state that contain register values for the PMU. Currently we only create an asm-offsets symbol for the base of the arrays, and do the array offset in the assembly code. Creating an asm-offsets symbol for each field

Re: [PATCH v2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-10 Thread Alexander Graf
On 09.07.14 00:59, Stewart Smith wrote: Hi! Thanks for review, much appreciated! Alexander Graf ag...@suse.de writes: On 08.07.14 07:06, Stewart Smith wrote: @@ -1528,6 +1535,7 @@ static void kvmppc_run_core(struct kvmppc_vcore *vc) int i, need_vpa_update; int srcu_idx;

Re: [PATCH v2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-10 Thread Alexander Graf
On 10.07.14 15:07, Mel Gorman wrote: On Thu, Jul 10, 2014 at 01:05:47PM +0200, Alexander Graf wrote: On 09.07.14 00:59, Stewart Smith wrote: Hi! Thanks for review, much appreciated! Alexander Graf ag...@suse.de writes: On 08.07.14 07:06, Stewart Smith wrote: @@ -1528,6 +1535,7 @@ static

Re: [PATCH v2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-10 Thread Alexander Graf
On 10.07.14 15:30, Mel Gorman wrote: On Thu, Jul 10, 2014 at 03:17:16PM +0200, Alexander Graf wrote: On 10.07.14 15:07, Mel Gorman wrote: On Thu, Jul 10, 2014 at 01:05:47PM +0200, Alexander Graf wrote: On 09.07.14 00:59, Stewart Smith wrote: Hi! Thanks for review, much appreciated!

Re: [PATCH 2/9] drivers: base: support cpu cache information interface to userspace via sysfs

2014-07-10 Thread Sudeep Holla
Hi Greg, Thanks for reviewing this. On 10/07/14 01:09, Greg Kroah-Hartman wrote: On Wed, Jun 25, 2014 at 06:30:37PM +0100, Sudeep Holla wrote: +static const struct device_attribute *cache_optional_attrs[] = { + dev_attr_coherency_line_size, + dev_attr_ways_of_associativity, +

Re: [PATCH] powerpc/pseries: dynamically added OF nodes need to call of_node_init

2014-07-10 Thread Nathan Fontenot
On 07/09/2014 09:33 PM, Michael Ellerman wrote: On Wed, 2014-07-09 at 21:20 -0400, Tyrel Datwyler wrote: Commit 75b57ecf9 refactored device tree nodes to use kobjects such that they can be exposed via /sysfs. A secondary commit 0829f6d1f furthered this rework by moving the kobect

[PATCH 0/6] powerpc/powernv: Support M64 window

2014-07-10 Thread Guo Chao
Currently, all MMIO resources, including 64-bits MMIO resources are hooked to PHB 32-bits MMIO BAR, which has limited space. If there're PCI devices with large 64-bits MMIO BAR (could reach 1GB), we're running out of MMIO resources (as well as PE numbers) quickly. The patchset reuses the M32

[PATCH 1/6] powerpc/powernv: Enable M64 aperatus for PHB3

2014-07-10 Thread Guo Chao
This patch enable M64 aperatus for PHB3. We already had platform hook (ppc_md.pcibios_window_alignment) to affect the PCI resource assignment done in PCI core so that each PE's M32 resource was built on basis of M32 segment size. Similarly, we're using that for M64 assignment on basis of M64

[PATCH 6/6] powerpc/powernv: Handle compound PE in config accessors

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The PCI config accessors check for PE frozen state and clear it if EEH is disabled. The patch handles compound PE in config accessors if PHB supports it. For consistency, all PEs will be put into frozen state if any one in compound group gets frozen by

[PATCH 3/6] powerpc/powernv: Split ioda_eeh_get_state()

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com Function ioda_eeh_get_state() is used to fetch EEH state for PHB or PE. We're going to support compound PE and the function becomes more complicated with that. The patch splits the function into two for PHB and PE cases separately. Besides, I also clean

[PATCH 5/6] powerpc/powernv: Handle compound PE for EEH

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The patch handles compound PE for EEH backend. If one specific PE in compound group has been frozen, we enforces to freeze all PEs in the group. If we're enable DMA or MMIO for one PE in compound group, DMA or MMIO of all PEs in the group will be

[PATCH 4/6] powerpc/powernv: handle compound PE

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The patch introduces 3 PHB callbacks: compound PE retrieval, force freezing and unfreezing compound PE. The PCI config accessors and EEH backend can use them in subsequent patches. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com ---

Re: [PATCH V2] powerpc: Fail remap_4k_pfn() if PFN doesn't fit inside PTE

2014-07-10 Thread Brian W Hart
On Thu, Jul 10, 2014 at 02:12:19PM +0530, Madhusudanan Kandasamy wrote: V2 : Rewritten to avoid helper function as suggested by Stephen Rothwell. remap_4k_pfn() silently truncates upper bits of input 4K PFN if it cannot be contained in PTE. This leads invalid memory mapping and could result in

[PATCH 2/6] powerpc/powernv: Allows to freeze PE

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com For compound PE, all PEs should be frozen if any one in the group becomes frozen. Unfortunately, hardware doesn't always do that automatically with help of PELTV. So we have to flirt with PESTA/B a bit to freeze all PEs for the case. The patch

[PATCH V3] powerpc : Fail remap_4k_pfn() if PFN doesn't fit inside PTE

2014-07-10 Thread Madhusudanan Kandasamy
remap_4k_pfn() silently truncates upper bits of input 4K PFN if it cannot be contained in PTE. This leads invalid memory mapping and could result in a system crash when the memory is accessed. This patch fails remap_4k_pfn() and returns -EINVAL if the input 4K PFN cannot be contained in PTE. V3 :

Re: [PATCH v2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-10 Thread Mel Gorman
On Thu, Jul 10, 2014 at 01:05:47PM +0200, Alexander Graf wrote: On 09.07.14 00:59, Stewart Smith wrote: Hi! Thanks for review, much appreciated! Alexander Graf ag...@suse.de writes: On 08.07.14 07:06, Stewart Smith wrote: @@ -1528,6 +1535,7 @@ static void kvmppc_run_core(struct

Re: [PATCH v2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-10 Thread Mel Gorman
On Thu, Jul 10, 2014 at 03:17:16PM +0200, Alexander Graf wrote: On 10.07.14 15:07, Mel Gorman wrote: On Thu, Jul 10, 2014 at 01:05:47PM +0200, Alexander Graf wrote: On 09.07.14 00:59, Stewart Smith wrote: Hi! Thanks for review, much appreciated! Alexander Graf ag...@suse.de writes: On

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-10 Thread Bjorn Helgaas
On Thu, Jul 10, 2014 at 4:11 AM, Alexander Gordeev agord...@redhat.com wrote: On Wed, Jul 09, 2014 at 10:06:48AM -0600, Bjorn Helgaas wrote: Out of curiosity, do you have a pointer to this? It looks like it I.e. ICH8 chapter 12.1.30 or ICH10 chapter 14.1.27 uses one vector per port, and I'm

Re: [PATCH] powerpc/pseries: dynamically added OF nodes need to call of_node_init

2014-07-10 Thread Tyrel Datwyler
On 07/09/2014 07:33 PM, Michael Ellerman wrote: On Wed, 2014-07-09 at 21:20 -0400, Tyrel Datwyler wrote: Commit 75b57ecf9 refactored device tree nodes to use kobjects such that they can be exposed via /sysfs. A secondary commit 0829f6d1f furthered this rework by moving the kobect

[PATCH v2] powerpc/pseries: dynamically added OF nodes need to call of_node_init

2014-07-10 Thread Tyrel Datwyler
Commit 75b57ecf9 refactored device tree nodes to use kobjects such that they can be exposed via /sysfs. A secondary commit 0829f6d1f furthered this rework by moving the kobect initialization logic out of of_node_add into its own of_node_init function. The inital commit removed the existing

Re: [PATCH v2] powerpc/pseries: dynamically added OF nodes need to call of_node_init

2014-07-10 Thread Nathan Fontenot
On 07/10/2014 01:50 PM, Tyrel Datwyler wrote: Commit 75b57ecf9 refactored device tree nodes to use kobjects such that they can be exposed via /sysfs. A secondary commit 0829f6d1f furthered this rework by moving the kobect initialization logic out of of_node_add into its own of_node_init

Re: [PATCH tty-next 14/22] tty: Remove tty_wait_until_sent_from_close()

2014-07-10 Thread Greg Kroah-Hartman
On Mon, Jun 16, 2014 at 09:17:11AM -0400, Peter Hurley wrote: tty_wait_until_sent_from_close() drops the tty lock while waiting for the tty driver to finish sending previously accepted data (ie., data remaining in its write buffer and transmit fifo). However, dropping the tty lock is a

Re: [PATCH] powerpc/kvm: Create proper names for the kvm_host_state PMU fields

2014-07-10 Thread Michael Ellerman
On Thu, 2014-07-10 at 12:16 +0200, Alexander Graf wrote: On 10.07.14 11:34, Michael Ellerman wrote: We have two arrays in kvm_host_state that contain register values for the PMU. Currently we only create an asm-offsets symbol for the base of the arrays, and do the array offset in the

[git pull] Please pull powerpc.git merge branch

2014-07-10 Thread Benjamin Herrenschmidt
Hi Linus ! Here are a few more powerpc fixes for 3.16 There's a small series of 3 patches that fix saving/restoring MMUCR2 when using KVM without which perf goes completely bonkers in the host system. Another perf fix from Anton that's been rotting away in patchwork due to my poor eyesight, a