linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] mm: add dma_pool_zalloc() & pci_pool_zalloc()
@ 2015-07-15 21:14 Sean O. Stalley
  2015-07-15 21:14 ` [PATCH 1/4] mm: Add support for __GFP_ZERO flag to dma_pool_alloc() Sean O. Stalley
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sean O. Stalley @ 2015-07-15 21:14 UTC (permalink / raw)
  To: corbet, vinod.koul, bhelgaas, Julia.Lawall, Gilles.Muller,
	nicolas.palix, mmarek
  Cc: sean.stalley, akpm, bigeasy, linux-doc, linux-kernel, dmaengine,
	linux-pci, linux-mm, cocci

Currently a call to dma_pool_alloc() with a ___GFP_ZERO flag returns
a non-zeroed memory region.

This patchset adds support for the ___GFP_ZERO flag to dma_pool_alloc(),
adds 2 wrapper functions for allocing zeroed memory from a pool, 
and provides a coccinelle script for finding & replacing instances of
dma_pool_alloc() followed by memset(0) with a single dma_pool_zalloc() call.

Sean O. Stalley (4):
  mm: Add support for __GFP_ZERO flag to dma_pool_alloc()
  mm: Add dma_pool_zalloc() call to DMA API
  pci: mm: Add pci_pool_zalloc() call
  coccinelle: mm: scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci

 Documentation/DMA-API.txt                          |  7 ++
 include/linux/dmapool.h                            |  6 ++
 include/linux/pci.h                                |  2 +
 mm/dmapool.c                                       |  6 +-
 .../coccinelle/api/alloc/pool_zalloc-simple.cocci  | 84 ++++++++++++++++++++++
 5 files changed, 104 insertions(+), 1 deletion(-)
 create mode 100644 scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci

-- 
1.9.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2015-07-21 19:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-15 21:14 [PATCH 0/4] mm: add dma_pool_zalloc() & pci_pool_zalloc() Sean O. Stalley
2015-07-15 21:14 ` [PATCH 1/4] mm: Add support for __GFP_ZERO flag to dma_pool_alloc() Sean O. Stalley
2015-07-15 21:29   ` Andrew Morton
2015-07-15 23:13     ` Sean O. Stalley
2015-07-15 21:14 ` [PATCH 2/4] mm: Add dma_pool_zalloc() call to DMA API Sean O. Stalley
2015-07-15 21:14 ` [PATCH 3/4] pci: mm: Add pci_pool_zalloc() call Sean O. Stalley
2015-07-21 19:38   ` Bjorn Helgaas
2015-07-15 21:14 ` [PATCH 4/4] coccinelle: mm: scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci Sean O. Stalley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).