Lines Matching +full:e +full:- +full:book
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
16 #include <asm/asm-const.h>
39 #define HPAGE_MASK (~(HPAGE_SIZE - 1))
40 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
41 #define HUGE_MAX_HSTATE (MMU_PAGE_COUNT-1)
47 * (i.e. with 1s in the high bits)
49 #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
67 * KERNELBASE - PAGE_OFFSET = PHYSICAL_START - MEMORY_START
72 * va = pa + PAGE_OFFSET - MEMORY_START
73 * va = pa + KERNELBASE - PHYSICAL_START
83 #define LOAD_OFFSET ASM_CONST((CONFIG_KERNEL_START-CONFIG_PHYSICAL_START))
107 #define VIRT_PHYS_OFFSET (KERNELBASE - PHYSICAL_START)
116 #define MEMORY_START (PHYSICAL_START + PAGE_OFFSET - KERNELBASE)
124 * On Book-E parts we need __va to parse the device tree and we can't
145 * __va(x) = (x) - PHYSICAL_START + KERNELBASE
156 * E.g.,
161 * Now __va(1MB) = (0x100000) - (0x4000000) + 0xc0000000
169 * __va(x) = (x) - [ PHYSICAL_START - Effective KERNELBASE ]
180 * virt_phys_offset = Effective KERNELBASE - PHYSICAL_START
181 * = ALIGN_DOWN(KERNELBASE,256M) -
186 * __va(x) = x - PHYSICAL_START + Effective KERNELBASE
190 * __pa(x) = x + PHYSICAL_START - Effective KERNELBASE
191 * = x - virt_phys_offset
193 * On non-Book-E PPC64 PAGE_OFFSET and MEMORY_START are constants so use
198 #define __pa(x) ((phys_addr_t)(unsigned long)(x) - VIRT_PHYS_OFFSET)
205 * gcc miscompiles (unsigned long)(&static_var) - PAGE_OFFSET
206 * with -mcmodel=medium, so we use & and | instead of - and + on 64-bit.
221 #else /* 32-bit, non book E */
222 #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START))
223 #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START)
262 * "kernelness", use is_kernel_addr() - it should do what you want.
275 #include <asm/pgtable-be-types.h>
277 #include <asm/pgtable-types.h>
297 return kernstart_virt_addr - KERNELBASE; in kaslr_offset()
300 #include <asm-generic/memory_model.h>