Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67400
b: refs/heads/master
c: df174e3
h: refs/heads/master
v: v3
  • Loading branch information
Ed Swarthout authored and Paul Mackerras committed Oct 2, 2007
1 parent 205c953 commit 35a5718
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94987aff23bcdd7cee92edf02c2f4ef259d1cbf6
refs/heads/master: df174e3be88d4352bfcfe20d11adc671d2961c79
37 changes: 37 additions & 0 deletions trunk/arch/powerpc/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,40 @@ void free_initrd_mem(unsigned long start, unsigned long end)
}
}
#endif

#ifdef CONFIG_PROC_KCORE
static struct kcore_list kcore_vmem;

static int __init setup_kcore(void)
{
int i;

for (i = 0; i < lmb.memory.cnt; i++) {
unsigned long base;
unsigned long size;
struct kcore_list *kcore_mem;

base = lmb.memory.region[i].base;
size = lmb.memory.region[i].size;

kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC);
if (!kcore_mem)
panic("%s: kmalloc failed\n", __FUNCTION__);

/* must stay under 32 bits */
if ( 0xfffffffful - (unsigned long)__va(base) < size) {
size = 0xfffffffful - (unsigned long)(__va(base));
printk(KERN_DEBUG "setup_kcore: restrict size=%lx\n",
size);
}

kclist_add(kcore_mem, __va(base), size);
}

kclist_add(&kcore_vmem, (void *)VMALLOC_START,
VMALLOC_END-VMALLOC_START);

return 0;
}
module_init(setup_kcore);
#endif
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
}
#endif

#ifdef CONFIG_PROC_KCORE
static struct kcore_list kcore_vmem;

static int __init setup_kcore(void)
Expand All @@ -139,6 +140,7 @@ static int __init setup_kcore(void)
return 0;
}
module_init(setup_kcore);
#endif

static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
{
Expand Down

0 comments on commit 35a5718

Please sign in to comment.