ia64/xen-unstable

view xen/include/xen/symbols.h @ 19800:78962f85c562

IOMMU: Add two generic functions to vendor neutral interface

Add 2 generic functions into the vendor neutral iommu interface, The
reason is that from changeset 19732, there is only one global flag
"iommu_enabled" that controls iommu enablement for both vtd and amd
systems, so we need different code paths for vtd and amd iommu systems
if this flag has been turned on. Also, the early checking of
"iommu_enabled" in iommu_setup() is removed to prevent iommu
functionalities from been disabled on amd systems.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 19 08:41:50 2009 +0100 (2009-06-19)
parents 60f91c9f1a24
children
line source
1 #ifndef _XEN_SYMBOLS_H
2 #define _XEN_SYMBOLS_H
4 #include <xen/config.h>
5 #include <xen/types.h>
7 #define KSYM_NAME_LEN 127
9 /* Lookup an address. */
10 const char *symbols_lookup(unsigned long addr,
11 unsigned long *symbolsize,
12 unsigned long *offset,
13 char *namebuf);
15 /* Replace "%s" in format with address, if found */
16 void __print_symbol(const char *fmt, unsigned long address);
18 /* This macro allows us to keep printk typechecking */
19 static void __check_printsym_format(const char *fmt, ...)
20 __attribute__((format(printf,1,2)));
21 static inline void __check_printsym_format(const char *fmt, ...)
22 {
23 }
25 /* ia64 and ppc64 use function descriptors, which contain the real address */
26 #if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
27 #define print_fn_descriptor_symbol(fmt, addr) \
28 do { \
29 unsigned long *__faddr = (unsigned long*) addr; \
30 print_symbol(fmt, __faddr[0]); \
31 } while (0)
32 #else
33 #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr)
34 #endif
36 #define print_symbol(fmt, addr) \
37 do { \
38 __check_printsym_format(fmt, ""); \
39 __print_symbol(fmt, addr); \
40 } while(0)
42 #endif /*_XEN_SYMBOLS_H*/