All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [BUG] too lax asm constraints of __xn_rdtsc on bfin
@ 2007-06-12 17:53 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2007-06-12 17:53 UTC (permalink / raw)
  To: xenomai-core


[-- Attachment #1.1: Type: text/plain, Size: 259 bytes --]

Sigh. Actually, I only wanted to give that shiny new BF537-STAMP board,
kindly provided by ADI, a short try. Now I'm right in the middle of all
this...

Changelog says it all. Problem appears with trunk and 2.3.x user space
build (=>direct TSC).

Jan

[-- Attachment #1.2: fix-__xn_rdtsc-constraints.patch --]
[-- Type: text/plain, Size: 1002 bytes --]

Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 2571)
+++ ChangeLog	(Arbeitskopie)
@@ -1,3 +1,9 @@
+2007-06-12  Jan Kiszka  <jan.kiszka@domain.hid>
+
+	* include/asm-blackfin/syscall.h (__xn_rdtsc): Assure that CC only
+	works on data registers. Otherwise, bfin's as may pick a pointer reg
+	and crash during user land build (toolchain bug #3332).
+
 2007-06-09  Philippe Gerum  <rpm@xenomai.org>
 
 	* ksrc/skins/native/pipe.c (rt_pipe_create): Keep the
Index: include/asm-blackfin/syscall.h
===================================================================
--- include/asm-blackfin/syscall.h	(Revision 2571)
+++ include/asm-blackfin/syscall.h	(Arbeitskopie)
@@ -249,9 +249,9 @@
 				"%2 = CYCLES2\n"
 				"CC = %2 == %0\n"
 				"if !cc jump 1b\n"
-				:"=r" (u.s.h),
-				"=r" (u.s.l),
-				"=r" (cy2)
+				:"=d" (u.s.h),
+				"=d" (u.s.l),
+				"=d" (cy2)
 				: /*no input*/ : "cc");
     return u.t;
 }

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-12 17:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-12 17:53 [Xenomai-core] [BUG] too lax asm constraints of __xn_rdtsc on bfin Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.