Skip to content

Commit

Permalink
powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y
Browse files Browse the repository at this point in the history
skiroot_defconfig fails:

arch/powerpc/kernel/fadump.c:48:17: error: ‘cpus_in_fadump’ defined but not used
   48 | static atomic_t cpus_in_fadump;

Fix it by moving the definition into the #ifdef where it's used.

Fixes: ba608c4 ("powerpc/fadump: fix race between pstore write and fadump crash trigger")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200727070341.595634-1-mpe@ellerman.id.au
  • Loading branch information
Michael Ellerman committed Jul 27, 2020
1 parent 86052e4 commit 5f987ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/powerpc/kernel/fadump.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ static struct fw_dump fw_dump;
static void __init fadump_reserve_crash_area(u64 base);

struct kobject *fadump_kobj;
static atomic_t cpus_in_fadump;

#ifndef CONFIG_PRESERVE_FA_DUMP

static atomic_t cpus_in_fadump;
static DEFINE_MUTEX(fadump_mutex);

struct fadump_mrange_info crash_mrange_info = { "crash", NULL, 0, 0, 0, false };

#define RESERVED_RNGS_SZ 16384 /* 16K - 128 entries */
Expand Down

0 comments on commit 5f987ca

Please sign in to comment.