[PATCH 2/5] ARM: add/rename PSR bits to match linux names

Sascha Hauer s.hauer at pengutronix.de
Sat Oct 13 14:25:05 EDT 2012


On Sat, Oct 13, 2012 at 04:03:24PM +0200, Vicente wrote:
> 
> Signed-off-by: Vicente <vicencb at gmail.com>
> ---
>  arch/arm/cpu/exceptions.S     |  1 -
>  arch/arm/cpu/interrupts.c     |  6 ++---
>  arch/arm/include/asm/ptrace.h | 55 +++++++++++++++++++++++--------------------
>  3 files changed, 33 insertions(+), 29 deletions(-)
> 
>  /* Are the current registers suitable for user mode?
>   * (used to maintain security in signal handlers)
> @@ -102,13 +107,13 @@ struct pt_regs {
>  static inline int valid_user_regs(struct pt_regs *regs)
>  {
>  	if ((regs->ARM_cpsr & 0xf) == 0 &&
> -	    (regs->ARM_cpsr & (F_BIT|I_BIT)) == 0)
> +	    (regs->ARM_cpsr & (PSR_F_BIT|PSR_I_BIT)) == 0)
>  		return 1;
>  
>  	/*
>  	 * Force CPSR to something logical...
>  	 */
> -	regs->ARM_cpsr &= (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT|0x10);
> +	regs->ARM_cpsr &= (PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT|0x10);

Since you are changing these lines anyway, could you add a whitespace
left and right to the operators to match our coding style?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list