[PATCH] powerpc/kdump: Fix timeout in crash_kexec_wait_realmode

2011-07-05 Thread Anton Blanchard
We check for timeout expiry in the outer loop, but we also need to check it in the inner loop or we can lock up forever waiting for a CPU to hit real mode. Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org --- Index: linux-powerpc/arch/powerpc/kernel/crash.c

hvc_console change results in corrupt oops output

2011-07-04 Thread Anton Blanchard
Hi, We've been struggling to debug a hang on a large ppc64 box. Every time we collect oops output there are pieces of the oops output missing and in some cases entire CPUs are missing. Eventually I realised the hvc_console driver is dropping characters. The commit that caused this is: commit

[PATCH] powerpc: Use -mtraceback=no

2011-06-30 Thread Anton Blanchard
=no should work everywhere. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-powerpc/arch/powerpc/Makefile === --- linux-powerpc.orig/arch/powerpc/Makefile2011-07-01 09:40:57.902255472 +1000 +++ linux-powerpc/arch/powerpc

[PATCH 0/3] POWER7 optimised copy loops

2011-06-16 Thread Anton Blanchard
Here are POWER7 optimised versions of copy_page, memcpy and copy_tofrom_user. Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 1/3] powerpc: POWER7 optimised copy_page using VMX

2011-06-16 Thread Anton Blanchard
Implement a POWER7 optimised copy_page using VMX. We copy a cacheline at a time using VMX loads and stores. Signed-off-by: Anton Blanchard an...@samba.org --- How do we want to handle per machine optimised functions? I create yet another feature bit, but feature bits might get out of control

[PATCH 2/3] powerpc: POWER7 optimised memcpy using VMX

2011-06-16 Thread Anton Blanchard
VMX breakpoints, one for when we know the user VMX state is loaded into the registers and one when it isn't. This could be a second bit in the paca so we can calculate the break points quickly. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-powerpc/arch/powerpc/lib/Makefile

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

2011-06-16 Thread Anton Blanchard
when it isn't. This could be a second bit in the paca so we can calculate the break points quickly. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-powerpc/arch/powerpc/lib/copyuser_64.S === --- linux-powerpc.orig

Re: [PATCH 1/3] powerpc: POWER7 optimised copy_page using VMX

2011-06-16 Thread Anton Blanchard
Hi, Yeah, I'm pretty against CPU_FTR_POWER7. Every loon is going to attach anything POWER7 to it. I'm keen to see it setup in __setup_cpu_power7. Either a function pointer or use the patch_instruction infrastructure to avoid indirect function calls on small copies. Instruction

[PATCH] powerpc/pseries: Enable iSCSI support for a number of cards

2011-05-12 Thread Anton Blanchard
Enable iSCSI support for a number of cards. We had the base networking devices enabled but forgot to enable iSCSI. Signed-off-by: Anton Blanchard an...@samba.org --- v2: I added the bnx2 iscsi twice. Index: junk/arch/powerpc/configs/pseries_defconfig

[PATCH] powerpc: Print corrupt r3 in FWNMI code

2011-05-10 Thread Anton Blanchard
I have a report of an FWNMI with an r3 value that we think is corrupt, but since we don't print r3 we have no idea what was wrong with it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-net/arch/powerpc/platforms/pseries/ras.c

[PATCH] powerpc: Simplify 4k/64k copy_page logic

2011-05-09 Thread Anton Blanchard
To make it easier to add optimised versions of copy_page, remove the 4kB loop for 64kB pages and just do all the work in copy_page. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-powerpc/arch/powerpc/include/asm/page_64.h

[PATCH] powerpc: Remove static branch hint in giveup_altivec

2011-05-09 Thread Anton Blanchard
A static branch hint will override dynamic branch prediction on recent POWER CPUs. Since we are about to use more altivec in the kernel remove the static hint in giveup_altivec that assumes a userspace task is using altivec. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux

[PATCH] powerpc: Improve scheduling of system call entry instructions

2011-05-09 Thread Anton Blanchard
cycles sd = 0.138 modified: mean = 404.1 cycles sd = 0.109 So we have 1.77% improvement on POWER7 which looks significant. The POWER6 suggest a 0.25% slowdown, but the results are within 1 standard deviation and may be in the noise. Signed-off-by: Anton Blanchard an...@samba.org

