Re: [PATCH] powerpc: Reword the "returning from prom_init" message

2015-03-31 Thread Jeremy Kerr
Hi Michael, > Let's try something different. > > This prints: > > Quiescing Open Firmware ... > Booting Linux via __start() ... "returning from prom_init" has been an emblem of the powerpc kernel boot since old times. I feel like we should give the old message a Viking funeral and pick a da

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

2015-03-31 Thread Jeremy Kerr
This change adds a char device to access the "PRD" (processor runtime diagnostics) channel to OPAL firmware. Includes contributions from Vaidyanathan Srinivasan, Neelesh Gupta & Vishal Kulkarni. Signed-off-by: Neelesh Gupta Signed-off-by: Jeremy Kerr --- arch/powerpc/include/asm/opal-api.h

[PATCH 2/2] drivers/mtd: add powernv flash MTD abstraction driver

2015-03-31 Thread Jeremy Kerr
From: Cyril Bur Powerpc powernv platforms allow access to certain system flash devices through a firmwarwe interface. This change adds an mtd driver for these flash devices. Minor updates from Jeremy Kerr and Joel Stanley. Signed-off-by: Cyril Bur Signed-off-by: Joel Stanley Signed-off-by: Je

[PATCH 1/2] powerpc/powernv: Add interfaces for flash device access

2015-03-31 Thread Jeremy Kerr
From: Cyril Bur This change adds the OPAL interface definitions to allow Linux to read, write and erase from system flash devices. We register platform devices for the flash devices exported by firmware. We clash with the existing opal_flash_init function, which is really for the FSP flash updat

[PATCH 0/2] Add a MTD driver for OpenPower PNOR flash

