debuggers.hg

view xen/include/asm-ia64/xenoprof.h @ 21973:a904221a56c2

[IA64] xenoprof: fix ia64 build

21902:2c6ae364ed7b ("xenoprofile: Add IBS support") breaks ia64.
This patch fixes it.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Aug 06 15:41:59 2010 +0100 (2010-08-06)
parents d3881629d572
children
line source
1 /******************************************************************************
2 * asm-ia64/xenoprof.h
3 * xenoprof ia64 arch specific header file
4 *
5 * Copyright (c) 2006 Isaku Yamahata <yamahata at valinux co jp>
6 * VA Linux Systems Japan K.K.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
24 #ifndef __ASM_XENOPROF_H__
25 #define __ASM_XENOPROF_H__
27 int xenoprof_arch_init(int *num_events, char *cpu_type);
28 int xenoprof_arch_reserve_counters(void);
29 int xenoprof_arch_counter(XEN_GUEST_HANDLE(void) arg);
30 int xenoprof_arch_setup_events(void);
31 int xenoprof_arch_enable_virq(void);
32 int xenoprof_arch_start(void);
33 void xenoprof_arch_stop(void);
34 void xenoprof_arch_disable_virq(void);
35 void xenoprof_arch_release_counters(void);
37 static inline int xenoprof_arch_ibs_counter(XEN_GUEST_HANDLE(void) arg)
38 {
39 return -ENOSYS; /* not supported */
40 }
41 /* AMD IBS not supported */
42 #define ibs_caps 0
44 struct vcpu;
45 struct cpu_user_regs;
46 int xenoprofile_get_mode(struct vcpu *v, struct cpu_user_regs * const regs);
47 static inline int xenoprof_backtrace_supported(void)
48 {
49 return 0;
50 }
51 static inline void xenoprof_backtrace(
52 struct domain *d, struct vcpu *vcpu,
53 struct pt_regs *const regs, unsigned long depth, int mode)
54 {
55 /* To be implemented */
56 return;
57 }
58 #define xenoprof_shared_gmfn(d, gmaddr, maddr) \
59 do { \
60 unsigned long ret; \
61 ret = create_grant_host_mapping((gmaddr), \
62 (maddr) >> PAGE_SHIFT, 0, 0); \
63 BUG_ON(ret != GNTST_okay); \
64 } while (0)
66 static inline int
67 ring(const struct pt_regs* regs)
68 {
69 return ((struct ia64_psr*)(&(regs)->cr_ipsr))->cpl;
70 }
71 #define ring_0(r) (ring(r) == 0)
72 #define ring_1(r) (ring(r) == 1)
73 #define ring_2(r) (ring(r) == 2)
74 #define ring_3(r) (ring(r) == 3)
76 #endif /* __ASM_XENOPROF_H__ */
78 /*
79 * Local variables:
80 * mode: C
81 * c-set-style: "BSD"
82 * c-basic-offset: 4
83 * tab-width: 4
84 * indent-tabs-mode: nil
85 * End:
86 */