[PATCH] powerpc: handle unaligned ldbrx/stdbrx

Stephen Rothwell sfr at canb.auug.org.au
Wed Jul 31 18:19:23 EST 2013


Hi Anton,

On Wed, 31 Jul 2013 15:05:21 +1000 Anton Blanchard <anton at samba.org> wrote:
>
> +++ b/arch/powerpc/kernel/align.c
> @@ -764,6 +764,16 @@ int fix_alignment(struct pt_regs *regs)
>  	nb = aligninfo[instr].len;
>  	flags = aligninfo[instr].flags;
>  
> +	/* ldbrx/stdbrx overlap lfs/stfs in the DSISR unfortunately */
> +	if (IS_XFORM(instruction) && ((instruction >> 1) & 0x3ff) == 532) {

We have get_xop() in asm/disassemble.h (which is unfortunately not
included by this file) ...

> +		nb = 8;
> +		flags = LD+SW;
> +	} else if (IS_XFORM(instruction) &&
> +		   ((instruction >> 1) & 0x3ff) == 660) {

ditto

/me points at a bike shed :-)
-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20130731/4ee710ef/attachment-0001.sig>


More information about the Linuxppc-dev mailing list