ia64/xen-unstable

view xen/arch/ia64/asm-xsi-offsets.c @ 12423:2b0596c8a031

[IA64] create minimal vlapic.h

This fixes the ia64 build for xen-unstable.hg cset 12368:fda15861731e

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Mon Nov 13 10:56:08 2006 -0700 (2006-11-13)
parents bf396988059e
children ea2dc4a3c8eb
line source
1 /* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
2 /*
3 * asm-xsi-offsets.c_
4 * Copyright (c) 2005, Intel Corporation.
5 * Kun Tian (Kevin Tian) <kevin.tian@intel.com>
6 * Eddie Dong <eddie.dong@intel.com>
7 * Fred Yang <fred.yang@intel.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms and conditions of the GNU General Public License,
11 * version 2, as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20 * Place - Suite 330, Boston, MA 02111-1307 USA.
21 *
22 */
24 /*
25 * Generate definitions needed by assembly language modules.
26 * This code generates raw asm output which is post-processed
27 * to extract and format the required data.
28 */
30 #include <xen/config.h>
31 #include <xen/sched.h>
32 #include <asm/processor.h>
33 #include <asm/ptrace.h>
34 #include <public/xen.h>
35 #include <asm/tlb.h>
36 #include <asm/regs.h>
38 #define task_struct vcpu
40 #define DEFINE(sym, val) \
41 asm volatile("\n->" #sym " (%0) " #val : : "i" (val))
43 #define BLANK() asm volatile("\n->" : : )
45 #define DEFINE_MAPPED_REG_OFS(sym, field) \
46 DEFINE(sym, (XMAPPEDREGS_OFS + offsetof(mapped_regs_t, field)))
48 void foo(void)
49 {
50 DEFINE_MAPPED_REG_OFS(XSI_PSR_I_ADDR_OFS, interrupt_mask_addr);
51 DEFINE_MAPPED_REG_OFS(XSI_IPSR_OFS, ipsr);
52 DEFINE_MAPPED_REG_OFS(XSI_IIP_OFS, iip);
53 DEFINE_MAPPED_REG_OFS(XSI_IFS_OFS, ifs);
54 DEFINE_MAPPED_REG_OFS(XSI_PRECOVER_IFS_OFS, precover_ifs);
55 DEFINE_MAPPED_REG_OFS(XSI_ISR_OFS, isr);
56 DEFINE_MAPPED_REG_OFS(XSI_IFA_OFS, ifa);
57 DEFINE_MAPPED_REG_OFS(XSI_IIPA_OFS, iipa);
58 DEFINE_MAPPED_REG_OFS(XSI_IIM_OFS, iim);
59 DEFINE_MAPPED_REG_OFS(XSI_TPR_OFS, tpr);
60 DEFINE_MAPPED_REG_OFS(XSI_IHA_OFS, iha);
61 DEFINE_MAPPED_REG_OFS(XSI_ITIR_OFS, itir);
62 DEFINE_MAPPED_REG_OFS(XSI_ITV_OFS, itv);
63 DEFINE_MAPPED_REG_OFS(XSI_PTA_OFS, pta);
64 DEFINE_MAPPED_REG_OFS(XSI_PSR_IC_OFS, interrupt_collection_enabled);
65 DEFINE_MAPPED_REG_OFS(XSI_PEND_OFS, pending_interruption);
66 DEFINE_MAPPED_REG_OFS(XSI_INCOMPL_REGFR_OFS, incomplete_regframe);
67 DEFINE_MAPPED_REG_OFS(XSI_METAPHYS_OFS, metaphysical_mode);
68 DEFINE_MAPPED_REG_OFS(XSI_BANKNUM_OFS, banknum);
69 DEFINE_MAPPED_REG_OFS(XSI_BANK0_R16_OFS, bank0_regs[0]);
70 DEFINE_MAPPED_REG_OFS(XSI_BANK1_R16_OFS, bank1_regs[0]);
71 DEFINE_MAPPED_REG_OFS(XSI_B0NATS_OFS, vbnat);
72 DEFINE_MAPPED_REG_OFS(XSI_B1NATS_OFS, vnat);
73 DEFINE_MAPPED_REG_OFS(XSI_RR0_OFS, rrs[0]);
74 DEFINE_MAPPED_REG_OFS(XSI_KR0_OFS, krs[0]);
75 }