Skip to content

Commit 2615a38

Browse files
committed
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner: "A few small fixes for timer drivers: - Prevent infinite recursion in the arm architected timer driver with ftrace - Propagate error codes to the caller in case of failure in EM STI driver - Adjust a bogus loop iteration in the arm architected timer driver - Add a missing Kconfig dependency to the pistachio clocksource to prevent build failures - Correctly check for IS_ERR() instead of NULL in the shared timer-of code" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled clocksource/drivers/Kconfig: Fix CLKSRC_PISTACHIO dependencies clocksource/drivers/timer-of: Checking for IS_ERR() instead of NULL clocksource/drivers/em_sti: Fix error return codes in em_sti_probe() clocksource/drivers/arm_arch_timer: Fix mem frame loop initialization
2 parents e46db8d + b60bf53 commit 2615a38

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

arch/arm64/include/asm/arch_timer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ DECLARE_PER_CPU(const struct arch_timer_erratum_workaround *,
6565
u64 _val; \
6666
if (needs_unstable_timer_counter_workaround()) { \
6767
const struct arch_timer_erratum_workaround *wa; \
68-
preempt_disable(); \
68+
preempt_disable_notrace(); \
6969
wa = __this_cpu_read(timer_unstable_counter_workaround); \
7070
if (wa && wa->read_##reg) \
7171
_val = wa->read_##reg(); \
7272
else \
7373
_val = read_sysreg(reg); \
74-
preempt_enable(); \
74+
preempt_enable_notrace(); \
7575
} else { \
7676
_val = read_sysreg(reg); \
7777
} \

drivers/clocksource/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ config CLKSRC_LPC32XX
262262

263263
config CLKSRC_PISTACHIO
264264
bool "Clocksource for Pistachio SoC" if COMPILE_TEST
265-
depends on HAS_IOMEM
265+
depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
266266
select TIMER_OF
267267
help
268268
Enables the clocksource for the Pistachio SoC.

drivers/clocksource/arm_arch_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count)
14401440
* While unlikely, it's theoretically possible that none of the frames
14411441
* in a timer expose the combination of feature we want.
14421442
*/
1443-
for (i = i; i < timer_count; i++) {
1443+
for (i = 0; i < timer_count; i++) {
14441444
timer = &timers[i];
14451445

14461446
frame = arch_timer_mem_find_best_frame(timer);

drivers/clocksource/em_sti.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ static int em_sti_probe(struct platform_device *pdev)
305305
irq = platform_get_irq(pdev, 0);
306306
if (irq < 0) {
307307
dev_err(&pdev->dev, "failed to get irq\n");
308-
return -EINVAL;
308+
return irq;
309309
}
310310

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

317-
if (devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
318-
IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
319-
dev_name(&pdev->dev), p)) {
317+
ret = devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
318+
IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
319+
dev_name(&pdev->dev), p);
320+
if (ret) {
320321
dev_err(&pdev->dev, "failed to request low IRQ\n");
321-
return -ENOENT;
322+
return ret;
322323
}
323324

324325
/* get hold of clock */

drivers/clocksource/timer-of.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ static __init int timer_base_init(struct device_node *np,
128128
const char *name = of_base->name ? of_base->name : np->full_name;
129129

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

136136
return 0;

0 commit comments

Comments
 (0)