Hello, > Please bounce me your patches for this; To my knowledge nobody's tried > to build on a sparc before, and I don't have access to a PCI sparc. patch I have do is attached to this email (patch-sparc.txt). I can compile, but running cause problems. > Normally, the Configure script will just pick up the compiler and build > flags from the kernel makefiles. I take it this didn't work? I have just retry, and no : it didn't work : it takes gcc for compiler. And for compiling a kernel module, we use sparc64-linux-gcc. Adding sparc64-linux- as prefix is enough for compiling. For linking, it try sparc64-linux-ld, which don't exist. I have look on the other kernel module I have compiled, and the correct link command is "ld -m elf64_sparc ...". So I do a make. When the make stop on a bad link, I do it by hand (as there is only 2 modules to link, this is OK for the moment ;-) ). > Pass this oops through 'ksymoops' so we can see exactly where the crash > is. Attached is my last test : the original oops (oops.txt) and the output of ksymoops (oops.output). > Other possibilities -- around line 186 of wlan_compat.h add in a check > for SPARC. Many BE architechures implicitly reverse the endianness of > data going over the PCI bus, and that screws us up. I have try to add the check you suggest for this test (see the attached patch if this is what you was talking about). > Anyway; compiling with debugging turned on (and turned up to level 4 or > so) will help find out what's going on. Also added : I have put a level 4 for both prism2_plx and p80211. Thanks in advance for any help. Olivier -- Olivier Bornet | français : http://puck.ch/f Swiss Ice Hockey Results | english : http://puck.ch/e http://puck.ch/ | deutsch : http://puck.ch/g Olivier.Bornet@puck.ch | italiano : http://puck.ch/i Get my PGP-key at http://puck.ch/pgp or at http://wwwkeys.pgp.net
--- src/include/wlan/wlan_compat.h 2002-10-01 15:20:34.000000000 +0200 +++ src/include/wlan/wlan_compat.h.patched 2002-11-06 19:40:42.000000000 +0100 @@ -60,6 +60,7 @@ #define WLAN_ALPHA 5 #define WLAN_MIPS 6 #define WLAN_HPPA 7 + #define WLAN_SPARC 8 /* WLAN_CPU_CORE */ #define WLAN_I386CORE 1 #define WLAN_PPCCORE 2 @@ -68,6 +69,7 @@ #define WLAN_ALPHACORE 5 #define WLAN_MIPSCORE 6 #define WLAN_HPPACORE 7 + #define WLAN_SPARCCORE 8 /* WLAN_CPU_PART */ #define WLAN_I386PART 1 #define WLAN_MPC860 2 @@ -78,6 +80,7 @@ #define WLAN_ALPHAPART 7 #define WLAN_MIPSPART 8 #define WLAN_HPPAPART 9 + #define WLAN_SPARCPART 10 /* WLAN_SYSARCH */ #define WLAN_PCAT 1 #define WLAN_MBX 2 @@ -89,6 +92,7 @@ #define WLAN_ALPHAARCH 7 #define WLAN_MIPSARCH 9 #define WLAN_HPPAARCH 10 + #define WLAN_SPARCARCH 11 /* WLAN_OS */ #define WLAN_LINUX_KERNEL 1 #define WLAN_LINUX_USER 2 @@ -165,6 +169,12 @@ #define WLAN_CPU_CORE WLAN_HPPACORE #define WLAN_CPU_PART WLAN_HPPAPART #define WLAN_SYSARCH WLAN_HPPAARCH +#elif defined(__sparc__) + #define WLAN_CPU_FAMILY WLAN_SPARC + #define WLAN_CPU_CORE WLAN_SPARCCORE + #define WLAN_CPU_PART WLAN_SPARCPART + #define WLAN_SYSARCH WLAN_SPARC + #warning "SPARC ARCH" #else #error "No CPU identified!" #endif @@ -182,7 +192,7 @@ */ #if (WLAN_HOSTIF == WLAN_PCI) -#if ((WLAN_SYSARCH == WLAN_SKIFF) || (WLAN_SYSARCH == WLAN_PMAC)) +#if ((WLAN_SYSARCH == WLAN_SKIFF) || (WLAN_SYSARCH == WLAN_PMAC) || (WLAN_SYSARCH == WLAN_SPARC)) #define REVERSE_ENDIAN #endif #endif
Nov  6 19:51:41 cool kernel: init_module: Enter
Nov  6 19:51:41 cool kernel: p80211netdev_startup: Enter
Nov  6 19:51:41 cool kernel: p80211netdev_startup: Exit
Nov  6 19:51:41 cool kernel: p80211indicate_init: Enter
Nov  6 19:51:41 cool kernel: p80211indicate_init: Exit
Nov  6 19:51:41 cool kernel: init_module: Exit
Nov  6 19:51:41 cool kernel: init_module: Enter
Nov  6 19:51:41 cool kernel: init_module: prism2_plx.o: 0.1.16-pre5 Loaded
Nov  6 19:51:41 cool kernel: init_module: dev_info is: prism2_plx
Nov  6 19:51:41 cool kernel: prism2sta_probe_plx: prism2_plx: Local Interrupt already enabled
Nov  6 19:51:41 cool kernel: A PLX PCI/PCMCIA interface device found, phymem:0x1ff00008000, phyio=0x1fe02000480, irq:6747200, mem: 0x1ff
00008000
Nov  6 19:51:41 cool kernel: Unable to handle kernel paging request at virtual address 0000000000008000
Nov  6 19:51:41 cool kernel: tsk->{mm,active_mm}->context = 00000000000006ce
Nov  6 19:51:41 cool kernel: tsk->{mm,active_mm}->pgd = fffff80013117000
Nov  6 19:51:41 cool kernel:               \|/ ____ \|/
Nov  6 19:51:41 cool kernel:               "@'/ .. \`@"
Nov  6 19:51:41 cool kernel:               /_| \__/ |_\
Nov  6 19:51:41 cool kernel:                  \__U_/
Nov  6 19:51:41 cool kernel: modprobe(3680): Oops
Nov  6 19:51:41 cool kernel: TSTATE: 0000004411009606 TPC: 000000000206fbcc TNPC: 000000000206fbd0 Y: 00000000    Not tainted
Nov  6 19:51:41 cool kernel: g0: fffff800107eef18 g1: 0000000000000001 g2: 0000000000000000 g3: 0000000000000000
Nov  6 19:51:41 cool kernel: g4: fffff80000000000 g5: 0000000000000000 g6: fffff80015230000 g7: 0000000000000000
Nov  6 19:51:41 cool kernel: o0: 0000000000000077 o1: 00000000006b5f5f o2: 0000000000000000 o3: 00000000005db400
Nov  6 19:51:41 cool kernel: o4: 000001ff00008000 o5: 0000000000000000 sp: fffff80015233261 ret_pc: 000000000206fbc4
Nov  6 19:51:41 cool kernel: l0: 000001ff00008000 l1: 000001ff00008000 l2: fffff8001061b000 l3: 0000000000000000
Nov  6 19:51:41 cool kernel: l4: 0000000000000000 l5: 0000000000000004 l6: 0000000000000000 l7: 0000000000000008
Nov  6 19:51:41 cool kernel: i0: 000001fe02000480 i1: 0000000002087de0 i2: 000000000206fac0 i3: fffff8001061b000
Nov  6 19:51:41 cool kernel: i4: 0000000000000000 i5: ffffffffffffffff i6: fffff80015233321 i7: 000000000051fc80
Nov  6 19:51:41 cool kernel: Caller[000000000051fc80]
Nov  6 19:51:42 cool kernel: Caller[000000000051fd2c]
Nov  6 19:51:42 cool kernel: Caller[0000000002070084]
Nov  6 19:51:42 cool kernel: Caller[000000000044916c]
Nov  6 19:51:42 cool kernel: Caller[0000000000410af4]
Nov  6 19:51:42 cool kernel: Caller[0000000000026a5c]
Nov  6 19:51:42 cool kernel: Instruction DUMP: 94100018  7f8f60f7  98100011 <d20c4000> 80a26001  22400009  d00c6002  1100820f  1300820e
ksymoops 2.4.6 on sparc64 2.4.19.  Options used
     -V (default)
     -k /proc/ksyms (default)
     -l /proc/modules (default)
     -o /lib/modules/2.4.19/ (default)
     -m /boot/System.map-2.4.19 (default)
