ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 8700:1712b52e0074

Move MAX_DMADOM_PFN to asm/config.h.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jan 30 11:23:32 2006 +0100 (2006-01-30)
parents 4690777cf62a
children e4eb12a6e003
line source
1 #ifndef _IA64_CONFIG_H_
2 #define _IA64_CONFIG_H_
4 #undef USE_PAL_EMULATOR
5 // control flags for turning on/off features under test
6 #undef CLONE_DOMAIN0
7 //#define CLONE_DOMAIN0 1
8 #undef DOMU_BUILD_STAGING
9 #define VHPT_GLOBAL
10 #define DOMU_AUTO_RESTART
12 #undef DEBUG_PFMON
14 // manufactured from component pieces
16 // defined in linux/arch/ia64/defconfig
17 //#define CONFIG_IA64_GENERIC
18 #define CONFIG_IA64_HP_SIM
19 #define CONFIG_IA64_L1_CACHE_SHIFT 7
20 // needed by include/asm-ia64/page.h
21 #define CONFIG_IA64_PAGE_SIZE_16KB // 4KB doesn't work?!?
22 #define CONFIG_IA64_GRANULE_16MB
24 #define CONFIG_EFI_PCDP
25 #define CONFIG_SERIAL_SGI_L1_CONSOLE
27 #undef CONFIG_XEN_SMP
29 #ifdef CONFIG_XEN_SMP
30 #define CONFIG_SMP 1
31 #define NR_CPUS 8
32 #define CONFIG_NR_CPUS 8
33 #else
34 #undef CONFIG_SMP
35 #define NR_CPUS 1
36 #define CONFIG_NR_CPUS 1
37 #endif
38 //#define NR_CPUS 16
39 //#define CONFIG_NR_CPUS 16
40 //leave SMP for a later time
41 //#undef CONFIG_SMP
43 #define MAX_DMADOM_PFN 0x7FFFFUL /* 31 addressable bits */
45 #ifndef __ASSEMBLY__
47 // can't find where this typedef was before?!?
48 // needed by include/asm-ia64/processor.h (and other places)
49 typedef int pid_t;
51 // now needed for xen/include/mm.h
52 typedef unsigned long physaddr_t;
53 // from include/linux/kernel.h
54 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
56 //////////////////////////////////////
58 #define FASTCALL(x) x // see linux/include/linux/linkage.h
59 #define fastcall // " "
61 #define watchdog_disable() ((void)0)
62 #define watchdog_enable() ((void)0)
63 // from linux/include/linux/types.h
64 #define CLEAR_BITMAP(name,bits) \
65 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
67 // FIXME?: x86-ism used in xen/mm.h
68 #define LOCK_PREFIX
70 extern unsigned long xenheap_phys_end;
71 extern unsigned long xen_pstart;
72 extern unsigned long xenheap_size;
73 extern struct domain *dom0;
74 extern unsigned long dom0_start;
75 extern unsigned long dom0_size;
77 // from linux/include/linux/mm.h
78 extern struct page *mem_map;
80 // xen/include/asm/config.h
81 extern char _end[]; /* standard ELF symbol */
83 // linux/include/linux/compiler.h
84 #define __attribute_const__
85 #define __user
86 //#define __kernel
87 //#define __safe
88 #define __force
89 #define __chk_user_ptr(x) (void)0
90 //#define __chk_io_ptr(x) (void)0
91 //#define __builtin_warning(x, y...) (1)
92 //#define __acquires(x)
93 //#define __releases(x)
94 //#define __acquire(x) (void)0
95 //#define __release(x) (void)0
96 //#define __cond_lock(x) (x)
97 //#define __must_check
98 #define __deprecated
99 #ifndef RELOC_HIDE
100 # define RELOC_HIDE(ptr, off) \
101 ({ unsigned long __ptr; \
102 __ptr = (unsigned long) (ptr); \
103 (typeof(ptr)) (__ptr + (off)); })
104 #endif
106 // xen/include/asm/config.h
107 //#define HZ 1000
108 // FIXME SMP: leave SMP for a later time
109 #define barrier() __asm__ __volatile__("": : :"memory")
111 ///////////////////////////////////////////////////////////////
112 // xen/include/asm/config.h
113 // Natural boundary upon TR size to define xenheap space
114 #define XENHEAP_DEFAULT_MB (1 << (KERNEL_TR_PAGE_SHIFT - 20))
115 #define XENHEAP_DEFAULT_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
116 #define ELFSIZE 64
118 ///////////////////////////////////////////////////////////////
120 // get rid of difficult circular include dependency
121 #define CMPXCHG_BUGCHECK(v)
122 #define CMPXCHG_BUGCHECK_DECL
124 // from include/asm-ia64/smp.h
125 #ifdef CONFIG_SMP
126 //#warning "Lots of things to fix to enable CONFIG_SMP!"
127 #endif
128 #define get_cpu() smp_processor_id()
129 #define put_cpu() do {} while(0)
131 // needed for common/dom0_ops.c until hyperthreading is supported
132 #ifdef CONFIG_SMP
133 extern int smp_num_siblings;
134 #else
135 #define smp_num_siblings 1
136 #endif
138 // from linux/include/linux/mm.h
139 struct page;
141 // function calls; see decl in xen/include/xen/sched.h
142 #undef free_task_struct
143 #undef alloc_task_struct
144 #define get_thread_info(v) alloc_thread_info(v)
146 // avoid redefining task_t in asm/thread_info.h
147 #define task_t struct domain
149 // avoid redefining task_struct in asm/current.h
150 #define task_struct vcpu
152 // linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
153 #define platform_inb __ia64_inb
154 #define platform_inw __ia64_inw
155 #define platform_inl __ia64_inl
156 #define platform_outb __ia64_outb
157 #define platform_outw __ia64_outw
158 #define platform_outl __ia64_outl
160 // FIXME: This just overrides a use in a typedef (not allowed in ia64,
161 // or maybe just in older gcc's?) used in timer.c but should be OK
162 // (and indeed is probably required!) elsewhere
163 #undef __cacheline_aligned
164 #undef ____cacheline_aligned
165 #undef ____cacheline_aligned_in_smp
166 #define __cacheline_aligned
167 #define __cacheline_aligned_in_smp
168 #define ____cacheline_aligned
169 #define ____cacheline_aligned_in_smp
170 #define ____cacheline_maxaligned_in_smp
172 #ifndef __ASSEMBLY__
173 #include "asm/types.h" // for u64
174 #endif
176 // warning: unless search_extable is declared, the return value gets
177 // truncated to 32-bits, causing a very strange error in privop handling
178 struct exception_table_entry;
180 const struct exception_table_entry *
181 search_extable(const struct exception_table_entry *first,
182 const struct exception_table_entry *last,
183 unsigned long value);
184 void sort_extable(struct exception_table_entry *start,
185 struct exception_table_entry *finish);
186 void sort_main_extable(void);
188 #if 0 /* Already defined in xen/lib.h */
189 #define printk printf
190 #endif
192 #undef __ARCH_IRQ_STAT
194 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
196 // from include/asm-x86/*/uaccess.h
197 #define array_access_ok(addr,count,size) \
198 (likely(sizeof(count) <= 4) /* disallow 64-bit counts */ && \
199 access_ok(type,addr,count*size))
201 // see drivers/char/console.c
202 #ifndef VALIDATE_VT
203 #define OPT_CONSOLE_STR "com1"
204 #else
205 #define OPT_CONSOLE_STR "com2"
206 #endif
208 #define __nocast
210 // see include/asm-x86/atomic.h (different from standard linux)
211 #define _atomic_set(v,i) (((v).counter) = (i))
212 #define _atomic_read(v) ((v).counter)
213 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
215 // see include/asm-ia64/mm.h, handle remaining pfn_info uses until gone
216 #define pfn_info page
218 // see common/keyhandler.c
219 #define nop() asm volatile ("nop 0")
221 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
222 #define preempt_enable() do { } while (0)
223 #define preempt_disable() do { } while (0)
225 // needed for include/xen/linuxtime.h
226 typedef s64 time_t;
227 typedef s64 suseconds_t;
229 // needed for include/linux/jiffies.h
230 typedef long clock_t;
232 // from include/linux/kernel.h, needed by jiffies.h
233 #define typecheck(type,x) \
234 ({ type __dummy; \
235 typeof(x) __dummy2; \
236 (void)(&__dummy == &__dummy2); \
237 1; \
238 })
240 // from include/linux/timex.h, needed by arch/ia64/time.c
241 #define TIME_SOURCE_CPU 0
243 // used in common code
244 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
246 // dup'ed from signal.h to avoid changes to includes
247 #define SA_SHIRQ 0x04000000
248 #define SA_INTERRUPT 0x20000000
250 // needed for setup.c
251 extern unsigned long loops_per_jiffy;
252 extern char saved_command_line[];
253 struct screen_info { };
254 #define seq_printf(a,b...) printf(b)
255 #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
257 #define FORCE_CRASH() asm("break 0;;");
259 void dummy_called(char *function);
260 #define dummy() dummy_called(__FUNCTION__)
262 // these declarations got moved at some point, find a better place for them
263 extern int ht_per_core;
265 // xen/include/asm/config.h
266 /******************************************************************************
267 * config.h
268 *
269 * A Linux-style configuration list.
270 */
272 #ifndef __XEN_IA64_CONFIG_H__
273 #define __XEN_IA64_CONFIG_H__
275 #undef CONFIG_X86
277 #define CONFIG_MCKINLEY
279 #undef CONFIG_X86_LOCAL_APIC
280 #undef CONFIG_X86_IO_APIC
281 #undef CONFIG_X86_L1_CACHE_SHIFT
283 // this needs to be on to run on hp zx1 with more than 4GB
284 // it is hacked around for now though
285 //#define CONFIG_VIRTUAL_MEM_MAP
287 //#ifndef CONFIG_IA64_HP_SIM
288 // looks like this is hard to turn off for Xen
289 #define CONFIG_ACPI 1
290 #define CONFIG_ACPI_BOOT 1
291 //#endif
293 #define CONFIG_XEN_ATTENTION_KEY 1
294 #endif /* __ASSEMBLY__ */
295 #endif /* __XEN_IA64_CONFIG_H__ */
297 // needed for include/xen/smp.h
298 #ifdef CONFIG_SMP
299 #define __smp_processor_id() current->processor
300 #else
301 #define __smp_processor_id() 0
302 #endif
305 #ifndef __ASSEMBLY__
306 #include <linux/linkage.h>
307 #endif
309 #endif /* _IA64_CONFIG_H_ */