linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* consistent_alloc from an interrupt context
@ 2002-06-13  3:22 Eugene Surovegin
  2002-06-13  4:05 ` Dan Malek
  0 siblings, 1 reply; 4+ messages in thread
From: Eugene Surovegin @ 2002-06-13  3:22 UTC (permalink / raw)
  To: linuxppc-embedded


Hi!

Current PPC implementation of consistent_alloc cannot be called from an
interrupt context.
This function is used by pci_alloc_consistent when
CONFIG_NOT_COHERENT_CACHE is defined.

Unfortunately it contradicts Documentation/DMA-mapping.txt which clearly
states that pci_alloc_consistent can be called from an interrupt context,
and some drivers breaks under PPC because of it.

The only part of consistent_alloc that may sleep is a call to get_vm_area.

I did quick (and dirty) fix for this problem.
I reserved a virtual address space  of a reasonable size (16M), and later
just use some part of it for real page allocations when called from
interrupt context. No deallocation support :( though

Correct implementation will require something like stuff from vmaloc.c and
it seems like a lot of code duplication to me.

So, my question to "big guys" here :), is there a better way to implement this?

Thanks,

  Eugene Surovegin <mailto:ebs@innocent.com>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2002-06-13  5:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-13  3:22 consistent_alloc from an interrupt context Eugene Surovegin
2002-06-13  4:05 ` Dan Malek
2002-06-13  4:24   ` Eugene Surovegin
2002-06-13  5:06     ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).