lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 12 Oct 2013 09:46:03 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Will Deacon <will.deacon@....com>
CC:	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	Catalin Marinas <Catalin.Marinas@....com>,
	"linux390@...ibm.com" <linux390@...ibm.com>,
	"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arm/arm64: remove atomic_clear_mask() in "include/asm/atomic.h"

On 10/12/2013 12:55 AM, Will Deacon wrote:
> On Fri, Oct 11, 2013 at 12:47:05PM +0100, Chen Gang wrote:
>> In current kernel wide source code, except other architectures, only
>> s390 scsi drivers use atomic_clear_mask(), and arm/arm64 need not
>> support s390 drivers.
>>
>> So remove atomic_clear_mask() from "arm[64]/include/asm/atomic.h".
> 
>   Acked-by: Will Deacon <will.deacon@....com>
> 

Thank you for your whole work.

> Catalin, are you happy for me to send this via the ARM tree?
> 
> Will
> 


Thanks.

--
Chen Gang

>>
>> Signed-off-by: Chen Gang <gang.chen@...anux.com>
>> ---
>>  arch/arm/include/asm/atomic.h   |   24 ------------------------
>>  arch/arm64/include/asm/atomic.h |   14 --------------
>>  2 files changed, 0 insertions(+), 38 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
>> index da1c77d..3b3ae49fa 100644
>> --- a/arch/arm/include/asm/atomic.h
>> +++ b/arch/arm/include/asm/atomic.h
>> @@ -134,21 +134,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
>>  	return oldval;
>>  }
>>  
>> -static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
>> -{
>> -	unsigned long tmp, tmp2;
>> -
>> -	__asm__ __volatile__("@ atomic_clear_mask\n"
>> -"1:	ldrex	%0, [%3]\n"
>> -"	bic	%0, %0, %4\n"
>> -"	strex	%1, %0, [%3]\n"
>> -"	teq	%1, #0\n"
>> -"	bne	1b"
>> -	: "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
>> -	: "r" (addr), "Ir" (mask)
>> -	: "cc");
>> -}
>> -
>>  #else /* ARM_ARCH_6 */
>>  
>>  #ifdef CONFIG_SMP
>> @@ -197,15 +182,6 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
>>  	return ret;
>>  }
>>  
>> -static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
>> -{
>> -	unsigned long flags;
>> -
>> -	raw_local_irq_save(flags);
>> -	*addr &= ~mask;
>> -	raw_local_irq_restore(flags);
>> -}
>> -
>>  #endif /* __LINUX_ARM_ARCH__ */
>>  
>>  #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
>> diff --git a/arch/arm64/include/asm/atomic.h b/arch/arm64/include/asm/atomic.h
>> index 8363644..01de5aa 100644
>> --- a/arch/arm64/include/asm/atomic.h
>> +++ b/arch/arm64/include/asm/atomic.h
>> @@ -126,20 +126,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
>>  	return oldval;
>>  }
>>  
>> -static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
>> -{
>> -	unsigned long tmp, tmp2;
>> -
>> -	asm volatile("// atomic_clear_mask\n"
>> -"1:	ldxr	%0, %2\n"
>> -"	bic	%0, %0, %3\n"
>> -"	stxr	%w1, %0, %2\n"
>> -"	cbnz	%w1, 1b"
>> -	: "=&r" (tmp), "=&r" (tmp2), "+Q" (*addr)
>> -	: "Ir" (mask)
>> -	: "cc");
>> -}
>> -
>>  #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
>>  
>>  static inline int __atomic_add_unless(atomic_t *v, int a, int u)
>> -- 
>> 1.7.7.6
>>
> 
> 


-- 
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