From owner-freebsd-mips@FreeBSD.ORG Wed Feb 19 01:58:49 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 5513A1E7; Wed, 19 Feb 2014 01:58:49 +0000 (UTC) Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2F5711F0; Wed, 19 Feb 2014 01:58:48 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id k4so25065379qaq.29 for ; Tue, 18 Feb 2014 17:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=DqcOWNhE1t10r4lSp8j/Rx0j1Wg8Ygmc0B1XlROJdPg=; b=o+gYaWggzJsJKS/eDWTIbcDIKmAF8pMduioVBndTtRki03O3/CaWEkMnfktKvEFG91 GTPSRTKxj5p/Wwi8kTXbQ2hLG2oW020aPgsDajSpBA9HmID4ZxiHTkKeULktgVZ39Qao wXfIuQZhn87lwBnoiYuXFpXgse8pCjKovSm+IolfQkRx8nL0215aAYBDZ/tMeC93rY4K k03SSvkjvtKBp5eCvrf09B/6yHkK2LeoRsra5J02JLZsVVNBDTMKZ0xT7TUE2wf0T/K9 SldMe0/3pHfXNbZE9n2445NcsSx3Z2WsEjPZmrwr3d16s/W8M4dGMw+dfKZ7S2xDsee8 Df7g== MIME-Version: 1.0 X-Received: by 10.224.76.74 with SMTP id b10mr48201555qak.38.1392775128161; Tue, 18 Feb 2014 17:58:48 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.16.10 with HTTP; Tue, 18 Feb 2014 17:58:48 -0800 (PST) In-Reply-To: References: Date: Tue, 18 Feb 2014 17:58:48 -0800 X-Google-Sender-Auth: xqsuWdSihU5QUIvr8-orjPAwjzw Message-ID: Subject: Re: [RFC] 16K page size for kernel thread stack (patch) From: Adrian Chadd To: Stacey Son Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Wed, 19 Feb 2014 01:58:49 -0000 On 18 February 2014 12:47, Stacey Son wrote: > > On Feb 18, 2014, at 2:25 PM, Adrian Chadd wrote: > >> Hi! >> >> On 18 February 2014 08:48, Stacey Son wrote: >>> Hi all: >>> >>> For mips64 the current size of 8K is not enough for the kernel thread s= tack. For more information, see: >>> >>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D177876 >>> >>> The following patch increases the size of the kernel thread stack to 16= K by using a single 16K sized page. See the patch at: >>> >>> http://people.freebsd.org/~sson/mips/kstack/kstack_large_page.diff >> >> Cool! Thanks for that. >> >> 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 on= e's to the PageMask register and then reading it back as suggested in the M= IPS architecture manual. If an implementation doesn't support all the diff= erent page sizes then those bits should not stick. The various page sizes= that are supported are reported the same time the MMU information is print= ed. > > I store the PageMask probe result in cpuinfo. This way it is easy to che= ck 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. Sweet. Well, let's do that so the next set of updates MIPS people do with their boards will print out the available page sizes. It'll be good to gather some info on that. >> 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. > > Do any of your boards support the ULRI? (See my other patches.) The ER= L/Cavium Octeon CN5020 doesn't seem to support it. I don't think the mips24k/mips74k cores I have support ULRI. -a