linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND]     csky: add alignment for the delay code
@ 2022-12-19  6:36 Jialu Xu
  0 siblings, 0 replies; only message in thread
From: Jialu Xu @ 2022-12-19  6:36 UTC (permalink / raw)
  To: guoren, linux-csky; +Cc: linux-kernel, Jialu Xu

    Specify 8 bytes alignment for the function __delay or we get bad delay
    like udelay(10) will be 25us in fact.

    Thanks for Guo Ren's help.

Signed-off-by: Jialu Xu <xujialu@vimux.org>
---
 arch/csky/lib/delay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/csky/lib/delay.c b/arch/csky/lib/delay.c
index 22570b0790d6..f5db317313bb 100644
--- a/arch/csky/lib/delay.c
+++ b/arch/csky/lib/delay.c
@@ -5,7 +5,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 
-void __delay(unsigned long loops)
+void __aligned(8) __delay(unsigned long loops)
 {
 	asm volatile (
 		"mov r0, r0\n"
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-19  6:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19  6:36 [PATCH RESEND] csky: add alignment for the delay code Jialu Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).