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

Commit b60bf53a authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'clockevents/4.13-fixes' of...

Merge branch 'clockevents/4.13-fixes' of http://git.linaro.org/people/daniel.lezcano/linux

 into timers/urgent

Pull clockevents fixes from Daniel Lezcano:

" - Fix error check against IS_ERR() instead of NULL for the timer-of code (Dan Carpenter)
  - Fix infinite recusion with ftrace for the ARM architected timer (Ding Tianhong)
  - Fix the error code return in the em_sti's probe function (Gustavo A. R.  Silva)
  - Fix Kconfig dependency for the pistachio driver (Matt Redfearn)
  - Fix mem frame loop initialization for the ARM architected timer (Matthias Kaehlcke)"

Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 216e4a1d adb4f11e
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -65,13 +65,13 @@ DECLARE_PER_CPU(const struct arch_timer_erratum_workaround *,
	u64 _val;							\
	u64 _val;							\
	if (needs_unstable_timer_counter_workaround()) {		\
	if (needs_unstable_timer_counter_workaround()) {		\
		const struct arch_timer_erratum_workaround *wa;		\
		const struct arch_timer_erratum_workaround *wa;		\
		preempt_disable();					\
		preempt_disable_notrace();				\
		wa = __this_cpu_read(timer_unstable_counter_workaround); \
		wa = __this_cpu_read(timer_unstable_counter_workaround); \
		if (wa && wa->read_##reg)				\
		if (wa && wa->read_##reg)				\
			_val = wa->read_##reg();			\
			_val = wa->read_##reg();			\
		else							\
		else							\
			_val = read_sysreg(reg);			\
			_val = read_sysreg(reg);			\
		preempt_enable();					\
		preempt_enable_notrace();				\
	} else {							\
	} else {							\
		_val = read_sysreg(reg);				\
		_val = read_sysreg(reg);				\
	}								\
	}								\
+1 −1
Original line number Original line Diff line number Diff line
@@ -262,7 +262,7 @@ config CLKSRC_LPC32XX


config CLKSRC_PISTACHIO
config CLKSRC_PISTACHIO
	bool "Clocksource for Pistachio SoC" if COMPILE_TEST
	bool "Clocksource for Pistachio SoC" if COMPILE_TEST
	depends on HAS_IOMEM
	depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
	select TIMER_OF
	select TIMER_OF
	help
	help
	  Enables the clocksource for the Pistachio SoC.
	  Enables the clocksource for the Pistachio SoC.
+1 −1
Original line number Original line Diff line number Diff line
@@ -1440,7 +1440,7 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count)
	 * While unlikely, it's theoretically possible that none of the frames
	 * While unlikely, it's theoretically possible that none of the frames
	 * in a timer expose the combination of feature we want.
	 * in a timer expose the combination of feature we want.
	 */
	 */
	for (i = i; i < timer_count; i++) {
	for (i = 0; i < timer_count; i++) {
		timer = &timers[i];
		timer = &timers[i];


		frame = arch_timer_mem_find_best_frame(timer);
		frame = arch_timer_mem_find_best_frame(timer);
+6 −5
Original line number Original line Diff line number Diff line
@@ -305,7 +305,7 @@ static int em_sti_probe(struct platform_device *pdev)
	irq = platform_get_irq(pdev, 0);
	irq = platform_get_irq(pdev, 0);
	if (irq < 0) {
	if (irq < 0) {
		dev_err(&pdev->dev, "failed to get irq\n");
		dev_err(&pdev->dev, "failed to get irq\n");
		return -EINVAL;
		return irq;
	}
	}


	/* map memory, let base point to the STI instance */
	/* map memory, let base point to the STI instance */
@@ -314,11 +314,12 @@ static int em_sti_probe(struct platform_device *pdev)
	if (IS_ERR(p->base))
	if (IS_ERR(p->base))
		return PTR_ERR(p->base);
		return PTR_ERR(p->base);


	if (devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
	ret = devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
			       IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
			       IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
			     dev_name(&pdev->dev), p)) {
			       dev_name(&pdev->dev), p);
	if (ret) {
		dev_err(&pdev->dev, "failed to request low IRQ\n");
		dev_err(&pdev->dev, "failed to request low IRQ\n");
		return -ENOENT;
		return ret;
	}
	}


	/* get hold of clock */
	/* get hold of clock */
+2 −2
Original line number Original line Diff line number Diff line
@@ -128,9 +128,9 @@ static __init int timer_base_init(struct device_node *np,
	const char *name = of_base->name ? of_base->name : np->full_name;
	const char *name = of_base->name ? of_base->name : np->full_name;


	of_base->base = of_io_request_and_map(np, of_base->index, name);
	of_base->base = of_io_request_and_map(np, of_base->index, name);
	if (!of_base->base) {
	if (IS_ERR(of_base->base)) {
		pr_err("Failed to iomap (%s)\n", name);
		pr_err("Failed to iomap (%s)\n", name);
		return -ENXIO;
		return PTR_ERR(of_base->base);
	}
	}


	return 0;
	return 0;