Date: Fri, 19 Feb 2010 17:49:59 +0100 From: Olivier Houchard <mlfbsd@ci0.org> To: ticso@cicely.de Cc: kostikbel@gmail.com, Grzegorz Bernacki <gjb@semihalf.com>, ticso@cicely7.cicely.de, arm@freebsd.org, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? Message-ID: <20100219164959.GA8131@ci0.org> In-Reply-To: <20100219162840.GJ43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> <20100219041200.GC43625@cicely7.cicely.de> <20100219120754.GE43625@cicely7.cicely.de> <4B7E840F.2040709@semihalf.com> <20100219162840.GJ43625@cicely7.cicely.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
>
> Strange:
Not so much, the first values for ras_start/end were chosen to be immediate
values, so you could just mov them, but the new one aren't.
Try something like the patch attached instead (untested, I have no arm setup
here, but you'll get the idea).
Regards,
Olivier
--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bind_atomic.h.diff"
Index: contrib/bind9/lib/isc/arm/include/isc/atomic.h
===================================================================
--- contrib/bind9/lib/isc/arm/include/isc/atomic.h (revision 203777)
+++ contrib/bind9/lib/isc/arm/include/isc/atomic.h (working copy)
@@ -49,26 +49,22 @@
static inline isc_int32_t
isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
{
- register int done, ras_start;
+ register int done, ras_start = #0xffff1004;
__asm __volatile("1:\n"
"adr %1, 1b\n"
- "mov %0, #0xe0000004\n"
"str %1, [%0]\n"
- "mov %0, #0xe0000008\n"
"adr %1, 2f\n"
- "str %1, [%0]\n"
+ "str %1, [%0, #4]\n"
"ldr %1, [%2]\n"
"cmp %1, %3\n"
"streq %4, [%2]\n"
"2:\n"
"mov %3, #0\n"
- "mov %0, #0xe0000004\n"
"str %3, [%0]\n"
"mov %3, #0xffffffff\n"
- "mov %0, #0xe0000008\n"
- "str %3, [%0]\n"
- : "=r" (ras_start), "=r" (done)
+ "str %3, [%0, #4]\n"
+ : "+r" (ras_start), "=r" (done)
,"+r" (p), "+r" (cmpval), "+r" (val) : : "memory");
return (done);
--NzB8fVQJ5HfG6fxh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100219164959.GA8131>
