@@ -132,28 +132,6 @@ typedef int user_regset_writeback_fn(struct task_struct *target,
132132 const struct user_regset * regset ,
133133 int immediate );
134134
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-
157135/**
158136 * struct user_regset - accessible thread CPU state
159137 * @n: Number of slots (registers).
@@ -165,20 +143,14 @@ typedef unsigned int user_regset_get_size_fn(struct task_struct *target,
165143 * @set: Function to store values.
166144 * @active: Function to report if regset is active, or %NULL.
167145 * @writeback: Function to write data back to user memory, or %NULL.
168- * @get_size: Function to return the regset's size, or %NULL.
169146 *
170147 * This data structure describes a machine resource we call a register set.
171148 * This is part of the state of an individual thread, not necessarily
172149 * actual CPU registers per se. A register set consists of a number of
173150 * similar slots, given by @n. Each slot is @size bytes, and aligned to
174151 * @align bytes (which is at least @size). For dynamically-sized
175152 * 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.
182154 *
183155 * For backward compatibility, the @get and @set methods must pad to, or
184156 * accept, @n * @size bytes, even if the current regset size is smaller.
@@ -218,7 +190,6 @@ struct user_regset {
218190 user_regset_set_fn * set ;
219191 user_regset_active_fn * active ;
220192 user_regset_writeback_fn * writeback ;
221- user_regset_get_size_fn * get_size ;
222193 unsigned int n ;
223194 unsigned int size ;
224195 unsigned int align ;
@@ -422,21 +393,4 @@ static inline int copy_regset_from_user(struct task_struct *target,
422393 return regset -> set (target , regset , offset , size , NULL , data );
423394}
424395
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-
442396#endif /* <linux/regset.h> */
0 commit comments