@@ -81,50 +81,6 @@ struct reservation_object {
81
81
#define reservation_object_assert_held (obj ) \
82
82
lockdep_assert_held(&(obj)->lock.base)
83
83
84
- /**
85
- * reservation_object_init - initialize a reservation object
86
- * @obj: the reservation object
87
- */
88
- static inline void
89
- reservation_object_init (struct reservation_object * obj )
90
- {
91
- ww_mutex_init (& obj -> lock , & reservation_ww_class );
92
-
93
- __seqcount_init (& obj -> seq , reservation_seqcount_string , & reservation_seqcount_class );
94
- RCU_INIT_POINTER (obj -> fence , NULL );
95
- RCU_INIT_POINTER (obj -> fence_excl , NULL );
96
- }
97
-
98
- /**
99
- * reservation_object_fini - destroys a reservation object
100
- * @obj: the reservation object
101
- */
102
- static inline void
103
- reservation_object_fini (struct reservation_object * obj )
104
- {
105
- int i ;
106
- struct reservation_object_list * fobj ;
107
- struct dma_fence * excl ;
108
-
109
- /*
110
- * This object should be dead and all references must have
111
- * been released to it, so no need to be protected with rcu.
112
- */
113
- excl = rcu_dereference_protected (obj -> fence_excl , 1 );
114
- if (excl )
115
- dma_fence_put (excl );
116
-
117
- fobj = rcu_dereference_protected (obj -> fence , 1 );
118
- if (fobj ) {
119
- for (i = 0 ; i < fobj -> shared_count ; ++ i )
120
- dma_fence_put (rcu_dereference_protected (fobj -> shared [i ], 1 ));
121
-
122
- kfree (fobj );
123
- }
124
-
125
- ww_mutex_destroy (& obj -> lock );
126
- }
127
-
128
84
/**
129
85
* reservation_object_get_list - get the reservation object's
130
86
* shared fence list, with update-side lock held
@@ -271,6 +227,8 @@ reservation_object_get_excl_rcu(struct reservation_object *obj)
271
227
return fence ;
272
228
}
273
229
230
+ void reservation_object_init (struct reservation_object * obj );
231
+ void reservation_object_fini (struct reservation_object * obj );
274
232
int reservation_object_reserve_shared (struct reservation_object * obj ,
275
233
unsigned int num_fences );
276
234
void reservation_object_add_shared_fence (struct reservation_object * obj ,
0 commit comments