mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-05-17 15:28:31 +00:00
[PATCH] PCI: altix: msi support
MSI callouts for altix. Involves a fair amount of code reorg in sn irq.c code as well as adding some extensions to the altix PCI provider abstaction. 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
10083072bf
commit
83821d3f55
@@ -10,6 +10,7 @@
|
||||
#define _ASM_IA64_SN_INTR_H
|
||||
|
||||
#include <linux/rcupdate.h>
|
||||
#include <asm/sn/types.h>
|
||||
|
||||
#define SGI_UART_VECTOR 0xe9
|
||||
|
||||
@@ -40,6 +41,7 @@ struct sn_irq_info {
|
||||
int irq_cpuid; /* kernel logical cpuid */
|
||||
int irq_irq; /* the IRQ number */
|
||||
int irq_int_bit; /* Bridge interrupt pin */
|
||||
/* <0 means MSI */
|
||||
u64 irq_xtalkaddr; /* xtalkaddr IRQ is sent to */
|
||||
int irq_bridge_type;/* pciio asic type (pciio.h) */
|
||||
void *irq_bridge; /* bridge generating irq */
|
||||
@@ -53,6 +55,12 @@ struct sn_irq_info {
|
||||
};
|
||||
|
||||
extern void sn_send_IPI_phys(int, long, int, int);
|
||||
extern u64 sn_intr_alloc(nasid_t, int,
|
||||
struct sn_irq_info *,
|
||||
int, nasid_t, int);
|
||||
extern void sn_intr_free(nasid_t, int, struct sn_irq_info *);
|
||||
extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int);
|
||||
extern struct list_head **sn_irq_lh;
|
||||
|
||||
#define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector)
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#define PCI32_ATE_V (0x1 << 0)
|
||||
#define PCI32_ATE_CO (0x1 << 1)
|
||||
#define PCI32_ATE_PREC (0x1 << 2)
|
||||
#define PCI32_ATE_MSI (0x1 << 2)
|
||||
#define PCI32_ATE_PREF (0x1 << 3)
|
||||
#define PCI32_ATE_BAR (0x1 << 4)
|
||||
#define PCI32_ATE_ADDR_SHFT 12
|
||||
@@ -117,8 +118,8 @@ struct pcibus_info {
|
||||
|
||||
extern int pcibr_init_provider(void);
|
||||
extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *);
|
||||
extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t);
|
||||
extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t);
|
||||
extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t, int type);
|
||||
extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t, int type);
|
||||
extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int);
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved.
|
||||
* Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.
|
||||
*/
|
||||
#ifndef _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H
|
||||
#define _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H
|
||||
@@ -45,13 +45,24 @@ struct pci_controller;
|
||||
*/
|
||||
|
||||
struct sn_pcibus_provider {
|
||||
dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t);
|
||||
dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t);
|
||||
dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t, int flags);
|
||||
dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t, int flags);
|
||||
void (*dma_unmap)(struct pci_dev *, dma_addr_t, int);
|
||||
void * (*bus_fixup)(struct pcibus_bussoft *, struct pci_controller *);
|
||||
void (*force_interrupt)(struct sn_irq_info *);
|
||||
void (*target_interrupt)(struct sn_irq_info *);
|
||||
};
|
||||
|
||||
/*
|
||||
* Flags used by the map interfaces
|
||||
* bits 3:0 specifies format of passed in address
|
||||
* bit 4 specifies that address is to be used for MSI
|
||||
*/
|
||||
|
||||
#define SN_DMA_ADDRTYPE(x) ((x) & 0xf)
|
||||
#define SN_DMA_ADDR_PHYS 1 /* address is an xio address. */
|
||||
#define SN_DMA_ADDR_XIO 2 /* address is phys memory */
|
||||
#define SN_DMA_MSI 0x10 /* Bus address is to be used for MSI */
|
||||
|
||||
extern struct sn_pcibus_provider *sn_pci_provider[];
|
||||
#endif /* _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H */
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2003-2004 Silicon Graphics, Inc. All rights reserved.
|
||||
* Copyright (C) 2003-2005 Silicon Graphics, Inc. All rights reserved.
|
||||
*/
|
||||
#ifndef _ASM_IA64_SN_PCI_TIOCP_H
|
||||
#define _ASM_IA64_SN_PCI_TIOCP_H
|
||||
|
||||
#define TIOCP_HOST_INTR_ADDR 0x003FFFFFFFFFFFFFUL
|
||||
#define TIOCP_PCI64_CMDTYPE_MEM (0x1ull << 60)
|
||||
#define TIOCP_PCI64_CMDTYPE_MSI (0x3ull << 60)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user