1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* for use by sys-$SUBARCH/kernel-offsets.c */ 3 #include <stub-data.h> 4 5 DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); 6 7 DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE); 8 DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK); 9 DEFINE(UM_KERN_PAGE_SHIFT, PAGE_SHIFT); 10 DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); 11 12 DEFINE(UM_ELF_CLASS, ELF_CLASS); 13 DEFINE(UM_ELFCLASS32, ELFCLASS32); 14 DEFINE(UM_ELFCLASS64, ELFCLASS64); 15 16 DEFINE(UM_NR_CPUS, NR_CPUS); 17 18 DEFINE(UM_GFP_KERNEL, GFP_KERNEL); 19 DEFINE(UM_GFP_ATOMIC, GFP_ATOMIC); 20 21 /* For crypto assembler code. */ 22 DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); 23 24 DEFINE(UM_THREAD_SIZE, THREAD_SIZE); 25 26 DEFINE(UM_HZ, HZ); 27 28 DEFINE(UM_USEC_PER_SEC, USEC_PER_SEC); 29 DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); 30 DEFINE(UM_NSEC_PER_USEC, NSEC_PER_USEC); 31 32 #ifdef CONFIG_PRINTK 33 DEFINE(UML_CONFIG_PRINTK, CONFIG_PRINTK); 34 #endif 35 #ifdef CONFIG_NO_HZ_COMMON 36 DEFINE(UML_CONFIG_NO_HZ_COMMON, CONFIG_NO_HZ_COMMON); 37 #endif 38 #ifdef CONFIG_UML_X86 39 DEFINE(UML_CONFIG_UML_X86, CONFIG_UML_X86); 40 #endif 41 #ifdef CONFIG_64BIT 42 DEFINE(UML_CONFIG_64BIT, CONFIG_64BIT); 43 #endif 44 #ifdef CONFIG_UML_TIME_TRAVEL_SUPPORT 45 DEFINE(UML_CONFIG_UML_TIME_TRAVEL_SUPPORT, CONFIG_UML_TIME_TRAVEL_SUPPORT); 46 #endif 47 48 /* for stub */ 49 DEFINE(UML_STUB_FIELD_OFFSET, offsetof(struct stub_data, offset)); 50 DEFINE(UML_STUB_FIELD_CHILD_ERR, offsetof(struct stub_data, child_err)); 51 DEFINE(UML_STUB_FIELD_FD, offsetof(struct stub_data, fd)); 52