Thread (4 messages) flat view 4 messages, 2 authors, 2002-06-13

consistent_alloc from an interrupt context

From: Eugene Surovegin <hidden>
Date: 2002-06-13 03:22:23

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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help