From patchwork Wed Mar 15 05:14:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 69957 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2146094wrd; Tue, 14 Mar 2023 22:20:26 -0700 (PDT) X-Google-Smtp-Source: AK7set+WH1Hk5w/11Swx+ptVeSTnQvwgUEbNsB98AORUfo7qJcJdSmO1NIB2Ale/AqvnF46dn+nm X-Received: by 2002:a17:90b:33c3:b0:237:b92f:39d1 with SMTP id lk3-20020a17090b33c300b00237b92f39d1mr40862055pjb.0.1678857625952; Tue, 14 Mar 2023 22:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678857625; cv=none; d=google.com; s=arc-20160816; b=FczweEuBXDttGwpBpNGtS7c4H7LenL/Ock6cd587fo8nxR4FIg/D97+WZ0shI7YjtW rLGIInTIcSo0USsh6eUQHK9N7KQxc+b/8vqZBzNRzAw4bEuRbGbUcrXQ+Tsa+Zvl0hv9 16MD5ZN0vUfQD0WHIbt1h3j9h8BXcexniqPrM4EMq/NzGj7UpEXwk1NvO+PkTzrQw6k7 eqH3aGaCTxYo/FoldbC4n6516nRhqk0bRWdhuCUopmrYOyh2L9JqLGKMg5HYnbqzslJu C2QxGp+PBiQJQZqqzNpk7edNcVXqmNvjocExNEI/kDDovH1FRXI60uZro+308oI/sNlK rYLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BhDHElA1+7XNNQUc53zmXL/VNEpjb/1kRYcXHjVwh6U=; b=ipsGQVUlQyTAUr+7bpnPKDicIJuoPRenbVxpxnv2ph31S4w0d70tn0DvRtJyjQktzu bYRhy0PJQr+X6jFnNDtkdZVf4nqhMlsULEHTPUMvAZ15H+0yuHZ7KAeynECXmpuxsa3o 9ylq4lLFEJhP/+X/MB0cBltRLvpLlnrTqt7I/0T3BjcI2MQKgSffuBvE4Zf89XK5qGij dQM4w4arSEBjj59c4Is3rmCxAFRDwpTbnCb3X5xevUzjY2Gnn4FUqKQnJu9OJc2J0Vms 9HL4xRBbQp+/Yzm3hJ/POFTtTT8owWG/YWs0s0KxQ+PjGbrrg90HIqUbW9WkJiq4qsnm FOPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="L3nJEGj/"; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jz13-20020a170903430d00b001990edf3d3csi4104321plb.251.2023.03.14.22.20.10; Tue, 14 Mar 2023 22:20:25 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="L3nJEGj/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231523AbjCOFPx (ORCPT + 99 others); Wed, 15 Mar 2023 01:15:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbjCOFPI (ORCPT ); Wed, 15 Mar 2023 01:15:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A260D2A6F9; Tue, 14 Mar 2023 22:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=BhDHElA1+7XNNQUc53zmXL/VNEpjb/1kRYcXHjVwh6U=; b=L3nJEGj//+nPckdFL5A0mFETmy lr7XPYbTtAaH2vP0P5HP+wBtnDWlG5b7uYikWQ/fJi0a4Vt9b/xt8Sww93NIb2vKIimPE9Oy6GZdz mNvJFBOvv5hx4U2SLTqASBtB1VDHjrNZWSQ+UdnoaSfxl1n7daNmCihmbbled4/1UbvtRe3hhL2pE ++KLiRw8n0BqJ1AyiIcC/wm4+19G7IrigGstnEw8/D20hnfrAf+fialHk4Z3PtzZWdFJRgr9KzqBY JJ/8fbBrEaXLPR+F5jk9C2hUICZcfm6Hd9VNJs/p60YKGbDlvTMwSV0WS5LbQ7KG72LW5GboZTm3y scb/WSSg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pcJTN-00DYD1-Ht; Wed, 15 Mar 2023 05:14:49 +0000 From: "Matthew Wilcox (Oracle)" To: linux-arch@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org Subject: [PATCH v4 26/36] um: Implement the new page table range API Date: Wed, 15 Mar 2023 05:14:34 +0000 Message-Id: <20230315051444.3229621-27-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230315051444.3229621-1-willy@infradead.org> References: <20230315051444.3229621-1-willy@infradead.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760409813895681974?= X-GMAIL-MSGID: =?utf-8?q?1760409813895681974?= Add PFN_PTE_SHIFT and update_mmu_cache_range(). Signed-off-by: Matthew Wilcox (Oracle) Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org Acked-by: Mike Rapoport (IBM) --- arch/um/include/asm/pgtable.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h index a70d1618eb35..ea5f8122f128 100644 --- a/arch/um/include/asm/pgtable.h +++ b/arch/um/include/asm/pgtable.h @@ -242,11 +242,7 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval) if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); } -static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, - pte_t *pteptr, pte_t pteval) -{ - set_pte(pteptr, pteval); -} +#define PFN_PTE_SHIFT PAGE_SHIFT #define __HAVE_ARCH_PTE_SAME static inline int pte_same(pte_t pte_a, pte_t pte_b) @@ -290,6 +286,7 @@ struct mm_struct; extern pte_t *virt_to_pte(struct mm_struct *mm, unsigned long addr); #define update_mmu_cache(vma,address,ptep) do {} while (0) +#define update_mmu_cache_range(vma, address, ptep, nr) do {} while (0) /* * Encode/decode swap entries and swap PTEs. Swap PTEs are all PTEs that