[PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP

Arnd Bergmann arnd at arndb.de
Sat Apr 21 07:18:23 EDT 2012


On Saturday 21 April 2012, Alexander Shiyan wrote:
> 
>                 .macro  addruart, rp, rv, tmp
> -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> -               mov     \rp, #0x0000    @ UART1
> -#else
> -               mov     \rp, #0x1000    @ UART2
> +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> +               mov     \rp, #0x1000    @ Add offset for UART2 base reg
>  #endif
>                 orr     \rv, \rp, #CLPS711X_VIRT_BASE
>                 orr     \rp, \rp, #CLPS711X_PHYS_BASE

This looks wrong at first sight. Is rp guaranteed to be zero when calling
the macro? Am I misreading this? Sorry my ARM assembly skill is still horrible.

	Arnd



More information about the linux-arm-kernel mailing list