From owner-freebsd-mips@FreeBSD.ORG Tue Feb 18 20:47:53 2014 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B7CD228; Tue, 18 Feb 2014 20:47:53 +0000 (UTC) Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.120]) by mx1.freebsd.org (Postfix) with ESMTP id 3975612CC; Tue, 18 Feb 2014 20:47:52 +0000 (UTC) X-Authority-Analysis: v=2.0 cv=GbyVbHrL c=1 sm=0 a=Hbpc8ax9VmIgqBixU/K2CA==:17 a=tXhuX5IzN-cA:10 a=dBRESv0yCI8A:10 a=ozSPa0bqj5AA:10 a=8nJEP1OIZ-IA:10 a=6I5d2MoRAAAA:8 a=KGjhK52YXX0A:10 a=i90mfdw3cdAA:10 a=PeEd2-kyTxCk3AWrFmkA:9 a=wPNLvfGTeEIA:10 a=SV7veod9ZcQA:10 a=Hbpc8ax9VmIgqBixU/K2CA==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 76.187.139.93 Received: from [76.187.139.93] ([76.187.139.93:64879] helo=[192.168.0.22]) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 0F/76-00765-7F6C3035; Tue, 18 Feb 2014 20:47:51 +0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: [RFC] 16K page size for kernel thread stack (patch) From: Stacey Son In-Reply-To: Date: Tue, 18 Feb 2014 14:47:51 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Adrian Chadd X-Mailer: Apple Mail (2.1510) Cc: "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2014 20:47:53 -0000 On Feb 18, 2014, at 2:25 PM, Adrian Chadd wrote: > Hi! >=20 > On 18 February 2014 08:48, Stacey Son wrote: >> Hi all: >>=20 >> For mips64 the current size of 8K is not enough for the kernel thread = stack. For more information, see: >>=20 >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D177876 >>=20 >> The following patch increases the size of the kernel thread stack to = 16K by using a single 16K sized page. See the patch at: >>=20 >> http://people.freebsd.org/~sson/mips/kstack/kstack_large_page.diff >=20 > Cool! Thanks for that. >=20 > I'm glad to see the supported pagesize enumeration code going into the > kernel. What do you think about committing just that bit to begin > with? Yes, it probes the supported pages sizes (or PageMasks) by writing all = one's to the PageMask register and then reading it back as suggested in = the MIPS architecture manual. If an implementation doesn't support all = the different page sizes then those bits should not stick. The various = page sizes that are supported are reported the same time the MMU = information is printed. =20 I store the PageMask probe result in cpuinfo. This way it is easy to = check to the make sure the page size that is needed is supported. Yes, it would be easy to check this in as a separate patch. > This looks like it touches shared code between mips32 and mips64. I'll > spin this up on a mips24k and mips74k (mips32r2) board soon to see if > it boots fine. Yes, I have only tested this on an ERL and Qemu. =20 Do any of your boards support the ULRI? (See my other patches.) The = ERL/Cavium Octeon CN5020 doesn't seem to support it. -stacey.