[Patch 5/6] Modify Data storage exception code to recognise DABR match first

David Gibson dwg at au1.ibm.com
Wed Jun 17 14:13:44 EST 2009


On Wed, Jun 10, 2009 at 02:38:24PM +0530, K.Prasad wrote:
> Modify Data storage exception code to first lookout for a DABR match before
> recognising a kprobe or xmon exception.
> 
> Signed-off-by: K.Prasad <prasad at linux.vnet.ibm.com>
> ---
>  arch/powerpc/mm/fault.c |   14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> Index: linux-2.6-tip.hbkpt/arch/powerpc/mm/fault.c
> ===================================================================
> --- linux-2.6-tip.hbkpt.orig/arch/powerpc/mm/fault.c
> +++ linux-2.6-tip.hbkpt/arch/powerpc/mm/fault.c
> @@ -136,6 +136,12 @@ int __kprobes do_page_fault(struct pt_re
>  		error_code &= 0x48200000;
>  	else
>  		is_write = error_code & DSISR_ISSTORE;
> +
> +	if (error_code & DSISR_DABRMATCH) {
> +		/* DABR match */
> +		do_dabr(regs, address, error_code);
> +		return 0;
> +	}

Again, given the amount of work you're doing on all the breakpoint
paths, I really think you should be rewriting do_dabr(), not just
hooking in around it.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson


More information about the Linuxppc-dev mailing list