ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 4146:f2d61710e4d9

bitkeeper revision 1.1236.25.24 (42366e9aQ71LQ8uCB-Y1IwVNqx5eqA)

Merge djm@kirby.fc.hp.com://home/djm/src/xen/xeno-unstable-ia64.bk
into sportsman.spdomain:/home/djm/xeno-unstable-ia64.bk
author djm@sportsman.spdomain
date Tue Mar 15 05:11:54 2005 +0000 (2005-03-15)
parents f8026d38aa87 0c846e77cca4
children a0b28acf0dcd
line source
1 // control flags for turning on/off features under test
2 #undef CLONE_DOMAIN0
3 //#define CLONE_DOMAIN0 3
4 #define USER_ACCESS
6 // manufactured from component pieces
8 // defined in linux/arch/ia64/defconfig
9 //#define CONFIG_IA64_GENERIC
10 #define CONFIG_IA64_HP_SIM
11 #define CONFIG_IA64_L1_CACHE_SHIFT 7
12 // needed by include/asm-ia64/page.h
13 #define CONFIG_IA64_PAGE_SIZE_16KB // 4KB doesn't work?!?
14 #define CONFIG_IA64_GRANULE_16MB
15 // needed in arch/ia64/setup.c to reserve memory for domain0
16 #define CONFIG_BLK_DEV_INITRD
18 #ifndef __ASSEMBLY__
20 // can't find where this typedef was before?!?
21 // needed by include/asm-ia64/processor.h (and other places)
22 typedef int pid_t;
24 // from include/linux/kernel.h
25 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
27 //////////////////////////////////////
29 // FIXME: generated automatically into offsets.h??
30 #define IA64_TASK_SIZE 0 // this probably needs to be fixed
31 //#define IA64_TASK_SIZE sizeof(struct task_struct)
33 #define FASTCALL(x) x // see linux/include/linux/linkage.h
34 #define fastcall // " "
36 // from linux/include/linux/types.h
37 #define BITS_TO_LONGS(bits) \
38 (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
39 #define DECLARE_BITMAP(name,bits) \
40 unsigned long name[BITS_TO_LONGS(bits)]
41 #define CLEAR_BITMAP(name,bits) \
42 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
44 // from linux/include/linux/compiler.h
45 #define __user
47 // FIXME?: x86-ism used in xen/mm.h
48 #define LOCK_PREFIX
50 // from linux/include/linux/mm.h
51 extern struct page *mem_map;
53 // defined in include/asm-x86/mm.h, not really used for ia64
54 typedef struct {
55 void (*enable)(struct domain *p);
56 void (*disable)(struct domain *p);
57 } vm_assist_info_t;
58 extern vm_assist_info_t vm_assist_info[];
60 // xen/include/asm/config.h
61 extern char _end[]; /* standard ELF symbol */
63 // linux/include/linux/compiler.h
64 #define __attribute_const__
66 // xen/include/asm/config.h
67 #define HZ 100
68 // leave SMP for a later time
69 #define NR_CPUS 1
70 //#define NR_CPUS 16
71 //#define CONFIG_NR_CPUS 16
72 #define barrier() __asm__ __volatile__("": : :"memory")
74 ///////////////////////////////////////////////////////////////
75 // xen/include/asm/config.h
76 #define XENHEAP_DEFAULT_MB (16)
77 #define ELFSIZE 64
79 ///////////////////////////////////////////////////////////////
81 // get rid of difficult circular include dependency
82 #define CMPXCHG_BUGCHECK(v)
83 #define CMPXCHG_BUGCHECK_DECL
85 // from include/asm-ia64/smp.h
86 #ifdef CONFIG_SMP
87 #error "Lots of things to fix to enable CONFIG_SMP!"
88 #endif
89 #define get_cpu() 0
90 #define put_cpu() do {} while(0)
92 // from linux/include/linux/mm.h
93 struct page;
95 // function calls; see decl in xen/include/xen/sched.h
96 #undef free_task_struct
97 #undef alloc_task_struct
99 // initial task has a different name in Xen
100 //#define idle0_task init_task
101 #define idle0_exec_domain init_task
103 // avoid redefining task_t in asm/thread_info.h
104 #define task_t struct domain
106 // linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
107 #define platform_inb __ia64_inb
108 #define platform_inw __ia64_inw
109 #define platform_inl __ia64_inl
110 #define platform_outb __ia64_outb
111 #define platform_outw __ia64_outw
112 #define platform_outl __ia64_outl
114 // FIXME: This just overrides a use in a typedef (not allowed in ia64,
115 // or maybe just in older gcc's?) used in ac_timer.c but should be OK
116 // (and indeed is probably required!) elsewhere
117 #undef __cacheline_aligned
118 #undef ____cacheline_aligned
119 #undef ____cacheline_aligned_in_smp
120 #define __cacheline_aligned
121 #define ____cacheline_aligned
122 #define ____cacheline_aligned_in_smp
124 #include "asm/types.h" // for u64
125 struct device {
126 #if 0
127 struct list_head node; /* node in sibling list */
128 struct list_head bus_list; /* node in bus's list */
129 struct list_head driver_list;
130 struct list_head children;
131 struct device * parent;
133 struct kobject kobj;
134 char bus_id[BUS_ID_SIZE]; /* position on parent bus */
136 struct bus_type * bus; /* type of bus device is on */
137 struct device_driver *driver; /* which driver has allocated this
138 device */
139 void *driver_data; /* data private to the driver */
140 void *platform_data; /* Platform specific data (e.g. ACPI,
141 BIOS data relevant to device) */
142 struct dev_pm_info power;
143 u32 power_state; /* Current operating state. In
144 ACPI-speak, this is D0-D3, D0
145 being fully functional, and D3
146 being off. */
148 unsigned char *saved_state; /* saved device state */
149 u32 detach_state; /* State to enter when device is
150 detached from its driver. */
152 #endif
153 u64 *dma_mask; /* dma mask (if dma'able device) */
154 #if 0
155 struct list_head dma_pools; /* dma pools (if dma'ble) */
157 void (*release)(struct device * dev);
158 #endif
159 };
161 // from linux/include/linux/pci.h
162 struct pci_bus_region {
163 unsigned long start;
164 unsigned long end;
165 };
167 // from linux/include/linux/module.h
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 // defined (why?) in include/asm-i386/processor.h
182 // used in common/physdev.c
183 #define IO_BITMAP_SIZE 32
184 #define IO_BITMAP_BYTES (IO_BITMAP_SIZE * 4)
186 #define printk printf
188 #define __ARCH_HAS_SLAB_ALLOCATOR // see include/xen/slab.h
189 #define xmem_cache_t kmem_cache_t
190 #define xmem_cache_alloc(a) kmem_cache_alloc(a,GFP_KERNEL)
191 #define xmem_cache_free(a,b) kmem_cache_free(a,b)
192 #define xmem_cache_create kmem_cache_create
193 #define xmalloc(_type) kmalloc(sizeof(_type),GFP_KERNEL)
194 #define xmalloc_array(_type,_num) kmalloc(sizeof(_type)*_num,GFP_KERNEL)
195 #define xfree(a) kfree(a)
197 #undef __ARCH_IRQ_STAT
199 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
201 // from include/asm-x86/*/uaccess.h
202 #define array_access_ok(type,addr,count,size) \
203 (likely(sizeof(count) <= 4) /* disallow 64-bit counts */ && \
204 access_ok(type,addr,count*size))
206 // without this, uart_config_stageX does outb's which are non-portable
207 #define NO_UART_CONFIG_OK
209 // see drivers/char/console.c
210 #define OPT_CONSOLE_STR "com1"
212 #define __attribute_used__ __attribute__ ((unused))
214 // see include/asm-x86/atomic.h (different from standard linux)
215 #define _atomic_set(v,i) (((v).counter) = (i))
216 #define _atomic_read(v) ((v).counter)
217 // FIXME following needs work
218 #define atomic_compareandswap(old, new, v) old
220 // x86 typedef still used in sched.h, may go away later
221 //typedef unsigned long l1_pgentry_t;
223 // see include/asm-ia64/mm.h, handle remaining pfn_info uses until gone
224 #define pfn_info page
226 // see common/keyhandler.c
227 #define nop() asm volatile ("nop 0")
229 #define ARCH_HAS_EXEC_DOMAIN_MM_PTR
231 // see arch/x86/nmi.c !?!?
232 extern unsigned int watchdog_on;
234 // xen/include/asm/config.h
235 /******************************************************************************
236 * config.h
237 *
238 * A Linux-style configuration list.
239 */
241 #ifndef __XEN_IA64_CONFIG_H__
242 #define __XEN_IA64_CONFIG_H__
244 #undef CONFIG_X86
246 //#define CONFIG_SMP 1
247 //#define CONFIG_NR_CPUS 2
248 //leave SMP for a later time
249 #undef CONFIG_SMP
250 #undef CONFIG_X86_LOCAL_APIC
251 #undef CONFIG_X86_IO_APIC
252 #undef CONFIG_X86_L1_CACHE_SHIFT
254 // this needs to be on to run on hp zx1 with more than 4GB
255 // it is hacked around for now though
256 //#define CONFIG_VIRTUAL_MEM_MAP
258 //#ifndef CONFIG_IA64_HP_SIM
259 // looks like this is hard to turn off for Xen
260 #define CONFIG_ACPI 1
261 #define CONFIG_ACPI_BOOT 1
262 //#endif
264 #define CONFIG_PCI 1
265 #define CONFIG_PCI_BIOS 1
266 #define CONFIG_PCI_DIRECT 1
268 #define CONFIG_XEN_ATTENTION_KEY 1
269 #endif /* __ASSEMBLY__ */
270 #endif /* __XEN_IA64_CONFIG_H__ */
272 // FOLLOWING ADDED FOR XEN POST-NGIO and/or LINUX 2.6.7
274 // following derived from linux/include/linux/compiler-gcc3.h
275 // problem because xen (over?)simplifies include/xen/compiler.h
276 #if __GNUC_MAJOR < 3 || __GNUC_MINOR__ >= 3
277 # define __attribute_used__ __attribute__((__used__))
278 #else
279 # define __attribute_used__ __attribute__((__unused__))
280 #endif