lkml.org 
[lkml]   [2002]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Does pci_alloc_consisent really need to zero memory?
From
   From: Emmanuel Michon <emmanuel_michon@realmagic.fr>
Date: 30 May 2002 13:05:26 +0200

"David S. Miller" <davem@redhat.com> writes:

> I'd rather see a patch to DMA-mapping.txt that specifies the memory
> returned is zeroed out, as this is what every implementation appears
> to do.

What was the idea when writing the code that zeroes memory? It seems
so useless.

Because 9 out of 10 drivers where I had to change virt_to_bus
into the portable pci_alloc_consistent were using get_free_pages()
which zeros things out for you.

I do actually remember that many of those instances in fact did
depend on the memory being zero'd for them, they weren't using the
"zero the pages too" variant instead of __get_free_pages()
gratuitously.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.065 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site