[PATCH 3/3] remove the unused end in pnv_pci_vf_resource_shift()

2015-02-04 Thread Wei Yang
Signed-off-by: Wei Yang --- arch/powerpc/platforms/powernv/pci-ioda.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 1776b36..f1fc7cf 100644 --- a/arch/powerpc/platforms/powernv/pc

[PATCH 2/3] fix Reserve additional space for IOV BAR, with m64_per_iov supported

2015-02-04 Thread Wei Yang
When IOV BAR is bigger than 64MB, we just reserve a power_2 value. I guess this change is lost during the rebase. Signed-off-by: Wei Yang --- arch/powerpc/platforms/powernv/pci-ioda.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-i

[PATCH 1/3] fix on Store individual VF BAR size in struct pci_sriov

2015-02-04 Thread Wei Yang
__pci_read_base() will return 1 when it is a 64-bit BAR, which makes the resource index not correct. So i could not be the index in this case. Signed-off-by: Wei Yang --- drivers/pci/iov.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/iov.c b/drivers/pc

[PATCH 0/3] Code adjustment on pci/virtualization

2015-02-04 Thread Wei Yang
Bjorn, I had a try on your pci/virtualization branch, it works fine after applying following three patches. The reason is written in the change log. And I have tried, they could apply cleanly with the original one. For the pnv_pci_ioda_fixup_sriov(), which you suggest to merge in sriov_init() I f

Re: [PATCH v3 08/24] powerpc/spapr: vfio: Switch from iommu_table to new powerpc_iommu

2015-02-04 Thread Alexey Kardashevskiy
On 02/05/2015 12:32 AM, Alexander Graf wrote: > > > On 03.02.15 01:12, Alex Williamson wrote: >> On Thu, 2015-01-29 at 20:21 +1100, Alexey Kardashevskiy wrote: >>> Modern IBM POWERPC systems support multiple (currently two) TCE tables >>> per IOMMU group (a.k.a. PE). This adds a powerpc_iommu con

Re: [PATCH v3 12/24] powerpc/iommu/powernv: Release replaced TCE

2015-02-04 Thread Alexey Kardashevskiy
On 02/04/2015 05:08 PM, Paul Mackerras wrote: > On Thu, Jan 29, 2015 at 08:21:53PM +1100, Alexey Kardashevskiy wrote: >> At the moment writing new TCE value to the IOMMU table fails with EBUSY >> if there is a valid entry already. However PAPR specification allows >> the guest to write new TCE valu

Question about the function,andslcd_ioctl in the file,ans-lcd.c

2015-02-04 Thread nick
Greetings Benjamin and others, I am wondering why this code has not been removed: for (; ch; temp++) { /* FIXME: This is ugly, but should work, as a \0 byte is not a valid command code */ anslcd_write_byte_ctrl ( ch ); __get_user(ch, temp);

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-04 Thread Wei Yang
On Wed, Feb 04, 2015 at 02:53:13PM -0600, Bjorn Helgaas wrote: >On Wed, Feb 04, 2015 at 11:34:09AM +0800, Wei Yang wrote: >> On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: >> >On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: >> >> The actual IOV BAR range is determined by t

Re: [RFC 00/10] Freescale DPAA B/QMan drivers

2015-02-04 Thread Greg KH
On Wed, Feb 04, 2015 at 04:16:30PM -0600, Emil Medve wrote: > Hello Greg, > > > Thanks for looking at this > > On 02/04/2015 12:40 PM, Greg KH wrote: > > On Wed, Feb 04, 2015 at 08:48:32AM -0600, Emil Medve wrote: > >> > >> Hello, > >> > >> > >> This is the first attempt to publish the Freescale

Re: [PATCH V11 00/17] Enable SRIOV on Power8

2015-02-04 Thread Wei Yang
On Wed, Feb 04, 2015 at 05:44:42PM -0600, Bjorn Helgaas wrote: >On Thu, Jan 15, 2015 at 10:27:50AM +0800, Wei Yang wrote: >> This patchset enables the SRIOV on POWER8. >> >> The gerneral idea is put each VF into one individual PE and allocate required >> resources like MMIO/DMA/MSI. The major diff

Re: [PATCH V11 16/17] powerpc/powernv: Reserve additional space for IOV BAR, with m64_per_iov supported

2015-02-04 Thread Wei Yang
On Wed, Feb 04, 2015 at 04:05:18PM -0600, Bjorn Helgaas wrote: >On Thu, Jan 15, 2015 at 10:28:06AM +0800, Wei Yang wrote: >> M64 aperture size is limited on PHB3. When the IOV BAR is too big, this >> will exceed the limitation and failed to be assigned. >> >> This patch introduce a different mecha

Re: [PATCH V11 00/17] Enable SRIOV on Power8

2015-02-04 Thread Bjorn Helgaas
On Thu, Jan 15, 2015 at 10:27:50AM +0800, Wei Yang wrote: > This patchset enables the SRIOV on POWER8. > > The gerneral idea is put each VF into one individual PE and allocate required > resources like MMIO/DMA/MSI. The major difficulty comes from the MMIO > allocation and adjustment for PF's IOV

Re: [PATCH V11 06/17] powerpc/pci: Add PCI resource alignment documentation

2015-02-04 Thread Bjorn Helgaas
On Thu, Jan 15, 2015 at 10:27:56AM +0800, Wei Yang wrote: > In order to enable SRIOV on PowerNV platform, the PF's IOV BAR needs to be > adjusted: > 1. size expaned > 2. aligned to M64BT size > > This patch documents this change on the reason and how. > > Signed-off-by: Wei Yang > --- >

Re: [PATCH V11 12/17] powerpc/powernv: Reserve additional space for IOV BAR according to the number of total_pe

2015-02-04 Thread Wei Yang
On Wed, Feb 04, 2015 at 03:26:07PM -0600, Bjorn Helgaas wrote: >On Thu, Jan 15, 2015 at 10:28:02AM +0800, Wei Yang wrote: >> On PHB3, PF IOV BAR will be covered by M64 BAR to have better PE isolation. >> Mostly the total_pe number is different from the total_VFs, which will lead >> to a conflict be

Re: [PATCH V11 13/17] powerpc/powernv: Implement pcibios_iov_resource_alignment() on powernv

2015-02-04 Thread Wei Yang
On Wed, Feb 04, 2015 at 03:26:14PM -0600, Bjorn Helgaas wrote: >On Thu, Jan 15, 2015 at 10:28:03AM +0800, Wei Yang wrote: >> This patch implements the pcibios_iov_resource_alignment() on powernv >> platform. >> >> On PowerNV platform, there are 3 cases for the IOV BAR: >> 1. initial state, the IOV

Re: [RFC 00/10] Freescale DPAA B/QMan drivers

2015-02-04 Thread Emil Medve
Hello Greg, Thanks for looking at this On 02/04/2015 12:40 PM, Greg KH wrote: > On Wed, Feb 04, 2015 at 08:48:32AM -0600, Emil Medve wrote: >> >> Hello, >> >> >> This is the first attempt to publish the Freescale DPAA B/QMan drivers. They >> are >> not to be applied yet. At this stage, this is

Re: [PATCH V11 16/17] powerpc/powernv: Reserve additional space for IOV BAR, with m64_per_iov supported

2015-02-04 Thread Bjorn Helgaas
On Thu, Jan 15, 2015 at 10:28:06AM +0800, Wei Yang wrote: > M64 aperture size is limited on PHB3. When the IOV BAR is too big, this > will exceed the limitation and failed to be assigned. > > This patch introduce a different mechanism based on the IOV BAR size: > > IOV BAR size is smaller than 64

Re: [PATCH V11 13/17] powerpc/powernv: Implement pcibios_iov_resource_alignment() on powernv

2015-02-04 Thread Bjorn Helgaas
On Thu, Jan 15, 2015 at 10:28:03AM +0800, Wei Yang wrote: > This patch implements the pcibios_iov_resource_alignment() on powernv > platform. > > On PowerNV platform, there are 3 cases for the IOV BAR: > 1. initial state, the IOV BAR size is multiple times of VF BAR size > 2. after expanded, the I

Re: [PATCH V11 12/17] powerpc/powernv: Reserve additional space for IOV BAR according to the number of total_pe

2015-02-04 Thread Bjorn Helgaas
On Thu, Jan 15, 2015 at 10:28:02AM +0800, Wei Yang wrote: > On PHB3, PF IOV BAR will be covered by M64 BAR to have better PE isolation. > Mostly the total_pe number is different from the total_VFs, which will lead > to a conflict between MMIO space and the PE number. > > For example, total_VFs is

Re: [PATCH] net: fs_enet: Implement NETIF_F_SG feature

2015-02-04 Thread David Miller
From: Christophe Leroy Date: Mon, 2 Feb 2015 18:06:54 +0100 (CET) > Freescale ethernet controllers have the capability to re-assemble fragmented > data into a single ethernet frame. This patch uses this capability and > implements NETIP_F_SG feature into the fs_enet ethernet driver. > > On a MP

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-04 Thread Bjorn Helgaas
On Wed, Feb 04, 2015 at 11:34:09AM +0800, Wei Yang wrote: > On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: > >On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: > >> The actual IOV BAR range is determined by the start address and the actual > >> size for vf_num VFs BAR. After

[PATCH] macintosh: Delete an unnecessary check before the function call "of_node_put"

2015-02-04 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 4 Feb 2015 21:32:27 +0100 The of_node_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- driver

Re: [RFC 00/10] Freescale DPAA B/QMan drivers

2015-02-04 Thread Greg KH
On Wed, Feb 04, 2015 at 08:48:32AM -0600, Emil Medve wrote: > > Hello, > > > This is the first attempt to publish the Freescale DPAA B/QMan drivers. They > are > not to be applied yet. At this stage, this is more or less the drivers from > the > Freescale PowerPC SDK roughly squashed and spli

Re: [PATCH] pci/iov: fix memory leak introduced in "PCI: Store individual VF BAR size in struct pci_sriov"

2015-02-04 Thread Bjorn Helgaas
On Thu, Feb 05, 2015 at 12:08:50AM +0800, Wei Yang wrote: > Bjorn, this is an error introduced in the patch "PCI: Store individual VF BAR > size in struct pci_sriov". > > This patch is based on the pci/virtualization branch. I have tried, it could > merge with the bad one cleanly. > > Signed-off-

[PATCH] pci/iov: fix memory leak introduced in "PCI: Store individual VF BAR size in struct pci_sriov"

2015-02-04 Thread Wei Yang
Bjorn, this is an error introduced in the patch "PCI: Store individual VF BAR size in struct pci_sriov". This patch is based on the pci/virtualization branch. I have tried, it could merge with the bad one cleanly. Signed-off-by: Wei Yang --- drivers/pci/iov.c | 8 1 file changed, 4 ins

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-04 Thread Wei Yang
On Wed, Feb 04, 2015 at 08:19:14AM -0600, Bjorn Helgaas wrote: >On Tue, Feb 3, 2015 at 9:34 PM, Wei Yang wrote: >> On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: >>>On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: > +vf_num = pdn->vf_pes; >>> >>>I can't actually b

[RFC 03/10] powerpc/mpc85xx: Add platform support for the Freescale DPAA BMan

2015-02-04 Thread Emil Medve
From: Geoff Thorpe Change-Id: I59de17c040cdd304f86306336fcf89f130f7db2d Signed-off-by: Geoff Thorpe --- arch/powerpc/Kconfig | 33 +++ arch/powerpc/platforms/85xx/Kconfig | 11 + arch/powerpc/platforms/85xx/corenet_generic.c | 2

[RFC 08/10] fsl_qman: Add debugfs support

2015-02-04 Thread Emil Medve
From: Geoff Thorpe Change-Id: I59a75a91b289193b5ab1d30a08f60119dc4d7568 Signed-off-by: Geoff Thorpe --- drivers/staging/fsl_qbman/Kconfig|7 + drivers/staging/fsl_qbman/Makefile |2 + drivers/staging/fsl_qbman/qman_debugfs.c | 1326 ++ drivers/s

[RFC 05/10] fsl_bman: Add self-tester

2015-02-04 Thread Emil Medve
From: Geoff Thorpe Change-Id: If1b44bb013addc1e855c73a4e6ff74bc8b6e4829 Signed-off-by: Geoff Thorpe --- drivers/staging/fsl_qbman/Kconfig| 26 drivers/staging/fsl_qbman/Makefile | 16 ++- drivers/staging/fsl_qbman/bman_test.c| 56 drivers/staging/f

[RFC 00/10] Freescale DPAA B/QMan drivers

2015-02-04 Thread Emil Medve
Hello, This is the first attempt to publish the Freescale DPAA B/QMan drivers. They are not to be applied yet. At this stage, this is more or less the drivers from the Freescale PowerPC SDK roughly squashed and split in a sequence of component patches. They still needs some work and cleanup bef

[RFC 07/10] fsl_bman: Add debugfs support

2015-02-04 Thread Emil Medve
From: Geoff Thorpe Change-Id: I7eea7aea8a58ad0c28451b70801c0d101e88d263 Signed-off-by: Geoff Thorpe --- drivers/staging/fsl_qbman/Kconfig| 7 ++ drivers/staging/fsl_qbman/Makefile | 2 + drivers/staging/fsl_qbman/bman_debugfs.c | 119 +++ drivers/st

[RFC 04/10] powerpc/mpc85xx: Add platform support for the Freescale DPAA QMan

2015-02-04 Thread Emil Medve
From: Geoff Thorpe Change-Id: I59de17c040cdd304f86306336fcf89f130f7db2d Signed-off-by: Geoff Thorpe --- arch/powerpc/platforms/85xx/corenet_generic.c | 8 +++- arch/powerpc/platforms/85xx/p1023_rdb.c | 8 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/po

[RFC 09/10] fsl_bman: Add HOTPLUG_CPU support

2015-02-04 Thread Emil Medve
From: Hai-Ying Wang Change-Id: I863d5c15c7f35f9de4ea3d985e4ff467167924b7 Signed-off-by: Hai-Ying Wang --- drivers/staging/fsl_qbman/bman_driver.c | 45 - 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fsl_qbman/bman_driver.c b/driv

[RFC 06/10] fsl_qman: Add self-tester

2015-02-04 Thread Emil Medve
From: Geoff Thorpe Change-Id: I314d36d94717cfc34053b6212899f71cb729d16c Signed-off-by: Geoff Thorpe --- drivers/staging/fsl_qbman/Kconfig | 24 ++ drivers/staging/fsl_qbman/Makefile | 24 +- drivers/staging/fsl_qbman/qman_test.c | 57 +++ drivers/staging/

[RFC 10/10] fsl_qman: Add HOTPLUG_CPU support

2015-02-04 Thread Emil Medve
From: Hai-Ying Wang Change-Id: Ica4d1b2b0fd3c3ae5e043663febd9f4cb7c762cf Signed-off-by: Hai-Ying Wang --- drivers/staging/fsl_qbman/qman_driver.c | 45 + 1 file changed, 45 insertions(+) diff --git a/drivers/staging/fsl_qbman/qman_driver.c b/drivers/staging/fsl

[PATCH v4 3/5] powerpc/8xx: dont save CR in SCRATCH registers

2015-02-04 Thread Christophe Leroy
CR only needs to be preserved when checking if we are handling a kernel address. So we can preserve CR in a register: - In ITLBMiss, check is done only when CONFIG_MODULES is defined. Otherwise we don't need to do anything at all with CR. - We use r10, then we reload SRR0/MD_EPN into r10 when CR is

[PATCH v4 5/5] powerpc/8xx: Add support for TASK_SIZE greater than 0x80000000

2015-02-04 Thread Christophe Leroy
By default, TASK_SIZE is set to 0x8000 for PPC_8xx, which is most likely sufficient for most cases. However, kernel configuration allows to set TASK_SIZE to another value, so the 8xx shall handle it. Signed-off-by: Christophe Leroy --- v2: no change v3: no change (but impacted by patch 07) v

[PATCH v4 2/5] powerpc/8xx: Handle CR out of exception PROLOG/EPILOG

2015-02-04 Thread Christophe Leroy
In order to be able to reduce scope during which CR is saved, we take CR saving/restoring out of exception PROLOG and EPILOG Signed-off-by: Christophe Leroy --- v2: no change v3: no change (but impacted by patch 07) v4: Respined against scootwood.git next (0dc294f7) arch/powerpc/kernel/head_8x

[PATCH v4 1/5] powerpc/8xx: macro for handling CPU15 errata

2015-02-04 Thread Christophe Leroy
Having a macro will help keep clear code. Signed-off-by: Christophe Leroy --- v2: no change v3: Fixed the macro (missing -) and changed macro name to be more explicit v4: Respined against scootwood.git next (0dc294f7) arch/powerpc/kernel/head_8xx.S | 18 -- 1 file changed, 12 i

[PATCH v4 4/5] powerpc/8xx: Use SPRG2 instead of DAR for saving r3

2015-02-04 Thread Christophe Leroy
We now have SPRG2 available as in it not used anymore for saving CR, so we don't need to crash DAR anymore for saving r3 for CPU6 ERRATA handling. Signed-off-by: Christophe Leroy --- v2: no change v3: no change v4: Respined against scootwood.git next (0dc294f7) arch/powerpc/kernel/head_8xx.S |

[PATCH v4 0/5] powerpc8xx: Further optimisation of TLB handling

2015-02-04 Thread Christophe Leroy
This patchset provides a further optimisation of TLB handling in the 8xx. Changes are: - Not saving registers like CR when not needed - Adding support to any TASK_SIZE Patchset: 01 - powerpc/8xx: macro for handling CPU15 errata 02 - powerpc/8xx: Handle CR out of exception PROLOG/EPILOG 03 - powerp

Re: [PATCH 4/5] powerpc: Cleanup KVM emulated load/store endian handling

2015-02-04 Thread Alexander Graf
On 03.02.15 06:36, David Gibson wrote: > Sometimes the KVM code on powerpc needs to emulate load or store > instructions from the guest, which can include both normal and byte > reversed forms. > > We currently (AFAICT) handle this correctly, but some variable names are > very misleading. In pa

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-04 Thread Bjorn Helgaas
On Tue, Feb 3, 2015 at 9:34 PM, Wei Yang wrote: > On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: >>On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: >>> +vf_num = pdn->vf_pes; >> >>I can't actually build this, but I don't think pdn->vf_pes is defined yet. >> > > The pd

Re: [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions

2015-02-04 Thread 'David Gibson'
On Wed, Feb 04, 2015 at 11:54:39AM +, David Laight wrote: > From: David Gibson > > arch/powerpc/include/asm/swab.h includes some powerpc specific > > byteswapping functions, which are implemented in terms of powerpc's > > built in byte reversed load/store instructions. There are two problems

Re: [PATCH v3 08/24] powerpc/spapr: vfio: Switch from iommu_table to new powerpc_iommu

2015-02-04 Thread Alexander Graf
On 03.02.15 01:12, Alex Williamson wrote: > On Thu, 2015-01-29 at 20:21 +1100, Alexey Kardashevskiy wrote: >> Modern IBM POWERPC systems support multiple (currently two) TCE tables >> per IOMMU group (a.k.a. PE). This adds a powerpc_iommu container >> for TCE tables. Right now just one table is s

RE: [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions

2015-02-04 Thread David Laight
From: David Gibson > arch/powerpc/include/asm/swab.h includes some powerpc specific > byteswapping functions, which are implemented in terms of powerpc's > built in byte reversed load/store instructions. There are two problems with > this: > > 1) They're not necessary - gcc is perfectly capable

Re: [PATCH 10/15] gpio: kconfig: replace PPC_OF with PPC

2015-02-04 Thread Linus Walleij
On Sat, Jan 31, 2015 at 2:47 PM, 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 > ppc platforms have a device tree, it is aways set to 'y' for ppc. > So it makes no sense to keep a such opt

Re: [PATCH V2 00/12] POWER DSCR fixes, improvements, docs and tests

2015-02-04 Thread Anshuman Khandual
On 02/04/2015 01:51 PM, Anshuman Khandual wrote: > On 01/13/2015 03:52 PM, Anshuman Khandual wrote: >> >This patch series has patches for POWER DSCR fixes, improvements, >> > in code documentaion, kernel support user documentation and selftest based >> > test cases. It has got five test cases w

Re: [PATCH V2 00/12] POWER DSCR fixes, improvements, docs and tests

2015-02-04 Thread Anshuman Khandual
On 01/13/2015 03:52 PM, Anshuman Khandual wrote: > This patch series has patches for POWER DSCR fixes, improvements, > in code documentaion, kernel support user documentation and selftest based > test cases. It has got five test cases which are derived from Anton's DSCR > test bucket which ca

[PATCH] cxl: Add missing return statement after handling AFU errror

2015-02-04 Thread Ian Munsie
From: Ian Munsie We were missing a return statement in the PSL interrupt handler in the case of an AFU error, which would trigger an "Unhandled CXL PSL IRQ" warning. We do actually handle these type of errors (by notifying userspace), so add the missing return IRQ_HANDLED so we don't throw uneces

[PATCH 2/2] cxl: Fail AFU initialisation if an invalid configuration record is found

2015-02-04 Thread Ian Munsie
From: Ian Munsie If an AFU claims to have a configuration record but doesn't actually contain a vendor and device ID, fail the AFU initialisation. Right now this is just a way of politely letting AFU developers know that they need to fix their config space, but later on we may expose the AFUs as

[PATCH 1/2] cxl: Export optional AFU configuration record in sysfs

2015-02-04 Thread Ian Munsie
From: Ian Munsie An AFU may optionally contain one or more PCIe like configuration records, which can be used to identify the AFU. This patch adds support for exposing the raw config space and the vendor, device and class code under sysfs. These will appear in a subdirectory of the AFU device co