diff options
Diffstat (limited to 'libdde_linux26')
-rw-r--r-- | libdde_linux26/lib/src/arch/l4/kmalloc.c | 11 | ||||
-rw-r--r-- | libdde_linux26/lib/src/arch/l4/res.c | 8 | ||||
-rw-r--r-- | libdde_linux26/lib/src/net/core/skbuff.c | 9 |
3 files changed, 25 insertions, 3 deletions
diff --git a/libdde_linux26/lib/src/arch/l4/kmalloc.c b/libdde_linux26/lib/src/arch/l4/kmalloc.c index 0e94fb97..816f443c 100644 --- a/libdde_linux26/lib/src/arch/l4/kmalloc.c +++ b/libdde_linux26/lib/src/arch/l4/kmalloc.c @@ -131,14 +131,23 @@ void *__kmalloc(size_t size, gfp_t flags) struct kmem_cache *cache = find_cache(size); void **p; - if (cache) + if (cache) { /* allocate from cache */ p = kmem_cache_alloc(cache, flags); + if (!p) { + printk("__kmalloc: kmem_cache_alloc %s fails\n", + ((char **)cache)[0]); + } + } else { /* no cache for this size - use ddekit malloc */ p = ddekit_large_malloc(size); if (flags & __GFP_ZERO) memset (p, 0, size); + if (!p) { + printk("__kmalloc: ddekit_large_malloc %d fails\n", + size); + } } ddekit_log(DEBUG_MALLOC, "size=%d, cache=%p (%d) => %p", diff --git a/libdde_linux26/lib/src/arch/l4/res.c b/libdde_linux26/lib/src/arch/l4/res.c index fbd2d09b..a2ffb98f 100644 --- a/libdde_linux26/lib/src/arch/l4/res.c +++ b/libdde_linux26/lib/src/arch/l4/res.c @@ -99,8 +99,12 @@ struct resource * __request_region(struct resource *parent, switch (parent->flags) { case IORESOURCE_IO: + printk("IO: name: %s, start: %x, len: %d\n", + name, start, n); return l4dde26_request_region(start, n, name); case IORESOURCE_MEM: + printk("MEM: name: %s, start: %x, len: %d\n", + name, start, n); return l4dde26_request_mem_region(start, n, name); } @@ -161,7 +165,11 @@ void __iomem * ioremap(unsigned long phys_addr, unsigned long size) struct dde_mem_region *mreg = list_entry(pos, struct dde_mem_region, list); if (mreg->pa <= phys_addr && mreg->pa + mreg->size >= phys_addr + size) + { + printk ("ioremap: phys: %x <-> virt: %x\n", phys_addr, + (mreg->va + (phys_addr - mreg->pa))); return (void *)(mreg->va + (phys_addr - mreg->pa)); + } } return NULL; diff --git a/libdde_linux26/lib/src/net/core/skbuff.c b/libdde_linux26/lib/src/net/core/skbuff.c index 2f65e534..40d64a88 100644 --- a/libdde_linux26/lib/src/net/core/skbuff.c +++ b/libdde_linux26/lib/src/net/core/skbuff.c @@ -180,14 +180,19 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, /* Get the HEAD */ skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node); - if (!skb) + if (!skb) { + printk("kmem_cache_alloc_node fails\n"); goto out; + } size = SKB_DATA_ALIGN(size); data = kmalloc_node_track_caller(size + sizeof(struct skb_shared_info), gfp_mask, node); - if (!data) + if (!data) { + printk("kmalloc_node_track_caller %d fails\n", + size + sizeof(struct skb_shared_info)); goto nodata; + } /* * Only clear those fields we need to clear, not those that we will |