From owner-freebsd-mips@FreeBSD.ORG Tue Apr 20 21:36:01 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 A2A2D106567C for ; Tue, 20 Apr 2010 21:36:01 +0000 (UTC) (envelope-from neelnatu@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 761218FC12 for ; Tue, 20 Apr 2010 21:36:01 +0000 (UTC) Received: by pwi9 with SMTP id 9so4798423pwi.13 for ; Tue, 20 Apr 2010 14:36:01 -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=wdl3CApJSQmY3foy6e/yMvmKJ9uMmRureLAot5azcJk=; b=vOnk16SEoE2/sjFSgGNv35pddNjeN7trvKUnUOUhYRNoGtzupQR47bLwz8tjZLC1GE kPThdm90YftgVjVFDI2G/bLQA9BWbGSJqDaCtfwlDpjNP60K+ApEJnjiksuGP4hLtDdh 5dwfDzSZI4fO/Vm2q75xwS4WVNujB5H1+6+d0= 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=kkSAdKicoGMgsnt8CTBWji1H1xkuq/7xElfXhZ3DuOp4qBI7Zn6FkHisdzRwNzmupA 9524vqX4o9HeR/1F4hdAGX8z7+tFoDjTNm3KDSHgzFkw6Dse7jg9wFF70GD3LQLlmPQL i74srp5mxLAP0uXiOtgCYgMU3nQMKvWOWobPA= MIME-Version: 1.0 Received: by 10.142.49.20 with HTTP; Tue, 20 Apr 2010 14:36:00 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Apr 2010 14:36:00 -0700 Received: by 10.142.122.24 with SMTP id u24mr1562235wfc.264.1271799360670; Tue, 20 Apr 2010 14:36:00 -0700 (PDT) Message-ID: From: Neel Natu To: "C. Jayachandran" 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: Tue, 20 Apr 2010 21:36:01 -0000 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. best Neel > 3. rmi-prid.patch > Add RMI processor ID prints - right now it prints unknown processor. > > 4. rmi-pcib-fix.patch > XLR pci bridge should be off the IODI bus, currently it is off the > nexus bus which will cause issue when bus_setup_intr on nexus is > called > > 5. cleanup-reorg-cpuid-rge-kx.patch > This set has a many changes rolled up: > =A0- clean up rge driver, remove unused code paths and commented code > (long way to go still) > =A0- xlr_cpu_id(), xlr_core_id() and xlr_thr_id() updated and usage updat= ed > =A0- fix a bug - we cannot use MIPS_PHYS_TO_KSEG0 on physical addresses > here, I have made changes for using XKPHYS to do the same process. > =A0- the KX bit is enabled and interrupts are disabled before the > physical memory is read, to avoid the KX bit setting from affecting > other code. > - move message ring code to on_chip.c from xlr_machdep.c, now all > message ring code is in on_chip.c > > 6. rmi-xlr-smp.patch > SMP Support for XLR > - mpwait.S added to get the other CPUs out of bootloader code at startup. > - SMP platform related functions. > - disable shared TLB code for SMP - since threads have different mappings= . > > The patches are also available at > http://sites.google.com/site/cjayachandran/files > > Enabling all 32 threads will need a minor fix in the SMP code, see the > patch subr_smp-fix.patch at the same place. > > Regards, > JC. >