Message ID | 99531e3a7cfc8a08d5ef4b1e8cbe21f117b4cb97.1639550392.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 314D4C433EF for <linux-mm@archiver.kernel.org>; Wed, 15 Dec 2021 06:49:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F3A686B0080; Wed, 15 Dec 2021 01:45:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EE9EE6B0081; Wed, 15 Dec 2021 01:45:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D8A136B0082; Wed, 15 Dec 2021 01:45:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0047.hostedemail.com [216.40.44.47]) by kanga.kvack.org (Postfix) with ESMTP id C887F6B0080 for <linux-mm@kvack.org>; Wed, 15 Dec 2021 01:45:29 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 95D6F88CFF for <linux-mm@kvack.org>; Wed, 15 Dec 2021 06:45:19 +0000 (UTC) X-FDA: 78919091958.19.2777EA5 Received: from FRA01-MR2-obe.outbound.protection.outlook.com (mail-eopbgr90073.outbound.protection.outlook.com [40.107.9.73]) by imf25.hostedemail.com (Postfix) with ESMTP id 0C784A0015 for <linux-mm@kvack.org>; Wed, 15 Dec 2021 06:45:14 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lnG97ZFN33XVoAaJu0/GnQ6P0E3o55fCFVeYjFbRrQlDyOj7L5YEo+bHelwyoiz1IgG9fIonYK1F0SQffQXHTKx5Ixoust7SNS011T/2p1jArTAr8UaAd6obLMnqjlAeWXy5E6tx3U+8Ej0M6h5dikg50wMM9w/emUkhynlPkwgXu2jIPoPCi6mLy5Qm1nK4j291vgmcE/pj3O4YgZyR0MKXhsAvx+oq2YxqYdiF7jxyCAGJURRF/YMbm7Rao2YuORXwrUT3uyZg0oWmRSXUshQOfK6ZreY9UdaCbwENLAOB5i4VTPo1PVsKPxOlusrc32++iVML4oPZ9VFLi0tr/A== 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=OSwqm10CFywLCPWz8IJaoCZFYx4OZ+Dft3P+TBbZ4U3RZPPIfrfrG/kL40mg3qWRv/limHK8sBUtxdtg67X68XkQmS+EH0kBKEdG1aEOFwxMnJQFha5tdbdrWI0SnLR7+mYKEsgKdvPnDY/uimBObH6Hhvg0uo7sq0uE3pcvxva8M3oWAZi3VDUiQuqKf9Gigy5+chgmpfOrF/Ww0f/pKoDewQIWlAFspVR2lEbdo2YWDTWINPOkl59vA1RkzBeiaCFJGph95SqS+vBKHh9Ymv4IRQ2tirxUuWM8JMWYRXGcChpQRHNJSiUnK7Q3owN0+nnymN+/YQlCHoJoSvcsRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=csgroup.eu; dmarc=pass action=none header.from=csgroup.eu; dkim=pass header.d=csgroup.eu; arc=none Received: from MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:31::15) by MR1P264MB2147.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:11::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.16; Wed, 15 Dec 2021 06:45:12 +0000 Received: from MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM ([fe80::fc67:d895:7965:663f]) by MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM ([fe80::fc67:d895:7965:663f%2]) with mapi id 15.20.4778.018; Wed, 15 Dec 2021 06:45:12 +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 v5 04/11] powerpc/mm: Move vma_mmu_pagesize() Thread-Topic: [PATCH v5 04/11] powerpc/mm: Move vma_mmu_pagesize() Thread-Index: AQHX8X9PPZdDlwkiyU+pusM+LAK9oQ== Date: Wed, 15 Dec 2021 06:45:12 +0000 Message-ID: <99531e3a7cfc8a08d5ef4b1e8cbe21f117b4cb97.1639550392.git.christophe.leroy@csgroup.eu> References: <cover.1639550392.git.christophe.leroy@csgroup.eu> In-Reply-To: <cover.1639550392.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: acbc4297-c40c-4d53-036b-08d9bf9671ba x-ms-traffictypediagnostic: MR1P264MB2147:EE_ x-microsoft-antispam-prvs: <MR1P264MB2147F76C84EF0348664F1061ED769@MR1P264MB2147.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: 0MxmKVBkX2CB39rdUdVzzRvcnTeSCri+stNqCeqHWg4OJNzYI5Y4z5lRgj6HeUSywaUNpRvrZod0n+n4TO8wMSMEmdOQJDMu6Iz8RMb0PXcg5888uBrSV+5zmSBNIDkyDZ4pRyUzeL9aF+J9WrFa6fTiJytALV9WQ2LIU6vQsHTpDjNSND/jHuo2rpSOpnwoE1n7bxNk/9R6bLg/eYkqYR5cXkek3YthlrbsXtIu4IFKukuCpfGV1X69bPhAnN5GREn/bsQQyp+RU6wa6tnl7jVJ5QoiTIUZKV3E7A8SWvYTjGy/yfKXje4ZMmPnVEvo86PpQIo82aGHexl9SL8JANAS2sYWf93pay+dKG/WhjnIGU/5gY4x8TbseXUfTXeJ5cZBROv2Q5Uvjdg1qYPyNrhS4Ow7/2mJ0kxEy2J4qr4UTTwlzaAj+0JABmKYl7gQVKy5ZfxELKMndMi4tIWan5IkvwGibQw9VD3+Jst2eQUlxt5XZbtxz8JBRc05J6dhgZ1vg0WLB95VsTeTcDve4ZBomn519VJUyK7tfkpn2nK6v+ZDnYEXbYYvuWKqC+9h0mPQEVYkjqAhoWM9EzXw7Mk63dE+a4WTs2yyKzi8+TPCpkDF2ncsA2szO3A2zJg6EqDhfD4T3jPLY96ozrQQIq6GsMz11bMIhkqcG54gbXHFIsXeZ/I3ShWbp/fB6QYGqsYpR1mHSuxXdQ6Nu5veOQ== 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)(110136005)(36756003)(6486002)(2906002)(86362001)(5660300002)(508600001)(26005)(186003)(38100700002)(8936002)(44832011)(54906003)(316002)(66556008)(66446008)(66476007)(64756008)(6506007)(76116006)(91956017)(8676002)(66946007)(4326008)(2616005)(122000001)(83380400001)(6512007)(71200400001)(38070700005)(7416002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?OM5tnpvsMMCBZ1kXSgMjKwA?= =?iso-8859-1?q?Gi7jmsvrDzqSPpWLqdn5uG+FCp5hCnoAsQD/ZFXq4RVgVVv9bKpwj4OIFmH6?= =?iso-8859-1?q?7pLvAa56sXt2IJddWOlWraCcRgWtyU2JN21Im2hfJB6yQYWY8a87xrj8+5k5?= =?iso-8859-1?q?KPs5DpQki6zxSC9Llj7g6hpziD6O4O+yNhy/V9Iet0M6dkchFEjgUxspOj/l?= =?iso-8859-1?q?gyD4G0iKqCsBlGc6PCgXLlm+37GXBFoHZAdH7tOkAR222JWj6cyFarxQyiLs?= =?iso-8859-1?q?pKfGcjDIgV4ohEfc+kVWvZs4nAvejmYfQ5bjTH6tYfTwBKdgAz6AM1pH6D5Y?= =?iso-8859-1?q?+KsT3vuJ91vHBBq2hHjUAg1XRrsunzwGXi1LFLnEmv3ZzPToWJ9DYfvUKgP9?= =?iso-8859-1?q?CAtpDjQo6j9L07B4xkUQ1bB7o+zJBVgaaCTjL9olUqJJDZ0oPBtAYQvUEHCu?= =?iso-8859-1?q?EKKJ85aIr+OZ519wKKPi0D2OYcvuH/udXeSvajOqg6xAm1B0GSon64HW8eze?= =?iso-8859-1?q?4n7zW0lIaYvJnXCB9ETlbEjTKKJv/jEfL6leOLckRGEa3ODrSaYhL8V16Wjz?= =?iso-8859-1?q?sv6AAk969P9C0ZOCPgrWCc8HRxk6SC9Af/vNOSL/y3dxdBDL2XtTgsX1XPzL?= =?iso-8859-1?q?0MNqRxBNMMMIHhLZ90CiTCjx+jO1nj0RrNVQfYeqWm5lHFxDAxhTLrH63Qk9?= =?iso-8859-1?q?8I4W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j3XIvzI6berLAW/66cMuy/Snx7m9+?= =?iso-8859-1?q?AbJSJhW0EKXQ4BmZ4LE7R2khipPe8z8aisUDJZIsTYDvASZ0aHS3wuDN7NOY?= =?iso-8859-1?q?SHS/DcHcJ8qL0fqwfkRwlrbs3j3OJvJDxwtffgVVzeNgJ4+ZBPDLRvdK9MVi?= =?iso-8859-1?q?6e9c=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: acbc4297-c40c-4d53-036b-08d9bf9671ba X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2021 06:45:12.0863 (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: 7lKGYy6atF0oKkjPphVfvj7GRgpwLaRYxMUzD3VZ0fBNA+tTdeclqMt/dvXyrhzAYVA17Un05c5VFZJ148+Up45fOL+BvCM/jx19LkXfiXk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MR1P264MB2147 Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf25.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 40.107.9.73 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 0C784A0015 X-Stat-Signature: rcbyqenk4wqxrsxetew8sz539q4y94x3 X-HE-Tag: 1639550714-344938 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