aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-05-25 03:39:29 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-05-30 03:07:30 -0400
commitb9e3f776c811cc0647c7360844714b6a9b5fd0ef (patch)
treee6af8730518a4600e56b287e41d4df8a950a5181
parent061da3dfb291570e780169918933ba51c2b7d554 (diff)
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>
-rw-r--r--arch/s390/include/asm/processor.h1
-rw-r--r--arch/s390/kernel/smp.c14
-rw-r--r--arch/s390/kernel/sysinfo.c21
3 files changed, 0 insertions, 36 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index 62e0d9f9a29..a6951a7e9ae 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -32,7 +32,6 @@ static inline void get_cpu_id(struct cpuid *ptr)
32} 32}
33 33
34extern void s390_adjust_jiffies(void); 34extern void s390_adjust_jiffies(void);
35extern int get_cpu_capability(unsigned int *);
36extern const struct seq_operations cpuinfo_op; 35extern const struct seq_operations cpuinfo_op;
37extern int sysctl_ieee_emulation_warnings; 36extern int sysctl_ieee_emulation_warnings;
38 37
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 5c7bf24849b..15cca26ccb6 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -932,19 +932,6 @@ static struct attribute_group cpu_common_attr_group = {
932 .attrs = cpu_common_attrs, 932 .attrs = cpu_common_attrs,
933}; 933};
934 934
935static 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}
946static DEVICE_ATTR(capability, 0444, show_capability, NULL);
947
948static ssize_t show_idle_count(struct device *dev, 935static ssize_t show_idle_count(struct device *dev,
949 struct device_attribute *attr, char *buf) 936 struct device_attribute *attr, char *buf)
950{ 937{
@@ -982,7 +969,6 @@ static ssize_t show_idle_time(struct device *dev,
982static DEVICE_ATTR(idle_time_us, 0444, show_idle_time, NULL); 969static DEVICE_ATTR(idle_time_us, 0444, show_idle_time, NULL);
983 970
984static struct attribute *cpu_online_attrs[] = { 971static struct attribute *cpu_online_attrs[] = {
985 &dev_attr_capability.attr,
986 &dev_attr_idle_count.attr, 972 &dev_attr_idle_count.attr,
987 &dev_attr_idle_time_us.attr, 973 &dev_attr_idle_time_us.attr,
988 NULL, 974 NULL,
diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c
index 2a94b774695..fa0eb238dac 100644
--- a/arch/s390/kernel/sysinfo.c
+++ b/arch/s390/kernel/sysinfo.c
@@ -393,27 +393,6 @@ static __init int create_proc_service_level(void)
393subsys_initcall(create_proc_service_level); 393subsys_initcall(create_proc_service_level);
394 394
395/* 395/*
396 * Bogomips calculation based on cpu capability.
397 */
398int 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;
411out:
412 free_page((unsigned long) info);
413 return rc;
414}
415
416/*
417 * CPU capability might have changed. Therefore recalculate loops_per_jiffy. 396 * CPU capability might have changed. Therefore recalculate loops_per_jiffy.
418 */ 397 */
419void s390_adjust_jiffies(void) 398void s390_adjust_jiffies(void)