Re: [PATCH 4/4] mm: numa: Slow PTE scan rate if migration failures occur

2015-03-10 Thread Dave Chinner
On Mon, Mar 09, 2015 at 09:52:18AM -0700, Linus Torvalds wrote: On Mon, Mar 9, 2015 at 4:29 AM, Dave Chinner da...@fromorbit.com wrote: Also, is there some sane way for me to actually see this behavior on a regular machine with just a single socket? Dave is apparently running in some

Re: [RFC PATCH 1/2] powerpc: Add a proper syscall for switching endianness

2015-03-10 Thread Benjamin Herrenschmidt
On Tue, 2015-03-10 at 18:36 +1100, Michael Ellerman wrote: We currently have a special syscall for switching endianness. This is syscall number 0x1ebe, which is handled explicitly in the 64-bit syscall exception entry. That has a few problems, firstly the syscall number is outside of the

Re: [PATCH] powerpc: book3e_64: fix the align size for paca_struct

2015-03-10 Thread Kevin Hao
On Mon, Mar 09, 2015 at 06:31:25PM +1100, Benjamin Herrenschmidt wrote: On Mon, 2015-03-09 at 09:13 +0800, Kevin Hao wrote: On Sun, Mar 08, 2015 at 08:13:26PM +1100, Benjamin Herrenschmidt wrote: On Sat, 2015-03-07 at 19:14 +0800, Kevin Hao wrote: All the cache line size of the current

Re: [RFC PATCH 1/2] powerpc: Add a proper syscall for switching endianness

2015-03-10 Thread Michael Ellerman
On Tue, 2015-03-10 at 20:34 +1100, Benjamin Herrenschmidt wrote: On Tue, 2015-03-10 at 18:36 +1100, Michael Ellerman wrote: We currently have a special syscall for switching endianness. This is syscall number 0x1ebe, which is handled explicitly in the 64-bit syscall exception entry.

Re: [PATCH 4/4] mm: numa: Slow PTE scan rate if migration failures occur

2015-03-10 Thread Mel Gorman
On Mon, Mar 09, 2015 at 09:02:19PM +, Mel Gorman wrote: On Sun, Mar 08, 2015 at 08:40:25PM +, Mel Gorman wrote: Because if the answer is 'yes', then we can safely say: 'we regressed performance because correctness [not dropping dirty bits] comes before performance'. If

Re: [RFC V2 03/12] i2c: at91: make use of the new infrastructure for quirks

2015-03-10 Thread Ludovic Desroches
Hi Wolfram, You can add my Acked-by and Tested-By: Ludovic Desroches ludovic.desroc...@atmel.com Tested on sama5d3, some problems with at24 eeprom on sama5d4 but it doesn't come from the i2c quirks patch series. Regards Ludovic On Sun, Mar 08, 2015 at 09:28:45AM +0100, Wolfram Sang wrote:

[PATCH v2] powerpc: book3e_64: fix the align size for paca_struct

2015-03-10 Thread Kevin Hao
All the cache line size of the current book3e 64bit SoCs are 64 bytes. So we should use this size to align the member of paca_struct. This only change the paca_struct's members which are private to book3e CPUs, and should not have any effect to book3s ones. With this, we save 192 bytes. Also

Re: [PATCH] powerpc64: use fixed lock token for !CONFIG_PPC_SPLPAR

2015-03-10 Thread Kevin Hao
On Tue, Mar 10, 2015 at 11:15:18AM +1100, Michael Ellerman wrote: On Mon, 2015-03-09 at 17:53 +1100, Benjamin Herrenschmidt wrote: On Sat, 2015-03-07 at 19:19 +0800, Kevin Hao wrote: It makes no sense to use a variant lock token on a platform which doesn't support for shared-processor

Re: [PATCH 03/15] fbdev: aty128fb: replace PPC_OF with PPC

2015-03-10 Thread Tomi Valkeinen
On 27/02/15 03:05, Kevin Hao wrote: On Fri, Feb 27, 2015 at 11:11:15AM +1100, Benjamin Herrenschmidt wrote: On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote: The PPC_OF is a ppc specific option which is used to mean that the firmware device tree access functions are available. Since all the

