• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/xenomai/xenomai-thumb-fix.patch
Thomas PetazzoniThomas Petazzoni committed 7f00b62917b12 Oct 2012
Raw file
Source viewDiff to previous
xxxxxxxxxx
  * r0 = previous task_struct, r1 = previous thread_info, r2 = next thread_info
 
1
From ad3714e925f5c6b4ae0e0d31c4bab7f8c5e659db Mon Sep 17 00:00:00 2001
2
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
3
Date: Fri, 10 Aug 2012 21:55:41 +0200
4
Subject: [PATCH] hal/arm: fix compilation for thumb
5
​
6
---
7
 include/asm-arm/atomic.h |    3 ++
8
 ksrc/arch/arm/switch.S   |   84 +++++++++++++++++++++++++++------------------
9
 2 files changed, 53 insertions(+), 34 deletions(-)
10
​
11
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
12
index 5d55ae8..ae96847 100644
13
--- a/include/asm-arm/atomic.h
14
+++ b/include/asm-arm/atomic.h
15
@@ -183,6 +183,9 @@ xnarch_atomic_cmpxchg(xnarch_atomic_t *ptr,
16
        "ldrex  %1, [%3]\n"
17
        "mov    %0, #0\n"
18
        "teq    %1, %4\n"
19
+#ifdef __thumb__
20
+       "it eq\n"
21
+#endif
22
        "strexeq %0, %5, [%3]\n"
23
            : "=&r" (res), "=&r" (curval), "+Qo" (ptr->counter)
24
            : "r" (&ptr->counter), "Ir" (oldval), "r" (newval)
25
diff --git a/ksrc/arch/arm/switch.S b/ksrc/arch/arm/switch.S
26
index 83f4746..95c355f 100644
27
--- a/ksrc/arch/arm/switch.S
28
+++ b/ksrc/arch/arm/switch.S
29
@@ -37,6 +37,11 @@
30
    .endm
31
 #endif
32
 
33
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
34
+#define ARM(x...)  x
35
+#define THUMB(x...)
36
+#endif
37
+
38
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 37)
39
 #ifdef CONFIG_MMU
40
 #define USE_DOMAINS
41
@@ -83,18 +88,19 @@
42
  * r0 = pointer to union vfp_state, r1 = fpexc
43
  */
44
 ENTRY(rthal_vfp_save)
45
-    VFPFSTMIA  r0, r2          @ save the working registers
46
-    VFPFMRX    r2, FPSCR       @ current status
47
-    tst        r1, #FPEXC_EX       @ is there additional state to save?
48
-    beq 1f
49
-    VFPFMRX    r3, FPINST      @ FPINST (only if FPEXC.EX is set)
50
-    tst        r1, #FPEXC_FP2V     @ is there an FPINST2 to read?
51
-    beq 1f
52
-    VFPFMRX    r12, FPINST2    @ FPINST2 if needed (and present)
53
+   VFPFSTMIA   r0, r2      @ save the working registers
54
+   VFPFMRX     r2, FPSCR   @ current status
55
+   tst     r1, #FPEXC_EX   @ is there additional state to save?
56
+   beq     1f
57
+   VFPFMRX     r3, FPINST  @ FPINST (only if FPEXC.EX is set)
58
+   tst     r1, #FPEXC_FP2V @ is there an FPINST2 to read?
59
+   beq     1f
60
+   VFPFMRX     r12, FPINST2    @ FPINST2 if needed (and present)
61
 1:
62
-    stmia  r0, {r1, r2, r3, r12}   @ save FPEXC, FPSCR, FPINST, FPINST2
63
-    mov        pc, lr
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.