Re: [PATCH 3/4] ARM: drop CONFIG_HIGHPTE support
From: Linus Walleij
Date: Fri Dec 20 2024 - 08:13:38 EST
On Sat, Dec 14, 2024 at 7:41 PM David Laight <David.Laight@xxxxxxxxxx> wrote:
> From: Arnd Bergmann
> > Sent: 10 December 2024 16:06
> ...
> > Since Arm is the last architecture remaining that uses this, and almost
> > no 32-bit machines support more than 4GB of RAM, the cost of continuing
> > to maintain HIGHPTE seems unjustified, so remove it here to allow
> > simplifying the generic page table handling.
>
> 'Picking at nits' 'highmem' support was needed for systems with 4GB of RAM
> in order to use more than 3GB or 3.5GB (depending on the bios) because
> of the physical addresses that are reserved for PCI (and other MMIO).
Wow I didn't know that, there are so many reasons why highmem is used
by different architectures.
On ARM it was originally added for a certain Marvell system with
a mere 2GB of RAM:
commit 053a96ca11a9785a7e63fc89eed4514a6446ec58
The reason was that since the virtual address space is just 4GB and
we have reserved virtual kernel memory from (typically) 0xc0000000
only ~1GB can be linearly accessed by the kernel (actually less than
that).
This wasn't a problem since no ARM system was using more than
1GB until Nico ran into it.
So the ARM "high memory" is something to do with virtual memory
size rather than physical memory reservations as in the x86 case.
Yours,
Linus Walleij