ia64/xen-unstable

view xen/arch/ia64/xen/xenmisc.c @ 15423:cbf749e9961f

[IA64] Cleanup: Move is_platform_hp_ski() from xenmisc.c to xensetup.c

- only caller is start_kernel
- change to static __init
- also move running_on_sim to xensetup.c, and change it from unsigned
long to int, since it's just a boolean
- declare running_on_sim in config.h near some other externs

Tested by building, booting, starting a PV guest on rx2620.

Signed-off-by: Aron Griffis <aron@hp.com>
author Alex Williamson <alex.williamson@hp.com>
date Mon Jul 02 10:25:29 2007 -0600 (2007-07-02)
parents d431761a032a
children 2d0193702170
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 void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err)
73 {
74 if (vmx_user_mode(regs))
75 return;
77 printk("%s: %s %ld\n", __func__, str, err);
78 debugtrace_dump();
79 show_registers(regs);
80 domain_crash_synchronous();
81 }
83 long
84 ia64_peek (struct task_struct *child, struct switch_stack *child_stack,
85 unsigned long user_rbs_end, unsigned long addr, long *val)
86 {
87 printk("ia64_peek: called, not implemented\n");
88 return 1;
89 }
91 long
92 ia64_poke (struct task_struct *child, struct switch_stack *child_stack,
93 unsigned long user_rbs_end, unsigned long addr, long val)
94 {
95 printk("ia64_poke: called, not implemented\n");
96 return 1;
97 }
99 void
100 ia64_sync_fph (struct task_struct *task)
101 {
102 printk("ia64_sync_fph: called, not implemented\n");
103 }
105 void
106 ia64_flush_fph (struct task_struct *task)
107 {
108 printk("ia64_flush_fph: called, not implemented\n");
109 }
111 ////////////////////////////////////
112 // called from irq_ia64.c:init_IRQ()
113 // (because CONFIG_IA64_HP_SIM is specified)
114 ////////////////////////////////////
115 void hpsim_irq_init(void) { }
118 // accomodate linux extable.c
119 //const struct exception_table_entry *
120 void *search_module_extables(unsigned long addr) { return NULL; }
121 void *__module_text_address(unsigned long addr) { return NULL; }
122 void *module_text_address(unsigned long addr) { return NULL; }
125 void arch_dump_domain_info(struct domain *d)
126 {
127 }
129 void arch_dump_vcpu_info(struct vcpu *v)
130 {
131 }
133 void audit_domains_key(unsigned char key)
134 {
135 }
137 void panic_domain(struct pt_regs *regs, const char *fmt, ...)
138 {
139 va_list args;
140 char buf[256];
141 struct vcpu *v = current;
143 printk("$$$$$ PANIC in domain %d (k6=0x%lx): ",
144 v->domain->domain_id,
145 __get_cpu_var(cpu_kr)._kr[IA64_KR_CURRENT]);
146 va_start(args, fmt);
147 (void)vsnprintf(buf, sizeof(buf), fmt, args);
148 va_end(args);
149 printk(buf);
150 if (regs)
151 show_registers(regs);
152 domain_crash_synchronous ();
153 }