From owner-freebsd-mips@FreeBSD.ORG Wed Apr 21 04:54:18 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 075401065670 for ; Wed, 21 Apr 2010 04:54:18 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id CF1CE8FC08 for ; Wed, 21 Apr 2010 04:54:17 +0000 (UTC) Received: by pwi9 with SMTP id 9so4973360pwi.13 for ; Tue, 20 Apr 2010 21:54:17 -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=HdpwhG5aKOJF84urktL54veWzmtGgEzmqg+1fLUDLjM=; b=JT9T14yZl9DK/89LsVZmeLbOqKTj4zHNUZaIBQ89uvdu5zS00Tnm+3UKbpYoqMbSiX Kf0Ta/ghhOATo01wDwRXPDwIKMetqSOM/jYuqKdMTM8Y50k/nD4dMaaFAUHxC99lZxub JjGYvV8FpW1pkG4uhcSs5kMiT9v2OaPCFOii4= 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=NDSsNCqe4d9sdOU8aGZrCecoRRaUp399Tnj8/PY35/OCjRs55YELaieNOAza86Q+Rg l15jixTpDyxwXLRsxE/AhAglWV6+RJTHYyQKDT+S5SIbUlR3PXQ2T2zMUjg1NSyEJAHr u11AC+z3QCYDH1HeprxFad9oiloPWodg93AFc= MIME-Version: 1.0 Received: by 10.141.29.15 with HTTP; Tue, 20 Apr 2010 21:54:16 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 Apr 2010 10:24:16 +0530 Received: by 10.141.90.11 with SMTP id s11mr2459424rvl.152.1271825657150; Tue, 20 Apr 2010 21:54:17 -0700 (PDT) Message-ID: From: "C. Jayachandran" To: Neel Natu 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:18 -0000 On Wed, Apr 21, 2010 at 3:06 AM, Neel Natu wrote: > 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. My initial thinking was you can just move the platform_init_ap here, The ifdef was added not to break other platforms while this is discussed (and to show what is needed for XLR). Another hook at the same place is fine too - as you said, XLR now has a different intr_machdep.c so even just having mips_ap_enable_interrupts would be fine. I can send you a patch for this. > Ditto about the #ifdef TARGET_XLR_XLS in mpboot.S. You can simply have > an empty platform_init_ap() for XLR. Yes, I think we can go with the existing platform_init_ap() and another interrupt enable hook.. JC.