Subject: Re: RFC: cleaning up j720ssp.c
To: None <port-hpcarm@NetBSD.org>
From: Quentin Garnier <cube@cubidou.net>
List: port-hpcarm
Date: 02/27/2006 01:28:02
--MlJ6mS4HGnm+jrmh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 27, 2006 at 01:03:11AM +0100, Peter Postma wrote:
> On Mon, Feb 27, 2006 at 12:39:11AM +0100, Quentin Garnier wrote:
> > On Sun, Feb 26, 2006 at 11:28:21PM +0100, Peter Postma wrote:
> > > On Thu, Feb 23, 2006 at 01:49:52AM +0100, Quentin Garnier wrote:
> > >=20
> > > I had to make a small change to hpcapm.c, removing the include
> > > machine/autoconf.h. I don't think that will affect the other hpc ports
> > > but I'll cross-compile them to be sure.
> >=20
> > I think it's a left over;  it probably was needed for struct
> > mainbus_attach_args, which of course is not used anymore.
> >=20
> > > And there's a minor compatibility problem... the apmdev device uses
> > > a different major number from the apm device, so users will need to
> > > create a new device node. I've created a new major file
> >=20
> > Hum, no.  Just use the same major as before.
> >=20
>=20
> Uh, ok.
>=20
> > > (hpcarm/conf/majors.hpcarm) for this (arm/conf/majors.arm32 didn't fe=
el
> > > right). A new apm binary is also required to query the status.
> >=20
> > I'd rather have a MI definition for hpcapm.  But we'll still need a
> > definition for compat_30 anyway.
> >=20
>=20
> Ok, but then I don't see how you want to keep compatibility, we still
> need to change the no. for the MI definition.

You can have several numbers for one device.  The compatibility one will
only be compiled in under compat_30, MAKEDEV will be changed to create
the new node, etc.

You can work with only files.hpcarm using number 103 right now, it's
just fine.  I just think that sharing hpcapm major between the relevant
arches would be better.
=20
> > Why would a new binary be required?  AFAICT, the ABI doesn't change.
> >=20
>=20
> There's a small difference in the APM_IOC_GETPOWER ioctl: the old apm
> uses "_IOR" and the new uses "_IOWR".

Oh, right.  We just have to add support for OAPM_IOC_GETPOWER in
hpc/apm/apmdev.c, and we're good.  It's a one-liner.

> > > So maybe this should be noted in src/UPDATING and/or -current-users.
> >=20
> > I don't think we have a compatibility problem.  I'll have to think more
> > about it though.
> >=20
>=20
> There might only be a ABI compatibility problem, but we'll have to live
> with that...

Nah, this is easy compatibility stuff :)

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--MlJ6mS4HGnm+jrmh
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBRAJHkdgoQloHrPnoAQKB3Af/RuyNd3hjBkFucoKqp/HYFNJ9lCY+ug3+
pWTDnl9kqntdJbFsjvLpEELj9PTlyJa4FdBRh/p7PFHXKu2y8hiTm3rdhFPrgR4R
0POAj2TgkXr1C9w6T4yQWVY3A4wyTNvu7i1gcDOK2A8Rdj6JLE6foUxfqNuw0NCS
9GvjPkqm74t1i/doMiyFKv5gmcDtqYkl5dmNVZbl0q/g+7qLms3tMlaHJSLeBJRc
6/iEp/Xuuai/ocTmjCkrrsPXS+972QGF5uYSrWViA8c4h6/sudLs0HPfQwxTbwU1
2Jz9nCXURzLhnb1a7USPBWVBuhoMZU0cenIORC+dqyNKEl9uyzmuxg==
=3MAI
-----END PGP SIGNATURE-----

--MlJ6mS4HGnm+jrmh--