diff --git a/arch/sw_64/Kconfig b/arch/sw_64/Kconfig index 392f7806afcb2ce9b1f540ca432bc6c85be36738..36cddefb1ad4bcdb734b0bbfe14adee8f0f6f92d 100644 --- a/arch/sw_64/Kconfig +++ b/arch/sw_64/Kconfig @@ -142,6 +142,10 @@ config ARCH_HAS_ILOG2_U64 config GENERIC_GPIO bool +config GENERIC_CALIBRATE_DELAY + bool + default y + config ZONE_DMA32 bool default y diff --git a/arch/sw_64/include/asm/hw_init.h b/arch/sw_64/include/asm/hw_init.h index a36c811839ea6431009f316677782625716df0cc..e0a5706710cd968832b744ae1e852fa9eb5e873b 100644 --- a/arch/sw_64/include/asm/hw_init.h +++ b/arch/sw_64/include/asm/hw_init.h @@ -18,7 +18,6 @@ struct cache_desc { }; struct cpuinfo_sw64 { - unsigned long loops_per_jiffy; unsigned long last_asn; unsigned long ipi_count; struct cache_desc icache; /* Primary I-cache */ diff --git a/arch/sw_64/kernel/setup.c b/arch/sw_64/kernel/setup.c index cb04aaa0cb971ea856c2e4461b0befae38859bcc..2d2a8c6d4b4e6eea55b91e84b5931758a7c05527 100644 --- a/arch/sw_64/kernel/setup.c +++ b/arch/sw_64/kernel/setup.c @@ -143,7 +143,6 @@ EXPORT_SYMBOL(screen_info); */ void store_cpu_data(int cpu) { - cpu_data[cpu].loops_per_jiffy = loops_per_jiffy; cpu_data[cpu].last_asn = ASN_FIRST_VERSION; } diff --git a/arch/sw_64/kernel/smp.c b/arch/sw_64/kernel/smp.c index f74b172ecb25f9038f61193e3b4e7ea0b82c136b..c0936d119c4ed62c19b43fe37a295a72a27271b3 100644 --- a/arch/sw_64/kernel/smp.c +++ b/arch/sw_64/kernel/smp.c @@ -374,18 +374,8 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) void __init native_smp_cpus_done(unsigned int max_cpus) { - int cpu; - unsigned long bogosum = 0; - - for (cpu = 0; cpu < NR_CPUS; cpu++) - if (cpu_online(cpu)) - bogosum += cpu_data[cpu].loops_per_jiffy; - smp_booted = 1; - pr_info("SMP: Total of %d processors activated (%lu.%02lu BogoMIPS).\n", - num_online_cpus(), - (bogosum + 2500) / (500000/HZ), - ((bogosum + 2500) / (5000/HZ)) % 100); + pr_info("SMP: Total of %d processors activated.\n", num_online_cpus()); } int setup_profiling_timer(unsigned int multiplier) diff --git a/arch/sw_64/kernel/time.c b/arch/sw_64/kernel/time.c index 6a4c8a31465c615d212d0e33ce48c72f33c85a2f..3aa55c886e384a8f6d57ec2ee26312321d38560f 100644 --- a/arch/sw_64/kernel/time.c +++ b/arch/sw_64/kernel/time.c @@ -111,14 +111,8 @@ time_init(void) of_clk_init(NULL); /* Startup the timer source. */ setup_timer(); -} - -void calibrate_delay(void) -{ - loops_per_jiffy = get_cpu_freq() / HZ; - pr_info("Clock rate yields %lu.%02lu BogoMIPS (lpj=%lu)\n", - loops_per_jiffy / (500000 / HZ), - (loops_per_jiffy / (5000 / HZ)) % 100, loops_per_jiffy); + /* Calibrate the delay loop directly */ + lpj_fine = cycle_freq / HZ; } static void __init calibrate_sched_clock(void) diff --git a/arch/sw_64/lib/udelay.c b/arch/sw_64/lib/udelay.c index 48356ab8872f89f6f3fb75189c4fa9760f14b1bc..59ca8a97d748895a49e4fbaf83a85eee99f0d459 100644 --- a/arch/sw_64/lib/udelay.c +++ b/arch/sw_64/lib/udelay.c @@ -28,12 +28,6 @@ void __delay(unsigned long loops) } EXPORT_SYMBOL(__delay); -#ifdef CONFIG_SMP -#define LPJ cpu_data[smp_processor_id()].loops_per_jiffy -#else -#define LPJ loops_per_jiffy -#endif - void udelay(unsigned long usecs) { unsigned long loops = usecs * get_cpu_freq() / 1000000; diff --git a/drivers/cpufreq/sw64_cpufreq.c b/drivers/cpufreq/sw64_cpufreq.c index b8cd37dac0d9a09557c3d87c218c6127fd841102..71f944de934be2f6ada00155a176f148bfd5553f 100644 --- a/drivers/cpufreq/sw64_cpufreq.c +++ b/drivers/cpufreq/sw64_cpufreq.c @@ -40,10 +40,8 @@ static int sw64_cpu_freq_notifier(struct notifier_block *nb, unsigned long cpu; for_each_online_cpu(cpu) { - if (val == CPUFREQ_POSTCHANGE) { + if (val == CPUFREQ_POSTCHANGE) sw64_update_clockevents(cpu, freqs->new * 1000); - current_cpu_data.loops_per_jiffy = loops_per_jiffy; - } } return 0;