Skip to content

Commit

Permalink
timekeeping, clocksource: Fix various typos in comments
Browse files Browse the repository at this point in the history
Fix ~56 single-word typos in timekeeping & clocksource code comments.

Signed-off-by: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: [email protected]
  • Loading branch information
Ingo Molnar committed Mar 22, 2021
1 parent 44511ab commit 4bf07f6
Show file tree
Hide file tree
Showing 30 changed files with 56 additions and 56 deletions.
8 changes: 4 additions & 4 deletions drivers/clocksource/clksrc-dbx500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#define RATE_32K 32768

#define TIMER_MODE_CONTINOUS 0x1
#define TIMER_MODE_CONTINUOUS 0x1
#define TIMER_DOWNCOUNT_VAL 0xffffffff

#define PRCMU_TIMER_REF 0
Expand Down Expand Up @@ -55,13 +55,13 @@ static int __init clksrc_dbx500_prcmu_init(struct device_node *node)

/*
* The A9 sub system expects the timer to be configured as
* a continous looping timer.
* a continuous looping timer.
* The PRCMU should configure it but if it for some reason
* don't we do it here.
*/
if (readl(clksrc_dbx500_timer_base + PRCMU_TIMER_MODE) !=
TIMER_MODE_CONTINOUS) {
writel(TIMER_MODE_CONTINOUS,
TIMER_MODE_CONTINUOUS) {
writel(TIMER_MODE_CONTINUOUS,
clksrc_dbx500_timer_base + PRCMU_TIMER_MODE);
writel(TIMER_DOWNCOUNT_VAL,
clksrc_dbx500_timer_base + PRCMU_TIMER_REF);
Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/dw_apb_timer_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static int __init timer_get_base_and_rate(struct device_node *np,
}

/*
* Not all implementations use a periphal clock, so don't panic
* Not all implementations use a peripheral clock, so don't panic
* if it's not present
*/
pclk = of_clk_get_by_name(np, "pclk");
Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/hyperv_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void __init hv_init_clocksource(void)
{
/*
* Try to set up the TSC page clocksource. If it succeeds, we're
* done. Otherwise, set up the MSR clocksoruce. At least one of
* done. Otherwise, set up the MSR clocksource. At least one of
* these will always be available except on very old versions of
* Hyper-V on x86. In that case we won't have a Hyper-V
* clocksource, but Linux will still run with a clocksource based
Expand Down
4 changes: 2 additions & 2 deletions drivers/clocksource/timer-atmel-tcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,9 @@ static int __init tcb_clksrc_init(struct device_node *node)
tcaddr = tc.regs;

if (bits == 32) {
/* use apropriate function to read 32 bit counter */
/* use appropriate function to read 32 bit counter */
clksrc.read = tc_get_cycles32;
/* setup ony channel 0 */
/* setup only channel 0 */
tcb_setup_single_chan(&tc, best_divisor_idx);
tc_sched_clock = tc_sched_clock_read32;
tc_delay_timer.read_current_timer = tc_delay_timer_read32;
Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-fsl-ftm.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static int ftm_set_next_event(unsigned long delta,
* to the MOD register latches the value into a buffer. The MOD
* register is updated with the value of its write buffer with
* the following scenario:
* a, the counter source clock is diabled.
* a, the counter source clock is disabled.
*/
ftm_counter_disable(priv->clkevt_base);

Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-microchip-pit64b.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static void __init mchp_pit64b_pres_compute(u32 *pres, u32 clk_rate,
break;
}

/* Use the bigest prescaler if we didn't match one. */
/* Use the biggest prescaler if we didn't match one. */
if (*pres == MCHP_PIT64B_PRES_MAX)
*pres = MCHP_PIT64B_PRES_MAX - 1;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/clocksource/timer-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to)
}

/**
* timer_of_cleanup - release timer_of ressources
* timer_of_cleanup - release timer_of resources
* @to: timer_of structure
*
* Release the ressources that has been used in timer_of_init().
* Release the resources that has been used in timer_of_init().
* This function should be called in init error cases
*/
void __init timer_of_cleanup(struct timer_of *to)
Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-ti-dm-systimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ static int __init dmtimer_clockevent_init(struct device_node *np)
"always-on " : "", t->rate, np->parent);

clockevents_config_and_register(dev, t->rate,
3, /* Timer internal resynch latency */
3, /* Timer internal resync latency */
0xffffffff);

if (of_machine_is_compatible("ti,am33xx") ||
Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-vf-pit.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int __init pit_clockevent_init(unsigned long rate, int irq)
/*
* The value for the LDVAL register trigger is calculated as:
* LDVAL trigger = (period / clock period) - 1
* The pit is a 32-bit down count timer, when the conter value
* The pit is a 32-bit down count timer, when the counter value
* reaches 0, it will generate an interrupt, thus the minimal
* LDVAL trigger value is 1. And then the min_delta is
* minimal LDVAL trigger value + 1, and the max_delta is full 32-bit.
Expand Down
2 changes: 1 addition & 1 deletion include/linux/clocksource.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct module;
* @mark_unstable: Optional function to inform the clocksource driver that
* the watchdog marked the clocksource unstable
* @tick_stable: Optional function called periodically from the watchdog
* code to provide stable syncrhonization points
* code to provide stable synchronization points
* @wd_list: List head to enqueue into the watchdog list (internal)
* @cs_last: Last clocksource value for clocksource watchdog
* @wd_last: Last watchdog value corresponding to @cs_last
Expand Down
2 changes: 1 addition & 1 deletion include/linux/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@

/*
* kernel variables
* Note: maximum error = NTP synch distance = dispersion + delay / 2;
* Note: maximum error = NTP sync distance = dispersion + delay / 2;
* estimated error = NTP dispersion.
*/
extern unsigned long tick_usec; /* USER_HZ period (usec) */
Expand Down
6 changes: 3 additions & 3 deletions kernel/time/alarmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/*
* Alarmtimer interface
*
* This interface provides a timer which is similarto hrtimers,
* This interface provides a timer which is similar to hrtimers,
* but triggers a RTC alarm if the box is suspend.
*
* This interface is influenced by the Android RTC Alarm timer
* interface.
*
* Copyright (C) 2010 IBM Corperation
* Copyright (C) 2010 IBM Corporation
*
* Author: John Stultz <[email protected]>
*/
Expand Down Expand Up @@ -811,7 +811,7 @@ static long __sched alarm_timer_nsleep_restart(struct restart_block *restart)
/**
* alarm_timer_nsleep - alarmtimer nanosleep
* @which_clock: clockid
* @flags: determins abstime or relative
* @flags: determines abstime or relative
* @tsreq: requested sleep time (abs or rel)
*
* Handles clock_nanosleep calls against _ALARM clockids
Expand Down
4 changes: 2 additions & 2 deletions kernel/time/clocksource.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* calculated mult and shift factors. This guarantees that no 64bit
* overflow happens when the input value of the conversion is
* multiplied with the calculated mult factor. Larger ranges may
* reduce the conversion accuracy by chosing smaller mult and shift
* reduce the conversion accuracy by choosing smaller mult and shift
* factors.
*/
void
Expand Down Expand Up @@ -518,7 +518,7 @@ static void clocksource_suspend_select(bool fallback)
* the suspend time when resuming system.
*
* This function is called late in the suspend process from timekeeping_suspend(),
* that means processes are freezed, non-boot cpus and interrupts are disabled
* that means processes are frozen, non-boot cpus and interrupts are disabled
* now. It is therefore possible to start the suspend timer without taking the
* clocksource mutex.
*/
Expand Down
18 changes: 9 additions & 9 deletions kernel/time/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
* T1 is removed, so this code is called and would reprogram
* the hardware to 5s from now. Any hrtimer_start after that
* will not reprogram the hardware due to hang_detected being
* set. So we'd effectivly block all timers until the T2 event
* set. So we'd effectively block all timers until the T2 event
* fires.
*/
if (!__hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
Expand Down Expand Up @@ -1019,7 +1019,7 @@ static void __remove_hrtimer(struct hrtimer *timer,
* cpu_base->next_timer. This happens when we remove the first
* timer on a remote cpu. No harm as we never dereference
* cpu_base->next_timer. So the worst thing what can happen is
* an superflous call to hrtimer_force_reprogram() on the
* an superfluous call to hrtimer_force_reprogram() on the
* remote cpu later on if the same timer gets enqueued again.
*/
if (reprogram && timer == cpu_base->next_timer)
Expand Down Expand Up @@ -1212,7 +1212,7 @@ static void hrtimer_cpu_base_unlock_expiry(struct hrtimer_cpu_base *base)
* The counterpart to hrtimer_cancel_wait_running().
*
* If there is a waiter for cpu_base->expiry_lock, then it was waiting for
* the timer callback to finish. Drop expiry_lock and reaquire it. That
* the timer callback to finish. Drop expiry_lock and reacquire it. That
* allows the waiter to acquire the lock and make progress.
*/
static void hrtimer_sync_wait_running(struct hrtimer_cpu_base *cpu_base,
Expand Down Expand Up @@ -1398,7 +1398,7 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
int base;

/*
* On PREEMPT_RT enabled kernels hrtimers which are not explicitely
* On PREEMPT_RT enabled kernels hrtimers which are not explicitly
* marked for hard interrupt expiry mode are moved into soft
* interrupt context for latency reasons and because the callbacks
* can invoke functions which might sleep on RT, e.g. spin_lock().
Expand Down Expand Up @@ -1430,7 +1430,7 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
* hrtimer_init - initialize a timer to the given clock
* @timer: the timer to be initialized
* @clock_id: the clock to be used
* @mode: The modes which are relevant for intitialization:
* @mode: The modes which are relevant for initialization:
* HRTIMER_MODE_ABS, HRTIMER_MODE_REL, HRTIMER_MODE_ABS_SOFT,
* HRTIMER_MODE_REL_SOFT
*
Expand Down Expand Up @@ -1487,7 +1487,7 @@ EXPORT_SYMBOL_GPL(hrtimer_active);
* insufficient for that.
*
* The sequence numbers are required because otherwise we could still observe
* a false negative if the read side got smeared over multiple consequtive
* a false negative if the read side got smeared over multiple consecutive
* __run_hrtimer() invocations.
*/

Expand Down Expand Up @@ -1588,7 +1588,7 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now,
* minimizing wakeups, not running timers at the
* earliest interrupt after their soft expiration.
* This allows us to avoid using a Priority Search
* Tree, which can answer a stabbing querry for
* Tree, which can answer a stabbing query for
* overlapping intervals and instead use the simple
* BST we already have.
* We don't add extra wakeups by delaying timers that
Expand Down Expand Up @@ -1822,7 +1822,7 @@ static void __hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
clockid_t clock_id, enum hrtimer_mode mode)
{
/*
* On PREEMPT_RT enabled kernels hrtimers which are not explicitely
* On PREEMPT_RT enabled kernels hrtimers which are not explicitly
* marked for hard interrupt expiry mode are moved into soft
* interrupt context either for latency reasons or because the
* hrtimer callback takes regular spinlocks or invokes other
Expand All @@ -1835,7 +1835,7 @@ static void __hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
* the same CPU. That causes a latency spike due to the wakeup of
* a gazillion threads.
*
* OTOH, priviledged real-time user space applications rely on the
* OTOH, privileged real-time user space applications rely on the
* low latency of hard interrupt wakeups. If the current task is in
* a real-time scheduling class, mark the mode for hard interrupt
* expiry.
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/jiffies.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static u64 jiffies_read(struct clocksource *cs)
* the timer interrupt frequency HZ and it suffers
* inaccuracies caused by missed or lost timer
* interrupts and the inability for the timer
* interrupt hardware to accuratly tick at the
* interrupt hardware to accurately tick at the
* requested HZ value. It is also not recommended
* for "tick-less" systems.
*/
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ static inline bool rtc_tv_nsec_ok(unsigned long set_offset_nsec,
struct timespec64 *to_set,
const struct timespec64 *now)
{
/* Allowed error in tv_nsec, arbitarily set to 5 jiffies in ns. */
/* Allowed error in tv_nsec, arbitrarily set to 5 jiffies in ns. */
const unsigned long TIME_SET_NSEC_FUZZ = TICK_NSEC * 5;
struct timespec64 delay = {.tv_sec = -1,
.tv_nsec = set_offset_nsec};
Expand Down
6 changes: 3 additions & 3 deletions kernel/time/posix-cpu-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void thread_group_sample_cputime(struct task_struct *tsk, u64 *samples)
* @tsk: Task for which cputime needs to be started
* @samples: Storage for time samples
*
* The thread group cputime accouting is avoided when there are no posix
* The thread group cputime accounting is avoided when there are no posix
* CPU timers armed. Before starting a timer it's required to check whether
* the time accounting is active. If not, a full update of the atomic
* accounting store needs to be done and the accounting enabled.
Expand Down Expand Up @@ -390,7 +390,7 @@ static int posix_cpu_timer_create(struct k_itimer *new_timer)
/*
* If posix timer expiry is handled in task work context then
* timer::it_lock can be taken without disabling interrupts as all
* other locking happens in task context. This requires a seperate
* other locking happens in task context. This requires a separate
* lock class key otherwise regular posix timer expiry would record
* the lock class being taken in interrupt context and generate a
* false positive warning.
Expand Down Expand Up @@ -1216,7 +1216,7 @@ static void handle_posix_cpu_timers(struct task_struct *tsk)
check_process_timers(tsk, &firing);

/*
* The above timer checks have updated the exipry cache and
* The above timer checks have updated the expiry cache and
* because nothing can have queued or modified timers after
* sighand lock was taken above it is guaranteed to be
* consistent. So the next timer interrupt fastpath check
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/tick-broadcast-hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static int bc_set_next(ktime_t expires, struct clock_event_device *bc)
* reasons.
*
* Each caller tries to arm the hrtimer on its own CPU, but if the
* hrtimer callbback function is currently running, then
* hrtimer callback function is currently running, then
* hrtimer_start() cannot move it and the timer stays on the CPU on
* which it is assigned at the moment.
*
Expand Down
4 changes: 2 additions & 2 deletions kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static void tick_device_setup_broadcast_func(struct clock_event_device *dev)
}

/*
* Check, if the device is disfunctional and a place holder, which
* Check, if the device is dysfunctional and a placeholder, which
* needs to be handled by the broadcast device.
*/
int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
Expand Down Expand Up @@ -391,7 +391,7 @@ void tick_broadcast_control(enum tick_broadcast_mode mode)
* - the broadcast device exists
* - the broadcast device is not a hrtimer based one
* - the broadcast device is in periodic mode to
* avoid a hickup during switch to oneshot mode
* avoid a hiccup during switch to oneshot mode
*/
if (bc && !(bc->features & CLOCK_EVT_FEAT_HRTIMER) &&
tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/tick-oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int tick_program_event(ktime_t expires, int force)
}

/**
* tick_resume_onshot - resume oneshot mode
* tick_resume_oneshot - resume oneshot mode
*/
void tick_resume_oneshot(void)
{
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
* Aside of that check whether the local timer softirq is
* pending. If so its a bad idea to call get_next_timer_interrupt()
* because there is an already expired timer, so it will request
* immeditate expiry, which rearms the hardware timer with a
* immediate expiry, which rearms the hardware timer with a
* minimal delta which brings us back to this place
* immediately. Lather, rinse and repeat...
*/
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/tick-sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum tick_nohz_mode {
* @inidle: Indicator that the CPU is in the tick idle mode
* @tick_stopped: Indicator that the idle tick has been stopped
* @idle_active: Indicator that the CPU is actively in the tick idle mode;
* it is resetted during irq handling phases.
* it is reset during irq handling phases.
* @do_timer_lst: CPU was the last one doing do_timer before going idle
* @got_idle_tick: Tick timer function has run with @inidle set
* @last_tick: Store the last tick expiry time when the tick
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ EXPORT_SYMBOL(__usecs_to_jiffies);
/*
* The TICK_NSEC - 1 rounds up the value to the next resolution. Note
* that a remainder subtract here would not do the right thing as the
* resolution values don't fall on second boundries. I.e. the line:
* resolution values don't fall on second boundaries. I.e. the line:
* nsec -= nsec % TICK_NSEC; is NOT a correct resolution rounding.
* Note that due to the small error in the multiplier here, this
* rounding is incorrect for sufficiently large values of tv_nsec, but
Expand Down
10 changes: 5 additions & 5 deletions kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,14 +596,14 @@ EXPORT_SYMBOL_GPL(ktime_get_real_fast_ns);
* careful cache layout of the timekeeper because the sequence count and
* struct tk_read_base would then need two cache lines instead of one.
*
* Access to the time keeper clock source is disabled accross the innermost
* Access to the time keeper clock source is disabled across the innermost
* steps of suspend/resume. The accessors still work, but the timestamps
* are frozen until time keeping is resumed which happens very early.
*
* For regular suspend/resume there is no observable difference vs. sched
* clock, but it might affect some of the nasty low level debug printks.
*
* OTOH, access to sched clock is not guaranteed accross suspend/resume on
* OTOH, access to sched clock is not guaranteed across suspend/resume on
* all systems either so it depends on the hardware in use.
*
* If that turns out to be a real problem then this could be mitigated by
Expand Down Expand Up @@ -899,7 +899,7 @@ ktime_t ktime_get_coarse_with_offset(enum tk_offsets offs)
EXPORT_SYMBOL_GPL(ktime_get_coarse_with_offset);

/**
* ktime_mono_to_any() - convert mononotic time to any other time
* ktime_mono_to_any() - convert monotonic time to any other time
* @tmono: time to convert.
* @offs: which offset to use
*/
Expand Down Expand Up @@ -1948,7 +1948,7 @@ static __always_inline void timekeeping_apply_adjustment(struct timekeeper *tk,
* xtime_nsec_1 = offset + xtime_nsec_2
* Which gives us:
* xtime_nsec_2 = xtime_nsec_1 - offset
* Which simplfies to:
* Which simplifies to:
* xtime_nsec -= offset
*/
if ((mult_adj > 0) && (tk->tkr_mono.mult + mult_adj < mult_adj)) {
Expand Down Expand Up @@ -2336,7 +2336,7 @@ static int timekeeping_validate_timex(const struct __kernel_timex *txc)

/*
* Validate if a timespec/timeval used to inject a time
* offset is valid. Offsets can be postive or negative, so
* offset is valid. Offsets can be positive or negative, so
* we don't check tv_sec. The value of the timeval/timespec
* is the sum of its fields,but *NOTE*:
* The field tv_usec/tv_nsec must always be non-negative and
Expand Down
Loading

0 comments on commit 4bf07f6

Please sign in to comment.