Tobias, On Tue, Oct 21, 2014 at 6:37 PM, Tobias Jakobi <tjakobi@xxxxxxxxxxxxxxxxxxxxx> wrote: > 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. > > Reported-by: GP Orcullo <kinsamanka@xxxxxxxxx> > Signed-off-by: Tobias Jakobi <tjakobi@xxxxxxxxxxxxxxxxxxxxx> > --- > drivers/clocksource/exynos_mct.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Wow, the old code was pretty broken. Nice find! Was this found by code inspection / analysis or were you seeing some actual bug? I think it was broken back in March 2013 in (a1ba7a7 ARM: EXYNOS: add a register base address variable in mct controller driver), so 1.5 years. The broken code has been running for a long time, but that doesn't mean that there isn't a subtle issue... In any case, it seems like we should take this fix, assuming someone has tested it well. Reviewed-by: Doug Anderson <dianders@xxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html