Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jul 2014 09:55:55 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        johnandsara2@cox.net
Cc:        Emeric POUPON <emeric.poupon@arkoon-netasq.com>, freebsd-arch@freebsd.org
Subject:   Re: How to properly handle several fonctions provided by the Winbond SuperIO chip?
Message-ID:  <201407110955.55568.jhb@freebsd.org>
In-Reply-To: <53BF23A0.1000603@cox.net>
References:  <1118241087.138096.1403180509132.JavaMail.zimbra@arkoon-netasq.com> <HrsE1o01s2X408g01rsFrH> <53BF23A0.1000603@cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407110955.55568.jhb>