diff options
Diffstat (limited to 'kernel/resource.c')
-rw-r--r-- | kernel/resource.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 24e9e60c1459..4e9d87fd7bc5 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -327,6 +327,19 @@ int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, | |||
327 | 327 | ||
328 | #endif | 328 | #endif |
329 | 329 | ||
330 | static int __is_ram(unsigned long pfn, unsigned long nr_pages, void *arg) | ||
331 | { | ||
332 | return 1; | ||
333 | } | ||
334 | /* | ||
335 | * This generic page_is_ram() returns true if specified address is | ||
336 | * registered as "System RAM" in iomem_resource list. | ||
337 | */ | ||
338 | int __weak page_is_ram(unsigned long pfn) | ||
339 | { | ||
340 | return walk_system_ram_range(pfn, 1, NULL, __is_ram) == 1; | ||
341 | } | ||
342 | |||
330 | /* | 343 | /* |
331 | * Find empty slot in the resource tree given range and alignment. | 344 | * Find empty slot in the resource tree given range and alignment. |
332 | */ | 345 | */ |