Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1295862iob; Thu, 12 May 2022 16:06:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdU14Q/io0KXiOpJGl7FYG71ILyZ1ZVG72mV4VF80yiQu5oEzBepE/9lqIyk4DwzQ4ifXI X-Received: by 2002:a05:6402:128b:b0:425:d1d7:b321 with SMTP id w11-20020a056402128b00b00425d1d7b321mr37051061edv.179.1652396775569; Thu, 12 May 2022 16:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652396775; cv=none; d=google.com; s=arc-20160816; b=h2DVD8itz6W9zZpTGDaIEysDjHuJR9JZmHEcYAwKQSoQNmvUFahcKuQcET0OqQhyFY Dnl7EsCQmCjoDNjxl5exuSDmESGPWz0R+kuX98YHEDaZrnTb77RZnfyc3Q+/+ZkKQHph Bz8rOSiw9VoxysoEwr0CL2qGWHyr064sWJDHtHQDuukbKs3Rzu4wlw7xFRg+dfKn4ilX 9EBTyQzxTi/cFVZNH8TjQ4wad3/MnMeVNXjGbyG+4RPw2RjARt699+jrCD2aO4vTa5pm IB3e4hROaYxZ9xzrasVNsF2JmfZGyVRQDKW/HHJU2VHxdvFv8j/2OLnr3tu7e6uSbhUA Fuog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=mPh88cvGowjaNsZqFgVwOZnM2glfpFafcKim9qCY+JA=; b=pd/ttJFFn2yfgNvq5kC5jRZHJXSz3Qy5chyxViJDtMyO6fGsSyh4j6cqcnVDILSBth 8gvpx2HKyDkwRFdkkaZi3qb4smBO2TN+J7tcpn/ctBE2ymrv1z5yNbp/Ksd/IZi9X5ms 5OVGPd3Q6ADQ1mk4qHHz6rfckAFVGIZiSR+hjMf6sDwBpOitnPVuQJiKH2E9By/rrV6o KO8WIed9HJvciz56vPYEZcz6t9/5V1ODtIrbI3dhpTMLUflZ/ECcn5SgVPcvgziOWHts NE3XwHmcXgqcn/aK/V7yZ/3Drnj3myoNf8srg/NRBhr+4kTLeY+Rbi7snnYmDv0rqDiJ b3lA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp19-20020a1709071b1300b006df76385dd3si603098ejc.627.2022.05.12.16.05.50; Thu, 12 May 2022 16:06:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354405AbiELN23 (ORCPT + 99 others); Thu, 12 May 2022 09:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354384AbiELN20 (ORCPT ); Thu, 12 May 2022 09:28:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 158395FF1B; Thu, 12 May 2022 06:28:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 993EA60F47; Thu, 12 May 2022 13:28:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7451DC34114; Thu, 12 May 2022 13:28:22 +0000 (UTC) Date: Thu, 12 May 2022 14:28:18 +0100 From: Catalin Marinas To: Baolin Wang Cc: Stephen Rothwell , Andrew Morton , Will Deacon , Anshuman Khandual , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build failure after merge of the mm tree Message-ID: References: <20220512193855.4f6ce32f@canb.auug.org.au> <188f7cb2-ba21-a53a-828d-7242b17b0c72@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <188f7cb2-ba21-a53a-828d-7242b17b0c72@linux.alibaba.com> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 12, 2022 at 07:13:18PM +0800, Baolin Wang wrote: > On 5/12/2022 7:07 PM, Catalin Marinas wrote: > > On Thu, May 12, 2022 at 07:38:55PM +1000, Stephen Rothwell wrote: > > > After merging the mm tree, today's linux-next build (arm64 defconfig) > > > failed like this: > > > > > > arch/arm64/mm/hugetlbpage.c: In function 'huge_ptep_clear_flush': > > > arch/arm64/mm/hugetlbpage.c:493:16: error: implicit declaration of function 'get_clear_flush'; did you mean 'ptep_clear_flush'? [-Werror=implicit-function-declaration] > > > 493 | return get_clear_flush(vma->vm_mm, addr, ptep, pgsize, ncontig); > > > | ^~~~~~~~~~~~~~~ > > > | ptep_clear_flush > > > arch/arm64/mm/hugetlbpage.c:493:16: error: incompatible types when returning type 'int' but 'pte_t' was expected > > > 493 | return get_clear_flush(vma->vm_mm, addr, ptep, pgsize, ncontig); > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > arch/arm64/mm/hugetlbpage.c:494:1: error: control reaches end of non-void function [-Werror=return-type] > > > 494 | } > > > | ^ > > > > > > Caused by commit > > > > > > 00df1f1a133b ("mm: change huge_ptep_clear_flush() to return the original pte") > > > > > > interacting with commit > > > > > > fb396bb459c1 ("arm64/hugetlb: Drop TLB flush from get_clear_flush()") > > > > > > I have applied the following merg fix patch for today. > > > > > > From: Stephen Rothwell > > > Date: Thu, 12 May 2022 19:33:11 +1000 > > > Subject: [PATCH] fixup for "mm: change huge_ptep_clear_flush() to return the original pte" > > > > > > It interacts with commit > > > > > > fb396bb459c1 ("arm64/hugetlb: Drop TLB flush from get_clear_flush()") > > > > > > from the arm64 tree > > > > > > Signed-off-by: Stephen Rothwell > > > --- > > > arch/arm64/mm/hugetlbpage.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c > > > index 5bdf913dedc7..30f5b76aabe9 100644 > > > --- a/arch/arm64/mm/hugetlbpage.c > > > +++ b/arch/arm64/mm/hugetlbpage.c > > > @@ -490,7 +490,7 @@ pte_t huge_ptep_clear_flush(struct vm_area_struct *vma, > > > return ptep_clear_flush(vma, addr, ptep); > > > ncontig = find_num_contig(vma->vm_mm, addr, ptep, &pgsize); > > > - return get_clear_flush(vma->vm_mm, addr, ptep, pgsize, ncontig); > > > + return get_clear_contig(vma->vm_mm, addr, ptep, pgsize, ncontig); > > > } > > > > Note that after the arm64 commit, get_clear_contig() no longer flushes > > the TLB. So maybe something like: > > > > diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c > > index 30f5b76aabe9..9a999550df8e 100644 > > --- a/arch/arm64/mm/hugetlbpage.c > > +++ b/arch/arm64/mm/hugetlbpage.c > > @@ -485,12 +485,15 @@ pte_t huge_ptep_clear_flush(struct vm_area_struct *vma, > > { > > size_t pgsize; > > int ncontig; > > + pte_t orig_pte; > > > > if (!pte_cont(READ_ONCE(*ptep))) > > return ptep_clear_flush(vma, addr, ptep); > > > > ncontig = find_num_contig(vma->vm_mm, addr, ptep, &pgsize); > > - return get_clear_contig(vma->vm_mm, addr, ptep, pgsize, ncontig); > > + orig_pte = get_clear_contig(vma->vm_mm, addr, ptep, pgsize, ncontig); > > + flush_tlb_range(vma, addr, addr + pgsize * ncontig); > > + return orig_pte; > > } > > Yes, after checking this fb396bb459c1 ("arm64/hugetlb: Drop TLB flush from > get_clear_flush()"), I also realized it will miss TLB flush. > > So I am not sure I need send a incremental patch to fix this issue? Or > resend my patch set [1] with rebasing on the arm64 changes? > > Catalin and Andrew, how do you think? Thanks. Andrew folding the diff in is fine by me. I presume the mm patches are applied on top of the rest of linux-next (and the arm64 commits). -- Catalin