Re: [PATCH 3/4] powerpc/eeh: fix powernv_eeh_wait_state delay logic

2015-03-10 Thread Gavin Shan
On Mon, Mar 09, 2015 at 11:17:31AM +0800, Wei Yang wrote: As the comment indicates, powernv_eeh_get_state() will inform EEH core to delay 1 second. This means the delay doesn't happen when powernv_eeh_get_state() returns. This patch moves the delay subtraction just before msleep(), which is the

Re: [RFC PATCH 1/2] powerpc: Add a proper syscall for switching endianness

2015-03-10 Thread Benjamin Herrenschmidt
On Wed, 2015-03-11 at 11:08 +0530, Anshuman Khandual wrote: On 03/10/2015 04:25 PM, Michael Ellerman wrote: On Tue, 2015-03-10 at 20:34 +1100, Benjamin Herrenschmidt wrote: On Tue, 2015-03-10 at 18:36 +1100, Michael Ellerman wrote: We currently have a special syscall for switching

Re: [PATCH v12 15/21] powerpc/powernv: Reserve additional space for IOV BAR according to the number of total_pe

2015-03-10 Thread Bjorn Helgaas
On Mon, Mar 02, 2015 at 03:41:32PM +0800, Wei Yang wrote: On Tue, Feb 24, 2015 at 02:52:34AM -0600, Bjorn Helgaas wrote: On Tue, Feb 24, 2015 at 02:34:42AM -0600, Bjorn Helgaas wrote: From: Wei Yang weiy...@linux.vnet.ibm.com On PHB3, PF IOV BAR will be covered by M64 window to have

Re: [PATCH 1/4] powerpc/eeh: fix start/end/flags type in struct pci_io_addr_range{}

2015-03-10 Thread Gavin Shan
On Mon, Mar 09, 2015 at 11:17:29AM +0800, Wei Yang wrote: struct pci_io_addr_range{} stores the information of pci resources. It would be better to keep these related fields have the same type as in struct resource{}. This patch fixes the start/end/flags type in struct pci_io_addr_range{} to have

Re: [PATCH v12 14/21] powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically

2015-03-10 Thread Bjorn Helgaas
On Mon, Mar 02, 2015 at 03:50:37PM +0800, Wei Yang wrote: On Tue, Feb 24, 2015 at 02:46:53AM -0600, Bjorn Helgaas wrote: On Tue, Feb 24, 2015 at 02:34:35AM -0600, Bjorn Helgaas wrote: From: Wei Yang weiy...@linux.vnet.ibm.com Current iommu_table of a PE is a static field. This will have

Re: [PATCH 2/4] powerpc/eeh: fix comment for wait_state()

2015-03-10 Thread Gavin Shan
On Mon, Mar 09, 2015 at 11:17:30AM +0800, Wei Yang wrote: To retrieve the PCI slot state, EEH driver would set a timeout for that. While current comment is not aligned to what the code does. This patch fixes those comments according to the code. Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com

Re: [REGRESSION in 3.18][PPC] PA Semi fails to boot after: of/base: Fix PowerPC address parsing hack

2015-03-10 Thread Steven Rostedt
On Tue, 10 Mar 2015 11:28:03 +1100 Michael Ellerman m...@ellerman.id.au wrote: Mine is running: CFE version PAS-2.0.29 for ATHENA (64bit,MP,BE,PPC) Build Date: Mon Jun 30 11:47:25 PDT 2008 (mpl@mitch-1) Steve is your CFE older than that? Seems so: CFE version PAS-2.0.20 for

Re: [RFC V2 04/12] i2c: opal: make use of the new infrastructure for quirks

2015-03-10 Thread Neelesh Gupta
I tested the i2c opal driver after updating the patch as below. Basically I think we can also support write-then-{read/write} for the number of messages = 2. Ben, any issues if we support both write plus read/write in the opal driver ? Regards, Neelesh drivers/i2c/busses/i2c-opal.c | 20

[PATCH] powerpc/fsl-booke: Add T4080 SVR value

