Re: [patch 2/5] Staging: vme: add VME userspace driver

From: Emilio G. Cota
Date: Tue Aug 11 2009 - 17:02:07 EST


Martyn Welch wrote:
> I disagree. The bridge drivers should register their resources with the
> core. The core, or a layer above it, can control how those resources are
> used. This moves the complexity you want for managing the windows to a
> level that will work on all underlying drivers rather than having to be
> written explicitly for each one. The mechanism I have provided does this
> discovery.

nah, it would be foolish to think we can write an upper layer
that covers every corner case for every bridge we're gonna
encounter. For instance, imagine a bridge that has 10 windows,
with the annoying feature that window#10 *only* accepts CS/CSR
mappings. How stupid is that? Very stupid. But what would be
more stupid is to write allegedly 'generic' interfaces that
break every time a bridge comes up with a stupid feature.

So that doesn't belong to a generic interface. Now, to avoid
code duplication between two (or more) _very_ similar bridges,
we just share the 'resource management' code among those,
privately. And that's pretty much it.

Regards,
E.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/