162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Generate definitions needed by assembly language modules.
462306a36Sopenharmony_ci * This code generates raw asm output which is post-processed
562306a36Sopenharmony_ci * to extract and format the required data.
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#define ASM_OFFSETS_C 1
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#include <linux/sched/signal.h>
1162306a36Sopenharmony_ci#include <linux/pid.h>
1262306a36Sopenharmony_ci#include <linux/clocksource.h>
1362306a36Sopenharmony_ci#include <linux/kbuild.h>
1462306a36Sopenharmony_ci#include <asm/processor.h>
1562306a36Sopenharmony_ci#include <asm/ptrace.h>
1662306a36Sopenharmony_ci#include <asm/siginfo.h>
1762306a36Sopenharmony_ci#include <asm/sigcontext.h>
1862306a36Sopenharmony_ci#include <asm/mca.h>
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#include "../kernel/sigframe.h"
2162306a36Sopenharmony_ci#include "../kernel/fsyscall_gtod_data.h"
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_civoid foo(void)
2462306a36Sopenharmony_ci{
2562306a36Sopenharmony_ci	DEFINE(IA64_TASK_SIZE, sizeof (struct task_struct));
2662306a36Sopenharmony_ci	DEFINE(IA64_THREAD_INFO_SIZE, sizeof (struct thread_info));
2762306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_SIZE, sizeof (struct pt_regs));
2862306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_SIZE, sizeof (struct switch_stack));
2962306a36Sopenharmony_ci	DEFINE(IA64_SIGINFO_SIZE, sizeof (struct siginfo));
3062306a36Sopenharmony_ci	DEFINE(IA64_CPU_SIZE, sizeof (struct cpuinfo_ia64));
3162306a36Sopenharmony_ci	DEFINE(SIGFRAME_SIZE, sizeof (struct sigframe));
3262306a36Sopenharmony_ci	DEFINE(UNW_FRAME_INFO_SIZE, sizeof (struct unw_frame_info));
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci	BUILD_BUG_ON(sizeof(struct upid) != 16);
3562306a36Sopenharmony_ci	DEFINE(IA64_UPID_SHIFT, 4);
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci	BLANK();
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
4062306a36Sopenharmony_ci	DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
4162306a36Sopenharmony_ci	DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count));
4262306a36Sopenharmony_ci#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
4362306a36Sopenharmony_ci	DEFINE(TI_AC_STAMP, offsetof(struct thread_info, ac_stamp));
4462306a36Sopenharmony_ci	DEFINE(TI_AC_LEAVE, offsetof(struct thread_info, ac_leave));
4562306a36Sopenharmony_ci	DEFINE(TI_AC_STIME, offsetof(struct thread_info, ac_stime));
4662306a36Sopenharmony_ci	DEFINE(TI_AC_UTIME, offsetof(struct thread_info, ac_utime));
4762306a36Sopenharmony_ci#endif
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci	BLANK();
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci	DEFINE(IA64_TASK_BLOCKED_OFFSET,offsetof (struct task_struct, blocked));
5262306a36Sopenharmony_ci	DEFINE(IA64_TASK_CLEAR_CHILD_TID_OFFSET,offsetof (struct task_struct, clear_child_tid));
5362306a36Sopenharmony_ci	DEFINE(IA64_TASK_THREAD_PID_OFFSET,offsetof (struct task_struct, thread_pid));
5462306a36Sopenharmony_ci	DEFINE(IA64_PID_LEVEL_OFFSET, offsetof (struct pid, level));
5562306a36Sopenharmony_ci	DEFINE(IA64_PID_UPID_OFFSET, offsetof (struct pid, numbers[0]));
5662306a36Sopenharmony_ci	DEFINE(IA64_TASK_PENDING_OFFSET,offsetof (struct task_struct, pending));
5762306a36Sopenharmony_ci	DEFINE(IA64_TASK_PID_OFFSET, offsetof (struct task_struct, pid));
5862306a36Sopenharmony_ci	DEFINE(IA64_TASK_REAL_PARENT_OFFSET, offsetof (struct task_struct, real_parent));
5962306a36Sopenharmony_ci	DEFINE(IA64_TASK_SIGNAL_OFFSET,offsetof (struct task_struct, signal));
6062306a36Sopenharmony_ci	DEFINE(IA64_TASK_TGID_OFFSET, offsetof (struct task_struct, tgid));
6162306a36Sopenharmony_ci	DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct task_struct, thread.ksp));
6262306a36Sopenharmony_ci	DEFINE(IA64_TASK_THREAD_ON_USTACK_OFFSET, offsetof (struct task_struct, thread.on_ustack));
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci	BLANK();
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci	DEFINE(IA64_SIGNAL_GROUP_STOP_COUNT_OFFSET,offsetof (struct signal_struct,
6862306a36Sopenharmony_ci							     group_stop_count));
6962306a36Sopenharmony_ci	DEFINE(IA64_SIGNAL_SHARED_PENDING_OFFSET,offsetof (struct signal_struct, shared_pending));
7062306a36Sopenharmony_ci	DEFINE(IA64_SIGNAL_PIDS_TGID_OFFSET, offsetof (struct signal_struct, pids[PIDTYPE_TGID]));
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci	BLANK();
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_B6_OFFSET, offsetof (struct pt_regs, b6));
7562306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_B7_OFFSET, offsetof (struct pt_regs, b7));
7662306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_CSD_OFFSET, offsetof (struct pt_regs, ar_csd));
7762306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_SSD_OFFSET, offsetof (struct pt_regs, ar_ssd));
7862306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R8_OFFSET, offsetof (struct pt_regs, r8));
7962306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R9_OFFSET, offsetof (struct pt_regs, r9));
8062306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R10_OFFSET, offsetof (struct pt_regs, r10));
8162306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R11_OFFSET, offsetof (struct pt_regs, r11));
8262306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_CR_IPSR_OFFSET, offsetof (struct pt_regs, cr_ipsr));
8362306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_CR_IIP_OFFSET, offsetof (struct pt_regs, cr_iip));
8462306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_CR_IFS_OFFSET, offsetof (struct pt_regs, cr_ifs));
8562306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_UNAT_OFFSET, offsetof (struct pt_regs, ar_unat));
8662306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_PFS_OFFSET, offsetof (struct pt_regs, ar_pfs));
8762306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_RSC_OFFSET, offsetof (struct pt_regs, ar_rsc));
8862306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_RNAT_OFFSET, offsetof (struct pt_regs, ar_rnat));
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_BSPSTORE_OFFSET, offsetof (struct pt_regs, ar_bspstore));
9162306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_PR_OFFSET, offsetof (struct pt_regs, pr));
9262306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_B0_OFFSET, offsetof (struct pt_regs, b0));
9362306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_LOADRS_OFFSET, offsetof (struct pt_regs, loadrs));
9462306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R1_OFFSET, offsetof (struct pt_regs, r1));
9562306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R12_OFFSET, offsetof (struct pt_regs, r12));
9662306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R13_OFFSET, offsetof (struct pt_regs, r13));
9762306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_FPSR_OFFSET, offsetof (struct pt_regs, ar_fpsr));
9862306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R15_OFFSET, offsetof (struct pt_regs, r15));
9962306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R14_OFFSET, offsetof (struct pt_regs, r14));
10062306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R2_OFFSET, offsetof (struct pt_regs, r2));
10162306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R3_OFFSET, offsetof (struct pt_regs, r3));
10262306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R16_OFFSET, offsetof (struct pt_regs, r16));
10362306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R17_OFFSET, offsetof (struct pt_regs, r17));
10462306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R18_OFFSET, offsetof (struct pt_regs, r18));
10562306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R19_OFFSET, offsetof (struct pt_regs, r19));
10662306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R20_OFFSET, offsetof (struct pt_regs, r20));
10762306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R21_OFFSET, offsetof (struct pt_regs, r21));
10862306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R22_OFFSET, offsetof (struct pt_regs, r22));
10962306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R23_OFFSET, offsetof (struct pt_regs, r23));
11062306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R24_OFFSET, offsetof (struct pt_regs, r24));
11162306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R25_OFFSET, offsetof (struct pt_regs, r25));
11262306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R26_OFFSET, offsetof (struct pt_regs, r26));
11362306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R27_OFFSET, offsetof (struct pt_regs, r27));
11462306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R28_OFFSET, offsetof (struct pt_regs, r28));
11562306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R29_OFFSET, offsetof (struct pt_regs, r29));
11662306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R30_OFFSET, offsetof (struct pt_regs, r30));
11762306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_R31_OFFSET, offsetof (struct pt_regs, r31));
11862306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_AR_CCV_OFFSET, offsetof (struct pt_regs, ar_ccv));
11962306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_F6_OFFSET, offsetof (struct pt_regs, f6));
12062306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_F7_OFFSET, offsetof (struct pt_regs, f7));
12162306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_F8_OFFSET, offsetof (struct pt_regs, f8));
12262306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_F9_OFFSET, offsetof (struct pt_regs, f9));
12362306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_F10_OFFSET, offsetof (struct pt_regs, f10));
12462306a36Sopenharmony_ci	DEFINE(IA64_PT_REGS_F11_OFFSET, offsetof (struct pt_regs, f11));
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci	BLANK();
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_CALLER_UNAT_OFFSET, offsetof (struct switch_stack, caller_unat));
12962306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_AR_FPSR_OFFSET, offsetof (struct switch_stack, ar_fpsr));
13062306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F2_OFFSET, offsetof (struct switch_stack, f2));
13162306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F3_OFFSET, offsetof (struct switch_stack, f3));
13262306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F4_OFFSET, offsetof (struct switch_stack, f4));
13362306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F5_OFFSET, offsetof (struct switch_stack, f5));
13462306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F12_OFFSET, offsetof (struct switch_stack, f12));
13562306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F13_OFFSET, offsetof (struct switch_stack, f13));
13662306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F14_OFFSET, offsetof (struct switch_stack, f14));
13762306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F15_OFFSET, offsetof (struct switch_stack, f15));
13862306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F16_OFFSET, offsetof (struct switch_stack, f16));
13962306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F17_OFFSET, offsetof (struct switch_stack, f17));
14062306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F18_OFFSET, offsetof (struct switch_stack, f18));
14162306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F19_OFFSET, offsetof (struct switch_stack, f19));
14262306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F20_OFFSET, offsetof (struct switch_stack, f20));
14362306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F21_OFFSET, offsetof (struct switch_stack, f21));
14462306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F22_OFFSET, offsetof (struct switch_stack, f22));
14562306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F23_OFFSET, offsetof (struct switch_stack, f23));
14662306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F24_OFFSET, offsetof (struct switch_stack, f24));
14762306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F25_OFFSET, offsetof (struct switch_stack, f25));
14862306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F26_OFFSET, offsetof (struct switch_stack, f26));
14962306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F27_OFFSET, offsetof (struct switch_stack, f27));
15062306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F28_OFFSET, offsetof (struct switch_stack, f28));
15162306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F29_OFFSET, offsetof (struct switch_stack, f29));
15262306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F30_OFFSET, offsetof (struct switch_stack, f30));
15362306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_F31_OFFSET, offsetof (struct switch_stack, f31));
15462306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_R4_OFFSET, offsetof (struct switch_stack, r4));
15562306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_R5_OFFSET, offsetof (struct switch_stack, r5));
15662306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_R6_OFFSET, offsetof (struct switch_stack, r6));
15762306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_R7_OFFSET, offsetof (struct switch_stack, r7));
15862306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_B0_OFFSET, offsetof (struct switch_stack, b0));
15962306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_B1_OFFSET, offsetof (struct switch_stack, b1));
16062306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_B2_OFFSET, offsetof (struct switch_stack, b2));
16162306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_B3_OFFSET, offsetof (struct switch_stack, b3));
16262306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_B4_OFFSET, offsetof (struct switch_stack, b4));
16362306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_B5_OFFSET, offsetof (struct switch_stack, b5));
16462306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_AR_PFS_OFFSET, offsetof (struct switch_stack, ar_pfs));
16562306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_AR_LC_OFFSET, offsetof (struct switch_stack, ar_lc));
16662306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_AR_UNAT_OFFSET, offsetof (struct switch_stack, ar_unat));
16762306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_AR_RNAT_OFFSET, offsetof (struct switch_stack, ar_rnat));
16862306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_AR_BSPSTORE_OFFSET, offsetof (struct switch_stack, ar_bspstore));
16962306a36Sopenharmony_ci	DEFINE(IA64_SWITCH_STACK_PR_OFFSET, offsetof (struct switch_stack, pr));
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ci	BLANK();
17262306a36Sopenharmony_ci
17362306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_IP_OFFSET, offsetof (struct sigcontext, sc_ip));
17462306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_AR_BSP_OFFSET, offsetof (struct sigcontext, sc_ar_bsp));
17562306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_AR_FPSR_OFFSET, offsetof (struct sigcontext, sc_ar_fpsr));
17662306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_AR_RNAT_OFFSET, offsetof (struct sigcontext, sc_ar_rnat));
17762306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_AR_UNAT_OFFSET, offsetof (struct sigcontext, sc_ar_unat));
17862306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_B0_OFFSET, offsetof (struct sigcontext, sc_br[0]));
17962306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_CFM_OFFSET, offsetof (struct sigcontext, sc_cfm));
18062306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_FLAGS_OFFSET, offsetof (struct sigcontext, sc_flags));
18162306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_FR6_OFFSET, offsetof (struct sigcontext, sc_fr[6]));
18262306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_PR_OFFSET, offsetof (struct sigcontext, sc_pr));
18362306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_R12_OFFSET, offsetof (struct sigcontext, sc_gr[12]));
18462306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_RBS_BASE_OFFSET,offsetof (struct sigcontext, sc_rbs_base));
18562306a36Sopenharmony_ci	DEFINE(IA64_SIGCONTEXT_LOADRS_OFFSET, offsetof (struct sigcontext, sc_loadrs));
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ci	BLANK();
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ci	DEFINE(IA64_SIGPENDING_SIGNAL_OFFSET, offsetof (struct sigpending, signal));
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ci	BLANK();
19262306a36Sopenharmony_ci
19362306a36Sopenharmony_ci	DEFINE(IA64_SIGFRAME_ARG0_OFFSET, offsetof (struct sigframe, arg0));
19462306a36Sopenharmony_ci	DEFINE(IA64_SIGFRAME_ARG1_OFFSET, offsetof (struct sigframe, arg1));
19562306a36Sopenharmony_ci	DEFINE(IA64_SIGFRAME_ARG2_OFFSET, offsetof (struct sigframe, arg2));
19662306a36Sopenharmony_ci	DEFINE(IA64_SIGFRAME_HANDLER_OFFSET, offsetof (struct sigframe, handler));
19762306a36Sopenharmony_ci	DEFINE(IA64_SIGFRAME_SIGCONTEXT_OFFSET, offsetof (struct sigframe, sc));
19862306a36Sopenharmony_ci	BLANK();
19962306a36Sopenharmony_ci    /* for assembly files which can't include sched.h: */
20062306a36Sopenharmony_ci	DEFINE(IA64_CLONE_VFORK, CLONE_VFORK);
20162306a36Sopenharmony_ci	DEFINE(IA64_CLONE_VM, CLONE_VM);
20262306a36Sopenharmony_ci
20362306a36Sopenharmony_ci	BLANK();
20462306a36Sopenharmony_ci	DEFINE(IA64_CPUINFO_NSEC_PER_CYC_OFFSET,
20562306a36Sopenharmony_ci	       offsetof (struct cpuinfo_ia64, nsec_per_cyc));
20662306a36Sopenharmony_ci	DEFINE(IA64_CPUINFO_PTCE_BASE_OFFSET,
20762306a36Sopenharmony_ci	       offsetof (struct cpuinfo_ia64, ptce_base));
20862306a36Sopenharmony_ci	DEFINE(IA64_CPUINFO_PTCE_COUNT_OFFSET,
20962306a36Sopenharmony_ci	       offsetof (struct cpuinfo_ia64, ptce_count));
21062306a36Sopenharmony_ci	DEFINE(IA64_CPUINFO_PTCE_STRIDE_OFFSET,
21162306a36Sopenharmony_ci	       offsetof (struct cpuinfo_ia64, ptce_stride));
21262306a36Sopenharmony_ci	BLANK();
21362306a36Sopenharmony_ci	DEFINE(IA64_TIMESPEC_TV_NSEC_OFFSET,
21462306a36Sopenharmony_ci	       offsetof (struct __kernel_old_timespec, tv_nsec));
21562306a36Sopenharmony_ci	DEFINE(IA64_TIME_SN_SPEC_SNSEC_OFFSET,
21662306a36Sopenharmony_ci	       offsetof (struct time_sn_spec, snsec));
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ci	DEFINE(CLONE_SETTLS_BIT, 19);
21962306a36Sopenharmony_ci#if CLONE_SETTLS != (1<<19)
22062306a36Sopenharmony_ci# error "CLONE_SETTLS_BIT incorrect, please fix"
22162306a36Sopenharmony_ci#endif
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ci	BLANK();
22462306a36Sopenharmony_ci	DEFINE(IA64_MCA_CPU_MCA_STACK_OFFSET,
22562306a36Sopenharmony_ci	       offsetof (struct ia64_mca_cpu, mca_stack));
22662306a36Sopenharmony_ci	DEFINE(IA64_MCA_CPU_INIT_STACK_OFFSET,
22762306a36Sopenharmony_ci	       offsetof (struct ia64_mca_cpu, init_stack));
22862306a36Sopenharmony_ci	BLANK();
22962306a36Sopenharmony_ci	DEFINE(IA64_SAL_OS_STATE_OS_GP_OFFSET,
23062306a36Sopenharmony_ci	       offsetof (struct ia64_sal_os_state, os_gp));
23162306a36Sopenharmony_ci	DEFINE(IA64_SAL_OS_STATE_PROC_STATE_PARAM_OFFSET,
23262306a36Sopenharmony_ci	       offsetof (struct ia64_sal_os_state, proc_state_param));
23362306a36Sopenharmony_ci	DEFINE(IA64_SAL_OS_STATE_SAL_RA_OFFSET,
23462306a36Sopenharmony_ci	       offsetof (struct ia64_sal_os_state, sal_ra));
23562306a36Sopenharmony_ci	DEFINE(IA64_SAL_OS_STATE_SAL_GP_OFFSET,
23662306a36Sopenharmony_ci	       offsetof (struct ia64_sal_os_state, sal_gp));
23762306a36Sopenharmony_ci	DEFINE(IA64_SAL_OS_STATE_PAL_MIN_STATE_OFFSET,
23862306a36Sopenharmony_ci	       offsetof (struct ia64_sal_os_state, pal_min_state));
23962306a36Sopenharmony_ci	DEFINE(IA64_SAL_OS_STATE_OS_STATUS_OFFSET,
24062306a36Sopenharmony_ci	       offsetof (struct ia64_sal_os_state, os_status));
24162306a36Sopenharmony_ci	DEFINE(IA64_SAL_OS_STATE_CONTEXT_OFFSET,
24262306a36Sopenharmony_ci	       offsetof (struct ia64_sal_os_state, context));
24362306a36Sopenharmony_ci	DEFINE(IA64_SAL_OS_STATE_SIZE,
24462306a36Sopenharmony_ci	       sizeof (struct ia64_sal_os_state));
24562306a36Sopenharmony_ci	BLANK();
24662306a36Sopenharmony_ci
24762306a36Sopenharmony_ci	DEFINE(IA64_PMSA_GR_OFFSET,
24862306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_gr));
24962306a36Sopenharmony_ci	DEFINE(IA64_PMSA_BANK1_GR_OFFSET,
25062306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_bank1_gr));
25162306a36Sopenharmony_ci	DEFINE(IA64_PMSA_PR_OFFSET,
25262306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_pr));
25362306a36Sopenharmony_ci	DEFINE(IA64_PMSA_BR0_OFFSET,
25462306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_br0));
25562306a36Sopenharmony_ci	DEFINE(IA64_PMSA_RSC_OFFSET,
25662306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_rsc));
25762306a36Sopenharmony_ci	DEFINE(IA64_PMSA_IIP_OFFSET,
25862306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_iip));
25962306a36Sopenharmony_ci	DEFINE(IA64_PMSA_IPSR_OFFSET,
26062306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_ipsr));
26162306a36Sopenharmony_ci	DEFINE(IA64_PMSA_IFS_OFFSET,
26262306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_ifs));
26362306a36Sopenharmony_ci	DEFINE(IA64_PMSA_XIP_OFFSET,
26462306a36Sopenharmony_ci	       offsetof(struct pal_min_state_area, pmsa_xip));
26562306a36Sopenharmony_ci	BLANK();
26662306a36Sopenharmony_ci
26762306a36Sopenharmony_ci	/* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */
26862306a36Sopenharmony_ci	DEFINE(IA64_GTOD_SEQ_OFFSET,
26962306a36Sopenharmony_ci	       offsetof (struct fsyscall_gtod_data_t, seq));
27062306a36Sopenharmony_ci	DEFINE(IA64_GTOD_WALL_TIME_OFFSET,
27162306a36Sopenharmony_ci		offsetof (struct fsyscall_gtod_data_t, wall_time));
27262306a36Sopenharmony_ci	DEFINE(IA64_GTOD_MONO_TIME_OFFSET,
27362306a36Sopenharmony_ci		offsetof (struct fsyscall_gtod_data_t, monotonic_time));
27462306a36Sopenharmony_ci	DEFINE(IA64_CLKSRC_MASK_OFFSET,
27562306a36Sopenharmony_ci		offsetof (struct fsyscall_gtod_data_t, clk_mask));
27662306a36Sopenharmony_ci	DEFINE(IA64_CLKSRC_MULT_OFFSET,
27762306a36Sopenharmony_ci		offsetof (struct fsyscall_gtod_data_t, clk_mult));
27862306a36Sopenharmony_ci	DEFINE(IA64_CLKSRC_SHIFT_OFFSET,
27962306a36Sopenharmony_ci		offsetof (struct fsyscall_gtod_data_t, clk_shift));
28062306a36Sopenharmony_ci	DEFINE(IA64_CLKSRC_MMIO_OFFSET,
28162306a36Sopenharmony_ci		offsetof (struct fsyscall_gtod_data_t, clk_fsys_mmio));
28262306a36Sopenharmony_ci	DEFINE(IA64_CLKSRC_CYCLE_LAST_OFFSET,
28362306a36Sopenharmony_ci		offsetof (struct fsyscall_gtod_data_t, clk_cycle_last));
28462306a36Sopenharmony_ci	DEFINE(IA64_ITC_JITTER_OFFSET,
28562306a36Sopenharmony_ci		offsetof (struct itc_jitter_data_t, itc_jitter));
28662306a36Sopenharmony_ci	DEFINE(IA64_ITC_LASTCYCLE_OFFSET,
28762306a36Sopenharmony_ci		offsetof (struct itc_jitter_data_t, itc_lastcycle));
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ci}
290