mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Allocating non-contigious memory
@ 2001-06-27 18:42 Olivier Galibert
  2001-06-27 18:52 ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Olivier Galibert @ 2001-06-27 18:42 UTC (permalink / raw)
  To: Hack inc .

What is the Right Way[tm] as of 2.4.6 to allocate 16Mb as 4K pages and
get the pci bus address for each page?  Bonus points is they're
virtually contiguous, but that's not necessary.  IIRC, the old
vmalloc-then-walk-the-pagetables trick is considered out-of-bounds
nowadays.

  OG.


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

* Re: Allocating non-contigious memory
  2001-06-27 18:42 Allocating non-contigious memory Olivier Galibert
@ 2001-06-27 18:52 ` Alan Cox
  2001-06-27 21:31   ` Riley Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2001-06-27 18:52 UTC (permalink / raw)
  To: Olivier Galibert; +Cc: Hack inc .

> What is the Right Way[tm] as of 2.4.6 to allocate 16Mb as 4K pages and
> get the pci bus address for each page?  Bonus points is they're
> virtually contiguous, but that's not necessary.  IIRC, the old
> vmalloc-then-walk-the-pagetables trick is considered out-of-bounds
> nowadays.

If you want it virtually contiguous then copy the code from bttv that 
out-of-bounds or otherwise is now found in about 8 drivers in the kernel.

If you don't need that then you can map user space and use kiovecs - which
is nicer for many things


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

* Re: Allocating non-contigious memory
  2001-06-27 18:52 ` Alan Cox
@ 2001-06-27 21:31   ` Riley Williams
  2001-06-27 22:01     ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Riley Williams @ 2001-06-27 21:31 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel

Hi Alan.

 >> What is the Right Way[tm] as of 2.4.6 to allocate 16Mb as 4K
 >> pages and get the pci bus address for each page?  Bonus points
 >> is they're virtually contiguous, but that's not necessary.
 >> IIRC, the old vmalloc-then-walk-the-pagetables trick is
 >> considered out-of-bounds nowadays.

 > If you want it virtually contiguous then copy the code from bttv
 > that out-of-bounds or otherwise is now found in about 8 drivers
 > in the kernel.

Would it be useful to turn that particular code into a subroutine that
is called from each driver, or would that cause other problems?

Best wishes from Riley.


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

* Re: Allocating non-contigious memory
  2001-06-27 21:31   ` Riley Williams
@ 2001-06-27 22:01     ` Alan Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2001-06-27 22:01 UTC (permalink / raw)
  To: Riley Williams; +Cc: Alan Cox, Linux Kernel

> Would it be useful to turn that particular code into a subroutine that
> is called from each driver, or would that cause other problems?

It would but then I suspect Linus wouldnt want to take it as it might
encourage people to use it 8)


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

end of thread, other threads:[~2001-06-27 22:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-27 18:42 Allocating non-contigious memory Olivier Galibert
2001-06-27 18:52 ` Alan Cox
2001-06-27 21:31   ` Riley Williams
2001-06-27 22:01     ` Alan Cox

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®