public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh2(A) exception handler update
Date: Sat, 19 Jul 2008 19:35:50 +0000	[thread overview]
Message-ID: <87hcalwtt5.wl%ysato@users.sourceforge.jp> (raw)
In-Reply-To: <87vdzfowr0.wl%ysato@users.sourceforge.jp>

At Thu, 17 Jul 2008 10:46:34 -0400,
Yoshinori Sato wrote:
> 
> At Thu, 17 Jul 2008 16:09:43 +0900,
> Paul Mundt wrote:
> > 
> > On Thu, Jul 10, 2008 at 01:20:03AM +0900, Yoshinori Sato wrote:
> > > This patch is
> > > 
> > > By sh2
> > > - Remove duplicate code
> > > - Reduce stack usage
> > > - Cleanup and little optimize 
> > > 
> > > By sh2a
> > > - Add missing handler(256 to 511)
> > > - Use sh2a instructions handler
> > > 
> > > Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> > > 
> > There still seems to be something buggy here, which may or may not be
> > toolchain related. Booting the current git kernel, does the 'ps aux'
> > output look sane on your board?
> 
> Hmm...
> 'ps aux' is unfinished.
> proc readdir is return non NULL always.
> 
> I check it.

OK. I'm fixed.

I think this problem is GCC(4.1.2) bug.
Syscall "getdents" returned "dirent->d_off" is always 0.
I think other EB enviroment have same problem.

Problem code
0c03c954 <filldir>:
 :
 c03c97a:       58 f7           mov.l   @(28,r15),r8 !-> offset (high)
 c03c97c:       59 f8           mov.l   @(32,r15),r9 !-> offset (low)
 c03c97e:       53 f9           mov.l   @(36,r15),r3
 c03c980:       54 fa           mov.l   @(40,r15),r4
 :
 c03c9a0:       21 82           mov.l   r8,@r1 !offset(high) -> dirent->d_off

It's workaround patch.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

diff --git a/include/asm-sh/uaccess_32.h b/include/asm-sh/uaccess_32.h
index ae0d24f..d3baea8 100644
--- a/include/asm-sh/uaccess_32.h
+++ b/include/asm-sh/uaccess_32.h
@@ -76,7 +76,7 @@ do {							\
 		__put_user_asm(x, ptr, retval, "w");	\
 		break;					\
 	case 4:						\
-		__put_user_asm(x, ptr, retval, "l");	\
+		__put_user_asm((u32)x, ptr, retval, "l");	\
 		break;					\
 	case 8:						\
 		__put_user_u64(x, ptr, retval);		\

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

  parent reply	other threads:[~2008-07-19 19:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 16:20 [PATCH] sh2(A) exception handler update Yoshinori Sato
2008-07-17  5:55 ` Paul Mundt
2008-07-17  7:09 ` Paul Mundt
2008-07-17 14:46 ` Yoshinori Sato
2008-07-19 19:35 ` Yoshinori Sato [this message]
2008-07-28 10:18 ` Paul Mundt

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=87hcalwtt5.wl%ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=linux-sh@vger.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