2005-05-04 03:57:42

by Keenan Pepper

[permalink] [raw]
Subject: Oops in snd-powermac on powerbook 3400

Linux version 2.6.12-rc3-mm2 (root@debian) (gcc version 3.3.5 (Debian 1:3.3.5-12)) #4 PREEMPT Tue May 3 23:23:22 EDT 2005
Found a OHare mac-io controller, rev: 1, mapped at 0xfdf00000
Found a OHareII mac-io controller, rev: 1, mapped at 0xfde80000
PowerMac motherboard: PowerBook 3400
Found Bandit PCI host bridge at 0xf2000000. Firmware bus number: 0->0
PMU driver 2 initialized for PowerBook 2400/3400/3500(G3), firmware: 09
On node 0 totalpages: 20480
DMA zone: 20480 pages, LIFO batch:7
Normal zone: 0 pages, LIFO batch:1
HighMem zone: 0 pages, LIFO batch:1
Built 1 zonelists
Kernel command line: root=/dev/hda2 ro
irq: Fixed ethernet IRQ to 60
irq: secondary controller on irq 28
System has 64 possible interrupts
32 interrupts on main controller
PID hash table entries: 512 (order: 9, 8192 bytes)
via_calibrate_decr: ticks per jiffy = 10003 (600182 ticks)
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 78464k available (1560k kernel code, 708k data, 356k init, 0k highmem)
Calibrating delay loop... 132.60 BogoMIPS (lpj=66304)
Mount-cache hash table entries: 512
scheduling while atomic: swapper/0x00000002/0
Call trace:
[c00074c4] dump_stack+0x18/0x28
[c01825a8] schedule+0x798/0x79c
[c0004300] syscall_exit_work+0x108/0x10c
[c020e654] proc_root_init+0x144/0x150
[ff809e08] 0xff809e08
[c01fa624] start_kernel+0x14c/0x178
[000032c4] 0x32c4
NET: Registered protocol family 16
PCI: Probing PCI hardware
Registering pmac pic with sysfs...
Console: switching to colour frame buffer device 100x37
fb0: Chips 65550 frame buffer (1024K RAM detected)
Generic RTC Driver v1.07
IN from bad port 64 at c00e6050
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
IN from bad port 60 at c00e60a4
IN from bad port 64 at c00e6100
i8042.c: No controller found.
io scheduler noop registered
io scheduler anticipatory registered
MacIO PCI driver attached to OHareII chipset
MacIO PCI driver attached to OHare chipset
Can't request resource 0 for MacIO device 0.f3000000:ohare
mediabay0: Registered Ohare media-bay
mediabay0: powering down
mediabay0: switching to 3
mediabay0: powering up
mediabay0: enabling (kind:3)
mediabay0: waiting reset (kind:3)
mediabay0: waiting IDE reset (kind:3)
mediabay0: waiting IDE ready (kind:3)
mediabay0: up before IDE init
input: Macintosh mouse button emulation
Registered "pmu" backlight controller,level: 1/15
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide0: Found Apple OHare ATA controller, bus ID 0, irq 13
Probing IDE interface ide0...
adb: starting probe task...
adb devices: [2]: 2 18 [3]: 3 1
ADB keyboard at 2, handler 1
Detected ADB keyboard, type ANSI.
input: ADB keyboard on adb2:2.18/input
ADB mouse at 3, handler set to 4 (trackpad)
input: ADB mouse on adb3:3.01/input
adb: finished probe task...
hda: IBM-DCRA-22160, ATA DISK drive
hda: Enabling MultiWord DMA 2
ide0 at 0xc6204000-0xc6204007,0xc6204160 on irq 13
Registered ide1 for media bay 0
ide1: Found Apple OHare ATA controller, bus ID 1 (mediabay), irq 14
Probing IDE interface ide1...
hdc: CD-ROM FFREDDIE!, ATAPI CD/DVD-ROM drive
hdc: Enabling MultiWord DMA 2
ide1 at 0xc6206000-0xc6206007,0xc6206160 on irq 14
hda: max request size: 128KiB
hda: 4233600 sectors (2167 MB) w/96KiB Cache, CHS=4200/16/63, DMA
hda: cache flushes not supported
hda: [mac] hda1 hda2 hda3
hdc: ATAPI 19X CD-ROM drive, 256kB Cache, DMA
Uniform CD-ROM driver Revision: 3.20
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 356k init 4k chrp 8k prep
NET: Registered protocol family 1
Adding 171160k swap on /dev/hda3. Priority:-1 extents:1
PCI: Enabling device 0000:00:0d.0 (0004 -> 0007)
0000:00:0d.0: DC21041 at 0x0400, h/w address 00:00:94:78:7f:3c,
and requires IRQ60 (provided by PCI BIOS).
de4x5.c:V0.546 2001/02/22 [email protected]
eth0: media is TP.
NET: Registered protocol family 17
Oops: kernel access of bad area, sig: 11 [#1]
PREEMPT
NIP: C62CC038 LR: C6238BCC SP: C4133E70 REGS: c4133dc0 TRAP: 0300 Not tainted
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 00000138, DSISR: 20000000
TASK = c45de0f0[350] 'modprobe' THREAD: c4132000
Last syscall: 128
GPR00: 00000000 C4133E70 C45DE0F0 000000D0 C476AC90 00000021 00000000 00000001
GPR08: C028F4ED 00000048 FFFFFFEB 00000061 33003553 1001E284 10017070 00000001
GPR16: 00000000 00000000 00000000 00000000 00000000 100013A4 1001DF18 1001E088
GPR24: 00000000 C476AE00 00000000 C4133EE8 00000021 00000220 C476AC90 00000000
NIP [c62cc038] snd_pmac_dbdma_alloc+0x38/0x104 [snd_powermac]
LR [c6238bcc] snd_pmac_new+0x8c/0x484 [snd_powermac]
Call trace:
[c6238bcc] snd_pmac_new+0x8c/0x484 [snd_powermac]
[c6238048] snd_pmac_probe+0x48/0x320 [snd_powermac]
[c6238330] alsa_card_pmac_init+0x10/0x2c [snd_powermac]
[c003b4e4] sys_init_module+0x264/0x394
[c0004060] ret_from_syscall+0x0/0x44


Attachments:
config (21.43 kB)
dmesg (6.08 kB)
Download all attachments

2005-05-05 00:08:54

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: Oops in snd-powermac on powerbook 3400

On Tue, 2005-05-03 at 23:56 -0400, Keenan Pepper wrote:
> My Powerbook 3400 I got on Ebay for $100 works great with linux, except
> that the sound driver which worked in 2.6.8 now oopses on modprobe in
> both 2.6.12-rc3 and 2.6.12-rc3-mm2. The oops looks like this:
>
> Oops: kernel access of bad area, sig: 11 [#1]
> PREEMPT
> NIP: C62CC038 LR: C6238BCC SP: C4133E70 REGS: c4133dc0 TRAP: 0300 Not
> tainted
> MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: 00000138, DSISR: 20000000
> TASK = c45de0f0[350] 'modprobe' THREAD: c4132000
> Last syscall: 128
> GPR00: 00000000 C4133E70 C45DE0F0 000000D0 C476AC90 00000021 00000000
> 00000001
> GPR08: C028F4ED 00000048 FFFFFFEB 00000061 33003553 1001E284 10017070
> 00000001
> GPR16: 00000000 00000000 00000000 00000000 00000000 100013A4 1001DF18
> 1001E088
> GPR24: 00000000 C476AE00 00000000 C4133EE8 00000021 00000220 C476AC90
> 00000000
> NIP [c62cc038] snd_pmac_dbdma_alloc+0x38/0x104 [snd_powermac]
> LR [c6238bcc] snd_pmac_new+0x8c/0x484 [snd_powermac]
> Call trace:
> [c6238bcc] snd_pmac_new+0x8c/0x484 [snd_powermac]
> [c6238048] snd_pmac_probe+0x48/0x320 [snd_powermac]
> [c6238330] alsa_card_pmac_init+0x10/0x2c [snd_powermac]
> [c003b4e4] sys_init_module+0x264/0x394
> [c0004060] ret_from_syscall+0x0/0x44

Can you edit sound/ppc/pmac.c, and add that to snd_pmac_dbdma_alloc():

unsigned int rsize = sizeof(struct dbdma_cmd) * (size + 1);

+ BUG_ON(chip->pdev == NULL);
+
rec->space = dma_alloc_coherent(&chip->pdev->dev, rsize,
&rec->dma_base, GFP_KERNEL);

And tell me if you hit the BUG() ?

if it does, can you have a look at what happens in that bit of code in
snd_pmac_detect() :

if (macio == NULL)
printk(KERN_WARNING "snd-powermac: can't locate macio !\n");
else {
struct pci_dev *pdev = NULL;

for_each_pci_dev(pdev) {
struct device_node *np = pci_device_to_OF_node(pdev);
if (np && np == macio->of_node) {
chip->pdev = pdev;
break;
}
}
}

Does it actuall fail to find a suitable pdev ?

Thanks,
Ben.