[IA64] introduce iosapci ID.

introduce iosapci ID, which is used to index DMA engine covering this iosapic.

Signed-off-by; Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Isaku Yamahata committed 2008-10-10 11:58:03 +09:00
1 parent f5ecb7dd8e
commit 005afacdb7
3 files changed
+49

No files matched your search

+5
View File
@@ -294,7 +294,12 @@ acpi_parse_iosapic(struct acpi_subtable_header * header, const unsigned long end
if (BAD_MADT_ENTRY(iosapic, end))
return -EINVAL;
#ifndef XEN
return iosapic_init(iosapic->address, iosapic->global_irq_base);
#else
return iosapic_init(iosapic->address, iosapic->global_irq_base,
iosapic->id);
#endif
}
static unsigned int __initdata acpi_madt_rev;
+11
View File
@@ -128,6 +128,7 @@ static struct iosapic_intr_info {
unsigned char trigger : 1; /* trigger mode (see iosapic.h) */
} iosapic_intr_info[IA64_NUM_VECTORS];
#ifndef XEN
static struct iosapic {
char __iomem *addr; /* base address of IOSAPIC */
unsigned int gsi_base; /* first GSI assigned to this IOSAPIC */
@@ -137,6 +138,9 @@ static struct iosapic {
unsigned short node; /* numa node association via pxm */
#endif
} iosapic_lists[NR_IOSAPICS];
#else
struct iosapic iosapic_lists[NR_IOSAPICS];
#endif
static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */
@@ -1035,7 +1039,11 @@ iosapic_check_gsi_range (unsigned int gsi_base, unsigned int ver)
}
int __devinit
#ifndef XEN
iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
#else
iosapic_init (unsigned long phys_addr, unsigned int gsi_base, unsigned int id)
#endif
{
int num_rte, err, index;
unsigned int isa_irq, ver;
@@ -1064,6 +1072,9 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
iosapic_lists[index].addr = addr;
iosapic_lists[index].gsi_base = gsi_base;
iosapic_lists[index].num_rte = num_rte;
#ifdef XEN
iosapic_lists[index].id = id;
#endif
#ifdef CONFIG_NUMA
iosapic_lists[index].node = MAX_NUMNODES;
#endif
@@ -53,6 +53,34 @@
#define NR_IOSAPICS 256
#ifdef XEN
struct iosapic {
char __iomem *addr; /* base address of IOSAPIC */
unsigned int gsi_base; /* first GSI assigned to this IOSAPIC */
unsigned short num_rte; /* number of RTE in this IOSAPIC */
int rtes_inuse; /* # of RTEs in use on this IOSAPIC */
unsigned int id; /* APIC ID */
#ifdef CONFIG_NUMA
unsigned short node; /* numa node association via pxm */
#endif
};
extern struct iosapic iosapic_lists[NR_IOSAPICS];
static inline int find_iosapic_by_addr(unsigned long addr)
{
int i;
for (i = 0; i < NR_IOSAPICS; i++) {
if ((unsigned long)iosapic_lists[i].addr == addr)
return i;
}
return -1;
}
#endif
static inline unsigned int iosapic_read(char __iomem *iosapic, unsigned int reg)
{
writel(reg, iosapic + IOSAPIC_REG_SELECT);
@@ -71,8 +99,13 @@ static inline void iosapic_eoi(char __iomem *iosapic, u32 vector)
}
extern void __init iosapic_system_init (int pcat_compat);
#ifndef XEN
extern int __devinit iosapic_init (unsigned long address,
unsigned int gsi_base);
#else
extern int __devinit iosapic_init (unsigned long address,
unsigned int gsi_base, unsigned int id);
#endif
#ifdef CONFIG_HOTPLUG
extern int iosapic_remove (unsigned int gsi_base);
#else
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.