2015-03-31 Thread Jeremy Kerr
Hi all, This series implements a simple mtd device to allow access to the PNOR flash on OpenPower machines. The flash is accessed through firmware calls. Patch 1/2 adds the Linux interface to these calls. Patch 2/2 adds a mtd driver that uses these calls. Because there's two subsystems involved

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Joel Stanley
On Wed, Apr 1, 2015 at 3:22 PM, Anshuman Khandual wrote: >> +static int __orderly_poweroff(bool force) >> +{ >> + int ret; >> + >> + ret = run_cmd(reboot_cmd); > > Would it be poweroff_cmd instead of reboot_cmd ? Dont see poweroff_cmd > getting used. Yes, good catch. Thanks. Joel __

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Anshuman Khandual
On 04/01/2015 08:47 AM, Joel Stanley wrote: > Hi Andrew, > > On Wed, Apr 1, 2015 at 9:09 AM, Andrew Morton > wrote: >> > On Mon, 30 Mar 2015 12:45:32 +1030 Joel Stanley wrote: >> > >>> >> The kernel has orderly_poweroff which allows the kernel to initiate a >>> >> graceful shutdown of userspace

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Andrew Morton
On Tue, 31 Mar 2015 22:03:26 -0700 Andrew Morton wrote: > static char reboot_cmd[] = "/sbin/reboot"; static const char, actually. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Andrew Morton
On Wed, 01 Apr 2015 10:22:08 +0530 Anshuman Khandual wrote: > > char poweroff_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/poweroff"; > > +char reboot_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/reboot"; > > Should not we declare one more REBOOT_CMD_PATH_LEN to make it cleaner. It doesn't really seem necessar

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Anshuman Khandual
On 03/30/2015 07:45 AM, Joel Stanley wrote: > The kernel has orderly_poweroff which allows the kernel to initiate a > graceful shutdown of userspace, by running /sbin/poweroff. This adds > orderly_reboot that will cause userspace to shut itself down by calling > /sbin/reboot. > > This will be used

Re: [RFC/RFT, RESEND] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2015-03-31 Thread Michael Ellerman
On Tue, 2015-03-31 at 18:14 +0100, Sudeep Holla wrote: > > On 31/03/15 11:56, Michael Ellerman wrote: > > On Mon, 2015-23-02 at 18:18:20 UTC, Sudeep Holla wrote: > >> This patch removes the redundant sysfs cacheinfo code by reusing > >> the newly introduced generic cacheinfo infrastructure through

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Joel Stanley
Hi Andrew, On Wed, Apr 1, 2015 at 9:09 AM, Andrew Morton wrote: > On Mon, 30 Mar 2015 12:45:32 +1030 Joel Stanley wrote: > >> The kernel has orderly_poweroff which allows the kernel to initiate a >> graceful shutdown of userspace, by running /sbin/poweroff. This adds >> orderly_reboot that will

Re: [PATCH v8 RFC 0/3] Generic IOMMU pooled allocator

2015-03-31 Thread David Miller
From: Sowmini Varadhan Date: Tue, 31 Mar 2015 21:08:18 -0400 > I'm starting to wonder if some approximation of dma premapped > buffers may be needed. Doing a map/unmap on each packet is expensive. It's much more amortized with smart buffering strategies, which are common on current generation n

Re: [PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-03-31 Thread Michael Ellerman
On Tue, 2015-03-31 at 18:11 +0200, Jan Stancek wrote: > Space allocated for paca is based off nr_cpu_ids, > but pnv_alloc_idle_core_states() iterates paca with > cpu_nr_cores()*threads_per_core, which is using NR_CPUS. > > This causes pnv_alloc_idle_core_states() to write over memory, > which is o

Re: [PATCH v8 RFC 0/3] Generic IOMMU pooled allocator

2015-03-31 Thread Sowmini Varadhan
On 03/31/2015 09:01 PM, Benjamin Herrenschmidt wrote: On Tue, 2015-03-31 at 14:06 -0400, Sowmini Varadhan wrote: Having bravely said that.. the IB team informs me that they see a 10% degradation using the spin_lock as opposed to the trylock. one path going forward is to continue processing thi

Re: [PATCH v8 RFC 0/3] Generic IOMMU pooled allocator

2015-03-31 Thread Benjamin Herrenschmidt
On Tue, 2015-03-31 at 14:06 -0400, Sowmini Varadhan wrote: > Having bravely said that.. > > the IB team informs me that they see a 10% degradation using > the spin_lock as opposed to the trylock. > > one path going forward is to continue processing this patch-set > as is. I can investigate this

Re: [PATCH v5 3/3] drivers/vfio: Support EEH error injection

2015-03-31 Thread Gavin Shan
On Tue, Mar 31, 2015 at 01:13:26PM -0600, Alex Williamson wrote: >On Thu, 2015-03-26 at 16:42 +1100, Gavin Shan wrote: >> 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 f

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Andrew Morton
On Mon, 30 Mar 2015 12:45:32 +1030 Joel Stanley wrote: > The kernel has orderly_poweroff which allows the kernel to initiate a > graceful shutdown of userspace, by running /sbin/poweroff. This adds > orderly_reboot that will cause userspace to shut itself down by calling > /sbin/reboot. > > This

Re: [PATCH kernel v7 12/31] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-03-31 Thread Alex Williamson
On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > Modern IBM POWERPC systems support multiple (currently two) TCE tables > per IOMMU group (a.k.a. PE). This adds a iommu_table_group container > for TCE tables. Right now just one table is supported. > > Signed-off-by: Alexey Kardashe

[PATCH v2 02/10] KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values

2015-03-31 Thread Alex Bennée
Currently x86, powerpc and soon arm64 use the same two architecture specific bits for guest debug support for software and hardware breakpoints. This makes the shared values explicit while leaving the gate open for another architecture to use some other value if they really really want to. Signed-

Re: [PATCH] powerpc/83xx: add support for mpc8306

2015-03-31 Thread Filip Brozović
On 3/31/2015 7:54 PM, Scott Wood wrote: This breaks multiplatform support. You need to determine this at runtime. Understood, but I'm unsure of how to do this exactly. Would it be appropriate to define another array, snum_init_14, with the SNUM values for the MPC8306 QE, change the minimum n

Re: [PATCH v5 3/3] drivers/vfio: Support EEH error injection

2015-03-31 Thread Alex Williamson
On Thu, 2015-03-26 at 16:42 +1100, Gavin Shan wrote: > 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 > Reviewed-by: Da

Re: [PATCH v8 RFC 0/3] Generic IOMMU pooled allocator

2015-03-31 Thread David Miller
From: Sowmini Varadhan Date: Tue, 31 Mar 2015 14:06:42 -0400 > Having bravely said that.. > > the IB team informs me that they see a 10% degradation using > the spin_lock as opposed to the trylock. > > one path going forward is to continue processing this patch-set > as is. I can investigate

Re: [PATCH v8 RFC 0/3] Generic IOMMU pooled allocator

2015-03-31 Thread Sowmini Varadhan
On (03/31/15 10:40), Sowmini Varadhan wrote: > > I've not heard back from the IB folks, but I'm going to make > a judgement call here and go with the spin_lock. *If* they > report some significant benefit from the trylock, probably > need to revisit this (and then probably start by re-exmaining >

Re: [PATCH] powerpc/83xx: add support for mpc8306

2015-03-31 Thread Scott Wood
On Sat, 2015-03-28 at 17:59 +0100, Filip Brozovic wrote: > diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c > index c2518cd..f967ff6 100644 > --- a/arch/powerpc/sysdev/qe_lib/qe.c > +++ b/arch/powerpc/sysdev/qe_lib/qe.c > @@ -278,12 +278,17 @@ static void qe_snums_init

Re: [RFC/RFT, RESEND] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2015-03-31 Thread Sudeep Holla
On 31/03/15 11:56, Michael Ellerman wrote: On Mon, 2015-23-02 at 18:18:20 UTC, Sudeep Holla wrote: This patch removes the redundant sysfs cacheinfo code by reusing the newly introduced generic cacheinfo infrastructure through the commit 246246cbde5e ("drivers: base: support cpu cache informati

RE: [PATCH v8 RFC 1/3] sparc: Break up monolithic iommu table/lock into finer graularity pools and lock

2015-03-31 Thread David Laight
From: Sowmini Varadhan > Investigation of multithreaded iperf experiments on an ethernet > interface show the iommu->lock as the hottest lock identified by > lockstat, with something of the order of 21M contentions out of > 27M acquisitions, and an average wait time of 26 us for the lock. > This i

[PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-03-31 Thread Jan Stancek
Space allocated for paca is based off nr_cpu_ids, but pnv_alloc_idle_core_states() iterates paca with cpu_nr_cores()*threads_per_core, which is using NR_CPUS. This causes pnv_alloc_idle_core_states() to write over memory, which is outside of paca array and may later lead to various panics. Fixes:

Re: [PATCH v8 RFC 1/3] sparc: Break up monolithic iommu table/lock into finer graularity pools and lock

2015-03-31 Thread Sowmini Varadhan
On (03/31/15 15:15), David Laight wrote: > > I've wondered whether the iommu setup for ethernet receive (in particular) > could be made much more efficient if there were a function that > would unmap one buffer and map a second buffer? > My thought is that iommu pte entry used by the old buffer co

[PATCH v8 RFC 3/3] sparc: Make LDC use common iommu poll management functions

2015-03-31 Thread Sowmini Varadhan
Note that this conversion is only being done to consolidate the code and ensure that the common code provides the sufficient abstraction. It is not expected to result in any noticeable performance improvement, as there is typically one ldc_iommu per vnet_port, and each one has 8k entries, with a ty

[PATCH v8 RFC 2/3] sparc: Make sparc64 use scalable lib/iommu-common.c functions

2015-03-31 Thread Sowmini Varadhan
In iperf experiments running linux as the Tx side (TCP client) with 10 threads results in a severe performance drop when TSO is disabled, indicating a weakness in the software that can be avoided by using the scalable IOMMU arena DMA allocation. Baseline numbers before this patch: with default

[PATCH v8 RFC 1/3] sparc: Break up monolithic iommu table/lock into finer graularity pools and lock

2015-03-31 Thread Sowmini Varadhan
Investigation of multithreaded iperf experiments on an ethernet interface show the iommu->lock as the hottest lock identified by lockstat, with something of the order of 21M contentions out of 27M acquisitions, and an average wait time of 26 us for the lock. This is not efficient. A more scalable

[PATCH v8 RFC 0/3] Generic IOMMU pooled allocator

2015-03-31 Thread Sowmini Varadhan
Addresses BenH comments with one exception: I've left the IOMMU_POOL_HASH as is, so that powerpc can tailor it to their convenience. I've not heard back from the IB folks, but I'm going to make a judgement call here and go with the spin_lock. *If* they report some significant benefit from the try

Re: [RFC/RFT, RESEND] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2015-03-31 Thread Michael Ellerman
On Mon, 2015-23-02 at 18:18:20 UTC, Sudeep Holla wrote: > This patch removes the redundant sysfs cacheinfo code by reusing > the newly introduced generic cacheinfo infrastructure through the > commit 246246cbde5e ("drivers: base: support cpu cache information > interface to userspace via sysfs") >

[PATCH] powerpc/config: add SCSI configs for corenet64_smp_defconfig

2015-03-31 Thread Yuantian.Tang
From: Tang Yuantian Otherwise there wil be no SCSI device nodes. Signed-off-by: Shaohui Xie Signed-off-by: Tang Yuantian --- arch/powerpc/configs/corenet64_smp_defconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/con

Re: [PATCH v2] mm: vmscan: do not throttle based on pfmemalloc reserves if node has no reclaimable pages

2015-03-31 Thread Michal Hocko
On Fri 27-03-15 15:23:50, Nishanth Aravamudan wrote: > On 27.03.2015 [13:17:59 -0700], Dave Hansen wrote: > > On 03/27/2015 12:28 PM, Nishanth Aravamudan wrote: > > > @@ -2585,7 +2585,7 @@ static bool pfmemalloc_watermark_ok(pg_data_t > > > *pgdat) > > > > > > for (i = 0; i <= ZONE_NORMA

Re: stable: Please include commit bb344ca5b90 ("powerpc/mpc85xx: Add ranges to etsec2 nodes")

2015-03-31 Thread Jiri Slaby
On 03/26/2015, 10:14 PM, Scott Wood wrote: > Commit bb344ca5b90df6 ("powerpc/mpc85xx: Add ranges to etsec2 nodes") > fixes a bug that was exposed by commit 746c9e9f92dd ("of/base: Fix > PowerPC address parsing hack"). The latter commit was applied to stable > trees, so the former should be as well