ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 9495:8e0b9f31cf3f

[IA64] MAX_VIRT_CPUS and NR_CPUS

Increase MAX_VIRT_CPUS and NR_CPUS to 64.
Check maxcpus < MAX_VIRT_CPUS.
Check size of shared_info (<= PAGE_SIZE).

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Fri Apr 07 11:40:33 2006 -0600 (2006-04-07)
parents 32c39e71740f
children f6e8c269f6af
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 DOMU_BUILD_STAGING
7 #define VHPT_GLOBAL
9 #undef DEBUG_PFMON
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 #define CONFIG_XEN_SMP
26 #ifdef CONFIG_XEN_SMP
27 #define CONFIG_SMP 1
28 #define NR_CPUS 64
29 #else
30 #undef CONFIG_SMP
31 #define NR_CPUS 1
32 #endif
33 #define CONFIG_NR_CPUS NR_CPUS
35 #define supervisor_mode_kernel (0)
37 #define MAX_DMADOM_PFN (0x7FFFFFFFUL >> PAGE_SHIFT) /* 31 addressable bits */
39 #ifndef __ASSEMBLY__
41 // can't find where this typedef was before?!?
42 // needed by include/asm-ia64/processor.h (and other places)
43 typedef int pid_t;
45 // now needed for xen/include/mm.h
46 typedef unsigned long paddr_t;
47 // from include/linux/kernel.h
48 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
50 //////////////////////////////////////
52 #define FASTCALL(x) x // see linux/include/linux/linkage.h
53 #define fastcall // " "
55 #define watchdog_disable() ((void)0)
56 #define watchdog_enable() ((void)0)
57 // from linux/include/linux/types.h
58 #define CLEAR_BITMAP(name,bits) \
59 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
61 // FIXME?: x86-ism used in xen/mm.h
62 #define LOCK_PREFIX
64 extern unsigned long xenheap_phys_end;
65 extern unsigned long xen_pstart;
66 extern unsigned long xenheap_size;
67 //extern struct domain *dom0;
68 extern unsigned long dom0_start;
69 extern unsigned long dom0_size;
71 // from linux/include/linux/mm.h
72 extern struct page_info *mem_map;
74 // xen/include/asm/config.h
75 extern char _end[]; /* standard ELF symbol */
77 // linux/include/linux/compiler.h
78 #define __attribute_const__
79 #define __user
80 //#define __kernel
81 //#define __safe
82 #define __force
83 #define __chk_user_ptr(x) (void)0
84 //#define __chk_io_ptr(x) (void)0
85 //#define __builtin_warning(x, y...) (1)
86 //#define __acquires(x)
87 //#define __releases(x)
88 //#define __acquire(x) (void)0
89 //#define __release(x) (void)0
90 //#define __cond_lock(x) (x)
91 //#define __must_check
92 #define __deprecated
93 #ifndef RELOC_HIDE
94 # define RELOC_HIDE(ptr, off) \
95 ({ unsigned long __ptr; \
96 __ptr = (unsigned long) (ptr); \
97 (typeof(ptr)) (__ptr + (off)); })
98 #endif
100 // xen/include/asm/config.h
101 //#define HZ 1000
102 // FIXME SMP: leave SMP for a later time
103 #define barrier() __asm__ __volatile__("": : :"memory")
105 ///////////////////////////////////////////////////////////////
106 // xen/include/asm/config.h
107 // Natural boundary upon TR size to define xenheap space
108 #define XENHEAP_DEFAULT_MB (1 << (KERNEL_TR_PAGE_SHIFT - 20))
109 #define XENHEAP_DEFAULT_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
110 #define ELFSIZE 64
112 ///////////////////////////////////////////////////////////////
114 // get rid of difficult circular include dependency
115 #define CMPXCHG_BUGCHECK(v)
116 #define CMPXCHG_BUGCHECK_DECL
118 // from include/asm-ia64/smp.h
119 #define get_cpu() smp_processor_id()
120 #define put_cpu() do {} while(0)
122 // needed for common/dom0_ops.c until hyperthreading is supported
123 #ifdef CONFIG_SMP
124 extern int smp_num_siblings;
125 #else
126 #define smp_num_siblings 1
127 #endif
129 // function calls; see decl in xen/include/xen/sched.h
130 #undef free_task_struct
131 #undef alloc_task_struct
132 #define get_thread_info(v) alloc_thread_info(v)
134 // avoid redefining task_t in asm/thread_info.h
135 #define task_t struct domain
137 // avoid redefining task_struct in asm/current.h
138 #define task_struct vcpu
140 // linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
141 #define platform_inb __ia64_inb
142 #define platform_inw __ia64_inw
143 #define platform_inl __ia64_inl
144 #define platform_outb __ia64_outb
145 #define platform_outw __ia64_outw
146 #define platform_outl __ia64_outl
148 // FIXME: This just overrides a use in a typedef (not allowed in ia64,
149 // or maybe just in older gcc's?) used in timer.c but should be OK
150 // (and indeed is probably required!) elsewhere
151 #undef __cacheline_aligned
152 #undef ____cacheline_aligned
153 #undef ____cacheline_aligned_in_smp
154 #define __cacheline_aligned
155 #define __cacheline_aligned_in_smp
156 #define ____cacheline_aligned
157 #define ____cacheline_aligned_in_smp
158 #define ____cacheline_maxaligned_in_smp
160 #ifndef __ASSEMBLY__
161 #include "asm/types.h" // for u64
162 #endif
164 // warning: unless search_extable is declared, the return value gets
165 // truncated to 32-bits, causing a very strange error in privop handling
166 struct exception_table_entry;
168 const struct exception_table_entry *
169 search_extable(const struct exception_table_entry *first,
170 const struct exception_table_entry *last,
171 unsigned long value);
172 void sort_extable(struct exception_table_entry *start,
173 struct exception_table_entry *finish);
174 void sort_main_extable(void);
176 #if 0 /* Already defined in xen/lib.h */
177 #define printk printf
178 #endif
180 #undef __ARCH_IRQ_STAT
182 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
184 // see drivers/char/console.c
185 #ifndef VALIDATE_VT
186 #define OPT_CONSOLE_STR "com1"
187 #else
188 #define OPT_CONSOLE_STR "com2"
189 #endif
191 #define __nocast
193 // see include/asm-x86/atomic.h (different from standard linux)
194 #define _atomic_set(v,i) (((v).counter) = (i))
195 #define _atomic_read(v) ((v).counter)
196 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
198 // Deprivated linux inf and put here for short time compatibility
199 #define kmalloc(s, t) xmalloc_bytes((s))
200 #define kfree(s) xfree((s))
202 // see common/keyhandler.c
203 #define nop() asm volatile ("nop 0")
205 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
206 #define preempt_enable() do { } while (0)
207 #define preempt_disable() do { } while (0)
209 // needed for include/xen/linuxtime.h
210 typedef s64 time_t;
211 typedef s64 suseconds_t;
213 // needed for include/linux/jiffies.h
214 typedef long clock_t;
216 // from include/linux/kernel.h, needed by jiffies.h
217 #define typecheck(type,x) \
218 ({ type __dummy; \
219 typeof(x) __dummy2; \
220 (void)(&__dummy == &__dummy2); \
221 1; \
222 })
224 // from include/linux/timex.h, needed by arch/ia64/time.c
225 #define TIME_SOURCE_CPU 0
227 // used in common code
228 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
230 // dup'ed from signal.h to avoid changes to includes
231 #define SA_SHIRQ 0x04000000
232 #define SA_INTERRUPT 0x20000000
234 // needed for setup.c
235 extern unsigned long loops_per_jiffy;
236 extern char saved_command_line[];
237 struct screen_info { };
238 #define seq_printf(a,b...) printf(b)
239 //#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
241 void dummy_called(char *function);
242 #define dummy() dummy_called((char *) __FUNCTION__)
244 // these declarations got moved at some point, find a better place for them
245 extern int ht_per_core;
247 // xen/include/asm/config.h
248 /******************************************************************************
249 * config.h
250 *
251 * A Linux-style configuration list.
252 */
254 #ifndef __XEN_IA64_CONFIG_H__
255 #define __XEN_IA64_CONFIG_H__
257 #undef CONFIG_X86
259 #define CONFIG_MCKINLEY
261 #undef CONFIG_X86_LOCAL_APIC
262 #undef CONFIG_X86_IO_APIC
263 #undef CONFIG_X86_L1_CACHE_SHIFT
265 // this needs to be on to run on hp zx1 with more than 4GB
266 // it is hacked around for now though
267 //#define CONFIG_VIRTUAL_MEM_MAP
269 //#ifndef CONFIG_IA64_HP_SIM
270 // looks like this is hard to turn off for Xen
271 #define CONFIG_ACPI 1
272 #define CONFIG_ACPI_BOOT 1
273 //#endif
275 #define CONFIG_XEN_ATTENTION_KEY 1
276 #endif /* __ASSEMBLY__ */
277 #endif /* __XEN_IA64_CONFIG_H__ */
279 #ifndef __ASSEMBLY__
280 #include <linux/linkage.h>
281 #define FORCE_CRASH() asm("break.m 0;;");
282 #else
283 #define FORCE_CRASH break.m 0;;
284 #endif
286 #endif /* _IA64_CONFIG_H_ */