linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL]: clockevents: 3.18 fixes
@ 2015-01-07 11:26 Daniel Lezcano
  2015-01-07 11:28 ` [PATCH 1/3] clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Lezcano @ 2015-01-07 11:26 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Olof Johansson, Magnus Damm, Tobias Jakobi,
	Linux Kernel Mailing List


Hi Thomas,

this pull request provides three fixes for 3.18.

  * Magnus Damn fixed the cpumask for the sh_tmu driver in order to make 
it work on the SMP system

  * Olof Johansson fixed the __iomem annotation to prevent a sparse warning

  * Tobias Jakobi fixed the mct mask inversion which was introduced by 
commit a1ba7a7a

Thanks !

   -- Daniel

ps: happy new year ;)

The following changes since commit a5fd9733a30d18d7ac23f17080e7e07bb3205b69:

   tick/powerclamp: Remove tick_nohz_idle abuse (2014-12-19 14:05:52 +0100)

are available in the git repository at:

   http://git.linaro.org/people/daniel.lezcano/linux.git 
clockevents/3.18-fixes

for you to fetch changes up to f2a5473861cf69c03d0f0ee5d0ea1b853b9e582e:

   clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast 
(2015-01-05 14:43:37 +0100)

----------------------------------------------------------------
Magnus Damm (1):
       clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast

Olof Johansson (1):
       clocksource: kona: fix __iomem annotation

Tobias Jakobi (1):
       clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write

  drivers/clocksource/bcm_kona_timer.c | 9 ++++-----
  drivers/clocksource/exynos_mct.c     | 4 ++--
  drivers/clocksource/sh_tmu.c         | 2 +-
  3 files changed, 7 insertions(+), 8 deletions(-)


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [PATCH 1/3] clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write
  2015-01-07 11:26 [GIT PULL]: clockevents: 3.18 fixes Daniel Lezcano
@ 2015-01-07 11:28 ` Daniel Lezcano
  2015-01-07 11:28   ` [PATCH 2/3] clocksource: kona: fix __iomem annotation Daniel Lezcano
  2015-01-07 11:28   ` [PATCH 3/3] clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast Daniel Lezcano
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Lezcano @ 2015-01-07 11:28 UTC (permalink / raw)
  To: tglx; +Cc: olof, magnus.damm, tjakobi, linux-kernel

From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>

EXYNOS4_MCT_L_MASK is defined as 0xffffff00, so applying this bitmask
produces a number outside the range 0x00 to 0xff, which always results
in execution of the default switch statement.

Obviously this is wrong and git history shows that the bitmask inversion
was incorrectly set during a refactoring of the MCT code.

Fix this by putting the inversion at the correct position again.

Cc: stable@vger.kernel.org
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Reported-by: GP Orcullo <kinsamanka@gmail.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/exynos_mct.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 9403061..83564c9 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -97,8 +97,8 @@ static void exynos4_mct_write(unsigned int value, unsigned long offset)
 	writel_relaxed(value, reg_base + offset);
 
 	if (likely(offset >= EXYNOS4_MCT_L_BASE(0))) {
-		stat_addr = (offset & ~EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
-		switch (offset & EXYNOS4_MCT_L_MASK) {
+		stat_addr = (offset & EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
+		switch (offset & ~EXYNOS4_MCT_L_MASK) {
 		case MCT_L_TCON_OFFSET:
 			mask = 1 << 3;		/* L_TCON write status */
 			break;
-- 
1.9.1


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

* [PATCH 2/3] clocksource: kona: fix __iomem annotation
  2015-01-07 11:28 ` [PATCH 1/3] clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write Daniel Lezcano
@ 2015-01-07 11:28   ` Daniel Lezcano
  2015-01-07 11:28   ` [PATCH 3/3] clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast Daniel Lezcano
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2015-01-07 11:28 UTC (permalink / raw)
  To: tglx; +Cc: olof, magnus.damm, tjakobi, linux-kernel

From: Olof Johansson <olof@lixom.net>

It makes no sense to hide the __iomem annotation from the function
that uses it, especially since it causes a sparse warning:

drivers/clocksource/bcm_kona_timer.c:118:38: warning: incorrect type in argument 1 (different address spaces)
drivers/clocksource/bcm_kona_timer.c:118:38:    expected void *timer_base
drivers/clocksource/bcm_kona_timer.c:118:38:    got void [noderef] <asn:2>*static [toplevel] tmr_regs

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/bcm_kona_timer.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c
index 0595dc6..f1e33d0 100644
--- a/drivers/clocksource/bcm_kona_timer.c
+++ b/drivers/clocksource/bcm_kona_timer.c
@@ -68,9 +68,8 @@ static void kona_timer_disable_and_clear(void __iomem *base)
 }
 
 static void
-kona_timer_get_counter(void *timer_base, uint32_t *msw, uint32_t *lsw)
+kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw)
 {
-	void __iomem *base = IOMEM(timer_base);
 	int loop_limit = 4;
 
 	/*
@@ -86,9 +85,9 @@ kona_timer_get_counter(void *timer_base, uint32_t *msw, uint32_t *lsw)
 	 */
 
 	while (--loop_limit) {
-		*msw = readl(base + KONA_GPTIMER_STCHI_OFFSET);
-		*lsw = readl(base + KONA_GPTIMER_STCLO_OFFSET);
-		if (*msw == readl(base + KONA_GPTIMER_STCHI_OFFSET))
+		*msw = readl(timer_base + KONA_GPTIMER_STCHI_OFFSET);
+		*lsw = readl(timer_base + KONA_GPTIMER_STCLO_OFFSET);
+		if (*msw == readl(timer_base + KONA_GPTIMER_STCHI_OFFSET))
 			break;
 	}
 	if (!loop_limit) {
-- 
1.9.1


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

* [PATCH 3/3] clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast
  2015-01-07 11:28 ` [PATCH 1/3] clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write Daniel Lezcano
  2015-01-07 11:28   ` [PATCH 2/3] clocksource: kona: fix __iomem annotation Daniel Lezcano
@ 2015-01-07 11:28   ` Daniel Lezcano
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2015-01-07 11:28 UTC (permalink / raw)
  To: tglx; +Cc: olof, magnus.damm, tjakobi, linux-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Update the TMU driver to use cpu_possible_mask as cpumask to make
r8a7779 SMP work as expected with or without the ARM TWD timer.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/sh_tmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 0f665b8..f150ca82 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -428,7 +428,7 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
 	ced->features = CLOCK_EVT_FEAT_PERIODIC;
 	ced->features |= CLOCK_EVT_FEAT_ONESHOT;
 	ced->rating = 200;
-	ced->cpumask = cpumask_of(0);
+	ced->cpumask = cpu_possible_mask;
 	ced->set_next_event = sh_tmu_clock_event_next;
 	ced->set_mode = sh_tmu_clock_event_mode;
 	ced->suspend = sh_tmu_clock_event_suspend;
-- 
1.9.1


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

end of thread, other threads:[~2015-01-07 11:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 11:26 [GIT PULL]: clockevents: 3.18 fixes Daniel Lezcano
2015-01-07 11:28 ` [PATCH 1/3] clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write Daniel Lezcano
2015-01-07 11:28   ` [PATCH 2/3] clocksource: kona: fix __iomem annotation Daniel Lezcano
2015-01-07 11:28   ` [PATCH 3/3] clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast Daniel Lezcano

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