[PATCH 1/2] powerpc: Add ioremap_wc

2011-05-09 Thread Anton Blanchard
Add ioremap_wc so drivers can request write combining on kernel mappings. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-powerpc/arch/powerpc/include/asm/io.h === --- linux-powerpc.orig/arch/powerpc/include/asm

[PATCH 2/2] powerpc: Remove ioremap_flags

2011-05-09 Thread Anton Blanchard
We have a confusing number of ioremap functions. Make things just a bit simpler by merging ioremap_flags and ioremap_prot. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-powerpc/arch/powerpc/include/asm/io.h

[PATCH] powerpc/pseries: Enable Emulex and Qlogic 10Gbit cards

2011-05-08 Thread Anton Blanchard
Enable the Qlogic and Emulex 10Gbit adapters. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-powerpc/arch/powerpc/configs/pseries_defconfig === --- linux-powerpc.orig/arch/powerpc/configs/pseries_defconfig 2011

[PATCH] powerpc/pseries: Enable iSCSI support for a number of cards

2011-05-08 Thread Anton Blanchard
Enable iSCSI support for a number of cards. We had the base networking devices enabled but forgot to enable iSCSI. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-powerpc/arch/powerpc/configs/pseries_defconfig

[PATCH] powerpc: Add Initiate Coprocessor Store Word (icswx) support

2011-05-03 Thread Anton Blanchard
...@linux.vnet.ibm.com Signed-off-by: Tseng-Hui (Frank) Lin th...@linux.vnet.ibm.com Signed-off-by: Anton Blanchard an...@samba.org --- Changes: - Go back to dynamically allocating the spinlock to avoid the mmu_context.h and spinlock_types.h include mess. Index: linux-powerpc/arch/powerpc/include/asm

Re: [PATCH] powerpc: Add Initiate Coprocessor Store Word (icswx) support

2011-05-03 Thread Anton Blanchard
Hi Ben, My only comment (sorry Anton :-) would have been that we could lazily allocate the spinlock on the first use_cop() ... or do we have that potentially called in the wrong context ? I worry what might happen in a threaded app. It would be a strange thing to do, but the program may call

[PATCH] powerpc: Add Initiate Coprocessor Store Word (icswx) support

2011-04-17 Thread Anton Blanchard
...@linux.vnet.ibm.com Signed-off-by: Tseng-Hui (Frank) Lin th...@linux.vnet.ibm.com Signed-off-by: Anton Blanchard an...@samba.org --- Changes: - By including linux/spinlock_types.h we can remove the dynamic allocation of the spinlock hack and simplify things a lot. - We had a nasty bug with threaded

[PATCH] powerpc: Fix oops if scan_dispatch_log is called too early

2011-04-08 Thread Anton Blanchard
.irq_enter+0x88/0xc0 .do_IRQ+0x48/0x230 The patch below adds a check to scan_dispatch_log to ensure the dispatch log has been allocated. Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org --- Index: powerpc.git/arch/powerpc/kernel/time.c

[PATCH] rtas: Only sleep in rtas_busy_delay if we have useful work to do

2011-04-07 Thread Anton Blanchard
definitely be decreased, but even if we slept 1ms each iteration this would take 32s. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-2.6/arch/powerpc/kernel/rtas.c === --- linux-2.6.orig/arch/powerpc/kernel/rtas.c 2011

[PATCH] powerpc: Replace open coded instruction patching with patch_instruction/patch_branch

2011-04-05 Thread Anton Blanchard
There are a few places we patch instructions without using patch_instruction and patch_branch, probably because they predated it. Fix it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/mm/hash_utils_64.c

[PATCH] powerpc: Add Initiate Coprocessor Store Word (icswx) support

2011-03-28 Thread Anton Blanchard
...@linux.vnet.ibm.com Signed-off-by: Tseng-Hui (Frank) Lin th...@linux.vnet.ibm.com Signed-off-by: Anton Blanchard an...@samba.org --- - Changed CONFIG_ICSWX to CONFIG_PPC_ICSWX Index: powerpc.git/arch/powerpc/include/asm/cputable.h

[PATCH] powerpc: Add Initiate Coprocessor Store Word (icswx) support

