X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=mm%2Fpercpu-km.c;h=89633fefc6a2b39d8d32d0204846f4ab8b303930;hb=07675d98fa2304b6c64ded1099f2b08777316241;hp=df680855540a61264d27fbb041d274c5b6ca3d2a;hpb=ecca1a34befbb13fc23d9a2cc0d6b725c7727fb2;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/mm/percpu-km.c b/mm/percpu-km.c index df68085..89633fe 100644 --- a/mm/percpu-km.c +++ b/mm/percpu-km.c @@ -27,7 +27,7 @@ * chunk size is not aligned. percpu-km code will whine about it. */ -#ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK +#if defined(CONFIG_SMP) && defined(CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK) #error "contiguous percpu allocation is incompatible with paged first chunk" #endif @@ -35,7 +35,11 @@ static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size) { - /* noop */ + unsigned int cpu; + + for_each_possible_cpu(cpu) + memset((void *)pcpu_chunk_addr(chunk, cpu, 0) + off, 0, size); + return 0; }