From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89444C77B7C for ; Wed, 25 Jun 2025 08:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KTExvezmyrjLwuMrG2EpbzYH4/i3a/AxfBsx419ijTU=; b=ESp/OSu1JOG8GbnGRVx3O2Ue0B UPPJLGY5tixfPVg92BR3a4vwfmfrVoUXSdPxh170Q7+oBeHjXujEHXgSr0awEorCnn7bGKZMkVwYE gyvipfFVDrOkN23g/6N62wmqf/8Nz4XT5ptXyUQhRXXxRmZOfNu5+1H9bBNIltuStQH1Hna7iRL5G UVj4xUT82dA0+8ke7hSo4SEsTXhTY3Ub9u60GSDubW2HYQSUQCVR/IE9v0tUF3pNsadXC0cqLbkTY xqXkXAc+2G4ytRt7hrUaNkuX4ukg5xgBdCLenMrGkocs6+SHZKp0scq4aIgSFM3HgzTxrhBNcLCa/ 759dgwJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uUL5I-00000007tc4-28VT; Wed, 25 Jun 2025 08:02:20 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uUKbl-00000007ovN-0Hi4; Wed, 25 Jun 2025 07:31:50 +0000 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55P1KH3s014893; Wed, 25 Jun 2025 07:31:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=KTExvezmyrjLwuMrG 2EpbzYH4/i3a/AxfBsx419ijTU=; b=VktehCTG/F5v4EI2Mg4Bq25oW6QPAVlDE 3jaP6s9qozgScWAYl0u3cNM2pov8LTQ7hoOM6/XMaAFeoaEeDjjFzq5SLwzw3Koy EhTe37HxmeMo+ClDjo0M4owvPRozPI7efgQtVjXRTN50PVwQeyjIDLzGWEoBF8bT wvWyKAUyKyBctM+nxDccL36esIhTWKg7sigbrjWU272C1zJi2Rc5PcilU1koFBP+ NLf5OahJekdXzHyNykc40usJTdCcaTnrPNZhPdKnhMeiFCsocsMcyvtGI8rwPd5I HvpBa+Ye4tuLU1DvGyUAc33tWiYvinPvwNYt9LIG8kjIJjcluJASA== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 47dmf35e3p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jun 2025 07:31:39 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 55P4uDSh015028; Wed, 25 Jun 2025 07:31:38 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 47e72trbjc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jun 2025 07:31:38 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 55P7VbOd19595784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jun 2025 07:31:37 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 517FA58912; Wed, 25 Jun 2025 06:39:24 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA92058907; Wed, 25 Jun 2025 06:39:19 +0000 (GMT) Received: from jarvis.ozlabs.ibm.com.com (unknown [9.36.18.35]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 25 Jun 2025 06:39:19 +0000 (GMT) From: Andrew Donnellan To: linuxppc-dev@lists.ozlabs.org, pasha.tatashin@soleen.com, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, sweettea-kernel@dorminy.me, christophe.leroy@csgroup.eu, mingo@kernel.org Subject: [PATCH v15 10/13] powerpc: mm: Add pud_pfn() stub Date: Wed, 25 Jun 2025 16:37:50 +1000 Message-ID: <20250625063753.77511-11-ajd@linux.ibm.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250625063753.77511-1-ajd@linux.ibm.com> References: <20250625063753.77511-1-ajd@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=M5FNKzws c=1 sm=1 tr=0 ts=685ba5dc cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=6IFa9wvqVegA:10 a=VnNF1IyMAAAA:8 a=7ipKWUHlAAAA:8 a=3n-1MRHmzzeYtLK0-mgA:9 a=gpc5p9EgBqZVLdJeV_V1:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjI1MDA1MyBTYWx0ZWRfX9D81NOvPqLgK HN7zOOeUE4aCUmZuT9JMZU9/tq0eX3ANMGeGlS1QqJsDpX0AVL+N8j7sqCiR2CMwmFCfbijPB/O K35l38b7U+zqadJLwhM9xFjQI0ej2n8ukixxH7vh0VxLGhTUZBJQJHfdlPO6r6/3SCnHH3B6JY3 kVDKqLmmIdI6rzfIrdieFm/1DsA2Ie851/g3TtXZ4s+vgrmIP7Cdz0IdbKJEP4aLsWMr61phYPM iI0/SBXi7iIElwD/k7kyPOaAnOiTaLrUXqvoX6Ipi/ps/yBjEvJbp1nboEKBwW6C19iOK2FkQKy KiGzeYK1F9tGETr6DpIQS1HiwG8bJQayeFL2STOrLbw1Nx8i8e9wY2lI4T5GwM0VK7E2bilM41v vbxl9a4ETDw/FWESiqvvVqur53DtGnaEsIyJJ6EY+ha1rk6oy/8ClKU12V+3lh3wzscinbq3 X-Proofpoint-GUID: L8iYEZiAifJZIo-x0G4zMm2PVAPXPEQY X-Proofpoint-ORIG-GUID: L8iYEZiAifJZIo-x0G4zMm2PVAPXPEQY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-06-25_01,2025-06-23_07,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 adultscore=0 mlxscore=0 mlxlogscore=948 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506250053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250625_003149_220363_742A3105 X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rohan McLure The page table check feature requires that pud_pfn() be defined on each consuming architecture. On powerpc, only book3s64 platforms allow for hugepages at this upper level, and thus only book3s64 currently defines pud_pfn(). The page table check code that calls pud_pfn() is gated by a call to pud_user_accessible_page(), which will always return false on any platform other than book3s64. Add a stub implementation of pud_pfn() for all platforms other than book3s64. As it will never actually be used and should always be compiled out, raise a BUILD_BUG() error. [ajd@linux.ibm.com: clarify commit message] Signed-off-by: Rohan McLure Reviewed-by: Pasha Tatashin Signed-off-by: Andrew Donnellan --- v15: clarify commit message --- arch/powerpc/include/asm/pgtable.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 93d77ad5a92f..0f73a9ade0ed 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -214,6 +214,15 @@ static inline bool arch_supports_memmap_on_memory(unsigned long vmemmap_size) #endif /* CONFIG_PPC64 */ +#ifndef pud_pfn +#define pud_pfn pud_pfn +static inline int pud_pfn(pud_t pud) +{ + BUILD_BUG(); + return 0; +} +#endif + #endif /* __ASSEMBLY__ */ #endif /* _ASM_POWERPC_PGTABLE_H */ -- 2.49.0 From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1B13C7115C for ; Wed, 25 Jun 2025 08:00:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z0i6kmbbhjprOZTFMPiBs9MJ/VxhfTzxbWvjYEBfjhE=; b=nyWuBAZD31R3nn or4fmkd/VyxTxsHqpxCxj2KXOsCeQdQ7EVfbHjb8pciO3MiuZhq+KHSv+vl3znkG/wbvi2s7YYuTU hJxRXwWJlFIILoDr37xeFsZrRXEYrt7JfZRpkSUIWzbyGdhRBB5Dy1nhndcozmBRFVtrrrXHF22VX gkhPvEPN0hCAZ/fW2GV4hXQutaWse65/h3uXzTdW416ySeX4977YEvhfftyjZm3PnxRUnDRGHm06x WH+HY1tV1pbyQhjVMX37NjHCpGMkdGWVmMr1pxRrYai4mtsPIRvnDzv8KCyTe7LWyi+MPT0R5TTfE A5Bd6G7pac0AhQvvqAgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uUL2z-00000007tJ2-1Any; Wed, 25 Jun 2025 07:59:57 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uUKbl-00000007ovN-0Hi4; Wed, 25 Jun 2025 07:31:50 +0000 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55P1KH3s014893; Wed, 25 Jun 2025 07:31:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=KTExvezmyrjLwuMrG 2EpbzYH4/i3a/AxfBsx419ijTU=; b=VktehCTG/F5v4EI2Mg4Bq25oW6QPAVlDE 3jaP6s9qozgScWAYl0u3cNM2pov8LTQ7hoOM6/XMaAFeoaEeDjjFzq5SLwzw3Koy EhTe37HxmeMo+ClDjo0M4owvPRozPI7efgQtVjXRTN50PVwQeyjIDLzGWEoBF8bT wvWyKAUyKyBctM+nxDccL36esIhTWKg7sigbrjWU272C1zJi2Rc5PcilU1koFBP+ NLf5OahJekdXzHyNykc40usJTdCcaTnrPNZhPdKnhMeiFCsocsMcyvtGI8rwPd5I HvpBa+Ye4tuLU1DvGyUAc33tWiYvinPvwNYt9LIG8kjIJjcluJASA== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 47dmf35e3p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jun 2025 07:31:39 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 55P4uDSh015028; Wed, 25 Jun 2025 07:31:38 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 47e72trbjc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jun 2025 07:31:38 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 55P7VbOd19595784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jun 2025 07:31:37 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 517FA58912; Wed, 25 Jun 2025 06:39:24 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA92058907; Wed, 25 Jun 2025 06:39:19 +0000 (GMT) Received: from jarvis.ozlabs.ibm.com.com (unknown [9.36.18.35]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 25 Jun 2025 06:39:19 +0000 (GMT) From: Andrew Donnellan To: linuxppc-dev@lists.ozlabs.org, pasha.tatashin@soleen.com, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, sweettea-kernel@dorminy.me, christophe.leroy@csgroup.eu, mingo@kernel.org Subject: [PATCH v15 10/13] powerpc: mm: Add pud_pfn() stub Date: Wed, 25 Jun 2025 16:37:50 +1000 Message-ID: <20250625063753.77511-11-ajd@linux.ibm.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250625063753.77511-1-ajd@linux.ibm.com> References: <20250625063753.77511-1-ajd@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=M5FNKzws c=1 sm=1 tr=0 ts=685ba5dc cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=6IFa9wvqVegA:10 a=VnNF1IyMAAAA:8 a=7ipKWUHlAAAA:8 a=3n-1MRHmzzeYtLK0-mgA:9 a=gpc5p9EgBqZVLdJeV_V1:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjI1MDA1MyBTYWx0ZWRfX9D81NOvPqLgK HN7zOOeUE4aCUmZuT9JMZU9/tq0eX3ANMGeGlS1QqJsDpX0AVL+N8j7sqCiR2CMwmFCfbijPB/O K35l38b7U+zqadJLwhM9xFjQI0ej2n8ukixxH7vh0VxLGhTUZBJQJHfdlPO6r6/3SCnHH3B6JY3 kVDKqLmmIdI6rzfIrdieFm/1DsA2Ie851/g3TtXZ4s+vgrmIP7Cdz0IdbKJEP4aLsWMr61phYPM iI0/SBXi7iIElwD/k7kyPOaAnOiTaLrUXqvoX6Ipi/ps/yBjEvJbp1nboEKBwW6C19iOK2FkQKy KiGzeYK1F9tGETr6DpIQS1HiwG8bJQayeFL2STOrLbw1Nx8i8e9wY2lI4T5GwM0VK7E2bilM41v vbxl9a4ETDw/FWESiqvvVqur53DtGnaEsIyJJ6EY+ha1rk6oy/8ClKU12V+3lh3wzscinbq3 X-Proofpoint-GUID: L8iYEZiAifJZIo-x0G4zMm2PVAPXPEQY X-Proofpoint-ORIG-GUID: L8iYEZiAifJZIo-x0G4zMm2PVAPXPEQY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-06-25_01,2025-06-23_07,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 adultscore=0 mlxscore=0 mlxlogscore=948 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506250053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250625_003149_220363_742A3105 X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Rohan McLure The page table check feature requires that pud_pfn() be defined on each consuming architecture. On powerpc, only book3s64 platforms allow for hugepages at this upper level, and thus only book3s64 currently defines pud_pfn(). The page table check code that calls pud_pfn() is gated by a call to pud_user_accessible_page(), which will always return false on any platform other than book3s64. Add a stub implementation of pud_pfn() for all platforms other than book3s64. As it will never actually be used and should always be compiled out, raise a BUILD_BUG() error. [ajd@linux.ibm.com: clarify commit message] Signed-off-by: Rohan McLure Reviewed-by: Pasha Tatashin Signed-off-by: Andrew Donnellan --- v15: clarify commit message --- arch/powerpc/include/asm/pgtable.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 93d77ad5a92f..0f73a9ade0ed 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -214,6 +214,15 @@ static inline bool arch_supports_memmap_on_memory(unsigned long vmemmap_size) #endif /* CONFIG_PPC64 */ +#ifndef pud_pfn +#define pud_pfn pud_pfn +static inline int pud_pfn(pud_t pud) +{ + BUILD_BUG(); + return 0; +} +#endif + #endif /* __ASSEMBLY__ */ #endif /* _ASM_POWERPC_PGTABLE_H */ -- 2.49.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv