From: Vineet Gupta <vgupta@kernel.org>
To: linux-snps-arc@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
Shahab Vahedi <Shahab.Vahedi@synopsys.com>,
Alexey Brodkin <abrodkin@synopsys.com>,
Vineet Gupta <vgupta@kernel.org>
Subject: [PATCH 17/20] ARC: entry: replace 8 byte OR with 4 byte BSET
Date: Mon, 14 Aug 2023 17:48:10 -0700 [thread overview]
Message-ID: <20230815004813.555115-18-vgupta@kernel.org> (raw)
In-Reply-To: <20230815004813.555115-1-vgupta@kernel.org>
FAKE_RET_FROM_EXCEPTION drops down to pure kernel mode. It currently has
an 8 byte instruction which can be replaced with 4 byte BSET
This is applicable to both ARCv2 and ARCv3 entr code.
ARCv2 current
------------
00000804 <EV_Trap>:
...
874: 216a 1280 lr r9,[status32]
878: 2146 1809 bic r9,r9,0x20
87c: 2105 1f89 8000 0000 or r9,r9,0x80000000
^^^^^^^^^
884: 2029 8240 kflag r9
ARCv2 after
----------
000007e0 <EV_Trap>:
...
850: 216a 1280 lr r9,[status32]
854: 2150 1149 bclr r9,r9,0x5
858: 214f 17c9 bset r9,r9,0x1f
85c: 2029 8240 kflag r9
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
---
arch/arc/include/asm/entry-arcv2.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arc/include/asm/entry-arcv2.h b/arch/arc/include/asm/entry-arcv2.h
index 11b48ab39154..f7c9b3915d10 100644
--- a/arch/arc/include/asm/entry-arcv2.h
+++ b/arch/arc/include/asm/entry-arcv2.h
@@ -274,8 +274,8 @@
.macro FAKE_RET_FROM_EXCPN
lr r9, [status32]
- bic r9, r9, STATUS_AE_MASK
- or r9, r9, STATUS_IE_MASK
+ bclr r9, r9, STATUS_AE_BIT
+ bset r9, r9, STATUS_IE_BIT
kflag r9
.endm
--
2.34.1
next prev parent reply other threads:[~2023-08-15 0:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 0:47 [PATCH 00/20] ARC updates Vineet Gupta
2023-08-15 0:47 ` [PATCH 01/20] ARC: uaccess: remove arc specific out-of-line handles for -Os Vineet Gupta
2023-08-15 0:47 ` [PATCH 02/20] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user Vineet Gupta
2023-08-15 0:47 ` [PATCH 03/20] ARC: uaccess: elide unaliged handling if hardware supports Vineet Gupta
2023-08-15 0:47 ` [PATCH 04/20] ARCv2: memset: don't prefetch for len == 0 which happens a alot Vineet Gupta
2023-08-15 0:47 ` [PATCH 05/20] ARC: boot log: eliminate struct cpuinfo_arc #1: mm Vineet Gupta
2023-08-15 0:47 ` [PATCH 06/20] ARC: boot log: eliminate struct cpuinfo_arc #2: cache Vineet Gupta
2023-08-15 0:48 ` [PATCH 07/20] ARC: boot log: eliminate struct cpuinfo_arc #3: don't export Vineet Gupta
2023-08-15 0:48 ` [PATCH 08/20] ARC: boot log: eliminate struct cpuinfo_arc #4: boot log per ISA Vineet Gupta
2023-08-15 0:48 ` [PATCH 09/20] ARC: entry: use gp to cache task pointer (vs. r25) Vineet Gupta
2023-08-15 0:48 ` [PATCH 10/20] ARC: kernel stack: INIT_THREAD need not setup @init_stack in @ksp Vineet Gupta
2023-08-15 0:48 ` [PATCH 11/20] ARC: __switch_to: asm with dwarf ops (vs. inline asm) Vineet Gupta
2023-08-15 0:48 ` [PATCH 12/20] ARC: __switch_to: move ksp to thread_info from thread_struct Vineet Gupta
2023-08-15 0:48 ` [PATCH 13/20] ARC: entry: rework (non-functional) Vineet Gupta
2023-08-15 0:48 ` [PATCH 14/20] ARC: entry: ARcompact EV_ProtV to use r10 directly Vineet Gupta
2023-08-15 0:48 ` [PATCH 15/20] ARC: entry: EV_MachineCheck dont re-read ECR Vineet Gupta
2023-08-15 0:48 ` [PATCH 16/20] ARC: entry: Add more common chores to EXCEPTION_PROLOGUE Vineet Gupta
2023-08-18 12:56 ` Pavel.Kozlov
2023-08-19 23:13 ` Vineet Gupta
2023-08-19 23:14 ` [PATCH v2 " Vineet Gupta
2023-08-15 0:48 ` Vineet Gupta [this message]
2023-08-15 0:48 ` [PATCH 18/20] ARC: entry: replace 8 byte ADD.ne with 4 byte ADD2.ne Vineet Gupta
2023-08-15 0:48 ` [PATCH 19/20] ARCv2: entry: rearrange pt_regs slightly Vineet Gupta
2023-08-15 0:48 ` [PATCH 20/20] ARC: pt_regs: create seperate type for ecr Vineet Gupta
2023-08-15 6:03 ` kernel test robot
2023-08-18 3:35 ` [PATCH v2 " Vineet Gupta
2023-08-17 12:09 ` [PATCH " Pavel.Kozlov
2023-08-18 3:37 ` Vineet Gupta
2023-08-22 14:07 ` [PATCH 00/20] ARC updates Pavel Kozlov
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=20230815004813.555115-18-vgupta@kernel.org \
--to=vgupta@kernel.org \
--cc=Shahab.Vahedi@synopsys.com \
--cc=abrodkin@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.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