All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: Stefan Roese <sr@denx.de>, u-boot@lists.denx.de
Cc: trini@konsulko.com, sjg@chromium.org
Subject: Re: [RFC PATCH 5/8] watchdog: Get rid of ASSEMBLY hacks
Date: Mon, 29 Aug 2022 09:50:31 +0200	[thread overview]
Message-ID: <7a12c12a-4003-80f7-c6b5-6c19cf16d943@prevas.dk> (raw)
In-Reply-To: <20220829062313.32654-6-sr@denx.de>

On 29/08/2022 08.23, Stefan Roese wrote:
> Only one occurance of WATCHDOG_RESET is left in one assembler file.
> This patch changes this occurance to a direct call to watchdog_reset

Well...

> and then removes all the ASSEMBLY ifdef'ery in watchdog.h, as it's not
> needed any more to clean this mess a bit up.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
>  arch/powerpc/lib/ticks.S |  5 ++--
>  include/watchdog.h       | 50 +++++++++++++---------------------------
>  2 files changed, 19 insertions(+), 36 deletions(-)
> 
> diff --git a/arch/powerpc/lib/ticks.S b/arch/powerpc/lib/ticks.S
> index c487f938fa8d..8647d77cc9ad 100644
> --- a/arch/powerpc/lib/ticks.S
> +++ b/arch/powerpc/lib/ticks.S
> @@ -9,7 +9,6 @@
>  #include <ppc_asm.tmpl>
>  #include <ppc_defs.h>
>  #include <config.h>
> -#include <watchdog.h>
>  
>  /*
>   * unsigned long long get_ticks(void);
> @@ -42,7 +41,9 @@ wait_ticks:
>  	addc    r14, r4, r14	/* Compute end time lower */
>  	addze	r15, r3		/*     and end time upper */
>  
> -	WATCHDOG_RESET		/* Trigger watchdog, if needed */
> +#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
> +	bl	schedule	/* Trigger watchdog, if needed */

...you actually change it to a call to schedule(), which AFAICT doesn't
always exist (at least as a function with external linkage). Or does it
if either one of those conditions are met?

Side note: Oh gosh do I hope this can put an end to the CONFIG_WATCHDOG
v CONFIG_HW_WATCHDOG silliness; what is a watchdog if not a piece of HW.

>  	#if defined(CONFIG_WATCHDOG)
> -		#if defined(__ASSEMBLY__)
> -			/* Don't require the watchdog to be enabled in SPL */
> -			#if defined(CONFIG_SPL_BUILD) &&		\
> -				!defined(CONFIG_SPL_WATCHDOG)
> -				#define WATCHDOG_RESET /*XXX DO_NOT_DEL_THIS_COMMENT*/

Yes please. I strongly suspect that comment is some ancient leftover
from some none-complying preprocessor or whatnot.

Rasmus

  reply	other threads:[~2022-08-29  7:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29  6:23 [RFC PATCH 0/8] Migrate watchdog reset to cyclic infrastructure Stefan Roese
2022-08-29  6:23 ` [RFC PATCH 1/8] cmd/cyclic: Use div64 macros for division and remainder Stefan Roese
2022-08-30  2:31   ` Simon Glass
2022-08-29  6:23 ` [RFC PATCH 2/8] watchdog: Integrate watchdog triggering into the cyclic framework Stefan Roese
2022-08-29  7:38   ` Rasmus Villemoes
2022-08-29  8:09     ` Stefan Roese
2022-08-29  6:23 ` [RFC PATCH 3/8] cyclic: Introduce schedule() function Stefan Roese
2022-08-30  2:31   ` Simon Glass
2022-08-29  6:23 ` [RFC PATCH 4/8] cyclic: Use schedule() instead of WATCHDOG_RESET() Stefan Roese
2022-08-30  2:31   ` Simon Glass
2022-08-29  6:23 ` [RFC PATCH 5/8] watchdog: Get rid of ASSEMBLY hacks Stefan Roese
2022-08-29  7:50   ` Rasmus Villemoes [this message]
2022-08-29  8:31     ` Stefan Roese
2022-08-29  6:23 ` [RFC PATCH 6/8] watchdog: Remove WATCHDOG_RESET macro Stefan Roese
2022-08-30  2:31   ` Simon Glass
2022-08-29  6:23 ` [RFC PATCH 7/8] watchdog: Further cleanup Stefan Roese
2022-08-30  2:31   ` Simon Glass
2022-08-29  6:23 ` [RFC PATCH 8/8] WIP: .azure-pipelines.yml: Remove evb-ast2600 Stefan Roese
2022-09-02  4:09   ` Joel Stanley
2022-09-02  6:00     ` Joel Stanley
2022-09-02  6:14       ` Stefan Roese
2022-09-02  7:44         ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a12c12a-4003-80f7-c6b5-6c19cf16d943@prevas.dk \
    --to=rasmus.villemoes@prevas.dk \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.