aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
diff options
context:
space:
mode:
authorMing Wang <[email protected]>2025-08-03 14:49:47 +0000
committerHuacai Chen <[email protected]>2025-08-03 14:49:47 +0000
commit243f8de49f076d56ee88d6f03b6221984cc63668 (patch)
tree60b8ff36c0b5a63c672e03f048b18aaf51ada2a5 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
parentLoongArch: Make relocate_new_kernel_size be a .quad value (diff)
downloadkernel-243f8de49f076d56ee88d6f03b6221984cc63668.tar.gz
kernel-243f8de49f076d56ee88d6f03b6221984cc63668.zip
LoongArch: Support mem=<size> kernel parameter
The LoongArch mem= parameter parser was previously limited to the mem=<size>@<start> format. This was inconvenient for the common use case of simply capping the total system memory, as it forced users to manually specify a start address. It was also inconsistent with the behavior on other architectures. This patch enhances the parser in early_parse_mem() to also support the more user-friendly mem=<size> format. The implementation now checks for the presence of the '@' symbol to determine the user's intent: - If mem=<size> is provided (no '@'), the kernel now calls memblock_enforce_memory_limit(). This trims memory from the top down to the specified size. - If mem=<size>@<start> is provided, the original behavior is retained for backward compatibility. This allows for defining specific memory banks. This change introduces an important usage rule reflected in the code's comments: the mem=<size> format should only be specified once on the kernel command line. It acts as a single, global cap on total memory. In contrast, the mem=<size>@<start> format can be specified multiple times to define several distinct memory regions. Signed-off-by: Ming Wang <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
0 files changed, 0 insertions, 0 deletions