mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols
@ 2025-04-22  7:57 Ahmad Fatoum
  2025-04-22  7:57 ` [PATCH 2/3] ARM: define position-independent __pi_memmove/memset/memcpy Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-04-22  7:57 UTC (permalink / raw)
  To: barebox

From: Ahmad Fatoum <a.fatoum@barebox.org>

These are unused and we have memcpy_toio/fromio and memset_io
functions that should be used instead.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/lib32/memcpy.S | 2 --
 arch/arm/lib32/memset.S | 2 --
 2 files changed, 4 deletions(-)

diff --git a/arch/arm/lib32/memcpy.S b/arch/arm/lib32/memcpy.S
index 90f2b645aa0d..ffa4c8f394bf 100644
--- a/arch/arm/lib32/memcpy.S
+++ b/arch/arm/lib32/memcpy.S
@@ -56,11 +56,9 @@ UNWIND( .save	{r0, \regs}		)
 /* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
 
 ENTRY(__memcpy)
-ENTRY(mmiocpy)
 WEAK(memcpy)
 
 #include "copy_template.S"
 
 ENDPROC(memcpy)
-ENDPROC(mmiocpy)
 ENDPROC(__memcpy)
diff --git a/arch/arm/lib32/memset.S b/arch/arm/lib32/memset.S
index de75ae4d5ab4..b0c0e11e991b 100644
--- a/arch/arm/lib32/memset.S
+++ b/arch/arm/lib32/memset.S
@@ -14,7 +14,6 @@
 	.align	5
 
 ENTRY(__memset)
-ENTRY(mmioset)
 WEAK(memset)
 UNWIND( .fnstart         )
 	and	r1, r1, #255		@ cast to unsigned char
@@ -132,7 +131,6 @@ UNWIND( .fnstart            )
 	b	1b
 UNWIND( .fnend   )
 ENDPROC(memset)
-ENDPROC(mmioset)
 ENDPROC(__memset)
 
 ENTRY(__memset32)
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] ARM: define position-independent __pi_memmove/memset/memcpy
  2025-04-22  7:57 [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols Ahmad Fatoum
@ 2025-04-22  7:57 ` Ahmad Fatoum
  2025-04-22  7:57 ` [PATCH 3/3] RISC-V: " Ahmad Fatoum
  2025-04-22  8:57 ` [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-04-22  7:57 UTC (permalink / raw)
  To: barebox

From: Ahmad Fatoum <a.fatoum@barebox.org>

For future use in the EFI loader runtime service code, have ARM arch
support define a memcpy that's completely position independent with
the same name as in Linux.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/lib32/memcpy.S  | 1 +
 arch/arm/lib32/memmove.S | 1 +
 arch/arm/lib32/memset.S  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/arch/arm/lib32/memcpy.S b/arch/arm/lib32/memcpy.S
index ffa4c8f394bf..e48e077c5941 100644
--- a/arch/arm/lib32/memcpy.S
+++ b/arch/arm/lib32/memcpy.S
@@ -62,3 +62,4 @@ WEAK(memcpy)
 
 ENDPROC(memcpy)
 ENDPROC(__memcpy)
+SYM_FUNC_ALIAS(__pi_memcpy, __memcpy)
diff --git a/arch/arm/lib32/memmove.S b/arch/arm/lib32/memmove.S
index 6410554039fd..836286bc990f 100644
--- a/arch/arm/lib32/memmove.S
+++ b/arch/arm/lib32/memmove.S
@@ -204,3 +204,4 @@ WEAK(memmove)
 	UNWIND(	.fnend				)
 ENDPROC(memmove)
 ENDPROC(__memmove)
+SYM_FUNC_ALIAS(__pi_memmove, __memmove)
diff --git a/arch/arm/lib32/memset.S b/arch/arm/lib32/memset.S
index b0c0e11e991b..57dd1aa6daad 100644
--- a/arch/arm/lib32/memset.S
+++ b/arch/arm/lib32/memset.S
@@ -132,6 +132,7 @@ UNWIND( .fnstart            )
 UNWIND( .fnend   )
 ENDPROC(memset)
 ENDPROC(__memset)
+SYM_FUNC_ALIAS(__pi_memset, __memset)
 
 ENTRY(__memset32)
 UNWIND( .fnstart         )
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] RISC-V: define position-independent __pi_memmove/memset/memcpy
  2025-04-22  7:57 [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols Ahmad Fatoum
  2025-04-22  7:57 ` [PATCH 2/3] ARM: define position-independent __pi_memmove/memset/memcpy Ahmad Fatoum
@ 2025-04-22  7:57 ` Ahmad Fatoum
  2025-04-22  8:57 ` [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-04-22  7:57 UTC (permalink / raw)
  To: barebox

From: Ahmad Fatoum <a.fatoum@barebox.org>

For future use in the EFI loader runtime service code, have RISC-V arch
support define a memcpy that's completely position independent with
the same name as in Linux.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/riscv/lib/memcpy.S  | 1 +
 arch/riscv/lib/memmove.S | 1 +
 arch/riscv/lib/memset.S  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/arch/riscv/lib/memcpy.S b/arch/riscv/lib/memcpy.S
index 51ab716253fa..c178ebf0996e 100644
--- a/arch/riscv/lib/memcpy.S
+++ b/arch/riscv/lib/memcpy.S
@@ -106,3 +106,4 @@ WEAK(memcpy)
 6:
 	ret
 END(__memcpy)
+SYM_FUNC_ALIAS(__pi_memcpy, __memcpy)
diff --git a/arch/riscv/lib/memmove.S b/arch/riscv/lib/memmove.S
index 07d1d2152ba5..442889cdc990 100644
--- a/arch/riscv/lib/memmove.S
+++ b/arch/riscv/lib/memmove.S
@@ -62,3 +62,4 @@ exit_memcpy:
         move a1, t1
         ret
 END(__memmove)
+SYM_FUNC_ALIAS(__pi_memmove, __memmove)
diff --git a/arch/riscv/lib/memset.S b/arch/riscv/lib/memset.S
index 34c5360c6705..7b1b642dde19 100644
--- a/arch/riscv/lib/memset.S
+++ b/arch/riscv/lib/memset.S
@@ -111,3 +111,4 @@ WEAK(memset)
 6:
 	ret
 END(__memset)
+SYM_FUNC_ALIAS(__pi_memset, __memset)
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols
  2025-04-22  7:57 [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols Ahmad Fatoum
  2025-04-22  7:57 ` [PATCH 2/3] ARM: define position-independent __pi_memmove/memset/memcpy Ahmad Fatoum
  2025-04-22  7:57 ` [PATCH 3/3] RISC-V: " Ahmad Fatoum
@ 2025-04-22  8:57 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-04-22  8:57 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Tue, 22 Apr 2025 09:57:12 +0200, Ahmad Fatoum wrote:
> These are unused and we have memcpy_toio/fromio and memset_io
> functions that should be used instead.
> 
> 

Applied, thanks!

[1/3] ARM: drop unused mmiocpy/mmioset symbols
      https://git.pengutronix.de/cgit/barebox/commit/?id=ea6616794007 (link may not be stable)
[2/3] ARM: define position-independent __pi_memmove/memset/memcpy
      https://git.pengutronix.de/cgit/barebox/commit/?id=15963e802ba0 (link may not be stable)
[3/3] RISC-V: define position-independent __pi_memmove/memset/memcpy
      https://git.pengutronix.de/cgit/barebox/commit/?id=07b8c884c86d (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-22 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22  7:57 [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols Ahmad Fatoum
2025-04-22  7:57 ` [PATCH 2/3] ARM: define position-independent __pi_memmove/memset/memcpy Ahmad Fatoum
2025-04-22  7:57 ` [PATCH 3/3] RISC-V: " Ahmad Fatoum
2025-04-22  8:57 ` [PATCH 1/3] ARM: drop unused mmiocpy/mmioset symbols Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox