From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7FB6C71153 for ; Mon, 4 Sep 2023 17:44:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350984AbjIDRoo (ORCPT ); Mon, 4 Sep 2023 13:44:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbjIDRol (ORCPT ); Mon, 4 Sep 2023 13:44:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A56AAAF; Mon, 4 Sep 2023 10:44:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 39FF760FFB; Mon, 4 Sep 2023 17:44:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF822C433C7; Mon, 4 Sep 2023 17:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693849475; bh=YvrmulUiFFn/NobkUjd6sOl1dt0QMsFH5NPz/lhd9Ak=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DUaW/2wfixpVSCoxOkzamyqusPm1ayWPvKAYivsybGuMUieEjwCwHuqEdL4Fpo6wb eRjw2NElkfQ7PdK+XJE4HU08dbDA4KF6yUkGnvgWB7/mA0Ity95eh6TzeR6ue8oJw1 OIlqHYVBg8XuTINrjEMJCZ4SdNmfbM2l7mrx7Q0jFDmTsI0Rf0JcO1GyvwESkcNy4C Z/Z9QBNFBIH+cY2eorlfSTYf8IzBOB7DXKlGoVoVZ394DHjQK7eZVJq1uMjp2UV6GR kWTGzghngoM1U9neksj/nvyCwv3fIuzqR03RrQDsEKyDLhMMfKp4k1h6gWzWEw4taO scTpMEFunrAkA== Date: Mon, 4 Sep 2023 20:43:50 +0300 From: Mike Rapoport To: Guenter Roeck Cc: "Matthew Wilcox (Oracle)" , Andrew Morton , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org Subject: Re: [PATCH v6 26/38] sparc64: Implement the new page table range API Message-ID: <20230904174350.GF3223@kernel.org> References: <20230802151406.3735276-1-willy@infradead.org> <20230802151406.3735276-27-willy@infradead.org> <2513a500-920d-4e32-8231-f428175c7182@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2513a500-920d-4e32-8231-f428175c7182@roeck-us.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 04, 2023 at 08:36:44AM -0700, Guenter Roeck wrote: > Hi, > > On Wed, Aug 02, 2023 at 04:13:54PM +0100, Matthew Wilcox (Oracle) wrote: > > Add set_ptes(), update_mmu_cache_range(), flush_dcache_folio() and > > flush_icache_pages(). Convert the PG_dcache_dirty flag from being > > per-page to per-folio. > > > > Signed-off-by: Matthew Wilcox (Oracle) > > Acked-by: Mike Rapoport (IBM) > > Cc: "David S. Miller" > > Cc: sparclinux@vger.kernel.org > > This patch causes all my sparc64 qemu boot tests to crash. > > [ 4.890744] Unable to handle kernel NULL pointer dereference > [ 4.891273] tsk->{mm,active_mm}->context = 0000000000000001 > [ 4.891475] tsk->{mm,active_mm}->pgd = fffff80005452000 > [ 4.891660] \|/ ____ \|/ > [ 4.891660] "@'/ .. \`@" > [ 4.891660] /_| \__/ |_\ > [ 4.891660] \__U_/ > [ 4.892116] modprobe(45): Oops [#1] > [ 4.892555] CPU: 0 PID: 45 Comm: modprobe Tainted: G N 6.5.0+ #1 > [ 4.892949] TSTATE: 0000004411001601 TPC: 00000000004565d8 TNPC: 00000000004565dc Y: 00000008 Tainted: G N ... > [ 4.901535] note: modprobe[45] exited with preempt_count 2 This should fix it: >From 8181d1f582a309b51fe4cb02a783628257b91c86 Mon Sep 17 00:00:00 2001 From: "Mike Rapoport (IBM)" Date: Mon, 4 Sep 2023 20:37:59 +0300 Subject: [PATCH] sparc64: add missing initialization of folio in tlb_batch_add() Commit 1a10a44dfc1d ("sparc64: implement the new page table range API") missed initialization of folio variable in tlb_batch_add() which causes boot tests to crash. Add missing initialization. Reported-by: Guenter Roeck Fixes: 1a10a44dfc1d ("sparc64: implement the new page table range API") Signed-off-by: Mike Rapoport (IBM) --- arch/sparc/mm/tlb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c index 0d41c94ec3ac..b44d79d778c7 100644 --- a/arch/sparc/mm/tlb.c +++ b/arch/sparc/mm/tlb.c @@ -128,6 +128,7 @@ void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, goto no_cache_flush; /* A real file page? */ + folio = page_folio(page); mapping = folio_flush_mapping(folio); if (!mapping) goto no_cache_flush; -- 2.39.2 > Guenter > -- Sincerely yours, Mike.