arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git] / arch / m68k / include / asm / virtconvert.h
blobdfe43083b579ed520484c4d5e70f915a192a2a71
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __VIRT_CONVERT__
3 #define __VIRT_CONVERT__
5 /*
6 * Macros used for converting between virtual and physical mappings.
7 */
9 #ifdef __KERNEL__
11 #include <linux/compiler.h>
12 #include <linux/mmzone.h>
13 #include <asm/setup.h>
14 #include <asm/page.h>
17 * Change virtual addresses to physical addresses and vv.
19 #define virt_to_phys virt_to_phys
20 static inline unsigned long virt_to_phys(void *address)
22 return __pa(address);
25 #define phys_to_virt phys_to_virt
26 static inline void *phys_to_virt(unsigned long address)
28 return __va(address);
31 /* Permanent address of a page. */
32 #if defined(CONFIG_MMU) && defined(CONFIG_SINGLE_MEMORY_CHUNK)
33 #define page_to_phys(page) \
34 __pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT))
35 #else
36 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
37 #endif
40 * IO bus memory addresses are 1:1 with the physical address,
42 #define virt_to_bus virt_to_phys
43 #define bus_to_virt phys_to_virt
45 #endif
46 #endif