public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: steve@digidescorp.com
To: microblaze-uclinux@itee.uq.edu.au
Cc: monstr@monstr.eu, linux-kernel@vger.kernel.org,
	"Steven J. Magnani" <steve@digidescorp.com>
Subject: [PATCH v2] microblaze: nommu: Don't clobber R11 on syscalls
Date: Mon, 14 Dec 2009 16:24:18 -0600	[thread overview]
Message-ID: <1260829458-7503-1-git-send-email-steve@digidescorp.com> (raw)

The noMMU syscall trap has a bug that causes R11 to be zero on return to 
userland. Remove the extra "save" of R11 responsible for the bug, as well
as an unnecessary extra "load".

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
---
diff -uprN a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S
--- a/arch/microblaze/kernel/entry-nommu.S	2009-12-09 17:05:11.000000000 -0600
+++ b/arch/microblaze/kernel/entry-nommu.S	2009-12-14 11:29:37.000000000 -0600
@@ -208,8 +208,6 @@ ENTRY(_user_exception)
 	lwi	r1, r1, TS_THREAD_INFO		/* get the thread info */
 	/* calculate kernel stack pointer */
 	addik	r1, r1, THREAD_SIZE - PT_SIZE
-	swi	r11, r0, PER_CPU(R11_SAVE)	/* temporarily save r11 */
-	lwi	r11, r0, PER_CPU(KM)		/* load mode indicator */
 2:
 	swi	r11, r1, PT_MODE		/* store the mode */
 	lwi	r11, r0, PER_CPU(R11_SAVE)	/* reload r11 */


             reply	other threads:[~2009-12-14 22:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 22:24 steve [this message]
     [not found] ` <005801ca7d0f$deaef5b0$9c0ce110$@com>
2009-12-15  4:41   ` [microblaze-uclinux] [PATCH v2] microblaze: nommu: Don't clobber R11 on syscalls Steven J. Magnani
2009-12-15  7:24 ` Michal Simek

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=1260829458-7503-1-git-send-email-steve@digidescorp.com \
    --to=steve@digidescorp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=microblaze-uclinux@itee.uq.edu.au \
    --cc=monstr@monstr.eu \
    /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