From owner-freebsd-mips@FreeBSD.ORG Thu Jul 1 16:55:24 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 68D361065672; Thu, 1 Jul 2010 16:55:24 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id F23098FC14; Thu, 1 Jul 2010 16:55:23 +0000 (UTC) Received: by qwg5 with SMTP id 5so950995qwg.13 for ; Thu, 01 Jul 2010 09:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=8gIi4ZSG9oeQJDLeb77ewnOvq3a/tqg+m/zHWFAKIms=; b=Zrf71bJ9CmP/UUmxcGEEFiRCOI18RQIbWd+d/aDuzoCut+3Mf+yS/GePPx7uhoOtUN sjmfFvBU36hyCQxHxyLHQIZz5pcfbbzhdC6Mo1Yn/pF0vJw1XCaRk2yKAvSdH54UNuOD Zm2uvvyaKBuP9PfbttjMojR9bgV5ATXgy4K8M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=YztA59fTeEC3sdzg1sY+IesYniExa7BxNwGcMw0SyLZQCmmSplzSEv9LUIBLXFc/YB kCMOXKjadV3+VPxfaiVi1vpMffvlVA5uhYpBBy++gFZYU0f3N7zYDOSlcBdISqGRjs5T Gg9Cmvir2Z66nHDsP4RzQ1EArvVAurAxG/trY= Received: by 10.224.88.131 with SMTP id a3mr7697618qam.225.1278003311656; Thu, 01 Jul 2010 09:55:11 -0700 (PDT) Received: from [192.168.0.86] ([187.39.15.144]) by mx.google.com with ESMTPS id c35sm33742213qco.36.2010.07.01.09.55.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 09:55:10 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Luiz Otavio O Souza In-Reply-To: Date: Thu, 1 Jul 2010 13:55:05 -0300 Content-Transfer-Encoding: quoted-printable Message-Id: <7886D15B-79BF-4BC6-8467-26A8D0FE3D00@gmail.com> References: <897604F6-95C4-49A8-B11F-277A74C8DBAE@gmail.com> <3C0AEF9B-AE0C-4459-A4E1-2C8C30C10FD6@gmail.com> <25B9A19D-0A6B-4731-8FB1-A2C6722F0E9C@gmail.com> To: Jayachandran C. X-Mailer: Apple Mail (2.1081) Cc: freebsd-mips@freebsd.org Subject: Re: Merging 64 bit changes to -HEAD 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: Thu, 01 Jul 2010 16:55:24 -0000 On Jun 30, 2010, at 7:40 PM, Jayachandran C. wrote: > On Wed, Jun 30, 2010 at 10:38 PM, Luiz Otavio O Souza > wrote: >> On Jun 30, 2010, at 9:57 AM, Jayachandran C. wrote: >>=20 >>> On Tue, Jun 29, 2010 at 10:32 PM, Luiz Otavio O Souza >>> wrote: >>>>=20 >>>> On Jun 29, 2010, at 8:02 AM, Jayachandran C. wrote: >>>>=20 >>>>> On Tue, Jun 29, 2010 at 2:28 AM, Luiz Otavio O Souza = wrote: >>>>>>> Thanks for the the update. Looks like pmap_map for kernel is = failing, >>>>>>> may be the new tlb_update code causes this. Can you apply the >>>>>>> attached patch and see if the problem still persists, it = replaces the >>>>>>> new tlb_update code with the older version. >>>>>>>=20 >>>>>>> Obviously not a fix, but if we can narrow it down to this = function, >>>>>>> fixing will be easier. >>>>>>>=20 >>>>>>> JC. >>>>>>> >>>>>>=20 >>>>>> JC, >>>>>>=20 >>>>>> This fix the problem ! Thanks ! Now, at least, you know where to = look :) >>>>>=20 >>>>> The new tlb_update does not seem to update the tlb entry if the = tlbp >>>>> fails. Here's a patch that should make the new function behave = like >>>>> the older one. The patch is in attached file 'tlb-update.diff'. >>>>>=20 >>>>> If that does not work, I'm not sure what the issue is. You could = also >>>>> try try the nop-change.diff attached. It tries to switch the ssnop >>>>> used for delay in the new code with 'nop' which was used by the = old >>>>> code. >>>>>=20 >>>>> Thanks, >>>>> JC. >>>>> >>>>=20 >>>> JC, >>>>=20 >>>> The nop-change seems to have no effect at all and with the = tlb-update patch the kernel apparently crash at bzero(), here is the = dmesg with TRAP_DEBUG enabled: >>>>=20 >>>> http://mips.pastebin.com/jydPvJ20 >>>>=20 >>>> So hopefully you are on the right track and this may be something = obvious to you. >>>=20 >>> Not yet :) I really hoped the earlier change would fix it. The = number >>> of nop does not seem to be the issue as it is higher in the C code >>> than the assembly. >>>=20 >>> Can you try the attached patch (try.diff) - this re-implements the >>> assembly code functionality almost in the same way in C. This = really >>> should work, given that the patch which made it assembly worked... >>>=20 >>> If that works can you see if the second attached patch works, this >>> fixes a potential problem (ie, we should be masking 13bits for = TLBHI). >>>=20 >>> Both patches should apply directly to SVN (not dependent on each >>> other, or on previous patches) >>>=20 >>> Thanks again, >>> JC. >>> >>=20 >>=20 >> JC, >>=20 >> The try.diff works with or without the pte.h change (at least for a = simple boot) and the pte.h change does nothing without the try.diff. >=20 > I've attached the final(final.diff) version I want to check-in, can > you please quickly test it? >=20 > If that does not work, can you tell me if the attached alt1.diff or > alt2.diff works? The try.diff had three changes: handle case of > index>0, remove pagemask operation, restore full entryhi instead of > asid. So if the first does not work, this will help narrow down the > rest of the cases. >=20 > Hopefully this is the last iteration :) >=20 > JC. > JC, The final.diff and alt1.diff crash (into debugger) like the first = try.diff (here is the dmesg: http://pastebin.com/r2uunZPZ). The alt2.diff works, i'll try it a little more (buildworld). Feel free to send more tests if needed. Thanks, Luiz=