ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 6457:d34925e4144b

Stil more cleanup and moving to 2.6.13 base
author djm@kirby.fc.hp.com
date Thu Sep 01 11:09:27 2005 -0600 (2005-09-01)
parents f5c4042212b0
children 3ca4ca7a9cc2
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 #undef CONFIG_XEN_SMP
26 #ifdef CONFIG_XEN_SMP
27 #define CONFIG_SMP 1
28 #define NR_CPUS 2
29 #define CONFIG_NR_CPUS 2
30 #else
31 #undef CONFIG_SMP
32 #define NR_CPUS 1
33 #define CONFIG_NR_CPUS 1
34 #endif
35 //#define NR_CPUS 16
36 //#define CONFIG_NR_CPUS 16
37 //leave SMP for a later time
38 //#undef CONFIG_SMP
40 #ifndef __ASSEMBLY__
42 // can't find where this typedef was before?!?
43 // needed by include/asm-ia64/processor.h (and other places)
44 typedef int pid_t;
46 // now needed for xen/include/mm.h
47 typedef unsigned long physaddr_t;
48 // from include/linux/kernel.h
49 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
51 //////////////////////////////////////
53 #define FASTCALL(x) x // see linux/include/linux/linkage.h
54 #define fastcall // " "
56 #define watchdog_disable() ((void)0)
57 #define watchdog_enable() ((void)0)
58 // from linux/include/linux/types.h
59 #define CLEAR_BITMAP(name,bits) \
60 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
62 // FIXME?: x86-ism used in xen/mm.h
63 #define LOCK_PREFIX
65 extern unsigned long xenheap_phys_end;
66 extern unsigned long xen_pstart;
67 extern unsigned long xenheap_size;
68 extern struct domain *dom0;
69 extern unsigned long dom0_start;
70 extern unsigned long dom0_size;
72 // from linux/include/linux/mm.h
73 extern struct page *mem_map;
75 // xen/include/asm/config.h
76 extern char _end[]; /* standard ELF symbol */
78 // linux/include/linux/compiler.h
79 #define __attribute_const__
80 #define __user
81 //#define __kernel
82 //#define __safe
83 #define __force
84 #define __chk_user_ptr(x) (void)0
85 //#define __chk_io_ptr(x) (void)0
86 //#define __builtin_warning(x, y...) (1)
87 //#define __acquires(x)
88 //#define __releases(x)
89 //#define __acquire(x) (void)0
90 //#define __release(x) (void)0
91 //#define __cond_lock(x) (x)
92 #define __must_check
93 #define __deprecated
94 #ifndef RELOC_HIDE
95 # define RELOC_HIDE(ptr, off) \
96 ({ unsigned long __ptr; \
97 __ptr = (unsigned long) (ptr); \
98 (typeof(ptr)) (__ptr + (off)); })
99 #endif
101 // xen/include/asm/config.h
102 #define HZ 100
103 // FIXME SMP: leave SMP for a later time
104 #define barrier() __asm__ __volatile__("": : :"memory")
106 ///////////////////////////////////////////////////////////////
107 // xen/include/asm/config.h
108 // Natural boundary upon TR size to define xenheap space
109 #define XENHEAP_DEFAULT_MB (1 << (KERNEL_TR_PAGE_SHIFT - 20))
110 #define XENHEAP_DEFAULT_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
111 #define ELFSIZE 64
113 ///////////////////////////////////////////////////////////////
115 // get rid of difficult circular include dependency
116 #define CMPXCHG_BUGCHECK(v)
117 #define CMPXCHG_BUGCHECK_DECL
119 // from include/asm-ia64/smp.h
120 #ifdef CONFIG_SMP
121 #warning "Lots of things to fix to enable CONFIG_SMP!"
122 #endif
123 // FIXME SMP
124 #define get_cpu() 0
125 #define put_cpu() do {} while(0)
127 // needed for common/dom0_ops.c until hyperthreading is supported
128 #ifdef CONFIG_SMP
129 extern int smp_num_siblings;
130 #else
131 #define smp_num_siblings 1
132 #endif
134 // from linux/include/linux/mm.h
135 struct page;
137 // function calls; see decl in xen/include/xen/sched.h
138 #undef free_task_struct
139 #undef alloc_task_struct
141 // initial task has a different name in Xen
142 //#define idle0_task init_task
143 #define idle0_vcpu init_task
145 // avoid redefining task_t in asm/thread_info.h
146 #define task_t struct domain
148 // avoid redefining task_struct in asm/current.h
149 #define task_struct vcpu
151 // linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
152 #define platform_inb __ia64_inb
153 #define platform_inw __ia64_inw
154 #define platform_inl __ia64_inl
155 #define platform_outb __ia64_outb
156 #define platform_outw __ia64_outw
157 #define platform_outl __ia64_outl
159 // FIXME: This just overrides a use in a typedef (not allowed in ia64,
160 // or maybe just in older gcc's?) used in ac_timer.c but should be OK
161 // (and indeed is probably required!) elsewhere
162 #undef __cacheline_aligned
163 #undef ____cacheline_aligned
164 #undef ____cacheline_aligned_in_smp
165 #define __cacheline_aligned
166 #define __cacheline_aligned_in_smp
167 #define ____cacheline_aligned
168 #define ____cacheline_aligned_in_smp
169 #define ____cacheline_maxaligned_in_smp
171 #ifndef __ASSEMBLY__
172 #include "asm/types.h" // for u64
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 printk printf
189 #undef __ARCH_IRQ_STAT
191 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
193 // from include/asm-x86/*/uaccess.h
194 #define array_access_ok(addr,count,size) \
195 (likely(sizeof(count) <= 4) /* disallow 64-bit counts */ && \
196 access_ok(type,addr,count*size))
198 // see drivers/char/console.c
199 #ifndef CONFIG_VTI
200 #define OPT_CONSOLE_STR "com1"
201 #else // CONFIG_VTI
202 #define OPT_CONSOLE_STR "com2"
203 #endif // CONFIG_VTI
205 #define __attribute_used__ __attribute__ ((unused))
207 // see include/asm-x86/atomic.h (different from standard linux)
208 #define _atomic_set(v,i) (((v).counter) = (i))
209 #define _atomic_read(v) ((v).counter)
210 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
212 // see include/asm-ia64/mm.h, handle remaining pfn_info uses until gone
213 #define pfn_info page
215 // see common/keyhandler.c
216 #define nop() asm volatile ("nop 0")
218 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
219 #define preempt_enable() do { } while (0)
220 #define preempt_disable() do { } while (0)
222 // needed for include/xen/linuxtime.h
223 typedef s64 time_t;
224 typedef s64 suseconds_t;
226 // needed for include/linux/jiffies.h
227 typedef long clock_t;
229 // from include/linux/kernel.h, needed by jiffies.h
230 #define typecheck(type,x) \
231 ({ type __dummy; \
232 typeof(x) __dummy2; \
233 (void)(&__dummy == &__dummy2); \
234 1; \
235 })
237 // from include/linux/timex.h, needed by arch/ia64/time.c
238 #define TIME_SOURCE_CPU 0
240 // used in common code
241 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
243 // dup'ed from signal.h to avoid changes to includes
244 #define SA_SHIRQ 0x04000000
245 #define SA_INTERRUPT 0x20000000
247 // needed for setup.c
248 extern unsigned long loops_per_jiffy;
249 extern char saved_command_line[];
250 struct screen_info { };
251 #define seq_printf(a,b...) printf(b)
252 #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
254 // needed for newer ACPI code
255 #define asmlinkage
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 // needed for include/xen/smp.h
266 #define __smp_processor_id() 0
268 // xen/include/asm/config.h
269 /******************************************************************************
270 * config.h
271 *
272 * A Linux-style configuration list.
273 */
275 #ifndef __XEN_IA64_CONFIG_H__
276 #define __XEN_IA64_CONFIG_H__
278 #undef CONFIG_X86
280 #define CONFIG_MCKINLEY
282 #undef CONFIG_X86_LOCAL_APIC
283 #undef CONFIG_X86_IO_APIC
284 #undef CONFIG_X86_L1_CACHE_SHIFT
286 // this needs to be on to run on hp zx1 with more than 4GB
287 // it is hacked around for now though
288 //#define CONFIG_VIRTUAL_MEM_MAP
290 //#ifndef CONFIG_IA64_HP_SIM
291 // looks like this is hard to turn off for Xen
292 #define CONFIG_ACPI 1
293 #define CONFIG_ACPI_BOOT 1
294 //#endif
296 #define CONFIG_XEN_ATTENTION_KEY 1
297 #endif /* __ASSEMBLY__ */
298 #endif /* __XEN_IA64_CONFIG_H__ */
300 // FOLLOWING ADDED FOR XEN POST-NGIO and/or LINUX 2.6.7
302 // following derived from linux/include/linux/compiler-gcc3.h
303 // problem because xen (over?)simplifies include/xen/compiler.h
304 #if __GNUC_MAJOR < 3 || __GNUC_MINOR__ >= 3
305 # define __attribute_used__ __attribute__((__used__))
306 #else
307 # define __attribute_used__ __attribute__((__unused__))
308 #endif
309 #endif /* _IA64_CONFIG_H_ */