^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Generate definitions needed by assembly language modules.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * This code generates raw asm output which is post-processed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * to extract and format the required data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define ASM_OFFSETS_C 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/sched/signal.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/pid.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/clocksource.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/kbuild.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <asm/processor.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <asm/ptrace.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <asm/siginfo.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <asm/sigcontext.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include <asm/mca.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include "../kernel/sigframe.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include "../kernel/fsyscall_gtod_data.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) void foo(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) DEFINE(IA64_TASK_SIZE, sizeof (struct task_struct));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) DEFINE(IA64_THREAD_INFO_SIZE, sizeof (struct thread_info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) DEFINE(IA64_PT_REGS_SIZE, sizeof (struct pt_regs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) DEFINE(IA64_SWITCH_STACK_SIZE, sizeof (struct switch_stack));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) DEFINE(IA64_SIGINFO_SIZE, sizeof (struct siginfo));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) DEFINE(IA64_CPU_SIZE, sizeof (struct cpuinfo_ia64));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) DEFINE(SIGFRAME_SIZE, sizeof (struct sigframe));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) DEFINE(UNW_FRAME_INFO_SIZE, sizeof (struct unw_frame_info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) BUILD_BUG_ON(sizeof(struct upid) != 16);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) DEFINE(IA64_UPID_SHIFT, 4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) DEFINE(TI_AC_STAMP, offsetof(struct thread_info, ac_stamp));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) DEFINE(TI_AC_LEAVE, offsetof(struct thread_info, ac_leave));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) DEFINE(TI_AC_STIME, offsetof(struct thread_info, ac_stime));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) DEFINE(TI_AC_UTIME, offsetof(struct thread_info, ac_utime));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) DEFINE(IA64_TASK_BLOCKED_OFFSET,offsetof (struct task_struct, blocked));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) DEFINE(IA64_TASK_CLEAR_CHILD_TID_OFFSET,offsetof (struct task_struct, clear_child_tid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) DEFINE(IA64_TASK_THREAD_PID_OFFSET,offsetof (struct task_struct, thread_pid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) DEFINE(IA64_PID_LEVEL_OFFSET, offsetof (struct pid, level));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) DEFINE(IA64_PID_UPID_OFFSET, offsetof (struct pid, numbers[0]));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) DEFINE(IA64_TASK_PENDING_OFFSET,offsetof (struct task_struct, pending));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) DEFINE(IA64_TASK_PID_OFFSET, offsetof (struct task_struct, pid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) DEFINE(IA64_TASK_REAL_PARENT_OFFSET, offsetof (struct task_struct, real_parent));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) DEFINE(IA64_TASK_SIGNAL_OFFSET,offsetof (struct task_struct, signal));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) DEFINE(IA64_TASK_TGID_OFFSET, offsetof (struct task_struct, tgid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct task_struct, thread.ksp));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) DEFINE(IA64_TASK_THREAD_ON_USTACK_OFFSET, offsetof (struct task_struct, thread.on_ustack));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) DEFINE(IA64_SIGNAL_GROUP_STOP_COUNT_OFFSET,offsetof (struct signal_struct,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) group_stop_count));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) DEFINE(IA64_SIGNAL_SHARED_PENDING_OFFSET,offsetof (struct signal_struct, shared_pending));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) DEFINE(IA64_SIGNAL_PIDS_TGID_OFFSET, offsetof (struct signal_struct, pids[PIDTYPE_TGID]));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) DEFINE(IA64_PT_REGS_B6_OFFSET, offsetof (struct pt_regs, b6));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) DEFINE(IA64_PT_REGS_B7_OFFSET, offsetof (struct pt_regs, b7));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) DEFINE(IA64_PT_REGS_AR_CSD_OFFSET, offsetof (struct pt_regs, ar_csd));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) DEFINE(IA64_PT_REGS_AR_SSD_OFFSET, offsetof (struct pt_regs, ar_ssd));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) DEFINE(IA64_PT_REGS_R8_OFFSET, offsetof (struct pt_regs, r8));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) DEFINE(IA64_PT_REGS_R9_OFFSET, offsetof (struct pt_regs, r9));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) DEFINE(IA64_PT_REGS_R10_OFFSET, offsetof (struct pt_regs, r10));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) DEFINE(IA64_PT_REGS_R11_OFFSET, offsetof (struct pt_regs, r11));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) DEFINE(IA64_PT_REGS_CR_IPSR_OFFSET, offsetof (struct pt_regs, cr_ipsr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) DEFINE(IA64_PT_REGS_CR_IIP_OFFSET, offsetof (struct pt_regs, cr_iip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) DEFINE(IA64_PT_REGS_CR_IFS_OFFSET, offsetof (struct pt_regs, cr_ifs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) DEFINE(IA64_PT_REGS_AR_UNAT_OFFSET, offsetof (struct pt_regs, ar_unat));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) DEFINE(IA64_PT_REGS_AR_PFS_OFFSET, offsetof (struct pt_regs, ar_pfs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) DEFINE(IA64_PT_REGS_AR_RSC_OFFSET, offsetof (struct pt_regs, ar_rsc));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) DEFINE(IA64_PT_REGS_AR_RNAT_OFFSET, offsetof (struct pt_regs, ar_rnat));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) DEFINE(IA64_PT_REGS_AR_BSPSTORE_OFFSET, offsetof (struct pt_regs, ar_bspstore));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) DEFINE(IA64_PT_REGS_PR_OFFSET, offsetof (struct pt_regs, pr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) DEFINE(IA64_PT_REGS_B0_OFFSET, offsetof (struct pt_regs, b0));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) DEFINE(IA64_PT_REGS_LOADRS_OFFSET, offsetof (struct pt_regs, loadrs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) DEFINE(IA64_PT_REGS_R1_OFFSET, offsetof (struct pt_regs, r1));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) DEFINE(IA64_PT_REGS_R12_OFFSET, offsetof (struct pt_regs, r12));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) DEFINE(IA64_PT_REGS_R13_OFFSET, offsetof (struct pt_regs, r13));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) DEFINE(IA64_PT_REGS_AR_FPSR_OFFSET, offsetof (struct pt_regs, ar_fpsr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) DEFINE(IA64_PT_REGS_R15_OFFSET, offsetof (struct pt_regs, r15));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) DEFINE(IA64_PT_REGS_R14_OFFSET, offsetof (struct pt_regs, r14));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) DEFINE(IA64_PT_REGS_R2_OFFSET, offsetof (struct pt_regs, r2));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) DEFINE(IA64_PT_REGS_R3_OFFSET, offsetof (struct pt_regs, r3));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) DEFINE(IA64_PT_REGS_R16_OFFSET, offsetof (struct pt_regs, r16));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) DEFINE(IA64_PT_REGS_R17_OFFSET, offsetof (struct pt_regs, r17));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) DEFINE(IA64_PT_REGS_R18_OFFSET, offsetof (struct pt_regs, r18));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) DEFINE(IA64_PT_REGS_R19_OFFSET, offsetof (struct pt_regs, r19));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) DEFINE(IA64_PT_REGS_R20_OFFSET, offsetof (struct pt_regs, r20));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) DEFINE(IA64_PT_REGS_R21_OFFSET, offsetof (struct pt_regs, r21));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) DEFINE(IA64_PT_REGS_R22_OFFSET, offsetof (struct pt_regs, r22));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) DEFINE(IA64_PT_REGS_R23_OFFSET, offsetof (struct pt_regs, r23));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) DEFINE(IA64_PT_REGS_R24_OFFSET, offsetof (struct pt_regs, r24));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) DEFINE(IA64_PT_REGS_R25_OFFSET, offsetof (struct pt_regs, r25));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) DEFINE(IA64_PT_REGS_R26_OFFSET, offsetof (struct pt_regs, r26));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) DEFINE(IA64_PT_REGS_R27_OFFSET, offsetof (struct pt_regs, r27));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) DEFINE(IA64_PT_REGS_R28_OFFSET, offsetof (struct pt_regs, r28));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) DEFINE(IA64_PT_REGS_R29_OFFSET, offsetof (struct pt_regs, r29));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) DEFINE(IA64_PT_REGS_R30_OFFSET, offsetof (struct pt_regs, r30));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) DEFINE(IA64_PT_REGS_R31_OFFSET, offsetof (struct pt_regs, r31));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) DEFINE(IA64_PT_REGS_AR_CCV_OFFSET, offsetof (struct pt_regs, ar_ccv));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) DEFINE(IA64_PT_REGS_F6_OFFSET, offsetof (struct pt_regs, f6));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) DEFINE(IA64_PT_REGS_F7_OFFSET, offsetof (struct pt_regs, f7));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) DEFINE(IA64_PT_REGS_F8_OFFSET, offsetof (struct pt_regs, f8));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) DEFINE(IA64_PT_REGS_F9_OFFSET, offsetof (struct pt_regs, f9));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) DEFINE(IA64_PT_REGS_F10_OFFSET, offsetof (struct pt_regs, f10));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) DEFINE(IA64_PT_REGS_F11_OFFSET, offsetof (struct pt_regs, f11));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) DEFINE(IA64_SWITCH_STACK_CALLER_UNAT_OFFSET, offsetof (struct switch_stack, caller_unat));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) DEFINE(IA64_SWITCH_STACK_AR_FPSR_OFFSET, offsetof (struct switch_stack, ar_fpsr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) DEFINE(IA64_SWITCH_STACK_F2_OFFSET, offsetof (struct switch_stack, f2));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) DEFINE(IA64_SWITCH_STACK_F3_OFFSET, offsetof (struct switch_stack, f3));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) DEFINE(IA64_SWITCH_STACK_F4_OFFSET, offsetof (struct switch_stack, f4));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) DEFINE(IA64_SWITCH_STACK_F5_OFFSET, offsetof (struct switch_stack, f5));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) DEFINE(IA64_SWITCH_STACK_F12_OFFSET, offsetof (struct switch_stack, f12));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) DEFINE(IA64_SWITCH_STACK_F13_OFFSET, offsetof (struct switch_stack, f13));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) DEFINE(IA64_SWITCH_STACK_F14_OFFSET, offsetof (struct switch_stack, f14));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) DEFINE(IA64_SWITCH_STACK_F15_OFFSET, offsetof (struct switch_stack, f15));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) DEFINE(IA64_SWITCH_STACK_F16_OFFSET, offsetof (struct switch_stack, f16));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) DEFINE(IA64_SWITCH_STACK_F17_OFFSET, offsetof (struct switch_stack, f17));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) DEFINE(IA64_SWITCH_STACK_F18_OFFSET, offsetof (struct switch_stack, f18));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) DEFINE(IA64_SWITCH_STACK_F19_OFFSET, offsetof (struct switch_stack, f19));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) DEFINE(IA64_SWITCH_STACK_F20_OFFSET, offsetof (struct switch_stack, f20));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) DEFINE(IA64_SWITCH_STACK_F21_OFFSET, offsetof (struct switch_stack, f21));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) DEFINE(IA64_SWITCH_STACK_F22_OFFSET, offsetof (struct switch_stack, f22));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) DEFINE(IA64_SWITCH_STACK_F23_OFFSET, offsetof (struct switch_stack, f23));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) DEFINE(IA64_SWITCH_STACK_F24_OFFSET, offsetof (struct switch_stack, f24));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) DEFINE(IA64_SWITCH_STACK_F25_OFFSET, offsetof (struct switch_stack, f25));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) DEFINE(IA64_SWITCH_STACK_F26_OFFSET, offsetof (struct switch_stack, f26));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) DEFINE(IA64_SWITCH_STACK_F27_OFFSET, offsetof (struct switch_stack, f27));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) DEFINE(IA64_SWITCH_STACK_F28_OFFSET, offsetof (struct switch_stack, f28));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) DEFINE(IA64_SWITCH_STACK_F29_OFFSET, offsetof (struct switch_stack, f29));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) DEFINE(IA64_SWITCH_STACK_F30_OFFSET, offsetof (struct switch_stack, f30));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) DEFINE(IA64_SWITCH_STACK_F31_OFFSET, offsetof (struct switch_stack, f31));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) DEFINE(IA64_SWITCH_STACK_R4_OFFSET, offsetof (struct switch_stack, r4));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) DEFINE(IA64_SWITCH_STACK_R5_OFFSET, offsetof (struct switch_stack, r5));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) DEFINE(IA64_SWITCH_STACK_R6_OFFSET, offsetof (struct switch_stack, r6));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) DEFINE(IA64_SWITCH_STACK_R7_OFFSET, offsetof (struct switch_stack, r7));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) DEFINE(IA64_SWITCH_STACK_B0_OFFSET, offsetof (struct switch_stack, b0));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) DEFINE(IA64_SWITCH_STACK_B1_OFFSET, offsetof (struct switch_stack, b1));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) DEFINE(IA64_SWITCH_STACK_B2_OFFSET, offsetof (struct switch_stack, b2));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) DEFINE(IA64_SWITCH_STACK_B3_OFFSET, offsetof (struct switch_stack, b3));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) DEFINE(IA64_SWITCH_STACK_B4_OFFSET, offsetof (struct switch_stack, b4));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) DEFINE(IA64_SWITCH_STACK_B5_OFFSET, offsetof (struct switch_stack, b5));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) DEFINE(IA64_SWITCH_STACK_AR_PFS_OFFSET, offsetof (struct switch_stack, ar_pfs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) DEFINE(IA64_SWITCH_STACK_AR_LC_OFFSET, offsetof (struct switch_stack, ar_lc));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) DEFINE(IA64_SWITCH_STACK_AR_UNAT_OFFSET, offsetof (struct switch_stack, ar_unat));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) DEFINE(IA64_SWITCH_STACK_AR_RNAT_OFFSET, offsetof (struct switch_stack, ar_rnat));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) DEFINE(IA64_SWITCH_STACK_AR_BSPSTORE_OFFSET, offsetof (struct switch_stack, ar_bspstore));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) DEFINE(IA64_SWITCH_STACK_PR_OFFSET, offsetof (struct switch_stack, pr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) DEFINE(IA64_SIGCONTEXT_IP_OFFSET, offsetof (struct sigcontext, sc_ip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) DEFINE(IA64_SIGCONTEXT_AR_BSP_OFFSET, offsetof (struct sigcontext, sc_ar_bsp));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) DEFINE(IA64_SIGCONTEXT_AR_FPSR_OFFSET, offsetof (struct sigcontext, sc_ar_fpsr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) DEFINE(IA64_SIGCONTEXT_AR_RNAT_OFFSET, offsetof (struct sigcontext, sc_ar_rnat));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) DEFINE(IA64_SIGCONTEXT_AR_UNAT_OFFSET, offsetof (struct sigcontext, sc_ar_unat));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) DEFINE(IA64_SIGCONTEXT_B0_OFFSET, offsetof (struct sigcontext, sc_br[0]));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) DEFINE(IA64_SIGCONTEXT_CFM_OFFSET, offsetof (struct sigcontext, sc_cfm));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) DEFINE(IA64_SIGCONTEXT_FLAGS_OFFSET, offsetof (struct sigcontext, sc_flags));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) DEFINE(IA64_SIGCONTEXT_FR6_OFFSET, offsetof (struct sigcontext, sc_fr[6]));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) DEFINE(IA64_SIGCONTEXT_PR_OFFSET, offsetof (struct sigcontext, sc_pr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) DEFINE(IA64_SIGCONTEXT_R12_OFFSET, offsetof (struct sigcontext, sc_gr[12]));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) DEFINE(IA64_SIGCONTEXT_RBS_BASE_OFFSET,offsetof (struct sigcontext, sc_rbs_base));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) DEFINE(IA64_SIGCONTEXT_LOADRS_OFFSET, offsetof (struct sigcontext, sc_loadrs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) DEFINE(IA64_SIGPENDING_SIGNAL_OFFSET, offsetof (struct sigpending, signal));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) DEFINE(IA64_SIGFRAME_ARG0_OFFSET, offsetof (struct sigframe, arg0));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) DEFINE(IA64_SIGFRAME_ARG1_OFFSET, offsetof (struct sigframe, arg1));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) DEFINE(IA64_SIGFRAME_ARG2_OFFSET, offsetof (struct sigframe, arg2));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) DEFINE(IA64_SIGFRAME_HANDLER_OFFSET, offsetof (struct sigframe, handler));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) DEFINE(IA64_SIGFRAME_SIGCONTEXT_OFFSET, offsetof (struct sigframe, sc));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) /* for assembly files which can't include sched.h: */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) DEFINE(IA64_CLONE_VFORK, CLONE_VFORK);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) DEFINE(IA64_CLONE_VM, CLONE_VM);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) DEFINE(IA64_CPUINFO_NSEC_PER_CYC_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) offsetof (struct cpuinfo_ia64, nsec_per_cyc));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) DEFINE(IA64_CPUINFO_PTCE_BASE_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) offsetof (struct cpuinfo_ia64, ptce_base));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) DEFINE(IA64_CPUINFO_PTCE_COUNT_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) offsetof (struct cpuinfo_ia64, ptce_count));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) DEFINE(IA64_CPUINFO_PTCE_STRIDE_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) offsetof (struct cpuinfo_ia64, ptce_stride));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) DEFINE(IA64_TIMESPEC_TV_NSEC_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) offsetof (struct __kernel_old_timespec, tv_nsec));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) DEFINE(IA64_TIME_SN_SPEC_SNSEC_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) offsetof (struct time_sn_spec, snsec));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) DEFINE(CLONE_SETTLS_BIT, 19);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) #if CLONE_SETTLS != (1<<19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) # error "CLONE_SETTLS_BIT incorrect, please fix"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) DEFINE(IA64_MCA_CPU_MCA_STACK_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) offsetof (struct ia64_mca_cpu, mca_stack));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) DEFINE(IA64_MCA_CPU_INIT_STACK_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) offsetof (struct ia64_mca_cpu, init_stack));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) DEFINE(IA64_SAL_OS_STATE_OS_GP_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) offsetof (struct ia64_sal_os_state, os_gp));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) DEFINE(IA64_SAL_OS_STATE_PROC_STATE_PARAM_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) offsetof (struct ia64_sal_os_state, proc_state_param));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) DEFINE(IA64_SAL_OS_STATE_SAL_RA_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) offsetof (struct ia64_sal_os_state, sal_ra));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) DEFINE(IA64_SAL_OS_STATE_SAL_GP_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) offsetof (struct ia64_sal_os_state, sal_gp));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) DEFINE(IA64_SAL_OS_STATE_PAL_MIN_STATE_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) offsetof (struct ia64_sal_os_state, pal_min_state));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) DEFINE(IA64_SAL_OS_STATE_OS_STATUS_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) offsetof (struct ia64_sal_os_state, os_status));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) DEFINE(IA64_SAL_OS_STATE_CONTEXT_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) offsetof (struct ia64_sal_os_state, context));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) DEFINE(IA64_SAL_OS_STATE_SIZE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) sizeof (struct ia64_sal_os_state));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) DEFINE(IA64_PMSA_GR_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) offsetof (struct pal_min_state_area_s, pmsa_gr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) DEFINE(IA64_PMSA_BANK1_GR_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) offsetof (struct pal_min_state_area_s, pmsa_bank1_gr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) DEFINE(IA64_PMSA_PR_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) offsetof (struct pal_min_state_area_s, pmsa_pr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) DEFINE(IA64_PMSA_BR0_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) offsetof (struct pal_min_state_area_s, pmsa_br0));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) DEFINE(IA64_PMSA_RSC_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) offsetof (struct pal_min_state_area_s, pmsa_rsc));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) DEFINE(IA64_PMSA_IIP_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) offsetof (struct pal_min_state_area_s, pmsa_iip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) DEFINE(IA64_PMSA_IPSR_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) offsetof (struct pal_min_state_area_s, pmsa_ipsr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) DEFINE(IA64_PMSA_IFS_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) offsetof (struct pal_min_state_area_s, pmsa_ifs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) DEFINE(IA64_PMSA_XIP_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) offsetof (struct pal_min_state_area_s, pmsa_xip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) /* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) DEFINE(IA64_GTOD_SEQ_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) offsetof (struct fsyscall_gtod_data_t, seq));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) DEFINE(IA64_GTOD_WALL_TIME_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) offsetof (struct fsyscall_gtod_data_t, wall_time));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) DEFINE(IA64_GTOD_MONO_TIME_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) offsetof (struct fsyscall_gtod_data_t, monotonic_time));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) DEFINE(IA64_CLKSRC_MASK_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) offsetof (struct fsyscall_gtod_data_t, clk_mask));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) DEFINE(IA64_CLKSRC_MULT_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) offsetof (struct fsyscall_gtod_data_t, clk_mult));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) DEFINE(IA64_CLKSRC_SHIFT_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) offsetof (struct fsyscall_gtod_data_t, clk_shift));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) DEFINE(IA64_CLKSRC_MMIO_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) offsetof (struct fsyscall_gtod_data_t, clk_fsys_mmio));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) DEFINE(IA64_CLKSRC_CYCLE_LAST_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) offsetof (struct fsyscall_gtod_data_t, clk_cycle_last));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) DEFINE(IA64_ITC_JITTER_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) offsetof (struct itc_jitter_data_t, itc_jitter));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) DEFINE(IA64_ITC_LASTCYCLE_OFFSET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) offsetof (struct itc_jitter_data_t, itc_lastcycle));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) }