linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms
@ 2022-08-20 20:28 Jerry Hoemann
  2022-08-20 20:28 ` [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING Jerry Hoemann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jerry Hoemann @ 2022-08-20 20:28 UTC (permalink / raw)
  To: linux, wim; +Cc: linux-watchdog, linux-kernel, Jerry Hoemann

Enable hpwdt for the rl300, an ARM64 based platform.


Patch 1: watchdog/hpwdt.c: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING

ARM64 does not support NMI and does not have <asm/nmi.h>.  Include
nmi.h only if CONFIG_HPWDT_NMI_DECODING is defined.

Patch 2: watchdog/Kconfig:  Allow hpwdt.c to be built for ARM64.

Allow hpwdt.c to be built for (ARM64 || X86) as this part of hwpdt doesn't
use NMI.

Make HPWDT_NMI_DECODING dependent upon X86 as NMI handlers are specific
to X86 platforms.


== Changes for v2 ==
Update patch documentation.




Jerry Hoemann (2):
  watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING
  watchdog: Enable HP_WATCHDOG for ARM64 systems.

 drivers/watchdog/Kconfig | 4 ++--
 drivers/watchdog/hpwdt.c | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.37.1


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

* [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING
  2022-08-20 20:28 [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann
@ 2022-08-20 20:28 ` Jerry Hoemann
  2022-08-29 16:15   ` Guenter Roeck
  2022-08-20 20:28 ` [PATCH v2 2/2] watchdog: Enable HP_WATCHDOG for ARM64 systems Jerry Hoemann
  2022-08-29 15:19 ` [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann
  2 siblings, 1 reply; 6+ messages in thread
From: Jerry Hoemann @ 2022-08-20 20:28 UTC (permalink / raw)
  To: linux, wim; +Cc: linux-watchdog, linux-kernel, Jerry Hoemann

Fixes: d48b0e173715 ("x86, nmi, drivers: Fix nmi splitup build bug")

Arm64 does not support NMI and has no <asm/nmi.h>.

Include <asm/nmi.h> only if CONFIG_HPWDT_NMI_DECODING is defined to
avoid build failure on non-existent header file on Arm64.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 drivers/watchdog/hpwdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index a5006a58e0db..f79f932bca14 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -20,7 +20,9 @@
 #include <linux/pci_ids.h>
 #include <linux/types.h>
 #include <linux/watchdog.h>
+#ifdef CONFIG_HPWDT_NMI_DECODING
 #include <asm/nmi.h>
+#endif
 #include <linux/crash_dump.h>
 
 #define HPWDT_VERSION			"2.0.4"
-- 
2.37.1


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

* [PATCH v2 2/2] watchdog: Enable HP_WATCHDOG for ARM64 systems.
  2022-08-20 20:28 [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann
  2022-08-20 20:28 ` [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING Jerry Hoemann
@ 2022-08-20 20:28 ` Jerry Hoemann
  2022-08-29 16:15   ` Guenter Roeck
  2022-08-29 15:19 ` [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann
  2 siblings, 1 reply; 6+ messages in thread
From: Jerry Hoemann @ 2022-08-20 20:28 UTC (permalink / raw)
  To: linux, wim; +Cc: linux-watchdog, linux-kernel, Jerry Hoemann

Enable HP_WATCHDOG for ARM64 systems.
HPWDT_NMI_DECODING requires X86 as NMI handlers are X86 specific.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 drivers/watchdog/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 9295492d24f7..cd643e50681e 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1315,7 +1315,7 @@ config IT87_WDT
 config HP_WATCHDOG
 	tristate "HP ProLiant iLO2+ Hardware Watchdog Timer"
 	select WATCHDOG_CORE
-	depends on X86 && PCI
+	depends on (ARM64 || X86) && PCI
 	help
 	  A software monitoring watchdog and NMI handling driver. This driver
 	  will detect lockups and provide a stack trace. This is a driver that
@@ -1325,7 +1325,7 @@ config HP_WATCHDOG
 
 config HPWDT_NMI_DECODING
 	bool "NMI support for the HP ProLiant iLO2+ Hardware Watchdog Timer"
-	depends on HP_WATCHDOG
+	depends on X86 && HP_WATCHDOG
 	default y
 	help
 	  Enables the NMI handler for the watchdog pretimeout NMI and the iLO
-- 
2.37.1


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

* Re: [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms
  2022-08-20 20:28 [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann
  2022-08-20 20:28 ` [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING Jerry Hoemann
  2022-08-20 20:28 ` [PATCH v2 2/2] watchdog: Enable HP_WATCHDOG for ARM64 systems Jerry Hoemann
@ 2022-08-29 15:19 ` Jerry Hoemann
  2 siblings, 0 replies; 6+ messages in thread
From: Jerry Hoemann @ 2022-08-29 15:19 UTC (permalink / raw)
  To: linux, wim; +Cc: linux-watchdog, linux-kernel

On Sat, Aug 20, 2022 at 02:28:19PM -0600, Jerry Hoemann wrote:
> Enable hpwdt for the rl300, an ARM64 based platform.
> 

Guenter,

Did you have any questions/comments on version 2 of the patch series?

Thanks

Jerry

> 
> Patch 1: watchdog/hpwdt.c: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING
> 
> ARM64 does not support NMI and does not have <asm/nmi.h>.  Include
> nmi.h only if CONFIG_HPWDT_NMI_DECODING is defined.
> 
> Patch 2: watchdog/Kconfig:  Allow hpwdt.c to be built for ARM64.
> 
> Allow hpwdt.c to be built for (ARM64 || X86) as this part of hwpdt doesn't
> use NMI.
> 
> Make HPWDT_NMI_DECODING dependent upon X86 as NMI handlers are specific
> to X86 platforms.
> 
> 
> == Changes for v2 ==
> Update patch documentation.
> 
> 
> 
> 
> Jerry Hoemann (2):
>   watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING
>   watchdog: Enable HP_WATCHDOG for ARM64 systems.
> 
>  drivers/watchdog/Kconfig | 4 ++--
>  drivers/watchdog/hpwdt.c | 2 ++
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> -- 
> 2.37.1

-- 

-----------------------------------------------------------------------------
Jerry Hoemann                  Software Engineer   Hewlett Packard Enterprise
-----------------------------------------------------------------------------

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

* Re: [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING
  2022-08-20 20:28 ` [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING Jerry Hoemann
@ 2022-08-29 16:15   ` Guenter Roeck
  0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2022-08-29 16:15 UTC (permalink / raw)
  To: Jerry Hoemann, wim; +Cc: linux-watchdog, linux-kernel

On 8/20/22 13:28, Jerry Hoemann wrote:
> Fixes: d48b0e173715 ("x86, nmi, drivers: Fix nmi splitup build bug")
> 
> Arm64 does not support NMI and has no <asm/nmi.h>.
> 
> Include <asm/nmi.h> only if CONFIG_HPWDT_NMI_DECODING is defined to
> avoid build failure on non-existent header file on Arm64.
> 
> Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/hpwdt.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index a5006a58e0db..f79f932bca14 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -20,7 +20,9 @@
>   #include <linux/pci_ids.h>
>   #include <linux/types.h>
>   #include <linux/watchdog.h>
> +#ifdef CONFIG_HPWDT_NMI_DECODING
>   #include <asm/nmi.h>
> +#endif
>   #include <linux/crash_dump.h>
>   
>   #define HPWDT_VERSION			"2.0.4"


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

* Re: [PATCH v2 2/2] watchdog: Enable HP_WATCHDOG for ARM64 systems.
  2022-08-20 20:28 ` [PATCH v2 2/2] watchdog: Enable HP_WATCHDOG for ARM64 systems Jerry Hoemann
@ 2022-08-29 16:15   ` Guenter Roeck
  0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2022-08-29 16:15 UTC (permalink / raw)
  To: Jerry Hoemann, wim; +Cc: linux-watchdog, linux-kernel

On 8/20/22 13:28, Jerry Hoemann wrote:
> Enable HP_WATCHDOG for ARM64 systems.
> HPWDT_NMI_DECODING requires X86 as NMI handlers are X86 specific.
> 
> Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/Kconfig | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 9295492d24f7..cd643e50681e 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1315,7 +1315,7 @@ config IT87_WDT
>   config HP_WATCHDOG
>   	tristate "HP ProLiant iLO2+ Hardware Watchdog Timer"
>   	select WATCHDOG_CORE
> -	depends on X86 && PCI
> +	depends on (ARM64 || X86) && PCI
>   	help
>   	  A software monitoring watchdog and NMI handling driver. This driver
>   	  will detect lockups and provide a stack trace. This is a driver that
> @@ -1325,7 +1325,7 @@ config HP_WATCHDOG
>   
>   config HPWDT_NMI_DECODING
>   	bool "NMI support for the HP ProLiant iLO2+ Hardware Watchdog Timer"
> -	depends on HP_WATCHDOG
> +	depends on X86 && HP_WATCHDOG
>   	default y
>   	help
>   	  Enables the NMI handler for the watchdog pretimeout NMI and the iLO


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

end of thread, other threads:[~2022-08-29 16:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-20 20:28 [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann
2022-08-20 20:28 ` [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING Jerry Hoemann
2022-08-29 16:15   ` Guenter Roeck
2022-08-20 20:28 ` [PATCH v2 2/2] watchdog: Enable HP_WATCHDOG for ARM64 systems Jerry Hoemann
2022-08-29 16:15   ` Guenter Roeck
2022-08-29 15:19 ` [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).