From nobody Thu Oct 2 21:58:18 2025 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 317C41684A4 for ; Wed, 10 Sep 2025 14:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.17.235.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757514039; cv=none; b=tbldtxsmwbu7mZqzow6877ytIHIGhK+Wdgk3pY7WtonpqhWuVAtNSOiOYsYI812CcCTeKo08iyGuojy/ibpnDuWNcmIW9bQESiek9mfryPkqEkVrdaY2iKYe87sVJLXYoywLFvfoomlHh7eter8aaqG1LIFNc7x3MiSjRLb3ho0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757514039; c=relaxed/simple; bh=1JhGvn0Zq73HCABiCOie7GJMDFSwRV1tK2wEfKXxn5o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kte1ZJkyuRR9KL0osnrQX/4lU05Jt5B+kuPl1SHptMoR5XkalrAOroIK5OQejQwvmhckqnNS5TfXK73l4XwRpW4UsM4LMdZZH1/J5Dx1X44cDZJgSWqXpMzHgxuwQ5OkiYsazMlNLDGN4MF7YBCOVyFluyw8eawL5pvl2on31q4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu; spf=pass smtp.mailfrom=csgroup.eu; arc=none smtp.client-ip=93.17.235.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=csgroup.eu Received: from localhost (mailhub4.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4cMMSr5SRtz9sj9; Wed, 10 Sep 2025 15:47:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LOSqZWIcaoRl; Wed, 10 Sep 2025 15:47:40 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4cMMSr3mRSz9sj8; Wed, 10 Sep 2025 15:47:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5F80E8B796; Wed, 10 Sep 2025 15:47:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id WA3MR1UUAydb; Wed, 10 Sep 2025 15:47:40 +0200 (CEST) Received: from PO20335.idsi0.si.c-s.fr (unknown [192.168.235.99]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 95C828B764; Wed, 10 Sep 2025 15:47:39 +0200 (CEST) From: Christophe Leroy To: Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Madhavan Srinivasan Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH] powerpc: Remove CONFIG_HIGHMEM Date: Wed, 10 Sep 2025 15:47:00 +0200 Message-ID: <28d908b95fe358129db18f69b30891788e15ada0.1757512010.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1757512026; l=40253; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=1JhGvn0Zq73HCABiCOie7GJMDFSwRV1tK2wEfKXxn5o=; b=84v22WReckdnopmG+ObRipH0vPlQzi0sjPDTHWFbNG3YPTKHiJcVnJaDno6MBTsoLH0JI2Qy+ pCclk5U3ManBAdGGb9GOUh3BD/WJ+c/+ImqHM+EJzjmkrcGhLNjUbbY X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There are some discussion around to opportunity to get rid of CONFIG_HIGHMEM, see [1]. This RFC is a tentative to remove it from powerpc so that people can experiment what it would look like and what would be the outcomes. CONFIG_HIGHMEM is being depracated, remove it. To accomodate boards with up to 1Gbytes RAM, PAGE_OFFSET and TASK_SIZE is adjusted to 0xb0000000 (a0000000 on book3s/32 with modules). If you have more than 1Gbytes of RAM you can adjust CONFIG_LOWMEM_SIZE. [1] https://lore.kernel.org/all/4ff89b72-03ff-4447-9d21-dd6a5fe1550f@app.fa= stmail.com/ Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 17 ++--- arch/powerpc/configs/44x/akebono_defconfig | 1 - arch/powerpc/configs/44x/currituck_defconfig | 1 - arch/powerpc/configs/44x/icon_defconfig | 1 - arch/powerpc/configs/85xx-32bit.config | 1 - arch/powerpc/configs/85xx/ge_imp3a_defconfig | 1 - arch/powerpc/configs/85xx/ksi8560_defconfig | 1 - arch/powerpc/configs/85xx/ppa8548_defconfig | 7 -- arch/powerpc/configs/85xx/stx_gp3_defconfig | 1 - arch/powerpc/configs/85xx/tqm8548_defconfig | 1 - .../configs/85xx/xes_mpc85xx_defconfig | 1 - arch/powerpc/configs/amigaone_defconfig | 1 - arch/powerpc/configs/chrp32_defconfig | 1 - arch/powerpc/configs/mpc86xx_base.config | 1 - arch/powerpc/configs/pmac32_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 2 - arch/powerpc/crypto/aes-gcm-p10-glue.c | 2 +- arch/powerpc/include/asm/book3s/32/pgtable.h | 10 --- arch/powerpc/include/asm/fixmap.h | 8 --- arch/powerpc/include/asm/highmem.h | 70 ------------------- arch/powerpc/include/asm/kexec.h | 1 - arch/powerpc/include/asm/kvm_ppc.h | 1 - arch/powerpc/include/asm/nohash/32/pgtable.h | 10 --- arch/powerpc/kvm/book3s.c | 1 - arch/powerpc/kvm/book3s_32_mmu.c | 1 - arch/powerpc/kvm/book3s_64_mmu.c | 1 - arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 - arch/powerpc/kvm/book3s_64_vio.c | 1 - arch/powerpc/kvm/book3s_hv.c | 1 - arch/powerpc/kvm/book3s_hv_uvmem.c | 2 +- arch/powerpc/kvm/book3s_pr.c | 1 - arch/powerpc/kvm/e500_mmu.c | 1 - arch/powerpc/kvm/e500_mmu_host.c | 16 ++++- arch/powerpc/mm/book3s32/mmu.c | 1 - arch/powerpc/mm/book3s32/tlb.c | 1 - arch/powerpc/mm/cacheflush.c | 69 ++---------------- arch/powerpc/mm/dma-noncoherent.c | 48 +------------ arch/powerpc/mm/fault.c | 1 - arch/powerpc/mm/init_32.c | 3 - arch/powerpc/mm/init_64.c | 1 - arch/powerpc/mm/mem.c | 18 ----- arch/powerpc/mm/nohash/e500.c | 1 - arch/powerpc/mm/nohash/tlb.c | 1 - arch/powerpc/mm/nohash/tlb_64e.c | 7 +- arch/powerpc/mm/pageattr.c | 3 - arch/powerpc/mm/pgtable_32.c | 1 - arch/powerpc/mm/ptdump/ptdump.c | 9 --- arch/powerpc/platforms/44x/pci.c | 3 +- arch/powerpc/platforms/85xx/smp.c | 5 +- arch/powerpc/platforms/ps3/system-bus.c | 2 +- arch/powerpc/xmon/xmon.c | 1 - 51 files changed, 34 insertions(+), 308 deletions(-) delete mode 100644 arch/powerpc/include/asm/highmem.h diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 93402a1d9c9f..fec1db5fcb97 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -482,11 +482,6 @@ source "arch/powerpc/platforms/Kconfig" =20 menu "Kernel options" =20 -config HIGHMEM - bool "High memory support" - depends on PPC32 - select KMAP_LOCAL - source "kernel/Kconfig.hz" =20 config MATH_EMULATION @@ -1193,7 +1188,7 @@ config LOWMEM_SIZE_BOOL =20 config LOWMEM_SIZE hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL - default "0x30000000" + default "0x40000000" =20 config LOWMEM_CAM_NUM_BOOL bool "Set number of CAMs to use to map low memory" @@ -1245,7 +1240,7 @@ config PAGE_OFFSET_BOOL =20 config PAGE_OFFSET hex "Virtual address of memory base" if PAGE_OFFSET_BOOL - default "0xc0000000" + default "0xb0000000" =20 config KERNEL_START_BOOL bool "Set custom kernel base address" @@ -1261,8 +1256,8 @@ config KERNEL_START_BOOL config KERNEL_START hex "Virtual address of kernel base" if KERNEL_START_BOOL default PAGE_OFFSET if PAGE_OFFSET_BOOL - default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL - default "0xc0000000" + default "0xb2000000" if CRASH_DUMP && !NONSTATIC_KERNEL + default "0xb0000000" =20 config PHYSICAL_START_BOOL bool "Set physical address where the kernel is loaded" @@ -1298,8 +1293,8 @@ config TASK_SIZE_BOOL config TASK_SIZE hex "Size of user task space" if TASK_SIZE_BOOL default "0x80000000" if PPC_8xx - default "0xb0000000" if PPC_BOOK3S_32 && EXECMEM - default "0xc0000000" + default "0xa0000000" if PPC_BOOK3S_32 && EXECMEM + default "0xb0000000" =20 config MODULES_SIZE_BOOL bool "Set custom size for modules/execmem area" diff --git a/arch/powerpc/configs/44x/akebono_defconfig b/arch/powerpc/conf= igs/44x/akebono_defconfig index 1882eb2da354..816e7bdfffe7 100644 --- a/arch/powerpc/configs/44x/akebono_defconfig +++ b/arch/powerpc/configs/44x/akebono_defconfig @@ -14,7 +14,6 @@ CONFIG_MODULE_UNLOAD=3Dy CONFIG_PPC_47x=3Dy # CONFIG_EBONY is not set CONFIG_AKEBONO=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_HZ_100=3Dy CONFIG_IRQ_ALL_CPUS=3Dy # CONFIG_COMPACTION is not set diff --git a/arch/powerpc/configs/44x/currituck_defconfig b/arch/powerpc/co= nfigs/44x/currituck_defconfig index 7283b7d4a1a5..a20ee612e1ef 100644 --- a/arch/powerpc/configs/44x/currituck_defconfig +++ b/arch/powerpc/configs/44x/currituck_defconfig @@ -12,7 +12,6 @@ CONFIG_MODULE_UNLOAD=3Dy CONFIG_PPC_47x=3Dy # CONFIG_EBONY is not set CONFIG_CURRITUCK=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_HZ_100=3Dy CONFIG_MATH_EMULATION=3Dy CONFIG_IRQ_ALL_CPUS=3Dy diff --git a/arch/powerpc/configs/44x/icon_defconfig b/arch/powerpc/configs= /44x/icon_defconfig index fb9a15573546..42d27bc70ab7 100644 --- a/arch/powerpc/configs/44x/icon_defconfig +++ b/arch/powerpc/configs/44x/icon_defconfig @@ -8,7 +8,6 @@ CONFIG_MODULES=3Dy CONFIG_MODULE_UNLOAD=3Dy # CONFIG_EBONY is not set CONFIG_ICON=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_PCIEPORTBUS=3Dy # CONFIG_PCIEASPM is not set CONFIG_NET=3Dy diff --git a/arch/powerpc/configs/85xx-32bit.config b/arch/powerpc/configs/= 85xx-32bit.config index a85310bcb1fd..f96db0bc888f 100644 --- a/arch/powerpc/configs/85xx-32bit.config +++ b/arch/powerpc/configs/85xx-32bit.config @@ -1,5 +1,4 @@ CONFIG_PPC64=3Dn -CONFIG_HIGHMEM=3Dy CONFIG_KEXEC=3Dy CONFIG_PPC_85xx=3Dy CONFIG_PROC_KCORE=3Dy diff --git a/arch/powerpc/configs/85xx/ge_imp3a_defconfig b/arch/powerpc/co= nfigs/85xx/ge_imp3a_defconfig index 7beb36a41d45..da9f649107dc 100644 --- a/arch/powerpc/configs/85xx/ge_imp3a_defconfig +++ b/arch/powerpc/configs/85xx/ge_imp3a_defconfig @@ -23,7 +23,6 @@ CONFIG_MODULE_UNLOAD=3Dy CONFIG_GE_IMP3A=3Dy CONFIG_QE_GPIO=3Dy CONFIG_CPM2=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_HZ_1000=3Dy CONFIG_PREEMPT=3Dy # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set diff --git a/arch/powerpc/configs/85xx/ksi8560_defconfig b/arch/powerpc/con= figs/85xx/ksi8560_defconfig index 9cb211fb6d1e..f2ac1fc41303 100644 --- a/arch/powerpc/configs/85xx/ksi8560_defconfig +++ b/arch/powerpc/configs/85xx/ksi8560_defconfig @@ -9,7 +9,6 @@ CONFIG_PARTITION_ADVANCED=3Dy CONFIG_KSI8560=3Dy CONFIG_CPM2=3Dy CONFIG_GEN_RTC=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_BINFMT_MISC=3Dy CONFIG_MATH_EMULATION=3Dy # CONFIG_SECCOMP is not set diff --git a/arch/powerpc/configs/85xx/ppa8548_defconfig b/arch/powerpc/con= figs/85xx/ppa8548_defconfig index 4bd5f993d26a..2aab8602d71e 100644 --- a/arch/powerpc/configs/85xx/ppa8548_defconfig +++ b/arch/powerpc/configs/85xx/ppa8548_defconfig @@ -10,15 +10,8 @@ CONFIG_RAPIDIO_ENUM_BASIC=3Dy CONFIG_RAPIDIO_CPS_XX=3Dy CONFIG_RAPIDIO_CPS_GEN2=3Dy CONFIG_ADVANCED_OPTIONS=3Dy -CONFIG_LOWMEM_SIZE_BOOL=3Dy -CONFIG_LOWMEM_SIZE=3D0x40000000 CONFIG_LOWMEM_CAM_NUM_BOOL=3Dy CONFIG_LOWMEM_CAM_NUM=3D4 -CONFIG_PAGE_OFFSET_BOOL=3Dy -CONFIG_PAGE_OFFSET=3D0xb0000000 -CONFIG_KERNEL_START_BOOL=3Dy -CONFIG_TASK_SIZE_BOOL=3Dy -CONFIG_TASK_SIZE=3D0xb0000000 CONFIG_NET=3Dy CONFIG_INET=3Dy CONFIG_IP_PNP=3Dy diff --git a/arch/powerpc/configs/85xx/stx_gp3_defconfig b/arch/powerpc/con= figs/85xx/stx_gp3_defconfig index 0a42072fa23c..1033977711d6 100644 --- a/arch/powerpc/configs/85xx/stx_gp3_defconfig +++ b/arch/powerpc/configs/85xx/stx_gp3_defconfig @@ -7,7 +7,6 @@ CONFIG_MODULES=3Dy CONFIG_MODVERSIONS=3Dy # CONFIG_BLK_DEV_BSG is not set CONFIG_STX_GP3=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_BINFMT_MISC=3Dm CONFIG_MATH_EMULATION=3Dy CONFIG_PCI=3Dy diff --git a/arch/powerpc/configs/85xx/tqm8548_defconfig b/arch/powerpc/con= figs/85xx/tqm8548_defconfig index afa1b9b633f8..06928dd9bd88 100644 --- a/arch/powerpc/configs/85xx/tqm8548_defconfig +++ b/arch/powerpc/configs/85xx/tqm8548_defconfig @@ -11,7 +11,6 @@ CONFIG_MODULE_UNLOAD=3Dy CONFIG_PARTITION_ADVANCED=3Dy # CONFIG_MSDOS_PARTITION is not set CONFIG_TQM8548=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_BINFMT_MISC=3Dy CONFIG_MATH_EMULATION=3Dy # CONFIG_SECCOMP is not set diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc= /configs/85xx/xes_mpc85xx_defconfig index 488d03ae6d6c..10764fad2eb9 100644 --- a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig +++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig @@ -18,7 +18,6 @@ CONFIG_MODVERSIONS=3Dy # CONFIG_BLK_DEV_BSG is not set CONFIG_PARTITION_ADVANCED=3Dy CONFIG_XES_MPC85xx=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_MATH_EMULATION=3Dy CONFIG_PCI=3Dy CONFIG_PCIEPORTBUS=3Dy diff --git a/arch/powerpc/configs/amigaone_defconfig b/arch/powerpc/configs= /amigaone_defconfig index 69ef3dc31c4b..f9e02bd217d6 100644 --- a/arch/powerpc/configs/amigaone_defconfig +++ b/arch/powerpc/configs/amigaone_defconfig @@ -18,7 +18,6 @@ CONFIG_AMIGA_PARTITION=3Dy # CONFIG_PPC_CHRP is not set # CONFIG_PPC_PMAC is not set CONFIG_AMIGAONE=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_BINFMT_MISC=3Dy CONFIG_NET=3Dy CONFIG_PACKET=3Dy diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/c= hrp32_defconfig index b799c95480ae..304de18b51f8 100644 --- a/arch/powerpc/configs/chrp32_defconfig +++ b/arch/powerpc/configs/chrp32_defconfig @@ -17,7 +17,6 @@ CONFIG_PARTITION_ADVANCED=3Dy CONFIG_MAC_PARTITION=3Dy # CONFIG_PPC_PMAC is not set CONFIG_GEN_RTC=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_BINFMT_MISC=3Dy CONFIG_IRQ_ALL_CPUS=3Dy CONFIG_ISA=3Dy diff --git a/arch/powerpc/configs/mpc86xx_base.config b/arch/powerpc/config= s/mpc86xx_base.config index 632c014b122d..a1ca1f7da240 100644 --- a/arch/powerpc/configs/mpc86xx_base.config +++ b/arch/powerpc/configs/mpc86xx_base.config @@ -3,6 +3,5 @@ CONFIG_GEF_PPC9A=3Dy CONFIG_GEF_SBC310=3Dy CONFIG_GEF_SBC610=3Dy CONFIG_MVME7100=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_KEXEC=3Dy CONFIG_PROC_KCORE=3Dy diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/p= mac32_defconfig index ae45f70b29f0..24e73489947a 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig @@ -20,7 +20,6 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=3Dy CONFIG_CPU_FREQ_GOV_USERSPACE=3Dy CONFIG_CPU_FREQ_PMAC=3Dy CONFIG_GEN_RTC=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_BINFMT_MISC=3Dm CONFIG_HIBERNATION=3Dy CONFIG_PM_DEBUG=3Dy diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/p= pc6xx_defconfig index bb359643ddc1..75b44ce12332 100644 --- a/arch/powerpc/configs/ppc6xx_defconfig +++ b/arch/powerpc/configs/ppc6xx_defconfig @@ -60,7 +60,6 @@ CONFIG_TAU=3Dy CONFIG_TAU_AVERAGE=3Dy CONFIG_QE_GPIO=3Dy CONFIG_MCU_MPC8349EMITX=3Dy -CONFIG_HIGHMEM=3Dy CONFIG_HZ_1000=3Dy CONFIG_PREEMPT_VOLUNTARY=3Dy CONFIG_BINFMT_MISC=3Dy @@ -1045,7 +1044,6 @@ CONFIG_DEBUG_OBJECTS_TIMERS=3Dy CONFIG_SLUB_DEBUG_ON=3Dy CONFIG_DEBUG_STACK_USAGE=3Dy CONFIG_DEBUG_VM=3Dy -CONFIG_DEBUG_HIGHMEM=3Dy CONFIG_DEBUG_STACKOVERFLOW=3Dy CONFIG_DEBUG_SHIRQ=3Dy CONFIG_DEBUG_RT_MUTEXES=3Dy diff --git a/arch/powerpc/crypto/aes-gcm-p10-glue.c b/arch/powerpc/crypto/a= es-gcm-p10-glue.c index 85f4fd4b1bdc..cba2a42be9cd 100644 --- a/arch/powerpc/crypto/aes-gcm-p10-glue.c +++ b/arch/powerpc/crypto/aes-gcm-p10-glue.c @@ -233,7 +233,7 @@ static int p10_aes_gcm_crypt(struct aead_request *req, = u8 *riv, =20 /* Linearize assoc, if not already linear */ if (req->src->length >=3D assoclen && req->src->length) { - assoc =3D sg_virt(req->src); /* ppc64 is !HIGHMEM */ + assoc =3D sg_virt(req->src); } else { gfp_t flags =3D (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? GFP_KERNEL : GFP_ATOMIC; diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/in= clude/asm/book3s/32/pgtable.h index 87dcca962be7..64c106b72da3 100644 --- a/arch/powerpc/include/asm/book3s/32/pgtable.h +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h @@ -139,12 +139,6 @@ void unmap_kernel_page(unsigned long va); =20 #endif /* !__ASSEMBLER__ */ =20 -/* - * This is the bottom of the PKMAP area with HIGHMEM or an arbitrary - * value (for now) on others, from where we can start layout kernel - * virtual space that goes below PKMAP and FIXMAP - */ - #define FIXADDR_SIZE 0 #ifdef CONFIG_KASAN #include @@ -158,11 +152,7 @@ void unmap_kernel_page(unsigned long va); * until mem_init() at which point this becomes the top of the vmalloc * and ioremap space */ -#ifdef CONFIG_HIGHMEM -#define IOREMAP_TOP PKMAP_BASE -#else #define IOREMAP_TOP FIXADDR_START -#endif =20 /* PPC32 shares vmalloc area with ioremap */ #define IOREMAP_START VMALLOC_START diff --git a/arch/powerpc/include/asm/fixmap.h b/arch/powerpc/include/asm/f= ixmap.h index bc5109eab5b7..6d46fc296909 100644 --- a/arch/powerpc/include/asm/fixmap.h +++ b/arch/powerpc/include/asm/fixmap.h @@ -18,10 +18,6 @@ #include #include #include -#ifdef CONFIG_HIGHMEM -#include -#include -#endif =20 /* * Here we define all the compile-time 'special' virtual @@ -47,10 +43,6 @@ enum fixed_addresses { /* reserve the top 128K for early debugging purposes */ FIX_EARLY_DEBUG_TOP =3D FIX_HOLE, FIX_EARLY_DEBUG_BASE =3D FIX_EARLY_DEBUG_TOP+(ALIGN(SZ_128K, PAGE_SIZE)/P= AGE_SIZE)-1, -#ifdef CONFIG_HIGHMEM - FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ - FIX_KMAP_END =3D FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1, -#endif #ifdef CONFIG_PPC_8xx /* For IMMR we need an aligned 512K area */ #define FIX_IMMR_SIZE (512 * 1024 / PAGE_SIZE) diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/= highmem.h deleted file mode 100644 index c0fcd1bbdba9..000000000000 --- a/arch/powerpc/include/asm/highmem.h +++ /dev/null @@ -1,70 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * highmem.h: virtual kernel memory mappings for high memory - * - * PowerPC version, stolen from the i386 version. - * - * Used in CONFIG_HIGHMEM systems for memory pages which - * are not addressable by direct kernel virtual addresses. - * - * Copyright (C) 1999 Gerhard Wichert, Siemens AG - * Gerhard.Wichert@pdb.siemens.de - * - * - * Redesigned the x86 32-bit VM architecture to deal with - * up to 16 Terrabyte physical memory. With current x86 CPUs - * we now support up to 64 Gigabytes physical RAM. - * - * Copyright (C) 1999 Ingo Molnar - */ - -#ifndef _ASM_HIGHMEM_H -#define _ASM_HIGHMEM_H - -#ifdef __KERNEL__ - -#include -#include -#include -#include - -extern pte_t *pkmap_page_table; - -/* - * Right now we initialize only a single pte table. It can be extended - * easily, subsequent pte tables have to be allocated in one physical - * chunk of RAM. - */ -/* - * We use one full pte table with 4K pages. And with 16K/64K/256K pages pte - * table covers enough memory (32MB/512MB/2GB resp.), so that both FIXMAP - * and PKMAP can be placed in a single pte table. We use 512 pages for PKM= AP - * in case of 16K/64K/256K page sizes. - */ -#ifdef CONFIG_PPC_4K_PAGES -#define PKMAP_ORDER PTE_SHIFT -#else -#define PKMAP_ORDER 9 -#endif -#define LAST_PKMAP (1 << PKMAP_ORDER) -#ifndef CONFIG_PPC_4K_PAGES -#define PKMAP_BASE (FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1)) -#else -#define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MAS= K) -#endif -#define LAST_PKMAP_MASK (LAST_PKMAP-1) -#define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) -#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) - -#define flush_cache_kmaps() flush_cache_all() - -#define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev) \ - __set_pte_at(mm, vaddr, ptep, ptev, 1) -#define arch_kmap_local_post_map(vaddr, pteval) \ - local_flush_tlb_page(NULL, vaddr) -#define arch_kmap_local_post_unmap(vaddr) \ - local_flush_tlb_page(NULL, vaddr) - -#endif /* __KERNEL__ */ - -#endif /* _ASM_HIGHMEM_H */ diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/ke= xec.h index 4bbf9f699aaa..397bca781111 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h @@ -23,7 +23,6 @@ =20 /* * Maximum address we can reach in physical address mode. - * XXX: I want to allow initrd in highmem. Otherwise set to rmo on LPAR. */ #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) =20 diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/= kvm_ppc.h index ca3829d47ab7..a52abc65f2b0 100644 --- a/arch/powerpc/include/asm/kvm_ppc.h +++ b/arch/powerpc/include/asm/kvm_ppc.h @@ -61,7 +61,6 @@ enum xlate_readwrite { =20 extern int kvmppc_vcpu_run(struct kvm_vcpu *vcpu); extern int __kvmppc_vcpu_run(struct kvm_vcpu *vcpu); -extern void kvmppc_handler_highmem(void); =20 extern void kvmppc_dump_vcpu(struct kvm_vcpu *vcpu); extern int kvmppc_handle_load(struct kvm_vcpu *vcpu, diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/in= clude/asm/nohash/32/pgtable.h index 2d71e4b7cd09..f11c898a32a2 100644 --- a/arch/powerpc/include/asm/nohash/32/pgtable.h +++ b/arch/powerpc/include/asm/nohash/32/pgtable.h @@ -54,12 +54,6 @@ #define pgd_ERROR(e) \ pr_err("%s:%d: bad pgd %08llx.\n", __FILE__, __LINE__, (unsigned long lon= g)pgd_val(e)) =20 -/* - * This is the bottom of the PKMAP area with HIGHMEM or an arbitrary - * value (for now) on others, from where we can start layout kernel - * virtual space that goes below PKMAP and FIXMAP - */ - #define FIXADDR_SIZE 0 #ifdef CONFIG_KASAN #include @@ -73,11 +67,7 @@ * until mem_init() at which point this becomes the top of the vmalloc * and ioremap space */ -#ifdef CONFIG_HIGHMEM -#define IOREMAP_TOP PKMAP_BASE -#else #define IOREMAP_TOP FIXADDR_START -#endif =20 /* PPC32 shares vmalloc area with ioremap */ #define IOREMAP_START VMALLOC_START diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index d79c5d1098c0..7489557f582a 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -20,7 +20,6 @@ #include #include #include -#include =20 #include #include diff --git a/arch/powerpc/kvm/book3s_32_mmu.c b/arch/powerpc/kvm/book3s_32_= mmu.c index 0215f32932a9..efc2135658dc 100644 --- a/arch/powerpc/kvm/book3s_32_mmu.c +++ b/arch/powerpc/kvm/book3s_32_mmu.c @@ -10,7 +10,6 @@ #include #include #include -#include =20 #include #include diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_= mmu.c index 61290282fd9e..92945a74cb24 100644 --- a/arch/powerpc/kvm/book3s_64_mmu.c +++ b/arch/powerpc/kvm/book3s_64_mmu.c @@ -10,7 +10,6 @@ #include #include #include -#include =20 #include #include diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_= 64_mmu_hv.c index f305395cf26e..394f0417189b 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_= vio.c index 742aa58a7c7e..9842657aa52a 100644 --- a/arch/powerpc/kvm/book3s_64_vio.c +++ b/arch/powerpc/kvm/book3s_64_vio.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 7667563fb9ff..b98e14c69e20 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/kvm/book3s_hv_uvmem.c b/arch/powerpc/kvm/book3s_h= v_uvmem.c index 03f8c34fa0a2..8aa0680addf8 100644 --- a/arch/powerpc/kvm/book3s_hv_uvmem.c +++ b/arch/powerpc/kvm/book3s_hv_uvmem.c @@ -547,7 +547,7 @@ static int __kvmppc_svm_page_out(struct vm_area_struct = *vma, if (!is_zone_device_page(spage)) goto out_finalize; =20 - dpage =3D alloc_page_vma(GFP_HIGHUSER, vma, start); + dpage =3D alloc_page_vma(GFP_USER, vma, start); if (!dpage) { ret =3D -1; goto out_finalize; diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 83bcdc80ce51..2ae100709336 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c index e131fbecdcc4..e9e94e053e7b 100644 --- a/arch/powerpc/kvm/e500_mmu.c +++ b/arch/powerpc/kvm/e500_mmu.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_h= ost.c index 06caf8bbbe2b..6f986b4e3c62 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -667,9 +666,20 @@ int kvmppc_load_last_inst(struct kvm_vcpu *vcpu, =20 /* Map a page and get guest's instruction */ page =3D pfn_to_page(pfn); - eaddr =3D (unsigned long)kmap_atomic(page); + if (IS_ENABLED(CONFIG_PREEMPT_RT)) + migrate_disable(); + else + preempt_disable(); + pagefault_disable(); + eaddr =3D (unsigned long)page_address(page); + *instr =3D *(u32 *)(eaddr | (unsigned long)(addr & ~PAGE_MASK)); - kunmap_atomic((u32 *)eaddr); + + pagefault_enable(); + if (IS_ENABLED(CONFIG_PREEMPT_RT)) + migrate_enable(); + else + preempt_enable(); =20 return EMULATE_DONE; } diff --git a/arch/powerpc/mm/book3s32/mmu.c b/arch/powerpc/mm/book3s32/mmu.c index be9c4106e22f..b26ce728cdb0 100644 --- a/arch/powerpc/mm/book3s32/mmu.c +++ b/arch/powerpc/mm/book3s32/mmu.c @@ -20,7 +20,6 @@ #include #include #include -#include #include =20 #include diff --git a/arch/powerpc/mm/book3s32/tlb.c b/arch/powerpc/mm/book3s32/tlb.c index 9ad6b56bfec9..dfd136358644 100644 --- a/arch/powerpc/mm/book3s32/tlb.c +++ b/arch/powerpc/mm/book3s32/tlb.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include =20 diff --git a/arch/powerpc/mm/cacheflush.c b/arch/powerpc/mm/cacheflush.c index 7186516eca52..052c030a577f 100644 --- a/arch/powerpc/mm/cacheflush.c +++ b/arch/powerpc/mm/cacheflush.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later =20 -#include +#include #include =20 /** @@ -76,51 +76,6 @@ void flush_icache_range(unsigned long start, unsigned lo= ng stop) } EXPORT_SYMBOL(flush_icache_range); =20 -#ifdef CONFIG_HIGHMEM -/** - * flush_dcache_icache_phys() - Flush a page by its physical address - * @physaddr: the physical address of the page - */ -static void flush_dcache_icache_phys(unsigned long physaddr) -{ - unsigned long bytes =3D l1_dcache_bytes(); - unsigned long nb =3D PAGE_SIZE / bytes; - unsigned long addr =3D physaddr & PAGE_MASK; - unsigned long msr, msr0; - unsigned long loop1 =3D addr, loop2 =3D addr; - - msr0 =3D mfmsr(); - msr =3D msr0 & ~MSR_DR; - /* - * This must remain as ASM to prevent potential memory accesses - * while the data MMU is disabled - */ - asm volatile( - " mtctr %2;\n" - " mtmsr %3;\n" - " isync;\n" - "0: dcbst 0, %0;\n" - " addi %0, %0, %4;\n" - " bdnz 0b;\n" - " sync;\n" - " mtctr %2;\n" - "1: icbi 0, %1;\n" - " addi %1, %1, %4;\n" - " bdnz 1b;\n" - " sync;\n" - " mtmsr %5;\n" - " isync;\n" - : "+&r" (loop1), "+&r" (loop2) - : "r" (nb), "r" (msr), "i" (bytes), "r" (msr0) - : "ctr", "memory"); -} -NOKPROBE_SYMBOL(flush_dcache_icache_phys) -#else -static void flush_dcache_icache_phys(unsigned long physaddr) -{ -} -#endif - /** * __flush_dcache_icache(): Flush a particular page from the data cache to= RAM. * Note: this is necessary because the instruction cache does *not* @@ -151,26 +106,13 @@ static void __flush_dcache_icache(void *p) void flush_dcache_icache_folio(struct folio *folio) { unsigned int i, nr =3D folio_nr_pages(folio); + void *addr =3D folio_address(folio); =20 if (flush_coherent_icache()) return; =20 - if (!folio_test_highmem(folio)) { - void *addr =3D folio_address(folio); - for (i =3D 0; i < nr; i++) - __flush_dcache_icache(addr + i * PAGE_SIZE); - } else if (IS_ENABLED(CONFIG_BOOKE) || sizeof(phys_addr_t) > sizeof(void = *)) { - for (i =3D 0; i < nr; i++) { - void *start =3D kmap_local_folio(folio, i * PAGE_SIZE); - - __flush_dcache_icache(start); - kunmap_local(start); - } - } else { - unsigned long pfn =3D folio_pfn(folio); - for (i =3D 0; i < nr; i++) - flush_dcache_icache_phys((pfn + i) * PAGE_SIZE); - } + for (i =3D 0; i < nr; i++) + __flush_dcache_icache(addr + i * PAGE_SIZE); } EXPORT_SYMBOL(flush_dcache_icache_folio); =20 @@ -215,7 +157,6 @@ void flush_icache_user_page(struct vm_area_struct *vma,= struct page *page, { void *maddr; =20 - maddr =3D kmap_local_page(page) + (addr & ~PAGE_MASK); + maddr =3D page_address(page) + (addr & ~PAGE_MASK); flush_icache_range((unsigned long)maddr, (unsigned long)maddr + len); - kunmap_local(maddr); } diff --git a/arch/powerpc/mm/dma-noncoherent.c b/arch/powerpc/mm/dma-noncoh= erent.c index 30260b5d146d..0ca7e06c8eb3 100644 --- a/arch/powerpc/mm/dma-noncoherent.c +++ b/arch/powerpc/mm/dma-noncoherent.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include =20 @@ -46,47 +46,6 @@ static void __dma_sync(void *vaddr, size_t size, int dir= ection) } } =20 -#ifdef CONFIG_HIGHMEM -/* - * __dma_sync_page() implementation for systems using highmem. - * In this case, each page of a buffer must be kmapped/kunmapped - * in order to have a virtual address for __dma_sync(). This must - * not sleep so kmap_atomic()/kunmap_atomic() are used. - * - * Note: yes, it is possible and correct to have a buffer extend - * beyond the first page. - */ -static inline void __dma_sync_page_highmem(struct page *page, - unsigned long offset, size_t size, int direction) -{ - size_t seg_size =3D min((size_t)(PAGE_SIZE - offset), size); - size_t cur_size =3D seg_size; - unsigned long flags, start, seg_offset =3D offset; - int nr_segs =3D 1 + ((size - seg_size) + PAGE_SIZE - 1)/PAGE_SIZE; - int seg_nr =3D 0; - - local_irq_save(flags); - - do { - start =3D (unsigned long)kmap_atomic(page + seg_nr) + seg_offset; - - /* Sync this buffer segment */ - __dma_sync((void *)start, seg_size, direction); - kunmap_atomic((void *)start); - seg_nr++; - - /* Calculate next buffer segment size */ - seg_size =3D min((size_t)PAGE_SIZE, size - cur_size); - - /* Add the segment size to our running total */ - cur_size +=3D seg_size; - seg_offset =3D 0; - } while (seg_nr < nr_segs); - - local_irq_restore(flags); -} -#endif /* CONFIG_HIGHMEM */ - /* * __dma_sync_page makes memory consistent. identical to __dma_sync, but * takes a struct page instead of a virtual address @@ -95,13 +54,8 @@ static void __dma_sync_page(phys_addr_t paddr, size_t si= ze, int dir) { struct page *page =3D pfn_to_page(paddr >> PAGE_SHIFT); unsigned offset =3D paddr & ~PAGE_MASK; - -#ifdef CONFIG_HIGHMEM - __dma_sync_page_highmem(page, offset, size, dir); -#else unsigned long start =3D (unsigned long)page_address(page) + offset; __dma_sync((void *)start, size, dir); -#endif } =20 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 806c74e0d5ab..cec4e163f8ac 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 4e71dfe7d026..a5e7cafb50ab 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -96,10 +95,8 @@ void __init MMU_init(void) if (total_lowmem > __max_low_memory) { total_lowmem =3D __max_low_memory; lowmem_end_addr =3D memstart_addr + total_lowmem; -#ifndef CONFIG_HIGHMEM total_memory =3D total_lowmem; memblock_enforce_memory_limit(total_lowmem); -#endif /* CONFIG_HIGHMEM */ } =20 /* Initialize the MMU hardware */ diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index b6f3ae03ca9e..547745ea99e1 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 3ddbfdbfa941..edd6c4964718 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -13,7 +13,6 @@ */ =20 #include -#include #include #include #include @@ -172,9 +171,6 @@ void __init mem_topology_setup(void) { max_low_pfn =3D max_pfn =3D memblock_end_of_DRAM() >> PAGE_SHIFT; min_low_pfn =3D MEMORY_START >> PAGE_SHIFT; -#ifdef CONFIG_HIGHMEM - max_low_pfn =3D lowmem_end_addr >> PAGE_SHIFT; -#endif =20 /* Place all memblock_regions in the same node and merge contiguous * memblock_regions @@ -232,17 +228,6 @@ void __init paging_init(void) phys_addr_t top_of_ram =3D memblock_end_of_DRAM(); int zone_dma_bits; =20 -#ifdef CONFIG_HIGHMEM - unsigned long v =3D __fix_to_virt(FIX_KMAP_END); - unsigned long end =3D __fix_to_virt(FIX_KMAP_BEGIN); - - for (; v < end; v +=3D PAGE_SIZE) - map_kernel_page(v, 0, __pgprot(0)); /* XXX gross */ - - map_kernel_page(PKMAP_BASE, 0, __pgprot(0)); /* XXX gross */ - pkmap_page_table =3D virt_to_kpte(PKMAP_BASE); -#endif /* CONFIG_HIGHMEM */ - printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%llx\n", (unsigned long long)top_of_ram, total_ram); printk(KERN_DEBUG "Memory hole size: %ldMB\n", @@ -264,9 +249,6 @@ void __init paging_init(void) 1UL << (zone_dma_bits - PAGE_SHIFT)); #endif max_zone_pfns[ZONE_NORMAL] =3D max_low_pfn; -#ifdef CONFIG_HIGHMEM - max_zone_pfns[ZONE_HIGHMEM] =3D max_pfn; -#endif =20 free_area_init(max_zone_pfns); =20 diff --git a/arch/powerpc/mm/nohash/e500.c b/arch/powerpc/mm/nohash/e500.c index 266fb22131fc..23b111afbdfd 100644 --- a/arch/powerpc/mm/nohash/e500.c +++ b/arch/powerpc/mm/nohash/e500.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include =20 diff --git a/arch/powerpc/mm/nohash/tlb.c b/arch/powerpc/mm/nohash/tlb.c index 0a650742f3a0..ec1f58b23865 100644 --- a/arch/powerpc/mm/nohash/tlb.c +++ b/arch/powerpc/mm/nohash/tlb.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/mm/nohash/tlb_64e.c b/arch/powerpc/mm/nohash/tlb_= 64e.c index 4f925adf2695..9e2f94ffc90f 100644 --- a/arch/powerpc/mm/nohash/tlb_64e.c +++ b/arch/powerpc/mm/nohash/tlb_64e.c @@ -263,8 +263,7 @@ static void __init early_mmu_set_memory_limit(void) * Limit memory so we dont have linear faults. * Unlike memblock_set_current_limit, which limits * memory available during early boot, this permanently - * reduces the memory available to Linux. We need to - * do this because highmem is not supported on 64-bit. + * reduces the memory available to Linux. */ memblock_enforce_memory_limit(linear_map_top); =20 @@ -290,8 +289,8 @@ void setup_initial_memory_limit(phys_addr_t first_membl= ock_base, /* * On FSL Embedded 64-bit, usually all RAM is bolted, but with * unusual memory sizes it's possible for some RAM to not be mapped - * (such RAM is not used at all by Linux, since we don't support - * highmem on 64-bit). We limit ppc64_rma_size to what would be + * (such RAM is not used at all by Linux. + * We limit ppc64_rma_size to what would be * mappable if this memblock is the only one. Additional memblocks * can only increase, not decrease, the amount that ends up getting * mapped. We still limit max to 1G even if we'll eventually map diff --git a/arch/powerpc/mm/pageattr.c b/arch/powerpc/mm/pageattr.c index ac22bf28086f..2643f50ede1c 100644 --- a/arch/powerpc/mm/pageattr.c +++ b/arch/powerpc/mm/pageattr.c @@ -110,9 +110,6 @@ void __kernel_map_pages(struct page *page, int numpages= , int enable) int err; unsigned long addr =3D (unsigned long)page_address(page); =20 - if (PageHighMem(page)) - return; - if (IS_ENABLED(CONFIG_PPC_BOOK3S_64) && !radix_enabled()) err =3D hash__kernel_map_pages(page, numpages, enable); else if (enable) diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 15276068f657..cf24685df64a 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdum= p.c index b2358d794855..708fdafeb2a3 100644 --- a/arch/powerpc/mm/ptdump/ptdump.c +++ b/arch/powerpc/mm/ptdump/ptdump.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -91,10 +90,6 @@ static struct addr_marker address_markers[] =3D { #else { 0, "Early I/O remap start" }, { 0, "Early I/O remap end" }, -#ifdef CONFIG_HIGHMEM - { 0, "Highmem PTEs start" }, - { 0, "Highmem PTEs end" }, -#endif { 0, "Fixmap start" }, { 0, "Fixmap end" }, #endif @@ -285,10 +280,6 @@ static void populate_markers(void) #else /* !CONFIG_PPC64 */ address_markers[i++].start_address =3D ioremap_bot; address_markers[i++].start_address =3D IOREMAP_TOP; -#ifdef CONFIG_HIGHMEM - address_markers[i++].start_address =3D PKMAP_BASE; - address_markers[i++].start_address =3D PKMAP_ADDR(LAST_PKMAP); -#endif address_markers[i++].start_address =3D FIXADDR_START; address_markers[i++].start_address =3D FIXADDR_TOP; #endif /* CONFIG_PPC64 */ diff --git a/arch/powerpc/platforms/44x/pci.c b/arch/powerpc/platforms/44x/= pci.c index 364aeb86ab64..993ff920caa3 100644 --- a/arch/powerpc/platforms/44x/pci.c +++ b/arch/powerpc/platforms/44x/pci.c @@ -1833,8 +1833,7 @@ static void __init ppc4xx_pciex_port_setup_hose(struc= t ppc4xx_pciex_port *port) hose->last_busno =3D bus_range ? bus_range[1] : 0xff; =20 /* Because of how big mapping the config space is (1M per bus), we - * limit how many busses we support. In the long run, we could replace - * that with something akin to kmap_atomic instead. We set aside 1 bus + * limit how many busses we support. We set aside 1 bus * for the host itself too. */ busses =3D hose->last_busno - hose->first_busno; /* This is off by 1 */ diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85x= x/smp.c index 32fa5fb557c0..f0dad94008b9 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -204,8 +203,8 @@ static int smp_85xx_start_cpu(int cpu) =20 /* * A secondary core could be in a spinloop in the bootpage - * (0xfffff000), somewhere in highmem, or somewhere in lowmem. - * The bootpage and highmem can be accessed via ioremap(), but + * (0xfffff000), somewhere in lowmem. + * The bootpage can be accessed via ioremap(), but * we need to directly access the spinloop if its in lowmem. */ ioremappable =3D *cpu_rel_addr > virt_to_phys(high_memory - 1); diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platfor= ms/ps3/system-bus.c index afbaabf182d0..1f20311ed0c9 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c @@ -510,7 +510,7 @@ static void * ps3_alloc_coherent(struct device *_dev, s= ize_t size, struct ps3_system_bus_device *dev =3D ps3_dev_to_system_bus_dev(_dev); unsigned long virt_addr; =20 - flag &=3D ~(__GFP_DMA | __GFP_HIGHMEM); + flag &=3D ~__GFP_DMA; flag |=3D __GFP_ZERO; =20 virt_addr =3D __get_free_pages(flag, get_order(size)); diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index cb3a3244ae6f..6be4b0ea9a82 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include =20 --=20 2.49.0