All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: Fabien Dessenne <fabien.dessenne@st.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-remoteproc@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Benjamin Gaignard <benjamin.gaignard@st.com>
Subject: Re: [PATCH] hwspinlock: stm32: implement the relax() ops
Date: Fri, 8 Mar 2019 13:42:44 +0100	[thread overview]
Message-ID: <CA+M3ks6r_OWvit3OK0yqDDgfnVyyxPoo5aO2n9tRhhoS4=u4XQ@mail.gmail.com> (raw)
In-Reply-To: <1551973336-23048-1-git-send-email-fabien.dessenne@st.com>

Le jeu. 7 mars 2019 à 16:42, Fabien Dessenne <fabien.dessenne@st.com> a écrit :
>
> Implement this optional ops, called by hwspinlock core while spinning on
> a lock, between two successive invocations of trylock().
>
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>

Reviewed-by: Benjamin Gaignard <benjamin.gaignard@st.com>

> ---
>  drivers/hwspinlock/stm32_hwspinlock.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/hwspinlock/stm32_hwspinlock.c b/drivers/hwspinlock/stm32_hwspinlock.c
> index 4418392..c8eacf4 100644
> --- a/drivers/hwspinlock/stm32_hwspinlock.c
> +++ b/drivers/hwspinlock/stm32_hwspinlock.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <linux/clk.h>
> +#include <linux/delay.h>
>  #include <linux/hwspinlock.h>
>  #include <linux/io.h>
>  #include <linux/kernel.h>
> @@ -42,9 +43,15 @@ static void stm32_hwspinlock_unlock(struct hwspinlock *lock)
>         writel(STM32_MUTEX_COREID, lock_addr);
>  }
>
> +static void stm32_hwspinlock_relax(struct hwspinlock *lock)
> +{
> +       ndelay(50);
> +}
> +
>  static const struct hwspinlock_ops stm32_hwspinlock_ops = {
>         .trylock        = stm32_hwspinlock_trylock,
>         .unlock         = stm32_hwspinlock_unlock,
> +       .relax          = stm32_hwspinlock_relax,
>  };
>
>  static int stm32_hwspinlock_probe(struct platform_device *pdev)
> --
> 2.7.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: Fabien Dessenne <fabien.dessenne@st.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-remoteproc@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Benjamin Gaignard <benjamin.gaignard@st.com>
Subject: Re: [PATCH] hwspinlock: stm32: implement the relax() ops
Date: Fri, 8 Mar 2019 13:42:44 +0100	[thread overview]
Message-ID: <CA+M3ks6r_OWvit3OK0yqDDgfnVyyxPoo5aO2n9tRhhoS4=u4XQ@mail.gmail.com> (raw)
In-Reply-To: <1551973336-23048-1-git-send-email-fabien.dessenne@st.com>

Le jeu. 7 mars 2019 à 16:42, Fabien Dessenne <fabien.dessenne@st.com> a écrit :
>
> Implement this optional ops, called by hwspinlock core while spinning on
> a lock, between two successive invocations of trylock().
>
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>

Reviewed-by: Benjamin Gaignard <benjamin.gaignard@st.com>

> ---
>  drivers/hwspinlock/stm32_hwspinlock.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/hwspinlock/stm32_hwspinlock.c b/drivers/hwspinlock/stm32_hwspinlock.c
> index 4418392..c8eacf4 100644
> --- a/drivers/hwspinlock/stm32_hwspinlock.c
> +++ b/drivers/hwspinlock/stm32_hwspinlock.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <linux/clk.h>
> +#include <linux/delay.h>
>  #include <linux/hwspinlock.h>
>  #include <linux/io.h>
>  #include <linux/kernel.h>
> @@ -42,9 +43,15 @@ static void stm32_hwspinlock_unlock(struct hwspinlock *lock)
>         writel(STM32_MUTEX_COREID, lock_addr);
>  }
>
> +static void stm32_hwspinlock_relax(struct hwspinlock *lock)
> +{
> +       ndelay(50);
> +}
> +
>  static const struct hwspinlock_ops stm32_hwspinlock_ops = {
>         .trylock        = stm32_hwspinlock_trylock,
>         .unlock         = stm32_hwspinlock_unlock,
> +       .relax          = stm32_hwspinlock_relax,
>  };
>
>  static int stm32_hwspinlock_probe(struct platform_device *pdev)
> --
> 2.7.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-03-08 12:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 15:42 [PATCH] hwspinlock: stm32: implement the relax() ops Fabien Dessenne
2019-03-07 15:42 ` Fabien Dessenne
2019-03-07 15:42 ` Fabien Dessenne
2019-03-08 12:42 ` Benjamin Gaignard [this message]
2019-03-08 12:42   ` Benjamin Gaignard
2019-05-13  9:07   ` Fabien DESSENNE
2019-05-13  9:07     ` Fabien DESSENNE
2019-05-13  9:07     ` Fabien DESSENNE
2019-06-30  4:05 ` Bjorn Andersson
2019-06-30  4:05   ` Bjorn Andersson

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='CA+M3ks6r_OWvit3OK0yqDDgfnVyyxPoo5aO2n9tRhhoS4=u4XQ@mail.gmail.com' \
    --to=benjamin.gaignard@linaro.org \
    --cc=alexandre.torgue@st.com \
    --cc=benjamin.gaignard@st.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=fabien.dessenne@st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=ohad@wizery.com \
    /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.