[PATCH] powerpc: Fix null pointer deref in perf hardware breakpoints

2012-08-22 Thread Michael Neuling
Currently if you are doing a global perf recording with hardware breakpoints (ie perf record -e mem:0xdeadbeef -a), you can oops with: Faulting instruction address: 0xc0738890 cpu 0xc: Vector: 300 (Data Access) at [c003f76af8d0] pc: c0738890: .hw_breakpoint_handler+0x

Re: [PATCH v4 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Ananth N Mavinakayanahalli
On Thu, Aug 23, 2012 at 02:28:20PM +1000, Michael Ellerman wrote: > On Wed, 2012-08-22 at 13:57 +0530, Ananth N Mavinakayanahalli wrote: > > From: Ananth N Mavinakayanahalli > > > > This is the port of uprobes to powerpc. Usage is similar to x86. > > Hi Ananth, > > Excuse my ignorance of uprobe

Re: [PATCH v4 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Srikar Dronamraju
> > These seem to be duplicated in kprobes.h, can we consolidate them. > > > +struct arch_uprobe { > > + u8 insn[MAX_UINSN_BYTES]; > > +}; > > Why not uprobe_opcode_t insn ? > insn is updated/accessed in the arch independent code. Size of uprobe_opcode_t could be different for different

Re: [PATCH v4 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Michael Ellerman
On Wed, 2012-08-22 at 13:57 +0530, Ananth N Mavinakayanahalli wrote: > From: Ananth N Mavinakayanahalli > > This is the port of uprobes to powerpc. Usage is similar to x86. Hi Ananth, Excuse my ignorance of uprobes, some comments inline ... > [root@ ~]# ./bin/perf probe -x /lib64/libc.so.

[PATCH] QE USB host fix for mpc832x

2012-08-22 Thread Ben Dubb
This patch should be used to get QE USB host mode working on mpc832x and mpc8360 based devices. It fixes the following issues: - BRG divisor shall not be an add number greater than 3. - USB param block in multi-user ram can't be accessed at default location on mpc832x device. Allocate it dynamic

Re: [v2][PATCH 3/3] powerpc/kgdb: restore current_thread_info properly

2012-08-22 Thread tiejun.chen
On 08/23/2012 11:14 AM, Nicholas A. Bellinger wrote: > On Thu, 2012-08-23 at 10:10 +0800, Tiejun Chen wrote: >> For powerpc BooKE and e200, singlestep is handled on the critical/dbg >> exception stack. This causes current_thread_info() to fail for kgdb >> internal, so previously We work around this

Re: [v2][PATCH 3/3] powerpc/kgdb: restore current_thread_info properly

2012-08-22 Thread Nicholas A. Bellinger
On Thu, 2012-08-23 at 10:10 +0800, Tiejun Chen wrote: > For powerpc BooKE and e200, singlestep is handled on the critical/dbg > exception stack. This causes current_thread_info() to fail for kgdb > internal, so previously We work around this issue by copying > the thread_info from the kernel stack

[v2][PATCH 3/3] powerpc/kgdb: restore current_thread_info properly

2012-08-22 Thread Tiejun Chen
For powerpc BooKE and e200, singlestep is handled on the critical/dbg exception stack. This causes current_thread_info() to fail for kgdb internal, so previously We work around this issue by copying the thread_info from the kernel stack before calling kgdb_handle_exception, and copying it back afte

[v2][PATCH 1/3] kgdb,ppc: do not set kgdb_single_step on ppc

2012-08-22 Thread Tiejun Chen
The kgdb_single_step flag has the possibility to indefinitely hang the system on an SMP system. The x86 arch have the same problem, and that problem was fixed by commit 8097551d9ab9b9e3630(kgdb,x86: do not set kgdb_single_step on x86). This patch does the same behaviors as x86's patch. Signed-off

[v2][PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered

2012-08-22 Thread Tiejun Chen
We need to skip a breakpoint exception when it occurs after a breakpoint has already been removed. Signed-off-by: Tiejun Chen --- v2: simply kgdb_skipexception() return path. arch/powerpc/kernel/kgdb.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch

Re: [PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered

2012-08-22 Thread tiejun.chen
On 08/22/2012 11:07 PM, Tabi Timur-B04825 wrote: > On Wed, Aug 22, 2012 at 5:43 AM, Tiejun Chen > wrote: > >> +int kgdb_skipexception(int exception, struct pt_regs *regs) >> +{ >> + if (kgdb_isremovedbreak(regs->nip)) >> + return 1; >> + >> + return 0; >> +} > > int kg

[PATCH] powerpc/mpic_msgr: add missing includes

2012-08-22 Thread Scott Wood
Add several #includes that mpic_msgr relies on being pulled implicitly, which only happens on certain configs. Signed-off-by: Scott Wood Cc: Meador Inge Cc: Jia Hongtao --- arch/powerpc/include/asm/mpic_msgr.h |1 + arch/powerpc/sysdev/mpic_msgr.c |3 +++ 2 files changed, 4 insert

Re: [PATCH V3 1/3] drivers/char/tpm: Add new device driver to support IBM vTPM

2012-08-22 Thread Kent Yoder
On Wed, Aug 22, 2012 at 04:17:43PM -0500, Ashley Lai wrote: > This patch adds a new device driver to support IBM virtual TPM > (vTPM) for PPC64. IBM vTPM is supported through the adjunct > partition with firmware release 740 or higher. With vTPM > support, each lpar is able to have its own vTPM w

[PATCH V3 1/3] drivers/char/tpm: Add new device driver to support IBM vTPM

2012-08-22 Thread Ashley Lai
This patch adds a new device driver to support IBM virtual TPM (vTPM) for PPC64. IBM vTPM is supported through the adjunct partition with firmware release 740 or higher. With vTPM support, each lpar is able to have its own vTPM without the physical TPM hardware. This driver provides TPM function

[PATCH 2/2 v2] powerpc/fsl: fix "Failed to mount /dev: No such device" errors

2012-08-22 Thread Kim Phillips
Yocto (Built by Poky 7.0) 1.2 root filesystems fail to boot, at least over nfs, with: Failed to mount /dev: No such device Configuring DEVTMPFS fixes it. Signed-off-by: Kim Phillips --- v2: separated savedefconfig updates, rebased on merge branch arch/powerpc/configs/85xx/p1023rds_defconfig |

[PATCH 1/2] powerpc/fsl: update defconfigs

2012-08-22 Thread Kim Phillips
run make savedefconfig on fsl defconfigs. Signed-off-by: Kim Phillips --- arch/powerpc/configs/85xx/p1023rds_defconfig | 30 --- arch/powerpc/configs/corenet32_smp_defconfig | 28 +++-- arch/powerpc/configs/mpc83xx_defconfig | 17 ---

Re: [PATCH v4 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Oleg Nesterov
On 08/22, Ananth N Mavinakayanahalli wrote: > > +int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct > *mm, unsigned long addr) > +{ > + unsigned int insn; > + > + if (addr & 0x03) > + return -EINVAL; > + > + memcpy(&insn, auprobe->insn, MAX_UINSN_BYT

Re: [PATCH] DMA/RaidEngine: Enable FSL RaidEngine

2012-08-22 Thread Kumar Gala
On Aug 22, 2012, at 1:24 AM, wrote: > From: Xuelin Shi > > The RaidEngine is a new FSL hardware that used as hardware acceration > for RAID5/6. > > This patch enables the RaidEngine functionality and provides hardware > offloading capability for memcpy, xor and raid6 pq computation. It work

Re: [PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered

2012-08-22 Thread Tabi Timur-B04825
On Wed, Aug 22, 2012 at 5:43 AM, Tiejun Chen wrote: > +int kgdb_skipexception(int exception, struct pt_regs *regs) > +{ > + if (kgdb_isremovedbreak(regs->nip)) > + return 1; > + > + return 0; > +} int kgdb_skipexception(int exception, struct pt_regs *regs) { ret

[PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered

2012-08-22 Thread Tiejun Chen
We need to skip a breakpoint exception when it occurs after a breakpoint has already been removed. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel

[PATCH 1/3] kgdb,ppc: do not set kgdb_single_step on ppc

2012-08-22 Thread Tiejun Chen
The kgdb_single_step flag has the possibility to indefinitely hang the system on an SMP system. The x86 arch have the same problem, and that problem was fixed by commit 8097551d9ab9b9e3630(kgdb,x86: do not set kgdb_single_step on x86). This patch does the same behaviors as x86's patch. Signed-off

[PATCH 3/3] powerpc/kgdb: restore current_thread_info properly

2012-08-22 Thread Tiejun Chen
For powerpc BooKE and e200, singlestep is handled on the critical/dbg exception stack. This causes current_thread_info() to fail for kgdb internal, so previously We work around this issue by copying the thread_info from the kernel stack before calling kgdb_handle_exception, and copying it back afte

[PATCH v2] powerpc/usb: fix bug of CPU hang when missing USB PHY clock

2012-08-22 Thread Shengzhou Liu
when missing USB PHY clock, kernel booting up will hang during USB initialization. We should check USBGP[PHY_CLK_VALID] bit to avoid CPU hanging in this case. Signed-off-by: Shengzhou Liu --- v2 changes: use spin_event_timeout() instead. drivers/usb/host/ehci-fsl.c | 58 ++

Re: GE IMP3a

2012-08-22 Thread Martyn Welch
On 21/08/12 14:58, Kumar Gala wrote: > > On Aug 21, 2012, at 7:39 AM, Martyn Welch wrote: > >> On 15/08/12 22:32, Kumar Gala wrote: >>> Do you know why ge_imp3a.c has 0x9000 as the 'primary' PCIe bus on the >>> board? >>> >> >> Hi Kumar, >> >> Sorry, missed your mail. > > np. > >> At a quick g

Re: [PATCH v3 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Ananth N Mavinakayanahalli
On Tue, Aug 21, 2012 at 03:09:30PM +0200, Oleg Nesterov wrote: ... > > This is true for Intel like architectures that have *one* swbp > > instruction. On Powerpc, gdb for instance, can insert a trap variant at > > the address. Therefore, is_swbp_insn() by definition should return true > > for all

[PATCH v4 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli This is the port of uprobes to powerpc. Usage is similar to x86. [root@ ~]# ./bin/perf probe -x /lib64/libc.so.6 malloc Added new event: probe_libc:malloc(on 0xb4860) You can now use it in all perf tools, such as: perf record -e probe_libc:mal

[PATCH 1/2] powerpc: Add trap_nr to thread_struct

2012-08-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Add thread_struct.trap_nr and use it to store the last exception the thread experienced. In this patch, we populate the field at various places where we force_sig_info() to the process. This is also used in uprobes to determine if the probed instruction caused an

RE: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-08-22 Thread Jia Hongtao-B38951
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, August 21, 2012 6:04 AM > To: Jia Hongtao-B38951 > Cc: linuxppc-dev@lists.ozlabs.org; ga...@kernel.crashing.org; Li Yang- > R58472; Bradley Hughes > Subject: Re: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization > cod

[PATCH] RAID/DMA/caamxor: support XOR offload by CAAM

2012-08-22 Thread b29237
From: Xuelin Shi Add XOR offloading functionality by CAAM and interface with async_tx layer so that it can be used for RAID parity computation. Signed-off-by: Naveen Burmi Signed-off-by: Yuan Kang Signed-off-by: Xuelin Shi --- drivers/crypto/caam/Kconfig | 15 + drivers/crypto/caam/M

[PATCH] powerpc: Fix null pointer deref in perf hardware breakpoints

2012-08-22 Thread Michael Neuling
Currently if you are doing a global perf recording with hardware breakpoints (ie perf record -e mem:0xdeadbeef -a), you can oops with: Faulting instruction address: 0xc0738890 cpu 0xc: Vector: 300 (Data Access) at [c003f76af8d0] pc: c0738890: .hw_breakpoint_handler+0x

[PATCH] powerpc: Remove unnecessary ifdefs

2012-08-22 Thread Michael Neuling
Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/cputable.h |2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 50d82c8..b3c083d 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/incl

[PATCH 0/2] powerpc: perf hardware breakpoint fixes

2012-08-22 Thread Michael Neuling
Here are a couple of patches for perf for hardware breakpoints. Along with https://lkml.org/lkml/2012/8/16/5 hardware breakpoints now work for me powerpc. These patches don't depend on that patch though. Michael Neuling (2): powerpc: Remove unessasary ifdefs powerpc: Fix null pointer deref i