Skip to content

Commit 79ba11d

Browse files
Ard Biesheuvelwildea01
authored andcommitted
arm64: kernel: do not mark reserved memory regions as IORESOURCE_BUSY
Memory regions marked as NOMAP should not be used for general allocation by the kernel, and should not even be covered by the linear mapping (hence the name). However, drivers or other subsystems (such as ACPI) that access the firmware directly may legally access them, which means it is also reasonable for such drivers to claim them by invoking request_resource(). Currently, this is prevented by the fact that arm64's request_standard_resources() marks reserved regions as IORESOURCE_BUSY. So drop the IORESOURCE_BUSY flag from these requests. Reported-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 1c33dc1 commit 79ba11d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static void __init request_standard_resources(void)
209209
res = alloc_bootmem_low(sizeof(*res));
210210
if (memblock_is_nomap(region)) {
211211
res->name = "reserved";
212-
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
212+
res->flags = IORESOURCE_MEM;
213213
} else {
214214
res->name = "System RAM";
215215
res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;

0 commit comments

Comments
 (0)