Warning: You did not tell me where to find symbol information.  I will
assume that the log matches the kernel and modules that are running
right now and I'll use the default options above for symbol resolution.
If the current kernel and/or modules do not match the log, you can get
more accurate output by telling me the kernel version and where to find
map, modules, ksyms etc.  ksymoops -h explains the options.
00008000
Nov  6 19:51:41 cool kernel: Unable to handle kernel paging request at virtual address 0000000000008000
Nov  6 19:51:41 cool kernel: tsk->{mm,active_mm}->context = 00000000000006ce
Nov  6 19:51:41 cool kernel: tsk->{mm,active_mm}->pgd = fffff80013117000
Nov  6 19:51:41 cool kernel:               \|/ ____ \|/
Nov  6 19:51:41 cool kernel:               "@'/ .. \`@"
Nov  6 19:51:41 cool kernel:               /_| \__/ |_\
Nov  6 19:51:41 cool kernel:                  \__U_/
Nov  6 19:51:41 cool kernel: modprobe(3680): Oops
Nov  6 19:51:41 cool kernel: TSTATE: 0000004411009606 TPC: 000000000206fbcc TNPC: 000000000206fbd0 Y: 00000000    Not tainted
Using defaults from ksymoops -t elf32-sparc -a sparc
Nov  6 19:51:41 cool kernel: g0: fffff800107eef18 g1: 0000000000000001 g2: 0000000000000000 g3: 0000000000000000
Nov  6 19:51:41 cool kernel: g4: fffff80000000000 g5: 0000000000000000 g6: fffff80015230000 g7: 0000000000000000
Nov  6 19:51:41 cool kernel: o0: 0000000000000077 o1: 00000000006b5f5f o2: 0000000000000000 o3: 00000000005db400
Nov  6 19:51:41 cool kernel: o4: 000001ff00008000 o5: 0000000000000000 sp: fffff80015233261 ret_pc: 000000000206fbc4
Nov  6 19:51:41 cool kernel: l0: 000001ff00008000 l1: 000001ff00008000 l2: fffff8001061b000 l3: 0000000000000000
Nov  6 19:51:41 cool kernel: l4: 0000000000000000 l5: 0000000000000004 l6: 0000000000000000 l7: 0000000000000008
Nov  6 19:51:41 cool kernel: i0: 000001fe02000480 i1: 0000000002087de0 i2: 000000000206fac0 i3: fffff8001061b000
Nov  6 19:51:41 cool kernel: i4: 0000000000000000 i5: ffffffffffffffff i6: fffff80015233321 i7: 000000000051fc80
Nov  6 19:51:41 cool kernel: Caller[000000000051fc80]
Nov  6 19:51:42 cool kernel: Caller[000000000051fd2c]
Nov  6 19:51:42 cool kernel: Caller[0000000002070084]
Nov  6 19:51:42 cool kernel: Caller[000000000044916c]
Nov  6 19:51:42 cool kernel: Caller[0000000000410af4]
Nov  6 19:51:42 cool kernel: Caller[0000000000026a5c]
Nov  6 19:51:42 cool kernel: Instruction DUMP: 94100018  7f8f60f7  98100011 <d20c4000> 80a26001  22400009  d00c6002  1100820f  1300820e
>>PC;  0206fbcc <[prism2_plx]prism2sta_probe_plx+10c/4a0>   <=====
>>o1; 006b5f5f <printk_buf.1+77/400>
>>o3; 005db400 <abi_table+18/230>
>>ret_pc; 0206fbc4 <[prism2_plx]prism2sta_probe_plx+104/4a0>
>>i1; 02087de0 <[prism2_plx]plx_id_tbl+80/140>
>>i2; 0206fac0 <[prism2_plx]prism2sta_probe_plx+0/4a0>
>>i7; 0051fc80 <pci_announce_device+40/80>
Trace; 0051fc80 <pci_announce_device+40/80>
Trace; 0051fd2c <pci_register_driver+6c/a0>
Trace; 02070084 <[prism2_plx]init_module+64/e0>
Trace; 0044916c <sys_init_module+6ac/780>
Trace; 00410af4 <linux_sparc_syscall32+34/40>
Trace; 00026a5c Before first symbol
Code;  0206fbc0 <[prism2_plx]prism2sta_probe_plx+100/4a0>
00000000 <_PC>:
Code;  0206fbc0 <[prism2_plx]prism2sta_probe_plx+100/4a0>
   0:   94 10 00 18       mov  %i0, %o2
Code;  0206fbc4 <[prism2_plx]prism2sta_probe_plx+104/4a0>
   4:   7f 8f 60 f7       call  fe3d83e0 <_PC+0xfe3d83e0> 00447fa0 <printk+0/1c0>
Code;  0206fbc8 <[prism2_plx]prism2sta_probe_plx+108/4a0>
   8:   98 10 00 11       mov  %l1, %o4
Code;  0206fbcc <[prism2_plx]prism2sta_probe_plx+10c/4a0>   <=====
   c:   d2 0c 40 00       ldub  [ %l1 ], %o1   <=====
Code;  0206fbd0 <[prism2_plx]prism2sta_probe_plx+110/4a0>
  10:   80 a2 60 01       cmp  %o1, 1
Code;  0206fbd4 <[prism2_plx]prism2sta_probe_plx+114/4a0>
  14:   22 40 00 09       unknown
Code;  0206fbd8 <[prism2_plx]prism2sta_probe_plx+118/4a0>
  18:   d0 0c 60 02       ldub  [ %l1 + 2 ], %o0
Code;  0206fbdc <[prism2_plx]prism2sta_probe_plx+11c/4a0>
  1c:   11 00 82 0f       sethi  %hi(0x2083c00), %o0
Code;  0206fbe0 <[prism2_plx]prism2sta_probe_plx+120/4a0>
  20:   13 00 82 0e       sethi  %hi(0x2083800), %o1
1 warning issued.  Results may not be reliable.
Attachment:
pgp_ljwqgBP_B.pgp
Description: PGP signature