Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/arm/include



>(2012/09/01 8:56), Matt Thomas wrote:
>> Module Name: src
>> Committed By:        matt
>> Date:                Fri Aug 31 23:56:15 UTC 2012
>>
>> Modified Files:
>>      src/sys/arch/arm/include: mutex.h
>>
>> Log Message:
>> Move the __cpu_simple_lock to the last byte so it's easier to read in dumps
>>
>>
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/mutex.h
>>
>> Please note that diffs are not public domain; they are subject to the
>> copyright notices on the relevant files.
>
>  This change makes panic on big endian.

to fix, apply below patch.

I think "mtxs_dummy" should be "mtxs_type"
because it is used as kmutex_type_t in sys/kern/kern_mutex.c

cvs -q diff -u mutex.h
Index: mutex.h
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/include/mutex.h,v
retrieving revision 1.12
diff -u -r1.12 mutex.h
--- mutex.h     31 Aug 2012 23:56:15 -0000      1.12
+++ mutex.h     24 Sep 2012 08:37:30 -0000
@@ -61,10 +61,17 @@
 
                /* Spin mutex */
                struct {
-                       volatile uint8_t        mtxs_dummy;
+#if _BYTE_ORDER == BIG_ENDIAN
+                       __cpu_simple_lock_t     mtxs_lock;
+                       volatile uint8_t        mtxs_unused;
+                       ipl_cookie_t            mtxs_ipl;
+                       volatile uint8_t        mtxs_dummy;
+#else
+                       volatile uint8_t        mtxs_dummy;
                        ipl_cookie_t            mtxs_ipl;
                        volatile uint8_t        mtxs_unused;
                        __cpu_simple_lock_t     mtxs_lock;
+#endif
                } s;
        } u;
 };


Home | Main Index | Thread Index | Old Index