diff options
author | Robert Richter <robert.richter@amd.com> | 2009-06-10 21:47:10 +0200 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-06-10 21:47:10 +0200 |
commit | 0886751c5d8b19fcee2e65d34ae21c9111e652a9 (patch) | |
tree | 015e8c2b3d44d46e9e8fccd016340c51bc876d3b /lib | |
parent | 7e4e0bd50e80df2fe5501f48f872448376cdd997 (diff) | |
parent | 07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff) | |
download | op-kernel-dev-0886751c5d8b19fcee2e65d34ae21c9111e652a9.zip op-kernel-dev-0886751c5d8b19fcee2e65d34ae21c9111e652a9.tar.gz |
Merge commit 'v2.6.30' into oprofile/master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 1 | ||||
-rw-r--r-- | lib/cpumask.c | 12 | ||||
-rw-r--r-- | lib/dma-debug.c | 53 |
3 files changed, 13 insertions, 53 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 812c282..6cdcf38 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -891,7 +891,6 @@ config DYNAMIC_DEBUG default n depends on PRINTK depends on DEBUG_FS - select PRINTK_DEBUG help Compiles debug level messages into the kernel, which would not diff --git a/lib/cpumask.c b/lib/cpumask.c index 1f71b97..eb23aaa 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -119,6 +119,12 @@ bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node) } EXPORT_SYMBOL(alloc_cpumask_var_node); +bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node) +{ + return alloc_cpumask_var_node(mask, flags | __GFP_ZERO, node); +} +EXPORT_SYMBOL(zalloc_cpumask_var_node); + /** * alloc_cpumask_var - allocate a struct cpumask * @mask: pointer to cpumask_var_t where the cpumask is returned @@ -135,6 +141,12 @@ bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) } EXPORT_SYMBOL(alloc_cpumask_var); +bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) +{ + return alloc_cpumask_var(mask, flags | __GFP_ZERO); +} +EXPORT_SYMBOL(zalloc_cpumask_var); + /** * alloc_bootmem_cpumask_var - allocate a struct cpumask from the bootmem arena. * @mask: pointer to cpumask_var_t where the cpumask is returned diff --git a/lib/dma-debug.c b/lib/dma-debug.c index d3da7ed..69da09a 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -400,60 +400,9 @@ out_err: return -ENOMEM; } -static int device_dma_allocations(struct device *dev) -{ - struct dma_debug_entry *entry; - unsigned long flags; - int count = 0, i; - - for (i = 0; i < HASH_SIZE; ++i) { - spin_lock_irqsave(&dma_entry_hash[i].lock, flags); - list_for_each_entry(entry, &dma_entry_hash[i].list, list) { - if (entry->dev == dev) - count += 1; - } - spin_unlock_irqrestore(&dma_entry_hash[i].lock, flags); - } - - return count; -} - -static int dma_debug_device_change(struct notifier_block *nb, - unsigned long action, void *data) -{ - struct device *dev = data; - int count; - - - switch (action) { - case BUS_NOTIFY_UNBIND_DRIVER: - count = device_dma_allocations(dev); - if (count == 0) - break; - err_printk(dev, NULL, "DMA-API: device driver has pending " - "DMA allocations while released from device " - "[count=%d]\n", count); - break; - default: - break; - } - - return 0; -} - void dma_debug_add_bus(struct bus_type *bus) { - struct notifier_block *nb; - - nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); - if (nb == NULL) { - printk(KERN_ERR "dma_debug_add_bus: out of memory\n"); - return; - } - - nb->notifier_call = dma_debug_device_change; - - bus_register_notifier(bus, nb); + /* FIXME: register notifier */ } /* |