ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 14103:ee4850bc895b

xen memory alloctor: remove bit width restrictions

Hide the (default or user specified) DMA width from anything outside
the heap allocator. I/O-capable guests can now request any width for
the memory they want exchanged/added.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Fri Feb 23 17:02:58 2007 +0000 (2007-02-23)
parents b3c79bad5de0
children 26492c6476f0
line source
1 #ifndef _IA64_CONFIG_H_
2 #define _IA64_CONFIG_H_
4 #define VHPT_GLOBAL
6 #undef DEBUG_PFMON
8 // manufactured from component pieces
10 // defined in linux/arch/ia64/defconfig
11 #define CONFIG_IA64_GENERIC
12 #define CONFIG_HZ 32
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
19 // this needs to be on to run on system with large memory hole
20 #define CONFIG_VIRTUAL_FRAME_TABLE
22 #define CONFIG_EFI_PCDP
23 #define CONFIG_SERIAL_SGI_L1_CONSOLE
25 #define CONFIG_XEN_SMP
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
42 #define CONFIG_IOSAPIC
43 #define supervisor_mode_kernel (0)
45 #define CONFIG_DMA_BITSIZE 32
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
53 #define CONFIG_VGA 1
56 #define NR_hypercalls 64
58 #ifndef __ASSEMBLY__
60 // can't find where this typedef was before?!?
61 // needed by include/asm-ia64/processor.h (and other places)
62 typedef int pid_t;
64 // now needed for xen/include/mm.h
65 typedef unsigned long paddr_t;
66 // from include/linux/kernel.h
67 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
69 //////////////////////////////////////
71 #define FASTCALL(x) x // see linux/include/linux/linkage.h
72 #define fastcall // " "
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))
80 // FIXME?: x86-ism used in xen/mm.h
81 #define LOCK_PREFIX
83 extern unsigned long xenheap_phys_end;
84 extern unsigned long xen_pstart;
85 extern unsigned long xenheap_size;
86 //extern struct domain *dom0;
87 extern unsigned long dom0_size;
89 // from linux/include/linux/mm.h
90 extern struct page_info *mem_map;
92 // xen/include/asm/config.h
93 extern char _end[]; /* standard ELF symbol */
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
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
120 ///////////////////////////////////////////////////////////////
122 // get rid of difficult circular include dependency
123 #define CMPXCHG_BUGCHECK(v)
124 #define CMPXCHG_BUGCHECK_DECL
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)
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 // 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)
143 // avoid redefining task_t in asm/thread_info.h
144 #define task_t struct domain
146 // avoid redefining task_struct in asm/current.h
147 #define task_struct vcpu
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
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
163 #define CONFIG_PERFMON
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
171 // warning: unless search_extable is declared, the return value gets
172 // truncated to 32-bits, causing a very strange error in privop handling
173 struct exception_table_entry;
175 const struct exception_table_entry *
176 search_extable(const struct exception_table_entry *first,
177 const struct exception_table_entry *last,
178 unsigned long value);
179 void sort_extable(struct exception_table_entry *start,
180 struct exception_table_entry *finish);
181 void sort_main_extable(void);
183 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
185 // see drivers/char/console.c
186 #define OPT_CONSOLE_STR "com1"
188 #define __nocast
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)) })
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)
209 // see common/keyhandler.c
210 #define nop() asm volatile ("nop 0")
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)
216 // needed for include/xen/linuxtime.h
217 typedef s64 time_t;
218 typedef s64 suseconds_t;
220 // needed for include/linux/jiffies.h
221 typedef long clock_t;
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 })
231 // from include/linux/timex.h, needed by arch/ia64/time.c
232 #define TIME_SOURCE_CPU 0
234 // used in common code
235 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
237 // dup'ed from signal.h to avoid changes to includes
238 #define SA_SHIRQ 0x04000000
239 #define SA_INTERRUPT 0x20000000
241 // needed for setup.c
242 extern unsigned long loops_per_jiffy;
243 extern char saved_command_line[];
244 struct screen_info { };
245 #define seq_printf(a,b...) printk(b)
246 //#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
248 #define CONFIG_SHADOW 1
250 // xen/include/asm/config.h
251 /******************************************************************************
252 * config.h
253 *
254 * A Linux-style configuration list.
255 */
257 #ifndef __XEN_IA64_CONFIG_H__
258 #define __XEN_IA64_CONFIG_H__
260 #undef CONFIG_X86
262 #define CONFIG_MCKINLEY
264 #undef CONFIG_X86_LOCAL_APIC
265 #undef CONFIG_X86_IO_APIC
266 #undef CONFIG_X86_L1_CACHE_SHIFT
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
274 #define CONFIG_XEN_ATTENTION_KEY 1
275 #endif /* __ASSEMBLY__ */
276 #endif /* __XEN_IA64_CONFIG_H__ */
278 /* Allow .serialize.data/instruction in asm files.
279 Old as doesn't handle this. */
280 #define HAVE_SERIALIZE_DIRECTIVE
282 /* Define CONFIG_PRIVIFY to support privified OS (deprecated). */
283 #undef CONFIG_PRIVIFY
285 #endif /* _IA64_CONFIG_H_ */