1 // SPDX-License-Identifier: GPL-2.0 1 // SPDX-License-Identifier: GPL-2.0 2 /* 2 /* 3 * This program is used to generate definition !! 3 * Generate definitions needed by assembly language modules. 4 * assembly language modules. !! 4 * This code generates raw asm output which is post-processed to extract 5 * !! 5 * and format the required data. 6 * We use the technique used in the OSF Mach k << 7 * generate asm statements containing #defines << 8 * compile this file to assembler, and then ex << 9 * #defines from the assembly-language output. << 10 */ 6 */ 11 7 12 #include <linux/stddef.h> << 13 #include <linux/types.h> 8 #include <linux/types.h> 14 #include <linux/mm.h> !! 9 #include <linux/stddef.h> >> 10 #include <linux/sched.h> >> 11 #include <linux/ptrace.h> 15 #include <linux/kbuild.h> 12 #include <linux/kbuild.h> 16 #include <linux/suspend.h> !! 13 #include <asm/machvec.h> 17 << 18 #include <asm/thread_info.h> << 19 #include <asm/suspend.h> << 20 14 21 int main(void) !! 15 static void __used foo(void) 22 { 16 { 23 /* offsets into the thread_info struct !! 17 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); 24 DEFINE(TI_TASK, offsetof(struc !! 18 DEFINE(TI_FP, offsetof(struct thread_info, fp)); 25 DEFINE(TI_FLAGS, offsetof(struc !! 19 DEFINE(TI_STATUS, offsetof(struct thread_info, status)); 26 DEFINE(TI_CPU, offsetof(struc !! 20 BLANK(); 27 DEFINE(TI_PRE_COUNT, offsetof(struc << 28 DEFINE(TI_SIZE, sizeof(struct << 29 21 30 #ifdef CONFIG_HIBERNATION !! 22 DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs)); 31 DEFINE(PBE_ADDRESS, offsetof(struct pb !! 23 BLANK(); 32 DEFINE(PBE_ORIG_ADDRESS, offsetof(stru << 33 DEFINE(PBE_NEXT, offsetof(struct pbe, << 34 DEFINE(SWSUSP_ARCH_REGS_SIZE, sizeof(s << 35 #endif << 36 24 37 DEFINE(SH_SLEEP_MODE, offsetof(struct !! 25 DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache)); 38 DEFINE(SH_SLEEP_SF_PRE, offsetof(struc !! 26 DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register)); 39 DEFINE(SH_SLEEP_SF_POST, offsetof(stru << 40 DEFINE(SH_SLEEP_RESUME, offsetof(struc << 41 DEFINE(SH_SLEEP_VBR, offsetof(struct s << 42 DEFINE(SH_SLEEP_SPC, offsetof(struct s << 43 DEFINE(SH_SLEEP_SR, offsetof(struct sh << 44 DEFINE(SH_SLEEP_SP, offsetof(struct sh << 45 DEFINE(SH_SLEEP_BASE_ADDR, offsetof(st << 46 DEFINE(SH_SLEEP_BASE_DATA, offsetof(st << 47 DEFINE(SH_SLEEP_REG_STBCR, offsetof(st << 48 DEFINE(SH_SLEEP_REG_BAR, offsetof(stru << 49 DEFINE(SH_SLEEP_REG_PTEH, offsetof(str << 50 DEFINE(SH_SLEEP_REG_PTEL, offsetof(str << 51 DEFINE(SH_SLEEP_REG_TTB, offsetof(stru << 52 DEFINE(SH_SLEEP_REG_TEA, offsetof(stru << 53 DEFINE(SH_SLEEP_REG_MMUCR, offsetof(st << 54 DEFINE(SH_SLEEP_REG_PTEA, offsetof(str << 55 DEFINE(SH_SLEEP_REG_PASCR, offsetof(st << 56 DEFINE(SH_SLEEP_REG_IRMCR, offsetof(st << 57 DEFINE(SH_SLEEP_REG_CCR, offsetof(stru << 58 DEFINE(SH_SLEEP_REG_RAMCR, offsetof(st << 59 return 0; << 60 } 27 } 61 28
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.