Commit d6e4bed6 authored by Linus Torvalds's avatar Linus Torvalds

Fix percpu patch breakage

parent ddffeb01
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
/* This macro obfuscates arithmetic on a variable address so that gcc /* This macro obfuscates arithmetic on a variable address so that gcc
shouldn't recognize the original var, and make assumptions about it */ shouldn't recognize the original var, and make assumptions about it */
strcpy(s, "xxx"+X) => memcpy(s, "xxx"+X, 4-X) */ #define RELOC_HIDE(var, off) \
#define RELOC_HIDE(var, off) \
({ __typeof__(&(var)) __ptr; \ ({ __typeof__(&(var)) __ptr; \
__asm__ ("" : "=g"(__ptr) : "0"((void *)&(var) + (off))); \ __asm__ ("" : "=g"(__ptr) : "0"((void *)&(var) + (off))); \
*__ptr; }) *__ptr; })
......
...@@ -287,6 +287,9 @@ static void __init setup_per_cpu_areas(void) ...@@ -287,6 +287,9 @@ static void __init setup_per_cpu_areas(void)
/* Copy section for each CPU (we discard the original) */ /* Copy section for each CPU (we discard the original) */
size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
if (!size)
return;
ptr = alloc_bootmem(size * NR_CPUS); ptr = alloc_bootmem(size * NR_CPUS);
for (i = 0; i < NR_CPUS; i++, ptr += size) { for (i = 0; i < NR_CPUS; i++, ptr += size) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment