aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-imx-rt-3.10.17/0001-fix-build.patch
blob: 8d9ed83d29c5f5384bab708880bb07a79d87ce1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Fix the build errors listed below

Upstream-Status: Inappropriate [other]
Freescale does not currently support the real-time kernel

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>

  CC      drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.o
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c: In function 'gckOS_WaitSignal':
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7835:5: error: passing argument 1 of 'spin_lock_irq' from incompatible pointer type [-Werror]
     spin_lock_irq(&signal->obj.wait.lock);
     ^
In file included from include/linux/seqlock.h:29:0,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/spinlock.h:316:20: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
 static inline void spin_lock_irq(spinlock_t *lock)
                    ^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7867:9: error: passing argument 1 of '__add_wait_queue_tail' from incompatible pointer type [-Werror]
         __add_wait_queue_tail(&signal->obj.wait, &wait);
         ^
In file included from include/linux/mmzone.h:9:0,
                 from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/wait.h:120:20: note: expected 'struct wait_queue_head_t *' but argument is of type 'struct swait_head *'
 static inline void __add_wait_queue_tail(wait_queue_head_t *head,
                    ^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7879:13: error: passing argument 1 of 'spin_unlock_irq' from incompatible pointer type [-Werror]
             spin_unlock_irq(&signal->obj.wait.lock);
             ^
In file included from include/linux/seqlock.h:29:0,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/spinlock.h:341:20: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
 static inline void spin_unlock_irq(spinlock_t *lock)
                    ^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7881:13: error: passing argument 1 of 'spin_lock_irq' from incompatible pointer type [-Werror]
             spin_lock_irq(&signal->obj.wait.lock);
             ^
In file included from include/linux/seqlock.h:29:0,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/spinlock.h:316:20: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
 static inline void spin_lock_irq(spinlock_t *lock)
                    ^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7945:9: error: passing argument 1 of '__remove_wait_queue' from incompatible pointer type [-Werror]
         __remove_wait_queue(&signal->obj.wait, &wait);
         ^
In file included from include/linux/mmzone.h:9:0,
                 from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/wait.h:133:20: note: expected 'struct wait_queue_head_t *' but argument is of type 'struct swait_head *'
 static inline void __remove_wait_queue(wait_queue_head_t *head,
                    ^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7958:5: error: passing argument 1 of 'spin_unlock_irq' from incompatible pointer type [-Werror]
     spin_unlock_irq(&signal->obj.wait.lock);
     ^
In file included from include/linux/seqlock.h:29:0,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
                 from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/spinlock.h:341:20: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
 static inline void spin_unlock_irq(spinlock_t *lock)
                    ^
cc1: all warnings being treated as errors
make[4]: *** [drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.o] Error 1

Index: git/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
===================================================================
--- git.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ git/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -7832,7 +7832,7 @@ gckOS_WaitSignal(
 
     might_sleep();
 
-    spin_lock_irq(&signal->obj.wait.lock);
+    raw_spin_lock_irq(&signal->obj.wait.lock);
 
     if (signal->obj.done)
     {
@@ -7862,9 +7862,8 @@ gckOS_WaitSignal(
             : Wait * HZ / 1000;
 #endif
 
-        DECLARE_WAITQUEUE(wait, current);
-        wait.flags |= WQ_FLAG_EXCLUSIVE;
-        __add_wait_queue_tail(&signal->obj.wait, &wait);
+        DEFINE_SWAITER(wait);
+        swait_prepare_locked(&signal->obj.wait, &wait);
 
         while (gcvTRUE)
         {
@@ -7876,9 +7875,9 @@ gckOS_WaitSignal(
             }
 
             __set_current_state(TASK_INTERRUPTIBLE);
-            spin_unlock_irq(&signal->obj.wait.lock);
+            raw_spin_unlock_irq(&signal->obj.wait.lock);
             timeout = schedule_timeout(timeout);
-            spin_lock_irq(&signal->obj.wait.lock);
+            raw_spin_lock_irq(&signal->obj.wait.lock);
 
             if (signal->obj.done)
             {
@@ -7942,7 +7941,7 @@ gckOS_WaitSignal(
             }
         }
 
-        __remove_wait_queue(&signal->obj.wait, &wait);
+        swait_finish_locked(&signal->obj.wait, &wait);
 
 #if gcdDETECT_TIMEOUT
         if (complained)
@@ -7955,7 +7954,7 @@ gckOS_WaitSignal(
 #endif
     }
 
-    spin_unlock_irq(&signal->obj.wait.lock);
+    raw_spin_unlock_irq(&signal->obj.wait.lock);
 
 OnError:
     /* Return status. */