How to properly handle several fonctions provided by the Winbond SuperIO chip?
John Baldwin
jhb at freebsd.org
Fri Jul 11 16:41:37 UTC 2014
On Thursday, July 10, 2014 7:37:04 pm John D. Hendrickson and Sara Darnell
wrote:
> John Baldwin wrote:
> > On Thursday, June 19, 2014 11:21:59 am Emeric POUPON wrote:
> >> Thanks for your answer!
> >>
> >> I was thinking about calling some parent device functions from the
children
> > devices in order to perform IO accesses.
> >> But I imagine it would be "better" to expose a kind of bus interface from
> > the main driver?
> >> However, I'm not sure the extra work induced is worth it. What do you
think?
> >
> > I think it's fine to have them call each other directly if they are going
to
> > all live in the same module.
> >
>
> just wondering
>
> do you mean fine not to expose a feature ?
>
> or fine the Winbond chip circuit allows the procedure with no problems ?
>
> wow i thought winbond io would have been a done deal. wasn't that
> released in 1990s ? (rhetorical)
No, the question is if you have two C files that are compiled into a single
loading object (foo.ko), do they call each other's functions directly or do
they use an indirection layer like kobj to call into each other.
The indirection layers tend to be both slower and a bit more obfuscated
code-wise, so if it is known for sure that these will always be in the
same foo.ko, then I think direct calls is cleaner.
--
John Baldwin
More information about the freebsd-arch
mailing list