mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* gen_pool_destroy(...)?
@ 2006-11-21 16:29 Komal Shah
  2006-12-07 20:53 ` gen_pool_destroy(...)? Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Komal Shah @ 2006-11-21 16:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: jes

Hi,

Why we don't have gen_pool_destroy(...) like mempool_destroy(...)? As
of now I can only see the application of genalloc function in
ia64/uncached.c file only.

Reason, why I am asking is, that I have dual-core embedded processor
(ARM11-ARM7), ARM11 being the master and the bridge between the two
has to manage the customized ARM7-MMU (which offers me 4GB of virtual
address space, but in application/driver, we would like to use only
2GB).

So, before mapping any user-space allocated/kernel allocated buffer to
ARM7-MMU so that it can be visible there, I want to check that Is
there any enough space left in that ARM7 virtual address space, if
yes, I want allow that virtual address to be used for mapping the
buffer.

So, use of it might go like this...

rsvpool =  gen_pool_create(PAGE_SHIFT, -1)..

gen_pool_add(rsvpool, addr, SZ_2G, -1);

....then alloc/check the space as requested by the user/kernel buffer..eg. SZ_4K

gen_pool_alloc(rsvpool, SZ_4K);

Now, each reserved pool allocation should also keep track of if it is
really mapped to ARM7 or not....

but finally when driver unloads, it should delete the pool...with
something like gen_pool_destroy(...) isn't it?

-- 
---Komal Shah
http://komalshah.blogspot.com

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

end of thread, other threads:[~2006-12-07 20:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-21 16:29 gen_pool_destroy(...)? Komal Shah
2006-12-07 20:53 ` gen_pool_destroy(...)? Jes Sorensen

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

all inboxes | Powered by JetHome®