[PATCH] powerpc/kexec: Fix kexec when using VMX optimised memcpy

2013-05-12 Thread Anton Blanchard
-by: Anton Blanchard an...@samba.org Cc: sta...@vger.kernel.org # 3.6+ --- Index: b/arch/powerpc/kernel/machine_kexec_64.c === --- a/arch/powerpc/kernel/machine_kexec_64.c +++ b/arch/powerpc/kernel/machine_kexec_64.c @@ -17,6 +17,7

[PATCH] powerpc: Emulate non privileged DSCR read and write

2013-05-02 Thread Anton Blanchard
one. A simple test was created to verify the fix: http://ozlabs.org/~anton/junkcode/user_dscr_test.c Without the patch we get a SIGILL and it passes with the patch. Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org --- Index: b/arch/powerpc/include/asm/ppc-opcode.h

Re: [PATCH net-next] af_unix: fix a fatal race with bit fields

2013-04-30 Thread Anton Blanchard
Hi Eric, From: Eric Dumazet eduma...@google.com Using bit fields is dangerous on ppc64, as the compiler uses 64bit instructions to manipulate them. If the 64bit word includes any atomic_t or spinlock_t, we can lose critical concurrent changes. This is happening in af_unix, where

[PATCH] powerpc: Align p_toc

2013-04-28 Thread Anton Blanchard
p_toc is an 8 byte relative offset to the TOC that we place in the text section. This means it is only 4 byte aligned where it should be 8 byte aligned. Add an explicit alignment. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/head_64.S

Re: [PATCH] [RFC] powerpc: Add VDSO version of time

2013-04-18 Thread Anton Blanchard
changelog entry and Signed-off-by): Acked-by: Anton Blanchard an...@samba.org Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] powerpc: Fix -mcmodel=medium breakage in prom_init.c

2013-03-12 Thread Anton Blanchard
...@suse.de Signed-off-by: Anton Blanchard an...@samba.org --- Thanks Aaro for reporting this, and Alexander for an initial fix. This tested ok for me with both a new and an old toolchain, but would appreciate if you could double check it fixes your issues too. diff --git a/arch/powerpc/kernel

Re: [PATCH 1/4] audit: Syscall rules are not applied to existing processes on non-x86

2013-02-06 Thread Anton Blanchard
Hi, Just following up on this. I've had a few people complaining about audit being broken on ppc64 and it would be nice to fix. Anton -- On Wed, 9 Jan 2013 10:46:17 +1100 Anton Blanchard an...@samba.org wrote: Commit b05d8447e782 (audit: inline audit_syscall_entry to reduce burden

[PATCH 1/4] audit: Syscall rules are not applied to existing processes on non-x86

2013-01-08 Thread Anton Blanchard
record. Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org # 3.3+ --- Index: b/include/linux/audit.h === --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -119,7 +119,7 @@ static inline void

[PATCH 2/4] powerpc: Remove static branch prediction in 64bit traced syscall path

2013-01-08 Thread Anton Blanchard
Some distros enable auditing by default which forces us through the syscall trace path. Remove the static branch prediction in our 64bit syscall handler and let the hardware do the prediction. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/entry_64.S

[PATCH 3/4] powerpc: Optimise 64bit syscall auditing entry path

2013-01-08 Thread Anton Blanchard
in a subsequent patch. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/entry_64.S === --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -34,6 +34,12 @@ #include asm/ftrace.h #include

[PATCH 4/4] powerpc: Optimise 64bit syscall auditing exit path

2013-01-08 Thread Anton Blanchard
on a POWER7 box: http://ozlabs.org/~anton/junkcode/null_syscall.c Baseline: 920.6 cycles Patched: 719.6 cycles An improvement of 22%. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/entry_64.S

Re: [PATCH] powerpc: POWER7 optimised memcpy using VMX and enhanced prefetch

2012-12-17 Thread Anton Blanchard
Hi Jimi, I know this is a little late, but shouldn't these power7 specific thingies be in obj-$(CONFIG_PPC_BOOK3S_64). The reason I ask is that my compiler pukes on dcbtst and as I deal with that I wanted to point this out. I guess we could do that. It's a bit strange your assembler is

[PATCH 1/3] powerpc: Run savedefconfig over pseries, ppc64 and ppc64e defconfig

2012-12-12 Thread Anton Blanchard
No changes, just update the configs with savedefconfig. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/configs/ppc64_defconfig === --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs

[PATCH 2/3] powerpc: Cleanup NLS config options on pseries, ppc64 and ppc64e defconfig

2012-12-12 Thread Anton Blanchard
Set CONFIG_NLS_DEFAULT to utf8. The distros do this (eg ppc64 FC17 and RHEL6) as well as the x86 defconfigs. Userspace these days is most likely to expect utf8 anyway. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/configs/ppc64_defconfig

[PATCH 3/3] powerpc: Enable devtmpfs, EFI partition support and tmpfs ACLs on pseries, ppc64 and ppc64e defconfig

2012-12-12 Thread Anton Blanchard
We need devtmpfs enabled to boot on recent versions of Fedora. EFI partitions will be useful for large block devices. tmpfs ACL support is used by some distros for managing access to devices. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/configs/pseries_defconfig

[PATCH] powerpc: Avoid load of static chain register when calling nested functions through a pointer on 64bit

2012-12-12 Thread Anton Blanchard
trampolines don't setup the static chain register so adding this option and forcing gcc to error out makes even more sense. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/Makefile === --- a/arch/powerpc

Re: [PATCH 1/3] powerpc: Relocate prom_init.c on 64bit

2012-12-04 Thread Anton Blanchard
Hi Ben, My only potential objection was that it might have been cleaner to actually build prom_init.c as a separate binary alltogether and piggy back it... Yeah, I went through a number of options before settling on this one. Move prom_init.c into arch/powerpc/boot Pros: - 32 bit

[PATCH 1/3] powerpc: Relocate prom_init.c on 64bit

2012-11-26 Thread Anton Blanchard
which passes through the prom_init.c TOC entries to make sure everything looks reasonable. Signed-off-by: Anton Blanchard an...@samba.org --- To keep the patch small and reviewable, I separated the removal of the RELOC macro into a follow up patch. For simplicity I do the relocation in C but if self

[PATCH 2/3] powerpc: Remove RELOC() macro

2012-11-26 Thread Anton Blanchard
Now we relocate prom_init.c on 64bit we can finally remove the nasty RELOC() macro. Finally a patch that I can claim has a net positive effect on the kernel. It doesn't happen very often. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/prom_init.c

[PATCH 3/3] powerpc: Build kernel with -mcmodel=medium

2012-11-26 Thread Anton Blanchard
relocation for this to work, hence -mcmodel=large. On older kernels we fall back to the two level TOC (-mminimal-toc) Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/Makefile === --- a/arch/powerpc/Makefile +++ b

HVC console breakage

2012-11-13 Thread Anton Blanchard
Hi, Commit bdb498c20040 (TTY: hvc_console, add tty install) breaks HVC on ppc64. It looks a bit like a refcounting issue and we end up releasing the tty. I haven't had a change to look closer yet. Anton ___ Linuxppc-dev mailing list

[PATCH] powerpc: Fix CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n build

2012-11-11 Thread Anton Blanchard
If we build a kernel with CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n, the kernel fails when we run at a non zero offset. It turns out we were incorrectly wrapping some of the relocatable kernel code with CONFIG_CRASH_DUMP. Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org

