Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44019
b: refs/heads/master
c: f5f1a24
h: refs/heads/master
i:
  44017: 57df53f
  44015: 0628999
v: v3
  • Loading branch information
Daniel Walker authored and Linus Torvalds committed Dec 10, 2006
1 parent 9aa20c1 commit 8901863
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b0137001de68153203dd3bc20e6d27eb7c9719c
refs/heads/master: f5f1a24a2caa299bb7d294aee92d7dd3410d9ed7
6 changes: 3 additions & 3 deletions trunk/drivers/clocksource/acpi_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ static struct clocksource clocksource_acpi_pm = {


#ifdef CONFIG_PCI
static int acpi_pm_good;
static int __devinitdata acpi_pm_good;
static int __init acpi_pm_good_setup(char *__str)
{
acpi_pm_good = 1;
return 1;
acpi_pm_good = 1;
return 1;
}
__setup("acpi_pm_good", acpi_pm_good_setup);

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/clocksource.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static inline s64 cyc2ns(struct clocksource *cs, cycle_t cycles)
* Unless you're the timekeeping code, you should not be using this!
*/
static inline void clocksource_calculate_interval(struct clocksource *c,
unsigned long length_nsec)
unsigned long length_nsec)
{
u64 tmp;

Expand Down
6 changes: 3 additions & 3 deletions trunk/kernel/time/clocksource.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int clocksource_register(struct clocksource *c)
/* check if clocksource is already registered */
if (is_registered_source(c)) {
printk("register_clocksource: Cannot register %s. "
"Already registered!", c->name);
"Already registered!", c->name);
ret = -EBUSY;
} else {
/* register it */
Expand Down Expand Up @@ -276,10 +276,10 @@ sysfs_show_available_clocksources(struct sys_device *dev, char *buf)
* Sysfs setup bits:
*/
static SYSDEV_ATTR(current_clocksource, 0600, sysfs_show_current_clocksources,
sysfs_override_clocksource);
sysfs_override_clocksource);

static SYSDEV_ATTR(available_clocksource, 0600,
sysfs_show_available_clocksources, NULL);
sysfs_show_available_clocksources, NULL);

static struct sysdev_class clocksource_sysclass = {
set_kset_name("clocksource"),
Expand Down
16 changes: 11 additions & 5 deletions trunk/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,15 +846,18 @@ static int change_clocksource(void)
clock = new;
clock->cycle_last = now;
printk(KERN_INFO "Time: %s clocksource has been installed.\n",
clock->name);
clock->name);
return 1;
} else if (clock->update_callback) {
return clock->update_callback();
}
return 0;
}
#else
#define change_clocksource() (0)
static inline int change_clocksource(void)
{
return 0;
}
#endif

/**
Expand Down Expand Up @@ -952,7 +955,8 @@ device_initcall(timekeeping_init_device);
* If the error is already larger, we look ahead even further
* to compensate for late or lost adjustments.
*/
static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, s64 *offset)
static __always_inline int clocksource_bigadjust(s64 error, s64 *interval,
s64 *offset)
{
s64 tick_error, i;
u32 look_ahead, adj;
Expand All @@ -976,7 +980,8 @@ static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, s64 *
* Now calculate the error in (1 << look_ahead) ticks, but first
* remove the single look ahead already included in the error.
*/
tick_error = current_tick_length() >> (TICK_LENGTH_SHIFT - clock->shift + 1);
tick_error = current_tick_length() >>
(TICK_LENGTH_SHIFT - clock->shift + 1);
tick_error -= clock->xtime_interval >> 1;
error = ((error - tick_error) >> look_ahead) + tick_error;

Expand Down Expand Up @@ -1028,7 +1033,8 @@ static void clocksource_adjust(struct clocksource *clock, s64 offset)
clock->mult += adj;
clock->xtime_interval += interval;
clock->xtime_nsec -= offset;
clock->error -= (interval - offset) << (TICK_LENGTH_SHIFT - clock->shift);
clock->error -= (interval - offset) <<
(TICK_LENGTH_SHIFT - clock->shift);
}

/**
Expand Down

0 comments on commit 8901863

Please sign in to comment.