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

Commit d471a4b9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Fix asm constraints for atomic_sub_and_test() and atomic_add_negative()
  m68k: Fix `struct sigcontext' for ColdFire
parents 4e310fda b560177f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -148,14 +148,18 @@ static inline int atomic_xchg(atomic_t *v, int new)
static inline int atomic_sub_and_test(int i, atomic_t *v)
{
	char c;
	__asm__ __volatile__("subl %2,%1; seq %0" : "=d" (c), "+m" (*v): "g" (i));
	__asm__ __volatile__("subl %2,%1; seq %0"
			     : "=d" (c), "+m" (*v)
			     : "id" (i));
	return c != 0;
}

static inline int atomic_add_negative(int i, atomic_t *v)
{
	char c;
	__asm__ __volatile__("addl %2,%1; smi %0" : "=d" (c), "+m" (*v): "g" (i));
	__asm__ __volatile__("addl %2,%1; smi %0"
			     : "=d" (c), "+m" (*v)
			     : "id" (i));
	return c != 0;
}

+1 −3
Original line number Diff line number Diff line
@@ -17,14 +17,12 @@ struct sigcontext {
#ifndef __uClinux__
# ifdef __mcoldfire__
	unsigned long  sc_fpregs[2][2];	/* room for two fp registers */
	unsigned long  sc_fpcntl[3];
	unsigned char  sc_fpstate[16+6*8];
# else
	unsigned long  sc_fpregs[2*3];  /* room for two fp registers */
# endif
	unsigned long  sc_fpcntl[3];
	unsigned char  sc_fpstate[216];
#endif
#endif
};

#endif