Re: [PATCH v2] MIPS: Stop using dla in 32 bit kernels

From: Maciej W. Rozycki
Date: Thu Feb 04 2016 - 17:19:03 EST


On Thu, 4 Feb 2016, Paul Burton wrote:

> diff --git a/arch/mips/include/asm/hazards.h b/arch/mips/include/asm/hazards.h
> index 7b99efd..835c770 100644
> --- a/arch/mips/include/asm/hazards.h
> +++ b/arch/mips/include/asm/hazards.h
> @@ -65,8 +66,8 @@ do { \
> unsigned long tmp; \
> \
> __asm__ __volatile__( \
> + " " __stringify(PTR_LA) " %0, 1f \n" \
> " .set "MIPS_ISA_LEVEL" \n" \
> - " dla %0, 1f \n" \
> " jr.hb %0 \n" \
> " .set mips0 \n" \
> "1: \n" \

This looks good to me if not obviously correct, however for consistency
please apply the same change to the virtually the same code sequence
further down the file, used for MIPSr1 builds.

For the record -- it looks to me there needs to be `.insn' right after
`1:' to ensure nothing strange happens in a microMIPS compilation. We
don't know for sure what GCC puts after the asm but we do want to ensure
the target of the jump has the ISA bit set correctly. It needs to be a
separate change of course.

Thanks,

Maciej