2011-03-25 Thread Anton Blanchard
...@linux.vnet.ibm.com Signed-off-by: Tseng-Hui (Frank) Lin th...@linux.vnet.ibm.com Signed-off-by: Anton Blanchard an...@samba.org --- This is the v4 patch with a few changes: - Remove the lazy option. If we see overhead in the context switch path we can add it back in once we have the basic patch working

[PATCH] powerpc: Fix accounting of softirq time when idle

2011-03-20 Thread Anton Blanchard
%id, 0.0%wa, 13.3%hi, 81.3%si, 0.0%st Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org --- Index: linux-2.6/arch/powerpc/kernel/time.c === --- linux-2.6.orig/arch/powerpc/kernel/time.c 2011-03-21 12:05

Re: [PATCH 1/2] kdump: Allow shrinking of kdump region to be overridden

2011-03-09 Thread Anton Blanchard
Hi, The crashkernel region is specified via kernel cmdline, so why not just drop a failure when it overlaps with RMO region? Am I missing something? Unfortunately a ppc64 kernel requires a chunk of RMO memory. We would need the ability to specify multiple crashkernel regions - about 32MB in

[PATCH] powerpc: perf: Handle events that raise an exception without overflowing

2011-03-08 Thread Anton Blanchard
-by: Anton Blanchard an...@samba.org Cc: sta...@kernel.org --- I would prefer not to add the PVR check, but I think we want to limit this workaround to POWER7. Would a cpu feature be preferable? Index: linux-2.6/arch/powerpc/kernel/perf_event.c

[PATCH] powerpc/pseries: Enable Chelsio network and iWARP drivers

2011-03-05 Thread Anton Blanchard
Ensure the Chelsio T3/T4 network drivers and iWARP drivers are enabled in the pseries config. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-2.6/arch/powerpc/configs/pseries_defconfig === --- linux-2.6.orig/arch

[PATCH] powerpc: Add pgprot_writecombine

2011-02-28 Thread Anton Blanchard
A number of drivers are using pgprot_writecombine() to enable write combining on userspace mappings. Implement it on powerpc. Signed-off-by: Anton Blanchard an...@samba.org --- diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 89f1587..88b0bd9 100644

Re: mpc85xx: kexec build broken by powerpc/kexec: Remove ppc_md.machine_kexec

2011-02-23 Thread Anton Blanchard
Hi Kyle, As far as I can tell, machine_kexec was removed in commit c9486878 (powerpc/kexec: Remove ppc_md.machine_kexec) on Jan 6th, 2011, which claims that it was not used. Unfortunately it looks like it *is* used by the mpc85xx kexec() support (commit f933a41e), added on Jul 21, 2010.

powerpc/kexec: Restore ppc_md.machine_kexec

2011-02-23 Thread Anton Blanchard
Kyle Moffett points out that mpc85xx has started using the ppc_md.machine_kexec hook. As such, revert patch c94868788cf2 (powerpc/kexec: Remove ppc_md.machine_kexec). Signed-off-by: Anton Blanchard an...@samba.org --- diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm

Re: [PATCH 21/23] hvc_console: Fix race between hvc_close and hvc_remove

2011-02-07 Thread Anton Blanchard
and the following patch must be applied to fix it. Anton -- commit 320718ee074acce5ffced6506cb51af1388942aa Author: Anton Blanchard an...@samba.org Date: Tue Apr 6 21:42:38 2010 +1000 hvc_console: Fix race between hvc_close and hvc_remove I don't claim to understand the tty layer

Re: 2.6.37-git17 virtual IO boot failure

2011-01-29 Thread Anton Blanchard
Hi, FWIW, I looked at Anton's logs, and I don't think the boot failed, per se. I think it may have timed out (but not positive on that). I was able to boot 2.6.27-git17 on the exact same box, albeit it locks up at a later point (the sd abort I e-mailed about in a follow-up). This fail

[PATCH 7/8] powerpc/kdump: Move crash_kexec_stop_spus to kdump crash handler

2011-01-20 Thread Anton Blanchard
And here's a version that actually compiles. Sorry Ben :) Anton -- Use the crash handler hooks to run the SPU stop code, just like we do for ehea and cell RAS code. While I'm here I noticed CPUSs reliabally so fix the spelling MISTAKESs reliabally. Signed-off-by: Anton Blanchard

[PATCH] powerpc: perf: Fix frequency calculation for overflowing counters (FSL version)

