Subject: Re: port-m68k/30924: m68k copyinout_t breakage
To: None <port-m68k-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Quentin Garnier <cube@cubidou.net>
List: netbsd-bugs
Date: 08/06/2005 15:53:04
The following reply was made to PR port-m68k/30924; it has been noted by GNATS.

From: Quentin Garnier <cube@cubidou.net>
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-m68k/30924: m68k copyinout_t breakage
Date: Sat, 6 Aug 2005 17:52:33 +0200

 --rCwQ2Y43eQY6RBgR
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sun, Aug 07, 2005 at 12:38:26AM +0900, YAMAMOTO Takashi wrote:
 [...]
 > > > i read the XXX-cube comment but i'm still not sure
 > > > why it can't be in systm.h.
 > >=20
 > > Because of the clockframe nonsense on i386/amd64.  I don't know if any
 > > other arch do that, I only use those two, but that would not be entirely
 > > surprising.
 >=20
 > can you send me the diff which shows the "clockframe nonsense"?
 
 1. sys/param.h includes time.h
 2. sys/systm.h contains prototypes that use "struct clockframe"
 3. arch/i386/include/cpu.h does a #define clockframe intrframe
 
 So, if I include systm.h (where the copyinout_t definition belongs)
 in types.h, I get prototypes using a forward declaration for "struct
 clockframe", but when I get to the definitions in kern/kern_clock.c, the
 clockframe part has been #define'd to something else, thus compilation
 breaks.
 
 So actually, the m68k breakage should be solved by having the breaking
 files include <sys/param.h>.
 
 > > > if it's due to circular dependencies among headers, how about
 > > > fixing them instead?
 > >=20
 > > It's really not my area.
 > >=20
 > > > eg. move the in-kernel function prototypes including timer_create1
 > > > out of time.h so that they won't be included by "primitive" ones?
 > >=20
 > > That's a possibility.  I'd rather keep things simple, I will certainly
 > > not be volunteering to fix all the kernel include crappiness just to
 > > have copyinout_t declared in a decent way.
 >=20
 > i think that it's really your area because you are adding
 > another complexity to the crappiness.
 
 Does the definition of copyinout_t looks complex to you?  Come on.
 
 --=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.
 
 --rCwQ2Y43eQY6RBgR
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (NetBSD)
 
 iQEVAwUBQvTcwdgoQloHrPnoAQJWEQf/ZEeKExxW+6jXaKUaWAtElo9t7wTQJ5kR
 XiteecDvmwSxRP9YQVH91nTPLCeQPc/VIR0CYdu0T4XiyPEBG1ftQ6wn/fA1QdqC
 W+C5GOc+tk/5UYccKlNufSpxEUzvnDqFfrAvO7LfCzakGXcRPhRbDnrQZ1Ch/7LU
 P1iT8I66ipqVC6yhisvbghbzY0KSCnJ+wopZDHeFTc3VSEiz+uKtr/2BEGZu0hzo
 x+Qe+8tyDPQQqTuGsSWN8uNNueE6SFZrAXcmv/1bnqXJjHLQ1JhPh2RiVaZ6l/Ba
 Q1V8lICMG2+w9nS+VJtJ9fyHE9IZjLbUpxWbMdfCse/HlPHhzyi51w==
 =FGft
 -----END PGP SIGNATURE-----
 
 --rCwQ2Y43eQY6RBgR--