Hi Bernd,

Bernd Büttner wrote:
my platform: m68knommu
ditribution 20070130 and 20080808

Using atomic_set_mask and atomic_clear_mask I ran into an assembler error.

What was the error?
What binutils version?

Regards
Greg



Doing the following patch helped me out:

Index: linux-2.6.x/include/asm-m68knommu/atomic.h
===================================================================
--- linux-2.6.x/include/asm-m68knommu/atomic.h    (Revision 5)
+++ linux-2.6.x/include/asm-m68knommu/atomic.h    (Arbeitskopie)
@@ -86,12 +86,12 @@

static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v)
 {
-    __asm__ __volatile__("andl %1,%0" : "+m" (*v) : "id" (~(mask)));
+    __asm__ __volatile__("andl %1,%0" : "+m" (*v) : "d" (~(mask)));
 }

static __inline__ void atomic_set_mask(unsigned long mask, unsigned long *v)
 {
-    __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask));
+    __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "d" (mask));
 }

 /* Atomic operations are already serializing */

I'm not familiar with __asm__ directives, so could please someone tell me if I'm correct.

Bernd

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


--
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     g...@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to