drm/amdgpu: Do error injection even vram reserve fails
[linux-2.6-microblaze.git] / kernel / kexec_file.c
index f7fb8f6..072b6ee 100644 (file)
@@ -500,13 +500,7 @@ static int locate_mem_hole_callback(struct resource *res, void *arg)
        return locate_mem_hole_bottom_up(start, end, kbuf);
 }
 
-#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
-static int kexec_walk_memblock(struct kexec_buf *kbuf,
-                              int (*func)(struct resource *, void *))
-{
-       return 0;
-}
-#else
+#ifdef CONFIG_ARCH_KEEP_MEMBLOCK
 static int kexec_walk_memblock(struct kexec_buf *kbuf,
                               int (*func)(struct resource *, void *))
 {
@@ -550,6 +544,12 @@ static int kexec_walk_memblock(struct kexec_buf *kbuf,
 
        return ret;
 }
+#else
+static int kexec_walk_memblock(struct kexec_buf *kbuf,
+                              int (*func)(struct resource *, void *))
+{
+       return 0;
+}
 #endif
 
 /**
@@ -589,7 +589,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
        if (kbuf->mem != KEXEC_BUF_MEM_UNKNOWN)
                return 0;
 
-       if (IS_ENABLED(CONFIG_ARCH_DISCARD_MEMBLOCK))
+       if (!IS_ENABLED(CONFIG_ARCH_KEEP_MEMBLOCK))
                ret = kexec_walk_resources(kbuf, locate_mem_hole_callback);
        else
                ret = kexec_walk_memblock(kbuf, locate_mem_hole_callback);