A summary of 2.6.21 API changes
- Sysfs now supports the concept of "shadow directories" - multiple
versions of a directory with the same name. This feature is to be
used with container applications, allowing each namespace to have
resources (network interfaces, for example) with the same name. To
that end, two new functions have been added:
int sysfs_make_shadowed_dir(struct kobject *kobj, void *(*follow_link)(struct dentry *, struct nameidata *)); struct dentry *sysfs_create_shadow_dir(struct kobject *kobj);
sysfs_make_shadowed_dir() takes the existing directory for a kobject and makes it shadowed - capable of having multiple instantiations. The follow_link() method must be able to pick out the right version for any given situation. A call to sysfs_create_shadow_dir() will create a new instantiation for a directory which has been made shadowed.
- Quite a few kobject functions - kobject_init(),
kobject_del(), kobject_unregister(),
kset_register(), kset_unregister(),
subsystem_register(), subsystem_unregister(), and
subsys_create_file() - now return harmlessly if passed a
NULL pointer.
- Many kernel subsystems which once used class_device
structures have been changed to use struct device instead;
this work is toward a long-term goal of getting rid of the class tree
and having a single device tree in sysfs.
- There is a new function:
int device_schedule_callback(struct device *dev, void (*func)(struct device *))
This function will arrange for func() to be called at some future time in process context. It's meant to enable device attributes to unregister themselves, but one can imagine other applications as well.
- The ALSA system on chip ("ASoC") layer provides extensive support for
the implementation of sound drivers on embedded systems; see the
documentation files packaged with the kernel for details.
- Significant changes have been made to the crypto support interface.
- The device resource
management patches, making a lot of driver code
easier to write, have been merged.
- The DMA memory zone (ZONE_DMA) is now optional and may not be
present in all kernels.
- The local_t type has been made consistent across
architectures and has gained some documentation.
- The nopfn() address space operation can now return
NOPFN_REFAULT to indicate that the faulting instruction
should be re-executed.
- A new function, vm_insert_pfn(), enables the insertion of a
new page into a process's address space by page-frame number.
- A new driver API for general-purpose I/O signals has been added.
- The sysctl code has been heavily reworked, leading to a number of
internal API changes.
- The clockevents and dynamic tick patches have been merged. Most code will not require changes, but kernel developers should be aware of code which depends on jiffies.