aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 3ea872890da2..66cca03c0282 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -831,8 +831,8 @@ int setup_profiling_timer(unsigned int multiplier)
831} 831}
832 832
833#ifdef CONFIG_HOTPLUG_CPU 833#ifdef CONFIG_HOTPLUG_CPU
834static ssize_t cpu_configure_show(struct sys_device *dev, 834static ssize_t cpu_configure_show(struct device *dev,
835 struct sysdev_attribute *attr, char *buf) 835 struct device_attribute *attr, char *buf)
836{ 836{
837 ssize_t count; 837 ssize_t count;
838 838
@@ -842,8 +842,8 @@ static ssize_t cpu_configure_show(struct sys_device *dev,
842 return count; 842 return count;
843} 843}
844 844
845static ssize_t cpu_configure_store(struct sys_device *dev, 845static ssize_t cpu_configure_store(struct device *dev,
846 struct sysdev_attribute *attr, 846 struct device_attribute *attr,
847 const char *buf, size_t count) 847 const char *buf, size_t count)
848{ 848{
849 int cpu = dev->id; 849 int cpu = dev->id;
@@ -889,11 +889,11 @@ out:
889 put_online_cpus(); 889 put_online_cpus();
890 return rc ? rc : count; 890 return rc ? rc : count;
891} 891}
892static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store); 892static DEVICE_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store);
893#endif /* CONFIG_HOTPLUG_CPU */ 893#endif /* CONFIG_HOTPLUG_CPU */
894 894
895static ssize_t cpu_polarization_show(struct sys_device *dev, 895static ssize_t cpu_polarization_show(struct device *dev,
896 struct sysdev_attribute *attr, char *buf) 896 struct device_attribute *attr, char *buf)
897{ 897{
898 int cpu = dev->id; 898 int cpu = dev->id;
899 ssize_t count; 899 ssize_t count;
@@ -919,22 +919,22 @@ static ssize_t cpu_polarization_show(struct sys_device *dev,
919 mutex_unlock(&smp_cpu_state_mutex); 919 mutex_unlock(&smp_cpu_state_mutex);
920 return count; 920 return count;
921} 921}
922static SYSDEV_ATTR(polarization, 0444, cpu_polarization_show, NULL); 922static DEVICE_ATTR(polarization, 0444, cpu_polarization_show, NULL);
923 923
924static ssize_t show_cpu_address(struct sys_device *dev, 924static ssize_t show_cpu_address(struct device *dev,
925 struct sysdev_attribute *attr, char *buf) 925 struct device_attribute *attr, char *buf)
926{ 926{
927 return sprintf(buf, "%d\n", __cpu_logical_map[dev->id]); 927 return sprintf(buf, "%d\n", __cpu_logical_map[dev->id]);
928} 928}
929static SYSDEV_ATTR(address, 0444, show_cpu_address, NULL); 929static DEVICE_ATTR(address, 0444, show_cpu_address, NULL);
930 930
931 931
932static struct attribute *cpu_common_attrs[] = { 932static struct attribute *cpu_common_attrs[] = {
933#ifdef CONFIG_HOTPLUG_CPU 933#ifdef CONFIG_HOTPLUG_CPU
934 &attr_configure.attr, 934 &dev_attr_configure.attr,
935#endif 935#endif
936 &attr_address.attr, 936 &dev_attr_address.attr,
937 &attr_polarization.attr, 937 &dev_attr_polarization.attr,
938 NULL, 938 NULL,
939}; 939};
940 940
@@ -942,8 +942,8 @@ static struct attribute_group cpu_common_attr_group = {
942 .attrs = cpu_common_attrs, 942 .attrs = cpu_common_attrs,
943}; 943};
944 944
945static ssize_t show_capability(struct sys_device *dev, 945static ssize_t show_capability(struct device *dev,
946 struct sysdev_attribute *attr, char *buf) 946 struct device_attribute *attr, char *buf)
947{ 947{
948 unsigned int capability; 948 unsigned int capability;
949 int rc; 949 int rc;
@@ -953,10 +953,10 @@ static ssize_t show_capability(struct sys_device *dev,
953 return rc; 953 return rc;
954 return sprintf(buf, "%u\n", capability); 954 return sprintf(buf, "%u\n", capability);
955} 955}
956static SYSDEV_ATTR(capability, 0444, show_capability, NULL); 956static DEVICE_ATTR(capability, 0444, show_capability, NULL);
957 957
958static ssize_t show_idle_count(struct sys_device *dev, 958static ssize_t show_idle_count(struct device *dev,
959 struct sysdev_attribute *attr, char *buf) 959 struct device_attribute *attr, char *buf)
960{ 960{
961 struct s390_idle_data *idle; 961 struct s390_idle_data *idle;
962 unsigned long long idle_count; 962 unsigned long long idle_count;
@@ -976,10 +976,10 @@ repeat:
976 goto repeat; 976 goto repeat;
977 return sprintf(buf, "%llu\n", idle_count); 977 return sprintf(buf, "%llu\n", idle_count);
978} 978}
979static SYSDEV_ATTR(idle_count, 0444, show_idle_count, NULL); 979static DEVICE_ATTR(idle_count, 0444, show_idle_count, NULL);
980 980
981static ssize_t show_idle_time(struct sys_device *dev, 981static ssize_t show_idle_time(struct device *dev,
982 struct sysdev_attribute *attr, char *buf) 982 struct device_attribute *attr, char *buf)
983{ 983{
984 struct s390_idle_data *idle; 984 struct s390_idle_data *idle;
985 unsigned long long now, idle_time, idle_enter; 985 unsigned long long now, idle_time, idle_enter;
@@ -1001,12 +1001,12 @@ repeat:
1001 goto repeat; 1001 goto repeat;
1002 return sprintf(buf, "%llu\n", idle_time >> 12); 1002 return sprintf(buf, "%llu\n", idle_time >> 12);
1003} 1003}
1004static SYSDEV_ATTR(idle_time_us, 0444, show_idle_time, NULL); 1004static DEVICE_ATTR(idle_time_us, 0444, show_idle_time, NULL);
1005 1005
1006static struct attribute *cpu_online_attrs[] = { 1006static struct attribute *cpu_online_attrs[] = {
1007 &attr_capability.attr, 1007 &dev_attr_capability.attr,
1008 &attr_idle_count.attr, 1008 &dev_attr_idle_count.attr,
1009 &attr_idle_time_us.attr, 1009 &dev_attr_idle_time_us.attr,
1010 NULL, 1010 NULL,
1011}; 1011};
1012 1012
@@ -1019,7 +1019,7 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
1019{ 1019{
1020 unsigned int cpu = (unsigned int)(long)hcpu; 1020 unsigned int cpu = (unsigned int)(long)hcpu;
1021 struct cpu *c = &per_cpu(cpu_devices, cpu); 1021 struct cpu *c = &per_cpu(cpu_devices, cpu);
1022 struct sys_device *s = &c->sysdev; 1022 struct device *s = &c->dev;
1023 struct s390_idle_data *idle; 1023 struct s390_idle_data *idle;
1024 int err = 0; 1024 int err = 0;
1025 1025
@@ -1045,7 +1045,7 @@ static struct notifier_block __cpuinitdata smp_cpu_nb = {
1045static int __devinit smp_add_present_cpu(int cpu) 1045static int __devinit smp_add_present_cpu(int cpu)
1046{ 1046{
1047 struct cpu *c = &per_cpu(cpu_devices, cpu); 1047 struct cpu *c = &per_cpu(cpu_devices, cpu);
1048 struct sys_device *s = &c->sysdev; 1048 struct device *s = &c->dev;
1049 int rc; 1049 int rc;
1050 1050
1051 c->hotpluggable = 1; 1051 c->hotpluggable = 1;
@@ -1098,8 +1098,8 @@ out:
1098 return rc; 1098 return rc;
1099} 1099}
1100 1100
1101static ssize_t __ref rescan_store(struct sysdev_class *class, 1101static ssize_t __ref rescan_store(struct device *dev,
1102 struct sysdev_class_attribute *attr, 1102 struct device_attribute *attr,
1103 const char *buf, 1103 const char *buf,
1104 size_t count) 1104 size_t count)
1105{ 1105{
@@ -1108,11 +1108,11 @@ static ssize_t __ref rescan_store(struct sysdev_class *class,
1108 rc = smp_rescan_cpus(); 1108 rc = smp_rescan_cpus();
1109 return rc ? rc : count; 1109 return rc ? rc : count;
1110} 1110}
1111static SYSDEV_CLASS_ATTR(rescan, 0200, NULL, rescan_store); 1111static DEVICE_ATTR(rescan, 0200, NULL, rescan_store);
1112#endif /* CONFIG_HOTPLUG_CPU */ 1112#endif /* CONFIG_HOTPLUG_CPU */
1113 1113
1114static ssize_t dispatching_show(struct sysdev_class *class, 1114static ssize_t dispatching_show(struct device *dev,
1115 struct sysdev_class_attribute *attr, 1115 struct device_attribute *attr,
1116 char *buf) 1116 char *buf)
1117{ 1117{
1118 ssize_t count; 1118 ssize_t count;
@@ -1123,8 +1123,8 @@ static ssize_t dispatching_show(struct sysdev_class *class,
1123 return count; 1123 return count;
1124} 1124}
1125 1125
1126static ssize_t dispatching_store(struct sysdev_class *dev, 1126static ssize_t dispatching_store(struct device *dev,
1127 struct sysdev_class_attribute *attr, 1127 struct device_attribute *attr,
1128 const char *buf, 1128 const char *buf,
1129 size_t count) 1129 size_t count)
1130{ 1130{
@@ -1148,7 +1148,7 @@ out:
1148 put_online_cpus(); 1148 put_online_cpus();
1149 return rc ? rc : count; 1149 return rc ? rc : count;
1150} 1150}
1151static SYSDEV_CLASS_ATTR(dispatching, 0644, dispatching_show, 1151static DEVICE_ATTR(dispatching, 0644, dispatching_show,
1152 dispatching_store); 1152 dispatching_store);
1153 1153
1154static int __init topology_init(void) 1154static int __init topology_init(void)
@@ -1159,11 +1159,11 @@ static int __init topology_init(void)
1159 register_cpu_notifier(&smp_cpu_nb); 1159 register_cpu_notifier(&smp_cpu_nb);
1160 1160
1161#ifdef CONFIG_HOTPLUG_CPU 1161#ifdef CONFIG_HOTPLUG_CPU
1162 rc = sysdev_class_create_file(&cpu_sysdev_class, &attr_rescan); 1162 rc = device_create_file(cpu_subsys.dev_root, &dev_attr_rescan);
1163 if (rc) 1163 if (rc)
1164 return rc; 1164 return rc;
1165#endif 1165#endif
1166 rc = sysdev_class_create_file(&cpu_sysdev_class, &attr_dispatching); 1166 rc = device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching);
1167 if (rc) 1167 if (rc)
1168 return rc; 1168 return rc;
1169 for_each_present_cpu(cpu) { 1169 for_each_present_cpu(cpu) {