init.c (57c8a661d95dff48dd9c2f2496139082bbaf241a) | init.c (7e1c4e27928e5f87b9b1eaf06dc31773b2f1e7f1) |
---|---|
1/* 2 * Copyright (C) 2007-2008 Michal Simek <monstr@monstr.eu> 3 * Copyright (C) 2006 Atmark Techno, Inc. 4 * 5 * This file is subject to the terms and conditions of the GNU General Public 6 * License. See the file "COPYING" in the main directory of this archive 7 * for more details. 8 */ --- 362 unchanged lines hidden (view full) --- 371 372void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask) 373{ 374 void *p; 375 376 if (mem_init_done) 377 p = kzalloc(size, mask); 378 else { | 1/* 2 * Copyright (C) 2007-2008 Michal Simek <monstr@monstr.eu> 3 * Copyright (C) 2006 Atmark Techno, Inc. 4 * 5 * This file is subject to the terms and conditions of the GNU General Public 6 * License. See the file "COPYING" in the main directory of this archive 7 * for more details. 8 */ --- 362 unchanged lines hidden (view full) --- 371 372void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask) 373{ 374 void *p; 375 376 if (mem_init_done) 377 p = kzalloc(size, mask); 378 else { |
379 p = memblock_alloc(size, 0); | 379 p = memblock_alloc(size, SMP_CACHE_BYTES); |
380 if (p) 381 memset(p, 0, size); 382 } 383 return p; 384} | 380 if (p) 381 memset(p, 0, size); 382 } 383 return p; 384} |