ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 5704:9b73afea874e

Certain types of event channel are now auto-bound to vcpu0 by Xen.
Make sure that xenolinux agrees with this.
author sos22@douglas.cl.cam.ac.uk
date Fri Jul 08 15:35:43 2005 +0000 (2005-07-08)
parents 51d5c1d35710
children ca44d2dbb273 a83ac0806d6b
line source
1 #ifndef _IA64_CONFIG_H_
2 #define _IA64_CONFIG_H_
4 // control flags for turning on/off features under test
5 #undef CLONE_DOMAIN0
6 //#define CLONE_DOMAIN0 1
7 #define DOMU_BUILD_STAGING
8 #define VHPT_GLOBAL
9 #define DOMU_AUTO_RESTART
11 // manufactured from component pieces
13 // defined in linux/arch/ia64/defconfig
14 //#define CONFIG_IA64_GENERIC
15 #define CONFIG_IA64_HP_SIM
16 #define CONFIG_IA64_L1_CACHE_SHIFT 7
17 // needed by include/asm-ia64/page.h
18 #define CONFIG_IA64_PAGE_SIZE_16KB // 4KB doesn't work?!?
19 #define CONFIG_IA64_GRANULE_16MB
21 #define CONFIG_EFI_PCDP
22 #define CONFIG_SERIAL_SGI_L1_CONSOLE
24 #ifndef __ASSEMBLY__
26 // can't find where this typedef was before?!?
27 // needed by include/asm-ia64/processor.h (and other places)
28 typedef int pid_t;
30 // now needed for xen/include/mm.h
31 typedef unsigned long physaddr_t;
32 // from include/linux/kernel.h
33 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
35 //////////////////////////////////////
37 #define FASTCALL(x) x // see linux/include/linux/linkage.h
38 #define fastcall // " "
40 #define watchdog_disable() ((void)0)
41 #define watchdog_enable() ((void)0)
42 // from linux/include/linux/types.h
43 #define CLEAR_BITMAP(name,bits) \
44 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
46 // FIXME?: x86-ism used in xen/mm.h
47 #define LOCK_PREFIX
49 extern unsigned long xenheap_phys_end;
50 extern unsigned long xen_pstart;
51 extern unsigned long xenheap_size;
52 extern unsigned long dom0_start;
53 extern unsigned long dom0_size;
55 // from linux/include/linux/mm.h
56 extern struct page *mem_map;
58 // xen/include/asm/config.h
59 extern char _end[]; /* standard ELF symbol */
61 // linux/include/linux/compiler.h
62 #define __attribute_const__
63 #define __user
64 //#define __kernel
65 //#define __safe
66 #define __force
67 #define __chk_user_ptr(x) (void)0
68 //#define __chk_io_ptr(x) (void)0
69 //#define __builtin_warning(x, y...) (1)
70 //#define __acquires(x)
71 //#define __releases(x)
72 //#define __acquire(x) (void)0
73 //#define __release(x) (void)0
74 //#define __cond_lock(x) (x)
75 #define __must_check
76 #define __deprecated
78 // xen/include/asm/config.h
79 #define HZ 100
80 // leave SMP for a later time
81 #define NR_CPUS 1
82 //#define NR_CPUS 16
83 //#define CONFIG_NR_CPUS 16
84 #define barrier() __asm__ __volatile__("": : :"memory")
86 ///////////////////////////////////////////////////////////////
87 // xen/include/asm/config.h
88 // Natural boundary upon TR size to define xenheap space
89 #define XENHEAP_DEFAULT_MB (1 << (KERNEL_TR_PAGE_SHIFT - 20))
90 #define XENHEAP_DEFAULT_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
91 #define ELFSIZE 64
93 ///////////////////////////////////////////////////////////////
95 // get rid of difficult circular include dependency
96 #define CMPXCHG_BUGCHECK(v)
97 #define CMPXCHG_BUGCHECK_DECL
99 // from include/asm-ia64/smp.h
100 #ifdef CONFIG_SMP
101 #error "Lots of things to fix to enable CONFIG_SMP!"
102 #endif
103 #define get_cpu() 0
104 #define put_cpu() do {} while(0)
106 // needed for common/dom0_ops.c until hyperthreading is supported
107 #define smp_num_siblings 1
109 // from linux/include/linux/mm.h
110 struct page;
112 // function calls; see decl in xen/include/xen/sched.h
113 #undef free_task_struct
114 #undef alloc_task_struct
116 // initial task has a different name in Xen
117 //#define idle0_task init_task
118 #define idle0_vcpu init_task
120 // avoid redefining task_t in asm/thread_info.h
121 #define task_t struct domain
123 // avoid redefining task_struct in asm/current.h
124 #define task_struct vcpu
126 // linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
127 #define platform_inb __ia64_inb
128 #define platform_inw __ia64_inw
129 #define platform_inl __ia64_inl
130 #define platform_outb __ia64_outb
131 #define platform_outw __ia64_outw
132 #define platform_outl __ia64_outl
134 // FIXME: This just overrides a use in a typedef (not allowed in ia64,
135 // or maybe just in older gcc's?) used in ac_timer.c but should be OK
136 // (and indeed is probably required!) elsewhere
137 #undef __cacheline_aligned
138 #undef ____cacheline_aligned
139 #undef ____cacheline_aligned_in_smp
140 #define __cacheline_aligned
141 #define __cacheline_aligned_in_smp
142 #define ____cacheline_aligned
143 #define ____cacheline_aligned_in_smp
144 #define ____cacheline_maxaligned_in_smp
146 #include "asm/types.h" // for u64
148 // warning: unless search_extable is declared, the return value gets
149 // truncated to 32-bits, causing a very strange error in privop handling
150 struct exception_table_entry;
152 const struct exception_table_entry *
153 search_extable(const struct exception_table_entry *first,
154 const struct exception_table_entry *last,
155 unsigned long value);
156 void sort_extable(struct exception_table_entry *start,
157 struct exception_table_entry *finish);
158 void sort_main_extable(void);
160 #define printk printf
162 #undef __ARCH_IRQ_STAT
164 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
166 // from include/asm-x86/*/uaccess.h
167 #define array_access_ok(addr,count,size) \
168 (likely(sizeof(count) <= 4) /* disallow 64-bit counts */ && \
169 access_ok(type,addr,count*size))
171 // see drivers/char/console.c
172 #ifndef CONFIG_VTI
173 #define OPT_CONSOLE_STR "com1"
174 #else // CONFIG_VTI
175 #define OPT_CONSOLE_STR "com2"
176 #endif // CONFIG_VTI
178 #define __attribute_used__ __attribute__ ((unused))
180 // see include/asm-x86/atomic.h (different from standard linux)
181 #define _atomic_set(v,i) (((v).counter) = (i))
182 #define _atomic_read(v) ((v).counter)
183 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
185 // see include/asm-ia64/mm.h, handle remaining pfn_info uses until gone
186 #define pfn_info page
188 // see common/keyhandler.c
189 #define nop() asm volatile ("nop 0")
191 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
192 #define preempt_enable() do { } while (0)
193 #define preempt_disable() do { } while (0)
195 // needed for include/xen/linuxtime.h
196 typedef s64 time_t;
197 typedef s64 suseconds_t;
199 // needed for include/linux/jiffies.h
200 typedef long clock_t;
202 // from include/linux/kernel.h, needed by jiffies.h
203 #define typecheck(type,x) \
204 ({ type __dummy; \
205 typeof(x) __dummy2; \
206 (void)(&__dummy == &__dummy2); \
207 1; \
208 })
210 // from include/linux/timex.h, needed by arch/ia64/time.c
211 #define TIME_SOURCE_CPU 0
213 // used in common code
214 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
216 // dup'ed from signal.h to avoid changes to includes
217 #define SA_SHIRQ 0x04000000
218 #define SA_INTERRUPT 0x20000000
220 // needed for setup.c
221 extern unsigned long loops_per_jiffy;
222 extern char saved_command_line[];
223 struct screen_info { };
224 #define seq_printf(a,b...) printf(b)
225 #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
227 // needed for newer ACPI code
228 #define asmlinkage
230 #define FORCE_CRASH() asm("break 0;;");
232 #define dummy() dummy_called(__FUNCTION__)
234 // these declarations got moved at some point, find a better place for them
235 extern int ht_per_core;
237 // needed for include/xen/smp.h
238 #define __smp_processor_id() 0
240 // xen/include/asm/config.h
241 /******************************************************************************
242 * config.h
243 *
244 * A Linux-style configuration list.
245 */
247 #ifndef __XEN_IA64_CONFIG_H__
248 #define __XEN_IA64_CONFIG_H__
250 #undef CONFIG_X86
252 #define CONFIG_MCKINLEY
254 //#define CONFIG_SMP 1
255 //#define CONFIG_NR_CPUS 2
256 //leave SMP for a later time
257 #undef CONFIG_SMP
258 #undef CONFIG_X86_LOCAL_APIC
259 #undef CONFIG_X86_IO_APIC
260 #undef CONFIG_X86_L1_CACHE_SHIFT
262 // this needs to be on to run on hp zx1 with more than 4GB
263 // it is hacked around for now though
264 //#define CONFIG_VIRTUAL_MEM_MAP
266 //#ifndef CONFIG_IA64_HP_SIM
267 // looks like this is hard to turn off for Xen
268 #define CONFIG_ACPI 1
269 #define CONFIG_ACPI_BOOT 1
270 //#endif
272 #define CONFIG_XEN_ATTENTION_KEY 1
273 #endif /* __ASSEMBLY__ */
274 #endif /* __XEN_IA64_CONFIG_H__ */
276 // FOLLOWING ADDED FOR XEN POST-NGIO and/or LINUX 2.6.7
278 // following derived from linux/include/linux/compiler-gcc3.h
279 // problem because xen (over?)simplifies include/xen/compiler.h
280 #if __GNUC_MAJOR < 3 || __GNUC_MINOR__ >= 3
281 # define __attribute_used__ __attribute__((__used__))
282 #else
283 # define __attribute_used__ __attribute__((__unused__))
284 #endif
285 #endif /* _IA64_CONFIG_H_ */