2011-01-18 Thread Anton Blanchard
calculations in perf go haywire and we continually throttle/unthrottle the PMU. Signed-off-by: Anton Blanchard an...@samba.org --- This is only compile tested. Index: powerpc.git/arch/powerpc/kernel/perf_event_fsl_emb.c

2.6.37-git17 virtual IO boot failure

2011-01-17 Thread Anton Blanchard
Hi, I was testing 2.6.37-git17 on a POWER7 with virtual IO and hit this: Trying to unpack rootfs image as initramfs... Freeing initrd memory: 7446k freed vio 3000: Warning: IOMMU dma not supported: mask 0x, table unavailable vio 4000: Warning: IOMMU dma not supported: mask

[PATCH] powerpc: perf: Fix frequency calculation for overflowing counters

2011-01-16 Thread Anton Blanchard
patch we find the correct period after a few interrupts and stay there. I also see no more throttle events. Signed-off-by: Anton Blanchard an...@samba.org --- diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c index 5674807..ab6f6be 100644 --- a/arch/powerpc/kernel

[PATCH 1/2] powerpc: Disable mcount tracers in pseries config

2011-01-12 Thread Anton Blanchard
IRQSOFF_TRACER and STACK_TRACER force the kernel to be built with -pg which is a substantial overhead. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/configs/pseries_defconfig

[PATCH 2/2] powerpc: Enable 64kB pages and 1024 threads in pseries config

2011-01-12 Thread Anton Blanchard
- Enable 64kB pages so it gets some regular testing. - The largest POWER7 has 1024 threads so bump NR_CPUS it to match. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/configs/pseries_defconfig

[PATCH 0/9] Machine check handling fixes

2011-01-11 Thread Anton Blanchard
Here are a number of fixes to our machine check handling, found when testing our memory uncorrectable error handling. Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 1/9] powerpc: Print 32 bits of DSISR in show_regs

2011-01-11 Thread Anton Blanchard
We were printing 64 bits of DSISR in show_regs even though it is 32 bit. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/process.c === --- powerpc.git.orig/arch/powerpc/kernel/process.c

[PATCH 2/9] powerpc: Don't force MSR_RI in machine_check_exception

2011-01-11 Thread Anton Blanchard
We should never force MSR_RI on. If we take a machine check with MSR_RI off then we have no chance of recovering safely. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/traps.c

[PATCH 3/9] powerpc: Never halt RTAS error logging after receiving an unrecoverable machine check

2011-01-11 Thread Anton Blanchard
machine check handler. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/platforms/pseries/ras.c === --- powerpc.git.orig/arch/powerpc/platforms/pseries/ras.c 2010-09-27 21:19:32.805480948 +1000

[PATCH 4/9] powerpc: Remove duplicate debugger hook in machine_check_exception

2011-01-11 Thread Anton Blanchard
We are calling debugger_fault_handler twice in machine_check_exception. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/traps.c === --- powerpc.git.orig/arch/powerpc/kernel/traps.c

[PATCH 5/9] powerpc: Don't silently handle machine checks from userspace

2011-01-11 Thread Anton Blanchard
, potentially causing a lot of confusion. Signed-off-by: Anton Blanchard an...@samba.org --- I seem to remember this might be here for X on 32bit. If necessary I can wrap it in an ifdef CONFIG_PPC32. Index: powerpc.git/arch/powerpc/kernel/traps.c

[PATCH 6/9] powerpc: Rework pseries machine check handler

2011-01-11 Thread Anton Blanchard
receiving a synchronous machine check. Recent versions of the pseries firmware do not fill them in during a machine check and instead send a follow up error log with the detailed information. If we see a synchronous machine check, and we came from userspace then kill the task. Signed-off-by: Anton

[PATCH 7/9] powerpc: Fix corruption when grabbing FWNMI data

2011-01-11 Thread Anton Blanchard
do receive an extended RTAS log then we fall back to the old behaviour of using the global buffer. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/platforms/pseries/ras.c === --- powerpc.git.orig/arch

[PATCH 8/9] powerpc: Check RTAS extended log flag before checking length

2011-01-11 Thread Anton Blanchard
The spec suggests we should first check the extended log flag before checking the length field. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/rtasd.c === --- powerpc.git.orig/arch

[PATCH 9/9] powerpc: machine_check_generic is wrong on 64bit

