Date: Tue, 24 Nov 2009 16:29:23 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r199752 - projects/mips/sys/mips/mips Message-ID: <200911241629.nAOGTNtJ023619@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Tue Nov 24 16:29:23 2009 New Revision: 199752 URL: http://svn.freebsd.org/changeset/base/199752 Log: Make sure kstack0 is page aligned. # this may have been from neel@ for the sibyte stuff Modified: projects/mips/sys/mips/mips/machdep.c Modified: projects/mips/sys/mips/mips/machdep.c ============================================================================== --- projects/mips/sys/mips/mips/machdep.c Tue Nov 24 14:57:50 2009 (r199751) +++ projects/mips/sys/mips/mips/machdep.c Tue Nov 24 16:29:23 2009 (r199752) @@ -42,6 +42,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_cputype.h" #include "opt_ddb.h" #include "opt_md.h" #include "opt_msgbuf.h" @@ -259,8 +260,12 @@ void mips_proc0_init(void) { proc_linkup(&proc0, &thread0); + + KASSERT((kstack0 & PAGE_MASK) == 0, + ("kstack0 is not aligned on a page boundary: %#lx\n", + (unsigned long)kstack0)); thread0.td_kstack = kstack0; - thread0.td_kstack_pages = KSTACK_PAGES - 1; + thread0.td_kstack_pages = KSTACK_PAGES; thread0.td_md.md_realstack = roundup2(thread0.td_kstack, PAGE_SIZE * 2); /* Initialize pcpu info of cpu-zero */ #ifdef SMP
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911241629.nAOGTNtJ023619>