Re: [PATCH kernel v9 27/32] powerpc/iommu/ioda2: Add get_table_size() to calculate the size of future table

2015-04-30 Thread Alexey Kardashevskiy
On 05/01/2015 03:12 PM, David Gibson wrote: On Fri, May 01, 2015 at 02:10:58PM +1000, Alexey Kardashevskiy wrote: On 04/29/2015 04:40 PM, David Gibson wrote: On Sat, Apr 25, 2015 at 10:14:51PM +1000, Alexey Kardashevskiy wrote: This adds a way for the IOMMU user to know how much a new table wi

[PATCH] powernv/powerpc: restore non-volatile CRs after nap

2015-04-30 Thread Michael Ellerman
From: Sam Bobroff Patches 7cba160ad "powernv/cpuidle: Redesign idle states management" and 77b54e9f2 "powernv/powerpc: Add winkle support for offline cpus" use non-volatile condition registers (cr2, cr3 and cr4) early in the system reset interrupt handler (system_reset_pSeries()) before it has be

Re: [PATCH kernel v9 29/32] vfio: powerpc/spapr: Register memory and define IOMMU v2

2015-04-30 Thread Alexey Kardashevskiy
On 05/01/2015 03:23 PM, David Gibson wrote: On Fri, May 01, 2015 at 02:35:23PM +1000, Alexey Kardashevskiy wrote: On 04/30/2015 04:55 PM, David Gibson wrote: On Sat, Apr 25, 2015 at 10:14:53PM +1000, Alexey Kardashevskiy wrote: The existing implementation accounts the whole DMA window in the l

Re: [PATCH kernel v9 31/32] vfio: powerpc/spapr: Support multiple groups in one container if possible

2015-04-30 Thread Alexey Kardashevskiy
On 05/01/2015 02:33 PM, David Gibson wrote: On Thu, Apr 30, 2015 at 07:33:09PM +1000, Alexey Kardashevskiy wrote: On 04/30/2015 05:22 PM, David Gibson wrote: On Sat, Apr 25, 2015 at 10:14:55PM +1000, Alexey Kardashevskiy wrote: At the moment only one group per container is supported. POWER8 CP

[PATCH v4 19/21] drivers/of: Support adding sub-tree

2015-04-30 Thread Gavin Shan
The requirement is raised when developing the PCI hotplug feature for PowerPC PowerNV platform, which runs on top of skiboot firmware. When plugging PCI adapter to one PCI slot, the firmware rescans the slot and build FDT (Flat Device Tree) blob, which is sent to the PowerNV PCI hotplug driver for

[PATCH v4 18/21] powerpc/pci: Update bridge windows on PCI plugging

2015-04-30 Thread Gavin Shan
During the PCI plugging event, the PCI devices are rescanned and their IO and MMIO resources are reassigned. However, the PowerNV platform will assign PE# based on that, which depends on updating to window of bridge of the PE's primary bus. The patch updates the windows of bridge of PE's primary b

[PATCH v4 14/21] powerpc/powernv: Functions to get/reset PCI slot status

2015-04-30 Thread Gavin Shan
The patch exports 3 functions, which base on corresponding OPAL APIs to get or set PCI slot status. Those functions are going to be used by PCI hotplug module in subsequent patches: pnv_pci_get_presence_status() opal_pci_get_presence_status() pnv_pci_get_power_status() opal_pci_get_powe

[PATCH v4 13/21] powerpc/powernv: Introduce pnv_pci_poll()

2015-04-30 Thread Gavin Shan
We might not get some PCI slot information (e.g. power status) immediately by OPAL API. Instead, opal_pci_poll() need to be called for the required information. The patch introduces pnv_pci_poll(), which bases on original pnv_eeh_poll(), to cover the above case Signed-off-by: Gavin Shan --- arc

[PATCH v4 12/21] powerpc/pci: Move pcibios_find_pci_bus() around

2015-04-30 Thread Gavin Shan
The patch moves pcibios_find_pci_bus() to PPC kerenl directory so that it can be reused by hotplug code for pSeries and PowerNV platform at the same time. Signed-off-by: Gavin Shan Acked-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/pci-hotplug.c | 36 +

[PATCH v4 11/21] powerpc/pci: Don't scan empty slot

2015-04-30 Thread Gavin Shan
In hotplug case, function pcibios_add_pci_devices() is called to rescan the specified PCI bus, which might not have any child devices. Access to the PCI bus's child device node will cause kernel crash without exception. The patch adds condition of skipping scanning PCI bus without child devices, in

[PATCH v4 10/21] powerpc/powernv: Fundamental reset for PCI bus reset