2011-01-11 Thread Anton Blanchard
remove machine_check_generic from 64bit archs. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/cputable.c === --- powerpc.git.orig/arch/powerpc/kernel/cputable.c 2011-01-07 12:50

[PATCH 0/8]: Some kexec/kdump cleanups

2011-01-06 Thread Anton Blanchard
Hi, These patches have been sitting around in my tree for a while. Back when I was trying to understand the twisty maze of powerpc kexec/kdump I did a number of cleanups. Here they are. Anton ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

[PATCH 1/8] powerpc: Move all ppc_md kexec function pointers together

2011-01-06 Thread Anton Blanchard
Move all the kexec handlers together. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/machdep.h === --- powerpc.git.orig/arch/powerpc/include/asm/machdep.h 2011-01-07 12:50

[PATCH 2/8] powerpc/kexec: Remove ppc_md.machine_kexec_cleanup

2011-01-06 Thread Anton Blanchard
No one uses ppc_md.machine_kexec_cleanup, so remove it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/machdep.h === --- powerpc.git.orig/arch/powerpc/include/asm/machdep.h 2011-01-07

[PATCH 3/8] powerpc/kexec: Remove ppc_md.machine_kexec

2011-01-06 Thread Anton Blanchard
No one uses ppc_md.machine_kexec, so remove it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/machdep.h === --- powerpc.git.orig/arch/powerpc/include/asm/machdep.h 2011-01-07 12:51

[PATCH 4/8] powerpc/kdump: Remove ppc_md.machine_crash_shutdown

2011-01-06 Thread Anton Blanchard
No one uses ppc_md.machine_crash_shutdown, so remove it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/machdep.h === --- powerpc.git.orig/arch/powerpc/include/asm/machdep.h 2011-01

[PATCH 5/8] powerpc/kexec: Don't initialise kexec hooks to default handlers

2011-01-06 Thread Anton Blanchard
There's no need to initialise ppc_md.machine_kexec and ppc_md.machine_kexec_prepare to the default handlers. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/platforms/cell/qpace_setup.c

[PATCH 6/8] powerpc/kexec: Remove empty ppc_md.machine_kexec_prepare

2011-01-06 Thread Anton Blanchard
We check for a valid handler before calling ppc_md.machine_kexec_prepare so we can just remove these empty handlers. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/platforms/embedded6xx/wii.c

[PATCH 7/8] powerpc/kdump: Move crash_kexec_stop_spus to kdump crash handler

2011-01-06 Thread Anton Blanchard
Use the crash handler hooks to run the SPU stop code, just like we do for ehea and cell RAS code. While I'm here I noticed CPUSs reliabally so fix the spelling MISTAKESs reliabally. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/crash.c

[PATCH 8/8] powerpc/kdump: Disable ftrace during kexec

2011-01-06 Thread Anton Blanchard
CONFIG_KEXEC_JUMP), add the restore code in case we do one day. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/machine_kexec.c === --- powerpc.git.orig/arch/powerpc/kernel/machine_kexec.c

[PATCH] powerpc: Fix incorrect comment about interrupt stack allocation

2010-12-08 Thread Anton Blanchard
We now allow interrupt stacks anywhere in the first segment which can be 256M or 1TB. Fix the comment. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/setup_64.c === --- powerpc.git.orig

[PATCH] powerpc: iommu: Add device name to iommu error printks

2010-12-07 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/iommu.c === --- powerpc.git.orig/arch/powerpc/kernel/iommu.c2010-12-08 11:28:39.055483332 +1100 +++ powerpc.git/arch/powerpc/kernel

[PATCH] powerpc: Hardcode popcnt instructions for old assemblers

2010-12-07 Thread Anton Blanchard
The popcnt instructions went into binutils relatively recently. As with a number of other instructions, create macros and hardcode them. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/ppc-opcode.h

[PATCH] powerpc: Per process DSCR

2010-11-16 Thread Anton Blanchard
and avoid the SPR write. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/emulated_ops.h === --- powerpc.git.orig/arch/powerpc/include/asm/emulated_ops.h2010-10-26 08:27:15.241519117 +1100

Re: Problem with Infiniband adapter on IBM p550

