Message ID | 523780f4ba5497efb738f9e25e43f23263e125ec.1639736449.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 28DAAC433EF for <linux-arm-kernel@archiver.kernel.org>; Fri, 17 Dec 2021 10:31:29 +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=V1zeDZOHhOKyvr lA6C6lv/dg4lktaqQOuILjZZ7s+jRx0oiObmshL0cwoSKezJZCh1DoOFoZFKYb3WFPPj/lOoI4CWS Sr/gX6KzMXYFJpJqDwYj71S7XnvfqrSqsBUjjs6OJvw/B/98qsE6rYsEU4eNTpKNcrM9Ux0TboVjh 8ooGaCJIEFuBqPQ81tBAsRdTL/QR40nXPhnLKAQIFE4P+U3r/+JZbF+TRhZhATbU8cNnMl1qNgwaq wDQYW18ILzSSnMg5QebZqkA5SBVypM+Z+qP8qeDw5BuingsndeR1miD+2nRbnXWhMioQ72eHu1Ge/ Fs+VaBPUsp6TRR4M+PRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1myAUo-009V8V-LB; Fri, 17 Dec 2021 10:29:51 +0000 Received: from mail-mr2fra01on0618.outbound.protection.outlook.com ([2a01:111:f400:7e19::618] helo=FRA01-MR2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1myASj-009UGi-Tn for linux-arm-kernel@lists.infradead.org; Fri, 17 Dec 2021 10:27:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AHPGzv2FR88/XJUOuIU0IbdqkKzNZNz3d8f5rF0sb281LQ0zYquLBx3m4tmtzjPWimFhjvjQ1UIg1zzvjI9qhEbZtgKZto5CnLESDXzZA1oqOl0LiHgtwbJB3vBFIZjYSXeHumaLHinLGtRc9DHkUn+TuNL4qasqFFQtaU6Z5VhDkXsQWGJ/4rGRSINreWo932v1rFD7/fDlPh3kUzOh37rUw4E7NMXPNAZCjHqyBgZhWKwHLN8vetiUkF4guaxOi/RnWCjhsSKklxz55hhSFSP/yqaJmQzmZagHKnOkbBnBA0iD+04ATRfPwC3Zhx7LO2FeRc40aXTM03ZDq1AmPA== 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=ku3AgqusDhFMB2IrnUXRWJLCliQ4qWarYufXB7H7g9woXu3laHx02d33tc9EkFQMjQJji5kp0DqXwdLrUoQbd0BHXSVjjv6Vcd7QE9UlsCJmrCKkRksWXIHqP9aSANJ4nl2pd7zhH699OoOJ10xjn3l5udYQ7dgljhmsgnSvmXzE/KuYlZId0Gc4JQsRycJ6SESxpnUGrkzNZ5RUmLqGvtM69B9Gn3nEBc2AP3xXx9VWubRmuFkc7jJNMX+5zxMGotTTgP6dG4dqvwPfFpoSx5/wF8tIEhpfOmof0XkfbzqW8hjf21plUp2gB85XDtaf3Ulqj03fZ+BFCwfzQL3NwQ== 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 MR2P264MB0194.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Fri, 17 Dec 2021 10:27:38 +0000 Received: from MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM ([fe80::f0ef:856d:b0de:e85d]) by MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM ([fe80::f0ef:856d:b0de:e85d%5]) with mapi id 15.20.4801.016; Fri, 17 Dec 2021 10:27:38 +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 v6 06/14] powerpc/mm: Move vma_mmu_pagesize() Thread-Topic: [PATCH v6 06/14] powerpc/mm: Move vma_mmu_pagesize() Thread-Index: AQHX8zC28dayHdKkFEWOgBWA0YYl1A== Date: Fri, 17 Dec 2021 10:27:38 +0000 Message-ID: <523780f4ba5497efb738f9e25e43f23263e125ec.1639736449.git.christophe.leroy@csgroup.eu> References: <cover.1639736449.git.christophe.leroy@csgroup.eu> In-Reply-To: <cover.1639736449.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: 5b03f6d4-da12-4bbe-5178-08d9c147d95c x-ms-traffictypediagnostic: MR2P264MB0194:EE_ x-microsoft-antispam-prvs: <MR2P264MB0194C1B07CF64D94E5509F61ED789@MR2P264MB0194.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: wUX3LCxBnvwgDSGbyBjVKvmqLBxBM0AdyJ4E2pMORh9fJ6J2kULjLFEffKTKnFapdz1J7SNFhIFYlm/Gq+MqWvtt7Ypmd+/gRpzaVmZwCO3mWSybGAqu7Ds+JxGP8yPIZ4tn36wFYzDJVbJbdSsxfVfdXJAUEta1M48JjS+vmjh3Y6Pzls1N0bssm/Teku04QhME101ZnW4wyiMWSBd3P55QamWkaf/LCQyg0Id+q68aIzEK2cmrMTA0wPG0fwRMKefEfCujIXaeUJM2anad06VJE45sx0YkyqxhbMtuN7+iA8mI9TeODiRu55rU1P2bK+/ER2nWpvCq5/fNBm4T418AMbKacVisXoWs/2dUmAo8Xanp/928246NZq+g3cPn2omULAC8JqETttVk3Xo1t7uU+PJ6EntTs1AjcTTqiPlXCA+2P40FdqDtDN8kI75ovc17uTB4ncZTlvNGjcUAjDq6qarw2OsquBzq8EVXbdlT9HYZzPunWV6zAeetWpTegbXSfXJy8DotTGCHJ8HqBgrsbXcafkrYi21XJCY50PibzG3LU1hYyPiRE0FxBSZbO2BdliaiC0Q9GLYnWhjmNGb/ADquBa9bg7GwMkBCyvc1j5U/6Z/qvSwNdpmA6bjs0gZIh/r3ebH4H2X8YWl/JhOJ2OLHldoQ1bxVlz2VEwS6s2wSr3tjrf5Ht/GuxkakAsv3fDnPUuxOZV96WEjZNg== 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)(122000001)(2906002)(66476007)(66556008)(7416002)(36756003)(316002)(38100700002)(186003)(44832011)(6506007)(66946007)(91956017)(6486002)(26005)(508600001)(4326008)(76116006)(2616005)(8676002)(8936002)(66446008)(71200400001)(83380400001)(110136005)(64756008)(38070700005)(6512007)(54906003)(5660300002)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?HYa0f8vPEkCKHm4QkTbUFNi?= =?iso-8859-1?q?zQS0vRP1F7ULWXgLPI19L81aPzjnfHwojLFLLWtQy9SIWLmdxi1R1Mvi7pZi?= =?iso-8859-1?q?Zs2y2Wg5vZIXiAOu870L1oqN2ocGDbO0P5MIiqqijUT6P+BWaHCWdZjf0eti?= =?iso-8859-1?q?6Y+5fWDLPXVd8UTBQ9w/D28Atr3h6xM8hM+8p7ykmraioR8k2+y2piDADfcE?= =?iso-8859-1?q?L0dvV+aDBzv8pdsyXuY5G7burMJWbCYmF0w8a5shQ4dpIiG0qU4xbZ+VJ01K?= =?iso-8859-1?q?wdTFdUOnBvSoN2Upj53PCdt5yyNhhJwxJc5Kw95nzswO5SzBjWAP78TYARnq?= =?iso-8859-1?q?nUpnjBIvFHGrNX5JlIJppgd8ymfdkOrOxVyaT91srt57eUnIRPuU4yp2IH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?q?IkoFKxCEOnAUM7KOVcVQzwtdFQF56upLSWdije+kbounIiKnmmKrJgHofmku?= =?iso-8859-1?q?+eyh8T6p1jZeKZnu5RPjX9obaYaam4/lyhIc5Gwv/W1H7+dv9MfgT9pDKClt?= =?iso-8859-1?q?kUyF5B1QktzTrpS56rXJ1l8TpaEX2PSMSqtC2vN2UCGVe8JstewgW6D88tIK?= =?iso-8859-1?q?OIx+TLgUbWc5UpqDYFITA9IZwsVcOMYdh0CW+cOrswDD9bCJMHlLTGDoznIi?= =?iso-8859-1?q?QvQRQM7gEmu4lCQAULzYbLW+gYrOQ6E7iJoMgxGbrNXgD6hpTUPhDdztyc+z?= =?iso-8859-1?q?gpXKpZvjZpAWhWQKpbcN/azXgC8ij72OJV5N+gU4Et8VmlYcTIIo1wQGb8+0?= =?iso-8859-1?q?tCDz4bajF8o/47kw7aTXxOiJlKbY8PfNG24hNj1GjUUbYIDdEBrv1uHsQGYr?= =?iso-8859-1?q?EaOaQ/3+OSqMYveP7gmbXndxpspuEgRs59c/20Pe8zKQ+KSKa7VtN+exo2bo?= =?iso-8859-1?q?Qz08=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: 5b03f6d4-da12-4bbe-5178-08d9c147d95c X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2021 10:27:38.2243 (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: GavLUNWdgE7VFLHAQ0X6gEJ3fSFx0h9iYWcq41QJ9mSoHboRubvIT2PvnSpaCBsa6PjhCGcDycvUTQEW14/0GQcfpmbjXM2YcZlxRoMioio= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MR2P264MB0194 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211217_022741_998629_FB073C6E X-CRM114-Status: UNSURE ( 8.68 ) 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