source: trunk/packages/xen-common/xen-common/xen/include/asm-ia64/config.h @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

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