Re: [Repost] Ultra2 SMP freezes with heavy disk I/O

2007-04-12 Thread Arkadi Shishlov

David Miller wrote:

Ok, I think I might have killed at least the bug I was able to hit.


In case problem persist, I own SMP Ultra2 and also digital PC attached dual
input oscilloscope. I can check at electrical signal level whats going on
inside the box if you tell me how.
-
To unsubscribe from this list: send the line unsubscribe sparclinux in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KJ][PATCH]ROUND_UP macro cleanup in arch/sparc,sparc64

2007-04-12 Thread Milind Arun Choudhary
ROUND_UP macro cleanup, use ALIGN

Signed-off-by: Milind Arun Choudhary [EMAIL PROTECTED]
---
 sparc/kernel/sys_sunos.c |5 ++---
 sparc64/kernel/sys_sunos32.c |5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c
index da6606f..23f4efe 100644
--- a/arch/sparc/kernel/sys_sunos.c
+++ b/arch/sparc/kernel/sys_sunos.c
@@ -322,7 +322,6 @@ struct sunos_dirent_callback {
 };
 
 #define NAME_OFFSET(de) ((int) ((de)-d_name - (char __user *) (de)))
-#define ROUND_UP(x) (((x)+sizeof(long)-1)  ~(sizeof(long)-1))
 
 static int sunos_filldir(void * __buf, const char * name, int namlen,
 loff_t offset, u64 ino, unsigned int d_type)
@@ -330,7 +329,7 @@ static int sunos_filldir(void * __buf, const char * name, 
int namlen,
struct sunos_dirent __user *dirent;
struct sunos_dirent_callback * buf = __buf;
unsigned long d_ino;
-   int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
+   int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long));
 
buf-error = -EINVAL;   /* only used if we fail.. */
if (reclen  buf-count)
@@ -415,7 +414,7 @@ static int sunos_filldirentry(void * __buf, const char * 
name, int namlen,
struct sunos_direntry __user *dirent;
struct sunos_direntry_callback *buf = __buf;
unsigned long d_ino;
-   int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
+   int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long));
 
buf-error = -EINVAL;   /* only used if we fail.. */
if (reclen  buf-count)
diff --git a/arch/sparc64/kernel/sys_sunos32.c 
b/arch/sparc64/kernel/sys_sunos32.c
index 4cff95b..937f19b 100644
--- a/arch/sparc64/kernel/sys_sunos32.c
+++ b/arch/sparc64/kernel/sys_sunos32.c
@@ -273,14 +273,13 @@ struct sunos_dirent_callback {
 };
 
 #define NAME_OFFSET(de) ((int) ((de)-d_name - (char __user *) (de)))
-#define ROUND_UP(x) (((x)+sizeof(s32)-1)  ~(sizeof(s32)-1))
 
 static int sunos_filldir(void * __buf, const char * name, int namlen,
 loff_t offset, ino_t ino, unsigned int d_type)
 {
struct sunos_dirent __user *dirent;
struct sunos_dirent_callback * buf = (struct sunos_dirent_callback *) 
__buf;
-   int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
+   int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(s32));
u32 d_ino;
 
buf-error = -EINVAL;   /* only used if we fail.. */
@@ -367,7 +366,7 @@ static int sunos_filldirentry(void * __buf, const char * 
name, int namlen,
struct sunos_direntry __user *dirent;
struct sunos_direntry_callback * buf =
(struct sunos_direntry_callback *) __buf;
-   int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
+   int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(s32));
u32 d_ino;
 
buf-error = -EINVAL;   /* only used if we fail.. */

-- 
Milind Arun Choudhary
-
To unsubscribe from this list: send the line unsubscribe sparclinux in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: sunrpc unaligned access

2007-04-12 Thread David Miller
From: Meelis Roos [EMAIL PROTECTED]
Date: Tue, 13 Mar 2007 10:48:22 +0200 (EET)

 Tried todays git (2.6.21-rc3-g8b9909de) on Ultra 5 and got this during 
 NFS server startup:
 
 Kernel unaligned access at TPC[100b8b98] svc_udp_recvfrom+0x180/0x420 [sunrpc]
 
 Other than that it seems to work fine.

Does this patch make the problem go away?  If not, please send
me the new kernel log message and a copy of the
net/sunrpc/svcsock.o object file from the build.

Thanks!

diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 593f62f..2772fee 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -452,6 +452,8 @@ union svc_pktinfo_u {
struct in_pktinfo pkti;
struct in6_pktinfo pkti6;
 };
