diff mbox series

pinctrl: samsung: use raw_spinlock for s3c64xx

Message ID 20210127001631.91209-1-chanho61.park@samsung.com (mailing list archive)
State New
Headers show
Series pinctrl: samsung: use raw_spinlock for s3c64xx | expand

Commit Message

Chanho Park Jan. 27, 2021, 12:16 a.m. UTC
This patch converts spin_[lock|unlock] functions of pin bank to
raw_spinlock to support preempt-rt for pinctrl-s3c64xx. Below patch
converted spinlock_t to raw_spinlock_t but it didn't convert the
s3c64xx's spinlock.

Fixes: 1f306ecbe0f6 ("pinctrl: samsung: use raw_spinlock for locking")

Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Jan. 27, 2021, 8 a.m. UTC | #1
On Wed, Jan 27, 2021 at 09:16:31AM +0900, Chanho Park wrote:
> This patch converts spin_[lock|unlock] functions of pin bank to
> raw_spinlock to support preempt-rt for pinctrl-s3c64xx. Below patch
> converted spinlock_t to raw_spinlock_t but it didn't convert the
> s3c64xx's spinlock.

Please, don't use "This patch":
https://elixir.bootlin.com/linux/latest/source/Documentation/process/submitting-patches.rst#L89

The commit title should be changed - this is a fix now.

> 
> Fixes: 1f306ecbe0f6 ("pinctrl: samsung: use raw_spinlock for locking")
> 

No line break.

Best regards,
Krzysztof


> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
>  drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
> index b8166e3fe4ce..53e2a6412add 100644
> --- a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
> +++ b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
> @@ -286,14 +286,14 @@ static void s3c64xx_irq_set_function(struct samsung_pinctrl_drv_data *d,
>  	shift = shift * bank_type->fld_width[PINCFG_TYPE_FUNC];
>  	mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
>  
> -	spin_lock_irqsave(&bank->slock, flags);
> +	raw_spin_lock_irqsave(&bank->slock, flags);
>  
>  	val = readl(reg);
>  	val &= ~(mask << shift);
>  	val |= bank->eint_func << shift;
>  	writel(val, reg);
>  
> -	spin_unlock_irqrestore(&bank->slock, flags);
> +	raw_spin_unlock_irqrestore(&bank->slock, flags);
>  }
>  
>  /*
> -- 
> 2.30.0
>
Linus Walleij Jan. 27, 2021, 8:14 a.m. UTC | #2
On Wed, Jan 27, 2021 at 1:16 AM Chanho Park <chanho61.park@samsung.com> wrote:

> This patch converts spin_[lock|unlock] functions of pin bank to
> raw_spinlock to support preempt-rt for pinctrl-s3c64xx. Below patch
> converted spinlock_t to raw_spinlock_t but it didn't convert the
> s3c64xx's spinlock.
>
> Fixes: 1f306ecbe0f6 ("pinctrl: samsung: use raw_spinlock for locking")
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>

Fixed up the patch commit text a bit as indicated by
Krzysztof and applied so the tree compiles again.
Thanks for fixing!

Yours,
Linus Walleij
Chanho Park Jan. 27, 2021, 8:23 a.m. UTC | #3
> Fixed up the patch commit text a bit as indicated by Krzysztof and applied
> so the tree compiles again.
> Thanks for fixing!

Thanks a lot. I'll check them up carefully next time :)

Best Regards,
Chanho Park
diff mbox series

Patch

diff --git a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
index b8166e3fe4ce..53e2a6412add 100644
--- a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
+++ b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
@@ -286,14 +286,14 @@  static void s3c64xx_irq_set_function(struct samsung_pinctrl_drv_data *d,
 	shift = shift * bank_type->fld_width[PINCFG_TYPE_FUNC];
 	mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
 
-	spin_lock_irqsave(&bank->slock, flags);
+	raw_spin_lock_irqsave(&bank->slock, flags);
 
 	val = readl(reg);
 	val &= ~(mask << shift);
 	val |= bank->eint_func << shift;
 	writel(val, reg);
 
-	spin_unlock_irqrestore(&bank->slock, flags);
+	raw_spin_unlock_irqrestore(&bank->slock, flags);
 }
 
 /*