[PATCH] PCI: msi abstractions and support for altix
Abstract portions of the MSI core for platforms that do not use standard APIC interrupt controllers. This is implemented through a new arch-specific msi setup routine, and a set of msi ops which can be set on a per platform basis. Signed-off-by: Mark Maule <maule@sgi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c34b4c7344
commit
fd58e55fcf
@@ -12,4 +12,12 @@
|
||||
#define LAST_DEVICE_VECTOR 232
|
||||
#define MSI_TARGET_CPU_SHIFT 12
|
||||
|
||||
extern struct msi_ops msi_apic_ops;
|
||||
|
||||
static inline int msi_arch_init(void)
|
||||
{
|
||||
msi_register(&msi_apic_ops);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* ASM_MSI_H */
|
||||
|
||||
@@ -75,6 +75,7 @@ typedef unsigned char ia64_mv_readb_relaxed_t (const volatile void __iomem *);
|
||||
typedef unsigned short ia64_mv_readw_relaxed_t (const volatile void __iomem *);
|
||||
typedef unsigned int ia64_mv_readl_relaxed_t (const volatile void __iomem *);
|
||||
typedef unsigned long ia64_mv_readq_relaxed_t (const volatile void __iomem *);
|
||||
typedef int ia64_mv_msi_init_t (void);
|
||||
|
||||
static inline void
|
||||
machvec_noop (void)
|
||||
@@ -153,6 +154,7 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *);
|
||||
# define platform_readl_relaxed ia64_mv.readl_relaxed
|
||||
# define platform_readq_relaxed ia64_mv.readq_relaxed
|
||||
# define platform_migrate ia64_mv.migrate
|
||||
# define platform_msi_init ia64_mv.msi_init
|
||||
# endif
|
||||
|
||||
/* __attribute__((__aligned__(16))) is required to make size of the
|
||||
@@ -202,6 +204,7 @@ struct ia64_machine_vector {
|
||||
ia64_mv_readl_relaxed_t *readl_relaxed;
|
||||
ia64_mv_readq_relaxed_t *readq_relaxed;
|
||||
ia64_mv_migrate_t *migrate;
|
||||
ia64_mv_msi_init_t *msi_init;
|
||||
} __attribute__((__aligned__(16))); /* align attrib? see above comment */
|
||||
|
||||
#define MACHVEC_INIT(name) \
|
||||
@@ -247,6 +250,7 @@ struct ia64_machine_vector {
|
||||
platform_readl_relaxed, \
|
||||
platform_readq_relaxed, \
|
||||
platform_migrate, \
|
||||
platform_msi_init, \
|
||||
}
|
||||
|
||||
extern struct ia64_machine_vector ia64_mv;
|
||||
@@ -400,5 +404,8 @@ extern int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size
|
||||
#ifndef platform_migrate
|
||||
# define platform_migrate machvec_noop_task
|
||||
#endif
|
||||
#ifndef platform_msi_init
|
||||
# define platform_msi_init ((ia64_mv_msi_init_t*)NULL)
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_IA64_MACHVEC_H */
|
||||
|
||||
@@ -67,6 +67,8 @@ extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device;
|
||||
extern ia64_mv_dma_mapping_error sn_dma_mapping_error;
|
||||
extern ia64_mv_dma_supported sn_dma_supported;
|
||||
extern ia64_mv_migrate_t sn_migrate;
|
||||
extern ia64_mv_msi_init_t sn_msi_init;
|
||||
|
||||
|
||||
/*
|
||||
* This stuff has dual use!
|
||||
@@ -117,6 +119,11 @@ extern ia64_mv_migrate_t sn_migrate;
|
||||
#define platform_dma_mapping_error sn_dma_mapping_error
|
||||
#define platform_dma_supported sn_dma_supported
|
||||
#define platform_migrate sn_migrate
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
#define platform_msi_init sn_msi_init
|
||||
#else
|
||||
#define platform_msi_init ((ia64_mv_msi_init_t*)NULL)
|
||||
#endif
|
||||
|
||||
#include <asm/sn/io.h>
|
||||
|
||||
|
||||
@@ -14,4 +14,16 @@ static inline void set_intr_gate (int nr, void *func) {}
|
||||
#define ack_APIC_irq ia64_eoi
|
||||
#define MSI_TARGET_CPU_SHIFT 4
|
||||
|
||||
extern struct msi_ops msi_apic_ops;
|
||||
|
||||
static inline int msi_arch_init(void)
|
||||
{
|
||||
if (platform_msi_init)
|
||||
return platform_msi_init();
|
||||
|
||||
/* default ops for most ia64 platforms */
|
||||
msi_register(&msi_apic_ops);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* ASM_MSI_H */
|
||||
|
||||
@@ -13,4 +13,12 @@
|
||||
#define LAST_DEVICE_VECTOR 232
|
||||
#define MSI_TARGET_CPU_SHIFT 12
|
||||
|
||||
extern struct msi_ops msi_apic_ops;
|
||||
|
||||
static inline int msi_arch_init(void)
|
||||
{
|
||||
msi_register(&msi_apic_ops);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* ASM_MSI_H */
|
||||
|
||||
Reference in New Issue
Block a user