Linux MIPS Architecture development
 help / color / mirror / Atom feed
* MIPS and pci_alloc_consistent()?
@ 2001-10-09 21:23 Shuanglin Wang
  2001-10-10 11:38 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Shuanglin Wang @ 2001-10-09 21:23 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

I tried to use the pci_alloc_consistent() to allocate one-page  DMA'able
memory for my device driver.  But, when booting up the system, it was
always  failed to execute the pci_alloc_consistent() by showing some
memory errors.

I traced the code to the function __alloc_page() in the file
mm/page_alloc.c, and found the system called  "wakeup_kswapd()".  But at
that time,  the kswapd process pointer is a NULL pointer and the
wakeup-related codes don't check the pointer is NULL or not,  so the
system was stopped because of dereferencing the null pointer.

I'm working on a MIPS SEAD-2 board using Linux kernel 2.4.3 MIPS
distrinution.
Anybody has some ideas about the problem?  Or are there other convenient
methods to allocate DMA'able memory?

Thanks,

--
Shuanglin Wang
Atmel Multimedia & Communications
3800 Gateway Centre, Suite 311
Morrisville, NC 27560



[-- Attachment #2: Type: text/html, Size: 1022 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: MIPS and pci_alloc_consistent()?
  2001-10-09 21:23 MIPS and pci_alloc_consistent()? Shuanglin Wang
@ 2001-10-10 11:38 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2001-10-10 11:38 UTC (permalink / raw)
  To: Shuanglin Wang; +Cc: linux-mips

On Tue, Oct 09, 2001 at 04:23:49PM -0500, Shuanglin Wang wrote:

> I tried to use the pci_alloc_consistent() to allocate one-page  DMA'able
> memory for my device driver.  But, when booting up the system, it was
> always  failed to execute the pci_alloc_consistent() by showing some
> memory errors.
>
> I traced the code to the function __alloc_page() in the file
> mm/page_alloc.c, and found the system called  "wakeup_kswapd()".  But at
> that time,  the kswapd process pointer is a NULL pointer and the
> wakeup-related codes don't check the pointer is NULL or not,  so the
> system was stopped because of dereferencing the null pointer.

This sounds like either memory corruption has overwritten the kernel pointer
or you're trying to use pci_alloc_consistent before the memory managment
is initialized.

> Anybody has some ideas about the problem?  Or are there other convenient
> methods to allocate DMA'able memory?

Anything else than the pci_alloc_* functions isn't portable.

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-10 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-09 21:23 MIPS and pci_alloc_consistent()? Shuanglin Wang
2001-10-10 11:38 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox