convert CPU sysdev class to a real subsytem (needed for CPU modaliases)
Subsystems (25)
This patch is work-in-progress and just posted to coordinate with Andi Kleen's current export of CPU modaliases. It boots my x86_64 workstation fine, nothing else is tested.
The CPU subsystem from a sysdev_class to a plain driver-core subsystem (currently called 'bus').
With the CPUs as normal devices, userspace will pick the events up properly and udev is able to coldplug the devices during bootup, which will allow proper module autoloading based on MODALIAS.
$ tree /sys/bus/cpu/ /sys/bus/cpu/ ├── devices │ ├── cpu0 -> ../../../devices/system/cpu/cpu0 │ ├── cpu1 -> ../../../devices/system/cpu/cpu1 │ ├── cpu2 -> ../../../devices/system/cpu/cpu2 │ └── cpu3 -> ../../../devices/system/cpu/cpu3 ... └── uevent
The needed bits to easily convert the remaining sysdev class users to a plain subsystem and plain devices have been added to the driver core. Sysdev drivers have never been 'drivers' in the driver-core sense, and they can be now ported-over to subsys_interfaces. The end goal is to finally remove all of the ugly sysdev hack from the system.
Greg, I guess we need a bit of your time, to make a plan and get the remaining things sorted out. We are planning and fiddling for years already here, and we should finally get the stuff out. :)
Greg, I think with the subsys_interfaces we do not need the 'multi-driver-binding' anymore, seems we can get away with the interfaces only. Classes which need to convert to buses because the class interface is not extensible can be easily converted now. The only missing piece is the 'glue directory'. We should be able to unify classes and buses internally with all that stuff.
Kay
--- arch/x86/kernel/cpu/intel_cacheinfo.c | 25 ++-- arch/x86/kernel/cpu/mcheck/therm_throt.c | 63 +++++------ arch/x86/kernel/microcode_core.c | 58 +++++----- drivers/acpi/processor_driver.c | 6 - drivers/base/base.h | 8 - drivers/base/bus.c | 177 +++++++++++++++++++++++++++---- drivers/base/class.c | 14 +- drivers/base/core.c | 35 +++--- drivers/base/cpu.c | 157 +++++++++++++++------------ drivers/base/node.c | 10 - drivers/base/sys.c | 75 +++++++++---- drivers/base/topology.c | 51 ++++---- drivers/cpufreq/cpufreq.c | 79 ++++++------- drivers/cpuidle/cpuidle.c | 12 +- drivers/cpuidle/cpuidle.h | 10 - drivers/cpuidle/sysfs.c | 74 ++++++------ include/linux/cpu.h | 19 +-- include/linux/device.h | 63 ++++++++++- kernel/sched.c | 40 +++---- 19 files changed, 614 insertions(+), 362 deletions(-)
arch/x86/kernel/cpu/intel_cacheinfo.c +12 -13
@@ -844,8 +844,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)#include <linux/kobject.h> #include <linux/sysfs.h> - -extern struct sysdev_class cpu_sysdev_class;/* from drivers/base/cpu.c */ +#include <linux/cpu.h> /* pointer to kobject for cpuX/cache */ static DEFINE_PER_CPU(struct kobject *, ici_cache_kobject);
@@ -1073,9 +1072,9 @@ err_out: static DECLARE_BITMAP(cache_dev_map, NR_CPUS);/* Add/Remove cache interface for CPU device */ -static int __cpuinit cache_add_dev (struct sys_device * sys_dev) +static int __cpuinit cache_add_dev (struct device *dev) { -unsigned int cpu = sys_dev->id; +unsigned int cpu = dev->id;unsigned long i, j;struct _index_kobject *this_object;struct _cpuid4_info *this_leaf;
@@ -1087,7 +1086,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) retval =kobject_init_and_add (per_cpu (ici_cache_kobject, cpu), &ktype_percpu_entry, - &sys_dev->kobj,"%s" ,"cache" ); + &dev->kobj,"%s" ,"cache" );if (retval <0 ) {cpuid4_cache_sysfs_exit (cpu);return retval;
@@ -1124,9 +1123,9 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)return 0 ; } -static void __cpuinit cache_remove_dev (struct sys_device * sys_dev) +static void __cpuinit cache_remove_dev (struct device *dev) { -unsigned int cpu = sys_dev->id; +unsigned int cpu = dev->id;unsigned long i;if (per_cpu (ici_cpuid4_info, cpu) ==NULL )
@@ -1145,17 +1144,17 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) {unsigned int cpu = (unsigned long )hcpu; -struct sys_device *sys_dev; +struct device *dev; - sys_dev =get_cpu_sysdev (cpu); + dev =get_cpu_device (cpu);switch (action) {case CPU_ONLINE :case CPU_ONLINE_FROZEN : -cache_add_dev (sys_dev); +cache_add_dev (dev);break ;case CPU_DEAD :case CPU_DEAD_FROZEN : -cache_remove_dev (sys_dev); +cache_remove_dev (dev);break ; }return NOTIFY_OK ;
@@ -1174,9 +1173,9 @@ static int __cpuinit cache_sysfs_init(void)for_each_online_cpu (i) {int err; -struct sys_device *sys_dev =get_cpu_sysdev (i); +struct device *dev =get_cpu_device (i); - err =cache_add_dev (sys_dev); + err =cache_add_dev (dev);if (err)return err; }
arch/x86/kernel/cpu/mcheck/therm_throt.c +31 -32
140 lines not on this page · raw message
arch/x86/kernel/microcode_core.c +30 -28
147 lines not on this page · raw message
drivers/acpi/processor_driver.c +3 -3
@@ -446,7 +446,7 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device) {struct acpi_processor *pr =NULL ;int result =0 ; -struct sys_device *sysdev; +struct device *dev; pr =kzalloc (sizeof (struct acpi_processor ),GFP_KERNEL );if (!pr)
@@ -491,8 +491,8 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)per_cpu (processors, pr->id) = pr; - sysdev =get_cpu_sysdev (pr->id); -if (sysfs_create_link (&device->dev.kobj, &sysdev->kobj,"sysdev" )) { + dev =get_cpu_device (pr->id); +if (sysfs_create_link (&device->dev.kobj, &dev->kobj,"sysdev" )) { result = -EFAULT ; goto err_free_cpumask; }
drivers/base/base.h +4 -4
@@ -5,6 +5,8 @@* * @subsys - the struct kset that defines this subsystem * @devices_kset - the list of devices associated +* @interfaces - list of subsystem interfaces associated +* @mutex - protect the devices, and interfaces lists. * * @drivers_kset - the list of drivers associated * @klist_devices - the klist to iterate over the @devices_kset
@@ -14,10 +16,8 @@* @bus - pointer back to the struct bus_type that this structure is associated * with. * -* @class_interfaces - list of class_interfaces associated * @glue_dirs - "glue" directory to put in-between the parent device to * avoid namespace conflicts -* @class_mutex - mutex to protect the children, devices, and interfaces lists. * @class - pointer back to the struct class that this structure is associated * with. *
@@ -28,6 +28,8 @@struct subsys_private {struct kset subsys;struct kset *devices_kset; +struct list_head interfaces; +struct mutex mutex;struct kset *drivers_kset;struct klist klist_devices;
@@ -36,9 +38,7 @@ struct subsys_private { unsigned int drivers_autoprobe:1;struct bus_type *bus; -struct list_head class_interfaces;struct kset glue_dirs; -struct mutex class_mutex;struct class *class; };#define to_subsys_private (obj) container_of(obj, struct subsys_private, subsys.kobj)
drivers/base/bus.c +158 -19
235 lines not on this page · raw message
drivers/base/class.c +7 -7
@@ -184,9 +184,9 @@ int __class_register(struct class *cls, struct lock_class_key *key)if (!cp)return -ENOMEM ;klist_init (&cp->klist_devices, klist_class_dev_get, klist_class_dev_put); -INIT_LIST_HEAD (&cp->class_interfaces); +INIT_LIST_HEAD (&cp->interfaces);kset_init (&cp->glue_dirs); -__mutex_init (&cp->class_mutex,"struct class mutex" , key); +__mutex_init (&cp->mutex,"subsys mutex" , key); error =kobject_set_name (&cp->subsys.kobj,"%s" , cls->name);if (error) {kfree (cp);
@@ -460,15 +460,15 @@ int class_interface_register(struct class_interface *class_intf)if (!parent)return -EINVAL ; -mutex_lock (&parent->p->class_mutex); -list_add_tail (&class_intf->node, &parent->p->class_interfaces); +mutex_lock (&parent->p->mutex); +list_add_tail (&class_intf->node, &parent->p->interfaces);if (class_intf->add_dev) {class_dev_iter_init (&iter, parent,NULL ,NULL );while ((dev =class_dev_iter_next (&iter))) class_intf->add_dev (dev, class_intf);class_dev_iter_exit (&iter); } -mutex_unlock (&parent->p->class_mutex); +mutex_unlock (&parent->p->mutex);return 0 ; }
@@ -482,7 +482,7 @@ void class_interface_unregister(struct class_interface *class_intf)if (!parent)return ; -mutex_lock (&parent->p->class_mutex); +mutex_lock (&parent->p->mutex);list_del_init (&class_intf->node);if (class_intf->remove_dev) {class_dev_iter_init (&iter, parent,NULL ,NULL );
@@ -490,7 +490,7 @@ void class_interface_unregister(struct class_interface *class_intf) class_intf->remove_dev (dev, class_intf);class_dev_iter_exit (&iter); } -mutex_unlock (&parent->p->class_mutex); +mutex_unlock (&parent->p->mutex);class_put (parent); }
drivers/base/core.c +20 -15
@@ -711,6 +711,12 @@ static struct kobject *get_device_parent(struct device *dev,return k; } +/* subsystems can specify a default device root directory */ +if (!parent && dev->bus) { +if (dev->bus->dev_root) +return &dev->bus->dev_root->kobj; + } +if (parent)return &parent->kobj;return NULL ;
@@ -731,14 +737,6 @@ static void cleanup_device_parent(struct device *dev)cleanup_glue_dir (dev, dev->kobj.parent); } -static void setup_parent (struct device *dev,struct device *parent) -{ -struct kobject *kobj; - kobj =get_device_parent (dev, parent); -if (kobj) - dev->kobj.parent = kobj; -} -static int device_add_class_symlinks (struct device *dev) {int error;
@@ -891,6 +889,7 @@ int device_private_init(struct device *dev)int device_add (struct device *dev) {struct device *parent =NULL ; +struct kobject *kobj;struct class_interface *class_intf;int error = -EINVAL ;
@@ -914,6 +913,10 @@ int device_add(struct device *dev) dev->init_name =NULL ; } +/* subsystems can specify simple device enumeration */ +if (!dev_name (dev) && dev->bus && dev->bus->dev_name) +dev_set_name (dev,"%s%u" , dev->bus->dev_name, dev->id); +if (!dev_name (dev)) { error = -EINVAL ; goto name_error;
@@ -922,7 +925,9 @@ int device_add(struct device *dev)pr_debug ("device: '%s': %s\n" ,dev_name (dev), __func__); parent =get_device (dev->parent); -setup_parent (dev, parent); + kobj =get_device_parent (dev, parent); +if (kobj) + dev->kobj.parent = kobj;/* use parent numa_node */ if (parent)
@@ -982,17 +987,17 @@ int device_add(struct device *dev) &parent->p->klist_children);if (dev->class) { -mutex_lock (&dev->class->p->class_mutex); +mutex_lock (&dev->class->p->mutex);/* tie the class to the device */ klist_add_tail (&dev->knode_class, &dev->class->p->klist_devices);/* notify any interfaces that the device is here */ list_for_each_entry (class_intf, - &dev->class->p->class_interfaces, node) + &dev->class->p->interfaces, node)if (class_intf->add_dev) class_intf->add_dev (dev, class_intf); -mutex_unlock (&dev->class->p->class_mutex); +mutex_unlock (&dev->class->p->mutex); } done:put_device (dev);
@@ -1107,15 +1112,15 @@ void device_del(struct device *dev)if (dev->class) {device_remove_class_symlinks (dev); -mutex_lock (&dev->class->p->class_mutex); +mutex_lock (&dev->class->p->mutex);/* notify any interfaces that the device is now gone */ list_for_each_entry (class_intf, - &dev->class->p->class_interfaces, node) + &dev->class->p->interfaces, node)if (class_intf->remove_dev) class_intf->remove_dev (dev, class_intf);/* remove the device from the class list */ klist_del (&dev->knode_class); -mutex_unlock (&dev->class->p->class_mutex); +mutex_unlock (&dev->class->p->mutex); }device_remove_file (dev, &uevent_attr);device_remove_attrs (dev);
drivers/base/cpu.c +88 -69
307 lines not on this page · raw message
drivers/base/node.c +5 -5
@@ -1,5 +1,5 @@/* -* drivers/base/node.c - basic Node class support +* Basic Node interface support */ #include <linux/sysdev.h>
@@ -317,12 +317,12 @@ struct node node_devices[MAX_NUMNODES];int register_cpu_under_node (unsigned int cpu,unsigned int nid) {int ret; -struct sys_device *obj; +struct device *obj;if (!node_online (nid))return 0 ; - obj =get_cpu_sysdev (cpu); + obj =get_cpu_device (cpu);if (!obj)return 0 ;
@@ -339,12 +339,12 @@ int register_cpu_under_node(unsigned int cpu, unsigned int nid)int unregister_cpu_under_node (unsigned int cpu,unsigned int nid) { -struct sys_device *obj; +struct device *obj;if (!node_online (nid))return 0 ; - obj =get_cpu_sysdev (cpu); + obj =get_cpu_device (cpu);if (!obj)return 0 ;
drivers/base/sys.c +56 -19
109 lines not on this page · raw message
drivers/base/topology.c +25 -26
109 lines not on this page · raw message
drivers/cpufreq/cpufreq.c +39 -40
235 lines not on this page · raw message
drivers/cpuidle/cpuidle.c +6 -6
@@ -291,10 +291,10 @@ EXPORT_SYMBOL_GPL(cpuidle_disable_device);static int __cpuidle_register_device (struct cpuidle_device *dev) {int ret; -struct sys_device *sys_dev =get_cpu_sysdev ((unsigned long )dev->cpu); +struct device *cpu_dev =get_cpu_device ((unsigned long )dev->cpu);struct cpuidle_driver *cpuidle_driver =cpuidle_get_driver (); -if (!sys_dev) +if (!dev)return -EINVAL ;if (!try_module_get (cpuidle_driver->owner))return -EINVAL ;
@@ -303,7 +303,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)per_cpu (cpuidle_devices, dev->cpu) = dev;list_add (&dev->device_list, &cpuidle_detected_devices); -if ((ret =cpuidle_add_sysfs (sys_dev))) { +if ((ret =cpuidle_add_sysfs (cpu_dev))) {module_put (cpuidle_driver->owner);return ret; }
@@ -344,7 +344,7 @@ EXPORT_SYMBOL_GPL(cpuidle_register_device);*/ void cpuidle_unregister_device (struct cpuidle_device *dev) { -struct sys_device *sys_dev =get_cpu_sysdev ((unsigned long )dev->cpu); +struct device *cpu_dev =get_cpu_device ((unsigned long )dev->cpu);struct cpuidle_driver *cpuidle_driver =cpuidle_get_driver ();if (dev->registered ==0 )
@@ -354,7 +354,7 @@ void cpuidle_unregister_device(struct cpuidle_device *dev)cpuidle_disable_device (dev); -cpuidle_remove_sysfs (sys_dev); +cpuidle_remove_sysfs (cpu_dev);list_del (&dev->device_list);wait_for_completion (&dev->kobj_unregister);per_cpu (cpuidle_devices, dev->cpu) =NULL ;
@@ -411,7 +411,7 @@ static int __init cpuidle_init(void)if (cpuidle_disabled ())return -ENODEV ; - ret =cpuidle_add_class_sysfs (&cpu_sysdev_class); + ret =cpuidle_add_interface (cpu_root_dev);if (ret)return ret;
drivers/cpuidle/cpuidle.h +5 -5
@@ -5,7 +5,7 @@#ifndef __DRIVER_CPUIDLE_H#define __DRIVER_CPUIDLE_H -#include <linux/sysdev.h> +#include <linux/device.h> /* For internal use only */ extern struct cpuidle_governor *cpuidle_curr_governor;
@@ -23,11 +23,11 @@ extern void cpuidle_uninstall_idle_handler(void);extern int cpuidle_switch_governor (struct cpuidle_governor *gov);/* sysfs */ -extern int cpuidle_add_class_sysfs (struct sysdev_class *cls); -extern void cpuidle_remove_class_sysfs (struct sysdev_class *cls); +extern int cpuidle_add_interface (struct device *dev); +extern void cpuidle_remove_interface (struct device *dev);extern int cpuidle_add_state_sysfs (struct cpuidle_device *device);extern void cpuidle_remove_state_sysfs (struct cpuidle_device *device); -extern int cpuidle_add_sysfs (struct sys_device *sysdev); -extern void cpuidle_remove_sysfs (struct sys_device *sysdev); +extern int cpuidle_add_sysfs (struct device *dev); +extern void cpuidle_remove_sysfs (struct device *dev);#endif /* __DRIVER_CPUIDLE_H */
drivers/cpuidle/sysfs.c +36 -38
145 lines not on this page · raw message
include/linux/cpu.h +10 -9
@@ -14,7 +14,7 @@#ifndef _LINUX_CPU_H_#define _LINUX_CPU_H_ -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/node.h> #include <linux/compiler.h> #include <linux/cpumask.h>
@@ -22,19 +22,19 @@struct cpu {int node_id;/* The node which contains the CPU */ int hotpluggable;/* creates sysfs control file if hotpluggable */ -struct sys_device sysdev; +struct device dev; };extern int register_cpu (struct cpu *cpu,int num); -extern struct sys_device *get_cpu_sysdev (unsigned cpu); +extern struct device *get_cpu_device (unsigned cpu); -extern int cpu_add_sysdev_attr (struct sysdev_attribute *attr); -extern void cpu_remove_sysdev_attr (struct sysdev_attribute *attr); +extern int cpu_add_dev_attr (struct device_attribute *attr); +extern void cpu_remove_dev_attr (struct device_attribute *attr); -extern int cpu_add_sysdev_attr_group (struct attribute_group *attrs); -extern void cpu_remove_sysdev_attr_group (struct attribute_group *attrs); +extern int cpu_add_dev_attr_group (struct attribute_group *attrs); +extern void cpu_remove_dev_attr_group (struct attribute_group *attrs); -extern int sched_create_sysfs_power_savings_entries (struct sysdev_class *cls); +extern int sched_create_sysfs_power_savings_entries (struct device *dev);#ifdef CONFIG_HOTPLUG_CPU extern void unregister_cpu (struct cpu *cpu);
@@ -160,7 +160,8 @@ static inline void cpu_maps_update_done(void) }#endif /* CONFIG_SMP */ -extern struct sysdev_class cpu_sysdev_class; +extern struct bus_type cpu_subsys; +extern struct device *cpu_root_dev;#ifdef CONFIG_HOTPLUG_CPU /* Stop CPUs going up and down. */
include/linux/device.h +60 -3
106 lines not on this page · raw message
kernel/sched.c +19 -21
@@ -7940,54 +7940,52 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) }#ifdef CONFIG_SCHED_MC -static ssize_t sched_mc_power_savings_show (struct sysdev_class *class, -struct sysdev_class_attribute *attr, -char *page) +static ssize_t sched_mc_power_savings_show (struct device *dev, +struct device_attribute *attr, +char *buf) { -return sprintf (page,"%u\n" , sched_mc_power_savings); +return sprintf (buf,"%u\n" , sched_mc_power_savings); } -static ssize_t sched_mc_power_savings_store (struct sysdev_class *class, -struct sysdev_class_attribute *attr, +static ssize_t sched_mc_power_savings_store (struct device *dev, +struct device_attribute *attr,const char *buf,size_t count) {return sched_power_savings_store (buf, count,0 ); } -static SYSDEV_CLASS_ATTR(sched_mc_power_savings, 0644, - sched_mc_power_savings_show, - sched_mc_power_savings_store); +static DEVICE_ATTR(sched_mc_power_savings, 0644, + sched_mc_power_savings_show, + sched_mc_power_savings_store);#endif #ifdef CONFIG_SCHED_SMT -static ssize_t sched_smt_power_savings_show (struct sysdev_class *dev, -struct sysdev_class_attribute *attr, -char *page) +static ssize_t sched_smt_power_savings_show (struct device *dev, +struct device_attribute *attr, +char *buf) { -return sprintf (page,"%u\n" , sched_smt_power_savings); +return sprintf (buf,"%u\n" , sched_smt_power_savings); } -static ssize_t sched_smt_power_savings_store (struct sysdev_class *dev, -struct sysdev_class_attribute *attr, +static ssize_t sched_smt_power_savings_store (struct device *dev, +struct device_attribute *attr,const char *buf,size_t count) {return sched_power_savings_store (buf, count,1 ); } -static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644, +static DEVICE_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show, sched_smt_power_savings_store);#endif -int __init sched_create_sysfs_power_savings_entries (struct sysdev_class *cls) +int __init sched_create_sysfs_power_savings_entries (struct device *dev) {int err =0 ;#ifdef CONFIG_SCHED_SMT if (smt_capable ()) - err =sysfs_create_file (&cls->kset.kobj, - &attr_sched_smt_power_savings.attr); + err =device_create_file (dev, &dev_attr_sched_smt_power_savings);#endif #ifdef CONFIG_SCHED_MC if (!err &&mc_capable ()) - err =sysfs_create_file (&cls->kset.kobj, - &attr_sched_mc_power_savings.attr); + err =device_create_file (dev, &dev_attr_sched_mc_power_savings);#endif return err; }
Quoted 3 lines · Kay Sievers
This patch is work-in-progress and just posted to coordinate with Andi Kleen's current export of CPU modaliases. It boots my
x86_64workstation fine, nothing else is tested.
Once this is in I can move the cpu modaliases from cpuid into the normal cpu devices. Right now either way works.
Getting rid of sysdevs is definitely good.
... Haven't read it all, but the parts I read look good.
-Andi
Quoted 27 lines · Kay Sievers
This patch is work-in-progress and just posted to coordinate with Andi Kleen's current export of CPU modaliases. It boots my
x86_64workstation fine, nothing else is tested.The CPU subsystem from a
sysdev_classto a plain driver-core subsystem (currently called 'bus').With the CPUs as normal devices, userspace will pick the events up properly and udev is able to coldplug the devices during bootup, which will allow proper module autoloading based on MODALIAS.
$ tree /sys/bus/cpu/ /sys/bus/cpu/ ├── devices │ ├── cpu0 -> ../../../devices/system/cpu/cpu0 │ ├── cpu1 -> ../../../devices/system/cpu/cpu1 │ ├── cpu2 -> ../../../devices/system/cpu/cpu2 │ └── cpu3 -> ../../../devices/system/cpu/cpu3 ... └── ueventThe needed bits to easily convert the remaining sysdev class users to a plain subsystem and plain devices have been added to the driver core. Sysdev drivers have never been 'drivers' in the driver-core sense, and they can be now ported-over to
subsys_interfaces. The end goal is to finally remove all of the ugly sysdev hack from the system.
Quoted 3 lines
Greg, I guess we need a bit of your time, to make a plan and get the remaining things sorted out. We are planning and fiddling for years already here, and we should finally get the stuff out. :)
I agree, I want this to get done finally.
Quoted 6 lines
Greg, I think with the
subsys_interfaceswe do not need the 'multi-driver-binding' anymore, seems we can get away with the interfaces only. Classes which need to convert to buses because the class interface is not extensible can be easily converted now. The only missing piece is the 'glue directory'. We should be able to unify classes and buses internally with all that stuff.
Ah, good, I was stalled on this because of the multi-driver-binding stuff. If that's not needed, I'll gladly take any patches for this.
So, what do I need to do here? Your patch looks good at first glance, the interface logic looks sane, is that all that we really need to do to the core?
thanks,
greg k-h
Quoted 15 lines · Greg KH
Quoted 3 lines · Kay Sievers
Greg, I guess we need a bit of your time, to make a plan and get the remaining things sorted out. We are planning and fiddling for years already here, and we should finally get the stuff out. :)
I agree, I want this to get done finally.
Quoted 6 lines
Greg, I think with the
subsys_interfaceswe do not need the 'multi-driver-binding' anymore, seems we can get away with the interfaces only. Classes which need to convert to buses because the class interface is not extensible can be easily converted now. The only missing piece is the 'glue directory'. We should be able to unify classes and buses internally with all that stuff.
Quoted 2 lines
Ah, good, I was stalled on this because of the multi-driver-binding stuff. If that's not needed, I'll gladly take any patches for this.
Yeah, I think we don't really need them. The 'interfaces' act as a sort of 'lightweight driver'. We do that with the class_interfaces already and I think that works well enough. At least the sysdev_drivers I converted already, all fit 1:1 into the subsys_interface.
Quoted 3 lines
So, what do I need to do here? Your patch looks good at first glance, the interface logic looks sane, is that all that we really need to do to the core?
Yeah, it seems to work out well. I converted all generic and the x86 code, and after removing drivers/base/sys.c and include/linux/sysdev.h it looks like this:
53 files changed, 1014 insertions(+), 1256 deletions(-)
Which could be a sign of doing the right thing.
I'll finish what I have now, then split out the driver-core changes which we can possibly merge without affecting anything else. I should get that ready next week.
Then we can check how to proceed with all the individual things to convert over, and how to do the arch stuff (~70 files), which I have no idea how to test ... but we've been there with the struct class_device a few years back already, we'll find it out. :)
After the last user is gone, we can finally remove the sysdevs.
Kay
Quoted 9 lines · Kay Sievers
Quoted 3 lines · Greg KH
So, what do I need to do here? Your patch looks good at first glance, the interface logic looks sane, is that all that we really need to do to the core?
Yeah, it seems to work out well. I converted all generic and the x86 code, and after removing
drivers/base/sys.candinclude/linux/sysdev.hit looks like this:
Quoted 6 lines
53 files changed, 1014 insertions(+), 1256 deletions(-)Which could be a sign of doing the right thing.
I'll finish what I have now, then split out the driver-core changes which we can possibly merge without affecting anything else. I should get that ready next week.
Here is the current version with the sysdev code entirely removed. It only works for x86 at the moment. It boots my box and the patch looks like:
58 files changed, 1121 insertions(+), 1368 deletions(-)
Greg, would be nice, if you can take a quick look a the driver core (not the sysdev) bits in core.c, bus.c, device.h, ... and its interaction, if they look sane to you. I'll then split the driver core stuff out, so we can merge that before we port the individual drivers over.
73 files in !x86 architectures are left to port over. Some of them can be converted independently after the driver core bits merge; but some need to be updated at the same time the generic system code is ported over.
If anybody would be interested to help out, it would be more than welcome. It's mostly a string replace job, with a few API changes, no logic changes should be really needed. The pattern what to change should be pretty obvious from the stuff in the patch.
Thanks,
Kay
----------------------
arch/arm/kernel/leds.c arch/arm/mach-exynos/cpu.c arch/arm/mach-exynos/pm.c arch/arm/mach-s3c2410/cpu-freq.c arch/arm/mach-s3c2410/dma.c arch/arm/mach-s3c2410/include/mach/dma.h arch/arm/mach-s3c2410/pll.c arch/arm/mach-s3c2410/pm.c arch/arm/mach-s3c2410/s3c2410.c arch/arm/mach-s3c2412/cpu-freq.c arch/arm/mach-s3c2412/dma.c arch/arm/mach-s3c2412/irq.c arch/arm/mach-s3c2412/pm.c arch/arm/mach-s3c2412/s3c2412.c arch/arm/mach-s3c2416/irq.c arch/arm/mach-s3c2416/pm.c arch/arm/mach-s3c2416/s3c2416.c arch/arm/mach-s3c2440/clock.c arch/arm/mach-s3c2440/dma.c arch/arm/mach-s3c2440/irq.c arch/arm/mach-s3c2440/s3c2440.c arch/arm/mach-s3c2440/s3c2440-cpufreq.c arch/arm/mach-s3c2440/s3c2440-pll-12000000.c arch/arm/mach-s3c2440/s3c2440-pll-16934400.c arch/arm/mach-s3c2440/s3c2442.c arch/arm/mach-s3c2440/s3c244x.c arch/arm/mach-s3c2440/s3c244x-clock.c arch/arm/mach-s3c2440/s3c244x-irq.c arch/arm/mach-s3c2443/dma.c arch/arm/mach-s3c2443/irq.c arch/arm/mach-s3c2443/s3c2443.c arch/arm/mach-s3c64xx/cpu.c arch/arm/mach-s3c64xx/dma.c arch/arm/mach-s3c64xx/s3c6400.c arch/arm/mach-s3c64xx/s3c6410.c arch/arm/mach-s5p64x0/cpu.c arch/arm/mach-s5p64x0/pm.c arch/arm/mach-s5pc100/cpu.c arch/arm/mach-s5pv210/cpu.c arch/arm/mach-s5pv210/pm.c arch/arm/plat-samsung/include/plat/cpu.h arch/arm/plat-samsung/include/plat/dma-s3c24xx.h arch/arm/plat-samsung/include/plat/pm.h arch/avr32/kernel/cpu.c arch/ia64/kernel/err_inject.c arch/ia64/kernel/topology.c arch/m68k/platform/coldfire/gpio.c arch/mips/txx9/generic/7segled.c arch/mips/txx9/generic/setup.c arch/powerpc/include/asm/spu.h arch/powerpc/include/asm/topology.h arch/powerpc/kernel/cacheinfo.c arch/powerpc/kernel/sysfs.c arch/powerpc/mm/numa.c arch/powerpc/platforms/cell/cbe_thermal.c arch/powerpc/platforms/cell/spu_base.c arch/powerpc/platforms/pseries/cmm.c arch/powerpc/platforms/pseries/pseries_energy.c arch/powerpc/platforms/pseries/suspend.c arch/powerpc/sysdev/ppc4xx_cpm.c arch/powerpc/sysdev/qe_lib/qe_ic.c arch/s390/kernel/smp.c arch/s390/kernel/time.c arch/s390/kernel/topology.c arch/sh/drivers/dma/dma-sysfs.c arch/sh/include/asm/dma.h arch/sh/kernel/cpu/sh4/sq.c arch/sparc/kernel/sysfs.c arch/tile/kernel/sysfs.c drivers/s390/char/sclp_config.c drivers/sh/intc/core.c drivers/sh/intc/internals.h drivers/sh/intc/userimask.c
----------------------
arch/x86/include/asm/mce.h +1 -1
@@ -149,7 +149,7 @@ static inline void enable_p5_mce(void) {}void mce_setup (struct mce *m);void mce_log (struct mce *m); -DECLARE_PER_CPU(struct sys_device, mce_sysdev); +DECLARE_PER_CPU(struct device, mce_device);/* * Maximum banks number.
arch/x86/kernel/cpu/intel_cacheinfo.c +12 -13
@@ -844,8 +844,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)#include <linux/kobject.h> #include <linux/sysfs.h> - -extern struct sysdev_class cpu_sysdev_class;/* from drivers/base/cpu.c */ +#include <linux/cpu.h> /* pointer to kobject for cpuX/cache */ static DEFINE_PER_CPU(struct kobject *, ici_cache_kobject);
@@ -1073,9 +1072,9 @@ err_out: static DECLARE_BITMAP(cache_dev_map, NR_CPUS);/* Add/Remove cache interface for CPU device */ -static int __cpuinit cache_add_dev (struct sys_device * sys_dev) +static int __cpuinit cache_add_dev (struct device *dev) { -unsigned int cpu = sys_dev->id; +unsigned int cpu = dev->id;unsigned long i, j;struct _index_kobject *this_object;struct _cpuid4_info *this_leaf;
@@ -1087,7 +1086,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) retval =kobject_init_and_add (per_cpu (ici_cache_kobject, cpu), &ktype_percpu_entry, - &sys_dev->kobj,"%s" ,"cache" ); + &dev->kobj,"%s" ,"cache" );if (retval <0 ) {cpuid4_cache_sysfs_exit (cpu);return retval;
@@ -1124,9 +1123,9 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)return 0 ; } -static void __cpuinit cache_remove_dev (struct sys_device * sys_dev) +static void __cpuinit cache_remove_dev (struct device *dev) { -unsigned int cpu = sys_dev->id; +unsigned int cpu = dev->id;unsigned long i;if (per_cpu (ici_cpuid4_info, cpu) ==NULL )
@@ -1145,17 +1144,17 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) {unsigned int cpu = (unsigned long )hcpu; -struct sys_device *sys_dev; +struct device *dev; - sys_dev =get_cpu_sysdev (cpu); + dev =get_cpu_device (cpu);switch (action) {case CPU_ONLINE :case CPU_ONLINE_FROZEN : -cache_add_dev (sys_dev); +cache_add_dev (dev);break ;case CPU_DEAD :case CPU_DEAD_FROZEN : -cache_remove_dev (sys_dev); +cache_remove_dev (dev);break ; }return NOTIFY_OK ;
@@ -1174,9 +1173,9 @@ static int __cpuinit cache_sysfs_init(void)for_each_online_cpu (i) {int err; -struct sys_device *sys_dev =get_cpu_sysdev (i); +struct device *dev =get_cpu_device (i); - err =cache_add_dev (sys_dev); + err =cache_add_dev (dev);if (err)return err; }
arch/x86/kernel/cpu/mcheck/mce-internal.h +2 -2
@@ -1,4 +1,4 @@ -#include <linux/sysdev.h> +#include <linux/device.h> #include <asm/mce.h> enum severity_level {
@@ -17,7 +17,7 @@ enum severity_level {struct mce_bank {u64 ctl;/* subevents to enable */ unsigned char init;/* initialise bank? */ -struct sysdev_attribute attr;/* sysdev attribute */ +struct device_attribute attr;/* device attribute */ char attrname[ATTR_LEN ];/* attribute name */ };
arch/x86/kernel/cpu/mcheck/mce.c +64 -64
280 lines not on this page · raw message
arch/x86/kernel/cpu/mcheck/mce_amd.c +5 -6
@@ -17,7 +17,6 @@#include <linux/notifier.h> #include <linux/kobject.h> #include <linux/percpu.h> -#include <linux/sysdev.h> #include <linux/errno.h> #include <linux/sched.h> #include <linux/sysfs.h>
@@ -548,7 +547,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)if (!b) goto out; - err =sysfs_create_link (&per_cpu (mce_sysdev, cpu).kobj, + err =sysfs_create_link (&per_cpu (mce_device, cpu).kobj, b->kobj, name);if (err) goto out;
@@ -571,7 +570,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) goto out; } - b->kobj =kobject_create_and_add (name, &per_cpu (mce_sysdev, cpu).kobj); + b->kobj =kobject_create_and_add (name, &per_cpu (mce_device, cpu).kobj);if (!b->kobj) goto out_free;
@@ -591,7 +590,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)if (i == cpu)continue ; - err =sysfs_create_link (&per_cpu (mce_sysdev, i).kobj, + err =sysfs_create_link (&per_cpu (mce_device, i).kobj, b->kobj, name);if (err) goto out;
@@ -669,7 +668,7 @@ static void threshold_remove_bank(unsigned int cpu, int bank)#ifdef CONFIG_SMP /* sibling symlink */ if (shared_bank[bank] && b->blocks->cpu != cpu) { -sysfs_remove_link (&per_cpu (mce_sysdev, cpu).kobj, name); +sysfs_remove_link (&per_cpu (mce_device, cpu).kobj, name);per_cpu (threshold_banks, cpu)[bank] =NULL ;return ;
@@ -681,7 +680,7 @@ static void threshold_remove_bank(unsigned int cpu, int bank)if (i == cpu)continue ; -sysfs_remove_link (&per_cpu (mce_sysdev, i).kobj, name); +sysfs_remove_link (&per_cpu (mce_device, i).kobj, name);per_cpu (threshold_banks, i)[bank] =NULL ; }
arch/x86/kernel/cpu/mcheck/therm_throt.c +31 -32
140 lines not on this page · raw message
arch/x86/kernel/hpet.c +0 -1
@@ -2,7 +2,6 @@#include <linux/clockchips.h> #include <linux/interrupt.h> #include <linux/export.h> -#include <linux/sysdev.h> #include <linux/delay.h> #include <linux/errno.h> #include <linux/i8253.h>
arch/x86/kernel/irqinit.c +1 -1
@@ -9,7 +9,7 @@#include <linux/kprobes.h> #include <linux/init.h> #include <linux/kernel_stat.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/bitops.h> #include <linux/acpi.h> #include <linux/io.h>
arch/x86/kernel/microcode_core.c +33 -31
168 lines not on this page · raw message
arch/x86/platform/uv/uv_sysfs.c +1 -1
@@ -19,7 +19,7 @@* Copyright (c) Russ Anderson */ -#include <linux/sysdev.h> +#include <linux/device.h> #include <asm/uv/bios.h> #include <asm/uv/uv.h>
drivers/acpi/processor_driver.c +3 -3
@@ -446,7 +446,7 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device) {struct acpi_processor *pr =NULL ;int result =0 ; -struct sys_device *sysdev; +struct device *dev; pr =kzalloc (sizeof (struct acpi_processor ),GFP_KERNEL );if (!pr)
@@ -491,8 +491,8 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)per_cpu (processors, pr->id) = pr; - sysdev =get_cpu_sysdev (pr->id); -if (sysfs_create_link (&device->dev.kobj, &sysdev->kobj,"sysdev" )) { + dev =get_cpu_device (pr->id); +if (sysfs_create_link (&device->dev.kobj, &dev->kobj,"sysdev" )) { result = -EFAULT ; goto err_free_cpumask; }
drivers/acpi/processor_thermal.c +0 -1
@@ -30,7 +30,6 @@#include <linux/module.h> #include <linux/init.h> #include <linux/cpufreq.h> -#include <linux/sysdev.h> #include <asm/uaccess.h>
drivers/base/Makefile +1 -1
@@ -1,6 +1,6 @@ # Makefile for the Linux device tree -obj-y := core.o sys.o bus.o dd.o syscore.o \ +obj-y := core.o bus.o dd.o syscore.o \ driver.o class.o platform.o \ cpu.o firmware.o init.o map.o devres.o \ attribute_container.o transport_class.o
drivers/base/base.h +5 -5
@@ -5,6 +5,8 @@* * @subsys - the struct kset that defines this subsystem * @devices_kset - the list of devices associated +* @interfaces - list of subsystem interfaces associated +* @mutex - protect the devices, and interfaces lists. * * @drivers_kset - the list of drivers associated * @klist_devices - the klist to iterate over the @devices_kset
@@ -14,10 +16,8 @@* @bus - pointer back to the struct bus_type that this structure is associated * with. * -* @class_interfaces - list of class_interfaces associated * @glue_dirs - "glue" directory to put in-between the parent device to * avoid namespace conflicts -* @class_mutex - mutex to protect the children, devices, and interfaces lists. * @class - pointer back to the struct class that this structure is associated * with. *
@@ -28,6 +28,8 @@struct subsys_private {struct kset subsys;struct kset *devices_kset; +struct list_head interfaces; +struct mutex mutex;struct kset *drivers_kset;struct klist klist_devices;
@@ -36,9 +38,7 @@ struct subsys_private { unsigned int drivers_autoprobe:1;struct bus_type *bus; -struct list_head class_interfaces;struct kset glue_dirs; -struct mutex class_mutex;struct class *class; };#define to_subsys_private (obj) container_of(obj, struct subsys_private, subsys.kobj)
@@ -94,7 +94,6 @@ extern int hypervisor_init(void);static inline int hypervisor_init (void ) {return 0 ; }#endif extern int platform_bus_init (void ); -extern int system_bus_init (void );extern int cpu_dev_init (void );extern int bus_add_device (struct device *dev);
@@ -116,6 +115,7 @@ extern char *make_class_name(const char *name, struct kobject *kobj);extern int devres_release_all (struct device *dev); +/* /sys/devices directory */ extern struct kset *devices_kset;#if defined(CONFIG_MODULES ) && defined(CONFIG_SYSFS )
drivers/base/bus.c +232 -19
322 lines not on this page · raw message
drivers/base/class.c +7 -7
@@ -184,9 +184,9 @@ int __class_register(struct class *cls, struct lock_class_key *key)if (!cp)return -ENOMEM ;klist_init (&cp->klist_devices, klist_class_dev_get, klist_class_dev_put); -INIT_LIST_HEAD (&cp->class_interfaces); +INIT_LIST_HEAD (&cp->interfaces);kset_init (&cp->glue_dirs); -__mutex_init (&cp->class_mutex,"struct class mutex" , key); +__mutex_init (&cp->mutex,"subsys mutex" , key); error =kobject_set_name (&cp->subsys.kobj,"%s" , cls->name);if (error) {kfree (cp);
@@ -460,15 +460,15 @@ int class_interface_register(struct class_interface *class_intf)if (!parent)return -EINVAL ; -mutex_lock (&parent->p->class_mutex); -list_add_tail (&class_intf->node, &parent->p->class_interfaces); +mutex_lock (&parent->p->mutex); +list_add_tail (&class_intf->node, &parent->p->interfaces);if (class_intf->add_dev) {class_dev_iter_init (&iter, parent,NULL ,NULL );while ((dev =class_dev_iter_next (&iter))) class_intf->add_dev (dev, class_intf);class_dev_iter_exit (&iter); } -mutex_unlock (&parent->p->class_mutex); +mutex_unlock (&parent->p->mutex);return 0 ; }
@@ -482,7 +482,7 @@ void class_interface_unregister(struct class_interface *class_intf)if (!parent)return ; -mutex_lock (&parent->p->class_mutex); +mutex_lock (&parent->p->mutex);list_del_init (&class_intf->node);if (class_intf->remove_dev) {class_dev_iter_init (&iter, parent,NULL ,NULL );
@@ -490,7 +490,7 @@ void class_interface_unregister(struct class_interface *class_intf) class_intf->remove_dev (dev, class_intf);class_dev_iter_exit (&iter); } -mutex_unlock (&parent->p->class_mutex); +mutex_unlock (&parent->p->mutex);class_put (parent); }
drivers/base/core.c +69 -16
153 lines not on this page · raw message
drivers/base/cpu.c +77 -69
296 lines not on this page · raw message
drivers/base/init.c +0 -1
@@ -31,7 +31,6 @@ void __init driver_init(void)* core core pieces. */ platform_bus_init (); -system_bus_init ();cpu_dev_init ();memory_dev_init (); }
drivers/base/memory.c +62 -81
328 lines not on this page · raw message
drivers/base/node.c +80 -74
323 lines not on this page · raw message
drivers/base/sys.c +0 -391
391 lines not on this page · raw message
drivers/base/topology.c +25 -26
109 lines not on this page · raw message
drivers/cpufreq/cpufreq.c +39 -40
195 lines not on this page · raw message
drivers/cpuidle/sysfs.c +36 -38
74 lines not on this page · raw message
drivers/xen/xen-balloon.c +43 -43
86 lines not on this page · raw message
drivers/xen/xen-selfballoon.c +37 -38
75 lines not on this page · raw message
include/linux/device.h +72 -4
76 lines not on this page · raw message
include/linux/sysdev.h deleted +0 -164
164 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 4 lines · Kay Sievers
Greg, would be nice, if you can take a quick look a the driver core (not the sysdev) bits in
core.c,bus.c,device.h, ... and its interaction, if they look sane to you. I'll then split the driver core stuff out, so we can merge that before we port the individual drivers over.
Yes, it looks sane to me, thanks again for doing this work.
greg k-h
Quoted 7 lines · Greg KH
Quoted 4 lines · Kay Sievers
Greg, would be nice, if you can take a quick look a the driver core (not the sysdev) bits in
core.c,bus.c,device.h, ... and its interaction, if they look sane to you. I'll then split the driver core stuff out, so we can merge that before we port the individual drivers over.Yes, it looks sane to me, thanks again for doing this work.
Split-up patches are here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=tree
That's the size of it:
60 files changed, 1170 insertions(+), 1421 deletions(-)
The current state and the list of the remaining non-x86 files is here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=blob;f=README;hb=HEAD
We need a plan now. :)
Kay
Quoted 7 lines · Kay Sievers
Quoted 6 lines · Greg KH
Quoted 4 lines · Kay Sievers
Greg, would be nice, if you can take a quick look a the driver core (not the sysdev) bits in
core.c,bus.c,device.h, ... and its interaction, if they look sane to you. I'll then split the driver core stuff out, so we can merge that before we port the individual drivers over.
Quoted 7 lines
Quoted 1 line
Yes, it looks sane to me, thanks again for doing this work.
Split-up patches are here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=treeThat's the size of it:
60 files changed, 1170 insertions(+), 1421 deletions(-)
Very nice.
Quoted 4 lines
The current state and the list of the remaining non-x86 files is here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=blob;f=README;hb=HEADWe need a plan now. :)
If I take those patches, none of those other ones will break their build, right? Or will the cpu ones?
I'll look at this tomorrow, gotta go now, I'm burnt out by badly written staging patches that must have been created by someone who is bent on driving me crazy.
thanks so much for doing this.
greg k-h
Quoted 18 lines · Greg KH
Quoted 7 lines · Kay Sievers
Quoted 6 lines · Greg KH
Quoted 4 lines · Kay Sievers
Greg, would be nice, if you can take a quick look a the driver core (not the sysdev) bits in
core.c,bus.c,device.h, ... and its interaction, if they look sane to you. I'll then split the driver core stuff out, so we can merge that before we port the individual drivers over.Quoted 7 lines
Quoted 1 line
Yes, it looks sane to me, thanks again for doing this work.
Split-up patches are here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=treeThat's the size of it:
60 files changed, 1170 insertions(+), 1421 deletions(-)Very nice.
Quoted 7 lines
Quoted 4 lines
The current state and the list of the remaining non-x86 files is here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=blob;f=README;hb=HEADWe need a plan now. :)
If I take those patches, none of those other ones will break their build, right?
The first patch should not break anything, the non-core things shouldn't too.
Quoted 1 line
Or will the cpu ones?
The cpu patch as it is will break power, s390, sh and tile.
$ git grep -w -l cpu_sysdev_class arch/powerpc/kernel/sysfs.c arch/powerpc/platforms/pseries/pseries_energy.c arch/s390/kernel/smp.c arch/sh/kernel/cpu/sh4/sq.c arch/tile/kernel/sysfs.c
If all should be bisectable, we would need to merge these changes into the cpu patch.
The other two core patches, node and memory, could need arch fixes too, but a quick grep did not reveal anything.
Quoted 1 line
I'll look at this tomorrow, gotta go now,
Great.
Quoted 3 lines
I'm burnt out by badly written
staging patches that must have been created by someone who is bent on driving me crazy.
Hehe, you must have expected all that when you came up with the TAINT_* flag name. :)
Kay
Quoted 22 lines · Kay Sievers
Quoted 21 lines · Greg KH
Quoted 7 lines · Kay Sievers
Quoted 6 lines · Greg KH
Quoted 4 lines · Kay Sievers
Greg, would be nice, if you can take a quick look a the driver core (not the sysdev) bits in
core.c,bus.c,device.h, ... and its interaction, if they look sane to you. I'll then split the driver core stuff out, so we can merge that before we port the individual drivers over.Quoted 7 lines
Quoted 1 line
Yes, it looks sane to me, thanks again for doing this work.
Split-up patches are here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=treeThat's the size of it:
60 files changed, 1170 insertions(+), 1421 deletions(-)Very nice.
Quoted 3 lines
The current state and the list of the remaining non-x86 files is here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=blob;f=README;hb=HEAD
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
We need a plan now. :)
If I take those patches, none of those other ones will break their build, right?
The first patch should not break anything, the non-core things shouldn't too.
Nice, I've applied the first patch to my tree and pushed it out and I'll read over the rest now.
Quoted 10 lines
Quoted 1 line
Or will the cpu ones?
The cpu patch as it is will break power, s390, sh and tile.
$ git grep -w -l cpu_sysdev_class arch/powerpc/kernel/sysfs.c arch/powerpc/platforms/pseries/pseries_energy.c arch/s390/kernel/smp.c arch/sh/kernel/cpu/sh4/sq.c arch/tile/kernel/sysfs.c
Quoted 2 lines
If all should be bisectable, we would need to merge these changes into the cpu patch.
Yeah, we need to do that, I'll look at it.
Quoted 2 lines
The other two core patches, node and memory, could need arch fixes too, but a quick grep did not reveal anything.
Ok, we might be safe there, I'll look at them.
thanks,
greg k-h
Quoted 22 lines · Kay Sievers
Quoted 21 lines · Greg KH
Quoted 7 lines · Kay Sievers
Quoted 6 lines · Greg KH
Quoted 4 lines · Kay Sievers
Greg, would be nice, if you can take a quick look a the driver core (not the sysdev) bits in
core.c,bus.c,device.h, ... and its interaction, if they look sane to you. I'll then split the driver core stuff out, so we can merge that before we port the individual drivers over.Quoted 7 lines
Quoted 1 line
Yes, it looks sane to me, thanks again for doing this work.
Split-up patches are here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=treeThat's the size of it:
60 files changed, 1170 insertions(+), 1421 deletions(-)Very nice.
Quoted 3 lines
The current state and the list of the remaining non-x86 files is here:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=blob;f=README;hb=HEAD
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
We need a plan now. :)
If I take those patches, none of those other ones will break their build, right?
The first patch should not break anything, the non-core things shouldn't too.
I've taken the "non-core" ones now as well.
Quoted 10 lines
Quoted 1 line
Or will the cpu ones?
The cpu patch as it is will break power, s390, sh and tile.
$ git grep -w -l cpu_sysdev_class arch/powerpc/kernel/sysfs.c arch/powerpc/platforms/pseries/pseries_energy.c arch/s390/kernel/smp.c arch/sh/kernel/cpu/sh4/sq.c arch/tile/kernel/sysfs.c
Quoted 5 lines
If all should be bisectable, we would need to merge these changes into the cpu patch.
The other two core patches, node and memory, could need arch fixes too, but a quick grep did not reveal anything.
I'll look at these tomorrow.
thanks,
greg k-h
Quoted 9 lines · Greg KH
Quoted 5 lines · Kay Sievers
If all should be bisectable, we would need to merge these changes into the cpu patch.
The other two core patches, node and memory, could need arch fixes too, but a quick grep did not reveal anything.
I'll look at these tomorrow.
Here are the current patches with all sysdev stuff finally removed from the kernel:
http://git.kernel.org/?p=linux/kernel/git/kay/patches.git;a=tree
X86, power, s390 allyesconfig and allmodconfig compiles fine.
Kay