From owner-freebsd-current@freebsd.org Mon Aug 6 18:27:27 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84E2010612FE for ; Mon, 6 Aug 2018 18:27:27 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38347832A3; Mon, 6 Aug 2018 18:27:27 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id C8EF6C62C; Mon, 6 Aug 2018 18:27:26 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f181.google.com with SMTP id r13-v6so11361796ljg.10; Mon, 06 Aug 2018 11:27:26 -0700 (PDT) X-Gm-Message-State: AOUpUlEngrjeJxhxfIuFcmKLsKoPP47FfQgPuk4z6ue1kXVChE/Jh8Rh ulYD2xvU3NhC26IHuQGWOAvmEKn0qmDPmqe8ryQ= X-Google-Smtp-Source: AA+uWPyvpXl8fuw6l0dd/QAnXEwfFoRaFKjNQQelJslFiDfSl33lZr9Yet2SndvfLhnTybLSL5dSSWGW6hr99lNMZJc= X-Received: by 2002:a2e:8617:: with SMTP id a23-v6mr193152lji.43.1533580045410; Mon, 06 Aug 2018 11:27:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Mon, 6 Aug 2018 11:27:04 -0700 (PDT) In-Reply-To: <20180805104341.GX6049@kib.kiev.ua> References: <20180804083720.GJ6049@kib.kiev.ua> <20180805104341.GX6049@kib.kiev.ua> From: Kyle Evans Date: Mon, 6 Aug 2018 13:27:04 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: panic: mutex pmap not owned at ... efirt_machdep.c:255 To: Konstantin Belousov Cc: freebsd-current Current , Eitan Adler Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 18:27:27 -0000 On Sun, Aug 5, 2018 at 5:43 AM, Konstantin Belousov wrote: > On Sat, Aug 04, 2018 at 09:46:39PM -0500, Kyle Evans wrote: >> >> He now gets a little further, but ends up with the same panic due to >> efirtc_probe trying to get time to verify the rtc's actually >> implemented. What kind of approach must we take to ensure curcpu is >> synced? > > It does not panic for me, when I load efirt.ko from the loader prompt. > Anyway, try this Right, I also don't get a panic on any of my machines from this. Hopefully he'll have a chance to try this soon. > diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c > index 572b2197453..f84f56b98e2 100644 > --- a/sys/amd64/amd64/pmap.c > +++ b/sys/amd64/amd64/pmap.c > @@ -2655,7 +2655,7 @@ pmap_pinit0(pmap_t pmap) > __pcpu[i].pc_ucr3 = PMAP_NO_CR3; > } > } > - PCPU_SET(curpmap, kernel_pmap); > + PCPU_SET(curpmap, pmap); > pmap_activate(curthread); > CPU_FILL(&kernel_pmap->pm_active); > }