RE: alloc_bootmem - Kernel panic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Asgard,

Thank you for your reply.
	
> I don't sure, that linux performs to allocate bootmem after kernel already booted.
> As I know, bootmem allocator "destroyed" when kernel initializes buddy allocator.
> Indeed you can look at arch/i385/mm/init.c, mem_init routine.
> kernel passes all bootmem pages to buddy system, so bootmem allocator can't be used after it. 
	
That explains why I can't use alloc_bootmem. It'd assumed that do_initcalls and hence functions labelled with module_init() were called early enough, mainly because LDD3 suggests using alloc_bootmem. It seems the vt driver uses console_init() instead, which is called much earlier.

Which leads me to the question: what is the best method to reserve a large (~4MB) coherent buffer for DMA transfers?

Is there any way of using alloc_bootmem from a driver (compiled into the kernel) without delving further into kernel code?

Martyn

________________________________________________________________________
This e-mail has been scanned for all viruses by Star.The service is powered by MessageLabs. 
________________________________________________________________________
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux