Debian Codegraph @

payloads/libpayload/include/mock/arch/virtual.h

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #ifndef _ARCH_VIRTUAL_H
4 #define _ARCH_VIRTUAL_H
5
6 /* virtual_offset has to be declared if used */
7 extern unsigned long virtual_offset;
8
9 #define virt_to_phys(virt) ((unsigned long)(virt) + virtual_offset)
10 #define phys_to_virt(phys) ((void *)((unsigned long)(phys) - virtual_offset))
11
12 #define virt_to_bus(addr) virt_to_phys(addr)
13 #define bus_to_virt(addr) phys_to_virt(addr)
14
15 #endif