]> git.neil.brown.name Git - history.git/commitdiff
Fix percpu patch breakage
authorLinus Torvalds <torvalds@penguin.transmeta.com>
Wed, 6 Mar 2002 08:22:31 +0000 (00:22 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Wed, 6 Mar 2002 08:22:31 +0000 (00:22 -0800)
include/linux/compiler.h
init/main.c

index cd8cca0fef8f3c7d1083a3680e40d7f2cad44dae..ccaabc24e367f22f211881cf4353a2066f9ba017 100644 (file)
@@ -15,8 +15,7 @@
 
 /* This macro obfuscates arithmetic on a variable address so that gcc
    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;                                 \
     __asm__ ("" : "=g"(__ptr) : "0"((void *)&(var) + (off)));  \
     *__ptr; })
index 41189a1290bc85b48d7538249e1e45ace7e33e64..b655eba636d6b4531de1e235aa6e592f3e77a6a1 100644 (file)
@@ -287,6 +287,9 @@ static void __init setup_per_cpu_areas(void)
 
        /* Copy section for each CPU (we discard the original) */
        size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
+       if (!size)
+               return;
+
        ptr = alloc_bootmem(size * NR_CPUS);
 
        for (i = 0; i < NR_CPUS; i++, ptr += size) {