From: Sergey Matyukevich <geomatsi@gmail.com>
To: linux-snps-arc@lists.infradead.org
Cc: Vineet Gupta <vgupta@kernel.org>,
Vladimir Isaev <isaev@synopsys.com>,
Sergey Matyukevich <geomatsi@gmail.com>,
Sergey Matyukevich <sergey.matyukevich@synopsys.com>
Subject: [RFC PATCH 11/13] ARC: head: elide ZOL
Date: Tue, 22 Feb 2022 17:15:04 +0300 [thread overview]
Message-ID: <20220222141506.4003433-12-geomatsi@gmail.com> (raw)
In-Reply-To: <20220222141506.4003433-1-geomatsi@gmail.com>
From: Vineet Gupta <vgupta@kernel.org>
Add entry implementation based on double load/stores
if ZOL is not supported.
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
---
arch/arc/include/asm/asm-macro-ll64-emul.h | 3 +++
arch/arc/include/asm/entry.h | 2 ++
arch/arc/kernel/head.S | 8 +++++++-
arch/arc/kernel/vmlinux.lds.S | 2 +-
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/arc/include/asm/asm-macro-ll64-emul.h b/arch/arc/include/asm/asm-macro-ll64-emul.h
index 886320cc74ad..417c892d557e 100644
--- a/arch/arc/include/asm/asm-macro-ll64-emul.h
+++ b/arch/arc/include/asm/asm-macro-ll64-emul.h
@@ -15,6 +15,9 @@
.ifeqs "\d", "r6"
st.ab r7, [\s, \incr / 2]
.endif
+ .ifeqs "\d", "0"
+ st.ab \d, [\s, \incr / 2]
+ .endif
.endm
.macro LD64.ab d, s, incr
diff --git a/arch/arc/include/asm/entry.h b/arch/arc/include/asm/entry.h
index fcdd59d77f42..1bc9f730e1e2 100644
--- a/arch/arc/include/asm/entry.h
+++ b/arch/arc/include/asm/entry.h
@@ -7,6 +7,8 @@
#ifndef __ASM_ARC_ENTRY_H
#define __ASM_ARC_ENTRY_H
+#include <asm/asm-offsets.h>
+#include <asm/assembler.h>
#include <asm/unistd.h> /* For NR_syscalls defination */
#include <asm/arcregs.h>
#include <asm/ptrace.h>
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S
index 9152782444b5..17b5426d4ca4 100644
--- a/arch/arc/kernel/head.S
+++ b/arch/arc/kernel/head.S
@@ -121,13 +121,19 @@ ENTRY(stext)
#endif
; Clear BSS before updating any globals
- ; XXX: use ZOL here
mov r5, __bss_start
sub r6, __bss_stop, r5
+#ifndef CONFIG_ARC_LACKS_ZOL
lsr.f lp_count, r6, 2
lpnz 1f
st.ab 0, [r5, 4]
1:
+#else
+ lsr r6, r6, 3
+1:
+ ST64.ab 0, r5, 8
+ DBNZR r6, 1b
+#endif
; Uboot - kernel ABI
; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2
diff --git a/arch/arc/kernel/vmlinux.lds.S b/arch/arc/kernel/vmlinux.lds.S
index 529ae50f9fe2..00aeb89bd169 100644
--- a/arch/arc/kernel/vmlinux.lds.S
+++ b/arch/arc/kernel/vmlinux.lds.S
@@ -107,7 +107,7 @@ SECTIONS
_edata = .;
- BSS_SECTION(4, 4, 4)
+ BSS_SECTION(8, 8, 8)
#ifdef CONFIG_ARC_DW2_UNWIND
. = ALIGN(PAGE_SIZE);
--
2.25.1
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2022-02-22 14:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 14:14 [RFC PATCH 00/13] ARC: handle the lack of ZOL support Sergey Matyukevich
2022-02-22 14:14 ` [RFC PATCH 01/13] ARC: uaccess: elide unaligned handling if hardware supports Sergey Matyukevich
2022-02-22 14:14 ` [RFC PATCH 02/13] ARC: Kconfig: introduce option to disable ZOL Sergey Matyukevich
2022-02-22 14:14 ` [RFC PATCH 03/13] ARC: uaccess: drop CC_OPTIMIZE_FOR_SIZE Sergey Matyukevich
2022-02-22 14:14 ` [RFC PATCH 04/13] ARC: uaccess: elide ZOL, use double load/stores Sergey Matyukevich
2022-02-22 14:14 ` [RFC PATCH 05/13] ARCv2: memset: don't prefetch for len == 0 which happens a lot Sergey Matyukevich
2022-02-22 14:14 ` [RFC PATCH 06/13] ARCv2: memset: elide unaligned handling if hardware supports Sergey Matyukevich
2022-02-22 14:15 ` [RFC PATCH 07/13] ARCv2: memset: rewrite using double load/stores Sergey Matyukevich
2022-02-22 14:15 ` [RFC PATCH 08/13] ARC: string: use generic C code if no ZOL support Sergey Matyukevich
2022-02-22 14:15 ` [RFC PATCH 09/13] ARC: delay: elide ZOL Sergey Matyukevich
2022-02-22 14:15 ` [RFC PATCH 10/13] ARC: checksum: " Sergey Matyukevich
2022-02-22 14:15 ` Sergey Matyukevich [this message]
2022-02-22 14:15 ` [RFC PATCH 12/13] ARC: build: inhibit ZOL generation by compiler Sergey Matyukevich
2022-02-22 14:15 ` [RFC PATCH 13/13] ARC: pt_regs: handle the case when ZOL is not supported Sergey Matyukevich
2022-02-28 2:09 ` [RFC PATCH 00/13] ARC: handle the lack of ZOL support Vineet Gupta
2022-03-03 19:22 ` Sergey Matyukevich
2022-03-23 10:09 ` [RFC PATCH 00/13] ARC: handle the lack of ZOL supporty Sergey Matyukevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220222141506.4003433-12-geomatsi@gmail.com \
--to=geomatsi@gmail.com \
--cc=isaev@synopsys.com \
--cc=linux-snps-arc@lists.infradead.org \
--cc=sergey.matyukevich@synopsys.com \
--cc=vgupta@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox