From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v6 10/18] sh/tlb: Convert SH to generic mmu_gather Date: Wed, 4 Dec 2019 11:47:33 +0100 Message-ID: <20191204104733.GR2844@hirez.programming.kicks-ass.net> References: <20190219103148.192029670@infradead.org> <20190219103233.443069009@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Geert Uytterhoeven Cc: Will Deacon , "Aneesh Kumar K.V" , Andrew Morton , Nicholas Piggin , Linux-Arch , Linux MM , Linux Kernel Mailing List , Russell King , Heiko Carstens , Rik van Riel , Yoshinori Sato , Rich Felker , Linux-sh list , Guenter Roeck List-Id: linux-arch.vger.kernel.org On Tue, Dec 03, 2019 at 12:19:00PM +0100, Geert Uytterhoeven wrote: > Hoi Peter, > > On Tue, Feb 19, 2019 at 11:35 AM Peter Zijlstra wrote: > > Generic mmu_gather provides everything SH needs (range tracking and > > cache coherency). > > > > Cc: Will Deacon > > Cc: "Aneesh Kumar K.V" > > Cc: Andrew Morton > > Cc: Nick Piggin > > Cc: Yoshinori Sato > > Cc: Rich Felker > > Signed-off-by: Peter Zijlstra (Intel) > > I got remote access to an SH7722-based Migo-R again, which spews a long > sequence of BUGs during userspace startup. I've bisected this to commit > c5b27a889da92f4a ("sh/tlb: Convert SH to generic mmu_gather"). Whoopsy.. also, is this really the first time anybody booted an SH kernel in over a year ?!? > Do you have a clue? Does the below help? diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h index 22d968bfe9bb..73a2c00de6c5 100644 --- a/arch/sh/include/asm/pgalloc.h +++ b/arch/sh/include/asm/pgalloc.h @@ -36,9 +36,8 @@ do { \ #if CONFIG_PGTABLE_LEVELS > 2 #define __pmd_free_tlb(tlb, pmdp, addr) \ do { \ - struct page *page = virt_to_page(pmdp); \ - pgtable_pmd_page_dtor(page); \ - tlb_remove_page((tlb), page); \ + pgtable_pmd_page_dtor(pmdp); \ + tlb_remove_page((tlb), (pmdp)); \ } while (0); #endif From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from merlin.infradead.org ([205.233.59.134]:59866 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727268AbfLDKtS (ORCPT ); Wed, 4 Dec 2019 05:49:18 -0500 Date: Wed, 4 Dec 2019 11:47:33 +0100 From: Peter Zijlstra Subject: Re: [PATCH v6 10/18] sh/tlb: Convert SH to generic mmu_gather Message-ID: <20191204104733.GR2844@hirez.programming.kicks-ass.net> References: <20190219103148.192029670@infradead.org> <20190219103233.443069009@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Geert Uytterhoeven Cc: Will Deacon , "Aneesh Kumar K.V" , Andrew Morton , Nicholas Piggin , Linux-Arch , Linux MM , Linux Kernel Mailing List , Russell King , Heiko Carstens , Rik van Riel , Yoshinori Sato , Rich Felker , Linux-sh list , Guenter Roeck Message-ID: <20191204104733.Bg_dnr5-L__qtY5u5Xl4TOBMfwecaRR9GkAWnC6o7Wk@z> On Tue, Dec 03, 2019 at 12:19:00PM +0100, Geert Uytterhoeven wrote: > Hoi Peter, > > On Tue, Feb 19, 2019 at 11:35 AM Peter Zijlstra wrote: > > Generic mmu_gather provides everything SH needs (range tracking and > > cache coherency). > > > > Cc: Will Deacon > > Cc: "Aneesh Kumar K.V" > > Cc: Andrew Morton > > Cc: Nick Piggin > > Cc: Yoshinori Sato > > Cc: Rich Felker > > Signed-off-by: Peter Zijlstra (Intel) > > I got remote access to an SH7722-based Migo-R again, which spews a long > sequence of BUGs during userspace startup. I've bisected this to commit > c5b27a889da92f4a ("sh/tlb: Convert SH to generic mmu_gather"). Whoopsy.. also, is this really the first time anybody booted an SH kernel in over a year ?!? > Do you have a clue? Does the below help? diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h index 22d968bfe9bb..73a2c00de6c5 100644 --- a/arch/sh/include/asm/pgalloc.h +++ b/arch/sh/include/asm/pgalloc.h @@ -36,9 +36,8 @@ do { \ #if CONFIG_PGTABLE_LEVELS > 2 #define __pmd_free_tlb(tlb, pmdp, addr) \ do { \ - struct page *page = virt_to_page(pmdp); \ - pgtable_pmd_page_dtor(page); \ - tlb_remove_page((tlb), page); \ + pgtable_pmd_page_dtor(pmdp); \ + tlb_remove_page((tlb), (pmdp)); \ } while (0); #endif