Re: [PATCH v2 4/7] sparc32: Do not select ZONE_DMA
From: Andreas Larsson
Date: Thu Mar 07 2024 - 07:42:29 EST
On 2024-03-06 19:19, Arnd Bergmann wrote:
> On Wed, Mar 6, 2024, at 17:22, Arnd Bergmann wrote:
>> On Wed, Mar 6, 2024, at 16:31, Andreas Larsson wrote:
>
>> On a relate note, it does seem odd to have such a small
>> lowmem area, and I wonder if that could be extended.
>> The 192MB lowmem limit comes from
>>
>> #define SRMMU_MAXMEM 0x0c000000
>>
>> but I don't understand if that is a hardware limitation
>> or a design choice that can be changed, and if it is
>> even valid on leon or only on the old sun machines.
>
> I had another look and found that this is a result of
>
> arch/sparc/include/asm/page_32.h:#define PAGE_OFFSET 0xf0000000
>
> which gives 3840MiB to userspace addresses, leaving only
> 256MiB for kernel lowmem and vmalloc space, which is
> less than any other architectures.
>
> I still don't know the history behind this choice, but I
> see this was already configured the same when arch/sparc/
> was originally merged. You can probably change it to a more
> sensible 0xc0000000 or 0x80000000 like on other
> architectures and run without highmem on anything with
> less than 2GB of total RAM.
>
> How much RAM do Leon machines have typically, or at the
> maximum?
The amount of RAM can vary greatly between systems, from less that
128 MiB up to 2 GiB. An upcoming design uses the entire 36-bit
physical address space and have the possibility of having up to 60
GiB memory.
Thanks,
Andreas