mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[IA64] Compile iosapic within xen
Compile iosapic within xen. Part of code from Tristan. Signed-off-by Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
1 parent
505cbfa6e7
commit
7b89941a2c
4 files changed
+40
No files matched your search
@@ -13,3 +13,4 @@ obj-y += time.o
|
||||
obj-y += tlb.o
|
||||
obj-y += unaligned.o
|
||||
obj-y += unwind.o
|
||||
obj-y += iosapic.o
|
||||
@@ -75,7 +75,9 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#ifndef XEN
|
||||
#include <linux/pci.h>
|
||||
#endif
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/string.h>
|
||||
@@ -524,7 +526,11 @@ static struct iosapic_rte_info *iosapic_alloc_rte (void)
|
||||
int preallocated = 0;
|
||||
|
||||
if (!iosapic_kmalloc_ok && list_empty(&free_rte_list)) {
|
||||
#ifdef XEN
|
||||
rte = xmalloc_bytes(sizeof(struct iosapic_rte_info) * NR_PREALLOCATE_RTE_ENTRIES);
|
||||
#else
|
||||
rte = alloc_bootmem(sizeof(struct iosapic_rte_info) * NR_PREALLOCATE_RTE_ENTRIES);
|
||||
#endif
|
||||
if (!rte)
|
||||
return NULL;
|
||||
for (i = 0; i < NR_PREALLOCATE_RTE_ENTRIES; i++, rte++)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#endif
|
||||
#define CONFIG_NR_CPUS NR_CPUS
|
||||
|
||||
#define CONFIG_IOSAPIC
|
||||
#define supervisor_mode_kernel (0)
|
||||
|
||||
#define MAX_DMADOM_PFN (0x7FFFFFFFUL >> PAGE_SHIFT) /* 31 addressable bits */
|
||||
|
||||
@@ -108,5 +108,37 @@ extern void __devinit map_iosapic_to_node (unsigned int, int);
|
||||
polarity,trigger) (gsi)
|
||||
#endif
|
||||
|
||||
#ifdef XEN
|
||||
/* Move to common code later */
|
||||
/**
|
||||
* list_move - delete from one list and add as another's head
|
||||
* @list: the entry to move
|
||||
* @head: the head that will precede our entry
|
||||
*/
|
||||
static inline void list_move(struct list_head *list, struct list_head *head)
|
||||
{
|
||||
__list_del(list->prev, list->next);
|
||||
list_add(list, head);
|
||||
}
|
||||
|
||||
#define move_irq(x)
|
||||
|
||||
#define WARN_ON(condition) do { \
|
||||
if (unlikely((condition)!=0)) { \
|
||||
printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
|
||||
dump_stack(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#ifdef nop
|
||||
#undef nop
|
||||
#endif
|
||||
|
||||
/* nop for now */
|
||||
static inline void
|
||||
set_irq_affinity_info(unsigned int irq, int hwid, int redir) {}
|
||||
|
||||
#endif /* XEN */
|
||||
|
||||
# endif /* !__ASSEMBLY__ */
|
||||
#endif /* __ASM_IA64_IOSAPIC_H */
|
||||