Re: [PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt

2012-11-05 Thread Anton Blanchard
Hi, Thanks for looking into this mess. One small thing we can fix in a follow up patch: + if (!found) + printk(KERN_WARNING Can't find PMC that caused I think it would be worth making that a printk_ratelimited. We are probably dead at this stage but we shouldn't spam the

[PATCH 1/2] powerpc: Move most of setup.h out of uapi

2012-11-01 Thread Anton Blanchard
Most of setup.h should not be exported to userspace, so move it back. All we are left with is the asm-generic include to pick up the COMMAND_LINE_SIZE define. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/include/asm/setup.h

[PATCH 2/2] powerpc: Remove stale function prototypes from setup.h

2012-11-01 Thread Anton Blanchard
I noticed a couple of function prototypes for functions that no longer exist. Remove them. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/include/asm/setup.h === --- a/arch/powerpc/include/asm/setup.h

Re: [REGRESSION] nfsd crashing with 3.6.0-rc7 on PowerPC

2012-10-03 Thread Anton Blanchard
Hi, Yes. With that patch applied, things work for me again. Thanks Alex, Nish. We can reproduce this on one of our Biminis, looking into it now. Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

[PATCH] powerpc/iommu: Fix multiple issues with IOMMU pools code

2012-10-03 Thread Anton Blanchard
that the global lock is gone. Reported-by: Alexander Graf ag...@suse.de Signed-off-by: Anton Blanchard an...@samba.org --- There is still an issue with the lazy u3 flushing, but I wanted to get this out for testing. Index: b/arch/powerpc/kernel/iommu.c

Re: [PATCH] powerpc: Remove tlb batching hack for nighthawk

2012-09-23 Thread Anton Blanchard
effectively been disabled since Dec 2006. Ergo, I think we can drop it. Ouch. We probably had the last nighthawk in existence and we crushed it years ago. So: Acked-by: Anton Blanchard an...@samba.org Anton ___ Linuxppc-dev mailing list Linuxppc-dev

Re: [RFC patch powerpc,trace] Avoid suspicious RCU usage reporting for some tracepoints

2012-09-10 Thread Anton Blanchard
Hi Ben, Or could we just move these tracepoints inside the irq_enter()/irq_exit() area? (Seems not good for the timer_interrupt case). I'd say just move them in. Anton, any objection ? Sounds reasonable, no objections from me. Anton ___

[PATCH 1/4] powerpc: Update DSCR on all CPUs when writing sysfs dscr_default

2012-09-03 Thread Anton Blanchard
test case: http://ozlabs.org/~anton/junkcode/dscr_explicit_test.c Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org # 3.0+ --- Index: b/arch/powerpc/kernel/sysfs.c === --- a/arch/powerpc/kernel/sysfs.c +++ b/arch

[PATCH 2/4] powerpc: Keep thread.dscr and thread.dscr_inherit in sync

2012-09-03 Thread Anton Blanchard
of thread.dscr into the child. To avoid this, always keep thread.dscr in sync with reality. This issue was found with the following testcase: http://ozlabs.org/~anton/junkcode/dscr_inherit_test.c Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org # 3.0+ --- Index: b/arch/powerpc

[PATCH 3/4] powerpc: Fix DSCR inheritance in copy_thread()

2012-09-03 Thread Anton Blanchard
and thread.dscr_inherit from the parent which ends up being much simpler. This was found with the following test case: http://ozlabs.org/~anton/junkcode/dscr_default_test.c Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org # 3.0+ --- Index: b/arch/powerpc/kernel/process.c

[PATCH 4/4] powerpc: Restore correct DSCR in context switch

2012-09-03 Thread Anton Blanchard
at the same time: http://ozlabs.org/~anton/junkcode/dscr_default_test.c http://ozlabs.org/~anton/junkcode/dscr_explicit_test.c http://ozlabs.org/~anton/junkcode/dscr_inherit_test.c Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org # 3.0+ --- Index: b/arch/powerpc/kernel/entry_64.S

[PATCH 1/2] powerpc: POWER7 copy_to_user/copy_from_user patch applied twice

2012-08-07 Thread Anton Blanchard
powerpc: Use enhanced touch instructions in POWER7 copy_to_user/copy_from_user was applied twice. Remove one. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/lib/copyuser_power7.S === --- a/arch/powerpc/lib

[PATCH 2/2] powerpc: Fix VMX in interrupt check in POWER7 copy loops

2012-08-07 Thread Anton Blanchard
The enhanced prefetch hint patches corrupt the condition register that was used to check if we are in interrupt. Fix this by using cr1. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/lib/copyuser_power7.S

[PATCH] powerpc: Enable pseries hardware RNG and crypto modules

2012-07-23 Thread Anton Blanchard
Enable the hardware RNG and crypto modules. I verified they both autoload via the VIO subsystem, so there is no need to build them in. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/configs/ppc64_defconfig

[PATCH] powerpc: Lack of firmware flash support is not an error

2012-07-23 Thread Anton Blanchard
Reduce the severity of the warning given when firmware flash is not supported. Not all platforms have it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/rtas_flash.c === --- a/arch/powerpc/kernel

[PATCH] powerpc: Add VDSO version of getcpu

2012-07-05 Thread Anton Blanchard
it when transitioning from the guest to the host. I have a glibc patch that implements sched_getcpu on top of this. Testing on a POWER7: baseline: 538 cycles vdso: 30 cycles Signed-off-by: Anton Blanchard an...@samba.org --- v2: - Fix kvm - add vdso32 version on 64bit kernel Index: linux

[PATCH] powerpc: Use cpumask iterator to avoid warning in xmon

2012-06-28 Thread Anton Blanchard
but were never started (eg kexec into a kernel with an nr_cpus= boot option). They are going to die way before we get into xmon since we haven't set any kernel state up for them. Signed-off-by: Anton Blanchard an...@samba.org --- diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c

[PATCH] powerpc: check_and_cede_processor never cedes

2012-06-27 Thread Anton Blanchard
interrupt handling rework of 3.4 but was hidden until recently because hard_irq_disable did nothing. This issue will eventually appear in 3.4 stable since the hard_irq_disable fix is marked stable, so mark this one for stable too. Signed-off-by: Anton Blanchard an...@samba.org Cc: sta

[PATCH] powerpc: check_and_cede_processor never cedes

2012-06-27 Thread Anton Blanchard
will eventually appear in 3.4 stable since the hard_irq_disable fix is marked stable, so mark this one for stable too. Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@vger.kernel.org --- v2: create a helper, suggested by Ben. Index: linux-build/arch/powerpc/platforms/pseries

[PATCH 1/4] powerpc/perf: Create mmcra_sihv/mmcra_sipv helpers

2012-06-26 Thread Anton Blanchard
We want to access the MMCRA_SIHV and MMCRA_SIPR bits elsewhere so create mmcra_sihv and mmcra_sipr which hide the differences between the old and new layout of the bits. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/perf/core-book3s.c

[PATCH 2/4] powerpc/perf: Move code to select SIAR or pt_regs into perf_read_regs

2012-06-26 Thread Anton Blanchard
The logic to choose whether to use the SIAR or get the information out of pt_regs is going to get more complicated, so do it once in perf_read_regs. We overload regs-result which is gross but we are already doing it with regs-dsisr. Signed-off-by: Anton Blanchard an...@samba.org --- Other

[PATCH 3/4] powerpc/perf: Always use pt_regs for userspace samples

2012-06-26 Thread Anton Blanchard
was unable to profile any of our early exception code for example. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/perf/core-book3s.c === --- linux-build.orig/arch/powerpc/perf/core-book3s.c2012-06-26

[PATCH 4/4] powerpc/perf: Use perf_instruction_pointer in callchains

2012-06-26 Thread Anton Blanchard
We use SIAR or regs-nip for the instruction pointer depending on the PMU configuration, but we always use regs-nip in the callchain. Use perf_instruction_pointer so the backtrace is consistent. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/perf/callchain.c

Re: [PATCH 4/4] powerpc/perf: Use perf_instruction_pointer in callchains

2012-06-26 Thread Anton Blanchard
Hi Scott, Won't this break core-fsl-emb, which doesn't define perf_instruction_pointer()? It links ok for me. You should get the default version: #ifndef perf_misc_flags # define perf_misc_flags(regs) \ (user_mode(regs) ? PERF_RECORD_MISC_USER : PERF_RECORD_MISC_KERNEL) #

[PATCH] powerpc: Add VDSO version of getcpu

2012-06-24 Thread Anton Blanchard
cycles Signed-off-by: Anton Blanchard an...@samba.org --- Outstanding issues: - Do we have any KVM issues? - This will only work with 64 bit kernels for now, do we need to come up with a scheme for 32 bit? - Implement 32 bit userspace version (running on 64 bit kernels) Index: linux-build

[PATCH 1/4] powerpc: vio: Remove dma not supported warnings

2012-06-24 Thread Anton Blanchard
with a DMA window. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/vio.c === --- linux-build.orig/arch/powerpc/kernel/vio.c 2012-06-08 14:02:05.548512941 +1000 +++ linux-build/arch/powerpc

[PATCH 2/4] powerpc: vio: Separate vio bus probe and device probe

2012-06-24 Thread Anton Blanchard
Similar to PCI, separate the bus probe from device probe. This allows us to attach bus notifiers for DMA debug and IOMMU fault injection before devices have been probed. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/vio.c

[PATCH 3/4] powerpc: call dma_debug_add_bus for PCI and VIO buses

2012-06-24 Thread Anton Blanchard
The DMA API debug code has hooks to verify all DMA entries have been freed at time of hot unplug. We need to call dma_debug_add_bus for this to work. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/vio.c

[PATCH 4/4] powerpc: IOMMU fault injection

2012-06-24 Thread Anton Blanchard
:00.1: Unrecoverable error in the card Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/iommu.c === --- linux-build.orig/arch/powerpc/kernel/iommu.c2012-06-08 09:01:02.785709100

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

2012-06-07 Thread Anton Blanchard
Hi, Breaks the cell code with: arch/powerpc/platforms/cell/iommu.c:521:15: error: 'struct iommu_table' has no member named 'it_hint' Yuck, I'll spin a fix. There's no need for the code to bump the hint. Anton ___ Linuxppc-dev mailing list

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

2012-06-07 Thread Anton Blanchard
improved 69% with this patch applied. Signed-off-by: Anton Blanchard an...@samba.org --- All patches combined improve performance by 178% v2.0: Fix cell build, noticed by mpe. Index: linux-build/arch/powerpc/kernel/iommu.c

[PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-04 Thread Anton Blanchard
gets the destination 128 byte aligned then uses dcbz on whole cachelines. Before: 1048576 bytes (10 GB) copied, 0.414744 s, 25.3 GB/s After: 1048576 bytes (10 GB) copied, 0.268597 s, 39.0 GB/s 39 GB/s, a new record. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build

[PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-04 Thread Anton Blanchard
gets the destination cacheline aligned then uses dcbz on whole cachelines. Before: 1048576 bytes (10 GB) copied, 0.414744 s, 25.3 GB/s After: 1048576 bytes (10 GB) copied, 0.268597 s, 39.0 GB/s 39 GB/s, a new record. Signed-off-by: Anton Blanchard an...@samba.org --- v2: handle any

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

2012-06-04 Thread Anton Blanchard
back to using the original request size. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/platforms/pseries/msi.c === --- linux-build.orig/arch/powerpc/platforms/pseries/msi.c 2012-06-04

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

2012-06-03 Thread Anton Blanchard
if the quota allows it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/platforms/pseries/msi.c === --- linux-build.orig/arch/powerpc/platforms/pseries/msi.c 2012-06-03 20:49:29.082280031

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

2012-06-03 Thread Anton Blanchard
). I saw these pauses as a consequence of getting a stray hypervisor decrementer interrupt left over from exiting a KVM guest. Urgh, sorry for that mess. Acked-by: Anton Blanchard an...@samba.org Anton This isn't quite a straight revert because of changes to the surrounding code

[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 an...@samba.org --- Index: linux

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

2012-06-03 Thread Anton Blanchard
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 32% with this patch applied. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/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 an...@samba.org

[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 an...@samba.org --- Index: linux-build/arch/powerpc/kernel/iommu.c === --- linux-build.orig/arch/powerpc

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

2012-06-03 Thread Anton Blanchard
improved 69% with this patch applied. Signed-off-by: Anton Blanchard an...@samba.org --- All patches combined improve performance by 178% Index: linux-build/arch/powerpc/kernel/iommu.c === --- linux-build.orig/arch/powerpc/kernel

[PATCH] powerpc: Fix size of st_nlink on 64bit

2012-06-02 Thread Anton Blanchard
commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to explicitly-sized type) changed the size of st_nlink on ppc64 from a long to a short, resulting in boot failures. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/include/asm/stat.h

Re: [PATCH] powerpc: Fix size of st_nlink on 64bit

2012-06-02 Thread Anton Blanchard
Hi Stephen, commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to explicitly-sized type) changed the size of st_nlink on ppc64 from a long to a short, resulting in boot failures. Signed-off-by: Anton Blanchard an...@samba.org Would this affect my (early user mode) boot

[PATCH] powerpc: Use enhanced touch instructions in POWER7 copy_to_user/copy_from_user

2012-05-31 Thread Anton Blanchard
://ozlabs.org/~anton/junkcode/copy_to_user.c # time ./copy_to_user2 -l 4224 -i 1000 before: 6.807 s after: 6.946 s A 2% slowdown, which seems reasonable considering our data is unlikely to be completely L1 contained. Signed-off-by: Anton Blanchard an...@samba.org --- v2: Use cr1

[PATCH] powerpc: POWER7 optimised memcpy using VMX and enhanced prefetch

2012-05-31 Thread Anton Blanchard
(booting with brd.rd_size=1048576): # mdadm -CR -e 1.2 /dev/md0 --level=6 -n4 /dev/ram[0-3] I then timed how long it took to write to the entire array: # dd if=/dev/zero of=/dev/md0 bs=1M Before: 892 MB/s After: 999 MB/s A 12% improvement. Signed-off-by: Anton Blanchard an...@samba.org --- Index

[PATCH] powerpc: Use enhanced touch instructions in POWER7 copy_to_user/copy_from_user

2012-05-29 Thread Anton Blanchard
://ozlabs.org/~anton/junkcode/copy_to_user.c # time ./copy_to_user2 -l 4224 -i 1000 before: 6.807 s after: 6.946 s A 2% slowdown, which seems reasonable considering our data is unlikely to be completely L1 contained. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch

[PATCH] powerpc: Clear RI and EE at the same time in system call exit

2012-05-29 Thread Anton Blanchard
disabled this patch improves the null system call by 7%. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/entry_64.S === --- linux-build.orig/arch/powerpc/kernel/entry_64.S 2012-05-28 18:23

[PATCH] powerpc: Clear RI and EE at the same time in system call exit

2012-05-29 Thread Anton Blanchard
. This does complicate things a bit - we have to be careful to restore RI if we branch out before returning to userspace. On a POWER7 with virtual cputime disabled this patch improves the null system call by 7%. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel

[PATCH 1/2] powerpc: Rename copyuser_power7_vmx.c to vmx-helper.c

2012-05-29 Thread Anton Blanchard
Subsequent patches will add more VMX library functions and it makes sense to keep all the c-code helper functions in the one file. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/lib/Makefile

[PATCH 2/2] powerpc: POWER7 optimised copy_page using VMX and enhanced prefetch

2012-05-29 Thread Anton Blanchard
). The following microbenchmark was used to assess the impact of the patch: http://ozlabs.org/~anton/junkcode/page_fault_file.c We test MAP_PRIVATE page faults across a 1GB file, 100 times: # time ./page_fault_file -p -l 1G -i 100 Before: 22.25s After: 18.89s 17% faster Signed-off-by: Anton Blanchard

[PATCH] powerpc: 64bit optimised __clear_user

2012-05-27 Thread Anton Blanchard
=1 1048576 bytes (10 GB) copied, 3.72379 s, 2.8 GB/s After: # time dd if=/dev/zero of=/dev/null bs=1M count=1 1048576 bytes (10 GB) copied, 0.728318 s, 14.4 GB/s Over 5x faster. Signed-off-by: Anton Blanchard an...@samba.org --- Interestingly, it picked up an issue with the old

[PATCH] powerpc: Enable jump label support

2012-05-22 Thread Anton Blanchard
: stdx 3,11,9 lwz 0,8(29) cmpwi 7,0,0 bne- 7,.L124 bl .irq_enter CONFIG_JUMP_LABEL enabled: stdx 3,11,9 nop bl .irq_enter Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/configs/ppc64_defconfig

[PATCH] powerpc: tracing: Avoid tracepoint duplication with DECLARE_EVENT_CLASS

2012-05-22 Thread Anton Blanchard
16 2890370e7 arch/powerpc/kernel/irq.o 6817 19019 16 2585264fc arch/powerpc/kernel/irq.o Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/include/asm/trace.h === --- linux

Re: [PATCH 4/4] powerpc: Remove CONFIG_POWER4_ONLY

2012-04-18 Thread Anton Blanchard
Hi Ben, So if I remember properly, this means you key off if both CPU_FTR_NOEXECUTE and CPU_FTR_NODISRALIGN are clear... is there a point ? You make the patch simpler by only keying on NO_EXECUTE which afaik is a power4 or later only feature no ? Was going to do that, but noticed ARCH_V2

[PATCH 4/4] powerpc: Remove CONFIG_POWER4_ONLY

2012-04-18 Thread Anton Blanchard
option just do it at runtime via a feature fixup. Signed-off-by: Anton Blanchard an...@samba.org --- v2: Use CPU_FTR_NOEXECUTE to select the newer mtocrf Index: linux-build/arch/powerpc/configs/g5_defconfig === --- linux-build.orig

Re: [PATCH] powerpc/eeh: crash caused by null eeh_dev

2012-04-17 Thread Anton Blanchard
Hi Gavin, The problem was reported by Anton Blanchard. While EEH error happened to the PCI device without the corresponding device driver, kernel crash was seen. Eventually, I successfully reproduced the problem on Firebird-L machine with utility errinjct. Initially, the device driver

[PATCH 1/4] powerpc: Require gcc 4.0 on 64-bit

2012-04-17 Thread Anton Blanchard
-off-by: Anton Blanchard an...@samba.org --- 4.0 came out in 2005 and the gcc on RHEL5 and SLES10 looks to be 4.1. I highly doubt a ppc64 kernel will build these days on either RHEL4 or SLES9. Anything else we have to worry about? Index: linux-build/arch/powerpc/Makefile

[PATCH 2/4] powerpc: Remove altivec fix for gcc versions before 4.0

2012-04-17 Thread Anton Blanchard
Now we require gcc 4.0 on 64-bit we can remove the pre gcc 4.0 -maltivec workaround. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/Makefile === --- linux-build.orig/arch/powerpc/Makefile

[PATCH 3/4] powerpc: Add 64-bit CPU targets for gcc

2012-04-17 Thread Anton Blanchard
Add a menu to select various 64-bit CPU targets for gcc. We default to -mtune=power7 and if gcc doesn't understand that we fallback to -mtune=power4. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/Makefile

[PATCH 4/4] powerpc: Remove CONFIG_POWER4_ONLY

2012-04-17 Thread Anton Blanchard
option just do it at runtime via a feature fixup. I had to expose CPU_FTR_PPCAS_ARCH_V2 to assembly since I key off that. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/configs/g5_defconfig

[PATCH] powerpc: Use WARN instead of dump_stack when printing EEH error backtrace

2012-04-17 Thread Anton Blanchard
-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/platforms/pseries/eeh.c === --- linux-build.orig/arch/powerpc/platforms/pseries/eeh.c 2012-04-13 10:29:53.576534339 +1000 +++ linux-build/arch/powerpc/platforms

[PATCH] powerpc: Remove old powerpc specific ptrace getregs/setregs calls

2012-04-17 Thread Anton Blanchard
lets remove them. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/include/asm/ptrace.h === --- linux-build.orig/arch/powerpc/include/asm/ptrace.h 2012-04-12 11:36:25.784215556 +1000 +++ linux-build

[PATCH 1/2] powerpc: Remove empty giveup_altivec function on book3e CPUs

2012-04-16 Thread Anton Blanchard
Use an empty inline instead of an empty function to implement giveup_altivec on book3e CPUs, similar to flush_altivec_to_thread. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/include/asm/switch_to.h

[PATCH 2/2] powerpc: Optimise enable_kernel_altivec

2012-04-16 Thread Anton Blanchard
completes 5.2% faster on a POWER7 PS700. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/process.c === --- linux-build.orig/arch/powerpc/kernel/process.c 2012-04-16 11:35:19.0

Re: [PATCH v5 00/21] EEH reorganization

2012-04-16 Thread Anton Blanchard
Hi, Thanks for the information. I'll try to reproduce the issue on Firebird-L today. By the way, it seems that mstmread is some user-level application accessing the config space while the problem happened? The EEH error is caused by the Melanox firmware tools. It seems the crash was caused

Re: [PATCH v5 00/21] EEH reorganization

2012-04-12 Thread Anton Blanchard
Hi Gavin, This series of patches is going to reorganize EEH so that it could support multiple platforms in future. The requirements were raised from the aspects. I just hit this on mainline from today (3.4.0-rc2-00065-gf549e08). Haven't had a chance to narrow it down yet. Oops: Kernel

Re: [PATCH v5 00/21] EEH reorganization

2012-04-12 Thread Anton Blanchard
Hi, I just hit this on mainline from today (3.4.0-rc2-00065-gf549e08). Haven't had a chance to narrow it down yet. Looking closer, it was caused by an EEH error at boot. It looks like the Mellanox infiniband card gets an error when probed by their firmware tool (mstmread), but only if the

[PATCH 1/3] powerpc: Clean up lppaca-cede_latency_hint

2012-04-10 Thread Anton Blanchard
We have a union containing fields from the old iseries hypervisor that has been reused for the cede latency hint. Since we no longer support iseries, remove the union completely. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/include/asm/lppaca.h

[PATCH 2/3] powerpc: Remove iseries specific fields in lppaca

2012-04-10 Thread Anton Blanchard
Remove all the iseries specific fields in the lppaca. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/include/asm/lppaca.h === --- linux-build.orig/arch/powerpc/include/asm/lppaca.h 2012-04-11

[PATCH 3/3] powerpc: Reformat lppaca.h

2012-04-10 Thread Anton Blanchard
Reformat lppaca.h to match Linux coding standards. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/include/asm/lppaca.h === --- linux-build.orig/arch/powerpc/include/asm/lppaca.h 2012-04-11 12

[PATCH 3/4 v2] powerpc: Better scheduling of CR save code in system call path

2012-04-05 Thread Anton Blanchard
the crclr by doing it in a GPR with rlwinm which gives us more room to better schedule the sequence. Signed-off-by: Anton Blanchard an...@samba.org --- v2: Milton pointed out that rlwinm copies the low 32bits into the top 32bits and this might confuse ptracers. We tossed around a few ideas but his

[PATCH 1/4] powerpc: Hide some system call labels from profile tools

2012-04-04 Thread Anton Blanchard
syscall_dotrace_cont and syscall_error_cont tend to complicate perf output so make them local. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/entry_64.S === --- linux-build.orig/arch

[PATCH 2/4] powerpc: No need to save XER in a system call

2012-04-04 Thread Anton Blanchard
The XER is a volatile register so there is no need to save and restore it over a system call - zero it out in the exception stack frame instead. This should fix a 5 cycle stall of the mfxer/std seen on POWER7. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc

[PATCH 3/4] powerpc: Better scheduling of CR save code in system call path

2012-04-04 Thread Anton Blanchard
the crclr by doing it in a GPR with rlwinm which gives us more room to better schedule the sequence. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/entry_64.S === --- linux-build.orig/arch

[PATCH 4/4] powerpc: No need to preserve count register across system call

2012-04-04 Thread Anton Blanchard
The count register is volatile so we don't need to preserve it. Store zero to the entry in the exception frame. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/kernel/entry_64.S === --- linux

[PATCH 1/6] powerpc: Make function that parses RTAS error logs global

2012-03-21 Thread Anton Blanchard
-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/include/asm/rtas.h === --- linux-build.orig/arch/powerpc/include/asm/rtas.h2012-03-22 11:46:57.408187770 +1100 +++ linux-build/arch/powerpc/include/asm

[PATCH 5/6] powerpc/pseries: Clean up ras_error_interrupt code

2012-03-21 Thread Anton Blanchard
The RAS error interrupt is no longer used but we may as well mirror the changes we made to the EPOW interrupt. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-build/arch/powerpc/platforms/pseries/ras.c === --- linux

3.3.0-rc6-next-20120308 boot failure on POWER7 blade

2012-03-08 Thread Anton Blanchard
Hi, I'm seeing this on a POWER7 blade booting 3.3.0-rc6-next-20120308: PCI host bridge to bus :00 pci_bus :00: root bus resource [io 0x10-0x10] (bus address [0xf-0xf]) pci_bus :00: root bus resource [mem 0x3b00-0x3b001fff] (bus address

<    3   4   5   6   7   8   9   10   11   12   >