2015-04-30 Thread Gavin Shan
Function pnv_pci_reset_secondary_bus() is used to reset specified PCI bus, which is leaded by root complex or PCI bridge. That means the function shouldn't be called on PCI root bus and the patch removes the logic for that case. Also, some adapters beneath the indicated PCI bus may require fundame

[PATCH v4 07/21] powerpc/powernv: Release PEs dynamically

2015-04-30 Thread Gavin Shan
The original code doesn't support releasing PEs dynamically, meaning that PE and the associated resources (IO, M32, M64 and DMA) can't be released when unplugging a PCI adapter from one hotpluggable slot. The patch takes object oriented methodology, introducs reference count to PE, which is initia

[PATCH v4 17/21] powerpc/pci: Export traverse_pci_device_nodes()

2015-04-30 Thread Gavin Shan
The patch exports following functions, which are derived from their original implementation, so that the PCI hotplug logic can reuse the functions to add or remove pci_dn for all device nodes under specified PCI slot. traverse_pci_device_nodes() traverse_pci_devices() add_pci_device_node

[PATCH v4 06/21] powerpc/powernv: Create PEs dynamically

2015-04-30 Thread Gavin Shan
Currently, the PEs and their associated resources are assigned in ppc_md.pcibios_fixup(). The function is called for once after PCI probing and resources assignment are finished. Obviously, it's not hotplug friendly. The patch creates PEs dynamically by ppc_md.pcibios_setup_bridge(), which is calle

[PATCH v4 21/21] pci/hotplug: PowerPC PowerNV PCI hotplug driver

2015-04-30 Thread Gavin Shan
The patch intends to add standalone driver to support PCI hotplug for PowerPC PowerNV platform, which runs on top of skiboot firmware. The firmware identified hotpluggable slots and marked their device tree node with proper "ibm,slot-pluggable" and "ibm,reset-by-firmware". The driver simply scans d

[PATCH v4 20/21] powerpc/powernv: Select OF_DYNAMIC

2015-04-30 Thread Gavin Shan
The device tree nodes will be changed dynamically on PCI hotplug events on PowerNV platform. The patch selects OF_DYNAMIC on the platform to support PCI hotplug. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/

[PATCH v4 08/21] powerpc/powernv: Drop pnv_ioda_setup_dev_PE()

2015-04-30 Thread Gavin Shan
Nobody is using the this function. The patch drops it. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/pci-ioda.c | 71 --- 1 file changed, 71 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.

[PATCH v4 05/21] powerpc/powernv: Improve DMA32 segment assignment

2015-04-30 Thread Gavin Shan
For P7IOC, the whole available DMA32 space, which is below the MEM32 space, is evenly divided into 256MB segments. How many continuous segments assigned to one particular PE depends on the PE's DMA weight that is figured out from the type of each PCI devices contained in the PE, and PHB's DMA weigh

[PATCH v4 09/21] powerpc/powernv: Use PCI slot reset infrastructure

2015-04-30 Thread Gavin Shan
For PowerNV platform, running on top of skiboot, all PE level reset should be routed to firmware if the bridge of the PE primary bus has device-node property "ibm,reset-by-firmware". Otherwise, the kernel has to issue hot reset on PE's primary bus despite the requested reset types, which is the beh

[PATCH v4 15/21] powerpc/pci: Delay creating pci_dn

2015-04-30 Thread Gavin Shan
The pci_dn instances are allocated from memblock or bootmem when creating PCI controller (hoses) in setup_arch(). The PCI hotplug, which will be supported by proceeding patches, will release PCI device nodes and their corresponding pci_dn on unplugging event. The pci_dn instance memory chunks alloe

[PATCH v4 16/21] powerpc/pci: Create eeh_dev while creating pci_dn

2015-04-30 Thread Gavin Shan
The eeh_dev is always created based on pci_dn, but with initcall supported by core_initcall_sync(). The patch creates eeh_dev when pci_dn is created, indicating they have same life cycle. Signed-off-by: Gavin Shan --- arch/powerpc/include/asm/eeh.h | 6 -- arch/powerpc/kernel/eeh_de

[PATCH v4 03/21] powerpc/powernv: M64 support improvement

2015-04-30 Thread Gavin Shan
We're having the hardware or enforced (on P7IOC) limitation: M64 segment#x can only be assigned to PE#x. IO and M32 segment can be mapped to arbitrary PE# via IODT and M32DT. It means the PE number should be x if M64 segment#x has been assigned to the PE. Also, each PE own one M64 segment at most.

[PATCH v4 02/21] powerpc/powernv: Enable M64 on P7IOC

