@@ -132,28 +132,6 @@ typedef int user_regset_writeback_fn(struct task_struct *target,
132
132
const struct user_regset * regset ,
133
133
int immediate );
134
134
135
- /**
136
- * user_regset_get_size_fn - type of @get_size function in &struct user_regset
137
- * @target: thread being examined
138
- * @regset: regset being examined
139
- *
140
- * This call is optional; usually the pointer is %NULL.
141
- *
142
- * When provided, this function must return the current size of regset
143
- * data, as observed by the @get function in &struct user_regset. The
144
- * value returned must be a multiple of @size. The returned size is
145
- * required to be valid only until the next time (if any) @regset is
146
- * modified for @target.
147
- *
148
- * This function is intended for dynamically sized regsets. A regset
149
- * that is statically sized does not need to implement it.
150
- *
151
- * This function should not be called directly: instead, callers should
152
- * call regset_size() to determine the current size of a regset.
153
- */
154
- typedef unsigned int user_regset_get_size_fn (struct task_struct * target ,
155
- const struct user_regset * regset );
156
-
157
135
/**
158
136
* struct user_regset - accessible thread CPU state
159
137
* @n: Number of slots (registers).
@@ -165,20 +143,14 @@ typedef unsigned int user_regset_get_size_fn(struct task_struct *target,
165
143
* @set: Function to store values.
166
144
* @active: Function to report if regset is active, or %NULL.
167
145
* @writeback: Function to write data back to user memory, or %NULL.
168
- * @get_size: Function to return the regset's size, or %NULL.
169
146
*
170
147
* This data structure describes a machine resource we call a register set.
171
148
* This is part of the state of an individual thread, not necessarily
172
149
* actual CPU registers per se. A register set consists of a number of
173
150
* similar slots, given by @n. Each slot is @size bytes, and aligned to
174
151
* @align bytes (which is at least @size). For dynamically-sized
175
152
* regsets, @n must contain the maximum possible number of slots for the
176
- * regset, and @get_size must point to a function that returns the
177
- * current regset size.
178
- *
179
- * Callers that need to know only the current size of the regset and do
180
- * not care about its internal structure should call regset_size()
181
- * instead of inspecting @n or calling @get_size.
153
+ * regset.
182
154
*
183
155
* For backward compatibility, the @get and @set methods must pad to, or
184
156
* accept, @n * @size bytes, even if the current regset size is smaller.
@@ -218,7 +190,6 @@ struct user_regset {
218
190
user_regset_set_fn * set ;
219
191
user_regset_active_fn * active ;
220
192
user_regset_writeback_fn * writeback ;
221
- user_regset_get_size_fn * get_size ;
222
193
unsigned int n ;
223
194
unsigned int size ;
224
195
unsigned int align ;
@@ -422,21 +393,4 @@ static inline int copy_regset_from_user(struct task_struct *target,
422
393
return regset -> set (target , regset , offset , size , NULL , data );
423
394
}
424
395
425
- /**
426
- * regset_size - determine the current size of a regset
427
- * @target: thread to be examined
428
- * @regset: regset to be examined
429
- *
430
- * Note that the returned size is valid only until the next time
431
- * (if any) @regset is modified for @target.
432
- */
433
- static inline unsigned int regset_size (struct task_struct * target ,
434
- const struct user_regset * regset )
435
- {
436
- if (!regset -> get_size )
437
- return regset -> n * regset -> size ;
438
- else
439
- return regset -> get_size (target , regset );
440
- }
441
-
442
396
#endif /* <linux/regset.h> */
0 commit comments