lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 23 Jul 2020 19:09:42 -0000 From: "tip-bot2 for Alexandre Belloni" <tip-bot2@...utronix.de> To: linux-tip-commits@...r.kernel.org Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>, Daniel Lezcano <daniel.lezcano@...aro.org>, x86 <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org> Subject: [tip: timers/core] clocksource/drivers/timer-atmel-tcb: Allow selecting first divider The following commit has been merged into the timers/core branch of tip: Commit-ID: 501465d5d7af63af5942cf6af783952bdd757c52 Gitweb: https://git.kernel.org/tip/501465d5d7af63af5942cf6af783952bdd757c52 Author: Alexandre Belloni <alexandre.belloni@...tlin.com> AuthorDate: Sat, 11 Jul 2020 01:08:12 +02:00 Committer: Daniel Lezcano <daniel.lezcano@...aro.org> CommitterDate: Sat, 11 Jul 2020 18:58:18 +02:00 clocksource/drivers/timer-atmel-tcb: Allow selecting first divider The divider selection algorithm never allowed to get index 0. It was also continuing to look for dividers, trying to find the slow clock selection. This is not necessary anymore. Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org> Link: https://lore.kernel.org/r/20200710230813.1005150-9-alexandre.belloni@bootlin.com --- drivers/clocksource/timer-atmel-tcb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c index 7a6474a..7fea134 100644 --- a/drivers/clocksource/timer-atmel-tcb.c +++ b/drivers/clocksource/timer-atmel-tcb.c @@ -432,10 +432,8 @@ static int __init tcb_clksrc_init(struct device_node *node) tmp = rate / divisor; pr_debug("TC: %u / %-3u [%d] --> %u\n", rate, divisor, i, tmp); - if (best_divisor_idx > 0) { - if (tmp < 5 * 1000 * 1000) - continue; - } + if ((best_divisor_idx >= 0) && (tmp < 5 * 1000 * 1000)) + break; divided_rate = tmp; best_divisor_idx = i; }
Powered by blists - more mailing lists