From patchwork Mon Jul 10 20:43:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13307617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F429EB64DA for ; Mon, 10 Jul 2023 20:44:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7F4C58E0014; Mon, 10 Jul 2023 16:43:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 77F4A8E0013; Mon, 10 Jul 2023 16:43:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C89B8E0013; Mon, 10 Jul 2023 16:43:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A2B7A8E0013 for ; Mon, 10 Jul 2023 16:43:49 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 74D91AFD1D for ; Mon, 10 Jul 2023 20:43:49 +0000 (UTC) X-FDA: 80996878578.04.2C5BEDF Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id C4895C001D for ; Mon, 10 Jul 2023 20:43:47 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=N43G73nI; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689021827; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Syy9e2c8ZW8YV+TAzwjXxuMyXTj35iZpxEM63ZAjrDs=; b=0CRI9/wytCoUyD6oZkpBHMspgGFX61O8d4kWBgmRAYl99PcnJzA9haz73k7pQyEkAoAx+7 oQHe72bFpqq5/5m1g8bWQGeSJ18WnmMgURXS+QhEHkI/jIutJoBdsR9Xdb+lCqqjxTtqS9 n+EQTd5+NJiyr2I5ZDx67QR0fReQLec= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689021827; a=rsa-sha256; cv=none; b=Z2qLNKTdbHnP5r3aiWu6ASDEyG2zwGQIW0ibv2RHzCtlGit4GhjAcqd7BT9nW8h3ivjVk2 z4YQm8rI709euAkmrZ6N8SeBzm/LzCtZOl4yD2BZ7eQiyExjNoZjQRZAmg7GA0CpszU9zU aKHueXJ2O9RYOs8jObP51uiemnwEZM8= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=N43G73nI; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none 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=Syy9e2c8ZW8YV+TAzwjXxuMyXTj35iZpxEM63ZAjrDs=; b=N43G73nIZ0b/OqOtMEkUld9RHI F4Mgrg1TmEBFXnr4M6ztPSKvHtYp5heEnvbw/0hdHJHAAUm4WwDFWqMOlv8p6EKECfnJjrdxEvb9v WVjvfctXnRh9p5Fv/zakRG1KBwzkzEk5iNhl7/qEbHgEzKNMZV+aq8+HdlTJYZ6g/rUY7s6ZU28ti wZWGNUgAEO29XNQYuRytMNAPJ3L3OYnn72bzL+kT640TxmZXe9sVZw57VvJDm+ufECLq1c7hlFBdx w4UqBYuwIpNPdbRwfUbzHZLDARxk4Jfk5F7VFE5ZqvgBTJ4sK9dUmqf2XUc+UnFJq0w5HLdb+eFQi Deu2w/Mw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qIxjU-00Euqb-Aj; Mon, 10 Jul 2023 20:43:44 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport , Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org Subject: [PATCH v5 27/38] um: Implement the new page table range API Date: Mon, 10 Jul 2023 21:43:28 +0100 Message-Id: <20230710204339.3554919-28-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230710204339.3554919-1-willy@infradead.org> References: <20230710204339.3554919-1-willy@infradead.org> MIME-Version: 1.0 X-Stat-Signature: tsh8gutn14urcrbyg16i8ngbhissdaoc X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C4895C001D X-Rspam-User: X-HE-Tag: 1689021827-890222 X-HE-Meta: U2FsdGVkX19r7QlhfdgMdFf3ygzaEuwEkp3O0YzfSnwattYWS4Xe6uxYN3cFGhLALODvL+LRO7A+iHlh/9ICDiTu7QDWnnZMk3MKLY9RpqDeUg3YWbeRP4LwDhdF3sKNMDQVuBHZPayjJnMHTd1r/1gdYaLobtrdrsOdgefny6gThqu+ZgBxeetQ/l8Nc+QrN9mhwWlAhxCHQeZt44AaRIZ8qNL0U41lyAsfroeVy6kwnpPP8icvW0BAWZE/5w5P7G5lCfuqUqKSI5FhL86xVwT30H1FwJ38/w1o5qljodAuvuF+kviumxd7yRz5r/1E13V+wg0wuh/izvmyW41QZrh13jX3qLDsJpGtOk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-Loop: owner-majordomo@kvack.org List-ID: Add PFN_PTE_SHIFT and update_mmu_cache_range(). Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport (IBM) Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org --- 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..44f6c76167d9 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(vmf, vma, address, ptep, nr) do {} while (0) /* * Encode/decode swap entries and swap PTEs. Swap PTEs are all PTEs that