1. 06 Jan, 2003 9 commits
    • Patrick Mochel's avatar
      driver model: allow manual binding of devices to drivers. · c3016fe6
      Patrick Mochel authored
      This creates and exports device_bind_driver() and device_release_driver()
      that allow a caller to manually bind a device to a driver. Apparantly, some
      drivers use this functionality (like USB): a driver binds to other device
      interfaces during the driver's probe() method call for the first interface.
      
      Implementation is easy enough, since it simply involves renaming and exporting
      the internal functions attach() and detach().
      c3016fe6
    • Patrick Mochel's avatar
      bus drivers: fix leaking refcounts. · 45cd2cfe
      Patrick Mochel authored
      In drivers/base/bus.c, get_bus() was called without put_bus() in these 
      functions:
      
      - bus_for_each_dev()
      - bus_for_each_drv()
      45cd2cfe
    • Patrick Mochel's avatar
      Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core · 6fec6161
      Patrick Mochel authored
      into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-kobject
      6fec6161
    • Patrick Mochel's avatar
      net devices: Get network devices to show up in sysfs. · 6ed6b9bf
      Patrick Mochel authored
      - declare net_subsys, and register during net_dev_init().
      - Add kobject to struct net_device.
      - initialize name and register in register_netdevice().
      - remove in unregister_netdevice().
      
      This allows one to see the registered network devices in the system via:
      
      # tree /sys/net/
      /sys/net/
      `-- eth0
      6ed6b9bf
    • Patrick Mochel's avatar
      block devices: use list and lock in block_subsys, instead of those defined in genhd.c. · 426f67eb
      Patrick Mochel authored
      Since block_subsys already contains a list and a lock, use those, instead
      of defining our own static ones.
      
      This allows struct gendisk::full_list to be removed. 
      
      struct gendisk::list is also apparently unused, so it is removed also.
      426f67eb
    • Patrick Mochel's avatar
      remove kernel/platform.c · 93e8f330
      Patrick Mochel authored
      This was never used, and a bad idea to begin with. 
      93e8f330
    • Patrick Mochel's avatar
      acpi: use decl_subsys() macro. · d977f5ed
      Patrick Mochel authored
      d977f5ed
    • Patrick Mochel's avatar
      64e928e3
    • Patrick Mochel's avatar
      kobjects: Remove kobject::subsys and subsystem::kobj. · 85e865ec
      Patrick Mochel authored
      The kobject core no longer references a subsystem directly through a kobject,
      instead using the kobject's dominant kset to reference the subsystem. The 
      registrants of kobjects have been fixed up. 
      
      To aid in this process, a few helpers were introdcuced: 
      
      - kobj_set_kset_s(obj,subsys)
      - kset_set_kset_s(obj,subsys)
      - subsys_set_kset(obj,subsys)
      
      that set the kset ptr of embedded kobjects for objects that have different
      embedded types. See include/linux/kobject.h for more description and usage.
      
      
      struct subsystem::kobj is also removed, relying solely on a subsystem's
      embedded kset for hierarchy information.  Since this requires modification
      of the subsystem declarations, a helper macro has been defined:
      
      decl_subsys(name,type)
      
      which initializes the name and ktype fields of the subsystem's embedded
      kset. All the subsystem declarations have been fixed up.
      85e865ec
  2. 05 Jan, 2003 10 commits
    • Patrick Mochel's avatar
      Introduce struct kset. · 3e815107
      Patrick Mochel authored
      struct kset is what struct subsystem should have originally been called. It
      is a set of kobjects, and nothing more, with a much less confusing name than
      'subsystem.'
      
      struct kset contains an embedded kobject, making it possible to represent it
      in the object hierarchy, and sysfs. This also provides a means for objects
      to easily express a list of subordinate objects. 
      
      struct subsystem still exists, and contains an rwsem, which its subordinate
      ksets use to protect their lists. 
      
      An arbitrary number of ksets may belong to a subsystem. A ksets specifies
      the subsystem it belongs to via its ->subsys field. 
      
      struct subsystem also contains a default kset, which may be used without
      having to define a separate kset. 
      
      The objects that defined subordinate subsystems (bus and class drivers) have
      been converted to use subordinate ksets instead.
      
      
      Note that the usage of ksets is flexible. 
      - ksets may contain a list of objects of any type, not just kobjects.
      - The objects registered with a kset do not have to be registered.
      - ksets themselves do not have to be registered. One can be used by
        simply calling kset_init(). 
      - ksets do not need a name if they are not registered. 
      - Note however that locking must be done manually in these cases.
      3e815107
    • Patrick Mochel's avatar
      Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin · 5c29ea44
      Patrick Mochel authored
      into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core
      5c29ea44
    • Patrick Mochel's avatar
      Merge bk://linux.bkbits.net/linux-2.5 · efd526ef
      Patrick Mochel authored
      into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
      efd526ef
    • Patrick Mochel's avatar
      Merge bk://linux.bkbits.net/linux-2.5 · d7677dc7
      Patrick Mochel authored
      into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
      d7677dc7
    • Linus Torvalds's avatar
      Merge home.transmeta.com:/home/torvalds/v2.5/x86_64 · 2afbee76
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      2afbee76
    • Andi Kleen's avatar
      [PATCH] 2.5.54 AGP driver fixes for x86-64 · b45aba16
      Andi Kleen authored
      This is just to make x86-64 boot with IOMMU and compiled in AGP driver
      again.  Previously both AGP and the IOMMU code would set up an aperture,
      with AGP being winner, messing up pci_map_*.
      
      This is needed for the x86-64 update for 2.5.54 I sent earlier.
      
      Actually using /dev/agpgart still corrupts memory unfortunately, haven't
      tracked that down yet.
      
      I also commented on some (usually 64bit, but at least one 32bit) bugs in
      the driver too.
      
      These changes should be all nops on i386.
      
       - Export amd k8 init function for x86-64.  It needs to be called early
         by the iommu code.  Add some comments to warn about about that (the
         upcoming VIA and SIS K8 chipsets will have the same problem)
       - Declare gatt table as u32 following the AGP spec.
       - Comment some bugs.
      b45aba16
    • Andi Kleen's avatar
      [PATCH] x86-64 updates for 2.5.54 · 717db2f9
      Andi Kleen authored
      More x86-64 updates for 2.5.54.  Most noticeable change is that the
      64bit X server works again.
      
      This only changes x86-64 specific files.  It requires some AGP driver
      changes I'm sending separately.
      
       - Some Makefile cleanups from Sam Ravnborg
       - Make sure extended registers in 32bit processes are zeroed and not
         accessible/changeable from ptrace.  This is to avoid potential
         security bugs with non 64bit clean 32bit emulation functions (they
         often are overflow prone etc.)
       - Some 32bit emulation cleanups from Stephen Rothwell
       - Make copy_*_user source const to fix warnings.
       - Set fs/gs to dummy values when the 64bit segment base is set to not
         confuse the context switch (Karsten Keil, me)
      	* still one mysterious bug in this area unfortunately.
       - Make MAP_32BIT for 64bit processes only map in the first 31bit,
         because it is usually used to map small model code.  This fixes the X
         server crashes.  Some cleanups in this area.
       - Don't set O_LARGEFILE for 32bit open
       - Handle ptregs calls from 32bit syscall correctly.
       - Implement aio io_getevents for 32bit.
       - Remove buggy unused command handler in nfsd 32bit emulation.
       - Convert timespec in semtimedop (thanks to Anton for telling me about
         this)
       - Ignore long mode flag from 32bit modify_ldt.  This fixes Wine, which
         left it uninitialized (bug found by Karsten Keil)
       - Merge with i386
       - Handle new kallsyms
       - Remove some superfluous bootup printks
      717db2f9
    • Linus Torvalds's avatar
      Merge http://linux-scsi.bkbits.net/scsi-for-linus-2.5 · 4249e4ba
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      4249e4ba
    • James Bottomley's avatar
      Merge raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5 · 755b8d21
      James Bottomley authored
      into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5
      755b8d21
    • Andries E. Brouwer's avatar
      [PATCH] scsi_scan.c · 3cf172fe
      Andries E. Brouwer authored
      Wondering why my CD-writer did not have a name in sysfs, I saw
      that when the name is longer than 50 bytes no name at all is used.
      The (much smaller) code below constructs a truncated name instead.
      3cf172fe
  3. 04 Jan, 2003 21 commits