From patchwork Thu Feb 15 10:31:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Roberts X-Patchwork-Id: 201343 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp303382dyb; Thu, 15 Feb 2024 02:36:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWSf5cuQgWcmiGnJvZDxhZdmmL6JSJ1jLn2WwZEKeQTZER0851HIYMx/1ORSg6VRskBk+/oxevBOhhMPMrY0W/04Rr/hw== X-Google-Smtp-Source: AGHT+IEUV4fFPo+LWRxzrg1PnJi/OlnlB+AwIZ4RdcKHcODmbFRRO4WD40HLqyyAPJ0Dii98fCH6 X-Received: by 2002:a05:690c:d81:b0:607:d244:5707 with SMTP id da1-20020a05690c0d8100b00607d2445707mr1238107ywb.13.1707993384619; Thu, 15 Feb 2024 02:36:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707993384; cv=pass; d=google.com; s=arc-20160816; b=USyeMBS6X2ld4D64fiPYFmY1WvY/uvZFVC3NeaVUAMVHlyTg38RG9XgN2R7B5pG6l8 7KKJvvmCr5e50H9eawRW8qk3BwIh4bRUfh6kEBfwi90YBNmFNG9SQ23av2er7ybO6T3M +kPsbtzRmIyQrqYFDpBwa9+dAbBGFiptfAnThJQBgrRPq4+/qDQzC8BtaDmOFYysSf18 cqIRizrUmsZO0s8ENB9Jd+EpelUKDf7Y+3f5ba3GQxtXnb3UHkvvUBdY3+5Uvu1LOylc 5gJGf0ztC+5D5mVkupWP+nvQsF9cRYdACUUsYdjmBpE8xkRFKJZv2iwxicBJqdxpOrks u43w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=L5R0Hb3vr2XhKlRaGDOJDdSoNMHQdu7Je9L2b+7crXk=; fh=Heagowc1O8zVDXTyU76nJjOwDjz9r3Gi+0zmhF4ZELQ=; b=gCTp+jy1R8UKP2Fy9Ga795Srwg/UBxs7zEHJROpj9QMVnnJwkt3aTqYhEFltldIfEF /gyZd84K0+0fYYh9idq3JuF6ieOp3eUuwcxyQoF4BxUeZo84bDtRX25JUKFBWi91ZkZM fb5fk6/OAOskVLs3ouQ7pJng0+sCjPvHjJOWj8lnFcB8V9NAWRfbdVlgP5C2tRCeUAkb cx5zfFl/DCZnm+whcVMsreKrpK7Ubiy+dzvep8zFc0W6M5PNfkJ5qWXINf6Mk/38quzr 9kEM2xMCc/C8mcfvqmKXSjKG3JZVKOu6Ov4eMFoqBc9coywUnLYepA98CzaVDYNPL6Rv r+WQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-66642-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66642-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d16-20020a05622a15d000b0042dc882fc00si1157865qty.455.2024.02.15.02.36.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 02:36:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66642-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-66642-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66642-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 394D21C231D1 for ; Thu, 15 Feb 2024 10:36:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFB3312D756; Thu, 15 Feb 2024 10:32:43 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21CE912CDA3 for ; Thu, 15 Feb 2024 10:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707993162; cv=none; b=LfiGzzo91RQE1toUsCYuKuqKSXSTLrjBE/zuq9/85RK1wQCE4nzkCjXUb13HFT9Js7hNDiuxdvF2ywnKmXJlKUFYuYaJGlzme8eJtbXWHO8sEL6QC22+v01KKLPsbmNWyi0zmYewawb0OxZkSrTPko4SVSAPylKcEgvmr245B+c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707993162; c=relaxed/simple; bh=2pMOLH70RyGBPdRH3ynfTXiJWugM9Ml+vZUSCzri78g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=e1mkN/fmVArKwmDAmR3uK5rBZy2N3hR3Mm2ddLD5yZgIAMyCjDeZq0uF0+UHQ/rGI32hI03dObzYZG59iIWJc81UtGhA7X5eZU/BMh37bo4K7es5QsS9Xh1gDC0clu730PPbRG3HGPXjXWd3397Tj9H3rHURgnH4IxvWS4EA7zA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4DA741516; Thu, 15 Feb 2024 02:33:21 -0800 (PST) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 442213F7B4; Thu, 15 Feb 2024 02:32:37 -0800 (PST) From: Ryan Roberts To: Catalin Marinas , Will Deacon , Ard Biesheuvel , Marc Zyngier , James Morse , Andrey Ryabinin , Andrew Morton , Matthew Wilcox , Mark Rutland , David Hildenbrand , Kefeng Wang , John Hubbard , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Cc: Ryan Roberts , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 06/18] mm: Tidy up pte_next_pfn() definition Date: Thu, 15 Feb 2024 10:31:53 +0000 Message-Id: <20240215103205.2607016-7-ryan.roberts@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240215103205.2607016-1-ryan.roberts@arm.com> References: <20240215103205.2607016-1-ryan.roberts@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790960871120951468 X-GMAIL-MSGID: 1790960871120951468 Now that the all architecture overrides of pte_next_pfn() have been replaced with pte_advance_pfn(), we can simplify the definition of the generic pte_next_pfn() macro so that it is unconditionally defined. Signed-off-by: Ryan Roberts Acked-by: David Hildenbrand --- include/linux/pgtable.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index b7ac8358f2aa..bc005d84f764 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -212,7 +212,6 @@ static inline int pmd_dirty(pmd_t pmd) #define arch_flush_lazy_mmu_mode() do {} while (0) #endif -#ifndef pte_next_pfn #ifndef pte_advance_pfn static inline pte_t pte_advance_pfn(pte_t pte, unsigned long nr) { @@ -221,7 +220,6 @@ static inline pte_t pte_advance_pfn(pte_t pte, unsigned long nr) #endif #define pte_next_pfn(pte) pte_advance_pfn(pte, 1) -#endif #ifndef set_ptes /**