2010-11-03 Thread Anton Blanchard
Hi, Now, I think this is the problem. The assigned-addresses property seems to indicate that the firmware only assigned BAR 4 and didn't assign anything to the other ones. I don't know why, but it definitely looks like a firmware bug to me. On those machines, PCI resource

[PATCH] powerpc: Fix hcall tracepoint recursion

2010-10-21 Thread Anton Blanchard
H_YIELD to notify the hypervisor we are waiting on another virtual CPU. Unfortunately this means the hcall tracepoints can recurse. The patch below adds a percpu depth and checks it on both the entry and exit hcall tracepoints. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git

Re: [PATCH 0/8] v5 De-couple sysfs memory directories from memory sections

2010-08-31 Thread Anton Blanchard
can easily determine the memory section range of a directory. I tested this on a POWER7 with 2TB memory and the boot time improved from greater than 6 hours (I gave up), to under 5 minutes. Nice! Tested-by: Anton Blanchard an...@samba.org Anton

[PATCH] powerpc: Check end of stack canary at oops time

2010-08-24 Thread Anton Blanchard
-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/mm/fault.c === --- powerpc.git.orig/arch/powerpc/mm/fault.c2010-08-25 08:41:08.230086186 +1000 +++ powerpc.git/arch/powerpc/mm/fault.c 2010-08-25 09:12

[PATCH 2/2] powerpc: kdump: Override crash_free_reserved_phys_range to avoid freeing RTAS

2010-08-24 Thread Anton Blanchard
-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/crash_dump.c === --- powerpc.git.orig/arch/powerpc/kernel/crash_dump.c 2010-08-24 09:24:32.219643256 +1000 +++ powerpc.git/arch/powerpc/kernel

[PATCH 1/2] kdump: Allow shrinking of kdump region to be overridden

2010-08-24 Thread Anton Blanchard
it a weak function so we can override it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/kernel/kexec.c === --- powerpc.git.orig/kernel/kexec.c 2010-08-25 10:12:11.493863566 +1000 +++ powerpc.git/kernel/kexec.c

Re: [PATCH] powerpc: Check end of stack canary at oops time

2010-08-24 Thread Anton Blanchard
Hi, The check for init is just because we haven't set the magic value for init's stack right? But we could. Yeah, it's similar to what x86 are doing now: commit 0e7810be30f66e9f430c4ce2cd3b14634211690f Author: Jan Beulich jbeul...@novell.com Date: Fri Nov 20 14:00:14 2009 + x86:

[PATCH] powerpc: Add support for popcnt instructions

2010-08-12 Thread Anton Blanchard
box. The patch improves that testcase by about 8%. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/cputable.h === --- powerpc.git.orig/arch/powerpc/include/asm/cputable.h2010-08-13

Re: [PATCH] powerpc: Add support for popcnt instructions

2010-08-12 Thread Anton Blanchard
Hi, Especially from modules it will suck big time. If kept out of line they should probably be linked-in with each module, but I'd rather have them inlined. Inlining would be good, but this is as far as I can take this for now. If someone else is interested go for it :) Anton

Re: [PATCH] powerpc: Feature nop out reservation clear when stcx checks address

2010-08-11 Thread Anton Blanchard
. This was almost as fast as removing the larx on POWER6, but only 3.5% faster on POWER7. We can use this to speed up the reservation clear in our exception exit code. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/entry_64.S

[PATCH] powerpc: Fix bogus it_blocksize in VIO iommu code

2010-08-11 Thread Anton Blanchard
to, was c000fe903b20. Completely bogus. Initialise it to something reasonable in the VIO IOMMU code, and use kzalloc everywhere to protect against this when we next add a non compulsary field to iommu code and forget to initialise it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git

[PATCH] powerpc: Feature nop out reservation clear when stcx checks address

2010-08-10 Thread Anton Blanchard
CONFIG_STACK_TRACER=n to remove the overhead of virtual CPU accounting, syscall auditing and the ftrace mcount tracers. 64kB pages were enabled to minimise TLB misses. POWER6: +8.2% POWER7: +7.0% Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/cputable.h

Re: [PATCH] powerpc: inline ppc64_runlatch_off

2010-08-06 Thread Anton Blanchard
Hi Ben, I'm sick of seeing ppc64_runlatch_off in our profiles, so inline the heavily used part of it into the callers. To avoid a mess of circular includes I didn't add it as an inline function. Considering that it's just an asm instruction or two, should we make it inline asm and have

