aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/resource.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index fb11a58b9594..b4d637a55256 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -297,6 +297,19 @@ int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
297 297
298#endif 298#endif
299 299
300static int __is_ram(unsigned long pfn, unsigned long nr_pages, void *arg)
301{
302 return 1;
303}
304/*
305 * This generic page_is_ram() returns true if specified address is
306 * registered as "System RAM" in iomem_resource list.
307 */
308int __attribute__((weak)) page_is_ram(unsigned long pfn)
309{
310 return walk_system_ram_range(pfn, 1, NULL, __is_ram) == 1;
311}
312
300/* 313/*
301 * Find empty slot in the resource tree given range and alignment. 314 * Find empty slot in the resource tree given range and alignment.
302 */ 315 */