Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4eb14db4 authored by David Howells's avatar David Howells
Browse files

Disintegrate asm/system.h for Score



Disintegrate asm/system.h for Score.  Not compiled.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Chen Liqin <liqin.chen@sunplusct.com>
parent a0616cde
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
#ifndef _ASM_SCORE_ATOMIC_H
#ifndef _ASM_SCORE_ATOMIC_H
#define _ASM_SCORE_ATOMIC_H
#define _ASM_SCORE_ATOMIC_H


#include <asm/cmpxchg.h>
#include <asm-generic/atomic.h>
#include <asm-generic/atomic.h>


#endif /* _ASM_SCORE_ATOMIC_H */
#endif /* _ASM_SCORE_ATOMIC_H */
+16 −0
Original line number Original line Diff line number Diff line
#ifndef _ASM_SCORE_BARRIER_H
#define _ASM_SCORE_BARRIER_H

#define mb()		barrier()
#define rmb()		barrier()
#define wmb()		barrier()
#define smp_mb()	barrier()
#define smp_rmb()	barrier()
#define smp_wmb()	barrier()

#define read_barrier_depends()		do {} while (0)
#define smp_read_barrier_depends()	do {} while (0)

#define set_mb(var, value) 		do {var = value; wmb(); } while (0)

#endif /* _ASM_SCORE_BARRIER_H */
+0 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,6 @@
#define _ASM_SCORE_BITOPS_H
#define _ASM_SCORE_BITOPS_H


#include <asm/byteorder.h> /* swab32 */
#include <asm/byteorder.h> /* swab32 */
#include <asm/system.h> /* save_flags */


/*
/*
 * clear_bit() doesn't provide any barrier for the compiler.
 * clear_bit() doesn't provide any barrier for the compiler.
+11 −0
Original line number Original line Diff line number Diff line
@@ -3,4 +3,15 @@


#include <asm-generic/bug.h>
#include <asm-generic/bug.h>


struct pt_regs;
extern void __die(const char *, struct pt_regs *, const char *,
	const char *, unsigned long) __attribute__((noreturn));
extern void __die_if_kernel(const char *, struct pt_regs *, const char *,
	const char *, unsigned long);

#define die(msg, regs)							\
	__die(msg, regs, __FILE__ ":", __func__, __LINE__)
#define die_if_kernel(msg, regs)					\
	__die_if_kernel(msg, regs, __FILE__ ":", __func__, __LINE__)

#endif /* _ASM_SCORE_BUG_H */
#endif /* _ASM_SCORE_BUG_H */
+49 −0
Original line number Original line Diff line number Diff line
#ifndef _ASM_SCORE_CMPXCHG_H
#define _ASM_SCORE_CMPXCHG_H

#include <linux/irqflags.h>

struct __xchg_dummy { unsigned long a[100]; };
#define __xg(x) ((struct __xchg_dummy *)(x))

static inline
unsigned long __xchg(volatile unsigned long *m, unsigned long val)
{
	unsigned long retval;
	unsigned long flags;

	local_irq_save(flags);
	retval = *m;
	*m = val;
	local_irq_restore(flags);
	return retval;
}

#define xchg(ptr, v)						\
	((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr),	\
					(unsigned long)(v)))

static inline unsigned long __cmpxchg(volatile unsigned long *m,
				unsigned long old, unsigned long new)
{
	unsigned long retval;
	unsigned long flags;

	local_irq_save(flags);
	retval = *m;
	if (retval == old)
		*m = new;
	local_irq_restore(flags);
	return retval;
}

#define cmpxchg(ptr, o, n)					\
	((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr),	\
					(unsigned long)(o),	\
					(unsigned long)(n)))

#define __HAVE_ARCH_CMPXCHG	1

#include <asm-generic/cmpxchg-local.h>

#endif /* _ASM_SCORE_CMPXCHG_H */
Loading