Commit 228a9f0b authored by Andrew Thoelke's avatar Andrew Thoelke
Browse files

Remove unused or invalid asm helper functions

There are a small number of non-EL specific helper functions
which are no longer used, and also some unusable helper
functions for non-existant registers.

This change removes all of these functions.

Change-Id: Idd656cef3b59cf5c46fe2be4029d72288b649c24
parent 7935d0a5
...@@ -194,9 +194,7 @@ extern unsigned long read_ttbr0_el1(void); ...@@ -194,9 +194,7 @@ extern unsigned long read_ttbr0_el1(void);
extern unsigned long read_ttbr0_el2(void); extern unsigned long read_ttbr0_el2(void);
extern unsigned long read_ttbr0_el3(void); extern unsigned long read_ttbr0_el3(void);
extern unsigned long read_ttbr1(void);
extern unsigned long read_ttbr1_el1(void); extern unsigned long read_ttbr1_el1(void);
extern unsigned long read_ttbr1_el2(void);
extern unsigned long read_cptr_el2(void); extern unsigned long read_cptr_el2(void);
extern unsigned long read_cptr_el3(void); extern unsigned long read_cptr_el3(void);
...@@ -228,12 +226,10 @@ extern void write_esr_el1(unsigned long); ...@@ -228,12 +226,10 @@ extern void write_esr_el1(unsigned long);
extern void write_esr_el2(unsigned long); extern void write_esr_el2(unsigned long);
extern void write_esr_el3(unsigned long); extern void write_esr_el3(unsigned long);
extern void write_afsr0(unsigned long);
extern void write_afsr0_el1(unsigned long); extern void write_afsr0_el1(unsigned long);
extern void write_afsr0_el2(unsigned long); extern void write_afsr0_el2(unsigned long);
extern void write_afsr0_el3(unsigned long); extern void write_afsr0_el3(unsigned long);
extern void write_afsr1(unsigned long);
extern void write_afsr1_el1(unsigned long); extern void write_afsr1_el1(unsigned long);
extern void write_afsr1_el2(unsigned long); extern void write_afsr1_el2(unsigned long);
extern void write_afsr1_el3(unsigned long); extern void write_afsr1_el3(unsigned long);
...@@ -263,7 +259,6 @@ extern void write_ttbr0_el2(unsigned long); ...@@ -263,7 +259,6 @@ extern void write_ttbr0_el2(unsigned long);
extern void write_ttbr0_el3(unsigned long); extern void write_ttbr0_el3(unsigned long);
extern void write_ttbr1_el1(unsigned long); extern void write_ttbr1_el1(unsigned long);
extern void write_ttbr1_el2(unsigned long);
extern void write_cpuectlr(unsigned long); extern void write_cpuectlr(unsigned long);
extern void write_cptr_el2(unsigned long); extern void write_cptr_el2(unsigned long);
......
...@@ -46,22 +46,18 @@ ...@@ -46,22 +46,18 @@
.globl read_daif .globl read_daif
.globl write_daif .globl write_daif
.globl read_spsr
.globl read_spsr_el1 .globl read_spsr_el1
.globl read_spsr_el2 .globl read_spsr_el2
.globl read_spsr_el3 .globl read_spsr_el3
.globl write_spsr
.globl write_spsr_el1 .globl write_spsr_el1
.globl write_spsr_el2 .globl write_spsr_el2
.globl write_spsr_el3 .globl write_spsr_el3
.globl read_elr
.globl read_elr_el1 .globl read_elr_el1
.globl read_elr_el2 .globl read_elr_el2
.globl read_elr_el3 .globl read_elr_el3
.globl write_elr
.globl write_elr_el1 .globl write_elr_el1
.globl write_elr_el2 .globl write_elr_el2
.globl write_elr_el3 .globl write_elr_el3
...@@ -153,16 +149,6 @@ func write_daif ...@@ -153,16 +149,6 @@ func write_daif
ret ret
func read_spsr
mrs x0, CurrentEl
cmp x0, #(MODE_EL1 << MODE_EL_SHIFT)
b.eq read_spsr_el1
cmp x0, #(MODE_EL2 << MODE_EL_SHIFT)
b.eq read_spsr_el2
cmp x0, #(MODE_EL3 << MODE_EL_SHIFT)
b.eq read_spsr_el3
func read_spsr_el1 func read_spsr_el1
mrs x0, spsr_el1 mrs x0, spsr_el1
ret ret
...@@ -178,16 +164,6 @@ func read_spsr_el3 ...@@ -178,16 +164,6 @@ func read_spsr_el3
ret ret
func write_spsr
mrs x1, CurrentEl
cmp x1, #(MODE_EL1 << MODE_EL_SHIFT)
b.eq write_spsr_el1
cmp x1, #(MODE_EL2 << MODE_EL_SHIFT)
b.eq write_spsr_el2
cmp x1, #(MODE_EL3 << MODE_EL_SHIFT)
b.eq write_spsr_el3
func write_spsr_el1 func write_spsr_el1
msr spsr_el1, x0 msr spsr_el1, x0
ret ret
...@@ -203,16 +179,6 @@ func write_spsr_el3 ...@@ -203,16 +179,6 @@ func write_spsr_el3
ret ret
func read_elr
mrs x0, CurrentEl
cmp x0, #(MODE_EL1 << MODE_EL_SHIFT)
b.eq read_elr_el1
cmp x0, #(MODE_EL2 << MODE_EL_SHIFT)
b.eq read_elr_el2
cmp x0, #(MODE_EL3 << MODE_EL_SHIFT)
b.eq read_elr_el3
func read_elr_el1 func read_elr_el1
mrs x0, elr_el1 mrs x0, elr_el1
ret ret
...@@ -228,16 +194,6 @@ func read_elr_el3 ...@@ -228,16 +194,6 @@ func read_elr_el3
ret ret
func write_elr
mrs x1, CurrentEl
cmp x1, #(MODE_EL1 << MODE_EL_SHIFT)
b.eq write_elr_el1
cmp x1, #(MODE_EL2 << MODE_EL_SHIFT)
b.eq write_elr_el2
cmp x1, #(MODE_EL3 << MODE_EL_SHIFT)
b.eq write_elr_el3
func write_elr_el1 func write_elr_el1
msr elr_el1, x0 msr elr_el1, x0
ret ret
......
...@@ -125,10 +125,7 @@ ...@@ -125,10 +125,7 @@
.globl write_ttbr0_el3 .globl write_ttbr0_el3
.globl read_ttbr1_el1 .globl read_ttbr1_el1
.globl read_ttbr1_el2
.globl write_ttbr1
.globl write_ttbr1_el1 .globl write_ttbr1_el1
.globl write_ttbr1_el2
.globl read_cpacr .globl read_cpacr
.globl write_cpacr .globl write_cpacr
...@@ -160,8 +157,6 @@ ...@@ -160,8 +157,6 @@
#if SUPPORT_VFP #if SUPPORT_VFP
.globl enable_vfp .globl enable_vfp
.globl read_fpexc
.globl write_fpexc
#endif #endif
...@@ -577,11 +572,6 @@ func write_tcr_el3 ...@@ -577,11 +572,6 @@ func write_tcr_el3
* CPTR accessors * CPTR accessors
* ----------------------------------------------------- * -----------------------------------------------------
*/ */
func read_cptr_el1
b read_cptr_el1
ret
func read_cptr_el2 func read_cptr_el2
mrs x0, cptr_el2 mrs x0, cptr_el2
ret ret
...@@ -592,10 +582,6 @@ func read_cptr_el3 ...@@ -592,10 +582,6 @@ func read_cptr_el3
ret ret
func write_cptr_el1
b write_cptr_el1
func write_cptr_el2 func write_cptr_el2
msr cptr_el2, x0 msr cptr_el2, x0
ret ret
...@@ -649,27 +635,11 @@ func read_ttbr1_el1 ...@@ -649,27 +635,11 @@ func read_ttbr1_el1
ret ret
func read_ttbr1_el2
b read_ttbr1_el2
func read_ttbr1_el3
b read_ttbr1_el3
func write_ttbr1_el1 func write_ttbr1_el1
msr ttbr1_el1, x0 msr ttbr1_el1, x0
ret ret
func write_ttbr1_el2
b write_ttbr1_el2
func write_ttbr1_el3
b write_ttbr1_el3
func read_hcr func read_hcr
mrs x0, hcr_el2 mrs x0, hcr_el2
ret ret
...@@ -762,14 +732,4 @@ func enable_vfp ...@@ -762,14 +732,4 @@ func enable_vfp
isb isb
ret ret
func read_fpexc
b read_fpexc
ret
func write_fpexc
b write_fpexc
ret
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment