Skip to contentSkip to conversation

Badness in dma_alloc_init

DISCUSSION Kalle Pokki 2 participants 3 messages Jan 9, 2006

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm having some trouble with the DMA allocation using Linux 2.6.14-rc2 + some platform modifications. Namely, the dma_alloc_coherent() function returns bogus virtual addresses causing machine check exceptions. At boot, the kernel complains there is something wrong, but I cannot figure out how to fix it. CONFIG_CONSISTENT_START is at its default value, 0xff100000. Any hints where to look further?

Oh, this is a custom 8xx board. Has the support for DMA in 8xx been unstable at the time of pre-2.6.14?

Linux version 2.6.14-rc2 ([email protected]) (gcc version 4.0.0 (DENX ELDK 4.0 4. 0.0)) #1 Mon Jan 9 12:53:41 EET 2006
Built 1 zonelists
Kernel command line: root=/dev/mtdblock1 ro console=ttyCPM0,115200 PID hash table entries: 256 (order: 8, 4096 bytes)
Decrementer Frequency = 247500000/60
Console: colour dummy device 80x25
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 30268k available (1608k kernel code, 376k data, 100k init, 0k highmem) Mount-cache hash table entries: 512
Badness in dma_alloc_init at arch/ppc/kernel/dma-mapping.c:348

Call trace: [c0003670]  [c0003f24]  [c0003320]  [c01e2ad0]  [c000228c]  [c000551

c]

... followed by otherwise good startup.

#1 lore raw

Hi!

Quoted 9 lines

I'm having some trouble with the DMA allocation using Linux 2.6.14-rc2 + some platform modifications. Namely, the dma_alloc_coherent() function returns bogus virtual addresses causing machine check exceptions. At boot, the kernel complains there is something wrong, but I cannot figure out how to fix it. CONFIG_CONSISTENT_START is at its default value, 0xff100000. Any hints where to look further?

Oh, this is a custom 8xx board. Has the support for DMA in 8xx been unstable at the time of pre-2.6.14?

probably your IMAP_ADDR is at 0xff000000, isn't it? if it is, please adjust CONFIG_CONSISTENT_START to an address like 0xe0000000.

Signature · 1 line
Aristeu
#2 lore raw
Quoted 13 lines · Aristeu Sergio Rozanski Filho

Hi!

Quoted 5 lines

I'm having some trouble with the DMA allocation using Linux 2.6.14-rc2 + some platform modifications. Namely, the dma_alloc_coherent() function returns bogus virtual addresses causing machine check exceptions. At boot, the kernel complains there is something wrong, but I cannot figure out how to fix it. CONFIG_CONSISTENT_START is at its default value, 0xff100000. Any hints where to look further?

Oh, this is a custom 8xx board. Has the support for DMA in 8xx been unstable at the time of pre-2.6.14?

probably your IMAP_ADDR is at 0xff000000, isn't it? if it is, please adjust CONFIG_CONSISTENT_START to an address like 0xe0000000.

True, my IMAP_ADDR is at 0xff000000. But IMAP_SIZE is just 64 KB, so there should be no overlap, right? Or is the IMAP memory area mapped with an 8-MB TLB entry or something like that?

No badness in dma-mapping.c anymore with CONFIG_CONSISTENT_START being 0xe0000000, however. Thanks.