From: Olaf Hering <olh@suse.de>
To: David Edelsohn <dje@watson.ibm.com>
Cc: Alan Modra <amodra@bigpond.net.au>, linuxppc-dev@lists.linuxppc.org
Subject: Re: kernel oops due to unaligned access with lswi
Date: Sat, 15 Nov 2003 23:37:06 +0100 [thread overview]
Message-ID: <20031115223706.GA15879@suse.de> (raw)
In-Reply-To: <200311152230.hAFMUwT32990@makai.watson.ibm.com>
On Sat, Nov 15, David Edelsohn wrote:
> >>>>> Olaf Hering writes:
>
> Olaf> 2.6 has a function parse_header(), its part of gunzip and used for
> Olaf> initramfs as example. I got an oops, exception 600, sig 7. I think that
> Olaf> means unaligned access.
>
> Olaf> + memcpy(buf, s, 7 + j); /* s might be unaligned, gcc will optimized the call to lswi on ppc */
>
> lswi specifically accepts unaligned addresses.
Thanks. Then the bug is somewhere else, because it crashes like this if
I use '8' instead of '7 + j' (no memcpy call):
Calibrating delay loop... 89.49 BogoMIPS
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Serial port locked ON by debugger !
vector: 600 at pc = c025bf14, lr = c025bf20
msr = 9030, sp = c02598c0 [c0259810]
dar = c043cffa, dsisr = a53f
current = c02191c8, pid = 0, comm = swapper
mon> di c025bf14
c025bf14 7d3f44aa lswi r9,r31,8
c025bf18 7d3c45aa stswi r9,r28,8
c025bf1c 4be62ee1 bl 0xc00bedfc
c025bf20 2c1e000b cmpwi r30,11
c025bf24 3bff0008 addi r31,r31,8
c025bf28 7c7dd92e stwx r3,r29,r27
c025bf2c 4081ffd4 ble 0xc025bf00
c025bf30 8001002c lwz r0,44(r1)
c025bf34 81210030 lwz r9,48(r1)
c025bf38 5400a016 rlwinm r0,r0,20,0,11
c025bf3c 81610008 lwz r11,8(r1)
c025bf40 7c004b78 or r0,r0,r9
c025bf44 5409a32e rlwinm r9,r0,20,12,23
c025bf48 540a063e clrlwi r10,r0,24
c025bf4c 7d4a4b78 or r10,r10,r9
c025bf50 54006016 rlwinm r0,r0,12,0,11
mon> r
R00 = 00000008 R01 = c02598c0 R02 = c02191c8 R03 = c02598f8
R04 = 00000000 R05 = 00000010 R06 = c043cfb1 R07 = 00000001
R08 = 00000000 R09 = c02224f4 R10 = ffffffd0 R11 = 00000000
R12 = 00014fac R13 = deadbeef R14 = deadbeef R15 = deadbeef
R16 = deadbeef R17 = deadbeef R18 = deadbeef R19 = deadbeef
R20 = 0000003f R21 = 000001ff R22 = c47f1408 R23 = c032e008
R24 = 00000006 R25 = 00000009 R26 = 0000000f R27 = c02598c8
R28 = c02598f8 R29 = 00000024 R30 = 0000000a R31 = c043cffa
pc = c025bf14 msr = 00009030 lr = c025bf20 cr = 95000053
ctr = 00000000 xer = c000be6f trap = 600
mon>
pmac 7200/90 with 601 cpu.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2003-11-15 22:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-15 21:04 kernel oops due to unaligned access with lswi Olaf Hering
2003-11-15 22:24 ` Olaf Hering
2003-11-15 22:30 ` David Edelsohn
2003-11-15 22:37 ` Olaf Hering [this message]
2003-11-15 22:43 ` Olaf Hering
2003-11-15 22:59 ` David Edelsohn
2003-11-16 10:17 ` Benjamin Herrenschmidt
2003-11-16 17:49 ` Kumar Gala
2003-11-16 22:19 ` Alan Modra
2003-11-16 22:45 ` Jon Masters
2003-11-17 0:50 ` Paul Mackerras
2003-11-17 7:55 ` Olaf Hering
2003-11-16 23:12 ` Benjamin Herrenschmidt
2003-11-16 23:31 ` David Edelsohn
2003-11-17 9:19 ` Gabriel Paubert
2003-11-16 23:04 ` David Edelsohn
2003-11-17 0:40 ` Paul Mackerras
2003-11-19 21:51 ` linas
2003-11-19 22:06 ` Hollis Blanchard
2003-11-19 22:50 ` linas
2003-11-16 0:40 ` Paul Mackerras
2003-11-16 1:45 ` Olaf Hering
2003-11-16 16:49 ` Olaf Hering
2003-11-16 5:07 ` Benjamin Herrenschmidt
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=20031115223706.GA15879@suse.de \
--to=olh@suse.de \
--cc=amodra@bigpond.net.au \
--cc=dje@watson.ibm.com \
--cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).