direct-io.hg

view xen/include/asm-ia64/config.h @ 15339:0cf6b75423e9

[IA64] Set PADDR_BITS to 48 to match reality and save about 5KB per node.

Signed-off-by: Jes Sorensen <jes@sgi.com>
author Alex Williamson <alex.williamson@hp.com>
date Mon Jun 04 14:17:54 2007 -0600 (2007-06-04)
parents 33c3dbc8ab3d
children 96331db61e47
line source
1 #ifndef _IA64_CONFIG_H_
2 #define _IA64_CONFIG_H_
4 #undef DEBUG_PFMON
6 // manufactured from component pieces
8 // defined in linux/arch/ia64/defconfig
9 #define CONFIG_IA64_GENERIC
10 #define CONFIG_HZ 32
12 #define CONFIG_IA64_L1_CACHE_SHIFT 7
13 // needed by include/asm-ia64/page.h
14 #define CONFIG_IA64_PAGE_SIZE_16KB // 4KB doesn't work?!?
15 #define CONFIG_IA64_GRANULE_16MB
17 // this needs to be on to run on system with large memory hole
18 #define CONFIG_VIRTUAL_FRAME_TABLE
20 #define CONFIG_EFI_PCDP
21 #define CONFIG_SERIAL_SGI_L1_CONSOLE
23 #define CONFIG_XEN_SMP
25 #ifdef CONFIG_XEN_SMP
26 #define CONFIG_SMP 1
27 #define NR_CPUS 64
28 #define CONFIG_NUMA
29 #define CONFIG_ACPI_NUMA
30 #define NODES_SHIFT 3
31 #define MAX_NUMNODES (1 << NODES_SHIFT)
32 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
33 #define MAX_PXM_DOMAINS 256
34 #else
35 #undef CONFIG_SMP
36 #define NR_CPUS 1
37 #endif
38 #define CONFIG_NR_CPUS NR_CPUS
40 #define CONFIG_IOSAPIC
41 #define supervisor_mode_kernel (0)
43 #define CONFIG_DMA_BITSIZE 32
45 #define PADDR_BITS 48
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;
87 // from linux/include/linux/mm.h
88 extern struct page_info *mem_map;
90 // xen/include/asm/config.h
91 extern char _end[]; /* standard ELF symbol */
93 // linux/include/linux/compiler.h
94 //#define __kernel
95 //#define __safe
96 #define __force
97 #define __chk_user_ptr(x) (void)0
98 //#define __chk_io_ptr(x) (void)0
99 //#define __builtin_warning(x, y...) (1)
100 //#define __acquires(x)
101 //#define __releases(x)
102 //#define __acquire(x) (void)0
103 //#define __release(x) (void)0
104 //#define __cond_lock(x) (x)
105 //#define __must_check
106 #define __deprecated
108 // xen/include/asm/config.h
109 //#define HZ 1000
110 // FIXME SMP: leave SMP for a later time
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 #define get_cpu() smp_processor_id()
126 #define put_cpu() do {} while(0)
127 #define put_cpu_no_resched() do{} while (0)
129 // needed for common/dom0_ops.c until hyperthreading is supported
130 #ifdef CONFIG_SMP
131 extern int smp_num_siblings;
132 #else
133 #define smp_num_siblings 1
134 #endif
136 // function calls; see decl in xen/include/xen/sched.h
137 #undef free_task_struct
138 #undef alloc_task_struct
139 #define get_thread_info(v) alloc_thread_info(v)
141 // avoid redefining task_t in asm/thread_info.h
142 #define task_t struct domain
144 // avoid redefining task_struct in asm/current.h
145 #define task_struct vcpu
147 #include <xen/cache.h>
148 #ifndef CONFIG_SMP
149 #define __cacheline_aligned_in_smp
150 #else
151 #define __cacheline_aligned_in_smp __cacheline_aligned
152 #endif
154 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
155 #ifndef CONFIG_SMP
156 #define ____cacheline_aligned_in_smp
157 #else
158 #define ____cacheline_aligned_in_smp ____cacheline_aligned
159 #endif
161 #define CONFIG_PERFMON
163 #ifndef __ASSEMBLY__
164 #include "asm/types.h" // for u64
165 #include "linux/linkage.h" // for asmlinkage which is used by
166 // xen/include/acpi/acpixf.h
167 #endif
169 // warning: unless search_extable is declared, the return value gets
170 // truncated to 32-bits, causing a very strange error in privop handling
171 struct exception_table_entry;
173 const struct exception_table_entry *
174 search_extable(const struct exception_table_entry *first,
175 const struct exception_table_entry *last,
176 unsigned long value);
177 void sort_extable(struct exception_table_entry *start,
178 struct exception_table_entry *finish);
179 void sort_main_extable(void);
181 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
183 // see drivers/char/console.c
184 #define OPT_CONSOLE_STR "com1"
186 #define __nocast
188 // see include/asm-x86/atomic.h (different from standard linux)
189 #define _atomic_set(v,i) (((v).counter) = (i))
190 #define _atomic_read(v) ((v).counter)
191 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
193 // Deprivated linux inf and put here for short time compatibility
194 #define kmalloc(s, t) xmalloc_bytes((s))
195 #define kfree(s) xfree((s))
196 #define kzalloc(size, flags) \
197 ({ \
198 unsigned char *mem; \
199 mem = (unsigned char *)xmalloc_bytes(size); \
200 if (mem) \
201 memset(mem, 0, size); \
202 (void *)mem; \
203 })
204 #define kcalloc(n, size, flags) kzalloc(n * size, flags)
205 #define alloc_bootmem_node(pg, size) xmalloc_bytes(size)
207 // see common/keyhandler.c
208 #define nop() asm volatile ("nop 0")
210 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
211 #define preempt_enable() do { } while (0)
212 #define preempt_disable() do { } while (0)
214 // needed for include/xen/linuxtime.h
215 typedef s64 time_t;
216 typedef s64 suseconds_t;
218 // needed for include/linux/jiffies.h
219 typedef long clock_t;
221 // from include/linux/kernel.h, needed by jiffies.h
222 #define typecheck(type,x) \
223 ({ type __dummy; \
224 typeof(x) __dummy2; \
225 (void)(&__dummy == &__dummy2); \
226 1; \
227 })
229 // from include/linux/timex.h, needed by arch/ia64/time.c
230 #define TIME_SOURCE_CPU 0
232 // used in common code
233 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
235 // dup'ed from signal.h to avoid changes to includes
236 #define SA_SHIRQ 0x04000000
237 #define SA_INTERRUPT 0x20000000
239 // needed for setup.c
240 extern unsigned long loops_per_jiffy;
241 extern char saved_command_line[];
242 struct screen_info { };
243 #define seq_printf(a,b...) printk(b)
244 //#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
246 #define CONFIG_SHADOW 1
248 // xen/include/asm/config.h
249 /******************************************************************************
250 * config.h
251 *
252 * A Linux-style configuration list.
253 */
255 #ifndef __XEN_IA64_CONFIG_H__
256 #define __XEN_IA64_CONFIG_H__
258 #undef CONFIG_X86
260 #define CONFIG_MCKINLEY
262 #undef CONFIG_X86_LOCAL_APIC
263 #undef CONFIG_X86_IO_APIC
264 #undef CONFIG_X86_L1_CACHE_SHIFT
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 /* Allow .serialize.data/instruction in asm files.
277 Old as doesn't handle this. */
278 #define HAVE_SERIALIZE_DIRECTIVE
280 /* Define CONFIG_PRIVIFY to support privified OS (deprecated). */
281 #undef CONFIG_PRIVIFY
283 #endif /* _IA64_CONFIG_H_ */