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

Commit d75bf42d authored by Sudarshan Rajagopalan's avatar Sudarshan Rajagopalan
Browse files

soc: qcom: mem-offline: Update end pfn calculation



On a 6GB target with 0x80000000 as the base address, the
dram end address becomes 0x200000000. Now doing a phys_to_pfn
on this address gives a PFN which sits on this end address, which
is not a valid one. Hence, update the calculation of getting
the end PFN of the system.

Change-Id: Iada40892bf12dd450193b2ae3741c59c6295f604
Signed-off-by: default avatarSudarshan Rajagopalan <sudaraja@codeaurora.org>
parent 18c96642
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ static int mem_event_callback(struct notifier_block *self,
static int mem_online_remaining_blocks(void)
{
	unsigned long memblock_end_pfn = __phys_to_pfn(memblock_end_of_DRAM());
	unsigned long ram_end_pfn = __phys_to_pfn(bootloader_memory_limit);
	unsigned long ram_end_pfn = __phys_to_pfn(bootloader_memory_limit - 1);
	unsigned long block_size, memblock, pfn;
	unsigned int nid;
	phys_addr_t phys_addr;