Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2006 15:23:07 GMT
From:      "Wojciech A. Koszek" <wkoszek@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 100888 for review
Message-ID:  <200607071523.k67FN7JS030571@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100888

Change 100888 by wkoszek@wkoszek_laptop on 2006/07/07 15:22:38

	Enable CTASSERT from kern_proc.c because I've found a kinfo_proc
	size, which is 816 bytes when cross-compiled for MIPS.
	
	Change KINFO_PROC_SIZE to 816 in sys/sys/user.h, and change
	XXXMIPS->XXMIPS marker to leave a hint for people, who might have
	problemw with alignments later.

Affected files ...

.. //depot/projects/mips2/src/sys/kern/kern_proc.c#3 edit
.. //depot/projects/mips2/src/sys/sys/user.h#6 edit

Differences ...

==== //depot/projects/mips2/src/sys/kern/kern_proc.c#3 (text+ko) ====

@@ -100,13 +100,7 @@
 int kstack_pages = KSTACK_PAGES;
 SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "");
 
-/*
- * XXXMIPS: Change this until we know what's going on with sizeof(struct
- * kinfo_proc).
- */
-#if 0
 CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE);
-#endif
 
 /*
  * Initialize global process hashing structures.
@@ -114,7 +108,6 @@
 void
 procinit()
 {
-
 	sx_init(&allproc_lock, "allproc");
 	sx_init(&proctree_lock, "proctree");
 	mtx_init(&ppeers_lock, "p_peers", NULL, MTX_DEF);

==== //depot/projects/mips2/src/sys/sys/user.h#6 (text+ko) ====

@@ -95,10 +95,10 @@
 #define	KINFO_PROC_SIZE	768
 #endif
 /*
- * XXXMIPS: I'm not sure, but after cross-compiling my test-case I saw 768.
+ * XXMIPS: After defining a kinfo_proc variable, readelf shows 816.
  */
 #ifdef __mips__
-#define KINFO_PROC_SIZE 768
+#define KINFO_PROC_SIZE 816
 #endif
 #ifdef __powerpc__
 #define	KINFO_PROC_SIZE	768



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