linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3 3/3] clocksource/drivers/exynos_mct: increase the size of name array
  2022-02-21 17:45     ` [PATCH v3 3/3] clocksource/drivers/exynos_mct: increase the size of name array Alim Akhtar
@ 2022-02-21 17:40       ` Krzysztof Kozlowski
  2022-03-14  9:28       ` [tip: timers/core] clocksource/drivers/exynos_mct: Increase " tip-bot2 for Alim Akhtar
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-21 17:40 UTC (permalink / raw)
  To: Alim Akhtar, linux-arm-kernel, linux-kernel
  Cc: linux-samsung-soc, daniel.lezcano, tglx, pankaj.dubey, m.szyprowski

On 21/02/2022 18:45, Alim Akhtar wrote:
> Variable _name_ hold mct_tick number per cpu and it is currently
> limited to 10. Which restrict the scalability of the MCT driver for
> the SoC which has more local timers interrupts (>= 12).
> Increase the length of it to make mct_tick printed correctly for
> each local timer interrupts per CPU.
> 
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> ---
>  drivers/clocksource/exynos_mct.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

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

* [PATCH v3 1/3] clocksource/drivers/exynos_mct: Remove mct interrupt index enum
       [not found] <CGME20220221173402epcas5p3f85b10debc38c7ec1e1bd607055672d8@epcas5p3.samsung.com>
@ 2022-02-21 17:45 ` Alim Akhtar
       [not found]   ` <CGME20220221173404epcas5p44ceb57158d3df4808ec1f409f53a0e81@epcas5p4.samsung.com>
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alim Akhtar @ 2022-02-21 17:45 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: krzysztof.kozlowski, linux-samsung-soc, daniel.lezcano, tglx,
	pankaj.dubey, m.szyprowski, Alim Akhtar

MCT driver define an enum which list global and local timer's
irq index. Most of them are not used but MCT_G0_IRQ and
MCT_L0_IRQ and these two are at a fixed offset/index.
Get rid of this enum and use a #define for the used irq index.

No functional changes expected.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
 drivers/clocksource/exynos_mct.c | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 6db3d5511b0f..b3f3d27a837b 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -60,27 +60,17 @@
 #define MCT_CLKEVENTS_RATING		350
 #endif
 
+/* There are four Global timers starting with 0 offset */
+#define MCT_G0_IRQ	0
+/* Local timers count starts after global timer count */
+#define MCT_L0_IRQ	4
+#define MCT_NR_IRQS	12
+
 enum {
 	MCT_INT_SPI,
 	MCT_INT_PPI
 };
 
-enum {
-	MCT_G0_IRQ,
-	MCT_G1_IRQ,
-	MCT_G2_IRQ,
-	MCT_G3_IRQ,
-	MCT_L0_IRQ,
-	MCT_L1_IRQ,
-	MCT_L2_IRQ,
-	MCT_L3_IRQ,
-	MCT_L4_IRQ,
-	MCT_L5_IRQ,
-	MCT_L6_IRQ,
-	MCT_L7_IRQ,
-	MCT_NR_IRQS,
-};
-
 static void __iomem *reg_base;
 static unsigned long clk_rate;
 static unsigned int mct_int_type;
-- 
2.25.1


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

* [PATCH v3 2/3] clocksource/drivers/exynos_mct: bump up mct max irq number
       [not found]   ` <CGME20220221173404epcas5p44ceb57158d3df4808ec1f409f53a0e81@epcas5p4.samsung.com>
@ 2022-02-21 17:45     ` Alim Akhtar
  2022-03-14  9:28       ` [tip: timers/core] clocksource/drivers/exynos_mct: Bump " tip-bot2 for Alim Akhtar
  0 siblings, 1 reply; 7+ messages in thread
From: Alim Akhtar @ 2022-02-21 17:45 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: krzysztof.kozlowski, linux-samsung-soc, daniel.lezcano, tglx,
	pankaj.dubey, m.szyprowski, Alim Akhtar

Bump-up maximum number of MCT IRQ to match the binding
documentation. This make driver scalable for SoC which
has more than 12 timer irqs, like recently added FSD SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
 drivers/clocksource/exynos_mct.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index b3f3d27a837b..0c7931f7f99a 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -64,7 +64,8 @@
 #define MCT_G0_IRQ	0
 /* Local timers count starts after global timer count */
 #define MCT_L0_IRQ	4
-#define MCT_NR_IRQS	12
+/* Max number of IRQ as per DT binding document */
+#define MCT_NR_IRQS	20
 
 enum {
 	MCT_INT_SPI,
-- 
2.25.1


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

* [PATCH v3 3/3] clocksource/drivers/exynos_mct: increase the size of name array
       [not found]   ` <CGME20220221173407epcas5p117620b55b5f5a94d6a525342374efa51@epcas5p1.samsung.com>
@ 2022-02-21 17:45     ` Alim Akhtar
  2022-02-21 17:40       ` Krzysztof Kozlowski
  2022-03-14  9:28       ` [tip: timers/core] clocksource/drivers/exynos_mct: Increase " tip-bot2 for Alim Akhtar
  0 siblings, 2 replies; 7+ messages in thread
From: Alim Akhtar @ 2022-02-21 17:45 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: krzysztof.kozlowski, linux-samsung-soc, daniel.lezcano, tglx,
	pankaj.dubey, m.szyprowski, Alim Akhtar

Variable _name_ hold mct_tick number per cpu and it is currently
limited to 10. Which restrict the scalability of the MCT driver for
the SoC which has more local timers interrupts (>= 12).
Increase the length of it to make mct_tick printed correctly for
each local timer interrupts per CPU.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
 drivers/clocksource/exynos_mct.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 0c7931f7f99a..b6de352b703d 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -80,7 +80,11 @@ static int mct_irqs[MCT_NR_IRQS];
 struct mct_clock_event_device {
 	struct clock_event_device evt;
 	unsigned long base;
-	char name[10];
+	/**
+	 *  The length of the name must be adjusted if number of
+	 *  local timer interrupts grow over two digits
+	 */
+	char name[11];
 };
 
 static void exynos4_mct_write(unsigned int value, unsigned long offset)
-- 
2.25.1


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

* [tip: timers/core] clocksource/drivers/exynos_mct: Increase the size of name array
  2022-02-21 17:45     ` [PATCH v3 3/3] clocksource/drivers/exynos_mct: increase the size of name array Alim Akhtar
  2022-02-21 17:40       ` Krzysztof Kozlowski
@ 2022-03-14  9:28       ` tip-bot2 for Alim Akhtar
  1 sibling, 0 replies; 7+ messages in thread
From: tip-bot2 for Alim Akhtar @ 2022-03-14  9:28 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Alim Akhtar, Krzysztof Kozlowski, Daniel Lezcano, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     0a3a4b9d2bb7928f54579421bbadd4aa9c4a94f0
Gitweb:        https://git.kernel.org/tip/0a3a4b9d2bb7928f54579421bbadd4aa9c4a94f0
Author:        Alim Akhtar <alim.akhtar@samsung.com>
AuthorDate:    Mon, 21 Feb 2022 23:15:47 +05:30
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 07 Mar 2022 18:27:22 +01:00

clocksource/drivers/exynos_mct: Increase the size of name array

Variable _name_ hold mct_tick number per cpu and it is currently
limited to 10. Which restrict the scalability of the MCT driver for
the SoC which has more local timers interrupts (>= 12).
Increase the length of it to make mct_tick printed correctly for
each local timer interrupts per CPU.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20220221174547.26176-3-alim.akhtar@samsung.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/exynos_mct.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index bcf2100..f29c812 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -80,7 +80,11 @@ static int mct_irqs[MCT_NR_IRQS];
 struct mct_clock_event_device {
 	struct clock_event_device evt;
 	unsigned long base;
-	char name[10];
+	/**
+	 *  The length of the name must be adjusted if number of
+	 *  local timer interrupts grow over two digits
+	 */
+	char name[11];
 };
 
 static void exynos4_mct_write(unsigned int value, unsigned long offset)

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

* [tip: timers/core] clocksource/drivers/exynos_mct: Bump up mct max irq number
  2022-02-21 17:45     ` [PATCH v3 2/3] clocksource/drivers/exynos_mct: bump up mct max irq number Alim Akhtar
@ 2022-03-14  9:28       ` tip-bot2 for Alim Akhtar
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Alim Akhtar @ 2022-03-14  9:28 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Krzysztof Kozlowski, Alim Akhtar, Daniel Lezcano, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     f49b82a0a54fa85451ed96c35f24679522d59c7a
Gitweb:        https://git.kernel.org/tip/f49b82a0a54fa85451ed96c35f24679522d59c7a
Author:        Alim Akhtar <alim.akhtar@samsung.com>
AuthorDate:    Mon, 21 Feb 2022 23:15:46 +05:30
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 07 Mar 2022 18:27:22 +01:00

clocksource/drivers/exynos_mct: Bump up mct max irq number

Bump-up maximum number of MCT IRQ to match the binding
documentation. This make driver scalable for SoC which
has more than 12 timer irqs, like recently added FSD SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Link: https://lore.kernel.org/r/20220221174547.26176-2-alim.akhtar@samsung.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/exynos_mct.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 341ee47..bcf2100 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -64,7 +64,8 @@
 #define MCT_G0_IRQ	0
 /* Local timers count starts after global timer count */
 #define MCT_L0_IRQ	4
-#define MCT_NR_IRQS	12
+/* Max number of IRQ as per DT binding document */
+#define MCT_NR_IRQS	20
 
 enum {
 	MCT_INT_SPI,

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

* [tip: timers/core] clocksource/drivers/exynos_mct: Remove mct interrupt index enum
  2022-02-21 17:45 ` [PATCH v3 1/3] clocksource/drivers/exynos_mct: Remove mct interrupt index enum Alim Akhtar
       [not found]   ` <CGME20220221173404epcas5p44ceb57158d3df4808ec1f409f53a0e81@epcas5p4.samsung.com>
       [not found]   ` <CGME20220221173407epcas5p117620b55b5f5a94d6a525342374efa51@epcas5p1.samsung.com>
@ 2022-03-14  9:28   ` tip-bot2 for Alim Akhtar
  2 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Alim Akhtar @ 2022-03-14  9:28 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Krzysztof Kozlowski, Alim Akhtar, Daniel Lezcano, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     dfc597c9bca9b4447820a59fe86526f016be1458
Gitweb:        https://git.kernel.org/tip/dfc597c9bca9b4447820a59fe86526f016be1458
Author:        Alim Akhtar <alim.akhtar@samsung.com>
AuthorDate:    Mon, 21 Feb 2022 23:15:45 +05:30
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 07 Mar 2022 18:27:22 +01:00

clocksource/drivers/exynos_mct: Remove mct interrupt index enum

MCT driver define an enum which list global and local timer's
irq index. Most of them are not used but MCT_G0_IRQ and
MCT_L0_IRQ and these two are at a fixed offset/index.
Get rid of this enum and use a #define for the used irq index.

No functional changes expected.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Link: https://lore.kernel.org/r/20220221174547.26176-1-alim.akhtar@samsung.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/exynos_mct.c | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 03782b3..341ee47 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -60,27 +60,17 @@
 #define MCT_CLKEVENTS_RATING		350
 #endif
 
+/* There are four Global timers starting with 0 offset */
+#define MCT_G0_IRQ	0
+/* Local timers count starts after global timer count */
+#define MCT_L0_IRQ	4
+#define MCT_NR_IRQS	12
+
 enum {
 	MCT_INT_SPI,
 	MCT_INT_PPI
 };
 
-enum {
-	MCT_G0_IRQ,
-	MCT_G1_IRQ,
-	MCT_G2_IRQ,
-	MCT_G3_IRQ,
-	MCT_L0_IRQ,
-	MCT_L1_IRQ,
-	MCT_L2_IRQ,
-	MCT_L3_IRQ,
-	MCT_L4_IRQ,
-	MCT_L5_IRQ,
-	MCT_L6_IRQ,
-	MCT_L7_IRQ,
-	MCT_NR_IRQS,
-};
-
 static void __iomem *reg_base;
 static unsigned long clk_rate;
 static unsigned int mct_int_type;

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

end of thread, other threads:[~2022-03-14  9:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20220221173402epcas5p3f85b10debc38c7ec1e1bd607055672d8@epcas5p3.samsung.com>
2022-02-21 17:45 ` [PATCH v3 1/3] clocksource/drivers/exynos_mct: Remove mct interrupt index enum Alim Akhtar
     [not found]   ` <CGME20220221173404epcas5p44ceb57158d3df4808ec1f409f53a0e81@epcas5p4.samsung.com>
2022-02-21 17:45     ` [PATCH v3 2/3] clocksource/drivers/exynos_mct: bump up mct max irq number Alim Akhtar
2022-03-14  9:28       ` [tip: timers/core] clocksource/drivers/exynos_mct: Bump " tip-bot2 for Alim Akhtar
     [not found]   ` <CGME20220221173407epcas5p117620b55b5f5a94d6a525342374efa51@epcas5p1.samsung.com>
2022-02-21 17:45     ` [PATCH v3 3/3] clocksource/drivers/exynos_mct: increase the size of name array Alim Akhtar
2022-02-21 17:40       ` Krzysztof Kozlowski
2022-03-14  9:28       ` [tip: timers/core] clocksource/drivers/exynos_mct: Increase " tip-bot2 for Alim Akhtar
2022-03-14  9:28   ` [tip: timers/core] clocksource/drivers/exynos_mct: Remove mct interrupt index enum tip-bot2 for Alim Akhtar

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