Skip to content

Commit

Permalink
asm-generic: rwsem: de-PPCify rwsem.h
Browse files Browse the repository at this point in the history
asm-generic/rwsem.h used to live under arch/powerpc. During its
liberation to common code, a few references to its former home where
preserved, in particular the definition of RWSEM_ACTIVE_MASK is
predicated on CONFIG_PPC64.

This patch updates the ifdefs and comments to architecturally neutral
versions.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Richard Kuo <rkuo@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Will Deacon authored and Catalin Marinas committed Mar 14, 2014
1 parent 3be1a5c commit e172800
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/asm-generic/rwsem.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _ASM_POWERPC_RWSEM_H
#define _ASM_POWERPC_RWSEM_H
#ifndef _ASM_GENERIC_RWSEM_H
#define _ASM_GENERIC_RWSEM_H

#ifndef _LINUX_RWSEM_H
#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
Expand All @@ -8,15 +8,15 @@
#ifdef __KERNEL__

/*
* R/W semaphores for PPC using the stuff in lib/rwsem.c.
* R/W semaphores originally for PPC using the stuff in lib/rwsem.c.
* Adapted largely from include/asm-i386/rwsem.h
* by Paul Mackerras <paulus@samba.org>.
*/

/*
* the semaphore definition
*/
#ifdef CONFIG_PPC64
#ifdef CONFIG_64BIT
# define RWSEM_ACTIVE_MASK 0xffffffffL
#else
# define RWSEM_ACTIVE_MASK 0x0000ffffL
Expand Down Expand Up @@ -129,4 +129,4 @@ static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
}

#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_RWSEM_H */
#endif /* _ASM_GENERIC_RWSEM_H */

0 comments on commit e172800

Please sign in to comment.