Re: [PATCH] powerpc: inline ppc64_runlatch_off

2010-08-06 Thread Anton Blanchard
Hi, remind me why we need to do that runlatch thing on these CPUs at all ? The PMU uses it so events can be constructed that count only non idle cycles. I think the power management hardware on POWER6 and POWER7 also use the runlatch state to determine how busy a CPU is. Anton

Re: [PATCH] powerpc: inline ppc64_runlatch_off

2010-08-06 Thread Anton Blanchard
Hi Olof, No semicolon here. Nice catch! Anton I'm sick of seeing ppc64_runlatch_off in our profiles, so inline it into the callers. To avoid a mess of circular includes I didn't add it as an inline function. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch

[PATCH] powerpc: inline ppc64_runlatch_off

2010-08-05 Thread Anton Blanchard
I'm sick of seeing ppc64_runlatch_off in our profiles, so inline the heavily used part of it into the callers. To avoid a mess of circular includes I didn't add it as an inline function. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/reg.h

[PATCH 2/3] powerpc: Optimise 64bit csum_partial_copy_generic and add csum_and_copy_from_user

2010-08-03 Thread Anton Blanchard
the benchmark from being cache bandwidth limited to cpu limited), adding this patch improved performance by 55% Signed-off-by: Anton Blanchard an...@samba.org -- Index: powerpc.git/arch/powerpc/lib/checksum_64.S === --- powerpc.git.orig

[PATCH 3/3] powerpc: Add 64bit csum_and_copy_to_user

2010-08-03 Thread Anton Blanchard
This adds the equivalent of csum_and_copy_from_user for the receive side so we can copy and checksum in one pass. It is modelled on the generic checksum routine. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/checksum.h

[PATCH] powerpc/mm: Fix vsid_scrample typo

2010-08-03 Thread Anton Blanchard
The code is wrapped in an #if 0, but it's wrong so we may as well fix it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-2.6/arch/powerpc/include/asm/mmu-hash64.h === --- linux-2.6.orig/arch/powerpc/include/asm/mmu

[PATCH] powerpc/kdump: Stop all other CPUs before running crash handlers

2010-08-03 Thread Anton Blanchard
During kdump we run the crash handlers first then stop all other CPUs. We really want to stop all CPUs as close to the fail as possible and also have a very controlled environment for running the crash handlers, so it makes sense to reverse the order. Signed-off-by: Anton Blanchard

Re: [PATCH 1/3] powerpc: Optimise 64bit csum_partial

2010-08-03 Thread Anton Blanchard
Hi Segher, Not really. Do you know how many 16/32-bit words you can add before a 64-bit register can overflow? :-) Thats a very good point. I thought about using 32bit adds when writing the copy and checksum routine, but came to the conclusion that it wouldn't go any faster than one using

[PATCH] powerpc/mm: Handle hypervisor pte insert failure in __hash_page_huge

2010-07-14 Thread Anton Blanchard
-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/mm/hugetlbpage-hash64.c === --- powerpc.git.orig/arch/powerpc/mm/hugetlbpage-hash64.c 2010-07-15 15:24:19.520742137 +1000 +++ powerpc.git/arch/powerpc/mm

[PATCH] powerpc: Linux cannot run with 0 cores

2010-06-17 Thread Anton Blanchard
handle not only the CONFIG_SMP=n case but also the case where NR_CPUS isn't a multiple of the number of SMT threads. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-2.6/arch/powerpc/kernel/prom_init.c === --- linux

Re: [PATCH] powerpc: rtas_flash cannot be a module

2010-06-12 Thread Anton Blanchard
Hi, So we should use that rtas_data_buf with its lock ... Oh look, the driver already uses that buffer for the call to verify_flash untested patch to follow Thanks, it built and tested OK with the following patch. Will send a complete patch with these changes in a minute. Anton ---

Re: [PATCH] powerpc: rtas_flash needs to use rtas_data_buf

2010-06-12 Thread Anton Blanchard
-By: Anton Blanchard an...@samba.org Signed-Off-By: Milton Miller milt...@bga.com Tested-By: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/rtas_flash.c === --- powerpc.git.orig/arch/powerpc/kernel/rtas_flash.c

[PATCH] powerpc: rtas_flash cannot be a module

