Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a08d031 authored by Srinivasarao Pathipati's avatar Srinivasarao Pathipati
Browse files

Revert "arm: extend pfn_valid to take into account freed memory map alignment"



This reverts commit 6026d403.

Change-Id: Ic5175e2caf9b8bed357c38de67156fd6f90e4a17
Signed-off-by: default avatarSrinivasarao Pathipati <quic_spathi@quicinc.com>
parent 598165f1
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -176,22 +176,11 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
int pfn_valid(unsigned long pfn)
{
	phys_addr_t addr = __pfn_to_phys(pfn);
	unsigned long pageblock_size = PAGE_SIZE * pageblock_nr_pages;

	if (__phys_to_pfn(addr) != pfn)
		return 0;

	/*
	 * If address less than pageblock_size bytes away from a present
	 * memory chunk there still will be a memory map entry for it
	 * because we round freed memory map to the pageblock boundaries.
	 */
	if (memblock_overlaps_region(&memblock.memory,
				     ALIGN_DOWN(addr, pageblock_size),
				     pageblock_size))
		return 1;

	return 0;
	return memblock_is_map_memory(__pfn_to_phys(pfn));
}
EXPORT_SYMBOL(pfn_valid);
#endif