summaryrefslogtreecommitdiffstats
path: root/kexec/phys_to_virt.c
blob: 5e8c4e30d2c414d954be343643aa5b0ac8d812aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "kexec.h"
#include "crashdump.h"

/**
 * phys_to_virt() - translate physical address to virtual address
 * @paddr: physical address to translate
 *
 * For most architectures physical address is simply virtual address minus
 * PAGE_OFFSET. Architectures that don't follow this convention should provide
 * their own implementation.
 */
unsigned long
phys_to_virt(struct crash_elf_info *elf_info, unsigned long long paddr)
{
	return paddr + elf_info->page_offset;
}