2010-06-09 Thread Anton Blanchard
not be in the kernel data and could be above 4GB. Change RTAS_FLASH to a bool. If we are worried about kernel footprint we could move the problem variables out of the module and export them. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux-2.6/arch/powerpc/platforms/Kconfig

Re: [PATCH] powerpc: Disable CONFIG_SYSFS_DEPRECATED

2010-06-07 Thread Anton Blanchard
Hi Josh, Yes actually. I've tested on a few boards and it seems to be working well enough. My apologies for not replying sooner. Acked-by: Josh Boyer jwbo...@linux.vnet.ibm.com Thanks for testing! Anton ___ Linuxppc-dev mailing list

[PATCH] powerpc: Move kdump default base address to 64MB on 64bit

2010-06-07 Thread Anton Blanchard
of our RMO, so if we were to go any higher we risk not having enough RMO memory for the kdump kernel on boxes with a 128MB RMO. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/kdump.h

Re: [PATCH] powerpc: Disable CONFIG_SYSFS_DEPRECATED

2010-06-06 Thread Anton Blanchard
Hi Josh, I'd like to run a few tests with this disabled on the 4xx boards first please. I can't say that all the boards I have will have any sort of distro to begin with, and if they did they might not be running something from the last 3 or 4 years. I do run -git kernels on them frequently

[PATCH] [SCSI] ipr: Fix stack overflow in ipr_format_resource_path

2010-06-02 Thread Anton Blanchard
in the first place. That can be fixed in a follow up patch. Signed-off-by: Anton Blanchard an...@samba.org --- Index: linux.trees.git/drivers/scsi/ipr.c === --- linux.trees.git.orig/drivers/scsi/ipr.c 2010-05-31 08:51:20.0

[PATCH] powerpc: Optimise per cpu accesses on 64bit

2010-05-31 Thread Anton Blanchard
cacheline. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/percpu.h === --- powerpc.git.orig/arch/powerpc/include/asm/percpu.h 2010-06-01 11:10:16.225954322 +1000 +++ powerpc.git/arch/powerpc

[PATCH 1/2] powerpc: Remove ibm,smt-snooze-delay OF property

2010-05-17 Thread Anton Blanchard
I'm not sure why we have code for parsing an ibm,smt-snooze-delay OF property. Since we have a smt-snooze-delay= boot option and we can also set it at runtime via sysfs, it should be safe to get rid of this code. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc

[PATCH 2/2] powerpc: Use smt_snooze_delay=-1 to always busy loop

2010-05-17 Thread Anton Blanchard
(eg ppc64_cpu), but I'm cc-ing Nathan just to be sure. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/kernel/sysfs.c === --- powerpc.git.orig/arch/powerpc/kernel/sysfs.c2010-05-17 15:18

[PATCH 2/3] powerpc: numa: Use ibm,architecture-vec-5 to detect form 1 affinity

2010-05-17 Thread Anton Blanchard
FW_FEATURE_* bits. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/mm/numa.c === --- powerpc.git.orig/arch/powerpc/mm/numa.c 2010-05-17 12:56:02.0 +1000 +++ powerpc.git/arch/powerpc/mm/numa.c

[PATCH 3/3] powerpc: numa: Use form 1 affinity to setup node distance

2010-05-17 Thread Anton Blanchard
boot it didn't seem worth adding a per node valid bit. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/mm/numa.c === --- powerpc.git.orig/arch/powerpc/mm/numa.c 2010-05-17 15:01:40.345954329

[PATCH 1/3] powerpc: numa: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim

2010-05-17 Thread Anton Blanchard
. The patch below sets a smaller value for RECLAIM_DISTANCE and thus enables zone reclaim. Signed-off-by: Anton Blanchard an...@samba.org --- Index: powerpc.git/arch/powerpc/include/asm/topology.h === --- powerpc.git.orig/arch/powerpc

[PATCH 2/3] powerpc: numa: Use ibm,architecture-vec-5 to detect form 1 affinity

2010-05-17 Thread Anton Blanchard
FW_FEATURE_* bits. Signed-off-by: Anton Blanchard an...@samba.org --- v2: I said fifth byte of the ibm,client-architecture when I should have said fifth vector of the ibm,client-architecture Index: powerpc.git/arch/powerpc/mm/numa.c

<    5   6   7   8   9   10   11   12   >