tech-kern archive

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

Re: Inter-driver #if dependencies



On Mon, 18 May 2015, Antti Kantee wrote:

On 17/05/15 22:40, Paul Goyette wrote:
My crusade for modularity has arrived at the pcppi(4) driver, and I've
discovered that there are a number of places in the code where a #if is
used to determine whether or not some _other_ driver is available to
provide certain routines.  For pcppi(4), these dependencies are for the
attimer(4) and pckbd(4) drivers.  (While I haven't yet gone searching,
I'd be willing to wager that there are other similar examples in other
drivers.)

As you say, you're proposing a solution based on looking at one example and a wager that you'll find more use cases. Furthermore, your message is unclear on if you've implemented your proposal to test that it works even for your single case.

You won the wager in the sense that the problem exists. However, I'm not at all convinced that an abstraction hell via autoconf is the best possible solution (not that I'm convinced that it isn't, either). I suggest analyzing and fixing at at least half a dozen cases in the tree before proposing a general solution. For example scsi/ata/wd/sd/usb is a good place to look at.

If you want to solve the problem just for one driver cluster, that's more than fine, but you don't need a halfway general solution for that.

I'm certainly willing to implement the mechanism, as a proof-of-concept, for the pcppi/attimer/pckbd cluster, if there's a reasonable chance of the effort being useful.

I'm certainly not willing to spend the next 6 months (or more) of my life "analyzing and fixing at least half a dozen cases" without some encouragement that the effort won't be wasted.

If you've actually got some constructive feedback on my suggestion, please provide it.




-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index