Re: [PATCH 2/6] powerpc/time: Use clockevents_calc_mult_shift

2011-11-28 Thread Anton Blanchard
Hi Kumar, > > static void register_decrementer_clockevent(int cpu) > > { > > struct clock_event_device *dec = &per_cpu(decrementers, > > cpu).event; @@ -955,7 +928,8 @@ static void __init > > init_decrementer_cloc { > > int cpu = smp_processor_id(); > > > > - setup_clockevent_multiplie

[PATCH 0/9] oops and kdump patches

2011-11-30 Thread Anton Blanchard
Here are a number of patches I've put together based on some rather strenuous testing of our oops and kdump paths. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 1/9] powerpc: Give us time to get all oopses out before panicking

2011-11-30 Thread Anton Blanchard
panic, then delay 1 second before calling into the panic code. Move oops_exit inside the die lock and put a newline between oopses for clarity. Signed-off-by: Anton Blanchard --- We should really rename kexec_should_crash() to something like kernel_will_panic() and use it here. I'll work on

[PATCH 2/9] powerpc: Remove broken and complicated kdump system reset code

2011-11-30 Thread Anton Blanchard
We have a lot of complicated logic that handles possible recursion between kdump and a system reset exception. We can solve this in a much simpler way using the same setjmp/longjmp tricks xmon does. As a first step, this patch removes the old system reset code. Signed-off-by: Anton Blanchard

[PATCH 3/9] powerpc/kdump: Use setjmp/longjmp to handle kdump and system reset recursion

2011-11-30 Thread Anton Blanchard
r and must continue the kdump. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/kernel/crash.c === --- linux-build.orig/arch/powerpc/kernel/crash.c2011-11-25 16:41:06.228864087 +1100 +++ linux-build/arch/powe

[PATCH 4/9] powerpc: Cleanup crash/kexec code

2011-11-30 Thread Anton Blanchard
Remove some unnecessary defines and fix some spelling mistakes. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/kernel/crash.c === --- linux-build.orig/arch/powerpc/kernel/crash.c2011-11-25 16:42

[PATCH 5/9] powerpc: Rework die()

2011-11-30 Thread Anton Blanchard
Our die() code was based off a very old x86 version. Update it to mirror the current x86 code. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/kernel/traps.c === --- linux-build.orig/arch/powerpc/kernel/traps.c

[PATCH 6/9] powerpc: Reduce pseries panic timeout from 180s to 10s

2011-11-30 Thread Anton Blanchard
n it is to power cycle. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/platforms/pseries/setup.c === --- linux-build.orig/arch/powerpc/platforms/pseries/setup.c 2011-11-08 11:41:51.84258 +1100 +++ linux-

[PATCH 7/9] powerpc/xics: Reset the CPPR if H_EOI fails

2011-11-30 Thread Anton Blanchard
I have an intermittent kdump fail where the hypervisor fails an H_EOI. As a result our CPPR is never reset to 0xff and we no longer accept interrupts. This patch calls icp_hv_set_cppr to reset the CPPR if H_EOI fails, fixing the kdump fail. Signed-off-by: Anton Blanchard --- - I'm still t

[PATCH 8/9] powerpc/kdump: Delay before sending IPI on a system reset

2011-11-30 Thread Anton Blanchard
handler which is not what we want. I took the opportunity to add defines for all the various delays we have. There's no need for cpu_relax when we are doing an mdelay, so remove them too. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/kernel/cr

[PATCH 9/9] powerpc/kdump: Only save CPU state first time through the secondary CPU capture code

2011-11-30 Thread Anton Blanchard
lback. For controlling progress now use atomic_t cpus_in_crash to count how many CPUs have made it into the kdump code, and time_to_dump to tell everyone it's time to dump. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/kern

[PATCH] powerpc: Enable squashfs as a module

2011-11-30 Thread Anton Blanchard
Most distros use it so we may as well enable it and get regular compile testing. Signed-off-by: Anton Blanchard --- Index: linux-powerpc/arch/powerpc/configs/ppc64_defconfig === --- linux-powerpc.orig/arch/powerpc/configs

[PATCH] powerpc/nvram: Add spinlock to oops_to_nvram to prevent oops in compression code.

2011-11-30 Thread Anton Blanchard
ng at exactly the same time but I think it's best to play it safe for now. Once we are happy with the reliability we can change it to a full spinlock. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/platforms/pseri

Re: [PATCH] powerpc/nvram: Add spinlock to oops_to_nvram to prevent oops in compression code.

2011-11-30 Thread Anton Blanchard
Hi Ben, > How would we miss ? > > trylock does loop on stwcx. failure, it doesn't loop if the lock is > -taken-, so if the lock is only used for actually dealing with the > oops the only "miss" is because somebody already got it... or am I > missing something ? I'm thinking of two CPUs that ente

[PATCH] powerpc: Increase minimum RMO size from 64MB to 256MB

2011-12-04 Thread Anton Blanchard
boot issues we have on 128MB RMO boxes and all new machines have virtual RMO, we may as well set our minimum to 256MB. Signed-off-by: Anton Blanchard --- Index: linux-powerpc/arch/powerpc/kernel/prom_init.c === --- linux-powerpc.orig

[PATCH] powerpc: POWER7 optimised copy_to_user/copy_from_user using VMX

2011-12-07 Thread Anton Blanchard
ould be a second bit in the paca so we can calculate the break points quickly. - One suggestion from Ben was to save and restore the VSX registers we use inline instead of using enable_kernel_altivec. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/p

Re: [PATCH] powerpc: POWER7 optimised copy_to_user/copy_from_user using VMX

2011-12-07 Thread Anton Blanchard
Hi, > I hate the idea of having a POWER7 FTR bit. Every loon will (and has > tried to in the past) attach every POWER7 related thing to it, rather > than thinking about what the feature really is for. > > What about other processors which could also benefit from this copy > loop? Turning on

[PATCH] powerpc: POWER7 optimised copy_to_user/copy_from_user using VMX

2011-12-07 Thread Anton Blanchard
ould be a second bit in the paca so we can calculate the break points quickly. - One suggestion from Ben was to save and restore the VSX registers we use inline instead of using enable_kernel_altivec. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/p

Re: [PATCH] powerpc: fix wrong divisor in usecs_to_cputime

2011-12-09 Thread Anton Blanchard
bout to investigate. Can I suggest we add: Cc: [2.6.37+] so it will make it back into the stable trees? Anton > Signed-off-by: Andreas Schwab FWIW: Acked-by: Anton Blanchard > --- > arch/powerpc/include/asm/cputime.h |6 +++--- > arch/powerpc/kernel/time.c | 10

Re: [PATCH] powerpc: fix wrong divisor in usecs_to_cputime

2011-12-09 Thread Anton Blanchard
Hi Andreas, > There is no user of usecs_to_cputime before 3.2-rc1, so it wouldn't > have any effect for older versions. Great, that explains why I only noticed it last week :) Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://l

[PATCH] powerpc: Fix comment explaining our VSID layout

2011-12-12 Thread Anton Blanchard
We support 16TB of user address space and half a million contexts so update the comment to reflect this. Signed-off-by: Anton Blanchard --- Index: linux-powerpc/arch/powerpc/include/asm/mmu-hash64.h === --- linux-powerpc.orig/arch

Re: CONFIG_NO_HZ added too much idle time in /proc/stat during throughput test.

2011-12-13 Thread Anton Blanchard
Hi, > This is 2.6.32, but I think 2.6.36 is the same. Sounds a bit like this, merged in 2.6.39. Anton -- commit ad5d1c888e556bc00c4e86f452cad4a3a87d22c1 Author: Anton Blanchard Date: Sun Mar 20 15:28:03 2011 + powerpc: Fix accounting of softirq time when idle com

[PATCH] powerpc: Fix RCU idle and hcall tracing

2012-01-09 Thread Anton Blanchard
multiplatform builds. The simple fix is to avoid tracing H_CEDE and rely on other tracepoints and the hypervisor dispatch trace log to work out if we called H_CEDE. This fixes a hang during boot on pSeries. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/kernel/idle.c

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

2012-07-22 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 --- Index: b/arch/powerpc/configs/ppc64_defconfig === --- a/arch

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

2012-07-22 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 --- Index: b/arch/powerpc/kernel/rtas_flash.c === --- a/arch/powerpc/kernel/rtas_flash.c

[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 --- Index: b/arch/powerpc/lib/copyuser_power7.S === --- a/arch/p

[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 --- Index: b/arch/powerpc/lib/copyuser_power7.S === --- a/arch

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

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

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

2012-09-03 Thread Anton Blanchard
ue 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 Cc: # 3.0+ --- Index: b/arch/powerpc/kernel/tr

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

2012-09-03 Thread Anton Blanchard
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 Cc: # 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
t 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 Cc: # 3.0+ --- Index: b/arch/powerpc/kernel/entry

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 _

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

2012-09-23 Thread Anton Blanchard
d() will always return true, so the hack > has 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 Anton ___ Linuxppc-

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 https://lists.ozlabs.org/listinfo/linu

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

2012-10-03 Thread Anton Blanchard
e now that the global lock is gone. Reported-by: Alexander Graf Signed-off-by: Anton Blanchard --- 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 ===

[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 --- 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 --- Index: b/arch/powerpc/include/asm/setup.h === --- a/arch/powerpc/include/asm/setup.h +++ b/arch/powerpc

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 co

[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 Cc: --- Index: b/arch/powerpc/kernel

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 Linuxppc-dev@lists.

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

2012-11-26 Thread Anton Blanchard
ime script which passes through the prom_init.c TOC entries to make sure everything looks reasonable. Signed-off-by: Anton Blanchard --- 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 bra

[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 --- Index: b/arch/powerpc/kernel/prom_i

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

2012-11-26 Thread Anton Blanchard
64bit 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 --- Index: b/arch/powerpc/Makefile === --- a/arch/powerpc/Makefile +++ b/arch/po

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 enviro

[PATCH] powerpc: perf: power_pmu_start restores incorrect values, breaking frequency events

2012-02-15 Thread Anton Blanchard
SAMPLE | tail -1 SAMPLE events: 9948 Signed-off-by: Anton Blanchard --- Cc: Index: linux-build/arch/powerpc/kernel/perf_event.c === --- linux-build.orig/arch/powerpc/kernel/perf_event.c 2012-02-16 15:07:57.46538469

[PATCH 1/2] atomic: Allow atomic_inc_not_zero to be overridden

2012-02-29 Thread Anton Blanchard
We want to implement a ppc64 specific version of atomic_inc_not_zero so wrap it in an ifdef to allow it to be overridden. Signed-off-by: Anton Blanchard --- Index: linux-build/include/linux/atomic.h === --- linux-build.orig

[PATCH 2/2] powerpc: atomic: Implement atomic*_inc_not_zero

2012-02-29 Thread Anton Blanchard
: 39 00 00 00 li r8,0 - c01b63c4: 39 40 00 01 li r10,1 ... - c01b63e8: 7c 0a 00 50 subfr0,r10,r0 Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/include/asm/atomic.h

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 [0xe000-0xff

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

2012-03-08 Thread Anton Blanchard
Hi Ben, > Looks like something that got fixed but the new patches from Bjorn > aren't in next yet. I'll fwd you the patch separately to apply on top > of what you have see if that helps (to confirm that's indeed the > issue). Thanks, confirmed that it fixes it. Patch below in case anyone else is

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

2012-03-21 Thread Anton Blanchard
rorlog Signed-off-by: Anton Blanchard --- 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/rtas.h 2

[PATCH 2/6] powerpc/pseries: Parse and handle EPOW interrupts

2012-03-21 Thread Anton Blanchard
S error log for details Depending on the error encountered, we now issue an immediate or an orderly power down. Move initialization of the EPOW interrupt earlier in boot since we want to respond to them as early as possible. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerp

[PATCH 3/6] powerpc/pseries: Use rtas_get_sensor in RAS code

2012-03-21 Thread Anton Blanchard
We have rtas_get_sensor so we may as well use it. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/platforms/pseries/ras.c === --- linux-build.orig/arch/powerpc/platforms/pseries/ras.c 2012-03-22 12:42

[PATCH 4/6] powerpc/pseries: Remove RTAS_POWERMGM_EVENTS

2012-03-21 Thread Anton Blanchard
IBM bit 2 in the rtas event-scan and check-exception calls is marked reserved in the PAPR, so remove it from our RAS code. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/include/asm/rtas.h === --- linux

[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 --- Index: linux-build/arch/powerpc/platforms/pseries/ras.c === --- linux-build.orig

[PATCH 6/6] powerpc/pseries: Cut down on enthusiastic use of defines in RAS code

2012-03-21 Thread Anton Blanchard
So many defines for such a little file. Most of them can go. Also remove the single entry changelog, we have git for that. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/platforms/pseries/ras.c === --- linux

Re: [PATCH 05/17] pseries: Enabled the PFO-based RNG accelerator

2012-03-22 Thread Anton Blanchard
Hi, +#if defined(CONFIG_HW_RANDOM_PSERIES) || \ + defined(CONFIG_HW_RANDOM_PSERIES_MODULE) +#define OV5_PFO_HW_RNG 0x80/* PFO Random Number Generator */ +#else +#define OV5_PFO_HW_RNG 0x00 +#endif Milton tipped me off about this. We really don't want to be doing ibm,cli

[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 --- Index: linux-build/arch/powerpc/kernel/entry_64.S === --- linux-build.orig/arch/powerpc/kernel

[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 --- Index: linux-build/arch/powerpc/kernel/entry_64

[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 --- Index: linux-build/arch/powerpc/kernel/entry_64.S === --- linux-build.orig/arch/powerpc/kernel

[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 --- Index: linux-build/arch/powerpc/kernel/entry_64.S === --- linux-build.orig

[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 --- 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 suggestion of

[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 --- 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 --- Index: linux-build/arch/powerpc/include/asm/lppaca.h === --- linux-build.orig/arch/powerpc/include/asm/lppaca.h 2012-04-11 12:05

[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 --- Index: linux-build/arch/powerpc/include/asm/lppaca.h === --- linux-build.orig/arch/powerpc/include/asm/lppaca.h 2012-04-11 12:07:53.0

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 acc

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 ke

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

2012-04-15 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 --- Index: linux-build/arch/powerpc/include/asm/switch_to.h

[PATCH 2/2] powerpc: Optimise enable_kernel_altivec

2012-04-15 Thread Anton Blanchard
-i 100 completes 5.2% faster on a POWER7 PS700. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/kernel/process.c === --- linux-build.orig/arch/powerpc/kernel/process.c 2012-04-16 11:35:19.0 +1000

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

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". Ini

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

2012-04-17 Thread Anton Blanchard
-off-by: Anton Blanchard --- 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 --- Index: linux-build/arch/powerpc/Makefile === --- linux-build.orig/arch/powerpc/Makefile 2012-04-18 07:49

[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 --- Index: linux-build/arch/powerpc/Mak

[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 --- Index: linux-build/arch/powerpc/configs/g5_defconfig === --- linux

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

2012-04-17 Thread Anton Blanchard
: Anton Blanchard --- 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/pseries/eeh.c

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

2012-04-17 Thread Anton Blanchard
calls so lets remove them. Signed-off-by: Anton Blanchard --- 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/arc

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

2012-04-17 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 --- v2: Use CPU_FTR_NOEXECUTE to select the newer mtocrf Index: linux-build/arch/powerpc/configs/g5_defconfig === --- linux-build.orig/arch/powerpc

[PATCH] powerpc: Enable jump label support

2012-05-22 Thread Anton Blanchard
abled: 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 --- Index: linux-build/arch/powerpc/configs/ppc64_defc

[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 --- Index: linux-build/arch/powerpc/include/asm/trace.h === --- linux-build.orig/arch

[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 --- Interestingly, it picked up an issue with the old clear_user which

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

2012-05-29 Thread Anton Blanchard
lly: http://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 --- Index: linux-build/arch/p

[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 --- Index: linux-build/arch/powerpc/kernel/entry_64.S === --- linux-build.orig/arch/powerpc/kernel/entry_64.S 2012-05-28 18:23:33.374451416

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

2012-05-29 Thread Anton Blanchard
g it all in one go. 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 --- Index: linux-build/arch/powerpc

[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 --- Index: linux-build/arch/powerpc/lib/Makefile === --- linux

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

2012-05-29 Thread Anton Blanchard
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: Use enhanced touch instructions in POWER7 copy_to_user/copy_from_user

2012-05-30 Thread Anton Blanchard
lly: http://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 --- v2: Use cr1 in the compar

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

2012-05-30 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 --- Index: linux-build/arch

[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 --- 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 > > Would t

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

2012-06-03 Thread Anton Blanchard
quota allows it. Signed-off-by: Anton Blanchard --- 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 +1000 +++ linux

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

2012-06-03 Thread Anton Blanchard
ut 4 seconds > (or longer, depending on timebase frequency). 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 Anton > This isn't quite a straight rev

[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

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

2012-06-03 Thread Anton Blanchard
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 --- 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 --- Index: linux

[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 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 --- All patches combined improve performance by 178% Index: linux-build/arch/powerpc/kernel/iommu.c === --- linux-build.orig/arch/powerpc/kernel/iommu.c2012

[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 --- Index: linux-build/arch/powerpc

[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 --- v2: handle any cacheline size

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

2012-06-04 Thread Anton Blanchard
uest to the next power of two if the quota allows it. If this fails we fall back to using the original request size. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/platforms/pseries/msi.c === --- linux-bui

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