From patchwork Wed Dec 15 06:45:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 12696188 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 621DCC433F5 for ; Wed, 15 Dec 2021 06:52:02 +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=dpJWLsIkQiOBML2EmKV9GTyD8wUpZDlzcxnnntNRNME=; b=045v/EmORXOCMc Xu4VLn5RhiXHuK+v+41WdVIcuTZ477c7yaXtYp1WpoTSDMI2uiOeVv6sApFjiDKbTRmWjeSmtwLM7 2pcj27DWwrZxOmqpWXdayGUV8vwxHyTO2lh677rNM2g5WLtZZfmMb5G+Rm1MKljx2PNE62hDC/AF5 E9+xCt7h3PLONTRNSGRtTHc8ZW7jdIG60lmsZRBWwWGNjqP5OgF3zX5oL4QsmAGAbfHJFI15XHGHP zTCr452HJEzxW5ep7mUTSfhGs9N8avHb/v5DalOGT9WQmJeOSsm1JzOYF+uzfFnxUgwPvmhpqfHnY aOX9334Jgxmc46X6Y5Cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxO6h-00Gyzk-9Y; Wed, 15 Dec 2021 06:49:45 +0000 Received: from mail-mr2fra01on0607.outbound.protection.outlook.com ([2a01:111:f400:7e19::607] helo=FRA01-MR2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxO2V-00GxOn-Q1 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=Ldt/Gfn1MZ74aC5mq67T7ENCKRr3VB9TGiKluuSMBGmlzo8m/yDhrES/gmaLbgLSbZegCbD+W1hMxOvSFN0hoeMUUipCzFm1MRPXvFQMcFLBTVVoUp1SdBhTlnymBYQKXQngHbg43L7qvn7JrnNdyIlsE3yFusZ24MAlE/kq2jAq/hXb+kRswaQD04fbeCpwczOaDZIATDRPLFm9N9oOEWAwqi9SGwIW1RHZSE0u+gO2pwNa7hOZckqixkrKTJXN3cGWshgmGyhDdbVDbl3iZXydyXmSbeEwzG9F739Xb7Y4W82vySv7opARtEuLWJpzGXfHBz7YK+ljD/Q8i31wpA== 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=Kal8uZy0vwBrMzZSbVRzSwNCiz8HNSzE2KXYS2+awQQ=; b=CArDeLULztxuAoRxJlx6kMSba5WQB8jbxAXjvqV96CGkEjSNyWM1c5O1qFxwTqdc7KHXWLHF7GNyAH0pjbKEpPCClAjqWwnpeUutuRoueWQ2LUywVfLvINmMvCgjuHou1R4XXVk9WBoCN/FHL1gsJ4RN0YmGfCysrPcPbQq/01ltYgvxT9TYWVex7/sUdLYnlLFzkIf6vpjpYO9Hvezukefl4o1ysbJBIViOv9a6okHRVd84+Lwx8P+e67fOhy6GJQL2LIiL5kKMHnO7qGlggPcokg6BT0r0OXM1p0kJaKeiKMcsoAmF0wJAnT5ldBIcW95X5xnni84bw032szIIzg== 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 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , "alex@ghiti.fr" CC: Christophe Leroy , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "catalin.marinas@arm.com" , "will@kernel.org" , "linux-arm-kernel@lists.infradead.org" , Nicholas Piggin Subject: [PATCH v5 05/11] powerpc/mm: Make slice specific to book3s/64 Thread-Topic: [PATCH v5 05/11] powerpc/mm: Make slice specific to book3s/64 Thread-Index: AQHX8X9PRt5u0RL0BUiKOx05nfM3rw== Date: Wed, 15 Dec 2021 06:45:12 +0000 Message-ID: <13f6dcb4275ddf89e6c36d3d95e9a9b280f711c0.1639550392.git.christophe.leroy@csgroup.eu> References: In-Reply-To: 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: 7432c0e8-3987-48f9-4f17-08d9bf9671d9 x-ms-traffictypediagnostic: MR1P264MB2147:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:178; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: C0D140RxNxv9vEMYD0l9lD2QamBGdlruft64HzxrSb3jFOTx++H95DkgSer7wxGmHBXe7M57ElnNHa1y21WabuOtPDFUiTOhlH60mo86fc3VLJrR+2SIXCCU6b6dl6tGTCs7boMRoxxLR/D/SCloHTnKv68VX51/xYpZDtlblR7IMvA7+0TMK8y6Re9C49xFJ2gCmyKGzubBl1/5Xda/J313DJ6JqZjsNtmEdd3WRUcOR8xyL6ql0EG2OMAw1W+NNuHpBrL5hkkElqz2WhHCLzAlrceGPsN5J1lyAmCcjsGa4voXKM6/k02AZigIbrNdBnjd8kE43yJcWooxAVc/YYH6eHIgboFdo062i201a0ZMGBDxXgikmc/Xe5o+fpbiLch4N+47ly6QVOIBvObS4ww12W0SU3AHq1iFoYsCUNwdrRlHgl3CBT5F7yMId31LNFNPnkSSr2NUwrysEiNw9pQ1hJ5xcn9PF6RAkPzYy3ruvxdVTXqSM0q/Eu4+RrThGQP46DQhfJZiTGczOLJyy+IDT0MKlZJodkxAvbNWkCbl/81mD6brVIlIA1uOaCRAlkg7QLV+xffDfCjRdRrFvXyG8ELGAwh+GUVzDIxUYncJpX+CwcL5RKawuKmFEuVODU4KHNa3LulqfAaaqfxdV7oRuJMvpM2Pcqrcgo0UrG9Zyj2x1kWh2cRMVc1ZQXYtOYNDQ+hB0v1gechwzMhrG1nC1zhSDfB2+ZWQlWXFp9Q= 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)(32563001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?Ggc9YDUQpmwYlBq4DdNUKyM?= =?iso-8859-1?q?PuRUd1so9NxS8ZlAMAgUDcnUKItz8Utm4UqCqmqVe5kJNMf98rQKbqH5/Zgk?= =?iso-8859-1?q?/awNzRhzmY4E3gq6KWYMT3tVbLQq9/vxI4VOqwF5G3FJ8d+JSan0ej2aV5c1?= =?iso-8859-1?q?OVfJayim8J+eYuX0uiTJDQo2ZA6jvzM1dmN4BK0IZjo45rTQzYA2YQ2Rm4WT?= =?iso-8859-1?q?bVrpwEYVoYvqzcK+Hl3D5vucmjqbz7jwGOFj4b0FbaR50W+zgRma/vb2ocaO?= =?iso-8859-1?q?25N30ZPyOcpA/m8TQZDCznQod97dyLppSfgFZeVsAxybu9NzDr8kPYSCVIHW?= =?iso-8859-1?q?8n9npHNEWmZQQOhmfDSoCEXHrwnVLr8PGSz8ZEgw49Z9G+V8usclHdIb0ihm?= =?iso-8859-1?q?Zz4GFOtvvdx8FSEMK/5hwz5wIP4j/0r/+LB7jZ9zQL0PqY9CPoVRYIVAhGOH?= =?iso-8859-1?q?cdnR33jOnsRaM65sRiIJgWIgu7Nju6u71ISUcSKJa0Kr3+5eL/Mn8c7vu11O?= =?iso-8859-1?q?ALvr81VYbFjw04OdHONQwMpSF2JbkpHuO7tEgq8D14A9JnrimaH6jl9Xdh8n?= =?iso-8859-1?q?ltmvdAZukvf4VoZzbOY+HpKAIiIkdtzpTs/vAGs1/YLW/FvGx5J7WN/1tN7W?= =?iso-8859-1?q?7rh9Y/afPRW/uzYgbMreYeTxu4hcB2OGwOoGAZb58/Ucs3Fua3U9UmzlR51f?= =?iso-8859-1?q?ToL4lF4YNVuyPPQ41K5jXsz7P3Hm6t5yF5O/DrH2nD4DGoXt6lI1cgnQBjZ5?= =?iso-8859-1?q?ieTt5SMXBPEc202lzsVZOMw/WyLCnReK6xF2LI0SO6b3UfatdhzPDazlRG0H?= =?iso-8859-1?q?cBitC/LPOA3XsZ8FnDYJ7JahDfWqu1iD5ruE0N2xThT+r1REarZCBJWQ+Fvr?= =?iso-8859-1?q?HN+5Uz8QIEM7+SPsiootyaqg9/PYvLE+ulzapl2ALQqLg3JRnL62tthGkzU4?= =?iso-8859-1?q?X9PunaMWNyCxFEoz8ObQ+6zEa4qSmKufukBPyGIvWRPLSHVvmUDC5O3S1wpj?= =?iso-8859-1?q?hATyoJvhy729zkBnzXl2YuqjEy6SB6oSzbsaqM+a3AsqfejRMbDPHgrzbAIL?= =?iso-8859-1?q?xgvfrMtnYYXC/BE4b9HA7AOBe8IgnuF8l41pMpJ4ooaRVLGKpABAxfH+Hu9s?= =?iso-8859-1?q?qec8/95e/vsx4XeNPIkpyqy7WLohaTCsK+UdPJ47w0e0t9/bE1non8hDKW8+?= =?iso-8859-1?q?Q7+FwgfckFxyY/cQTfY5fsjcOxHIAsNZ6m4lUJdAeFEwseSEiQinZjvsnSp2?= =?iso-8859-1?q?csSXA7LMW459J1TkhEd+9enWVM1A1Qedg5YFfKlghp0rz6+21sXXa+1xmDYF?= =?iso-8859-1?q?ZRqiNqvg7EbrlwotiTP1K3PDImPFQdSeddDt6X1KLOigFfwg7rT9h/QPLTHv?= =?iso-8859-1?q?2H7S2letdDbq3XyN45yU0jsZyemTiZu3BLfV3F+mx5ouYPw28FLvAkN5Txyc?= =?iso-8859-1?q?/lk17U2lYUjX2udd+Tc5QGlmChJ4CmqjmpQWgZWFvYuMuTLZIRUhAy3M9Fkg?= =?iso-8859-1?q?OXp1gEy+fXG1bm9qzgp7xOw9J4x/RuRcN5rlBpzzaEBaPqtVjbtlJ6Q8ZQhE?= =?iso-8859-1?q?GkCumIXO4r7VQCF1Qo4cSD6l+i01cP5iohCC14QFcOnwL4VUFDJQur6t9kpt?= =?iso-8859-1?q?llsP+aMJLr5g6wur67dC3DhR8asg2zWmq1m2ccThlWvHPhyZdOI7xtu2JFpN?= =?iso-8859-1?q?ohq63d4qYfE+Oy1JqbFdSLbpiq2aSrKVdP/fdGIT0s4tFbXbaR9MZ0zLWJMW?= =?iso-8859-1?q?DPuY=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: 7432c0e8-3987-48f9-4f17-08d9bf9671d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2021 06:45:12.3731 (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: olJfMpzZv/aIc45blCa9ACsrr3QnY9kGsEY5Chs4SeSkFJUWorz93I9r2Z4yYEmrRPD2lfvLRgV6p+oFcvll644jRhs/voRRnxpwoyp0rtU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MR1P264MB2147 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211214_224523_932198_BF8CEEAF X-CRM114-Status: GOOD ( 16.15 ) 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 Since commit 555904d07eef ("powerpc/8xx: MM_SLICE is not needed anymore") only book3s/64 selects CONFIG_PPC_MM_SLICES. Move slice.c into mm/book3s64/ Move necessary stuff in asm/book3s/64/slice.h and remove asm/slice.h Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/include/asm/book3s/64/slice.h | 18 ++++++++ arch/powerpc/include/asm/page.h | 1 - arch/powerpc/include/asm/slice.h | 46 ------------------- arch/powerpc/mm/Makefile | 1 - arch/powerpc/mm/book3s64/Makefile | 1 + arch/powerpc/mm/{ => book3s64}/slice.c | 2 - arch/powerpc/mm/nohash/mmu_context.c | 9 ---- arch/powerpc/mm/nohash/tlb.c | 4 -- 9 files changed, 20 insertions(+), 63 deletions(-) delete mode 100644 arch/powerpc/include/asm/slice.h rename arch/powerpc/mm/{ => book3s64}/slice.c (99%) diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h index 21f780942911..1c4eebbc69c9 100644 --- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h +++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h @@ -18,6 +18,7 @@ * complete pgtable.h but only a portion of it. */ #include +#include #include #include diff --git a/arch/powerpc/include/asm/book3s/64/slice.h b/arch/powerpc/include/asm/book3s/64/slice.h index f0d3194ba41b..5b0f7105bc8b 100644 --- a/arch/powerpc/include/asm/book3s/64/slice.h +++ b/arch/powerpc/include/asm/book3s/64/slice.h @@ -2,6 +2,8 @@ #ifndef _ASM_POWERPC_BOOK3S_64_SLICE_H #define _ASM_POWERPC_BOOK3S_64_SLICE_H +#ifndef __ASSEMBLY__ + #define SLICE_LOW_SHIFT 28 #define SLICE_LOW_TOP (0x100000000ul) #define SLICE_NUM_LOW (SLICE_LOW_TOP >> SLICE_LOW_SHIFT) @@ -13,4 +15,20 @@ #define SLB_ADDR_LIMIT_DEFAULT DEFAULT_MAP_WINDOW_USER64 +struct mm_struct; + +unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, + unsigned long flags, unsigned int psize, + int topdown); + +unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr); + +void slice_set_range_psize(struct mm_struct *mm, unsigned long start, + unsigned long len, unsigned int psize); + +void slice_init_new_context_exec(struct mm_struct *mm); +void slice_setup_new_exec(void); + +#endif /* __ASSEMBLY__ */ + #endif /* _ASM_POWERPC_BOOK3S_64_SLICE_H */ diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index 254687258f42..62e0c6f12869 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h @@ -329,6 +329,5 @@ static inline unsigned long kaslr_offset(void) #include #endif /* __ASSEMBLY__ */ -#include #endif /* _ASM_POWERPC_PAGE_H */ diff --git a/arch/powerpc/include/asm/slice.h b/arch/powerpc/include/asm/slice.h deleted file mode 100644 index 0bdd9c62eca0..000000000000 --- a/arch/powerpc/include/asm/slice.h +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ASM_POWERPC_SLICE_H -#define _ASM_POWERPC_SLICE_H - -#ifdef CONFIG_PPC_BOOK3S_64 -#include -#endif - -#ifndef __ASSEMBLY__ - -struct mm_struct; - -#ifdef CONFIG_PPC_MM_SLICES - -#ifdef CONFIG_HUGETLB_PAGE -#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA -#endif -#define HAVE_ARCH_UNMAPPED_AREA -#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN - -unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, - unsigned long flags, unsigned int psize, - int topdown); - -unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr); - -void slice_set_range_psize(struct mm_struct *mm, unsigned long start, - unsigned long len, unsigned int psize); - -void slice_init_new_context_exec(struct mm_struct *mm); -void slice_setup_new_exec(void); - -#else /* CONFIG_PPC_MM_SLICES */ - -static inline void slice_init_new_context_exec(struct mm_struct *mm) {} - -static inline unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr) -{ - return 0; -} - -#endif /* CONFIG_PPC_MM_SLICES */ - -#endif /* __ASSEMBLY__ */ - -#endif /* _ASM_POWERPC_SLICE_H */ diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile index df8172da2301..d4c20484dad9 100644 --- a/arch/powerpc/mm/Makefile +++ b/arch/powerpc/mm/Makefile @@ -14,7 +14,6 @@ obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ obj-$(CONFIG_NUMA) += numa.o -obj-$(CONFIG_PPC_MM_SLICES) += slice.o obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o diff --git a/arch/powerpc/mm/book3s64/Makefile b/arch/powerpc/mm/book3s64/Makefile index 2d50cac499c5..af2f3e75d458 100644 --- a/arch/powerpc/mm/book3s64/Makefile +++ b/arch/powerpc/mm/book3s64/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_PPC_RADIX_MMU) += radix_hugetlbpage.o endif obj-$(CONFIG_SPAPR_TCE_IOMMU) += iommu_api.o obj-$(CONFIG_PPC_PKEY) += pkeys.o +obj-$(CONFIG_PPC_MM_SLICES) += slice.o # Instrumenting the SLB fault path can lead to duplicate SLB entries KCOV_INSTRUMENT_slb.o := n diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/book3s64/slice.c similarity index 99% rename from arch/powerpc/mm/slice.c rename to arch/powerpc/mm/book3s64/slice.c index 8a3ac062b71e..e4382713746d 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/book3s64/slice.c @@ -692,7 +692,6 @@ void slice_init_new_context_exec(struct mm_struct *mm) bitmap_fill(mask->high_slices, SLICE_NUM_HIGH); } -#ifdef CONFIG_PPC_BOOK3S_64 void slice_setup_new_exec(void) { struct mm_struct *mm = current->mm; @@ -704,7 +703,6 @@ void slice_setup_new_exec(void) mm_ctx_set_slb_addr_limit(&mm->context, DEFAULT_MAP_WINDOW); } -#endif void slice_set_range_psize(struct mm_struct *mm, unsigned long start, unsigned long len, unsigned int psize) diff --git a/arch/powerpc/mm/nohash/mmu_context.c b/arch/powerpc/mm/nohash/mmu_context.c index 85b048f04c56..ccd5819b1bd9 100644 --- a/arch/powerpc/mm/nohash/mmu_context.c +++ b/arch/powerpc/mm/nohash/mmu_context.c @@ -317,15 +317,6 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next, */ int init_new_context(struct task_struct *t, struct mm_struct *mm) { - /* - * We have MMU_NO_CONTEXT set to be ~0. Hence check - * explicitly against context.id == 0. This ensures that we properly - * initialize context slice details for newly allocated mm's (which will - * have id == 0) and don't alter context slice inherited via fork (which - * will have id != 0). - */ - if (mm->context.id == 0) - slice_init_new_context_exec(mm); mm->context.id = MMU_NO_CONTEXT; mm->context.active = 0; pte_frag_set(&mm->context, NULL); diff --git a/arch/powerpc/mm/nohash/tlb.c b/arch/powerpc/mm/nohash/tlb.c index 311281063d48..3359cf7c2a61 100644 --- a/arch/powerpc/mm/nohash/tlb.c +++ b/arch/powerpc/mm/nohash/tlb.c @@ -773,9 +773,5 @@ void __init early_init_mmu(void) #ifdef CONFIG_PPC_47x early_init_mmu_47x(); #endif - -#ifdef CONFIG_PPC_MM_SLICES - mm_ctx_set_slb_addr_limit(&init_mm.context, SLB_ADDR_LIMIT_DEFAULT); -#endif } #endif /* CONFIG_PPC64 */