Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c522401e
Commit
c522401e
authored
Jun 17, 2020
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regset(): kill ->get_size()
not used anymore Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
1e6986c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
60 deletions
+1
-60
arch/arm64/kernel/ptrace.c
arch/arm64/kernel/ptrace.c
+0
-13
include/linux/regset.h
include/linux/regset.h
+1
-47
No files found.
arch/arm64/kernel/ptrace.c
View file @
c522401e
...
...
@@ -740,18 +740,6 @@ static unsigned int sve_size_from_header(struct user_sve_header const *header)
return
ALIGN
(
header
->
size
,
SVE_VQ_BYTES
);
}
static
unsigned
int
sve_get_size
(
struct
task_struct
*
target
,
const
struct
user_regset
*
regset
)
{
struct
user_sve_header
header
;
if
(
!
system_supports_sve
())
return
0
;
sve_init_header_from_task
(
&
header
,
target
);
return
sve_size_from_header
(
&
header
);
}
static
int
sve_get
(
struct
task_struct
*
target
,
const
struct
user_regset
*
regset
,
struct
membuf
to
)
...
...
@@ -1130,7 +1118,6 @@ static const struct user_regset aarch64_regsets[] = {
.
align
=
SVE_VQ_BYTES
,
.
regset_get
=
sve_get
,
.
set
=
sve_set
,
.
get_size
=
sve_get_size
,
},
#endif
#ifdef CONFIG_ARM64_PTR_AUTH
...
...
include/linux/regset.h
View file @
c522401e
...
...
@@ -132,28 +132,6 @@ typedef int user_regset_writeback_fn(struct task_struct *target,
const
struct
user_regset
*
regset
,
int
immediate
);
/**
* user_regset_get_size_fn - type of @get_size function in &struct user_regset
* @target: thread being examined
* @regset: regset being examined
*
* This call is optional; usually the pointer is %NULL.
*
* When provided, this function must return the current size of regset
* data, as observed by the @get function in &struct user_regset. The
* value returned must be a multiple of @size. The returned size is
* required to be valid only until the next time (if any) @regset is
* modified for @target.
*
* This function is intended for dynamically sized regsets. A regset
* that is statically sized does not need to implement it.
*
* This function should not be called directly: instead, callers should
* call regset_size() to determine the current size of a regset.
*/
typedef
unsigned
int
user_regset_get_size_fn
(
struct
task_struct
*
target
,
const
struct
user_regset
*
regset
);
/**
* struct user_regset - accessible thread CPU state
* @n: Number of slots (registers).
...
...
@@ -165,7 +143,6 @@ typedef unsigned int user_regset_get_size_fn(struct task_struct *target,
* @set: Function to store values.
* @active: Function to report if regset is active, or %NULL.
* @writeback: Function to write data back to user memory, or %NULL.
* @get_size: Function to return the regset's size, or %NULL.
*
* This data structure describes a machine resource we call a register set.
* This is part of the state of an individual thread, not necessarily
...
...
@@ -173,12 +150,7 @@ typedef unsigned int user_regset_get_size_fn(struct task_struct *target,
* similar slots, given by @n. Each slot is @size bytes, and aligned to
* @align bytes (which is at least @size). For dynamically-sized
* regsets, @n must contain the maximum possible number of slots for the
* regset, and @get_size must point to a function that returns the
* current regset size.
*
* Callers that need to know only the current size of the regset and do
* not care about its internal structure should call regset_size()
* instead of inspecting @n or calling @get_size.
* regset.
*
* For backward compatibility, the @get and @set methods must pad to, or
* accept, @n * @size bytes, even if the current regset size is smaller.
...
...
@@ -218,7 +190,6 @@ struct user_regset {
user_regset_set_fn
*
set
;
user_regset_active_fn
*
active
;
user_regset_writeback_fn
*
writeback
;
user_regset_get_size_fn
*
get_size
;
unsigned
int
n
;
unsigned
int
size
;
unsigned
int
align
;
...
...
@@ -422,21 +393,4 @@ static inline int copy_regset_from_user(struct task_struct *target,
return
regset
->
set
(
target
,
regset
,
offset
,
size
,
NULL
,
data
);
}
/**
* regset_size - determine the current size of a regset
* @target: thread to be examined
* @regset: regset to be examined
*
* Note that the returned size is valid only until the next time
* (if any) @regset is modified for @target.
*/
static
inline
unsigned
int
regset_size
(
struct
task_struct
*
target
,
const
struct
user_regset
*
regset
)
{
if
(
!
regset
->
get_size
)
return
regset
->
n
*
regset
->
size
;
else
return
regset
->
get_size
(
target
,
regset
);
}
#endif
/* <linux/regset.h> */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment