blob: e0487aa974183516593df3b3d54c316de63eaf28 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
Jes Sorensen9a52bbe2006-02-02 05:50:05 -05006 * Copyright (C) 1992 - 1997, 2000-2006 Silicon Graphics, Inc. All rights reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 */
8
9#ifndef _ASM_IA64_SN_INTR_H
10#define _ASM_IA64_SN_INTR_H
11
Prarit Bhargavacb4cb2c2005-07-06 14:59:44 -070012#include <linux/rcupdate.h>
Mark Maule83821d32006-04-14 16:03:54 -050013#include <asm/sn/types.h>
Prarit Bhargavacb4cb2c2005-07-06 14:59:44 -070014
Jes Sorensen9a52bbe2006-02-02 05:50:05 -050015#define SGI_UART_VECTOR 0xe9
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
17/* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */
Jes Sorensen9a52bbe2006-02-02 05:50:05 -050018#define SGI_XPC_ACTIVATE 0x30
19#define SGI_II_ERROR 0x31
20#define SGI_XBOW_ERROR 0x32
21#define SGI_PCIASIC_ERROR 0x33
22#define SGI_ACPI_SCI_INT 0x34
23#define SGI_TIOCA_ERROR 0x35
24#define SGI_TIO_ERROR 0x36
25#define SGI_TIOCX_ERROR 0x37
26#define SGI_MMTIMER_VECTOR 0x38
27#define SGI_XPC_NOTIFY 0xe7
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Jes Sorensen9a52bbe2006-02-02 05:50:05 -050029#define IA64_SN2_FIRST_DEVICE_VECTOR 0x3c
30#define IA64_SN2_LAST_DEVICE_VECTOR 0xe6
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Jes Sorensen9a52bbe2006-02-02 05:50:05 -050032#define SN2_IRQ_RESERVED 0x1
33#define SN2_IRQ_CONNECTED 0x2
34#define SN2_IRQ_SHARED 0x4
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
36// The SN PROM irq struct
37struct sn_irq_info {
Prarit Bhargavacb4cb2c2005-07-06 14:59:44 -070038 struct sn_irq_info *irq_next; /* deprecated DO NOT USE */
Linus Torvalds1da177e2005-04-16 15:20:36 -070039 short irq_nasid; /* Nasid IRQ is assigned to */
40 int irq_slice; /* slice IRQ is assigned to */
41 int irq_cpuid; /* kernel logical cpuid */
42 int irq_irq; /* the IRQ number */
43 int irq_int_bit; /* Bridge interrupt pin */
Mark Maule83821d32006-04-14 16:03:54 -050044 /* <0 means MSI */
Prarit Bhargava53493dc2006-01-16 19:54:40 -080045 u64 irq_xtalkaddr; /* xtalkaddr IRQ is sent to */
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 int irq_bridge_type;/* pciio asic type (pciio.h) */
47 void *irq_bridge; /* bridge generating irq */
48 void *irq_pciioinfo; /* associated pciio_info_t */
49 int irq_last_intr; /* For Shub lb lost intr WAR */
50 int irq_cookie; /* unique cookie */
51 int irq_flags; /* flags */
52 int irq_share_cnt; /* num devices sharing IRQ */
Prarit Bhargavacb4cb2c2005-07-06 14:59:44 -070053 struct list_head list; /* list of sn_irq_info structs */
54 struct rcu_head rcu; /* rcu callback list */
Linus Torvalds1da177e2005-04-16 15:20:36 -070055};
56
57extern void sn_send_IPI_phys(int, long, int, int);
Mark Maule83821d32006-04-14 16:03:54 -050058extern u64 sn_intr_alloc(nasid_t, int,
59 struct sn_irq_info *,
60 int, nasid_t, int);
61extern void sn_intr_free(nasid_t, int, struct sn_irq_info *);
62extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int);
John Keller6e9de182007-08-22 19:32:06 -050063extern void sn_set_err_irq_affinity(unsigned int);
Mark Maule83821d32006-04-14 16:03:54 -050064extern struct list_head **sn_irq_lh;
Linus Torvalds1da177e2005-04-16 15:20:36 -070065
66#define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector)
67
68#endif /* _ASM_IA64_SN_INTR_H */