Message ID | 99531e3a7cfc8a08d5ef4b1e8cbe21f117b4cb97.1639550392.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 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 E9FD8C433F5 for <linux-arm-kernel@archiver.kernel.org>; Wed, 15 Dec 2021 06:50:32 +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:In-Reply-To:References: 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=2B5XX3W6lmEFetyFuCNGgYiTMsH5FXVBkuJ09gLbqbc=; b=W4C2CfNP+AaDt8 0WN7YvccTEV82vJflZaSFuda0wsAjgcZS+jqpzgEiLJWCoBa9/NDrDbfMnT5WL2ByPMP9O72Q1RLD kBLY93Rq42KrBe+7f1FkHK0a1R7OiRnHKA5gwUHsYSUcHnnokH79BbLOtJnNSo5pCeKvdrnURhfF0 iLcFXnTZNBqakJ6M0JWxHbZv/9AUEIxk37rWF7mUfOnmYJyKY71j3QWu3JLUvKnXhMAn2fufVUdi3 7NvZntr+ieJAH4elD0vaCdPuKupO1xIamMhWFvKQ22RjhIqkH3kWAIyyqD+VV5o28nfsgxsXSywhB pHofFquO/KwHrHBApyfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxO5Y-00GyVO-8t; Wed, 15 Dec 2021 06:48:33 +0000 Received: from mail-mr2fra01on0609.outbound.protection.outlook.com ([2a01:111:f400:7e19::609] helo=FRA01-MR2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxO2V-00GxNe-Fy for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 06:45:25 +0000 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: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=csgroup.eu; 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?+KsT3vuJ91vHBBq2hHjUAg1XR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46LCwBzng?= =?iso-8859-1?q?MGLxzJblL24UGFeNJXVe6njat03bL90J6N9USDcdR27jZ/G8xSS0dXVuyiGR?= =?iso-8859-1?q?TVVgGNRLlTzt8OMe4BBK3mdCQ87MfxJjeGfI4bFEEDPxSqHHyB6p4S7Z0J0a?= =?iso-8859-1?q?MtY3otIwLiHNqrjdiEnvwKJyaPWZk7NHYm7kUK851rf6n2SixyHzmAa2y8qm?= =?iso-8859-1?q?4j7bfngXKJ8AvU6Ri39XBkb5AwuIpj0PgjdZs6fZRlbLoJ6dMEGg17pWRBlm?= =?iso-8859-1?q?VbGo1/Sb6KWm7wosfHWgJOfpQxlmqYZ+X3/w6+Wdn/dFMQNHmixJwtYz7BQ9?= =?iso-8859-1?q?zkb7Wqxazu3R8as6f2Uy5IHaTz4p+Guj3XIvzI6berLAW/66cMuy/Snx7m9+?= =?iso-8859-1?q?AbJSJhW0EKXQ4BmZ4LE7R2khipPe8z8aisUDJZIsTYDvASZ0aHS3wuDN7NOY?= =?iso-8859-1?q?SHS/DcHcJ8qL0fqwfkRwlrbs3j3OJvJDxwtffgVVzeNgJ4+ZBPDLRvdK9MVi?= =?iso-8859-1?q?6e9c=3D?= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211214_224523_599336_75FB4A8C X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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