Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp389257ybl; Wed, 4 Dec 2019 04:34:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwxRbeTpT7S8enGQlqpg3kmnUzdBh05EIaW8/FEVkkCNnQ4HZHp3aV7QyUpB0AubftSBeZU X-Received: by 2002:a05:6830:10a:: with SMTP id i10mr2108900otp.365.1575462862463; Wed, 04 Dec 2019 04:34:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575462862; cv=none; d=google.com; s=arc-20160816; b=rvxwj+SrbN0H1Tj9tjMAPbQtmBruib6Rb9YZTe15NknAoJD5GvC3VMCNn1OL+hkFlA dMhPx06Fvcu07dqy0F+aVqt92oGj5VarkP4VzCCYzU1UcDrYC++h/1Gvm4aWz/7tPUwp NleYQpd8ao86uP6WId/L+8wCdYDq+2ofHAIUyF9JdDPfdXigTFNK9Q0B6MpcFTBD3YNe XV+aq2iTldoyQ6Qo8yoLairN5Wf1fT4gfWgdvS6hmvHUB6qIBUmPCwh4fgJQzqeQM9YM yQ8o+0NGguuLVKx1vBPDgc4j1o9yK+CounCi68y00gAOhJsxu8ljvaX3h/hNrgT+lkYx /DWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=6Yy3yzDNXF9KUBwgKP/JkAivrUVjZjxiknElvLUOMco=; b=bsxqyj3hyTjeuy306RYR32LMalH1792J4cMftpHlDfZAXjofPemu8goZxOo2rXWIPA wzECE549NQ5XmKMTGRzI6YfXdUrhpeTSs0V6x0QM3lhIh6mC6jRT6HGVMTvFHcUFSnXR O8i42jKMAMWif2JcVMdMSXkuUMPQlCDG+MrLBuE/nRRF1hwvJ0ysbOu6KwQvYhS+D/Zq CJ2D4IXrN115sPy2r7M6jBT2hb6KFwP+maXrqvW4rHb+X1/0GBhyaQkv/qtZ9WmaIfOY 9i957MTnVml8v5a8nR0qsBMVQmY2oDsGn/UvCfiT9tPDeOpF+Q931WW48fYRAZMX1G8x 1VQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o15si2950485otk.221.2019.12.04.04.34.10; Wed, 04 Dec 2019 04:34:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727850AbfLDMdV convert rfc822-to-8bit (ORCPT + 99 others); Wed, 4 Dec 2019 07:33:21 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:45354 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbfLDMdV (ORCPT ); Wed, 4 Dec 2019 07:33:21 -0500 Received: by mail-oi1-f195.google.com with SMTP id v10so4597557oiv.12; Wed, 04 Dec 2019 04:33:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=S0UWQ5eiPole4dtyMpW+QWxdEfHVw9PtKgJf/N5G9BE=; b=SonrTHC0vp7Sgvtcx4CF3OKoS2va/b1Qcq7FYck7P2eQIFF19+VITPX511q2sKk26I qTzToMfleDujWMCFeSusEjeGAUpQ/9eMGYmiNr++UhC3swkJ6OUXIRXakQOajp7+Xcz4 kP1h4HI9rT0cBTu/Yj38v2hUP3bxNQwiKeGZ6QWordh9i4IX6iTWTPcIeITnrWjomlyQ KYzOmsU6ut7sOVkStBDoDTmHCZQnHBV892u4jUZmvuoMJqPHWNzBeJHswsyoSltLIhEO XRohnK4aFMZX+rSIL0ODpM6kCii7cwzxSxDi1yunwX+ZxZ/SX4aXth6CA5ss299eLStp Kgig== X-Gm-Message-State: APjAAAXeoMexw2L4p4g1Q4VZwcjCQinlLQSsBxo0xonglcqpoESDIjMc PIfyArQRPa4BbfC3L+X86nPao5r++wC3vXm6pVM= X-Received: by 2002:aca:36c5:: with SMTP id d188mr2423967oia.54.1575462799999; Wed, 04 Dec 2019 04:33:19 -0800 (PST) MIME-Version: 1.0 References: <20190219103148.192029670@infradead.org> <20190219103233.443069009@infradead.org> <20191204104733.GR2844@hirez.programming.kicks-ass.net> In-Reply-To: <20191204104733.GR2844@hirez.programming.kicks-ass.net> From: Geert Uytterhoeven Date: Wed, 4 Dec 2019 13:32:58 +0100 Message-ID: Subject: Re: [PATCH v6 10/18] sh/tlb: Convert SH to generic mmu_gather To: Peter Zijlstra 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hoi Peter, On Wed, Dec 4, 2019 at 11:48 AM Peter Zijlstra wrote: > On Tue, Dec 03, 2019 at 12:19:00PM +0100, Geert Uytterhoeven wrote: > > 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 ?!? Nah, but the v5.4-rc3 I booted recently on qemu -M r2d had CONFIG_PGTABLE_LEVELS=2, so it didn't show the problem. > > Do you have a clue? > > Does the below help? Unfortunately not. > 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); \ expected ‘struct page *’ but argument is of type ‘pmd_t * {aka struct *}’ > + tlb_remove_page((tlb), (pmdp)); \ likewise > } while (0); > #endif Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds