diff options
Diffstat (limited to 'arch/mips/mips-boards/generic')
-rw-r--r-- | arch/mips/mips-boards/generic/amon.c | 4 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/time.c | 19 |
2 files changed, 2 insertions, 21 deletions
diff --git a/arch/mips/mips-boards/generic/amon.c b/arch/mips/mips-boards/generic/amon.c index b7633fda4180..96236bf33838 100644 --- a/arch/mips/mips-boards/generic/amon.c +++ b/arch/mips/mips-boards/generic/amon.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | int amon_cpu_avail(int cpu) | 29 | int amon_cpu_avail(int cpu) |
30 | { | 30 | { |
31 | struct cpulaunch *launch = (struct cpulaunch *)KSEG0ADDR(CPULAUNCH); | 31 | struct cpulaunch *launch = (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH); |
32 | 32 | ||
33 | if (cpu < 0 || cpu >= NCPULAUNCH) { | 33 | if (cpu < 0 || cpu >= NCPULAUNCH) { |
34 | pr_debug("avail: cpu%d is out of range\n", cpu); | 34 | pr_debug("avail: cpu%d is out of range\n", cpu); |
@@ -53,7 +53,7 @@ void amon_cpu_start(int cpu, | |||
53 | unsigned long gp, unsigned long a0) | 53 | unsigned long gp, unsigned long a0) |
54 | { | 54 | { |
55 | volatile struct cpulaunch *launch = | 55 | volatile struct cpulaunch *launch = |
56 | (struct cpulaunch *)KSEG0ADDR(CPULAUNCH); | 56 | (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH); |
57 | 57 | ||
58 | if (!amon_cpu_avail(cpu)) | 58 | if (!amon_cpu_avail(cpu)) |
59 | return; | 59 | return; |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index 008fd82b5840..fe2cac1b4514 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -58,27 +58,8 @@ static int mips_cpu_timer_irq; | |||
58 | static int mips_cpu_perf_irq; | 58 | static int mips_cpu_perf_irq; |
59 | extern int cp0_perfcount_irq; | 59 | extern int cp0_perfcount_irq; |
60 | 60 | ||
61 | DEFINE_PER_CPU(unsigned int, tickcount); | ||
62 | #define tickcount_this_cpu __get_cpu_var(tickcount) | ||
63 | static unsigned long ledbitmask; | ||
64 | |||
65 | static void mips_timer_dispatch(void) | 61 | static void mips_timer_dispatch(void) |
66 | { | 62 | { |
67 | #if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_ATLAS) | ||
68 | /* | ||
69 | * Yes, this is very tacky, won't work as expected with SMTC and | ||
70 | * dyntick will break it, | ||
71 | * but it gives me a nice warm feeling during debug | ||
72 | */ | ||
73 | #define LEDBAR 0xbf000408 | ||
74 | if (tickcount_this_cpu++ >= HZ) { | ||
75 | tickcount_this_cpu = 0; | ||
76 | change_bit(smp_processor_id(), &ledbitmask); | ||
77 | smp_wmb(); /* Make sure every one else sees the change */ | ||
78 | /* This will pick up any recent changes made by other CPU's */ | ||
79 | *(unsigned int *)LEDBAR = ledbitmask; | ||
80 | } | ||
81 | #endif | ||
82 | do_IRQ(mips_cpu_timer_irq); | 63 | do_IRQ(mips_cpu_timer_irq); |
83 | } | 64 | } |
84 | 65 | ||