Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1468185
| From | Nicolai Stange <nicstange@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC v4 19/22] clockevents: purge ->min_delta_ns and ->max_delta_ns |
| Date | 2016-08-23 01:40 +0200 |
| Message-ID | <s96YX-4v1-69@gated-at.bofh.it> (permalink) |
| References | <s96YV-4v1-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The struct clock_event_device ->min_delta_ns and ->max_delta_ns aren't
used anymore.
Purge them.
In __clockevents_update_bounds(), shortcut the
->min_delta_ticks => ->min_delta_ns => ->min_delta_ticks_adjusted
calculation detour -- it had been made solely for the purpose of ensuring
that ->min_delta_ticks_adjusted corresponds to something >= 1us.
Signed-off-by: Nicolai Stange <nicstange@gmail.com>
---
include/linux/clockchips.h | 4 ----
kernel/time/clockevents.c | 13 +++++--------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 8578e24..4b71882 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -87,8 +87,6 @@ enum clock_event_state {
* @tick_resume: resume clkevt device
* @broadcast: function to broadcast events
* @min_delta_ticks: minimum delta value in ticks stored for reconfiguration
- * @max_delta_ns: maximum delta value in ns
- * @min_delta_ns: minimum delta value in ns
* @name: ptr to clock event name
* @rating: variable to rate clock event devices
* @irq: IRQ number (only for non CPU local devices)
@@ -120,8 +118,6 @@ struct clock_event_device {
void (*suspend)(struct clock_event_device *);
void (*resume)(struct clock_event_device *);
unsigned long min_delta_ticks;
- u64 max_delta_ns;
- u64 min_delta_ns;
const char *name;
int rating;
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index bb3b98c..c59d6f2 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -444,15 +444,12 @@ static void __clockevents_update_bounds(struct clock_event_device *dev)
return;
/*
- * cev_delta2ns() never returns values less than 1us and thus,
- * we'll never program any ced with anything less.
+ * Enforce ->min_delta_ticks_adjusted to correspond to a value
+ * >= 1us.
*/
- dev->min_delta_ns = cev_delta2ns(dev->min_delta_ticks, dev, false);
- dev->max_delta_ns = cev_delta2ns(dev->max_delta_ticks, dev, true);
- dev->min_delta_ticks_adjusted = (unsigned long)((dev->min_delta_ns *
- dev->mult) >> dev->shift);
- dev->min_delta_ticks_adjusted = max(dev->min_delta_ticks_adjusted,
- dev->min_delta_ticks);
+ dev->min_delta_ticks_adjusted =
+ max(dev->min_delta_ticks,
+ (unsigned long)((1000ULL * dev->mult) >> dev->shift));
}
/**
--
2.9.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC v4 00/22] adapt clockevents frequencies to mono clock Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200 [RFC v4 15/22] clockevents: clockevents_program_min_delta(): don't set ->next_event Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200 [RFC v4 02/22] clocksource: sh_tmu: compute rate before registration again Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200 [RFC v4 11/22] clockevents: always initialize ->min_delta_ns and ->max_delta_ns Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200 [RFC v4 18/22] timer_list: print_tickdevice(): calculate ->*_delta_ns dynamically Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200 [RFC v4 19/22] clockevents: purge ->min_delta_ns and ->max_delta_ns Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200 [RFC v4 13/22] clockevents: check a programmed delta's bounds in terms of cycles Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200 [RFC v4 10/22] arch/tile/kernel/time: set ->min_delta_ticks and ->max_delta_ticks Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
csiph-web