2.5.51 on Alpha oopses on mount
I'm trying to get a workable 2.5.51 (*eventually* with modules and everything) on my Alpha test box. Right now whenever I try to boot and mount anything (2.11-n from Debian testing) I get an oops and mount segfaults. FYI, I have the following two changes to my tree to get it to compile (thanks to rth for advice on the first):
diff -Nru a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h +++ a/include/asm-alpha/pci.h
--- b/include/asm-alpha/pci.h
@@ -6,7 +6,6 @@
#include <linux/spinlock.h>
#include <asm/scatterlist.h>
#include <asm/machvec.h>
-#include <asm/io.h>
/*
diff -Nru a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c +++ a/drivers/scsi/sr_ioctl.c
--- b/drivers/scsi/sr_ioctl.c
@@ -3,6 +3,7 @@
#include <linux/mm.h>
#include <linux/fs.h>
#include <asm/uaccess.h>
+#include <asm/io.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/blk.h>
Here's the decoded oops.
ksymoops 2.4.6 on alpha 2.4.19-pre7-rmap13. Options used
-v /home/arashi/kernels/arashi-2.5/vmlinux (specified) -K (specified)
-L (specified)
-O (specified)
-m /boot/System.map-2.5.51 (specified)
Unable to handle kernel paging request at virtual address 000000012002e000 mount(20): Oops 0 pc = [<fffffc00004a5240>] ra = [<fffffc00003850c0>] ps = 0000 Not tainted Using defaults from ksymoops -t elf64-alpha -a alpha v0 = 0000000000001300 t0 = 0000000000000000 t1 = 000000012002f300 t2 = 0000000000000000 t3 = 0000000000001300 t4 = fffffc0000664f30 t5 = fffffc000f914d00 t6 = 000000012002e000 t7 = fffffc000f8b0000 s0 = 000000012002d300 s1 = fffffc000f914000 s2 = fffffc000f8b3ef8 s3 = 000000012002d360 s4 = 00000000c0ed0000 s5 = 0000000120029b60 s6 = 000000012002d2a0 a0 = fffffc0000a6cb20 a1 = 0000000000000000 a2 = 0000000000002000 a3 = 00000000c0ed0000 a4 = 000000012002d360 a5 = 000000011ffffbd8 t8 = 0000000000002000 t9 = 0000020000144d40 t10= 0000000000000008 t11= 00000200001bda00 pv = fffffc00004a5140 at = fffffc0000385128 gp = fffffc000076c548 sp = fffffc000f8b3ea8 Trace:fffffc0000385920 fffffc0000313064 fffffc0000313064 Code: f41ffff5 c3e00013 e480000a 2ffe0000 47ff041f 2ffe0000 <a4270000> 40811524
Quoted 3 lines
Quoted 3 lines
RA;
fffffc00003850c0<copy_mount_options+40/140>PC;
fffffc00004a5240<__copy_user+100/1d4> <=====
Trace; fffffc0000385920 <sys_mount+40/160>
Trace; fffffc0000313064 <entSys+a4/c0>
Trace; fffffc0000313064 <entSys+a4/c0>
Code; fffffc00004a5228 <__copy_user+e8/1d4>
0000000000000000 <_PC>:
Code; fffffc00004a5228 <__copy_user+e8/1d4>
0: f5 ff 1f f4 bne v0,ffffffffffffffd8 <_PC+0xffffffffffffffd8> fffffc00004a5200 <__copy_user+c0/1d4>
Code; fffffc00004a522c <__copy_user+ec/1d4>
4: 13 00 e0 c3 br 54 <_PC+0x54> fffffc00004a527c <__copy_user+13c/1d4>
Code; fffffc00004a5230 <__copy_user+f0/1d4>
8: 0a 00 80 e4 beq t3,34 <_PC+0x34> fffffc00004a525c <__copy_user+11c/1d4>
Code; fffffc00004a5234 <__copy_user+f4/1d4>
c: 00 00 fe 2f unop
Code; fffffc00004a5238 <__copy_user+f8/1d4>
10: 1f 04 ff 47 nop
Code; fffffc00004a523c <__copy_user+fc/1d4>
14: 00 00 fe 2f unop
Code; fffffc00004a5240 <__copy_user+100/1d4> <=====
18: 00 00 27 a4 ldq t0,0(t6) <=====
Code; fffffc00004a5244 <__copy_user+104/1d4>
1c: 24 15 81 40 subq t3,0x8,t3
Matt
Quoted 2 lines · Matt Reppert
Quoted 1 line
Quoted 1 line
PC;
fffffc00004a5240<__copy_user+100/1d4> <=====Trace;
fffffc0000385920<sys_mount+40/160>
This fault is expected and is _supposed_ to be handled by the exception mechanism. Why this stopped working, I don't know.
For grins, see if the following helps. It's something that I need for the shared-library modules anyway, and it eliminates an extra variable from the problem.
r~
===== arch/alpha/kernel/traps.c 1.20 vs edited =====
arch/alpha/kernel/traps.c +1 -1
@@ -638,7 +638,7 @@ got_exception:/* Ok, we caught the exception, but we don't want it. Is there someone to pass it along to? */ -if ((fixup =search_exception_table (pc, regs.gp)) !=0 ) { +if ((fixup =search_exception_table (pc)) !=0 ) {unsigned long newpc; newpc =fixup_exception (una_reg, fixup, pc);
===== arch/alpha/lib/clear_user.S 1.1 vs edited =====
arch/alpha/lib/clear_user.S +1 -2
@@ -29,7 +29,7 @@ #define EX(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda $31, $exception-99b($31); \ .previous
@@ -80,7 +80,6 @@ ret $31, ($28), 1 # .. e1 : __do_clear_user: - ldgp $29,0($27) # we do exceptions -- we need the gp. and $6, 7, $4 # e0 : find dest misalignment beq $0, $zerolength # .. e1 : addq $0, $4, $1 # e0 : bias counter
===== arch/alpha/lib/copy_user.S 1.1 vs edited =====
arch/alpha/lib/copy_user.S +8 -9
@@ -30,29 +30,28 @@ #define EXI(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda $31, $exitin-99b($31); \ .previous #define EXO(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda $31, $exitout-99b($31); \ .previous .set noat - .align 3 + .align 4 .globl __copy_user .ent __copy_user __copy_user: - ldgp $29,0($27) # we do exceptions -- we need the gp. - .prologue 1 + .prologue 0 and $6,7,$3 beq $0,$35 beq $3,$36 subq $3,8,$3 - .align 5 + .align 4 $37: EXI( ldq_u $1,0($7) ) EXO( ldq_u $2,0($6) )
@@ -73,7 +72,7 @@ beq $1,$43 beq $4,$48 EXI( ldq_u $3,0($7) ) - .align 5 + .align 4 $50: EXI( ldq_u $2,8($7) ) subq $4,8,$4
@@ -88,7 +87,7 @@ bne $4,$50 $48: beq $0,$41 - .align 5 + .align 4 $57: EXI( ldq_u $1,0($7) ) EXO( ldq_u $2,0($6) )
@@ -105,7 +104,7 @@ .align 4 $43: beq $4,$65 - .align 5 + .align 4 $66: EXI( ldq $1,0($7) ) subq $4,8,$4
===== arch/alpha/lib/ev6-clear_user.S 1.1 vs edited =====
arch/alpha/lib/ev6-clear_user.S +1 -4
@@ -47,7 +47,7 @@ #define EX(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda $31, $exception-99b($31); \ .previous
@@ -62,9 +62,6 @@ # Pipeline info : Slotting & Comments __do_clear_user: - ldgp $29,0($27) # we do exceptions -- we need the gp. - # Macro instruction becomes ldah/lda - # .. .. E E : and $6, 7, $4 # .. E .. .. : find dest head misalignment beq $0, $zerolength # U .. .. .. : U L U L
===== arch/alpha/lib/ev6-copy_user.S 1.1 vs edited =====
arch/alpha/lib/ev6-copy_user.S +3 -6
@@ -41,14 +41,14 @@ #define EXI(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda $31, $exitin-99b($31); \ .previous #define EXO(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda $31, $exitout-99b($31); \ .previous
@@ -58,10 +58,7 @@ .ent __copy_user # Pipeline info: Slotting & Comments __copy_user: - ldgp $29,0($27) # we do exceptions -- we need the gp. - # Macro instruction becomes ldah/lda - # .. .. E E - .prologue 1 + .prologue 0 subq $0, 32, $1 # .. E .. .. : Is this going to be a small copy? beq $0, $zerolength # U .. .. .. : U L U L
===== arch/alpha/lib/ev6-strncpy_from_user.S 1.2 vs edited =====
arch/alpha/lib/ev6-strncpy_from_user.S +2 -3
@@ -34,7 +34,7 @@ #define EX(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda $31, $exception-99b($0); \ .previous
@@ -46,11 +46,10 @@ .globl __strncpy_from_user .ent __strncpy_from_user .frame $30, 0, $26 - .prologue 1 + .prologue 0 .align 4 __strncpy_from_user: - ldgp $29, 0($27) # E E : becomes 2 instructions (for exceptions) and a0, 7, t3 # E : find dest misalignment beq a2, $zerolength # U :
===== arch/alpha/lib/ev67-strlen_user.S 1.2 vs edited =====
arch/alpha/lib/ev67-strlen_user.S +2 -4
@@ -30,7 +30,7 @@ #define EX(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda v0, $exception-99b(zero); \ .previous
@@ -56,9 +56,7 @@ .align 4 __strnlen_user: - ldgp $29,0($27) # E E : we do exceptions -- we need the gp. - /* Decomposes into lda/ldah */ - .prologue 1 + .prologue 0 EX( ldq_u t0, 0(a0) ) # L : load first quadword (a0 may be misaligned) lda t1, -1(zero) # E :
===== arch/alpha/lib/strlen_user.S 1.2 vs edited =====
arch/alpha/lib/strlen_user.S +2 -3
@@ -19,7 +19,7 @@ #define EX(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda v0, $exception-99b(zero); \ .previous
@@ -42,8 +42,7 @@ .align 3 __strnlen_user: - ldgp $29,0($27) # we do exceptions -- we need the gp. - .prologue 1 + .prologue 0 EX( ldq_u t0, 0(a0) ) # load first quadword (a0 may be misaligned) lda t1, -1(zero)
===== arch/alpha/lib/strncpy_from_user.S 1.2 vs edited =====
arch/alpha/lib/strncpy_from_user.S +2 -4
@@ -19,7 +19,7 @@ #define EX(x,y...) \ 99: x,##y; \ .section __ex_table,"a"; \ - .gprel32 99b; \ + .long 99b - .; \ lda $31, $exception-99b($0); \ .previous
@@ -31,7 +31,7 @@ .globl __strncpy_from_user .ent __strncpy_from_user .frame $30, 0, $26 - .prologue 1 + .prologue 0 .align 3 $aligned:
@@ -100,8 +100,6 @@ /*** The Function Entry Point ***/ .align 3 __strncpy_from_user: - ldgp $29, 0($27) # we do exceptions -- we need the gp. - mov a0, v0 # save the string start beq a2, $zerolength
===== arch/alpha/mm/extable.c 1.2 vs edited =====
arch/alpha/mm/extable.c +9 -61
103 lines not on this page · raw message
===== arch/alpha/mm/fault.c 1.8 vs edited =====
arch/alpha/mm/fault.c +1 -1
@@ -176,7 +176,7 @@ no_context:/* Are we prepared to handle this fault as an exception? */ -if ((fixup =search_exception_table (regs->pc, regs->gp)) !=0 ) { +if ((fixup =search_exception_table (regs->pc)) !=0 ) {unsigned long newpc; newpc =fixup_exception (dpf_reg, fixup, regs->pc); regs->pc = newpc;
===== include/asm-alpha/uaccess.h 1.2 vs edited =====
include/asm-alpha/uaccess.h +24 -24
161 lines not on this page · raw message
Quoted 10 lines · On Sun, 15 Dec 2002 10:57:22 -0800 Richard Henderson <[email protected]> wrote:
Quoted 2 lines · Matt Reppert
Quoted 1 line
Quoted 1 line
PC;
fffffc00004a5240<__copy_user+100/1d4> <=====Trace;
fffffc0000385920<sys_mount+40/160>This fault is expected and is _supposed_ to be handled by the exception mechanism. Why this stopped working, I don't know.
For grins, see if the following helps. It's something that I need for the shared-library modules anyway, and it eliminates an extra variable from the problem.
This seems to work, mount doesn't oops anymore. I guess this means I can go back to trying to get the shared modules patches to compile and boot, since this is in shared-modules-alpha. Thanks!
Matt