2015-04-30 Thread Gavin Shan
The patch enables M64 window on P7IOC, which has been enabled on PHB3. Comparing to PHB3, there are 16 M64 BARs and each of them are divided to 8 segments. So each PHB can support 128 M64 segments. Also, P7IOC has M64DT, which helps mapping one particular M64 segment# to arbitrary PE#. However, we

[PATCH v4 04/21] powerpc/powernv: Improve IO and M32 mapping

2015-04-30 Thread Gavin Shan
The PHB's IO or M32 window is divided evenly to segments, each of them can be mapped to arbitrary PE# by IODT or M32DT. Current code figures out the consumed IO and M32 segments by one particular PE from the windows of the PE's upstream bridge. It won't be reliable once we extend M64 windows of roo

[PATCH v4 01/21] pci: Add pcibios_setup_bridge()

2015-04-30 Thread Gavin Shan
Currently, PowerPC PowerNV platform utilizes ppc_md.pcibios_fixup(), which is called for once after PCI probing and resource assignment are completed, to allocate platform required resources for PCI devices: PE#, IO and MMIO mapping, DMA address translation (TCE) table etc. Obviously, it's not hotp

[PATCH v4 00/21] PowerPC/PowerNV: PCI Slot Management

2015-04-30 Thread Gavin Shan
The series of patches intend to support PCI slot for PowerPC PowerNV platform, which is running on top of skiboot firmware. The patchset requires corresponding changes from skiboot firmware, which is sent to skib...@lists.ozlabs.org for review. The PCI slots are exposed by skiboot with device node

[PATCH V2 2/2] powerpc/thp: Remove _PAGE_SPLITTING and related code

2015-04-30 Thread Aneesh Kumar K.V
With the new thp refcounting we don't need to mark the PMD splitting. Drop the code to handle this. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/kvm_book3s_64.h | 6 -- arch/powerpc/include/asm/pgtable-ppc64.h | 29 ++-- arch/powerpc/mm/hugepage-hash64.c| 3 - ar

[PATCH V2 1/2] mm/thp: Use new functions to clear pmd on splitting and collapse

2015-04-30 Thread Aneesh Kumar K.V
Some arch may require an explicit IPI before a THP PMD split or collapse. This enable us to use local_irq_disable to prevent a parallel THP PMD split or collapse. Signed-off-by: Aneesh Kumar K.V --- include/asm-generic/pgtable.h | 32 mm/huge_memory.c

[PATCH V2 0/2] Remove _PAGE_SPLITTING from ppc64

2015-04-30 Thread Aneesh Kumar K.V
The changes are on top of what is posted at http://mid.gmane.org/1429823043-157133-1-git-send-email-kirill.shute...@linux.intel.com git://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git thp/refcounting/v5 Changes from V1: * Fold part of patch 3 to 1 and 2 * Drop patch 3. * Make generic

Re: [PATCH kernel v9 29/32] vfio: powerpc/spapr: Register memory and define IOMMU v2

2015-04-30 Thread David Gibson
On Fri, May 01, 2015 at 02:35:23PM +1000, Alexey Kardashevskiy wrote: > On 04/30/2015 04:55 PM, David Gibson wrote: > >On Sat, Apr 25, 2015 at 10:14:53PM +1000, Alexey Kardashevskiy wrote: > >>The existing implementation accounts the whole DMA window in > >>the locked_vm counter. This is going to b

Re: [PATCH kernel v9 27/32] powerpc/iommu/ioda2: Add get_table_size() to calculate the size of future table

2015-04-30 Thread David Gibson
On Fri, May 01, 2015 at 02:10:58PM +1000, Alexey Kardashevskiy wrote: > On 04/29/2015 04:40 PM, David Gibson wrote: > >On Sat, Apr 25, 2015 at 10:14:51PM +1000, Alexey Kardashevskiy wrote: > >>This adds a way for the IOMMU user to know how much a new table will > >>use so it can be accounted in the

[PATCH v3 3/3] Documentation: mmc: Update Arasan SDHC documentation to support 4.9a version of Arasan SDHC controller.

2015-04-30 Thread Suman Tripathi
This patch updates Arasan SDHC documentation to support 4.9a version of Arasan SDHC controller. Signed-off-by: Suman Tripathi --- Documentation/devicetree/bindings/mmc/arasan,sdhci.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/

[PATCH v3 2/3] mmc: host: arasan: Add the support for sdhci-arasan4.9a in sdhci-of-arasan.c.

2015-04-30 Thread Suman Tripathi
This patch adds the quirks and compatible string in sdhci-of-arasan.c to support sdhci-arasan4.9a version of controller. Signed-off-by: Suman Tripathi --- drivers/mmc/host/sdhci-of-arasan.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/m

[PATCH v3 1/3] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.

