LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y
@ 2020-07-27  7:03 Michael Ellerman
  2020-07-29 15:03 ` Gustavo Romero
  2020-07-30 12:51 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Ellerman @ 2020-07-27  7:03 UTC (permalink / raw)
  To: linuxppc-dev

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: ba608c4fa12c ("powerpc/fadump: fix race between pstore write and fadump crash trigger")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/fadump.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 1858896d6809..10ebb4bf71ad 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -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 */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y
  2020-07-27  7:03 [PATCH] powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y Michael Ellerman
@ 2020-07-29 15:03 ` Gustavo Romero
  2020-07-30 12:51 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Gustavo Romero @ 2020-07-29 15:03 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

On 7/27/20 4:03 AM, Michael Ellerman wrote:
> 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: ba608c4fa12c ("powerpc/fadump: fix race between pstore write and fadump crash trigger")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>   arch/powerpc/kernel/fadump.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index 1858896d6809..10ebb4bf71ad 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -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 */
> 

Tested-by: Gustavo Romero <gromero@linux.ibm.com>


Thanks,
Gustavo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y
  2020-07-27  7:03 [PATCH] powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y Michael Ellerman
  2020-07-29 15:03 ` Gustavo Romero
@ 2020-07-30 12:51 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2020-07-30 12:51 UTC (permalink / raw)
  To: linuxppc-dev, Michael Ellerman


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #0: Type: text/plain, Size: 473 bytes --]

On Mon, 27 Jul 2020 17:03:41 +1000, Michael Ellerman wrote:
> 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.

Applied to powerpc/next.

[1/1] powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y
      https://git.kernel.org/powerpc/c/5f987caec521cbb00d4ba2dc641ac8074626b762

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27  7:03 [PATCH] powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y Michael Ellerman
2020-07-29 15:03 ` Gustavo Romero
2020-07-30 12:51 ` Michael Ellerman

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git