All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx
       [not found] <CGME20210127001644epcas2p13cbc984fecc3ac7700a422488b488135@epcas2p1.samsung.com>
@ 2021-01-27  0:16   ` Chanho Park
  0 siblings, 0 replies; 8+ messages in thread
From: Chanho Park @ 2021-01-27  0:16 UTC (permalink / raw)
  To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki, Linus Walleij
  Cc: linux-arm-kernel, linux-samsung-soc, linux-gpio, Chanho Park

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(-)

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


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

* [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx
@ 2021-01-27  0:16   ` Chanho Park
  0 siblings, 0 replies; 8+ messages in thread
From: Chanho Park @ 2021-01-27  0:16 UTC (permalink / raw)
  To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki, Linus Walleij
  Cc: linux-gpio, Chanho Park, linux-samsung-soc, linux-arm-kernel

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(-)

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


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

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

* Re: [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx
  2021-01-27  0:16   ` Chanho Park
@ 2021-01-27  8:00     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-27  8:00 UTC (permalink / raw)
  To: Chanho Park
  Cc: Tomasz Figa, Sylwester Nawrocki, Linus Walleij, linux-arm-kernel,
	linux-samsung-soc, linux-gpio

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
> 

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

* Re: [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx
@ 2021-01-27  8:00     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-27  8:00 UTC (permalink / raw)
  To: Chanho Park
  Cc: linux-samsung-soc, Linus Walleij, Tomasz Figa, linux-gpio,
	Sylwester Nawrocki, linux-arm-kernel

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
> 

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

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

* Re: [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx
  2021-01-27  0:16   ` Chanho Park
@ 2021-01-27  8:14     ` Linus Walleij
  -1 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2021-01-27  8:14 UTC (permalink / raw)
  To: Chanho Park
  Cc: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki, Linux ARM,
	linux-samsung-soc, open list:GPIO SUBSYSTEM

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

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

* Re: [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx
@ 2021-01-27  8:14     ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2021-01-27  8:14 UTC (permalink / raw)
  To: Chanho Park
  Cc: linux-samsung-soc, Tomasz Figa, Krzysztof Kozlowski,
	open list:GPIO SUBSYSTEM, Sylwester Nawrocki, Linux ARM

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

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

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

* RE: [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx
  2021-01-27  8:14     ` Linus Walleij
@ 2021-01-27  8:23       ` Chanho Park
  -1 siblings, 0 replies; 8+ messages in thread
From: Chanho Park @ 2021-01-27  8:23 UTC (permalink / raw)
  To: 'Linus Walleij'
  Cc: 'Tomasz Figa', 'Krzysztof Kozlowski',
	'Sylwester Nawrocki', 'Linux ARM',
	'linux-samsung-soc', 'open list:GPIO SUBSYSTEM'

> 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


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

* RE: [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx
@ 2021-01-27  8:23       ` Chanho Park
  0 siblings, 0 replies; 8+ messages in thread
From: Chanho Park @ 2021-01-27  8:23 UTC (permalink / raw)
  To: 'Linus Walleij'
  Cc: 'linux-samsung-soc', 'Tomasz Figa',
	'Krzysztof Kozlowski', 'open list:GPIO SUBSYSTEM',
	'Sylwester Nawrocki', 'Linux ARM'

> 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


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

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

end of thread, other threads:[~2021-01-27  8:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20210127001644epcas2p13cbc984fecc3ac7700a422488b488135@epcas2p1.samsung.com>
2021-01-27  0:16 ` [PATCH] pinctrl: samsung: use raw_spinlock for s3c64xx Chanho Park
2021-01-27  0:16   ` Chanho Park
2021-01-27  8:00   ` Krzysztof Kozlowski
2021-01-27  8:00     ` Krzysztof Kozlowski
2021-01-27  8:14   ` Linus Walleij
2021-01-27  8:14     ` Linus Walleij
2021-01-27  8:23     ` Chanho Park
2021-01-27  8:23       ` Chanho Park

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.