s390/cpu: remove cpu "capabilities" sysfs attribute
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 25 May 2012 07:39:29 +0000 (09:39 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 30 May 2012 07:07:30 +0000 (09:07 +0200)
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>
arch/s390/include/asm/processor.h
arch/s390/kernel/smp.c
arch/s390/kernel/sysinfo.c

index 62e0d9f9a29ad9ccbc6979d2e27d7d33d250b9f5..a6951a7e9aea7b21cd323bb37866617a897df6eb 100644 (file)
@@ -32,7 +32,6 @@ static inline void get_cpu_id(struct cpuid *ptr)
 }
 
 extern void s390_adjust_jiffies(void);
-extern int get_cpu_capability(unsigned int *);
 extern const struct seq_operations cpuinfo_op;
 extern int sysctl_ieee_emulation_warnings;
 
index 5c7bf24849b2a77509e631890352af59741a323a..15cca26ccb6c4ff1cbde51c60259a7ec95471718 100644 (file)
@@ -932,19 +932,6 @@ static struct attribute_group cpu_common_attr_group = {
        .attrs = cpu_common_attrs,
 };
 
-static ssize_t show_capability(struct device *dev,
-                               struct device_attribute *attr, char *buf)
-{
-       unsigned int capability;
-       int rc;
-
-       rc = get_cpu_capability(&capability);
-       if (rc)
-               return rc;
-       return sprintf(buf, "%u\n", capability);
-}
-static DEVICE_ATTR(capability, 0444, show_capability, NULL);
-
 static ssize_t show_idle_count(struct device *dev,
                                struct device_attribute *attr, char *buf)
 {
@@ -982,7 +969,6 @@ static ssize_t show_idle_time(struct device *dev,
 static DEVICE_ATTR(idle_time_us, 0444, show_idle_time, NULL);
 
 static struct attribute *cpu_online_attrs[] = {
-       &dev_attr_capability.attr,
        &dev_attr_idle_count.attr,
        &dev_attr_idle_time_us.attr,
        NULL,
index 2a94b774695c069241ed413f50a0f9b8b183c656..fa0eb238dac7d8940321c239d970d1245078d219 100644 (file)
@@ -392,27 +392,6 @@ static __init int create_proc_service_level(void)
 }
 subsys_initcall(create_proc_service_level);
 
-/*
- * Bogomips calculation based on cpu capability.
- */
-int get_cpu_capability(unsigned int *capability)
-{
-       struct sysinfo_1_2_2 *info;
-       int rc;
-
-       info = (void *) get_zeroed_page(GFP_KERNEL);
-       if (!info)
-               return -ENOMEM;
-       rc = stsi(info, 1, 2, 2);
-       if (rc == -ENOSYS)
-               goto out;
-       rc = 0;
-       *capability = info->capability;
-out:
-       free_page((unsigned long) info);
-       return rc;
-}
-
 /*
  * CPU capability might have changed. Therefore recalculate loops_per_jiffy.
  */