git: c1da17a86cdb - main - arm: Garbage collect _arm_memcpy/_arm_bzero.
Olivier Houchard
cognet at FreeBSD.org
Wed Jun 30 12:56:12 UTC 2021
The branch main has been updated by cognet:
URL: https://cgit.FreeBSD.org/src/commit/?id=c1da17a86cdbb364f1c946b8346601e72643daf1
commit c1da17a86cdbb364f1c946b8346601e72643daf1
Author: Olivier Houchard <cognet at FreeBSD.org>
AuthorDate: 2021-06-25 23:06:26 +0000
Commit: Olivier Houchard <cognet at FreeBSD.org>
CommitDate: 2021-06-30 12:53:57 +0000
arm: Garbage collect _arm_memcpy/_arm_bzero.
Remove any attempt to use _arm_memcpy and _arm_bzero. It was used by some
xscale platforms to provide functions to use the DMA engine for big
zeroing/copying work, but those platforms are long gone, and it's unlikely
anything else will use those.
---
sys/arm/arm/bcopyinout.S | 5 -----
sys/arm/arm/bcopyinout_xscale.S | 44 -----------------------------------------
sys/arm/arm/machdep.c | 5 -----
sys/arm/arm/support.S | 41 --------------------------------------
sys/arm/include/md_var.h | 10 ----------
5 files changed, 105 deletions(-)
diff --git a/sys/arm/arm/bcopyinout.S b/sys/arm/arm/bcopyinout.S
index 2a9d48f989ea..dcdf8ed5af0c 100644
--- a/sys/arm/arm/bcopyinout.S
+++ b/sys/arm/arm/bcopyinout.S
@@ -41,11 +41,6 @@
#include <machine/asm.h>
#include <sys/errno.h>
-.L_arm_memcpy:
- .word _C_LABEL(_arm_memcpy)
-.L_min_memcpy_size:
- .word _C_LABEL(_min_memcpy_size)
-
__FBSDID("$FreeBSD$");
#include <arm/arm/bcopyinout_xscale.S>
diff --git a/sys/arm/arm/bcopyinout_xscale.S b/sys/arm/arm/bcopyinout_xscale.S
index e592b901201f..4849ab9e794a 100644
--- a/sys/arm/arm/bcopyinout_xscale.S
+++ b/sys/arm/arm/bcopyinout_xscale.S
@@ -67,28 +67,6 @@ ENTRY(copyin)
movcs r0, #EFAULT
RETc(cs)
- ldr r3, .L_arm_memcpy
- ldr r3, [r3]
- cmp r3, #0
- beq .Lnormal
- ldr r3, .L_min_memcpy_size
- ldr r3, [r3]
- cmp r2, r3
- blt .Lnormal
- stmfd sp!, {r0-r2, r4, lr}
- mov r3, r0
- mov r0, r1
- mov r1, r3
- mov r3, #2 /* SRC_IS_USER */
- ldr r4, .L_arm_memcpy
- mov lr, pc
- ldr pc, [r4]
- cmp r0, #0
- ldmfd sp!, {r0-r2, r4, lr}
- moveq r0, #0
- RETeq
-
-.Lnormal:
stmfd sp!, {r10-r11, lr}
GET_PCB(r10)
@@ -452,28 +430,6 @@ ENTRY(copyout)
movcs r0, #EFAULT
RETc(cs)
- ldr r3, .L_arm_memcpy
- ldr r3, [r3]
- cmp r3, #0
- beq .Lnormale
- ldr r3, .L_min_memcpy_size
- ldr r3, [r3]
- cmp r2, r3
- blt .Lnormale
- stmfd sp!, {r0-r2, r4, lr}
- mov r3, r0
- mov r0, r1
- mov r1, r3
- mov r3, #1 /* DST_IS_USER */
- ldr r4, .L_arm_memcpy
- mov lr, pc
- ldr pc, [r4]
- cmp r0, #0
- ldmfd sp!, {r0-r2, r4, lr}
- moveq r0, #0
- RETeq
-
-.Lnormale:
stmfd sp!, {r10-r11, lr}
GET_PCB(r10)
diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c
index 3d966527599d..4f26c6e9ebf9 100644
--- a/sys/arm/arm/machdep.c
+++ b/sys/arm/arm/machdep.c
@@ -122,11 +122,6 @@ vm_offset_t vector_page;
/* The address at which the kernel was loaded. Set early in initarm(). */
vm_paddr_t arm_physmem_kernaddr;
-int (*_arm_memcpy)(void *, void *, int, int) = NULL;
-int (*_arm_bzero)(void *, int, int) = NULL;
-int _min_memcpy_size = 0;
-int _min_bzero_size = 0;
-
extern int *end;
#ifdef FDT
diff --git a/sys/arm/arm/support.S b/sys/arm/arm/support.S
index a3ee3c3b93ba..7a39c283aed1 100644
--- a/sys/arm/arm/support.S
+++ b/sys/arm/arm/support.S
@@ -93,14 +93,6 @@ __FBSDID("$FreeBSD$");
.syntax unified
-.L_arm_memcpy:
- .word _C_LABEL(_arm_memcpy)
-.L_arm_bzero:
- .word _C_LABEL(_arm_bzero)
-.L_min_memcpy_size:
- .word _C_LABEL(_min_memcpy_size)
-.L_min_bzero_size:
- .word _C_LABEL(_min_bzero_size)
/*
* memset: Sets a block of memory to the specified value
*
@@ -114,22 +106,6 @@ __FBSDID("$FreeBSD$");
*/
/* LINTSTUB: Func: void bzero(void *, size_t) */
ENTRY(bzero)
- ldr r3, .L_arm_bzero
- ldr r3, [r3]
- cmp r3, #0
- beq .Lnormal0
- ldr r2, .L_min_bzero_size
- ldr r2, [r2]
- cmp r1, r2
- blt .Lnormal0
- stmfd sp!, {r0, r1, lr}
- mov r2, #0
- mov lr, pc
- mov pc, r3
- cmp r0, #0
- ldmfd sp!, {r0, r1, lr}
- RETeq
-.Lnormal0:
mov r3, #0x00
b do_memset
END(bzero)
@@ -779,23 +755,6 @@ ENTRY(memcpy)
bhi .Lnormal
#endif
#endif
- ldr r3, .L_arm_memcpy
- ldr r3, [r3]
- cmp r3, #0
- beq .Lnormal
- ldr r3, .L_min_memcpy_size
- ldr r3, [r3]
- cmp r2, r3
- blt .Lnormal
- stmfd sp!, {r0-r2, r4, lr}
- mov r3, #0
- ldr r4, .L_arm_memcpy
- mov lr, pc
- ldr pc, [r4]
- cmp r0, #0
- ldmfd sp!, {r0-r2, r4, lr}
- RETeq
-.Lnormal:
mov r3, r0 /* We must not clobber r0 */
/* Word-align the destination buffer */
diff --git a/sys/arm/include/md_var.h b/sys/arm/include/md_var.h
index d60992f104e1..19468bd30e02 100644
--- a/sys/arm/include/md_var.h
+++ b/sys/arm/include/md_var.h
@@ -42,16 +42,6 @@ extern u_long elf_hwcap;
extern u_long elf_hwcap2;
extern vm_paddr_t arm_physmem_kernaddr;
-extern int (*_arm_memcpy)(void *, void *, int, int);
-extern int (*_arm_bzero)(void *, int, int);
-
-extern int _min_memcpy_size;
-extern int _min_bzero_size;
-
-#define DST_IS_USER 0x1
-#define SRC_IS_USER 0x2
-#define IS_PHYSICAL 0x4
-
enum cpu_class {
CPU_CLASS_NONE,
CPU_CLASS_CORTEXA,
More information about the dev-commits-src-main
mailing list