Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e899cc3b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Ingo Molnar:
 "Misc clocksource driver fixes, and a sched-clock wrapping fix"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timers/sched_clock: Prevent generic sched_clock wrap caused by tick_freeze()
  clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start
  clocksource/drivers/oxnas: Fix OX820 compatible
  clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro
  clocksource/drivers/npcm: select TIMER_OF
parents b25c69b9 3f2552f7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ config VT8500_TIMER
config NPCM7XX_TIMER
	bool "NPCM7xx timer driver" if COMPILE_TEST
	depends on HAS_IOMEM
	select TIMER_OF
	select CLKSRC_MMIO
	help
	  Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture,
+1 −4
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
 * published by the Free Software Foundation.
 */

#define pr_fmt(fmt)	"arm_arch_timer: " fmt
#define pr_fmt(fmt) 	"arch_timer: " fmt

#include <linux/init.h>
#include <linux/kernel.h>
@@ -33,9 +33,6 @@

#include <clocksource/arm_arch_timer.h>

#undef pr_fmt
#define pr_fmt(fmt) "arch_timer: " fmt

#define CNTTIDR		0x08
#define CNTTIDR_VIRT(n)	(BIT(1) << ((n) * 4))

+1 −1
Original line number Diff line number Diff line
@@ -296,4 +296,4 @@ static int __init oxnas_rps_timer_init(struct device_node *np)
TIMER_OF_DECLARE(ox810se_rps,
		       "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init);
TIMER_OF_DECLARE(ox820_rps,
		       "oxsemi,ox820se-rps-timer", oxnas_rps_timer_init);
		       "oxsemi,ox820-rps-timer", oxnas_rps_timer_init);
+0 −28
Original line number Diff line number Diff line
@@ -585,34 +585,6 @@ static int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
	return 0;
}

/* Optimized set_load which removes costly spin wait in timer_start */
static int omap_dm_timer_set_load_start(struct omap_dm_timer *timer,
					int autoreload, unsigned int load)
{
	u32 l;

	if (unlikely(!timer))
		return -EINVAL;

	omap_dm_timer_enable(timer);

	l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
	if (autoreload) {
		l |= OMAP_TIMER_CTRL_AR;
		omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
	} else {
		l &= ~OMAP_TIMER_CTRL_AR;
	}
	l |= OMAP_TIMER_CTRL_ST;

	__omap_dm_timer_load_start(timer, l, load, timer->posted);

	/* Save the context */
	timer->context.tclr = l;
	timer->context.tldr = load;
	timer->context.tcrr = load;
	return 0;
}
static int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
				   unsigned int match)
{
+2 −2
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ static u64 notrace suspended_sched_clock_read(void)
	return cd.read_data[seq & 1].epoch_cyc;
}

static int sched_clock_suspend(void)
int sched_clock_suspend(void)
{
	struct clock_read_data *rd = &cd.read_data[0];

@@ -283,7 +283,7 @@ static int sched_clock_suspend(void)
	return 0;
}

static void sched_clock_resume(void)
void sched_clock_resume(void)
{
	struct clock_read_data *rd = &cd.read_data[0];

Loading