+#define SVC_PKTINFO_SPACE \
+   CMSG_SPACE(sizeof(union svc_pktinfo_u))
 
 static void svc_set_cmsg_data(struct svc_rqst *rqstp, struct cmsghdr *cmh)
 {
@@ -491,8 +493,11 @@ svc_sendto(struct svc_rqst *rqstp, struct xdr_buf *xdr)
struct svc_sock *svsk = rqstp-rq_sock;
struct socket   *sock = svsk-sk_sock;
int slen;
-   charbuffer[CMSG_SPACE(sizeof(union svc_pktinfo_u))];
-   struct cmsghdr *cmh = (struct cmsghdr *)buffer;
+   union {
+   struct cmsghdr  hdr;
+   longall[SVC_PKTINFO_SPACE / sizeof(long)];
+   } buffer;
+   struct cmsghdr *cmh = buffer.hdr;
int len = 0;
int result;
int size;
@@ -745,8 +750,11 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
struct svc_sock *svsk = rqstp-rq_sock;
struct svc_serv *serv = svsk-sk_server;
struct sk_buff  *skb;
-   charbuffer[CMSG_SPACE(sizeof(union svc_pktinfo_u))];
-   struct cmsghdr *cmh = (struct cmsghdr *)buffer;
+   union {
+   struct cmsghdr  hdr;
+   longall[SVC_PKTINFO_SPACE / sizeof(long)];
+   } buffer;
+   struct cmsghdr *cmh = buffer.hdr;
int err, len;
struct msghdr msg = {
.msg_name = svc_addr(rqstp),
-
To unsubscribe from this list: send the line unsubscribe sparclinux in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: raid10 kernel panic on sparc64

2007-04-12 Thread David Miller
From: Jan Engelhardt [EMAIL PROTECTED]
Date: Mon, 2 Apr 2007 02:15:57 +0200 (MEST)

 Kernel is kernel-smp-2.6.16-1.2128sp4.sparc64.rpm from Aurora Corona.
 Perhaps it helps, otherwise hold your breath until I reproduce it.

Jan, if you can reproduce this with the current 2.6.20 vanilla
kernel I'd be very interested in a full trace so that I can
try to fix this.

With the combination of an old kernel and only part of the
crash trace, there isn't much I can do with this report.
-
To unsubscribe from this list: send the line unsubscribe sparclinux in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: unaligned access in ipt_ULOG

2007-04-12 Thread David Miller
From: Patrick McHardy [EMAIL PROTECTED]
Date: Mon, 02 Apr 2007 13:55:56 +0200

 David Miller wrote:
  Patrick, this is on sparc64, it appears to be this code:
  
  pm-timestamp_sec = skb-tstamp.off_sec;
  pm-timestamp_usec = skb-tstamp.off_usec;
  
  and the NLMSG_DATA() (and thus 'pm') is not 8-byte aligned.
  
  I bet this is a 32-bit sparc binary, has the idea of a compat
  layer for the ULOG bits ever been discussed?
 
 
 No, I can't imagine how to do this since we don't have any compat
 infrastructure for netlink, so we would have to know whether the
 receiving process is a 32 bit binary in ipt_ULOG itself. We have
 some compat code in userspace to deal with the different structure
 layout, so besides the unaligned accesses, it should already work
 fine. Since ULOG is obsolete and nfnetlink_log shouldn't have
 these issues, I think the best way to fix this is to use
 put_unaligned in ipt_ULOG.
 
 How does this look?

Thanks for the explanation, the patch looks fine, applied.
-
To unsubscribe from this list: send the line unsubscribe sparclinux in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [ANNOUNCE] Aurora SPARC Linux Build 2.98 (Beta 1 for 3.0)

2007-04-12 Thread David Miller
From: Tom \spot\ Callaway [EMAIL PROTECTED]
Date: Tue, 03 Apr 2007 00:12:51 -0500

 - CDROM installs on sparc32 hardware don't work. If you're installing to
 a sparc32 system, netboot.

On a dual cpu Ultra2, 512MB ram, with creator3d frame buffer,
the installer always exits abnormally right after loading the
ESP driver.  It says:

Running anaconda, the Aurora Linux system installer - please wait...
install exited abnormally [1/1]
sending termination signals...done
...
etc.

The same thing happens even if I give linux text explicitly
on the CDROM boot command line.

I guess I have a set of 6 small frisbees now :-)
-
To unsubscribe from this list: send the line unsubscribe sparclinux in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gcc-4.2.0 20070316 (prerelease) miscompiles sparc64 kernel

2007-04-12 Thread David Miller
From: Mikael Pettersson [EMAIL PROTECTED]
Date: Wed, 4 Apr 2007 09:23:07 +0200 (MEST)

 The 2.6.21-rc5 kernel compiled with gcc-4.2.0 20070316 boots ok
 but is thrown into an infinite loop by `hdparm -Tt /dev/hda'.
 Sysrq-P tells me that the call chain in the loop is:
 
 __up_read or __handle_mm_fault [varies]
 do_sparc64_fault
 sparc64_realfault_common
 compat_sys_shmat
 
 The kernel works when built with gcc-3.4.6, 4.0.4, or 4.1.2.
 
 I'll do some more debugging next week, if I have time.

Any updates?
-
To unsubscribe from this list: send the line unsubscribe sparclinux in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: raid10 kernel panic on sparc64

2007-04-12 Thread Jan Engelhardt

On Apr 12 2007 14:26, David Miller wrote:
From: Jan Engelhardt [EMAIL PROTECTED]
Date: Mon, 2 Apr 2007 02:15:57 +0200 (MEST)

 Kernel is kernel-smp-2.6.16-1.2128sp4.sparc64.rpm from Aurora Corona.
 Perhaps it helps, otherwise hold your breath until I reproduce it.

Jan, if you can reproduce this with the current 2.6.20 vanilla
kernel I'd be very interested in a full trace so that I can
try to fix this.

With the combination of an old kernel and only part of the
crash trace, there isn't much I can do with this report.

Hi David,

I have not forgotten this issue, but the fact that there is not any serial
console attached right now makes it kinda hard to get the system back up
in case I let it oops. Apologies for the delay it takes.


Jan
-- 
-
To unsubscribe from this list: send the line unsubscribe sparclinux in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html