From owner-svn-src-all@freebsd.org Tue Aug 18 09:09:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A79B9BC0C5; Tue, 18 Aug 2015 09:09:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52040CD2; Tue, 18 Aug 2015 09:09:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7I99fD6026520; Tue, 18 Aug 2015 09:09:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7I99emb026516; Tue, 18 Aug 2015 09:09:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201508180909.t7I99emb026516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 18 Aug 2015 09:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r286878 - in stable/10/sys/i386: i386 include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2015 09:09:41 -0000 Author: kib Date: Tue Aug 18 09:09:39 2015 New Revision: 286878 URL: https://svnweb.freebsd.org/changeset/base/286878 Log: MFC r286288: Give large kernel stack to the initial thread. Modified: stable/10/sys/i386/i386/genassym.c stable/10/sys/i386/i386/locore.s stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/include/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/genassym.c ============================================================================== --- stable/10/sys/i386/i386/genassym.c Tue Aug 18 09:09:27 2015 (r286877) +++ stable/10/sys/i386/i386/genassym.c Tue Aug 18 09:09:39 2015 (r286878) @@ -103,6 +103,7 @@ ASSYM(V_SYSCALL, offsetof(struct vmmeter ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); /* ASSYM(UPAGES, UPAGES);*/ ASSYM(KSTACK_PAGES, KSTACK_PAGES); +ASSYM(TD0_KSTACK_PAGES, TD0_KSTACK_PAGES); ASSYM(PAGE_SIZE, PAGE_SIZE); ASSYM(NPTEPG, NPTEPG); ASSYM(NPDEPG, NPDEPG); Modified: stable/10/sys/i386/i386/locore.s ============================================================================== --- stable/10/sys/i386/i386/locore.s Tue Aug 18 09:09:27 2015 (r286877) +++ stable/10/sys/i386/i386/locore.s Tue Aug 18 09:09:39 2015 (r286878) @@ -731,7 +731,7 @@ no_kernend: movl %esi,R(IdlePTD) /* Allocate KSTACK */ - ALLOCPAGES(KSTACK_PAGES) + ALLOCPAGES(TD0_KSTACK_PAGES) movl %esi,R(p0kpa) addl $KERNBASE, %esi movl %esi, R(proc0kstack) @@ -800,7 +800,7 @@ no_kernend: /* Map proc0's KSTACK in the physical way ... */ movl R(p0kpa), %eax - movl $(KSTACK_PAGES), %ecx + movl $(TD0_KSTACK_PAGES), %ecx fillkptphys($PG_RW) /* Map ISA hole */ Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Tue Aug 18 09:09:27 2015 (r286877) +++ stable/10/sys/i386/i386/machdep.c Tue Aug 18 09:09:39 2015 (r286878) @@ -3153,7 +3153,7 @@ init386(first) #endif thread0.td_kstack = proc0kstack; - thread0.td_kstack_pages = KSTACK_PAGES; + thread0.td_kstack_pages = TD0_KSTACK_PAGES; /* * This may be done better later if it gets more high level Modified: stable/10/sys/i386/include/param.h ============================================================================== --- stable/10/sys/i386/include/param.h Tue Aug 18 09:09:27 2015 (r286877) +++ stable/10/sys/i386/include/param.h Tue Aug 18 09:09:39 2015 (r286878) @@ -114,6 +114,11 @@ #define KSTACK_PAGES 2 /* Includes pcb! */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ +#if KSTACK_PAGES < 4 +#define TD0_KSTACK_PAGES 4 +#else +#define TD0_KSTACK_PAGES KSTACK_PAGES +#endif /* * Ceiling on amount of swblock kva space, can be changed via