mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-09-21 20:21:39 +00:00
[S390] prevent unneccesary loops_per_jiffy recalculation
When the seqfile /proc/cpuinfo gets accesses for each possible cpu loops_per_jiffy gets recalculated. However its value is only needed on first access. In addition loops_per_jiffy should be recalculated when the machine reports a capability change. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
19726cec63
commit
8e1023016c
|
@ -46,8 +46,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
||||||
unsigned long n = (unsigned long) v - 1;
|
unsigned long n = (unsigned long) v - 1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
s390_adjust_jiffies();
|
|
||||||
if (!n) {
|
if (!n) {
|
||||||
|
s390_adjust_jiffies();
|
||||||
seq_printf(m, "vendor_id : IBM/S390\n"
|
seq_printf(m, "vendor_id : IBM/S390\n"
|
||||||
"# processors : %i\n"
|
"# processors : %i\n"
|
||||||
"bogomips per cpu: %lu.%02lu\n",
|
"bogomips per cpu: %lu.%02lu\n",
|
||||||
|
|
|
@ -33,6 +33,7 @@ static void sclp_cpu_capability_notify(struct work_struct *work)
|
||||||
int cpu;
|
int cpu;
|
||||||
struct sys_device *sysdev;
|
struct sys_device *sysdev;
|
||||||
|
|
||||||
|
s390_adjust_jiffies();
|
||||||
pr_warning("cpu capability changed.\n");
|
pr_warning("cpu capability changed.\n");
|
||||||
get_online_cpus();
|
get_online_cpus();
|
||||||
for_each_online_cpu(cpu) {
|
for_each_online_cpu(cpu) {
|
||||||
|
|
Loading…
Reference in a new issue