2015-03-10 Thread Igal . Liberman
From: Madalin Bucur madalin.bu...@freescale.com Signed-off-by: Madalin Bucur madalin.bu...@freescale.com --- arch/powerpc/include/asm/mpc85xx.h |1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/asm/mpc85xx.h b/arch/powerpc/include/asm/mpc85xx.h index 3bef74a..213f3a8

Re: [RFC PATCH 1/2] powerpc: Add a proper syscall for switching endianness

2015-03-10 Thread Anshuman Khandual
On 03/10/2015 04:25 PM, Michael Ellerman wrote: On Tue, 2015-03-10 at 20:34 +1100, Benjamin Herrenschmidt wrote: On Tue, 2015-03-10 at 18:36 +1100, Michael Ellerman wrote: We currently have a special syscall for switching endianness. This is syscall number 0x1ebe, which is handled explicitly

Re: [RFC V2 04/12] i2c: opal: make use of the new infrastructure for quirks

2015-03-10 Thread Neelesh Gupta
On 03/11/2015 04:42 AM, Benjamin Herrenschmidt wrote: On Tue, 2015-03-10 at 22:43 +0530, Neelesh Gupta wrote: I tested the i2c opal driver after updating the patch as below. Basically I think we can also support write-then-{read/write} for the number of messages = 2. Ben, any issues if we

Re: [PATCH 03/15] fbdev: aty128fb: replace PPC_OF with PPC

2015-03-10 Thread Kevin Hao
On Tue, Mar 10, 2015 at 02:23:12PM +0200, Tomi Valkeinen wrote: I just sent out a v2 [1] a few hours earlier with some minor updates. We plan to merge this patch series via the powerpc tree in 4.1 cycle if I can collect all the acks from the corresponding driver maintainers. Fbdev

Re: [PATCH v12 10/21] PCI: Consider additional PF's IOV BAR alignment in sizing and assigning

2015-03-10 Thread Bjorn Helgaas
On Mon, Mar 02, 2015 at 03:32:47PM +0800, Wei Yang wrote: On Tue, Feb 24, 2015 at 02:41:52AM -0600, Bjorn Helgaas wrote: On Tue, Feb 24, 2015 at 02:34:06AM -0600, Bjorn Helgaas wrote: From: Wei Yang weiy...@linux.vnet.ibm.com When sizing and assigning resources, we divide the resources

Re: [PATCH v5 29/29] vfio: powerpc/spapr: Support Dynamic DMA windows

2015-03-10 Thread Alex Williamson
On Tue, 2015-03-10 at 01:07 +1100, Alexey Kardashevskiy wrote: This adds create/remove window ioctls to create and remove DMA windows. sPAPR defines a Dynamic DMA windows capability which allows para-virtualized guests to create additional DMA windows on a PCI bus. The existing linux kernels

Re: [PATCH v12 17/21] powerpc/powernv: Shift VF resource with an offset

2015-03-10 Thread Bjorn Helgaas
On Wed, Mar 04, 2015 at 11:01:24AM +0800, Wei Yang wrote: On Tue, Feb 24, 2015 at 03:00:37AM -0600, Bjorn Helgaas wrote: On Tue, Feb 24, 2015 at 02:34:57AM -0600, Bjorn Helgaas wrote: From: Wei Yang weiy...@linux.vnet.ibm.com On PowerNV platform, resource position in M64 implies the PE#

Re: [PATCH 4/4] powerpc/eeh: remove unused macro IS_BRIDGE

2015-03-10 Thread Gavin Shan
On Mon, Mar 09, 2015 at 11:17:32AM +0800, Wei Yang wrote: Currently, the macro IS_BRIDGE is not used any where. This patch just removes it. Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com Acked-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- arch/powerpc/kernel/eeh.c |2 --

Re: [PATCH 3/4] powerpc/eeh: fix powernv_eeh_wait_state delay logic

2015-03-10 Thread Wei Yang
On Wed, Mar 11, 2015 at 04:13:46PM +1100, Gavin Shan wrote: On Mon, Mar 09, 2015 at 11:17:31AM +0800, Wei Yang wrote: As the comment indicates, powernv_eeh_get_state() will inform EEH core to delay 1 second. This means the delay doesn't happen when powernv_eeh_get_state() returns. This patch

Re: [PATCH v5 03/29] vfio: powerpc/spapr: Check that TCE page size is equal to it_page_size

2015-03-10 Thread Alex Williamson
On Tue, 2015-03-10 at 01:06 +1100, Alexey Kardashevskiy wrote: This checks that the TCE table page size is not bigger that the size of a page we just pinned and going to put its physical address to the table. Otherwise the hardware gets unwanted access to physical memory between the end of

Re: [PATCH 0/4] Support registering specific reset handler

2015-03-10 Thread Gavin Shan
On Fri, Mar 06, 2015 at 12:38:59PM -0600, Bjorn Helgaas wrote: On Fri, Feb 20, 2015 at 04:53:08PM +1100, Gavin Shan wrote: On Thu, Feb 19, 2015 at 04:57:47PM -0200, casca...@linux.vnet.ibm.com wrote: On Tue, Feb 17, 2015 at 09:36:47AM +1100, Gavin Shan wrote: On Mon, Feb 16, 2015 at 11:14:27AM

[REGRESSION in 3.18][PPC] PA Semi fails to boot after: of/base: Fix PowerPC address parsing hack

2015-03-10 Thread Christian Zigotzky
On 10/03/2015 01:33 a.m., Olof Johansson wrote: * Electra: First development/eval board. Funky USB on localbus, plenty of PCI-e. Two GigE, one 10GigE XAUI. CompactFlash and IDE on localbus too. Usually shipped with a PCI-e SATA card and a USB card. * Chitra: Second edition dev/eval board. Moved

[RFC PATCH 1/2] powerpc: Add a proper syscall for switching endianness

2015-03-10 Thread Michael Ellerman
We currently have a special syscall for switching endianness. This is syscall number 0x1ebe, which is handled explicitly in the 64-bit syscall exception entry. That has a few problems, firstly the syscall number is outside of the usual range, which confuses various tools. For example strace

[RFC PATCH 2/2] selftests/powerpc: Add a test of the switch_endian() syscall

2015-03-10 Thread Michael Ellerman
This adds a test of the switch_endian() syscall we added in the previous commit. We test it by calling the endian switch syscall, and then executing some code in the other endian which writes to stdout and then does exit(0). If the endian switch failed to happen that code sequence will be

Re: [PATCH v5 03/29] vfio: powerpc/spapr: Check that TCE page size is equal to it_page_size

2015-03-10 Thread Alex Williamson
On Wed, 2015-03-11 at 09:57 +1100, Alexey Kardashevskiy wrote: On 03/11/2015 06:56 AM, Alex Williamson wrote: On Tue, 2015-03-10 at 01:06 +1100, Alexey Kardashevskiy wrote: This checks that the TCE table page size is not bigger that the size of a page we just pinned and going to put its

Re: [RFC V2 04/12] i2c: opal: make use of the new infrastructure for quirks

2015-03-10 Thread Benjamin Herrenschmidt
On Tue, 2015-03-10 at 22:43 +0530, Neelesh Gupta wrote: I tested the i2c opal driver after updating the patch as below. Basically I think we can also support write-then-{read/write} for the number of messages = 2. Ben, any issues if we support both write plus read/write in the opal driver ?

Re: [PATCH v5 03/29] vfio: powerpc/spapr: Check that TCE page size is equal to it_page_size

