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

2015-03-10 Thread Wei Yang
On Tue, Mar 10, 2015 at 09:55:19PM -0500, Bjorn Helgaas wrote: >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 >> >> >> >> On PowerN

[PATCH 1/2] powerpc/eeh: Introduce eeh_pe_inject_err()

2015-03-10 Thread Gavin Shan
The patch defines PCI error types and functions in eeh.h and exports function eeh_pe_inject_err(), which will be called by VFIO driver to inject the specified PCI error to the indicated PE for testing purpose. Signed-off-by: Gavin Shan --- arch/powerpc/include/asm/eeh.h | 24 ar

[PATCH 2/2] drivers/vfio: Support EEH error injection

2015-03-10 Thread Gavin Shan
The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR) to inject the specified EEH error, which is represented by (struct vfio_eeh_pe_err), to the indicated PE for testing purpose. Signed-off-by: Gavin Shan --- Documentation/vfio.txt| 47 ++--

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

2015-03-10 Thread Anshuman Khandual
On 03/11/2015 11:13 AM, Benjamin Herrenschmidt wrote: > 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:

[PATCH SLOF] pci-properties: Remove redundant call to device-type

2015-03-10 Thread Alexey Kardashevskiy
At the moment SLOF adds a "device_type" property automatically for every single PCI device based on its class even if there is no SLOF driver for such a device. OF1275 says that "device_type" is for implemented interfaces only. A side effect of this is virtio-balloon getting device_type=="memory" w

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

2015-03-10 Thread Wei Yang
On Tue, Mar 10, 2015 at 09:51:25PM -0500, Bjorn Helgaas wrote: >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 >> >> >> >> On PHB3,

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

2015-03-10 Thread Wei Yang
On Tue, Mar 10, 2015 at 09:47:37PM -0500, Bjorn Helgaas wrote: >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 >> >> >> >> Current i

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

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 switchin

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 ex

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

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 Please repost after

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 t

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 Acked-by: Gavin Shan Thanks, Gavin >--- > arch/powerpc/kernel/eeh.c |2 -- > 1 file changed, 2 deletions(-) > >diff --git

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. >

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 suppo

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 > >> > >> On PowerNV platform, resource position in M64 implies the PE# the resource > >

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 > >> > >> On PHB3, PF IOV BAR will be covered by M64 window to have better PE > >> isola

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 > >> > >> Current iommu_table of a PE is a static field. This will have a problem > >>

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 > >> > >> When sizing and assigning resources, we divide the resources into two > >> lis

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 kernel

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 co

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 ow

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 worki

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 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 exact .co

[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 > >

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

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 unnecess

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 pare

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) > > > > sh

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 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

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 ac

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

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

2015-03-10 Thread Igal . Liberman
From: Madalin Bucur Signed-off-by: Madalin Bucur --- 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 100644 --- a/arch/powerpc/include/asm/mpc85xx.h +++ b/ar

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

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 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 ELECTRA (64bit,MP,B

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 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: > On Wed, Feb 25, 2015 at 05:

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'. >

[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 change

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-proce

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

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

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: [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 t

[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 illegal

[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 does

[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