mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liav Rehana <liavr@mellanox.com>
To: <vgupta@synopsys.com>
Cc: <vineet.gupta1@synopsys.com>, <noamca@mellanox.com>,
	<linux-snps-arc@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <eladkan@mellanox.com>,
	Liav Rehana <liavr@mellanox.com>
Subject: [PATCH] ARC: Change ld.as instruction to regular ld.
Date: Tue, 16 Aug 2016 10:55:35 +0300	[thread overview]
Message-ID: <1471334135-21801-1-git-send-email-liavr@mellanox.com> (raw)

From: Liav Rehana <liavr@mellanox.com>

The instruction ld.as takes as operands a base address and an offset,
and doesn't access the sum of these two, but the sum of the base
address and a shifted version of the offset.
This isn't what we want in that case, since it causes a bug during
the push and pop of r25, since his actual offset is given during
resume_user_mode_begin.
Thus, the use of ld solves this problem.

Signed-off-by: Liav Rehana <liavr@mellanox.com>
---
 arch/arc/include/asm/entry.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arc/include/asm/entry.h b/arch/arc/include/asm/entry.h
index 337ab6d..9d8f85d 100644
--- a/arch/arc/include/asm/entry.h
+++ b/arch/arc/include/asm/entry.h
@@ -138,7 +138,7 @@
 
 #ifdef CONFIG_ARC_CURR_IN_REG
 	; Retrieve orig r25 and save it with rest of callee_regs
-	ld.as   r12, [r12, PT_user_r25]
+	ld	r12, [r12, PT_user_r25]
 	PUSH	r12
 #else
 	PUSH	r25
@@ -194,7 +194,7 @@
 
 	; SP is back to start of pt_regs
 #ifdef CONFIG_ARC_CURR_IN_REG
-	st.as   r12, [sp, PT_user_r25]
+	st	r12, [sp, PT_user_r25]
 #endif
 .endm
 
-- 
1.7.1

             reply	other threads:[~2016-08-16 21:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16  7:55 Liav Rehana [this message]
2016-08-16 13:15 ` Alexey Brodkin
2016-08-16 15:47   ` Vineet Gupta
2016-08-17  6:23 Liav Rehana
2016-08-17 17:16 ` Vineet Gupta
2016-08-25 12:05 ` Alexey Brodkin
2016-08-25 17:40   ` Vineet Gupta

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=1471334135-21801-1-git-send-email-liavr@mellanox.com \
    --to=liavr@mellanox.com \
    --cc=eladkan@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=noamca@mellanox.com \
    --cc=vgupta@synopsys.com \
    --cc=vineet.gupta1@synopsys.com \
    /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

all inboxes | Powered by JetHome®