Commit b9e3f776c811cc0647c7360844714b6a9b5fd0ef

Authored by Heiko Carstens
Committed by Martin Schwidefsky
1 parent 061da3dfb2

s390/cpu: remove cpu "capabilities" sysfs attribute

It has been a big mistage to add the capabilities attribute to the
cpus in sysfs:
First the attribute only contains the cpu capability of primary cpus,
which however is not necessarily (or better: unlikely) the type of
cpu the kernel runs on, which is typically an IFL.
In addition all information that is necessary is available in
/proc/sysinfo already. So this attribute partially duplicated
informations.
So programs should look into the sysinfo file to retrieve all
informations they are interested in.

Since with this kernel release also the powersavings cpu attributes
are removed this seems to be a good opportunity to remove another
broken interface.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Showing 3 changed files with 0 additions and 36 deletions Side-by-side Diff

arch/s390/include/asm/processor.h
... ... @@ -32,7 +32,6 @@
32 32 }
33 33  
34 34 extern void s390_adjust_jiffies(void);
35   -extern int get_cpu_capability(unsigned int *);
36 35 extern const struct seq_operations cpuinfo_op;
37 36 extern int sysctl_ieee_emulation_warnings;
38 37  
arch/s390/kernel/smp.c
... ... @@ -932,19 +932,6 @@
932 932 .attrs = cpu_common_attrs,
933 933 };
934 934  
935   -static ssize_t show_capability(struct device *dev,
936   - struct device_attribute *attr, char *buf)
937   -{
938   - unsigned int capability;
939   - int rc;
940   -
941   - rc = get_cpu_capability(&capability);
942   - if (rc)
943   - return rc;
944   - return sprintf(buf, "%u\n", capability);
945   -}
946   -static DEVICE_ATTR(capability, 0444, show_capability, NULL);
947   -
948 935 static ssize_t show_idle_count(struct device *dev,
949 936 struct device_attribute *attr, char *buf)
950 937 {
... ... @@ -982,7 +969,6 @@
982 969 static DEVICE_ATTR(idle_time_us, 0444, show_idle_time, NULL);
983 970  
984 971 static struct attribute *cpu_online_attrs[] = {
985   - &dev_attr_capability.attr,
986 972 &dev_attr_idle_count.attr,
987 973 &dev_attr_idle_time_us.attr,
988 974 NULL,
arch/s390/kernel/sysinfo.c
... ... @@ -393,27 +393,6 @@
393 393 subsys_initcall(create_proc_service_level);
394 394  
395 395 /*
396   - * Bogomips calculation based on cpu capability.
397   - */
398   -int get_cpu_capability(unsigned int *capability)
399   -{
400   - struct sysinfo_1_2_2 *info;
401   - int rc;
402   -
403   - info = (void *) get_zeroed_page(GFP_KERNEL);
404   - if (!info)
405   - return -ENOMEM;
406   - rc = stsi(info, 1, 2, 2);
407   - if (rc == -ENOSYS)
408   - goto out;
409   - rc = 0;
410   - *capability = info->capability;
411   -out:
412   - free_page((unsigned long) info);
413   - return rc;
414   -}
415   -
416   -/*
417 396 * CPU capability might have changed. Therefore recalculate loops_per_jiffy.
418 397 */
419 398 void s390_adjust_jiffies(void)