Lines Matching +full:e +full:- +full:book
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
15 #include <asm/asm-const.h>
38 #define HPAGE_MASK (~(HPAGE_SIZE - 1))
39 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
40 #define HUGE_MAX_HSTATE (MMU_PAGE_COUNT-1)
46 * (i.e. with 1s in the high bits)
48 #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
66 * KERNELBASE - PAGE_OFFSET = PHYSICAL_START - MEMORY_START
71 * va = pa + PAGE_OFFSET - MEMORY_START
72 * va = pa + KERNELBASE - PHYSICAL_START
82 #define LOAD_OFFSET ASM_CONST((CONFIG_KERNEL_START-CONFIG_PHYSICAL_START))
106 #define VIRT_PHYS_OFFSET (KERNELBASE - PHYSICAL_START)
115 #define MEMORY_START (PHYSICAL_START + PAGE_OFFSET - KERNELBASE)
142 * On Book-E parts we need __va to parse the device tree and we can't
163 * __va(x) = (x) - PHYSICAL_START + KERNELBASE
174 * E.g.,
179 * Now __va(1MB) = (0x100000) - (0x4000000) + 0xc0000000
187 * __va(x) = (x) - [ PHYSICAL_START - Effective KERNELBASE ]
198 * virt_phys_offset = Effective KERNELBASE - PHYSICAL_START
199 * = ALIGN_DOWN(KERNELBASE,256M) -
204 * __va(x) = x - PHYSICAL_START + Effective KERNELBASE
208 * __pa(x) = x + PHYSICAL_START - Effective KERNELBASE
209 * = x - virt_phys_offset
211 * On non-Book-E PPC64 PAGE_OFFSET and MEMORY_START are constants so use
216 #define __pa(x) ((phys_addr_t)(unsigned long)(x) - VIRT_PHYS_OFFSET)
223 * gcc miscompiles (unsigned long)(&static_var) - PAGE_OFFSET
224 * with -mcmodel=medium, so we use & and | instead of - and + on 64-bit.
239 #else /* 32-bit, non book E */
240 #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START))
241 #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START)
261 * "kernelness", use is_kernel_addr() - it should do what you want.
273 * Use the top bit of the higher-level page table entries to indicate whether
306 #include <asm/pgtable-be-types.h>
308 #include <asm/pgtable-types.h>
334 return kernstart_virt_addr - KERNELBASE; in kaslr_offset()
337 #include <asm-generic/memory_model.h>