ia64/xen-unstable

view xen/arch/ia64/xen/xenmisc.c @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 2d0193702170
children
line source
1 /*
2 * Xen misc
3 *
4 * Functions/decls that are/may be needed to link with Xen because
5 * of x86 dependencies
6 *
7 * Copyright (C) 2004 Hewlett-Packard Co.
8 * Dan Magenheimer (dan.magenheimer@hp.com)
9 *
10 */
12 #include <linux/config.h>
13 #include <xen/sched.h>
14 #include <linux/efi.h>
15 #include <asm/processor.h>
16 #include <xen/serial.h>
17 #include <asm/io.h>
18 #include <xen/softirq.h>
19 #include <public/sched.h>
20 #include <asm/vhpt.h>
21 #include <asm/debugger.h>
22 #include <asm/vmx.h>
23 #include <asm/vmx_vcpu.h>
24 #include <asm/vcpu.h>
26 unsigned long loops_per_jiffy = (1<<12); // from linux/init/main.c
28 /* FIXME: where these declarations should be there ? */
29 extern void show_registers(struct pt_regs *regs);
31 void hpsim_setup(char **x)
32 {
33 #ifdef CONFIG_SMP
34 init_smp_config();
35 #endif
36 }
38 struct pt_regs *guest_cpu_user_regs(void) { return vcpu_regs(current); }
40 ///////////////////////////////
41 // from common/keyhandler.c
42 ///////////////////////////////
43 void dump_pageframe_info(struct domain *d)
44 {
45 printk("dump_pageframe_info not implemented\n");
46 }
48 ///////////////////////////////
49 // called from arch/ia64/head.S
50 ///////////////////////////////
52 void console_print(char *msg)
53 {
54 printk("console_print called, how did start_kernel return???\n");
55 }
57 ////////////////////////////////////
58 // called from unaligned.c
59 ////////////////////////////////////
61 void die_if_kernel(char *str, struct pt_regs *regs, long err)
62 {
63 if (guest_mode(regs))
64 return;
66 printk("%s: %s %ld\n", __func__, str, err);
67 debugtrace_dump();
68 show_registers(regs);
69 domain_crash_synchronous();
70 }
72 long
73 ia64_peek (struct task_struct *child, struct switch_stack *child_stack,
74 unsigned long user_rbs_end, unsigned long addr, long *val)
75 {
76 printk("ia64_peek: called, not implemented\n");
77 return 1;
78 }
80 long
81 ia64_poke (struct task_struct *child, struct switch_stack *child_stack,
82 unsigned long user_rbs_end, unsigned long addr, long val)
83 {
84 printk("ia64_poke: called, not implemented\n");
85 return 1;
86 }
88 void
89 ia64_sync_fph (struct task_struct *task)
90 {
91 printk("ia64_sync_fph: called, not implemented\n");
92 }
94 void
95 ia64_flush_fph (struct task_struct *task)
96 {
97 printk("ia64_flush_fph: called, not implemented\n");
98 }
100 ////////////////////////////////////
101 // called from irq_ia64.c:init_IRQ()
102 // (because CONFIG_IA64_HP_SIM is specified)
103 ////////////////////////////////////
104 void hpsim_irq_init(void) { }
107 // accomodate linux extable.c
108 //const struct exception_table_entry *
109 void *search_module_extables(unsigned long addr) { return NULL; }
110 void *__module_text_address(unsigned long addr) { return NULL; }
111 void *module_text_address(unsigned long addr) { return NULL; }
114 void arch_dump_domain_info(struct domain *d)
115 {
116 }
118 void arch_dump_vcpu_info(struct vcpu *v)
119 {
120 }
122 void audit_domains_key(unsigned char key)
123 {
124 }
126 void panic_domain(struct pt_regs *regs, const char *fmt, ...)
127 {
128 va_list args;
129 char buf[256];
130 struct vcpu *v = current;
132 printk("$$$$$ PANIC in domain %d (k6=0x%lx): ",
133 v->domain->domain_id,
134 __get_cpu_var(cpu_kr)._kr[IA64_KR_CURRENT]);
135 va_start(args, fmt);
136 (void)vsnprintf(buf, sizeof(buf), fmt, args);
137 va_end(args);
138 printk(buf);
139 if (regs)
140 show_registers(regs);
141 domain_crash_synchronous ();
142 }