2015-03-10 Thread Alex Williamson
On Wed, 2015-03-11 at 10:14 +1100, Benjamin Herrenschmidt wrote: On Tue, 2015-03-10 at 17:03 -0600, Alex Williamson wrote: return (PAGE_SHIFT + compound_order(compound_head(page) = page_shift); This won't be bool though. Yes, it will. Don't you have your parenthesis in the

Re: [PATCH v5 03/29] vfio: powerpc/spapr: Check that TCE page size is equal to it_page_size

2015-03-10 Thread Alexey Kardashevskiy
On 03/11/2015 06:56 AM, Alex Williamson wrote: On Tue, 2015-03-10 at 01:06 +1100, Alexey Kardashevskiy wrote: This checks that the TCE table page size is not bigger that the size of a page we just pinned and going to put its physical address to the table. Otherwise the hardware gets unwanted

Re: [PATCH v5 03/29] vfio: powerpc/spapr: Check that TCE page size is equal to it_page_size

2015-03-10 Thread Benjamin Herrenschmidt
On Tue, 2015-03-10 at 17:03 -0600, Alex Williamson wrote: return (PAGE_SHIFT + compound_order(compound_head(page) = page_shift); This won't be bool though. Yes, it will. Don't you have your parenthesis in the wrong place, Alex ? :-) This will (I'll do this) shift = PAGE_SHIFT

Re: [PATCH v5 07/29] vfio: powerpc/spapr: Moving pinning/unpinning to helpers

2015-03-10 Thread Alex Williamson
On Tue, 2015-03-10 at 01:07 +1100, Alexey Kardashevskiy wrote: This is a pretty mechanical patch to make next patches simpler. New tce_iommu_unuse_page() helper does put_page() now but it might skip that after the memory registering patch applied. As we are here, this removes unnecessary

Re: [PATCH v5 03/29] vfio: powerpc/spapr: Check that TCE page size is equal to it_page_size

2015-03-10 Thread Alexey Kardashevskiy
On 03/11/2015 10:03 AM, Alex Williamson wrote: On Wed, 2015-03-11 at 09:57 +1100, Alexey Kardashevskiy wrote: On 03/11/2015 06:56 AM, Alex Williamson wrote: On Tue, 2015-03-10 at 01:06 +1100, Alexey Kardashevskiy wrote: This checks that the TCE table page size is not bigger that the size of a

[PATCH v3] powerpc/numa: set node_possible_map to only node_online_map during boot

2015-03-10 Thread Nishanth Aravamudan
On 10.03.2015 [10:55:05 +1100], Michael Ellerman wrote: On Thu, 2015-03-05 at 21:27 -0800, Nishanth Aravamudan wrote: diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 0257a7d659ef..0c1716cd271f 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -958,6

Re: [PATCH 4/4] mm: numa: Slow PTE scan rate if migration failures occur

2015-03-10 Thread Linus Torvalds
On Mon, Mar 9, 2015 at 12:19 PM, Dave Chinner da...@fromorbit.com wrote: On Mon, Mar 09, 2015 at 09:52:18AM -0700, Linus Torvalds wrote: What's your virtual environment setup? Kernel config, and virtualization environment to actually get that odd fake NUMA thing happening? I don't have the

Re: [PATCH v5 26/29] vfio: powerpc/spapr: Define v2 IOMMU

2015-03-10 Thread Alex Williamson
On Tue, 2015-03-10 at 01:07 +1100, Alexey Kardashevskiy wrote: The existing IOMMU code takes/releases ownership over the existing IOMMU tables created by the platform code, i.e. the tables remain in memory all the time. Also, the existing IOMMU requires VFIO_IOMMU_ENABLE call to start working

Re: [PATCH v5 27/29] vfio: powerpc/spapr: powerpc/powernv/ioda2: Rework ownership

2015-03-10 Thread Alex Williamson
On Tue, 2015-03-10 at 01:07 +1100, Alexey Kardashevskiy wrote: Before the IOMMU user would take control over the IOMMU table belonging to a specific IOMMU group. This approach did not allow sharing tables between IOMMU groups attached to the same container. This introduces a new IOMMU

Re: [PATCH v5 27/29] vfio: powerpc/spapr: powerpc/powernv/ioda2: Rework ownership

2015-03-10 Thread Alexey Kardashevskiy
On 03/11/2015 11:09 AM, Alex Williamson wrote: On Tue, 2015-03-10 at 01:07 +1100, Alexey Kardashevskiy wrote: Before the IOMMU user would take control over the IOMMU table belonging to a specific IOMMU group. This approach did not allow sharing tables between IOMMU groups attached to the same