ia64/xen-unstable

view xen/arch/ia64/xen/xenmisc.c @ 13410:f159e81e0b44

[IA64]: noreturn cannot be used if function may return

The functions die_if_kernel and vmx_die_if_kernel can certainly
return. This disqualifies them from using the noreturn keyword
which is reserved for functions that never return.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
author kfraser@localhost.localdomain
date Fri Jan 12 14:50:01 2007 +0000 (2007-01-12)
parents 60f91c9f1a24
children 2c59917255f7
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 // called from mem_init... don't think s/w I/O tlb is needed in Xen
39 //void swiotlb_init(void) { } ...looks like it IS needed
41 long
42 is_platform_hp_ski(void)
43 {
44 int i;
45 long cpuid[6];
47 for (i = 0; i < 5; ++i)
48 cpuid[i] = ia64_get_cpuid(i);
49 if ((cpuid[0] & 0xff) != 'H') return 0;
50 if ((cpuid[3] & 0xff) != 0x4) return 0;
51 if (((cpuid[3] >> 8) & 0xff) != 0x0) return 0;
52 if (((cpuid[3] >> 16) & 0xff) != 0x0) return 0;
53 if (((cpuid[3] >> 24) & 0x7) != 0x7) return 0;
54 return 1;
55 }
57 struct pt_regs *guest_cpu_user_regs(void) { return vcpu_regs(current); }
59 ///////////////////////////////
60 // from common/keyhandler.c
61 ///////////////////////////////
62 void dump_pageframe_info(struct domain *d)
63 {
64 printk("dump_pageframe_info not implemented\n");
65 }
67 ///////////////////////////////
68 // called from arch/ia64/head.S
69 ///////////////////////////////
71 void console_print(char *msg)
72 {
73 printk("console_print called, how did start_kernel return???\n");
74 }
76 ////////////////////////////////////
77 // called from unaligned.c
78 ////////////////////////////////////
80 void die_if_kernel(char *str, struct pt_regs *regs, long err)
81 {
82 if (user_mode(regs))
83 return;
85 printk("%s: %s %ld\n", __func__, str, err);
86 debugtrace_dump();
87 show_registers(regs);
88 domain_crash_synchronous();
89 }
91 void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err)
92 {
93 if (vmx_user_mode(regs))
94 return;
96 printk("%s: %s %ld\n", __func__, str, err);
97 debugtrace_dump();
98 show_registers(regs);
99 domain_crash_synchronous();
100 }
102 long
103 ia64_peek (struct task_struct *child, struct switch_stack *child_stack,
104 unsigned long user_rbs_end, unsigned long addr, long *val)
105 {
106 printk("ia64_peek: called, not implemented\n");
107 return 1;
108 }
110 long
111 ia64_poke (struct task_struct *child, struct switch_stack *child_stack,
112 unsigned long user_rbs_end, unsigned long addr, long val)
113 {
114 printk("ia64_poke: called, not implemented\n");
115 return 1;
116 }
118 void
119 ia64_sync_fph (struct task_struct *task)
120 {
121 printk("ia64_sync_fph: called, not implemented\n");
122 }
124 void
125 ia64_flush_fph (struct task_struct *task)
126 {
127 printk("ia64_flush_fph: called, not implemented\n");
128 }
130 ////////////////////////////////////
131 // called from irq_ia64.c:init_IRQ()
132 // (because CONFIG_IA64_HP_SIM is specified)
133 ////////////////////////////////////
134 void hpsim_irq_init(void) { }
137 // accomodate linux extable.c
138 //const struct exception_table_entry *
139 void *search_module_extables(unsigned long addr) { return NULL; }
140 void *__module_text_address(unsigned long addr) { return NULL; }
141 void *module_text_address(unsigned long addr) { return NULL; }
144 void arch_dump_domain_info(struct domain *d)
145 {
146 }
148 void arch_dump_vcpu_info(struct vcpu *v)
149 {
150 }
152 void audit_domains_key(unsigned char key)
153 {
154 }
156 void panic_domain(struct pt_regs *regs, const char *fmt, ...)
157 {
158 va_list args;
159 char buf[256];
160 struct vcpu *v = current;
162 printk("$$$$$ PANIC in domain %d (k6=0x%lx): ",
163 v->domain->domain_id,
164 __get_cpu_var(cpu_kr)._kr[IA64_KR_CURRENT]);
165 va_start(args, fmt);
166 (void)vsnprintf(buf, sizeof(buf), fmt, args);
167 va_end(args);
168 printk(buf);
169 if (regs) show_registers(regs);
170 if (regs) {
171 debugger_trap_fatal(0 /* don't care */, regs);
172 } else {
173 debugger_trap_immediate();
174 }
175 domain_crash_synchronous ();
176 }