1. 15 12月, 2015 26 次提交
  2. 17 11月, 2015 2 次提交
    • A
      clocksource: Disallow drivers for ARCH_USES_GETTIMEOFFSET · 3da6d49e
      Arnd Bergmann 提交于
      We can now select clocksource drivers like ti-32k and CONFIG_OF
      on ancient machines that still use gettimeoffset, and the combination
      results in a link error.
      
      arch/arm/kernel/built-in.o: In function `time_init':
      (.init.text+0xc28): undefined reference to `clocksource_probe'
      
      The reason for this is that the Makefile is hidden behind
      CONFIG_ARCH_USES_GETTIMEOFFSET, but the Kconfig file is not, and
      it has shown up just now because the ti-32k driver was added
      and can be selected using COMPILE_TEST on all platforms.
      
      This patch hides the Kconfig menu in CONFIG_ARCH_USES_GETTIMEOFFSET
      as well.
      
      Fixes: dfedaf10 "clocksource: ti-32k: make it depend on GENERIC_CLOCKSOURCE"
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Link: http://lkml.kernel.org/r/7579471.4N90fYPQOK@wuerfelSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      3da6d49e
    • A
      clocksource/fsl: Avoid harmless 64-bit warnings · dde7632e
      Arnd Bergmann 提交于
      The ftm_clockevent_init passes the value of "~0UL" into a function
      that takes a 32-bit argument, which drops the upper 32 bits, as
      gcc warns about on ARM64:
      
      clocksource/fsl_ftm_timer.c: In function 'ftm_clockevent_init':
      clocksource/fsl_ftm_timer.c:206:13: warning: large integer implicitly truncated to unsigned type [-Woverflow]
      
      This was obviously unintended behavior, and is easily avoided by
      using '~0u' as the integer literal, because that is 32-bit wide
      on all architectures.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Xiubo Li <Li.Xiubo@freescale.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Link: http://lkml.kernel.org/r/3990834.xnjhm37Grs@wuerfelSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      dde7632e
  3. 11 11月, 2015 1 次提交
    • A
      MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() · a7f4df4e
      Alex Smith 提交于
      Add user-mode implementations of gettimeofday() and clock_gettime() to
      the VDSO. This is currently usable with 2 clocksources: the CP0 count
      register, which is accessible to user-mode via RDHWR on R2 and later
      cores, or the MIPS Global Interrupt Controller (GIC) timer, which
      provides a "user-mode visible" section containing a mirror of its
      counter registers. This section must be mapped into user memory, which
      is done below the VDSO data page.
      
      When a supported clocksource is not in use, the VDSO functions will
      return -ENOSYS, which causes libc to fall back on the standard syscall
      path.
      
      When support for neither of these clocksources is compiled into the
      kernel at all, the VDSO still provides clock_gettime(), as the coarse
      realtime/monotonic clocks can still be implemented. However,
      gettimeofday() is not provided in this case as nothing can be done
      without a suitable clocksource. This causes the symbol lookup to fail
      in libc and it will then always use the standard syscall path.
      
      This patch includes a workaround for a bug in QEMU which results in
      RDHWR on the CP0 count register always returning a constant (incorrect)
      value. A fix for this has been submitted, and the workaround can be
      removed after the fix has been in stable releases for a reasonable
      amount of time.
      
      A simple performance test which calls gettimeofday() 1000 times in a
      loop and calculates the average execution time gives the following
      results on a Malta + I6400 (running at 20MHz):
      
       - Syscall:    ~31000 ns
       - VDSO (GIC): ~15000 ns
       - VDSO (CP0): ~9500 ns
      
      [markos.chandras@imgtec.com:
      - Minor code re-arrangements in order for mappings to be made
      in the order they appear to the process' address space.
      - Move do_{monotonic, realtime} outside of the MIPS_CLOCK_VSYSCALL ifdef
      - Use gic_get_usm_range so we can do the GIC mapping in the
      arch/mips/kernel/vdso instead of the GIC irqchip driver]
      Signed-off-by: NAlex Smith <alex.smith@imgtec.com>
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/11338/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a7f4df4e
  4. 28 10月, 2015 1 次提交
    • M
      clocksource/drivers/sh_mtu2: Fix multiple shutdown call issue · fe326c5c
      Magnus Damm 提交于
      On the r7s72100 Genmai board the MTU2 driver currently triggers a common
      clock framework WARN_ON(enable_count) when disabling the clock due to
      the MTU2 driver after recent callback rework may call ->set_state_shutdown()
      multiple times. A similar issue was spotted for the TMU driver and fixed in:
      452b1324 clocksource/drivers/sh_tmu: Fix traceback spotted in -next
      
      On r7s72100 Genmai v4.3-rc7 built with shmobile_defconfig spits out the
      following during boot:
      
      sh_mtu2 fcff0000.timer: ch0: used for clock events
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:675 clk_core_disable+0x2c/0x6c()
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc7 #1
      Hardware name: Generic R7S72100 (Flattened Device Tree)
      Backtrace:
      [<c00133d4>] (dump_backtrace) from [<c0013570>] (show_stack+0x18/0x1c)
      [<c0013558>] (show_stack) from [<c01c7aac>] (dump_stack+0x74/0x90)
      [<c01c7a38>] (dump_stack) from [<c00272fc>] (warn_slowpath_common+0x88/0xb4)
      [<c0027274>] (warn_slowpath_common) from [<c0027400>] (warn_slowpath_null+0x24/0x2c)
      [<c00273dc>] (warn_slowpath_null) from [<c03a9320>] (clk_core_disable+0x2c/0x6c)
      [<c03a92f4>] (clk_core_disable) from [<c03aa0a0>] (clk_disable+0x40/0x4c)
      [<c03aa060>] (clk_disable) from [<c0395d2c>] (sh_mtu2_disable+0x24/0x50)
      [<c0395d08>] (sh_mtu2_disable) from [<c0395d6c>] (sh_mtu2_clock_event_shutdown+0x14/0x1c)
      [<c0395d58>] (sh_mtu2_clock_event_shutdown) from [<c007d7d0>] (clockevents_switch_state+0xc8/0x114)
      [<c007d708>] (clockevents_switch_state) from [<c007d834>] (clockevents_shutdown+0x18/0x28)
      [<c007d81c>] (clockevents_shutdown) from [<c007dd58>] (clockevents_exchange_device+0x70/0x78)
      [<c007dce8>] (clockevents_exchange_device) from [<c007e578>] (tick_check_new_device+0x88/0xe0)
      [<c007e4f0>] (tick_check_new_device) from [<c007daf0>] (clockevents_register_device+0xac/0x120)
      [<c007da44>] (clockevents_register_device) from [<c0395be8>] (sh_mtu2_probe+0x230/0x350)
      [<c03959b8>] (sh_mtu2_probe) from [<c028b6f0>] (platform_drv_probe+0x50/0x98)
      Reported-by: NChris Brandt <chris.brandt@renesas.com>
      Fixes: 19a9ffb3 ("clockevents/drivers/sh_mtu2: Migrate to new 'set-state' interface")
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Signed-off-by: NMagnus Damm <damm+renesas@opensource.se>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
      fe326c5c
  5. 27 10月, 2015 7 次提交
  6. 20 10月, 2015 1 次提交
  7. 17 10月, 2015 2 次提交