From owner-freebsd-mips@FreeBSD.ORG Sat Feb 6 05:49:53 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E7F41065672 for ; Sat, 6 Feb 2010 05:49:53 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-px0-f183.google.com (mail-px0-f183.google.com [209.85.216.183]) by mx1.freebsd.org (Postfix) with ESMTP id 3503D8FC12 for ; Sat, 6 Feb 2010 05:49:53 +0000 (UTC) Received: by pxi13 with SMTP id 13so1905361pxi.3 for ; Fri, 05 Feb 2010 21:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=LXeEUP4vjn6ag6dbf2r7ozT4Qck1BAon3wRNTLxwF0g=; b=wjq1M+BujTiqWkEH6cwO67JLgqHsnPC+7xNUgdN8l91KZSo4rpXytQY4Le/kGocsj/ Ljkg6HeFLGllB+UiuikeCyv2agQK/mPhHTWrvuTreUq6qntapqxqHTF1QQHfkiBPQBjq fjjdSaTiSEtvGbnaQWu352FFoNggrSC5VTnZs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=WYwTshn5pIZagxVz91bSqKTdryn3j+uEkv68aFOlXaIsTFi+onq9Toj4Qed9VMAY/j Q1EeqlhUAPel4XeKwHPFFTP3piuJ4ba7XYReplo6EwItfISkm70RxBAj6DpxVmY7a6Vi LUkkRwAU189n9NYYrt7tR08E8CWX1lV0Mh7As= MIME-Version: 1.0 Received: by 10.142.120.7 with SMTP id s7mr2408527wfc.104.1265435392733; Fri, 05 Feb 2010 21:49:52 -0800 (PST) In-Reply-To: <20100205.200134.460114267490858629.imp@bsdimp.com> References: <20100205.200134.460114267490858629.imp@bsdimp.com> Date: Fri, 5 Feb 2010 21:49:52 -0800 Message-ID: From: Neel Natu To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: Patch: SMP support for MIPS X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 05:49:53 -0000 Hi Warner, Thanks for looking at this. On Fri, Feb 5, 2010 at 7:01 PM, M. Warner Losh wrote: > In message: > =A0 =A0 =A0 =A0 =A0 =A0Neel Natu writes: > : I have put the diff here for review: > : http://people.freebsd.org/~neel/mips_smp_patch/diff.txt > > + /* > + =A0* XXX > + =A0 * SMP kernels must delay pcpu initialization until after > + =A0 =A0* TLB has been flushed and initialized (see mips_cpu_init()) > + =A0 =A0 */ > + =A0 =A0 if (pcpu_find(0) =3D=3D NULL) > + =A0 =A0 =A0 =A0mips_pcpu0_init(); > + > > The practical upshot of this change is that panic() prior to this > point will fault. =A0Is there some way to avoid this? > That's right. I have this fixed in the updated patch. Please review the changes to pmap.c and machdep.c. http://people.freebsd.org/~neel/mips_smp_patch/diff.txt Briefly, we use an address in KSEG0 for the 'pcpup' until we are ready to transition to a TLB-based pcpu pointer. > The rest of these changes look fairly good. =A0I'll likely comment on a > few nits later that I saw once I have the time to devote to it. > Ok. best Neel > Warner >