Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188356
b: refs/heads/master
c: a84642a
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Mar 11, 2010
1 parent 4532bae commit b554bc0
Show file tree
Hide file tree
Showing 3 changed files with 27 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: 2549edd353196d7de9c18e08146d7a8836f97235
refs/heads/master: a84642a339235020e6dccc022de27055f1fa9340
3 changes: 3 additions & 0 deletions trunk/arch/microblaze/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ void free_initmem(void);
extern char *klimit;
extern void ret_from_fork(void);

extern void *alloc_maybe_bootmem(size_t size, gfp_t mask);
extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);

#ifdef CONFIG_DEBUG_FS
extern struct dentry *of_debugfs_root;
#endif
Expand Down
23 changes: 23 additions & 0 deletions trunk/arch/microblaze/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,27 @@ void __init *early_get_page(void)
}
return p;
}

void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask)
{
if (mem_init_done)
return kmalloc(size, mask);
else
return alloc_bootmem(size);
}

void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask)
{
void *p;

if (mem_init_done)
p = kzalloc(size, mask);
else {
p = alloc_bootmem(size);
if (p)
memset(p, 0, size);
}
return p;
}

#endif /* CONFIG_MMU */

0 comments on commit b554bc0

Please sign in to comment.