Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35886490rwd; Mon, 10 Jul 2023 14:20:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtW+4F8JGkiC8+d7MT4nIQp3H8nRBM6c4x7zZEzG3Dp/7ImX1z9dAA4SEndcoP9ZOCdI2b X-Received: by 2002:a05:6a20:a10b:b0:11d:9307:8acb with SMTP id q11-20020a056a20a10b00b0011d93078acbmr17194262pzk.45.1689024034730; Mon, 10 Jul 2023 14:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689024034; cv=none; d=google.com; s=arc-20160816; b=jduAdpyeTIncx527804YsJMZphjTk7hsEZH/rNGjFRrgYoUgO4WQJQ0BsUH0rCNA+e m48ROZCWwt3JLgM9ioFZozmcQTVYnoSGXEFJ+49MSdUnLLUgAnDSBFF8bF9K64Xz2gqA uJyBueqz4M29dvPcZdEAqFu+BZQDlhGF72dMmvvTppAuTYWK1r0a2BTv4SP/qE91CMFD GfElU8PPwGKXTfL3Z4wbz9wTpqqrVGwlGMxtKRQkGikfi4d/Gr6xQl0eumWLsCUpGD46 odNnhMynRQb3U0kCPaTgLPmVmoarZ9v2w5ELT855hkPEvkJdo0nL9mf2PJkWM+VViYro vLvA== 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=zInuUFQyhX5p7DpW3QqqQDh+iQp8HWHqrOQDZ/8fecU=; fh=YSRXgHJFLntr8RR5WDr+xEuSZ7CBE2Ww6sl4CKuWw+A=; b=OsiI/A3c5EqUBPWomLvFu1kHGEO8fWD2QwoOSE8eZPM9DY+BFuRNUPZEWla3Od/4JA tRygBRfegQ6e6DUYTgFhkJRBNTHtioiO2bJHj0/qwsIZVAa2u6wgU0wQtfXbAtQz0blY mZJPWSOI7Jg4Mt3HnMDFaYa8qHzCJZS8kUtZJM74E7rKYUMAMqvNsVQhOSjC1zg33FFH tPqA59mvdu0rTEaM8gqt2VBmhtGVpcxLxGNEutXJ3t+cTzt73JF9R2zKhYvvRyjV9i5V qX0IEDchkE0R/LwXq0YD0OvKLzuIuOnUQaQeO5poWUUtn3iwviXCbTDAbAP+uIaKNY8h ihQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=h5hg1vuQ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10-20020a62790a000000b006536902d31fsi297734pfc.185.2023.07.10.14.20.21; Mon, 10 Jul 2023 14:20:34 -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=h5hg1vuQ; 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 S233395AbjGJUqr (ORCPT + 99 others); Mon, 10 Jul 2023 16:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232887AbjGJUpG (ORCPT ); Mon, 10 Jul 2023 16:45:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E9F410D8; Mon, 10 Jul 2023 13:44:04 -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=zInuUFQyhX5p7DpW3QqqQDh+iQp8HWHqrOQDZ/8fecU=; b=h5hg1vuQKj8IikMBDz/QMQ5zbM BU94LS/OWLcKkW6MxRnbHPLCfyRZ2Lr6xBmEK9Rx6BXDSf1Sra6nL03pUpr/aTtubBUTbTjg4XQH+ VdLL8HvPmHmq79BaL5uIRw16OPQJX1cm4deBVvW+FjCaqQha73lKU2GtIOfjnBeGaQnYkCRUB+4/G aYjSnWAwOzf+4ATQRUlE040bdRBIC74jAE4rASNqAsBSG2GrOBj/+eN1MgBa+07KdCQCYEQA7VSOI 8V/56S2yFOPY+Hc8geU/XDl1km87/OOnNr1GGaCAOUC1zRM0wAZJVqzCjQWNAdN+VV2gt9Shqf+aI vZ94wgIA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qIxjU-00Euqu-P3; 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, Anshuman Khandual Subject: [PATCH v5 32/38] mm: Tidy up set_ptes definition Date: Mon, 10 Jul 2023 21:43:33 +0100 Message-Id: <20230710204339.3554919-33-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,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 Now that all architectures are converted, we can remove the PFN_PTE_SHIFT ifdef and we can define set_pte_at() unconditionally. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Anshuman Khandual --- include/linux/pgtable.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 22f48f9997d5..e2a0bd5941be 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -181,7 +181,6 @@ static inline int pmd_young(pmd_t pmd) #endif #ifndef set_ptes -#ifdef PFN_PTE_SHIFT /** * set_ptes - Map consecutive pages to a contiguous range of addresses. * @mm: Address space to map the pages into. @@ -209,13 +208,8 @@ static inline void set_ptes(struct mm_struct *mm, unsigned long addr, pte = __pte(pte_val(pte) + (1UL << PFN_PTE_SHIFT)); } } -#ifndef set_pte_at -#define set_pte_at(mm, addr, ptep, pte) set_ptes(mm, addr, ptep, pte, 1) -#endif #endif -#else #define set_pte_at(mm, addr, ptep, pte) set_ptes(mm, addr, ptep, pte, 1) -#endif #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS extern int ptep_set_access_flags(struct vm_area_struct *vma, -- 2.39.2