Commit 13d5cf60 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Always use cpu_data().udelay_val.

parent 0dfed24c
...@@ -617,8 +617,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) ...@@ -617,8 +617,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
(long)num_possible_cpus(), (long)num_possible_cpus(),
(long)num_online_cpus() (long)num_online_cpus()
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
, loops_per_jiffy/(500000/HZ), , cpu_data(0).udelay_val/(500000/HZ),
(loops_per_jiffy/(5000/HZ)) % 100, (cpu_data(0).udelay_val/(5000/HZ)) % 100,
cpu_data(0).clock_tick cpu_data(0).clock_tick
#endif #endif
); );
......
...@@ -1706,6 +1706,10 @@ void __init mem_init(void) ...@@ -1706,6 +1706,10 @@ void __init mem_init(void)
unsigned long addr, last; unsigned long addr, last;
int i; int i;
#ifndef CONFIG_SMP
cpu_data(0).udelay_val = loops_per_jiffy;
#endif
i = last_valid_pfn >> ((22 - PAGE_SHIFT) + 6); i = last_valid_pfn >> ((22 - PAGE_SHIFT) + 6);
i += 1; i += 1;
sparc64_valid_addr_bitmap = (unsigned long *) sparc64_valid_addr_bitmap = (unsigned long *)
......
...@@ -59,11 +59,7 @@ extern __inline__ void __ndelay(unsigned long usecs, unsigned long lps) ...@@ -59,11 +59,7 @@ extern __inline__ void __ndelay(unsigned long usecs, unsigned long lps)
__delay(usecs * HZ); __delay(usecs * HZ);
} }
#ifdef CONFIG_SMP
#define __udelay_val cpu_data(smp_processor_id()).udelay_val #define __udelay_val cpu_data(smp_processor_id()).udelay_val
#else
#define __udelay_val loops_per_jiffy
#endif
#define udelay(usecs) __udelay((usecs),__udelay_val) #define udelay(usecs) __udelay((usecs),__udelay_val)
#define ndelay(usecs) __ndelay((usecs),__udelay_val) #define ndelay(usecs) __ndelay((usecs),__udelay_val)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment