mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Thomas Gleixner: "Just a simple revert of a new sched_clock implementation which turned out to be buggy" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"
This commit is contained in:
commit
18f48c9f3c
1 changed files with 1 additions and 15 deletions
|
@ -10,7 +10,6 @@
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/atmel_tc.h>
|
#include <linux/atmel_tc.h>
|
||||||
#include <linux/sched_clock.h>
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -57,14 +56,9 @@ static u64 tc_get_cycles(struct clocksource *cs)
|
||||||
return (upper << 16) | lower;
|
return (upper << 16) | lower;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 tc_get_cv32(void)
|
|
||||||
{
|
|
||||||
return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV));
|
|
||||||
}
|
|
||||||
|
|
||||||
static u64 tc_get_cycles32(struct clocksource *cs)
|
static u64 tc_get_cycles32(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return tc_get_cv32();
|
return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct clocksource clksrc = {
|
static struct clocksource clksrc = {
|
||||||
|
@ -75,11 +69,6 @@ static struct clocksource clksrc = {
|
||||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 notrace tc_read_sched_clock(void)
|
|
||||||
{
|
|
||||||
return tc_get_cv32();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
||||||
|
|
||||||
struct tc_clkevt_device {
|
struct tc_clkevt_device {
|
||||||
|
@ -350,9 +339,6 @@ static int __init tcb_clksrc_init(void)
|
||||||
clksrc.read = tc_get_cycles32;
|
clksrc.read = tc_get_cycles32;
|
||||||
/* setup ony channel 0 */
|
/* setup ony channel 0 */
|
||||||
tcb_setup_single_chan(tc, best_divisor_idx);
|
tcb_setup_single_chan(tc, best_divisor_idx);
|
||||||
|
|
||||||
/* register sched_clock on chips with single 32 bit counter */
|
|
||||||
sched_clock_register(tc_read_sched_clock, 32, divided_rate);
|
|
||||||
} else {
|
} else {
|
||||||
/* tclib will give us three clocks no matter what the
|
/* tclib will give us three clocks no matter what the
|
||||||
* underlying platform supports.
|
* underlying platform supports.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue