[RFC/PATCH 5/7] ARM: Move get_thread_info macro definition to <asm/assembler.h>

Catalin Marinas catalin.marinas at arm.com
Tue Oct 11 05:56:39 EDT 2011


On Fri, Oct 07, 2011 at 03:38:39AM +0100, gdavis at mvista.com wrote:
> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
> index 29035e8..78397d0 100644
> --- a/arch/arm/include/asm/assembler.h
> +++ b/arch/arm/include/asm/assembler.h
> @@ -23,6 +23,19 @@
>  #include <asm/ptrace.h>
>  #include <asm/domain.h>
>  
> +#ifndef CONFIG_THUMB2_KERNEL
> +	.macro	get_thread_info, rd
> +	mov	\rd, sp, lsr #13
> +	mov	\rd, \rd, lsl #13
> +	.endm
> +#else   /* CONFIG_THUMB2_KERNEL */
> +	.macro	get_thread_info, rd
> +	mov	\rd, sp
> +	lsr	\rd, \rd, #13
> +	mov	\rd, \rd, lsl #13
> +	.endm
> +#endif  /* !CONFIG_THUMB2_KERNEL */

We could even write some preempt_enable and preempt_disable asm macros,
I think it would simplify the code in the other files.

-- 
Catalin



More information about the linux-arm-kernel mailing list