Subject: Re: Separating softc and struct device?
To: None <tech-kern@netbsd.org>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 08/29/2007 23:09:25
--Y9MYNmSb6ticsAhO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Aug 30, 2007 at 01:04:17AM +0400, Valeriy E. Ushakov wrote:
> On Wed, Aug 29, 2007 at 22:22:20 +0200, Joerg Sonnenberger wrote:
>=20
> > is there a good reason to keep all the pointer casts for
> > device softc's to struct device and vice versa? I think it would be good
> > to follow the changes in ifnet vs arpcom and use direct pointer.
> > An additional goody would be that struct device could become an abstract
> > type and modifying it gets easier.
>=20
> And we already have void *device_private(device_t); that's currently
> is a no-op (returns back its argument), but you can use it on existing
> code to easily mark it up for split device/softc.
What is a pain is device_xname. When I update my tree, most of the long
time it takes to merge everything is spent on dv_xname related troubles.
Having device_xname doesn't really help here because when it is used
currently it's usually through device_xname(&sc->sc_dev), which has to
change when struct device is split off softc.
Obviously it's not bad enough to make me work as much as needed towards
integration, though :-)
--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.
--Y9MYNmSb6ticsAhO
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)
iQEVAwUBRtXghdgoQloHrPnoAQK39QgAuUKqM8CnEmINMyRCtI45sdUrfOnbQyaW
5PbgZyoJ2b3eTWBjxWpTqj7XR+itT0f5dQU7mKN2KzMwUMQ7PC912YZLlTWYA/tN
uNnTbNcH+a5YhVFYq+TuifeVurvWuYJ1VXLJhKqRiibiTaXno0yhm3Ai3s+WasC2
kPi6z3ddY/AECJOy0Uxlh2MhGAtaFD+BfFpwshpf7rjXNrOi7RiBqht9bM0fmAWB
1cSZso6TPtl2Xn6SNXMXSbLVwI7mMJdCgCtHWRY34iy3yiCtWGFUZ0JKzFtMfFA6
XtxWRq315xYsJcPviW+hc8BcfU0vp1/v4pbx7tg1jFOSqAkBLHPFqQ==
=gJUD
-----END PGP SIGNATURE-----
--Y9MYNmSb6ticsAhO--