lkml.org 
[lkml]   [1999]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: RFC: Devices, buses and hotplug
Date
From
> Each tag is assigned a priority which controls the order in which
> are tags with identical type processed. For most tags, this priority
> will be zero, but for example ISA cards require ordering of their
> autoprobe routines.

You also need a 'class' so you can initialise things like block, then char,
then net

> Unfortunately, this probably requires calling the PNP BIOS to get all the
> regions magically occupied by motherboard hardware :-(

It needs to call arch dependant code. PnP bios isnt very common on an alpha.


> driver and everything is done. [We can also use kmod to notify
> userland about new device appearing which needs to be named.]

And to do stuff like load firmware

> (4) The bus-dependent code receives an unplug notification and sends
> it to the driver. The driver releases the device, bus-dependent
> code removes it and deallocates all of its resources. Done.

What if the driver says "Im in the middle of something" or "but there
is an fs mounted".

Just to remind you its -not- trivial 8)


> ISAPnP
> ~~~~~~
> ISAPnP is probably much too complex to be fully handled in the kernel --

ISAPnP is simpler than hot plug PCI and you have to do it in kernel space
to handle power management right, to handle clash avoidance and to handle
PCI/ISA IRQ route programming on the southbridge

The code for handling ISAPnP akin to current PCI is in ALSA and is part
of a good basis for this

> PCMCIA and CardBus
> ~~~~~~~~~~~~~~~~~~
> I believe both PCMCIA and CardBus should be treated as separate hotplug
> capable buses, but as I'm no PCMCIA guru, I'd like David Hinds to tell
> me his opinion on this.

CardBus is basically hot plug PCI

> Device access
> ~~~~~~~~~~~~~
> All addresses in device nodes should be expressed as physical addresses,
> i.e. those accepted by ioremap(), /dev/mem and similar interfaces. Each bus

What about platforms with multiple spaces where an 'address' (ie a void *)
is insufficient to describe an object ?

> ISA addresses. Most drivers should be converted to use ioremap()
> properly and if it's too hard, isa_readb() introduced and used instead
> of readb() in non-converted drivers.
> readl() et al. should also exist in variants directly specifying endianity
> of target data.

There is no need for an isa_readb() - readb() will be right. ioremap will be
required for ISA anyway.

As to the endianisms, please _dont_ do that. It encourages bad programming.
Instead of thinking how to avoid endian swaps people will write sloppy code
that just endian swaps every reference

Alan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:2.514 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site