ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 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 88ab11d8fd1c
children ec3f4e9e62f6
line source
1 #ifndef _IA64_CONFIG_H_
2 #define _IA64_CONFIG_H_
4 #undef DEBUG_PFMON
6 // manufactured from component pieces
8 // defined in linux/arch/ia64/defconfig
9 #define CONFIG_IA64_GENERIC
10 #define CONFIG_HZ 32
12 #define CONFIG_IA64_L1_CACHE_SHIFT 7
13 // needed by include/asm-ia64/page.h
14 #define CONFIG_IA64_PAGE_SIZE_16KB // 4KB doesn't work?!?
15 #define CONFIG_IA64_GRANULE_16MB
17 // this needs to be on to run on system with large memory hole
18 #define CONFIG_VIRTUAL_FRAME_TABLE
20 #define CONFIG_EFI_PCDP
21 #define CONFIG_SERIAL_SGI_L1_CONSOLE
23 #define CONFIG_XEN_SMP
25 #ifdef CONFIG_XEN_SMP
26 #define CONFIG_SMP 1
27 #define NR_CPUS 64
28 #define CONFIG_NUMA
29 #define CONFIG_ACPI_NUMA
30 #define NODES_SHIFT 8
31 #define MAX_NUMNODES (1 << NODES_SHIFT)
32 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
33 #define MAX_PXM_DOMAINS 256
34 #else
35 #undef CONFIG_SMP
36 #define NR_CPUS 1
37 #endif
38 #define CONFIG_NR_CPUS NR_CPUS
40 #define CONFIG_IOSAPIC
41 #define supervisor_mode_kernel (0)
43 #define CONFIG_DMA_BITSIZE 32
45 #define PADDR_BITS 48
47 /* If PERFC is used, include privop maps. */
48 #ifdef PERF_COUNTERS
49 #define CONFIG_PRIVOP_ADDRS
50 #define PRIVOP_COUNT_NADDRS 30
51 #endif
53 #define CONFIG_VGA 1
56 #define NR_hypercalls 64
58 /* PV domains use this value for priv. level 0 emulation */
59 #define CONFIG_CPL0_EMUL 1
61 #ifndef __ASSEMBLY__
63 // can't find where this typedef was before?!?
64 // needed by include/asm-ia64/processor.h (and other places)
65 typedef int pid_t;
67 // now needed for xen/include/mm.h
68 typedef unsigned long paddr_t;
69 // from include/linux/kernel.h
70 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
72 //////////////////////////////////////
74 #define FASTCALL(x) x // see linux/include/linux/linkage.h
75 #define fastcall // " "
77 #define watchdog_disable() ((void)0)
78 #define watchdog_enable() ((void)0)
79 // from linux/include/linux/types.h
80 #define CLEAR_BITMAP(name,bits) \
81 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
83 // FIXME?: x86-ism used in xen/mm.h
84 #define LOCK_PREFIX
86 extern unsigned long xenheap_phys_end;
87 extern unsigned long total_pages;
88 extern unsigned long xen_pstart;
89 extern unsigned long xenheap_size;
91 extern int running_on_sim;
93 // from linux/include/linux/mm.h
94 extern struct page_info *mem_map;
96 // xen/include/asm/config.h
97 extern char _end[]; /* standard ELF symbol */
99 // linux/include/linux/compiler.h
100 //#define __kernel
101 //#define __safe
102 #define __force
103 #define __chk_user_ptr(x) (void)0
104 //#define __chk_io_ptr(x) (void)0
105 //#define __builtin_warning(x, y...) (1)
106 //#define __acquires(x)
107 //#define __releases(x)
108 //#define __acquire(x) (void)0
109 //#define __release(x) (void)0
110 //#define __cond_lock(x) (x)
111 //#define __must_check
112 #define __deprecated
114 // xen/include/asm/config.h
115 //#define HZ 1000
116 // FIXME SMP: leave SMP for a later time
117 ///////////////////////////////////////////////////////////////
118 // xen/include/asm/config.h
119 // Natural boundary upon TR size to define xenheap space
120 #define XENHEAP_DEFAULT_MB (1 << (KERNEL_TR_PAGE_SHIFT - 20))
121 #define XENHEAP_DEFAULT_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
122 #define ELFSIZE 64
124 ///////////////////////////////////////////////////////////////
126 // get rid of difficult circular include dependency
127 #define CMPXCHG_BUGCHECK(v)
128 #define CMPXCHG_BUGCHECK_DECL
130 // from include/asm-ia64/smp.h
131 #define get_cpu() smp_processor_id()
132 #define put_cpu() do {} while(0)
133 #define put_cpu_no_resched() do{} while (0)
135 // needed for common/dom0_ops.c until hyperthreading is supported
136 #ifdef CONFIG_SMP
137 extern int smp_num_siblings;
138 #else
139 #define smp_num_siblings 1
140 #endif
142 // function calls; see decl in xen/include/xen/sched.h
143 #undef free_task_struct
144 #undef alloc_task_struct
145 #define get_thread_info(v) alloc_thread_info(v)
147 // avoid redefining task_t in asm/thread_info.h
148 #define task_t struct domain
150 // avoid redefining task_struct in asm/current.h
151 #define task_struct vcpu
153 #include <xen/cache.h>
154 #ifndef CONFIG_SMP
155 #define __cacheline_aligned_in_smp
156 #else
157 #define __cacheline_aligned_in_smp __cacheline_aligned
158 #endif
160 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
161 #ifndef CONFIG_SMP
162 #define ____cacheline_aligned_in_smp
163 #else
164 #define ____cacheline_aligned_in_smp ____cacheline_aligned
165 #endif
167 #define CONFIG_PERFMON
169 #ifndef __ASSEMBLY__
170 #include "asm/types.h" // for u64
171 #include "linux/linkage.h" // for asmlinkage which is used by
172 // xen/include/acpi/acpixf.h
173 #endif
175 // warning: unless search_extable is declared, the return value gets
176 // truncated to 32-bits, causing a very strange error in privop handling
177 struct exception_table_entry;
179 const struct exception_table_entry *
180 search_extable(const struct exception_table_entry *first,
181 const struct exception_table_entry *last,
182 unsigned long value);
183 void sort_extable(struct exception_table_entry *start,
184 struct exception_table_entry *finish);
185 void sort_main_extable(void);
187 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
189 // see drivers/char/console.c
190 #define OPT_CONSOLE_STR "com1"
192 #define __nocast
194 // see include/asm-x86/atomic.h (different from standard linux)
195 #define _atomic_set(v,i) (((v).counter) = (i))
196 #define _atomic_read(v) ((v).counter)
197 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
199 // Deprivated linux inf and put here for short time compatibility
200 #define kmalloc(s, t) xmalloc_bytes((s))
201 #define kfree(s) xfree((s))
202 #define kzalloc(size, flags) \
203 ({ \
204 unsigned char *mem; \
205 mem = (unsigned char *)xmalloc_bytes(size); \
206 if (mem) \
207 memset(mem, 0, size); \
208 (void *)mem; \
209 })
210 #define kcalloc(n, size, flags) kzalloc(n * size, flags)
211 #define alloc_bootmem_node(pg, size) xmalloc_bytes(size)
213 // see common/keyhandler.c
214 #define nop() asm volatile ("nop 0")
216 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
217 #define preempt_enable() do { } while (0)
218 #define preempt_disable() do { } while (0)
220 // needed for include/xen/linuxtime.h
221 typedef s64 time_t;
222 typedef s64 suseconds_t;
224 // needed for include/linux/jiffies.h
225 typedef long clock_t;
227 // from include/linux/kernel.h, needed by jiffies.h
228 #define typecheck(type,x) \
229 ({ type __dummy; \
230 typeof(x) __dummy2; \
231 (void)(&__dummy == &__dummy2); \
232 1; \
233 })
235 // from include/linux/timex.h, needed by arch/ia64/time.c
236 #define TIME_SOURCE_CPU 0
238 // used in common code
239 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
241 // dup'ed from signal.h to avoid changes to includes
242 #define SA_SHIRQ 0x04000000
243 #define SA_INTERRUPT 0x20000000
245 // needed for setup.c
246 extern unsigned long loops_per_jiffy;
247 extern char saved_command_line[];
248 struct screen_info { };
249 #define seq_printf(a,b...) printk(b)
250 //#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
252 #define CONFIG_SHADOW 1
254 // xen/include/asm/config.h
255 /******************************************************************************
256 * config.h
257 *
258 * A Linux-style configuration list.
259 */
261 #ifndef __XEN_IA64_CONFIG_H__
262 #define __XEN_IA64_CONFIG_H__
264 #undef CONFIG_X86
266 #define CONFIG_MCKINLEY
268 #undef CONFIG_X86_LOCAL_APIC
269 #undef CONFIG_X86_IO_APIC
270 #undef CONFIG_X86_L1_CACHE_SHIFT
272 //#ifndef CONFIG_IA64_HP_SIM
273 // looks like this is hard to turn off for Xen
274 #define CONFIG_ACPI 1
275 #define CONFIG_ACPI_BOOT 1
276 //#endif
278 #define CONFIG_XEN_ATTENTION_KEY 1
279 #endif /* __ASSEMBLY__ */
280 #endif /* __XEN_IA64_CONFIG_H__ */
282 /* Allow .serialize.data/instruction in asm files.
283 Old as doesn't handle this. */
284 #define HAVE_SERIALIZE_DIRECTIVE
286 /* Define CONFIG_PRIVIFY to support privified OS (deprecated). */
287 #undef CONFIG_PRIVIFY
289 #endif /* _IA64_CONFIG_H_ */