Skip to content

Commit

Permalink
xtensa: drop unused coprocessor helper functions
Browse files Browse the repository at this point in the history
coprocessor_save, coprocessor_load and coprocessor_restore are neither
used nor exported for use by modules. Drop them.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
Max Filippov committed Dec 3, 2018
1 parent 633f1ff commit 3ffc2df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 68 deletions.
3 changes: 0 additions & 3 deletions arch/xtensa/include/asm/coprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ typedef struct { XCHAL_CP7_SA_LIST(2) } xtregs_cp7_t
__attribute__ ((aligned (XCHAL_CP7_SA_ALIGN)));

extern struct thread_info* coprocessor_owner[XCHAL_CP_MAX];
extern void coprocessor_save(void*, int);
extern void coprocessor_load(void*, int);
extern void coprocessor_flush(struct thread_info*, int);
extern void coprocessor_restore(struct thread_info*, int);

extern void coprocessor_release_all(struct thread_info*);
extern void coprocessor_flush_all(struct thread_info*);
Expand Down
68 changes: 3 additions & 65 deletions arch/xtensa/kernel/coprocessor.S
Original file line number Diff line number Diff line change
Expand Up @@ -105,63 +105,17 @@
LOAD_CP_REGS_TAB(7)

/*
* coprocessor_save(buffer, index)
* a2 a3
* coprocessor_load(buffer, index)
* a2 a3
*
* Save or load coprocessor registers for coprocessor 'index'.
* The register values are saved to or loaded from them 'buffer' address.
*
* Note that these functions don't update the coprocessor_owner information!
*
*/

ENTRY(coprocessor_save)

entry a1, 32
s32i a0, a1, 0
movi a0, .Lsave_cp_regs_jump_table
addx8 a3, a3, a0
l32i a3, a3, 0
beqz a3, 1f
add a0, a0, a3
callx0 a0
1: l32i a0, a1, 0
retw

ENDPROC(coprocessor_save)

ENTRY(coprocessor_load)

entry a1, 32
s32i a0, a1, 0
movi a0, .Lload_cp_regs_jump_table
addx4 a3, a3, a0
l32i a3, a3, 0
beqz a3, 1f
add a0, a0, a3
callx0 a0
1: l32i a0, a1, 0
retw

ENDPROC(coprocessor_load)

/*
* coprocessor_flush(struct task_info*, index)
* coprocessor_flush(struct thread_info*, index)
* a2 a3
* coprocessor_restore(struct task_info*, index)
* a2 a3
*
* Save or load coprocessor registers for coprocessor 'index'.
* Save coprocessor registers for coprocessor 'index'.
* The register values are saved to or loaded from the coprocessor area
* inside the task_info structure.
*
* Note that these functions don't update the coprocessor_owner information!
* Note that this function doesn't update the coprocessor_owner information!
*
*/


ENTRY(coprocessor_flush)

entry a1, 32
Expand All @@ -179,22 +133,6 @@ ENTRY(coprocessor_flush)

ENDPROC(coprocessor_flush)

ENTRY(coprocessor_restore)
entry a1, 32
s32i a0, a1, 0
movi a0, .Lload_cp_regs_jump_table
addx4 a3, a3, a0
l32i a4, a3, 4
l32i a3, a3, 0
add a2, a2, a4
beqz a3, 1f
add a0, a0, a3
callx0 a0
1: l32i a0, a1, 0
retw

ENDPROC(coprocessor_restore)

/*
* Entry condition:
*
Expand Down

0 comments on commit 3ffc2df

Please sign in to comment.