From owner-freebsd-mips@FreeBSD.ORG Mon May 17 14:33:13 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 D856A1065789; Mon, 17 May 2010 14:33:13 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id A40DF8FC18; Mon, 17 May 2010 14:33:13 +0000 (UTC) Received: by pxi7 with SMTP id 7so1264960pxi.13 for ; Mon, 17 May 2010 07:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=dg53UhIvDjwkEDrdF3BaDiRTat8XeN2ZPlVSXoG8Hi4=; b=H6mGKoI0GjM0rVMRjkF0NNsOS+Mtu3BHB7MAE7RpqpmXJxCIaEgLHjKhL3d0z8EWYl LBMowa+XFnHY4qgamuzqVIYuIdEaRzrHziR1gvRQcxvTrQtNlz0rS+PZxM0mF3Tx1rxC I7PhVakj+PW9mk/rimX7bR935I4rtYHtI0K7I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=q2tryiP515wGZs2s1FyE3XWxGWaY22xVAClRkfsNd+4awt9qpE6Kwi6TCpSmDqLkIA c7t8/jJiy4VG81Mg6SEgQPOhlxLnIikhlqSrUMRVJE6FOfvbvyJsC+f5LUXQBkCTgwTZ bdgVUx6/XG2ZaT2NsvbqYcfI66w1vIUzQVRec= MIME-Version: 1.0 Received: by 10.141.139.17 with SMTP id r17mr3818498rvn.65.1274106793139; Mon, 17 May 2010 07:33:13 -0700 (PDT) Received: by 10.141.32.4 with HTTP; Mon, 17 May 2010 07:33:12 -0700 (PDT) Date: Mon, 17 May 2010 20:03:12 +0530 Message-ID: From: "C. Jayachandran" To: Neel Natu Content-Type: multipart/mixed; boundary=000325565372cfa0d00486cb1a00 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-mips@freebsd.org Subject: Minor fixup for the MIPS SMP platform code. 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: Mon, 17 May 2010 14:33:13 -0000 --000325565372cfa0d00486cb1a00 Content-Type: text/plain; charset=ISO-8859-1 The attached patch (also at http://sites.google.com/site/cjayachandran/files) has two changes: - moves the intr masking code to platform_init_ap, so that we can avoid the #ifdef for XLR - adds a platform_smp_topo() function so that platforms can define their topology I've also attempted to fixup sys/mips/sibyte to reflect these changes, but it might need further work. sys/mips/cavium also might need similar changes for SMP. Please review and apply if the changes are okay. Thanks, JC. --000325565372cfa0d00486cb1a00 Content-Type: text/x-patch; charset=US-ASCII; name="mips-smp-fixup.patch" Content-Disposition: attachment; filename="mips-smp-fixup.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g9be665n0 SW5kZXg6IHN5cy9taXBzL3NpYnl0ZS9zYl9tYWNoZGVwLmMKPT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL21p cHMvc2lieXRlL3NiX21hY2hkZXAuYwkocmV2aXNpb24gMjA4MTgzKQorKysgc3lzL21pcHMvc2li eXRlL3NiX21hY2hkZXAuYwkod29ya2luZyBjb3B5KQpAQCAtMzQ0LDkgKzM0NCwxNiBAQAogCXJl dHVybiAoNCk7CiB9CiAKK3N0cnVjdCBjcHVfZ3JvdXAgKgorcGxhdGZvcm1fc21wX3RvcG8odm9p ZCkKK3sKKwlyZXR1cm4gKHNtcF90b3BvX25vbmUoKSk7Cit9CisKIHZvaWQKIHBsYXRmb3JtX2lu aXRfYXAo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PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9taXBzL21pcHMvbXBi b290LlMJKHJldmlzaW9uIDIwODE4MykKKysrIHN5cy9taXBzL21pcHMvbXBib290LlMJKHdvcmtp bmcgY29weSkKQEAgLTc2LDEwICs3Niw4IEBACiAKIAlQVFJfTEEJZ3AsIF9DX0xBQkVMKF9ncCkK IAotI2lmbmRlZiBUQVJHRVRfWExSX1hMUwogCWphbAlwbGF0Zm9ybV9pbml0X2FwCiAJbW92ZQlh MCwgczAKLSNlbmRpZgogCWphbAlzbXBfaW5pdF9zZWNvbmRhcnkKIAltb3ZlCWEwLCBzMAogCklu ZGV4OiBzeXMvbWlwcy9taXBzL21wX21hY2hkZXAuYwo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvbWlwcy9t aXBzL21wX21hY2hkZXAuYwkocmV2aXNpb24gMjA4MTgzKQorKysgc3lzL21pcHMvbWlwcy9tcF9t YWNoZGVwLmMJKHdvcmtpbmcgY29weSkKQEAgLTE5Niw4ICsxOTYsNyBAQAogc3RydWN0IGNwdV9n cm91cCAqCiBjcHVfdG9wbyh2b2lkKQogewotCi0JcmV0dXJuIChzbXBfdG9wb19ub25lKCkpOwor CXJldHVybiBwbGF0Zm9ybV9zbXBfdG9wbygpOwogfQogCiBpbnQKQEAgLTIzOCwxMCArMjM3LDYg QEAKIHZvaWQKIHNtcF9pbml0X3NlY29uZGFyeSh1X2ludDMyX3QgY3B1aWQpCiB7Ci0jaWZuZGVm IFRBUkdFVF9YTFJfWExTCi0JaW50IGlwaV9pbnRfbWFzaywgY2xvY2tfaW50X21hc2s7Ci0jZW5k aWYKLQogCS8qIFRMQiAqLwogCU1pcHNfU2V0V0lSRUQoMCk7CiAJTWlwc19UTEJGbHVzaChudW1f dGxiZW50cmllcyk7CkBAIC0yOTQsMTggKzI4OSw3IEBACiAJd2hpbGUgKHNtcF9zdGFydGVkID09 IDApCiAJCTsgLyogbm90aGluZyAqLwogCi0jaWZuZGVmIFRBUkdFVF9YTFJfWExTCiAJLyoKLQkg KiBVbm1hc2sgdGhlIGNsb2NrIGFuZCBpcGkgaW50ZXJydXB0cy4KLQkgKi8KLQljbG9ja19pbnRf bWFzayA9IGhhcmRfaW50X21hc2soNSk7Ci0JaXBpX2ludF9tYXNrID0gaGFyZF9pbnRfbWFzayhw bGF0Zm9ybV9pcGlfaW50cm51bSgpKTsKLQlzZXRfaW50cl9tYXNrKEFMTF9JTlRfTUFTSyAmIH4o aXBpX2ludF9tYXNrIHwgY2xvY2tfaW50X21hc2spKTsKLSNlbHNlCi0JcGxhdGZvcm1faW5pdF9h cChjcHVpZCk7Ci0jZW5kaWYKLQotCS8qCiAJICogQm9vdHN0cmFwIHRoZSBjb21wYXJlIHJlZ2lz dGVyLgogCSAqLwogCW1pcHNfd3JfY29tcGFyZShtaXBzX3JkX2NvdW50KCkgKyBjb3VudGVyX2Zy ZXEgLyBoeik7Cg== --000325565372cfa0d00486cb1a00-- From owner-freebsd-mips@FreeBSD.ORG Mon May 17 14:44:19 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 5E580106564A for ; Mon, 17 May 2010 14:44:19 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og102.obsmtp.com (exprod7og102.obsmtp.com [64.18.2.157]) by mx1.freebsd.org (Postfix) with ESMTP id 4CF578FC1A for ; Mon, 17 May 2010 14:44:18 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob102.postini.com ([64.18.6.12]) with SMTP ID DSNKS/FWQRr/TyS2+78SORwwpGDNFurWtfxx@postini.com; Mon, 17 May 2010 07:44:18 PDT Received: from p-emfe01-wf.jnpr.net (172.28.145.24) by P-EMHUB01-HQ.jnpr.net (172.24.192.35) with Microsoft SMTP Server (TLS) id 8.1.436.0; Mon, 17 May 2010 07:41:15 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe01-wf.jnpr.net ([fe80::d0d1:653d:5b91:a123%11]) with mapi; Mon, 17 May 2010 10:41:14 -0400 From: Andrew Duane To: "C. Jayachandran" , Neel Natu Date: Mon, 17 May 2010 10:41:13 -0400 Thread-Topic: Minor fixup for the MIPS SMP platform code. Thread-Index: Acr1zfIPksi6VXqFS4ahgbCopN4vfQAAMC0g Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-mips@freebsd.org" Subject: RE: Minor fixup for the MIPS SMP platform code. 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: Mon, 17 May 2010 14:44:19 -0000 A really minor nit: in sys/mips/rmi/xlr_machdep.c, you might as well put th= e assert for "Interrupts enabled" before setting the COP_2 and COP_0 bits i= n the stat register. There's no real difference of effect, the code just fe= els a bit cleaner to check for validity before setting anything else. /Andrew =20 =20 > -----Original Message----- > From: owner-freebsd-mips@freebsd.org=20 > [mailto:owner-freebsd-mips@freebsd.org] On Behalf Of C. Jayachandran > Sent: Monday, May 17, 2010 10:33 AM > To: Neel Natu > Cc: freebsd-mips@freebsd.org > Subject: Minor fixup for the MIPS SMP platform code. >=20 > The attached patch (also at=20 > http://sites.google.com/site/cjayachandran/files) > has two changes: > - moves the intr masking code to platform_init_ap, so that we=20 > can avoid the > #ifdef for XLR > - adds a platform_smp_topo() function so that platforms can=20 > define their > topology >=20 > I've also attempted to fixup sys/mips/sibyte to reflect these=20 > changes, but > it might need further work. > sys/mips/cavium also might need similar changes for SMP. >=20 > Please review and apply if the changes are okay. >=20 > Thanks, > JC. > = From owner-freebsd-mips@FreeBSD.ORG Mon May 17 14:46:27 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 3A70C106566C for ; Mon, 17 May 2010 14:46:27 +0000 (UTC) (envelope-from juli@clockworksquid.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 1A7DF8FC13 for ; Mon, 17 May 2010 14:46:26 +0000 (UTC) Received: by pwi9 with SMTP id 9so2953478pwi.13 for ; Mon, 17 May 2010 07:46:26 -0700 (PDT) Received: by 10.141.109.21 with SMTP id l21mr3746077rvm.114.1274107136259; Mon, 17 May 2010 07:38:56 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.140.247.13 with HTTP; Mon, 17 May 2010 07:38:36 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Mon, 17 May 2010 07:38:36 -0700 X-Google-Sender-Auth: nDQYBYjlE95UoWSxV7j3n-FhlDc Message-ID: To: "C. Jayachandran" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Re: Minor fixup for the MIPS SMP platform code. 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: Mon, 17 May 2010 14:46:27 -0000 On Mon, May 17, 2010 at 07:33, C. Jayachandran wrote: > The attached patch (also at > http://sites.google.com/site/cjayachandran/files) has two changes: > - moves the intr masking code to platform_init_ap, so that we can avoid the > #ifdef for XLR > - adds a platform_smp_topo() function so that platforms can define their > topology > > I've also attempted to fixup sys/mips/sibyte to reflect these changes, but > it might need further work. > sys/mips/cavium also might need similar changes for SMP. > > Please review and apply if the changes are okay. They look good to me; there's what looks like a minor style bug in hwfunc.h with the placement of the * in the platform topo function definition, but that's pretty trivial. I'll be glad to take care of committing the Octeon fixes. If Neel and Randall think it's good I guess Randall can commit it? Juli. From owner-freebsd-mips@FreeBSD.ORG Mon May 17 15:38:15 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 7E6E51065673; Mon, 17 May 2010 15:38:15 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-pz0-f181.google.com (mail-pz0-f181.google.com [209.85.222.181]) by mx1.freebsd.org (Postfix) with ESMTP id 4D4DF8FC19; Mon, 17 May 2010 15:38:15 +0000 (UTC) Received: by pzk11 with SMTP id 11so3540324pzk.28 for ; Mon, 17 May 2010 08:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=TzjoBKCGQU1Bf58z1hudotgoHcSpKv0gfI4KclesfsM=; b=XpZ/RoG/xXdNnKWI95fbGAPVu20mollgyP6LywuHOdSrunU1SPfAbR++7ZM8aFRC/L p1wsaGHP8/dbFmo6tz4H/or9O/IPEOey1pQ2B42JkD8iX2jedbtc8MG0n0+Ot7WY3lZs J1MQ5QwLtAUyTl/f9zIUwugcM9c/FGuwjmJ1M= 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; b=cVceabLQSZwpzPGGKsaD+sN9igNJC6hIF7/sURNSOIJ+ZHJmJj6+woIQFRxOrdOtym 3x4yaql56tlEJUMt8szroQDYfVTai+HXYtTW/AYCXFI2hI+U3IZ6ElOhyaIkRPPEiuye exsiz3miKUtb6AlWdsWd3xFrrVTmBZ8+QQJK4= MIME-Version: 1.0 Received: by 10.143.27.8 with SMTP id e8mr3520698wfj.332.1274110694648; Mon, 17 May 2010 08:38:14 -0700 (PDT) Received: by 10.142.172.9 with HTTP; Mon, 17 May 2010 08:38:14 -0700 (PDT) In-Reply-To: References: Date: Mon, 17 May 2010 08:38:14 -0700 Message-ID: From: Neel Natu To: "C. Jayachandran" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Re: Minor fixup for the MIPS SMP platform code. 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: Mon, 17 May 2010 15:38:15 -0000 Hi JC, Your patch looks good. Thanks for cleaning up the platform-specific code from mp_machdep.c. There are a couple of style things you might want to take care of: 1. In hwfunc.h there is an extra space after the '*' in the declaration of platform_smp_topo() 2. In platform_smp_topo() for XLR: - Values in return statements should be enclosed in parantheses. - space around binary operator '/' best Neel On Mon, May 17, 2010 at 7:33 AM, C. Jayachandran wrote: > The attached patch (also at > http://sites.google.com/site/cjayachandran/files) has two changes: > - moves the intr masking code to platform_init_ap, so that we can avoid the > #ifdef for XLR > - adds a platform_smp_topo() function so that platforms can define their > topology > > I've also attempted to fixup sys/mips/sibyte to reflect these changes, but > it might need further work. > sys/mips/cavium also might need similar changes for SMP. > > Please review and apply if the changes are okay. > > Thanks, > JC. > > From owner-freebsd-mips@FreeBSD.ORG Mon May 17 17:38:23 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 739231065676; Mon, 17 May 2010 17:38:23 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3AF108FC18; Mon, 17 May 2010 17:38:22 +0000 (UTC) Received: by pvh11 with SMTP id 11so2580592pvh.13 for ; Mon, 17 May 2010 10:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=gOzsas8Kk6IcupSyYV1oTycFHPzvKdN0BBPzDad5mrM=; b=iCVGK+r7Ct21ej4Da4ssi6HxTle/4C+7ye4IkmifolaxRSGq2S+qZfFzoFnY2D/cnL PDg+Ti1txEHLEL8oHYB4dflyWaUgJmH/0R7m/NXBUnBwCExMp1e7vRLupqhiiYJ+CEl4 baTFYb+Nx7TeWv578wnCKdoOeSvqCeXBXj9Fg= 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; b=imSawx696oz6RV5LtemAgfFI7ds1QV8KfL95epozH3DcDlwqDn2m56acrOu1b0RF5g L1cFJD274ku5kQwj/N63MqFrPeJXobJRi/mz7UAc5qQgTVNxYvs9BzqfgwH4KbFasjqe 2iSUrc5EbSht+m89R95gd8MOoLTOSkqrySCyQ= MIME-Version: 1.0 Received: by 10.141.89.8 with SMTP id r8mr3956209rvl.32.1274117902559; Mon, 17 May 2010 10:38:22 -0700 (PDT) Received: by 10.141.32.4 with HTTP; Mon, 17 May 2010 10:38:22 -0700 (PDT) In-Reply-To: References: Date: Mon, 17 May 2010 23:08:22 +0530 Message-ID: From: "C. Jayachandran" To: Neel Natu Content-Type: multipart/mixed; boundary=000e0cd138e0fbebda0486cdb051 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-mips@freebsd.org Subject: Re: Minor fixup for the MIPS SMP platform code. 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: Mon, 17 May 2010 17:38:23 -0000 --000e0cd138e0fbebda0486cdb051 Content-Type: text/plain; charset=ISO-8859-1 On Mon, May 17, 2010 at 9:08 PM, Neel Natu wrote: > Hi JC, > > Your patch looks good. Thanks for cleaning up the platform-specific > code from mp_machdep.c. > > There are a couple of style things you might want to take care of: > > 1. In hwfunc.h there is an extra space after the '*' in the > declaration of platform_smp_topo() > > 2. In platform_smp_topo() for XLR: > - Values in return statements should be enclosed in parantheses. > - space around binary operator '/' > > Looks like I've been a bit sloppy here, updated patch attached, with all the comments so far addressed. Thanks, JC. > best > Neel > > On Mon, May 17, 2010 at 7:33 AM, C. Jayachandran > wrote: > > The attached patch (also at > > http://sites.google.com/site/cjayachandran/files) has two changes: > > - moves the intr masking code to platform_init_ap, so that we can avoid > the > > #ifdef for XLR > > - adds a platform_smp_topo() function so that platforms can define their > > topology > > > > I've also attempted to fixup sys/mips/sibyte to reflect these changes, > but > > it might need further work. > > sys/mips/cavium also might need similar changes for SMP. > > > > Please review and apply if the changes are okay. > > > > Thanks, > > JC. > > > > > -- C. Jayachandran c.jayachandran@gmail.com --000e0cd138e0fbebda0486cdb051 Content-Type: application/octet-stream; name="mips-smp-fixup.patch" Content-Disposition: attachment; filename="mips-smp-fixup.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g9bk0xqp0 SW5kZXg6IHN5cy9taXBzL3NpYnl0ZS9zYl9tYWNoZGVwLmMKPT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL21p cHMvc2lieXRlL3NiX21hY2hkZXAuYwkocmV2aXNpb24gMjA4MTg5KQorKysgc3lzL21pcHMvc2li eXRlL3NiX21hY2hkZXAuYwkod29ya2luZyBjb3B5KQpAQCAtMzQ0LDkgKzM0NCwxNiBAQAogCXJl dHVybiAoNCk7CiB9CiAKK3N0cnVjdCBjcHVfZ3JvdXAgKgorcGxhdGZvcm1fc21wX3RvcG8odm9p ZCkKK3sKKwlyZXR1cm4gKHNtcF90b3BvX25vbmUoKSk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GVkID09IDApCiAJCTsgLyogbm90aGluZyAqLwogCi0jaWZuZGVmIFRBUkdFVF9YTFJfWExT CiAJLyoKLQkgKiBVbm1hc2sgdGhlIGNsb2NrIGFuZCBpcGkgaW50ZXJydXB0cy4KLQkgKi8KLQlj bG9ja19pbnRfbWFzayA9IGhhcmRfaW50X21hc2soNSk7Ci0JaXBpX2ludF9tYXNrID0gaGFyZF9p bnRfbWFzayhwbGF0Zm9ybV9pcGlfaW50cm51bSgpKTsKLQlzZXRfaW50cl9tYXNrKEFMTF9JTlRf TUFTSyAmIH4oaXBpX2ludF9tYXNrIHwgY2xvY2tfaW50X21hc2spKTsKLSNlbHNlCi0JcGxhdGZv cm1faW5pdF9hcChjcHVpZCk7Ci0jZW5kaWYKLQotCS8qCiAJICogQm9vdHN0cmFwIHRoZSBjb21w YXJlIHJlZ2lzdGVyLgogCSAqLwogCW1pcHNfd3JfY29tcGFyZShtaXBzX3JkX2NvdW50KCkgKyBj b3VudGVyX2ZyZXEgLyBoeik7Cg== --000e0cd138e0fbebda0486cdb051-- From owner-freebsd-mips@FreeBSD.ORG Mon May 17 21:04: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 9D1F11065675; Mon, 17 May 2010 21:04:18 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 2DE4F8FC08; Mon, 17 May 2010 21:04:18 +0000 (UTC) Received: from mobile-166-129-180-182.mycingular.net (mobile-166-129-180-182.mycingular.net [166.129.180.182] (may be forged)) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o4HL46PW042786 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 17 May 2010 17:04:14 -0400 (EDT) (envelope-from rrs@lakerest.net) Message-Id: <895F98F0-ED84-4F68-898B-F88BE014633F@lakerest.net> From: Randall Stewart To: Neel Natu In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Mon, 17 May 2010 14:03:34 -0700 References: X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: Minor fixup for the MIPS SMP platform code. 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: Mon, 17 May 2010 21:04:18 -0000 Neel: I will make sure I get this fixed when I commit it tonight.. Thanks for your comments ;-) R On May 17, 2010, at 8:38 AM, Neel Natu wrote: > Hi JC, > > Your patch looks good. Thanks for cleaning up the platform-specific > code from mp_machdep.c. > > There are a couple of style things you might want to take care of: > > 1. In hwfunc.h there is an extra space after the '*' in the > declaration of platform_smp_topo() > > 2. In platform_smp_topo() for XLR: > - Values in return statements should be enclosed in parantheses. > - space around binary operator '/' > > best > Neel > > On Mon, May 17, 2010 at 7:33 AM, C. Jayachandran > wrote: >> The attached patch (also at >> http://sites.google.com/site/cjayachandran/files) has two changes: >> - moves the intr masking code to platform_init_ap, so that we can >> avoid the >> #ifdef for XLR >> - adds a platform_smp_topo() function so that platforms can define >> their >> topology >> >> I've also attempted to fixup sys/mips/sibyte to reflect these >> changes, but >> it might need further work. >> sys/mips/cavium also might need similar changes for SMP. >> >> Please review and apply if the changes are okay. >> >> Thanks, >> JC. >> >> > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Mon May 17 21:04:42 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 EAD1E1065678; Mon, 17 May 2010 21:04:42 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 78FE98FC18; Mon, 17 May 2010 21:04:42 +0000 (UTC) Received: from mobile-166-129-180-182.mycingular.net (mobile-166-129-180-182.mycingular.net [166.129.180.182] (may be forged)) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o4HL46PX042786 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 17 May 2010 17:04:40 -0400 (EDT) (envelope-from rrs@lakerest.net) Message-Id: <728CDFF3-7EB8-4618-8805-EFD991ADCBC8@lakerest.net> From: Randall Stewart To: "C. Jayachandran" In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Mon, 17 May 2010 14:04:24 -0700 References: X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: Minor fixup for the MIPS SMP platform code. 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: Mon, 17 May 2010 21:04:43 -0000 JC: Give me a few hours and I will get it in.. need to finish my work day first ;-0 R On May 17, 2010, at 10:38 AM, C. Jayachandran wrote: > On Mon, May 17, 2010 at 9:08 PM, Neel Natu wrote: > Hi JC, > > Your patch looks good. Thanks for cleaning up the platform-specific > code from mp_machdep.c. > > There are a couple of style things you might want to take care of: > > 1. In hwfunc.h there is an extra space after the '*' in the > declaration of platform_smp_topo() > > 2. In platform_smp_topo() for XLR: > - Values in return statements should be enclosed in parantheses. > - space around binary operator '/' > > > Looks like I've been a bit sloppy here, updated patch attached, with > all the comments so far addressed. > > Thanks, > JC. > > > best > Neel > > On Mon, May 17, 2010 at 7:33 AM, C. Jayachandran > wrote: > > The attached patch (also at > > http://sites.google.com/site/cjayachandran/files) has two changes: > > - moves the intr masking code to platform_init_ap, so that we can > avoid the > > #ifdef for XLR > > - adds a platform_smp_topo() function so that platforms can define > their > > topology > > > > I've also attempted to fixup sys/mips/sibyte to reflect these > changes, but > > it might need further work. > > sys/mips/cavium also might need similar changes for SMP. > > > > Please review and apply if the changes are okay. > > > > Thanks, > > JC. > > > > > > > > -- > C. Jayachandran c.jayachandran@gmail.com > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct)