Message ID | 44aac3ced0ce952719fa0b7bb924a3be7752c25f.1642752946.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 C653AC433FE for <linux-mm@archiver.kernel.org>; Fri, 21 Jan 2022 08:42:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F3EE6B008A; Fri, 21 Jan 2022 03:42:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 57CE16B008C; Fri, 21 Jan 2022 03:42:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F6F76B0092; Fri, 21 Jan 2022 03:42:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 309086B008A for <linux-mm@kvack.org>; Fri, 21 Jan 2022 03:42:27 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E0AF58249980 for <linux-mm@kvack.org>; Fri, 21 Jan 2022 08:42:26 +0000 (UTC) X-FDA: 79053652692.05.FD76E90 Received: from FRA01-PR2-obe.outbound.protection.outlook.com (mail-eopbgr120055.outbound.protection.outlook.com [40.107.12.55]) by imf10.hostedemail.com (Postfix) with ESMTP id 5838CC0002 for <linux-mm@kvack.org>; Fri, 21 Jan 2022 08:42:26 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LOpmXgkVo/4pjtIONyghiImX3RsfwHw7molWiAfpfCpYmbtJrPhQ65m81ZZj5UnBIaUK59YjPlBs4WOrpxIpQxvsgSWQB4c22BWS2D1YexfV0EWzSdhWh8HHYhv53LbNJGGxrldK9qD4svvJbMdZ6zOYLxP1jamB1o3ldhwwXU6ErMohNJcFLXXvj+DJgFONE82McjINVcp1dRtPWm2v9dJP8fT+mcSnZy8qUR+Lu2jRhUP12gQGvchtmXZz4+kRRkJFIRRzaUEMry9A6OAhcKqbpnlr5b3lb5+Mx+xrZTJa1Gn1aG4WMzxHXVr0mSs/XKaMWrKIbG+9aTyawBqCSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RiZMm9KXXy+vu3WhUEQeEWc13H9a8TPaQVYGQB2pazk=; b=Q6BEit0Xa6hcwD16Yw3+a2Ib+75+E354gy8AIJ/REiXZ5gdIRz4vjP6UesGUybg/f0lp65tVOKr3Q13T4ETFkFctT5s5zHPA3uSsQhyrTvq6ous6PWC3FPcKIlK+EoUNeer+VkOb0EGFQx6pwsUHX/Efo5bW34jc5wYssAz/4YS7TAv0LeVBtRlrSAW+B/nbBtyC/mDa/54iXYQZ22kkc0FeJ6yBmDxNjxChCY8KzXvRsG8joWlqgDSFD1eUDYptm9IKY9kbGkC92rBNd9hWMZ71VDhH0Fdr31Or/q+dJ5EKR+UyelP5D70UwgPNfTkLa15yyEz4WuGTrUEwnm03aA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:31::15) by PR0P264MB0201.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Fri, 21 Jan 2022 08:42:24 +0000 Received: from MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM ([fe80::9d4f:1090:9b36:3fc5]) by MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM ([fe80::9d4f:1090:9b36:3fc5%5]) with mapi id 15.20.4909.008; Fri, 21 Jan 2022 08:42:24 +0000 From: Christophe Leroy <christophe.leroy@csgroup.eu> To: Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Michael Ellerman <mpe@ellerman.id.au>, "alex@ghiti.fr" <alex@ghiti.fr> CC: Christophe Leroy <christophe.leroy@csgroup.eu>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "akpm@linux-foundation.org" <akpm@linux-foundation.org>, "catalin.marinas@arm.com" <catalin.marinas@arm.com>, "will@kernel.org" <will@kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, Nicholas Piggin <npiggin@gmail.com> Subject: [PATCH v7 06/14] powerpc/mm: Move vma_mmu_pagesize() Thread-Topic: [PATCH v7 06/14] powerpc/mm: Move vma_mmu_pagesize() Thread-Index: AQHYDqLQNgMtoK4UpES9C5Vln6QanQ== Date: Fri, 21 Jan 2022 08:42:24 +0000 Message-ID: <44aac3ced0ce952719fa0b7bb924a3be7752c25f.1642752946.git.christophe.leroy@csgroup.eu> References: <cover.1642752946.git.christophe.leroy@csgroup.eu> In-Reply-To: <cover.1642752946.git.christophe.leroy@csgroup.eu> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f38f2648-550d-4339-21ad-08d9dcb9f2a6 x-ms-traffictypediagnostic: PR0P264MB0201:EE_ x-microsoft-antispam-prvs: <PR0P264MB0201B2C8C643D410BA0C966BED5B9@PR0P264MB0201.FRAP264.PROD.OUTLOOK.COM> x-ms-oob-tlc-oobclassifiers: OLM:4303; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MIBM3VGcD4LVM6SU223MCLMm+DFCkhDSWiGAP3MWi2YqJOQdQi+nwv6ADO/uizrLzJNu9LOn6fJ2XHvlT37CcPdgdoizIIjX0WJ9l7qP8mRTC5QCY7JbGj2+UnZ/WmMqtBEmdyciPoj9Qwk+UmOs28cAqANWzqyVAkyfIque1fUS44dhPRa3L2QpdXAKYIvZryhFlZEq47Kgd1bW0EGi9orlQOesiLgNOH4KEP+EULTwUsEBZeyxcuvkw0xfywfXNldr0ERZfQJGeLj3uRvffTL3vleehtUnXtcW/o+RASvQOHxe3JEr05DZqzEeE53khhVuyjIpR439o+d8K/Pfoc1erhEw6vicA1owuetjZZw7vSktykb9J6cR/j9hmco9GtIry1mQV8sLOZquqflNM/quWQBa6ekCFMvn34d1me51a3bZrKnwDLealycj5Cge2q2MyftugF0YDzCpww2k+Kv8ZgHrq9vZxED5WacQK3Z0FiktjxXFVFvwZOylTWdcz1V+7wCzwdHTiNvjM61iSaHjeQuojL2W47KlWlKHMayIn7gQv/MgO9uvEKfp74o2LUVEQKda/NqgT70VME0+S6OeQmvKuWnMiBms5koSda8By9lxKkvIL28S1dMx0RZ/8QcNxtqJcDfkGOZRNSCh6lZgqVLtHnjj7Bn8F+2GxxqItIJyFpYf8UPz6/KC9bcn4PIcmIKILjicbVWpPDJ4eQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(4636009)(366004)(76116006)(91956017)(36756003)(66476007)(2906002)(5660300002)(66946007)(8676002)(6512007)(122000001)(71200400001)(8936002)(83380400001)(66446008)(64756008)(4326008)(66556008)(86362001)(26005)(508600001)(6486002)(54906003)(2616005)(44832011)(38070700005)(6506007)(186003)(38100700002)(7416002)(110136005)(316002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?vfP5DPE6GUHjc2ZlITrqYqM?= =?iso-8859-1?q?PnBUbun9FJw/ruD+IXrj5NY6P60SgL9/ZVXi3Unkw+RS65FPN1Alza6s5HyN?= =?iso-8859-1?q?5W/QlQ/soQj+Ql2GLzT1+4iazI33a2wc/az6G3S363QbIlTTAC3+h06GdQtX?= =?iso-8859-1?q?MUKgPBVjWBmifGiOFi4UyEjjA68OJqKdltvyYtElRPDDMzByD0RHDpd0+vdd?= =?iso-8859-1?q?0/ojK1ku8T5iBWbdFsfHZdsHBr/52T/Np//qiCdYftQqFUzJCCsmJnQD9cuQ?= =?iso-8859-1?q?YHNbVuv0RLP9cgjsoCX6fc3Nw6BHKMNKM8a98c1eBESPVLnAGyIvus3hSbPk?= =?iso-8859-1?q?qLC4QTwkSY8vy7YiMQoyYKek3ko9Nw5MCuURCqLlPh88pqBA1TBP2N/g2pfy?= =?iso-8859-1?q?UE8qvsnYKUuhQeaavDVrqjhjJCYt76aJTx+GDX09k0n5RnB5o72gkNI/hORk?= =?iso-8859-1?q?ycsuHpUlFAc6g0y/Uz6N24/V3K+MgEPVH52IeYCAQFMQhBuMbcSoJr/mI1Vr?= =?iso-8859-1?q?QQLum3IIppmHYn5k+Nr33WR+neZ7pwK0yQs4NGscLu7WmUhG/wRqSfusQ1Dg?= =?iso-8859-1?q?dEMys9lVpj+bm1iE3DcFPlR0QUV5sKnSomd13iopqu3fluhhJ08cL66wezvR?= =?iso-8859-1?q?OGlg3dtvf5DpKb7n79xMY1el+Qr8yU+HzazUqLEcTCeQg7SqK+tgaOWumsgY?= =?iso-8859-1?q?N9/9Vc7zuAoVBZb3YMpAMCQO01YUalhWaEl0AltSTzCgqAQVdmPOsOfzmNGN?= =?iso-8859-1?q?Z7ifqoa5fecCtZd2SRpEYK+rk/DcKsi2bh8cKrPYlv/l34Gp9vzSVzxuWHQr?= =?iso-8859-1?q?OoCWkVyMongy8EeQqa/BruNYkB+glH4Oj4DozK9U43I2HXbT+P/2VC64ZPjd?= =?iso-8859-1?q?QRLkXeCCo6fOhlkJHGszkaPol7WnTLE6d+mzhmgr424yepmyxKkBGiIa8oye?= =?iso-8859-1?q?hvH61F3Q/6X39tZJSJRe5C7pugMyP49zgOmMoL+V1udL3jbqKt5vIOnUTQFl?= =?iso-8859-1?q?F5FPqux1MCv6jF2ddz9pBSxcvjYMKbMio6TJlohIg1IZqd8dnktJMoEwXUn2?= =?iso-8859-1?q?0UC7lV6Kx0c4ow42Bs9MIdgqFFQvIUUlEiDhkG+KOMop7DZEP1Fk7g636CtE?= =?iso-8859-1?q?s0dvwXytlVfjODgDl714uBW9osS9GWLtd58ioXHClAgfMVt2hJm9yP4HMouY?= =?iso-8859-1?q?/6ufv91DIkPBeYmvhTZ4fRziMMo+kaEZrfgMNZzpyEUX45/FwiA3d5UcX0hk?= =?iso-8859-1?q?p32WZd8bssBX/CpULnE5FxdTd6251DIgolGhh9nLjhFdvx6uhuPBwH30mSxx?= =?iso-8859-1?q?5EGnmnQa+LMYDSdTJkRK6GHq/L/U6f2H/3FqCjNobAfISdCsqj4pxWQGRu0v?= =?iso-8859-1?q?Rkingq/xOlUvBRgdhIF9k7Qe36l++WJDtIiZa2iPHWVoKTnlB+eYUtCrpgg7?= =?iso-8859-1?q?QpEg2AXaCEa9Uo+/DZjUIWwkZ0fpfbHCrrs3rsJrewgXzF3Nbw8kVeKOURlL?= =?iso-8859-1?q?58SNniNPwJa8usBvdPHq5DpIXch5oABVG88Wmx9o3PWNA7SraNNTrrk3ggKJ?= =?iso-8859-1?q?UTWSfAiKS46e6ELjA+DTxJApI7K474j90ptQND/h7C2tbmk2LJoUhX+Edam3?= =?iso-8859-1?q?oHgh/mrxMb6wUhU4yliUsrH/Z/yybBANijddwFPZDx0Psy2EzT0u9xXY2aZN?= =?iso-8859-1?q?ugGq1xNbTKa2zH77/rHUp2EzyB+NdgKyl3aLtlWdU5qeGe9zgfyzgEGGSUWT?= =?iso-8859-1?q?kWnI=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: csgroup.eu X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: f38f2648-550d-4339-21ad-08d9dcb9f2a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2022 08:42:24.6889 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9914def7-b676-4fda-8815-5d49fb3b45c8 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LIwVnoDlj7jnROwwpTM58+Hn2x6xKcrMhwonVWxfTk0kexWutvWdW/j6zogLTTqDiwF0djU0d0MUyoiH/QUkJcYdBGy6WPW26xeQD7GkBLY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB0201 X-Rspamd-Queue-Id: 5838CC0002 X-Stat-Signature: 5x5zbacu7a1rxynqhs4ig6hqxnsfqeyz Authentication-Results: imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 40.107.12.55 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=none X-Rspamd-Server: rspam07 X-HE-Tag: 1642754546-163869 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Convert powerpc to default topdown mmap layout
|
expand
|
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index ddead41e2194..0eec3b61bd13 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -565,17 +565,6 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, } #endif -unsigned long vma_mmu_pagesize(struct vm_area_struct *vma) -{ - /* With radix we don't use slice, so derive it from vma*/ - if (IS_ENABLED(CONFIG_PPC_MM_SLICES) && !radix_enabled()) { - unsigned int psize = get_slice_psize(vma->vm_mm, vma->vm_start); - - return 1UL << mmu_psize_to_shift(psize); - } - return vma_kernel_pagesize(vma); -} - bool __init arch_hugetlb_valid_size(unsigned long size) { int shift = __ffs(size); diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index f42711f865f3..8a3ac062b71e 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c @@ -759,4 +759,13 @@ int slice_is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, return !slice_check_range_fits(mm, maskp, addr, len); } + +unsigned long vma_mmu_pagesize(struct vm_area_struct *vma) +{ + /* With radix we don't use slice, so derive it from vma*/ + if (radix_enabled()) + return vma_kernel_pagesize(vma); + + return 1UL << mmu_psize_to_shift(get_slice_psize(vma->vm_mm, vma->vm_start)); +} #endif