Linux-kernel mailing list archive 1999-32,: Re: New resources - pls, explain :-(

# Re: New resources - pls, explain :-(

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 11 Aug 1999 23:47:19 +0100 (BST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Alan Cox: "PATCH: was Re: 2.3.13 pci_namedevice compile error"
- Previous message: Marcel Lanz: "Re: bttv & 2.2.11 => can't switch channels"

> Various implementations of writel() do stuff to stall the pipeline a bit
> anyway. It's really a convenience/speed tradeoff. IMHO writel() should
> continue to "do the right thing" as it currently does, regardless of its

They don't do the right thing at the moment. Its platform specific whether
you get ordering, endian conversion and other stuff. In short its a mess

> buses. The 'if' has to occur somewhere, if your driver supports
> multiple buses. I would rather have the ifs in a common place,
> writel(), to avoid
>
> void vga_mm_wcrt (caddr_t vga_base, unsigned char reg, unsigned char
> val)
> {
> if (zorro_bus) {
> zorro_writeb
> zorro_writeb
> } else if (pci_bus) {
> ...use pci_writeb to duplicate above logic...
> } else if (sbus) {
> ...use sbus_writeb to duplicate above logic...
> }
> }

But you should be unrolling the loop for each case to avoid the overhead

-
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/

- Next message: Alan Cox: "PATCH: was Re: 2.3.13 pci_namedevice compile error"
- Previous message: Marcel Lanz: "Re: bttv & 2.2.11 => can't switch channels"