From owner-freebsd-mips@FreeBSD.ORG Wed Apr 21 04:54:11 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 DF261106564A for ; Wed, 21 Apr 2010 04:54:10 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f191.google.com (mail-pz0-f191.google.com [209.85.222.191]) by mx1.freebsd.org (Postfix) with ESMTP id B26468FC16 for ; Wed, 21 Apr 2010 04:54:10 +0000 (UTC) Received: by pzk29 with SMTP id 29so5771179pzk.29 for ; Tue, 20 Apr 2010 21:54:10 -0700 (PDT) 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:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=mLNHXK9f2hhBTH9qpDCoLSa3M/FOYa42maRKMnufPCA=; b=qKKc+9V3nVGseY9hwUWxMdVodoK/k2oFxGaDAmdzQ5DfOR/HWsppq+yAxF/jAFQEJt KCmFO7PItoptlpi2+yJ5toWT5BdQAaj2+nOg5POngJDF1Oivn9ymHCnLQhGZcAyjIYAR ryJdAmgKWGoPjZEWCFo1ItKvaHQV1gNYBWJ1g= 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=u+uSmh6B1o55a0q7qVWAws0eCHotkk9Yn4yxlY3bNstL4bzuxBNwj3946JLSIZtp2K 5VCMPMKq73ulZtURDgh7hODe4KBIiBYWVTQ6Lhl0zdFsW6amSSxo71cswTAVerWsuaEK KNNouEq5z7P3iquCbEA9+uKbe/3fvVBtTE0No= MIME-Version: 1.0 Received: by 10.141.29.15 with HTTP; Tue, 20 Apr 2010 21:54:09 -0700 (PDT) In-Reply-To: <20100420.155633.1075901050443800973.imp@bsdimp.com> References: <20100420.155633.1075901050443800973.imp@bsdimp.com> Date: Wed, 21 Apr 2010 10:24:09 +0530 Received: by 10.141.214.26 with SMTP id r26mr2186320rvq.225.1271825650126; Tue, 20 Apr 2010 21:54:10 -0700 (PDT) Message-ID: From: "C. Jayachandran" To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: SMP support for XLR processors. 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: Wed, 21 Apr 2010 04:54:11 -0000 On Wed, Apr 21, 2010 at 3:26 AM, M. Warner Losh wrote: > In message: > =A0 =A0 =A0 =A0 =A0 =A0Neel Natu writes: > : Hi JC, > : > : On Sat, Apr 17, 2010 at 3:40 PM, C. Jayachandran > : wrote: > : > I've a set of initial patches to enable SMP for RMI processors. It > : > comes up in multi-user with 32 CPUs. =A0I could do buildworld before = I > : > updated to HEAD - with head there is a hang during buildworld which > : > I'm looking at, but I think the initial work can be checked in. > : > > : > Neel, can you have a look at the first two patches - one is to enable > : > ULE scheduler and the second one is to move platform_init_ap to > : > slightly later in the initialization sequence. > : > > : > The patches are : > : > 1. mips-ule-support.patch > : > - Enable ULE scheduler for MIPS > : > > : > 2. mips-smp-move-platform.patch > : > - We need a hook to setup message ring and its interrupts, we use > : > platform_init_ap now, and move it be called later for XLR > : > > : > : I would like to see us move away from #ifdef TARGET_FOO in files under > : mips/mips as much as possible. I think that is achieved easily in this > : instance. > : > : How about we create a function platform_ap_enable_interrupts() that is > : called from smp_init_secondary()? This function will be defined for > : each platform. > : > : In the common case this function will simply call > : mips_ap_enable_interrupts() that encapsulates the logic that we > : currently have to setup interrupt masks for clock and ipi interrupts > : in the status register. In the XLR case however it can do something > : different. > : > : Ditto about the #ifdef TARGET_XLR_XLS in mpboot.S. You can simply have > : an empty platform_init_ap() for XLR. > > In general, I'd love to see the TARGET_xxx stuff die entirely in the > mips tree. =A0That's a hack inherited from the Octeon port. =A0There's > other mechanisms that are better suited for this stuff... Agree with you and Neel on this here. That explains why status register handling for Octeon is the most common ifdef :) JC.