ia64/xen-unstable

changeset 9406:0d4a846232cc

[IA64] recompile asm-xsi-offsets.h at right time

asm-xsi-offsets.h also needs to be re-compiled when header files change,
or else there'll still be window for xenlinux to see mismatched offsets
definition.

Also remove unused definitions in asm-offsets.c

Signed-off-by: Kevin Tian <Kevin.Tian@intel.com>
author awilliam@xenbuild.aw
date Mon Mar 27 15:34:02 2006 -0700 (2006-03-27)
parents 29dfadcc5029
children 27050b1390cf
files xen/arch/ia64/Makefile xen/arch/ia64/asm-offsets.c
line diff
     1.1 --- a/xen/arch/ia64/Makefile	Mon Mar 27 15:32:08 2006 -0700
     1.2 +++ b/xen/arch/ia64/Makefile	Mon Mar 27 15:34:02 2006 -0700
     1.3 @@ -25,10 +25,11 @@ include $(BASEDIR)/Post.mk
     1.4  	$(NM) -n $(TARGET)-syms | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)'\
     1.5  		 > $(BASEDIR)/System.map
     1.6  
     1.7 -asm-offsets.s: asm-offsets.c $(BASEDIR)/include/asm-ia64/.offsets.h.stamp $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h $(HDRS)
     1.8 +HDRS    := $(subst $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h,,$(HDRS))
     1.9 +asm-offsets.s: asm-offsets.c $(BASEDIR)/include/asm-ia64/.offsets.h.stamp $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h
    1.10  	$(CC) $(CFLAGS) -S -o $@ $<
    1.11  
    1.12 -asm-xsi-offsets.s: asm-xsi-offsets.c 
    1.13 +asm-xsi-offsets.s: asm-xsi-offsets.c $(HDRS)
    1.14  	$(CC) $(CFLAGS) -S -o $@ $<
    1.15  
    1.16  $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h: asm-xsi-offsets.s
     2.1 --- a/xen/arch/ia64/asm-offsets.c	Mon Mar 27 15:32:08 2006 -0700
     2.2 +++ b/xen/arch/ia64/asm-offsets.c	Mon Mar 27 15:34:02 2006 -0700
     2.3 @@ -28,9 +28,7 @@ void foo(void)
     2.4  	DEFINE(IA64_THREAD_INFO_SIZE, sizeof (struct thread_info));
     2.5  	DEFINE(IA64_PT_REGS_SIZE, sizeof (struct pt_regs));
     2.6  	DEFINE(IA64_SWITCH_STACK_SIZE, sizeof (struct switch_stack));
     2.7 -	//DEFINE(IA64_SIGINFO_SIZE, sizeof (struct siginfo));
     2.8  	DEFINE(IA64_CPU_SIZE, sizeof (struct cpuinfo_ia64));
     2.9 -	//DEFINE(SIGFRAME_SIZE, sizeof (struct sigframe));
    2.10  	DEFINE(UNW_FRAME_INFO_SIZE, sizeof (struct unw_frame_info));
    2.11  
    2.12  	BLANK();
    2.13 @@ -75,15 +73,6 @@ void foo(void)
    2.14  	DEFINE(XSI_PTA_OFS, offsetof(mapped_regs_t, pta));
    2.15  	DEFINE(XSI_ITV_OFS, offsetof(mapped_regs_t, itv));
    2.16  	DEFINE(XSI_KR0_OFS, offsetof(mapped_regs_t, krs[0]));
    2.17 -	//DEFINE(IA64_TASK_BLOCKED_OFFSET,offsetof (struct task_struct, blocked));
    2.18 -	//DEFINE(IA64_TASK_CLEAR_CHILD_TID_OFFSET,offsetof (struct task_struct, clear_child_tid));
    2.19 -	//DEFINE(IA64_TASK_GROUP_LEADER_OFFSET, offsetof (struct task_struct, group_leader));
    2.20 -	//DEFINE(IA64_TASK_PENDING_OFFSET,offsetof (struct task_struct, pending));
    2.21 -	//DEFINE(IA64_TASK_PID_OFFSET, offsetof (struct task_struct, pid));
    2.22 -	//DEFINE(IA64_TASK_REAL_PARENT_OFFSET, offsetof (struct task_struct, real_parent));
    2.23 -	//DEFINE(IA64_TASK_SIGHAND_OFFSET,offsetof (struct task_struct, sighand));
    2.24 -	//DEFINE(IA64_TASK_SIGNAL_OFFSET,offsetof (struct task_struct, signal));
    2.25 -	//DEFINE(IA64_TASK_TGID_OFFSET, offsetof (struct task_struct, tgid));
    2.26  	DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct vcpu, arch._thread.ksp));
    2.27  	DEFINE(IA64_TASK_THREAD_ON_USTACK_OFFSET, offsetof (struct vcpu, arch._thread.on_ustack));
    2.28  
    2.29 @@ -108,13 +97,6 @@ void foo(void)
    2.30  	DEFINE(IA64_CPUINFO_ITM_NEXT_OFFSET, offsetof (struct cpuinfo_ia64, itm_next));
    2.31  	DEFINE(IA64_CPUINFO_KSOFTIRQD_OFFSET, offsetof (struct cpuinfo_ia64, ksoftirqd));
    2.32  
    2.33 -	//DEFINE(IA64_SIGHAND_SIGLOCK_OFFSET,offsetof (struct sighand_struct, siglock));
    2.34 -
    2.35 -	BLANK();
    2.36 -
    2.37 -	//DEFINE(IA64_SIGNAL_GROUP_STOP_COUNT_OFFSET,offsetof (struct signal_struct,
    2.38 -							     //group_stop_count));
    2.39 -	//DEFINE(IA64_SIGNAL_SHARED_PENDING_OFFSET,offsetof (struct signal_struct, shared_pending));
    2.40  
    2.41  	BLANK();
    2.42  
    2.43 @@ -175,12 +157,12 @@ void foo(void)
    2.44  	DEFINE(IA64_PT_REGS_R7_OFFSET, offsetof (struct pt_regs, r7));
    2.45  	DEFINE(IA64_PT_REGS_EML_UNAT_OFFSET, offsetof (struct pt_regs, eml_unat));
    2.46  	DEFINE(IA64_PT_REGS_RFI_PFS_OFFSET, offsetof (struct pt_regs, rfi_pfs));
    2.47 -    DEFINE(IA64_VCPU_IIPA_OFFSET, offsetof (struct vcpu, arch.arch_vmx.cr_iipa));
    2.48 -    DEFINE(IA64_VCPU_ISR_OFFSET, offsetof (struct vcpu, arch.arch_vmx.cr_isr));
    2.49 -    DEFINE(IA64_VCPU_CAUSE_OFFSET, offsetof (struct vcpu, arch.arch_vmx.cause));
    2.50 -    DEFINE(IA64_VCPU_OPCODE_OFFSET, offsetof (struct vcpu, arch.arch_vmx.opcode));
    2.51 +	DEFINE(IA64_VCPU_IIPA_OFFSET, offsetof (struct vcpu, arch.arch_vmx.cr_iipa));
    2.52 +	DEFINE(IA64_VCPU_ISR_OFFSET, offsetof (struct vcpu, arch.arch_vmx.cr_isr));
    2.53 +	DEFINE(IA64_VCPU_CAUSE_OFFSET, offsetof (struct vcpu, arch.arch_vmx.cause));
    2.54 +	DEFINE(IA64_VCPU_OPCODE_OFFSET, offsetof (struct vcpu, arch.arch_vmx.opcode));
    2.55  	DEFINE(SWITCH_MPTA_OFFSET,offsetof(struct vcpu ,arch.arch_vmx.mpta));
    2.56 -    DEFINE(IA64_PT_REGS_R16_SLOT, (((offsetof(struct pt_regs, r16)-sizeof(struct pt_regs))>>3)&0x3f));
    2.57 +	DEFINE(IA64_PT_REGS_R16_SLOT, (((offsetof(struct pt_regs, r16)-sizeof(struct pt_regs))>>3)&0x3f));
    2.58  	DEFINE(IA64_VCPU_FLAGS_OFFSET,offsetof(struct vcpu ,arch.arch_vmx.flags));
    2.59  
    2.60  	BLANK();
    2.61 @@ -236,67 +218,15 @@ void foo(void)
    2.62  	DEFINE(XXX_THASH_SIZE, sizeof (thash_data_t));
    2.63  
    2.64  	BLANK();
    2.65 -	//DEFINE(IA64_SIGCONTEXT_IP_OFFSET, offsetof (struct sigcontext, sc_ip));
    2.66 -	//DEFINE(IA64_SIGCONTEXT_AR_BSP_OFFSET, offsetof (struct sigcontext, sc_ar_bsp));
    2.67 -	//DEFINE(IA64_SIGCONTEXT_AR_FPSR_OFFSET, offsetof (struct sigcontext, sc_ar_fpsr));
    2.68 -	//DEFINE(IA64_SIGCONTEXT_AR_RNAT_OFFSET, offsetof (struct sigcontext, sc_ar_rnat));
    2.69 -	//DEFINE(IA64_SIGCONTEXT_AR_UNAT_OFFSET, offsetof (struct sigcontext, sc_ar_unat));
    2.70 -	//DEFINE(IA64_SIGCONTEXT_B0_OFFSET, offsetof (struct sigcontext, sc_br[0]));
    2.71 -	//DEFINE(IA64_SIGCONTEXT_CFM_OFFSET, offsetof (struct sigcontext, sc_cfm));
    2.72 -	//DEFINE(IA64_SIGCONTEXT_FLAGS_OFFSET, offsetof (struct sigcontext, sc_flags));
    2.73 -	//DEFINE(IA64_SIGCONTEXT_FR6_OFFSET, offsetof (struct sigcontext, sc_fr[6]));
    2.74 -	//DEFINE(IA64_SIGCONTEXT_PR_OFFSET, offsetof (struct sigcontext, sc_pr));
    2.75 -	//DEFINE(IA64_SIGCONTEXT_R12_OFFSET, offsetof (struct sigcontext, sc_gr[12]));
    2.76 -	//DEFINE(IA64_SIGCONTEXT_RBS_BASE_OFFSET,offsetof (struct sigcontext, sc_rbs_base));
    2.77 -	//DEFINE(IA64_SIGCONTEXT_LOADRS_OFFSET, offsetof (struct sigcontext, sc_loadrs));
    2.78 -
    2.79 -	//BLANK();
    2.80 -
    2.81 -	//DEFINE(IA64_SIGPENDING_SIGNAL_OFFSET, offsetof (struct sigpending, signal));
    2.82 -
    2.83 -	//BLANK();
    2.84 -
    2.85 -	//DEFINE(IA64_SIGFRAME_ARG0_OFFSET, offsetof (struct sigframe, arg0));
    2.86 -	//DEFINE(IA64_SIGFRAME_ARG1_OFFSET, offsetof (struct sigframe, arg1));
    2.87 -	//DEFINE(IA64_SIGFRAME_ARG2_OFFSET, offsetof (struct sigframe, arg2));
    2.88 -	//DEFINE(IA64_SIGFRAME_HANDLER_OFFSET, offsetof (struct sigframe, handler));
    2.89 -	//DEFINE(IA64_SIGFRAME_SIGCONTEXT_OFFSET, offsetof (struct sigframe, sc));
    2.90 -	//BLANK();
    2.91 -    /* for assembly files which can't include sched.h: */
    2.92 -	//DEFINE(IA64_CLONE_VFORK, CLONE_VFORK);
    2.93 -	//DEFINE(IA64_CLONE_VM, CLONE_VM);
    2.94 -
    2.95 -	BLANK();
    2.96  	DEFINE(IA64_CPUINFO_NSEC_PER_CYC_OFFSET, offsetof (struct cpuinfo_ia64, nsec_per_cyc));
    2.97  	DEFINE(IA64_TIMESPEC_TV_NSEC_OFFSET, offsetof (struct timespec, tv_nsec));
    2.98  
    2.99  
   2.100  	DEFINE(CLONE_IDLETASK_BIT, 12);
   2.101  	DEFINE(CLONE_SETTLS_BIT, 19);
   2.102 -//#if CLONE_SETTLS != (1<<19)
   2.103 -//# error "CLONE_SETTLS_BIT incorrect, please fix"
   2.104 -//#endif
   2.105 -
   2.106 -	//BLANK();
   2.107 -	//DEFINE(IA64_MCA_TLB_INFO_SIZE, sizeof (struct ia64_mca_tlb_info));
   2.108 -	/* used by head.S */
   2.109  	DEFINE(IA64_CPUINFO_NSEC_PER_CYC_OFFSET, offsetof (struct cpuinfo_ia64, nsec_per_cyc));
   2.110  
   2.111  	BLANK();
   2.112 -	/* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */
   2.113 -	//DEFINE(IA64_TIME_INTERPOLATOR_ADDRESS_OFFSET, offsetof (struct time_interpolator, addr));
   2.114 -	//DEFINE(IA64_TIME_INTERPOLATOR_SOURCE_OFFSET, offsetof (struct time_interpolator, source));
   2.115 -	//DEFINE(IA64_TIME_INTERPOLATOR_SHIFT_OFFSET, offsetof (struct time_interpolator, shift));
   2.116 -	//DEFINE(IA64_TIME_INTERPOLATOR_NSEC_OFFSET, offsetof (struct time_interpolator, nsec_per_cyc));
   2.117 -	//DEFINE(IA64_TIME_INTERPOLATOR_OFFSET_OFFSET, offsetof (struct time_interpolator, offset));
   2.118 -	//DEFINE(IA64_TIME_INTERPOLATOR_LAST_CYCLE_OFFSET, offsetof (struct time_interpolator, last_cycle));
   2.119 -	//DEFINE(IA64_TIME_INTERPOLATOR_LAST_COUNTER_OFFSET, offsetof (struct time_interpolator, last_counter));
   2.120 -	//DEFINE(IA64_TIME_INTERPOLATOR_JITTER_OFFSET, offsetof (struct time_interpolator, jitter));
   2.121 -	//DEFINE(IA64_TIME_INTERPOLATOR_MASK_OFFSET, offsetof (struct time_interpolator, mask));
   2.122 -	//DEFINE(IA64_TIME_SOURCE_CPU, TIME_SOURCE_CPU);
   2.123 -	//DEFINE(IA64_TIME_SOURCE_MMIO64, TIME_SOURCE_MMIO64);
   2.124 -	//DEFINE(IA64_TIME_SOURCE_MMIO32, TIME_SOURCE_MMIO32);
   2.125 -	//DEFINE(IA64_TIMESPEC_TV_NSEC_OFFSET, offsetof (struct timespec, tv_nsec));
   2.126  	DEFINE(IA64_KR_CURRENT_OFFSET, offsetof (cpu_kr_ia64_t, _kr[IA64_KR_CURRENT]));
   2.127  	DEFINE(IA64_KR_PT_BASE_OFFSET, offsetof (cpu_kr_ia64_t, _kr[IA64_KR_PT_BASE]));
   2.128  	DEFINE(IA64_KR_IO_BASE_OFFSET, offsetof (cpu_kr_ia64_t, _kr[IA64_KR_IO_BASE]));