2015-04-30 Thread Suman Tripathi
This patch adds the arasan sdhc nodes to reuse the of-arasan driver for APM X-Gene SoC. Signed-off-by: Suman Tripathi --- arch/arm64/boot/dts/apm-mustang.dts | 4 arch/arm64/boot/dts/apm-storm.dtsi | 44 + 2 files changed, 48 insertions(+) diff --git a

[PATCH v3 0/3] Add SDHCI support for APM X-Gene SoC using ARASAN SDHCI controller.

2015-04-30 Thread Suman Tripathi
This patch adds the SDHCI support for APM X-Gene SoC using ARASAN SDHCI controller. v1 change: * Use the CONFIG_ARM64_DMA_HAS_IOMMU for dma-mapping. v2 change: * Drop the IOMMU support and switching to PIO mode for arasan. controller integrated inside APM X-Gene SoC. v3 change: * Change t

Re: [PATCH kernel v9 31/32] vfio: powerpc/spapr: Support multiple groups in one container if possible

2015-04-30 Thread David Gibson
On Thu, Apr 30, 2015 at 07:33:09PM +1000, Alexey Kardashevskiy wrote: > On 04/30/2015 05:22 PM, David Gibson wrote: > >On Sat, Apr 25, 2015 at 10:14:55PM +1000, Alexey Kardashevskiy wrote: > >>At the moment only one group per container is supported. > >>POWER8 CPUs have more flexible design and all

Re: [PATCH kernel v9 26/32] powerpc/iommu: Add userspace view of TCE table

2015-04-30 Thread David Gibson
On Fri, May 01, 2015 at 02:01:17PM +1000, Alexey Kardashevskiy wrote: > On 04/29/2015 04:31 PM, David Gibson wrote: > >On Sat, Apr 25, 2015 at 10:14:50PM +1000, Alexey Kardashevskiy wrote: > >>In order to support memory pre-registration, we need a way to track > >>the use of every registered memory

Re: [PATCH kernel v9 31/32] vfio: powerpc/spapr: Support multiple groups in one container if possible

2015-04-30 Thread David Gibson
On Fri, May 01, 2015 at 10:46:08AM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2015-04-30 at 19:33 +1000, Alexey Kardashevskiy wrote: > > On 04/30/2015 05:22 PM, David Gibson wrote: > > > On Sat, Apr 25, 2015 at 10:14:55PM +1000, Alexey Kardashevskiy wrote: > > >> At the moment only one group pe

[PATCH v2] powerpc/eeh: Delay probing EEH device during hotplug

2015-04-30 Thread Gavin Shan
Commit ff57b454ddb9 ("powerpc/eeh: Do probe on pci_dn") probes EEH devices in early stage, which is reasonable to pSeries platform. However, it's wrong for PowerNV platform because the PE# isn't determined until the resources (IO and MMIO) are assigned to PE in hotplug case. So we have to delay pro

Re: [PATCH kernel v9 29/32] vfio: powerpc/spapr: Register memory and define IOMMU v2

2015-04-30 Thread Alexey Kardashevskiy
On 04/30/2015 04:55 PM, David Gibson wrote: On Sat, Apr 25, 2015 at 10:14:53PM +1000, Alexey Kardashevskiy wrote: The existing implementation accounts the whole DMA window in the locked_vm counter. This is going to be worse with multiple containers and huge DMA windows. Also, real-time accountin

Re: [PATCH kernel v9 27/32] powerpc/iommu/ioda2: Add get_table_size() to calculate the size of future table

2015-04-30 Thread Alexey Kardashevskiy
On 04/29/2015 04:40 PM, David Gibson wrote: On Sat, Apr 25, 2015 at 10:14:51PM +1000, Alexey Kardashevskiy wrote: This adds a way for the IOMMU user to know how much a new table will use so it can be accounted in the locked_vm limit before allocation happens. This stores the allocated table siz

Re: [PATCH] powerpc/eeh: Delay probing EEH device during hotplug

