summaryrefslogtreecommitdiff
path: root/libdde_linux26/lib/src/arch/l4
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2010-05-04 15:56:46 +0200
committerZheng Da <zhengda1936@gmail.com>2010-05-04 15:56:46 +0200
commit045fb6a578e0e4d97f0e581bbf514654686a86c1 (patch)
tree399ce48eee3b26437b0452842e8f67588e476360 /libdde_linux26/lib/src/arch/l4
parentb45568005e6b67d35caa0f03f7d54180b82a7a6f (diff)
Add printing.
Diffstat (limited to 'libdde_linux26/lib/src/arch/l4')
-rw-r--r--libdde_linux26/lib/src/arch/l4/kmalloc.c11
-rw-r--r--libdde_linux26/lib/src/arch/l4/res.c8
2 files changed, 18 insertions, 1 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;