tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (Semi-random) thoughts on device tree structure and devfs

ioctl would be called via <device>.ctl file in devfs.  devfs can lookup the
device_t instance by the opened vnode.  device_t points to its device class
data, which in turn points to [bc]devsw entry.  This means that device major
can go.

device_t will be more important because it represents device nodes shown
in devfs tree.  I think power hooks added by pmf(9) (?) should move out of
there, because it makes device_t's responsibility ambiguous.

What I'm thinking is to make device_t "inherit" behaviors, like

        - bus
          - where devices and bridges attach
        - bridge
          - owns address windows, bus is attached
        - addressable
          - have bus_addr_t
          - parent is also addressable)
        - device or psuedo
        - read device (like azalia) / device function (like audio)

Probably ifnet could be merged with device_t.


Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635

Home | Main Index | Thread Index | Old Index