Date: Tue, 6 Dec 2005 13:42:49 +0200 From: Ruslan Ermilov <ru@FreeBSD.org> To: Marius Strobl <marius@FreeBSD.org> Cc: sparc64@FreeBSD.org Subject: [PATCH] Re: sparc64/sparc64/exception.S Message-ID: <20051206114249.GA62078@ip.net.ua> In-Reply-To: <20051205212539.GF76163@ip.net.ua> References: <20051205212539.GF76163@ip.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--cvVnyQ+4j833TQvp Content-Type: multipart/mixed; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi again, On Mon, Dec 05, 2005 at 11:25:39PM +0200, Ruslan Ermilov wrote: > Hi Marius, >=20 > Playing with -Wundef reveals the following bug in exceptions.S: >=20 > /usr/src/sys/sparc64/sparc64/exception.S:175:5: "KTR_COMPILE" is not defi= ned > /usr/src/sys/sparc64/sparc64/exception.S:193:5: "KTR_COMPILE" is not defi= ned > /usr/src/sys/sparc64/sparc64/exception.S:353:5: "KTR_COMPILE" is not defi= ned > ... >=20 > But including <sys/ktr.h> while fixing this also breaks the build > as there are some KRT_* symbols get defined in assym.s. Can you > please look into properly fixing this? >=20 OK, I found the attached working. Basically, it removes KTR stuff out from assym.s (genassym.c) and into the files that need it. But since it affects low-level .S files (the KTR_COMPILE macro is now defined, and adds some code), I won't risk commiting it myself (my sparc64 was re-donated to another guy in Ukraine). Please give it a try, and commit it if it's OK from your perspective. P.S. This is an example of why enabling -Wundef for at least kernel can be a good idea. Otherwise, the bug just remains unnoticed and unreported ("KTR_COMPILED not defined", etc.). Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Content-Transfer-Encoding: quoted-printable Index: sparc64/sparc64/exception.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/sparc64/sparc64/exception.S,v retrieving revision 1.70 diff -u -p -r1.70 exception.S --- sparc64/sparc64/exception.S 16 Apr 2005 15:05:56 -0000 1.70 +++ sparc64/sparc64/exception.S 6 Dec 2005 11:23:06 -0000 @@ -59,6 +59,8 @@ __FBSDID("$FreeBSD: src/sys/sparc64/spar #include "opt_compat.h" #include "opt_ddb.h" =20 +#include <sys/ktr.h> + #include <machine/asi.h> #include <machine/asmacros.h> #include <machine/ktr.h> Index: sparc64/sparc64/genassym.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/sparc64/sparc64/genassym.c,v retrieving revision 1.58 diff -u -p -r1.58 genassym.c --- sparc64/sparc64/genassym.c 30 Nov 2005 16:09:10 -0000 1.58 +++ sparc64/sparc64/genassym.c 6 Dec 2005 11:30:13 -0000 @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD: src/sys/sparc64/spar #include <sys/param.h> #include <sys/assym.h> #include <sys/errno.h> -#include <sys/ktr.h> #include <sys/proc.h> #include <sys/queue.h> #include <sys/lock.h> @@ -138,33 +137,6 @@ ASSYM(IC_LINESIZE, offsetof(struct cache =20 ASSYM(ICA_PA, offsetof(struct ipi_cache_args, ica_pa)); =20 -ASSYM(KTR_PROC, KTR_PROC); -ASSYM(KTR_TRAP, KTR_TRAP); -ASSYM(KTR_SMP, KTR_SMP); -ASSYM(KTR_SYSC, KTR_SYSC); -ASSYM(KTR_INTR, KTR_INTR); -ASSYM(KTR_CT1, KTR_CT1); -ASSYM(KTR_CT2, KTR_CT2); -ASSYM(KTR_CT3, KTR_CT3); -ASSYM(KTR_CT4, KTR_CT4); -ASSYM(KTR_CT5, KTR_CT5); -ASSYM(KTR_CT6, KTR_CT6); -ASSYM(KTR_CT7, KTR_CT7); -ASSYM(KTR_CT8, KTR_CT8); - -ASSYM(KTR_SIZEOF, sizeof(struct ktr_entry)); -ASSYM(KTR_LINE, offsetof(struct ktr_entry, ktr_line)); -ASSYM(KTR_FILE, offsetof(struct ktr_entry, ktr_file)); -ASSYM(KTR_DESC, offsetof(struct ktr_entry, ktr_desc)); -ASSYM(KTR_CPU, offsetof(struct ktr_entry, ktr_cpu)); -ASSYM(KTR_TIMESTAMP, offsetof(struct ktr_entry, ktr_timestamp)); -ASSYM(KTR_PARM1, offsetof(struct ktr_entry, ktr_parms[0])); -ASSYM(KTR_PARM2, offsetof(struct ktr_entry, ktr_parms[1])); -ASSYM(KTR_PARM3, offsetof(struct ktr_entry, ktr_parms[2])); -ASSYM(KTR_PARM4, offsetof(struct ktr_entry, ktr_parms[3])); -ASSYM(KTR_PARM5, offsetof(struct ktr_entry, ktr_parms[4])); -ASSYM(KTR_PARM6, offsetof(struct ktr_entry, ktr_parms[5])); - ASSYM(TTE_VPN, offsetof(struct tte, tte_vpn)); ASSYM(TTE_DATA, offsetof(struct tte, tte_data)); ASSYM(TTE_SHIFT, TTE_SHIFT); Index: sparc64/sparc64/mp_exception.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/sparc64/sparc64/mp_exception.S,v retrieving revision 1.12 diff -u -p -r1.12 mp_exception.S --- sparc64/sparc64/mp_exception.S 19 Jun 2003 05:27:04 -0000 1.12 +++ sparc64/sparc64/mp_exception.S 6 Dec 2005 11:26:58 -0000 @@ -27,6 +27,8 @@ #include <machine/asm.h> __FBSDID("$FreeBSD: src/sys/sparc64/sparc64/mp_exception.S,v 1.12 2003/06/= 19 05:27:04 jake Exp $"); =20 +#include <sys/ktr.h> + #include <machine/asi.h> #include <machine/ktr.h> #include <machine/asmacros.h> Index: sparc64/sparc64/mp_locore.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/sparc64/sparc64/mp_locore.S,v retrieving revision 1.7 diff -u -p -r1.7 mp_locore.S --- sparc64/sparc64/mp_locore.S 29 Apr 2003 00:37:41 -0000 1.7 +++ sparc64/sparc64/mp_locore.S 6 Dec 2005 11:28:05 -0000 @@ -27,6 +27,8 @@ #include <machine/asm.h> __FBSDID("$FreeBSD: src/sys/sparc64/sparc64/mp_locore.S,v 1.7 2003/04/29 0= 0:37:41 jake Exp $"); =20 +#include <sys/ktr.h> + #include <machine/asi.h> #include <machine/asmacros.h> #include <machine/ktr.h> Index: sparc64/sparc64/swtch.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/sparc64/sparc64/swtch.S,v retrieving revision 1.33 diff -u -p -r1.33 swtch.S --- sparc64/sparc64/swtch.S 26 May 2004 12:06:52 -0000 1.33 +++ sparc64/sparc64/swtch.S 6 Dec 2005 11:28:21 -0000 @@ -27,6 +27,8 @@ #include <machine/asm.h> __FBSDID("$FreeBSD: src/sys/sparc64/sparc64/swtch.S,v 1.33 2004/05/26 12:0= 6:52 tmm Exp $"); =20 +#include <sys/ktr.h> + #include <machine/asmacros.h> #include <machine/asi.h> #include <machine/ktr.h> --mP3DRpeJDSE+ciuQ-- --cvVnyQ+4j833TQvp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDlXk5qRfpzJluFF4RAor8AJ0UID67ZIXCFyzUOGEWfeNN3Rn2dQCgnX7c Cln21oeEsvey3hu0Id8oeJU= =ee7q -----END PGP SIGNATURE----- --cvVnyQ+4j833TQvp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051206114249.GA62078>