Re: [PATCH] powerpc: pseries: Round up MSI-X requests

2012-06-03 Thread Benjamin Herrenschmidt
On Mon, 2012-06-04 at 16:43 +1000, Michael Ellerman wrote: > There is some chance this will result in breakage because the driver > asks for N - and assumes that is what was allocated - and the device is > configured for > N. We can fix that. We can whack the configuration back with N, just know t

Re: [PATCH] powerpc: pseries: Round up MSI-X requests

2012-06-03 Thread Michael Ellerman
On Mon, 2012-06-04 at 09:15 +1000, Anton Blanchard wrote: > The pseries firmware currently refuses any non power of two MSI-X > request. Unfortunately most network drivers end up asking for that > because they want a power of two for RX queues and one or two extra > for everything else. > > This p

[PATCH 5/5] powerpc: iommu: Implement IOMMU pools to improve multiqueue adapter performance

2012-06-03 Thread Anton Blanchard
At the moment all queues in a multiqueue adapter will serialise against the IOMMU table lock. This is proving to be a big issue, especially with 10Gbit ethernet. This patch creates 4 pools and tries to spread the load across them. If the table is under 1GB in size we revert back to the original b

[PATCH 4/5] powerpc: iommu: Push spinlock into iommu_range_alloc and __iommu_free

2012-06-03 Thread Anton Blanchard
In preparation for IOMMU pools, push the spinlock into iommu_range_alloc and __iommu_free. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/kernel/iommu.c === --- linux-build.orig/arch/powerpc/kernel/iommu.c

[PATCH 3/5] powerpc: iommu: Reduce spinlock coverage in iommu_free

2012-06-03 Thread Anton Blanchard
This patch moves tce_free outside of the lock in iommu_free. Some performance numbers were obtained with a Chelsio T3 adapter on two POWER7 boxes, running a 100 session TCP round robin test. Performance improved 25% with this patch applied. Signed-off-by: Anton Blanchard --- Index: linux-buil

[PATCH 2/5] powerpc: iommu: Reduce spinlock coverage in iommu_alloc and iommu_free

2012-06-03 Thread Anton Blanchard
We currently hold the IOMMU spinlock around tce_build and tce_flush. This causes our spinlock hold times to be much higher than required and can impact multiqueue adapters. This patch moves tce_build and tce_flush outside of the lock in iommu_alloc, and tce_flush outside of the lock in iommu_free

[PATCH 1/5] powerpc/pseries: Disable interrupts around IOMMU percpu data accesses

2012-06-03 Thread Anton Blanchard
tce_buildmulti_pSeriesLP uses a per cpu page to communicate with the hypervisor. We currently rely on the IOMMU table spinlock but subsequent patches will be removing that so disable interrupts around all accesses of tce_page. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/p

Re: [PATCH] powerpc/time: Sanity check of decrementer expiration is necessary

2012-06-03 Thread Anton Blanchard
Hi Paul, > This reverts 68568add2c ("powerpc/time: Remove unnecessary sanity > check of decrementer expiration"). We do need to check whether we > have reached the expiration time of the next event, because we > sometimes get an early decrementer interrupt, most notably when we > set the decremen

[PATCH] powerpc: pseries: Round up MSI-X requests

2012-06-03 Thread Anton Blanchard
The pseries firmware currently refuses any non power of two MSI-X request. Unfortunately most network drivers end up asking for that because they want a power of two for RX queues and one or two extra for everything else. This patch rounds up the firmware request to the next power of two if the q

Re: [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL

2012-06-03 Thread Joakim Tjernlund
Benjamin Herrenschmidt wrote on 2012/06/02 23:21:16: > > On Sat, 2012-06-02 at 20:29 +0200, Joakim Tjernlund wrote: > > > > hmm, where does this go w.r.t the patch? Got the feeling that the > > best thing is to just turn MSR:DE on and be done with it? > > Not unconditionally, we need to have a clo

[PATCH 3/3 v2] powerpc/mpic: FSL MPIC error interrupt support.

2012-06-03 Thread Varun Sethi
All SOC device error interrupts are muxed and delivered to the core as a single MPIC error interrupt. Currently all the device drivers requiring access to device errors have to register for the MPIC error interrupt as a shared interrupt. With this patch we add interrupt demuxing capability in the

[PATCH 2/3 v2] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.

2012-06-03 Thread Varun Sethi
We should use the MPIC_LARG_VECTORS flag while intializing the MPIC. This prevents us from eating in to hardware vector number space (MSIs) while setting up internal sources. Signed-off-by: Varun Sethi --- arch/powerpc/sysdev/mpic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) d

[PATCH 1/3] powerpc/mpic: finish supporting timer group B on Freescale chips

2012-06-03 Thread Varun Sethi
Previously, these interrupts would be mapped, but the offset calculation was broken, and only the first group was initialized. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/mpic.h |5 +++ arch/powerpc/sysdev/mpic.c | 58 --- 2 files changed

[PATCH 0/3] powerpc/mpic: Enhancements for FSL MPIC.

2012-06-03 Thread Varun Sethi
This patchset adds/fixes the following functionality specific to the FSL MPIC: 1. Fix support for timer group B interrupts. Previously these were not getting initialized. 2. Use the MPIC_LARGE_VECTORS flag while intializing FSL MPIC. This prevents us from eating in to hardware vector number space

Re: [v3 PATCH 3/3] ppc32/kprobe: don't emulate store when kprobe stwu r1

2012-06-03 Thread tiejun.chen
On 06/03/2012 02:59 PM, tiejun.chen wrote: > On 06/03/2012 01:07 PM, Tiejun Chen wrote: >> We don't do the real store operation for kprobing 'stwu Rx,(y)R1' >> since this may corrupt the exception frame, now we will do this >> operation safely in exception return code after migrate current >> excep

Re: [v3 PATCH 3/3] ppc32/kprobe: don't emulate store when kprobe stwu r1

2012-06-03 Thread tiejun.chen
On 06/03/2012 01:07 PM, Tiejun Chen wrote: > We don't do the real store operation for kprobing 'stwu Rx,(y)R1' > since this may corrupt the exception frame, now we will do this > operation safely in exception return code after migrate current > exception frame below the kprobed function stack. > >