Hi Marcos,

Marcos Pereira wrote:
Hi Greg,
This is the correct disassembled code:

02008956 <profile_tick>:
2008956:       2f0a            movel %a2,[EMAIL PROTECTED]
2008958:       2f02            movel %d2,[EMAIL PROTECTED]
200895a:       242f 000c       movel %sp@(12),%d2
200895e:       2479 020f a048  moveal 20fa048 <per_cpu____irq_regs>,%a2
2008964:       7001            moveq #1,%d0
2008966:       b082            cmpl %d2,%d0
2008968:       6724            beqs 200898e <profile_tick+0x38>
200896a:       302a 002e       movew %a2@(46),%d0
200896e:       0280 0000 2000  andil #8192,%d0
2008974:       672a            beqs 20089a0 <profile_tick+0x4a>
2008976:       2039 020d 8aa0  movel 20d8aa0 <prof_cpu_mask>,%d0

Ok, this certainly looks like a NULL pointer de-reference here.

Doesn't look like per_cpu____irq_regs is actually set anywhere
for m68knommu. It should be handled in the irq entry code (so this
is a real bug :-)

Try the attached patch to arch/m68knommu/platform/5307/entry.S
Let me know if that works for you.

Regards
Greg




200897c:       0800 0000       btst #0,%d0
2008980:       671e            beqs 20089a0 <profile_tick+0x4a>
2008982:       2f2a 0030       movel %a2@(48),[EMAIL PROTECTED]
2008986:       2f02            movel %d2,[EMAIL PROTECTED]
2008988:       618a            bsrs 2008914 <profile_hit>

Thanks for the help,

Marcos
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


--
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     [EMAIL PROTECTED]
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
Index: entry.S
===================================================================
RCS file: /cvs/sw/linux-2.6.x/arch/m68knommu/platform/5307/entry.S,v
retrieving revision 1.28
diff -u -r1.28 entry.S
--- entry.S	11 Oct 2006 07:07:42 -0000	1.28
+++ entry.S	19 Feb 2007 07:26:16 -0000
@@ -176,13 +176,16 @@
 	lea	irq_list,%a0
 	addl	%d1,%a0			/* pointer to array struct */
 
-	movel	%sp,[EMAIL PROTECTED]		/* push regs arg onto stack */
+	movel	per_cpu____irq_regs,%d2 /* save old irq_regs */
+	movel	%sp,per_cpu____irq_regs /* set current irq_regs */
+
 	movel	%a0@(8),[EMAIL PROTECTED]		/* push devid arg */
 	movel	%d0,[EMAIL PROTECTED]		/* push vector # on stack */
-
 	movel	%a0@,%a0		/* get function to call */
 	jbsr	%a0@			/* call vector handler */
-	lea	%sp@(12),%sp		/* pop parameters off stack */
+	lea	%sp@(8),%sp		/* pop parameters off stack */
+
+	movel	%d2,per_cpu____irq_regs	/* restore old irq_regs */
 
 	bra	ret_from_interrupt	/* this was fallthrough */
 
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to