Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp440965ybl; Wed, 4 Dec 2019 05:24:34 -0800 (PST) X-Google-Smtp-Source: APXvYqx+kQUUuUkZQRbIRenDLzIIgajojt9QUizr4nkGLuoQuy9IPSrQ3IoRb/TSJJ1aS1bgHJ1x X-Received: by 2002:a05:6830:1116:: with SMTP id w22mr2466345otq.216.1575465873824; Wed, 04 Dec 2019 05:24:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575465873; cv=none; d=google.com; s=arc-20160816; b=KJDVPHTh9/lNkQCxIPx5Uxnu3V4pmzxpPcP4R6NJIpcbZxZfuh7Mo8pJSvU2+aR/vC dGbno8i31cjjtD2WsmhvJ/uvDXTnPKvOq3VTqm5N/LEITDQbQYpvyqewUpFpD/X0ZKVx QtMNisRasoFwFvv0iAixNFWRFJjBbHIjB9EVhpYQYAh3n6aKoMaxO2PjJ3eALDAV0HDD XOloddEO4j7rJfrPRYllt09fEVlpEyoAUsIFeaB3bjTUTVnmZLlcFN/wsK5EBdhJQ5J0 1B/knzo7nCeSozxhI01JBloAfFNgvdfL0n9bIEx0BaJf+Z4TjgMlQUwlWstBGUN65zGP 75Qw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wZJOF5sLAkP6Lj5JLT4j1oHbVGDdAKwvCkWIUq+dheE=; b=bqFrR2OJDKc3Cz3FyrhBFXk7NFrvT4A8N0PvOk31uX2J+/3eYGT6pt9RZbl3AFT8gx h2z2VJJ1Y8Cdo68DDX5x+nJFD90kvFJ0PA/LPKPw0Xgucdl0Oz2VAAm6NQHbgIjP7YxY AdolNuxSHTD3O+nRH3wfis0y2yJzxQcVCxtsNJYc1C/HWchxWktYuhQYHqqJRa+k5hiD wSuorlNXrXDDND/76qhBZ4glLQtYURiccX9d3pYx6DUyvT0xXmuLR/KvoS9j9QQ42r9w lHA2sHMivndSZbkgsjnwyKviEXWnZJWCBUn8wl3eXxabdqxb7vm8igaDfTAopvmM5ODf Ss1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pyRyiRJs; 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 y22si2573704oti.269.2019.12.04.05.24.20; Wed, 04 Dec 2019 05:24:33 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pyRyiRJs; 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 S1727869AbfLDNWc (ORCPT + 99 others); Wed, 4 Dec 2019 08:22:32 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:32891 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727503AbfLDNWc (ORCPT ); Wed, 4 Dec 2019 08:22:32 -0500 Received: by mail-pf1-f195.google.com with SMTP id y206so3666328pfb.0; Wed, 04 Dec 2019 05:22:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wZJOF5sLAkP6Lj5JLT4j1oHbVGDdAKwvCkWIUq+dheE=; b=pyRyiRJsR/LSFSgykNDNtWvgkjb/xDhjdWYPO4bvDoYwIrAiXaC8Q9Mfe1qKKmYaYR JGPz6eDAEudYkUKAeATKN7m8fsMYj1DteNEskTvJFGYJ/At5faDtqSL/RU12cSxucLnA RrbwncZHxyOUZ6HvOlL/m+ImhQucJU7j0tMmCXkom+JkJkQJJcg0/2JiLLTYBFhrYNX2 ZRhSs1k59HQ9adQyGfpYEk2vMSekJHU9onLCDZyH8bdnlj6UzaUbsTkXclR6XB+ik+1m dflGFJf6R4P6X7Ct5JDhiuAiIqObkM0FdrlxMLHxzgMiyfo83v/ANwBZVNjQ358K8BkO TxiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wZJOF5sLAkP6Lj5JLT4j1oHbVGDdAKwvCkWIUq+dheE=; b=jflCQXiOv7+nLXKn1YlY6cF/4OqdpBthPswq6VHKIaxAwDlJpdprXoIJzwO9m3X3+p jzgDBL915P4/P9r76qeVC2f1GC8TXvq5n68Le1DgRE1sam8IcwekcYxWVBxLF+4nIB3N qRwDdlvva5fFi5anU6oi1oJnYZCND0SIpXYlmymLqJ+WTE9wRW/t/l3omc0zSqLyfFTl w+uOuteupy4o7BJQ3KAvr8vBq8MULKPylUvgqdDxArRDrm/cRXLbROSFiwVPofMzcGaQ vwfIFNBGmKI/ddEQ05vWsCX8mmDWJ7qm6IvBdrjZx3oi229htzJTxhfHi3uwRRNGdHsb 4mmA== X-Gm-Message-State: APjAAAUt/VA/InQSXCCx1aN6R0x1dowIFVxiV7nGvnSi/mJzxjJQmE79 tyVC5viUDx34xRjkVgrwnIjONQFq X-Received: by 2002:aa7:8ad3:: with SMTP id b19mr3489646pfd.134.1575465751097; Wed, 04 Dec 2019 05:22:31 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id s7sm7911105pfe.22.2019.12.04.05.22.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Dec 2019 05:22:30 -0800 (PST) Subject: Re: [PATCH v6 10/18] sh/tlb: Convert SH to generic mmu_gather To: Geert Uytterhoeven , 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 References: <20190219103148.192029670@infradead.org> <20190219103233.443069009@infradead.org> <20191204104733.GR2844@hirez.programming.kicks-ass.net> From: Guenter Roeck Message-ID: <156fa92f-4c5a-08bd-bcda-20029724c0de@roeck-us.net> Date: Wed, 4 Dec 2019 05:22:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/4/19 4:32 AM, Geert Uytterhoeven wrote: > 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. > Guess that explains why I do not see the problem with my qemu boots. I use rts7751r2dplus_defconfig. Is it possible to reproduce the problem with qemu ? I don't think so, but maybe I am missing something. Guenter >>> 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 >