2015-04-30 Thread Gavin Shan
On Fri, May 01, 2015 at 01:51:37PM +1000, Michael Ellerman wrote: >On Fri, 2015-05-01 at 11:28 +1000, Gavin Shan wrote: >> On Fri, May 01, 2015 at 09:50:57AM +1000, Michael Ellerman wrote: >> >On Fri, 2015-05-01 at 09:22 +1000, Gavin Shan wrote: >> >> Commit 1c509148b ("powerpc/eeh: Do probe on pci

Re: [PATCH kernel v9 26/32] powerpc/iommu: Add userspace view of TCE table

2015-04-30 Thread Alexey Kardashevskiy
On 04/29/2015 04:31 PM, David Gibson wrote: On Sat, Apr 25, 2015 at 10:14:50PM +1000, Alexey Kardashevskiy wrote: In order to support memory pre-registration, we need a way to track the use of every registered memory region and only allow unregistration if a region is not in use anymore. So we n

Re: [PATCH] powerpc/cell: Drop cbe-oss-dev mailing list from MAINTAINERS

2015-04-30 Thread Michael Ellerman
On Fri, 2015-05-01 at 11:23 +0800, Jeremy Kerr wrote: > Hi Michael, > > > Traffic on the cbe-oss-dev list is more or less non-existent, other than > > CC's from linuxppc. > > Plus all that spam that never makes it out of the moderation queue. > > > It's seems like we may as well just send everyo

Re: [PATCH kernel v9 28/32] powerpc/mmu: Add userspace-to-physical addresses translation cache

2015-04-30 Thread David Gibson
On Thu, Apr 30, 2015 at 06:25:25PM +1000, Paul Mackerras wrote: > On Thu, Apr 30, 2015 at 04:34:55PM +1000, David Gibson wrote: > > On Sat, Apr 25, 2015 at 10:14:52PM +1000, Alexey Kardashevskiy wrote: > > > We are adding support for DMA memory pre-registration to be used in > > > conjunction with

Re: [PATCH kernel v9 23/32] powerpc/powernv/ioda: Define and implement DMA table/window management callbacks

2015-04-30 Thread David Gibson
On Thu, Apr 30, 2015 at 07:56:17PM +1000, Alexey Kardashevskiy wrote: > On 04/30/2015 02:37 PM, David Gibson wrote: > >On Wed, Apr 29, 2015 at 07:44:20PM +1000, Alexey Kardashevskiy wrote: > >>On 04/29/2015 03:30 PM, David Gibson wrote: > >>>On Sat, Apr 25, 2015 at 10:14:47PM +1000, Alexey Kardashe

Re: [PATCH] powerpc/eeh: Delay probing EEH device during hotplug

2015-04-30 Thread Michael Ellerman
On Fri, 2015-05-01 at 11:28 +1000, Gavin Shan wrote: > On Fri, May 01, 2015 at 09:50:57AM +1000, Michael Ellerman wrote: > >On Fri, 2015-05-01 at 09:22 +1000, Gavin Shan wrote: > >> Commit 1c509148b ("powerpc/eeh: Do probe on pci_dn") probes EEH > >> devices in early stage, which is reasonable to p

Re: [PATCH] powerpc/powernv: Add opal-prd channel

2015-04-30 Thread Jeremy Kerr
Hi Ben, >> +static LIST_HEAD(opal_prd_msg_queue); >> +static DEFINE_SPINLOCK(opal_prd_msg_queue_lock); >> +static DECLARE_WAIT_QUEUE_HEAD(opal_prd_msg_wait); >> +static atomic_t usage; > > opal_prd_usage ... otherwise it's a mess in the symbols map OK, I'll change this. > Also why limit the nu

Re: [PATCH] powerpc/cell: Drop cbe-oss-dev mailing list from MAINTAINERS

2015-04-30 Thread Jeremy Kerr
Hi Michael, > Traffic on the cbe-oss-dev list is more or less non-existent, other than > CC's from linuxppc. Plus all that spam that never makes it out of the moderation queue. > It's seems like we may as well just send everyone to linuxppc and > archive the list. Acked-by: Jeremy Kerr [This'

[PATCH] powerpc/cell: Drop cbe-oss-dev mailing list from MAINTAINERS

2015-04-30 Thread Michael Ellerman
Traffic on the cbe-oss-dev list is more or less non-existent, other than CC's from linuxppc. It's seems like we may as well just send everyone to linuxppc and archive the list. Signed-off-by: Michael Ellerman --- MAINTAINERS | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --g

Re: [PATCH] powerpc/eeh: Delay probing EEH device during hotplug

2015-04-30 Thread Gavin Shan
On Fri, May 01, 2015 at 09:50:57AM +1000, Michael Ellerman wrote: >On Fri, 2015-05-01 at 09:22 +1000, Gavin Shan wrote: >> Commit 1c509148b ("powerpc/eeh: Do probe on pci_dn") probes EEH >> devices in early stage, which is reasonable to pSeries platform. >> However, it's wrong for PowerNV platform

Re: [PATCH kernel v9 31/32] vfio: powerpc/spapr: Support multiple groups in one container if possible

2015-04-30 Thread Benjamin Herrenschmidt
On Thu, 2015-04-30 at 19:33 +1000, Alexey Kardashevskiy wrote: > On 04/30/2015 05:22 PM, David Gibson wrote: > > On Sat, Apr 25, 2015 at 10:14:55PM +1000, Alexey Kardashevskiy wrote: > >> At the moment only one group per container is supported. > >> POWER8 CPUs have more flexible design and allows

Re: [PATCH] powerpc/eeh: Delay probing EEH device during hotplug

2015-04-30 Thread Michael Ellerman
On Fri, 2015-05-01 at 09:22 +1000, Gavin Shan wrote: > Commit 1c509148b ("powerpc/eeh: Do probe on pci_dn") probes EEH > devices in early stage, which is reasonable to pSeries platform. > However, it's wrong for PowerNV platform because the PE# isn't > determined until the resources (IO and MMIO) a

Re: [PATCH] powerpc/pseries: Fix possible leaked device node reference

2015-04-30 Thread Michael Ellerman
On Thu, 2015-04-30 at 14:58 -0700, Tyrel Datwyler wrote: > On 04/29/2015 06:44 PM, Nathan Fontenot wrote: > > Failure return from dlpar_configure_connector when dlpar adding cpus > > results in leaking references to the cpus parent device node. Move the > > call to of_node_put() prior to checking t

[PATCH] powerpc/eeh: Delay probing EEH device during hotplug

2015-04-30 Thread Gavin Shan
Commit 1c509148b ("powerpc/eeh: Do probe on pci_dn") probes EEH devices in early stage, which is reasonable to pSeries platform. However, it's wrong for PowerNV platform because the PE# isn't determined until the resources (IO and MMIO) are assigned to PE in hotplug case. So we have to delay probin

[PATCH] powerpc/eeh: Fix race condition in pcibios_set_pcie_reset_state()

2015-04-30 Thread Gavin Shan
When asserting reset in pcibios_set_pcie_reset_state(), the PE is enforced to (hardware) frozen state in order to drop unexpected PCI transactions (except PCI config read/write) automatically by hardware during reset, which would cause recursive EEH error. However, the (software) frozen state EEH_P

Re: [PATCH] powerpc/pseries: Fix possible leaked device node reference

2015-04-30 Thread Tyrel Datwyler
On 04/29/2015 06:44 PM, Nathan Fontenot wrote: > Failure return from dlpar_configure_connector when dlpar adding cpus > results in leaking references to the cpus parent device node. Move the > call to of_node_put() prior to checking the result of > dlpar_configure_connector. > > Fixes: 8d5ff320766

Re: [PATCH V2 1/8] powerpc/powernv: Add a virtual irqchip for opal events

2015-04-30 Thread Neelesh Gupta
Hi Alistair, Applied all of the patches on top of 'v4.0-rc7', found this issue during the boot itself http://pastebin.hursley.ibm.com/918. There are few compile warnings and minor comments. drivers/tty/hvc/hvc_opal.c: In function ‘hvc_opal_probe’: drivers/tty/hvc/hvc_opal.c:174:6: warning: unus

Re: [PATCH V2 1/8] powerpc/powernv: Add a virtual irqchip for opal events

2015-04-30 Thread Neelesh Gupta
Hi Alistair, With all the patches applied on top of 'v4.0-rc7', I see this issue during the boot itself http://pastebin.hursley.ibm.com/918 Few compile warnings and minor comments. drivers/tty/hvc/hvc_opal.c: In function ‘hvc_opal_probe’: drivers/tty/hvc/hvc_opal.c:174:6: warning: unused variabl

Re: [PATCH net-next v3 4/4] ibmveth: Add support for Large Receive Offload

2015-04-30 Thread David Miller
From: Thomas Falcon Date: Wed, 29 Apr 2015 16:25:47 -0500 > Enables receiving large packets from other LPARs. These packets > have a -1 IP header checksum, so we must recalculate to have > a valid checksum. > > Signed-off-by: Brian King > Signed-off-by: Thomas Falcon > --- > v3: > -Removed co

Re: [PATCH net-next v3 3/4] ibmveth: Add GRO support

2015-04-30 Thread David Miller
From: Thomas Falcon Date: Wed, 29 Apr 2015 16:25:46 -0500 > Cc: Brian King > Signed-off-by: Thomas Falcon Applied. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH net-next v3 2/4] ibmveth: Add support for TSO

2015-04-30 Thread David Miller
From: Thomas Falcon Date: Wed, 29 Apr 2015 16:25:45 -0500 > Add support for TSO. TSO is turned off by default and > must be enabled and configured by the user. The driver > version number is increased so that users can be sure > that they are using ibmveth with TSO support. > > Cc: Brian King

Re: [PATCH net-next v3 1/4] ibmveth: change rx buffer default allocation for CMO

2015-04-30 Thread David Miller
From: Thomas Falcon Date: Wed, 29 Apr 2015 16:25:44 -0500 > This patch enables 64k rx buffer pools by default. If Cooperative > Memory Overcommitment (CMO) is enabled, the number of 64k buffers > is reduced to save memory. > > Cc: Brian King > Signed-off-by: Thomas Falcon Applied. __

Re: ppc64le crash in dm on 4.1+

2015-04-30 Thread Joel Stanley
On Fri, May 1, 2015 at 1:18 AM, Mike Snitzer wrote: >> I just booted 3d99e3fe13d473ac4578c37f477a59b829530764 (linus' tree as >> of this morning) on a Tuletta and got the following: > > This is fixed with the following commit (which I just sent to Linus for > 4.1-rc2 inclusion): > https://git.kern

Re: ppc64le crash in dm on 4.1+

2015-04-30 Thread Mike Snitzer
On Wed, Apr 29 2015 at 11:29pm -0400, Joel Stanley wrote: > Hello, > > I just booted 3d99e3fe13d473ac4578c37f477a59b829530764 (linus' tree as > of this morning) on a Tuletta and got the following: This is fixed with the following commit (which I just sent to Linus for 4.1-rc2 inclusion): https:

Re: [PATCH v4 3/3] leds/powernv: Add driver for PowerNV platform

2015-04-30 Thread Vasant Hegde
On 04/30/2015 07:59 PM, Jacek Anaszewski wrote: > Hi Vasant, > Hi Jacek, .../... >> diff --git a/Documentation/devicetree/bindings/leds/leds-powernv.txt >> b/Documentation/devicetree/bindings/leds/leds-powernv.txt >> new file mode 100644 >> index 000..6bb0e7e >> --- /dev/null >> +++ b/Docu

Re: [PATCH v4 3/3] leds/powernv: Add driver for PowerNV platform

2015-04-30 Thread Vasant Hegde
On 04/28/2015 03:48 PM, Arnd Bergmann wrote: > On Tuesday 28 April 2015 15:40:35 Vasant Hegde wrote: >> +++ b/Documentation/devicetree/bindings/leds/leds-powernv.txt >> @@ -0,0 +1,29 @@ >> +Device Tree binding for LEDs on IBM Power Systems >> +- >> +

Re: [PATCH v4 3/3] leds/powernv: Add driver for PowerNV platform

2015-04-30 Thread Jacek Anaszewski
Hi Vasant, On 04/28/2015 12:10 PM, Vasant Hegde wrote: This patch implements LED driver for PowerNV platform using the existing generic LED class framework. PowerNV platform has below type of LEDs: - System attention Indicates there is a problem with the system that needs attention.

RE: [v3] dt/bindings: qoriq-clock: Add binding for FMan clock mux

2015-04-30 Thread igal.liber...@freescale.com
Regards, Igal Liberman. > -Original Message- > From: Wood Scott-B07421 > Sent: Thursday, April 30, 2015 3:31 AM > To: Liberman Igal-B31950 > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Tang > Yuantian-B29983 > Subject: Re: [v3] dt/bindings: qoriq-clock: Add binding for

[PATCH 1/2] libfdt: add fdt type definitions

2015-04-30 Thread Rob Herring
In preparation for libfdt/dtc update, add the new fdt specific types. Signed-off-by: Rob Herring Cc: Russell King Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-arm-ker...@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org --- arch/arm/boot/compressed/libfdt_

[PATCH 2/2] powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64

2015-04-30 Thread Kevin Hao
It makes no sense to keep two separate RELOCATABLE config entries for ppc32 and ppc64 respectively. Merge them into one and move it to a common place. The dependency on ADVANCED_OPTIONS for ppc32 seems unnecessary, also drop it. Signed-off-by: Kevin Hao --- arch/powerpc/Kconfig | 65

[PATCH 1/2] powerpc: fix the dependency issue for CRASH_DUMP

2015-04-30 Thread Kevin Hao
In the current code, the RELOCATABLE will be forcedly enabled when enabling CRASH_DUMP. But for ppc32, the RELOCABLE also depend on ADVANCED_OPTIONS and select NONSTATIC_KERNEL. This will cause build error when CRASH_DUMP=y && ADVANCED_OPTIONS=n. Even there is no such issue for ppc64, but select is

[PATCH 0/2] powerpc: tweak the kernel options for CRASH_DUMP and RELOCATABLE

2015-04-30 Thread Kevin Hao
Hi, The first patch fixes a build error when CRASH_DUMP=y && ADVANCED_OPTIONS=n for ppc32. The second does some cleanup for RELOCATABLE option. Kevin Hao (2): powerpc: fix the dependency issue for CRASH_DUMP powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64 arch/powerpc/Kcon

[v3] powerpc/mpc85xx: Add MDIO bus muxing support to the board device tree(s)

2015-04-30 Thread Igal . Liberman
From: Igal Liberman Describe the PHY topology for all configurations supported by each board Based on prior work by Andy Fleming Signed-off-by: Igal Liberman Signed-off-by: Shruti Kanetkar Signed-off-by: Emil Medve --- v3: Fixed incorrect E-Mail address (signed-off-by) v2: Remove

Re: [PATCH kernel v9 23/32] powerpc/powernv/ioda: Define and implement DMA table/window management callbacks

2015-04-30 Thread Alexey Kardashevskiy
On 04/30/2015 02:37 PM, David Gibson wrote: On Wed, Apr 29, 2015 at 07:44:20PM +1000, Alexey Kardashevskiy wrote: On 04/29/2015 03:30 PM, David Gibson wrote: On Sat, Apr 25, 2015 at 10:14:47PM +1000, Alexey Kardashevskiy wrote: This extends iommu_table_group_ops by a set of callbacks to suppor

Re: [PATCH kernel v9 31/32] vfio: powerpc/spapr: Support multiple groups in one container if possible

2015-04-30 Thread Alexey Kardashevskiy
On 04/30/2015 05:22 PM, David Gibson wrote: On Sat, Apr 25, 2015 at 10:14:55PM +1000, Alexey Kardashevskiy wrote: At the moment only one group per container is supported. POWER8 CPUs have more flexible design and allows naving 2 TCE tables per IOMMU group so we can relax this limitation and supp

Re: [PATCH kernel v9 28/32] powerpc/mmu: Add userspace-to-physical addresses translation cache

2015-04-30 Thread Paul Mackerras
On Thu, Apr 30, 2015 at 04:34:55PM +1000, David Gibson wrote: > On Sat, Apr 25, 2015 at 10:14:52PM +1000, Alexey Kardashevskiy wrote: > > We are adding support for DMA memory pre-registration to be used in > > conjunction with VFIO. The idea is that the userspace which is going to > > run a guest m

[PATCH v2 13/15] cputime:Introduce the cputime_to_timespec64/timespec64_to_cputime function

2015-04-30 Thread Baolin Wang
This patch introduces some functions for converting cputime to timespec64 and back, that repalce the timespec type with timespec64 type, as well as for arch/s390 and arch/powerpc architecture. And these new methods will replace the old cputime_to_timespec/timespec_to_cputime function to ready f

[PATCH v2 00/15] Convert the posix_clock_operations and k_clock structure to ready for 2038

2015-04-30 Thread Baolin Wang
This patch series changes the 32-bit time type (timespec/itimerspec) to the 64-bit one (timespec64/itimerspec64), since 32-bit time types will break in the year 2038. This patch series introduces new methods with timespec64/itimerspec64 type, and removes the old ones with timespec/itimerspec type

Re: [PATCH kernel v9 31/32] vfio: powerpc/spapr: Support multiple groups in one container if possible

2015-04-30 Thread David Gibson
On Sat, Apr 25, 2015 at 10:14:55PM +1000, Alexey Kardashevskiy wrote: > At the moment only one group per container is supported. > POWER8 CPUs have more flexible design and allows naving 2 TCE tables per > IOMMU group so we can relax this limitation and support multiple groups > per container. It'

Re: [PATCH kernel v9 30/32] vfio: powerpc/spapr: Use 32bit DMA window properties from table_group

2015-04-30 Thread David Gibson
On Sat, Apr 25, 2015 at 10:14:54PM +1000, Alexey Kardashevskiy wrote: > A table group might not have a table but it always has the default 32bit > window parameters so use these. > > No change in behavior is expected. > > Signed-off-by: Alexey Kardashevskiy It would be easier to review if you t

Re: [PATCH kernel v9 29/32] vfio: powerpc/spapr: Register memory and define IOMMU v2

2015-04-30 Thread David Gibson
On Sat, Apr 25, 2015 at 10:14:53PM +1000, Alexey Kardashevskiy wrote: > The existing implementation accounts the whole DMA window in > the locked_vm counter. This is going to be worse with multiple > containers and huge DMA windows. Also, real-time accounting would requite > additional tracking of

Re: [PATCH kernel v9 28/32] powerpc/mmu: Add userspace-to-physical addresses translation cache

2015-04-30 Thread David Gibson
On Sat, Apr 25, 2015 at 10:14:52PM +1000, Alexey Kardashevskiy wrote: > We are adding support for DMA memory pre-registration to be used in > conjunction with VFIO. The idea is that the userspace which is going to > run a guest may want to pre-register a user space memory region so > it all gets pi