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
6 * Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved.
10 #ifndef _ASM_IA64_SN_SGI_H
11 #define _ASM_IA64_SN_SGI_H
13 #include <linux/config.h>
15 #include <asm/sn/types.h>
16 #include <asm/uaccess.h> /* for copy_??_user */
17 #include <asm/sn/hwgfs.h>
19 typedef hwgfs_handle_t vertex_hdl_t;
21 /* Nice general name length that lots of people like to use */
23 #define MAXDEVNAME 256
28 * Possible return values from graph routines.
30 typedef enum graph_error_e {
31 GRAPH_SUCCESS, /* 0 */
33 GRAPH_NOT_FOUND, /* 2 */
34 GRAPH_BAD_PARAM, /* 3 */
35 GRAPH_HIT_LIMIT, /* 4 */
36 GRAPH_CANNOT_ALLOC, /* 5 */
37 GRAPH_ILLEGAL_REQUEST, /* 6 */
41 #define CNODEID_NONE ((cnodeid_t)-1)
43 #define GRAPH_VERTEX_NONE ((vertex_hdl_t)-1)
46 * Defines for individual WARs. Each is a bitmask of applicable
47 * part revision numbers. (1 << 1) == rev A, (1 << 2) == rev B,
48 * (3 << 1) == (rev A or rev B), etc
50 #define PV854697 (~0) /* PIC: write 64bit regs as 64bits. permanent */
51 #define PV854827 (~0UL) /* PIC: fake widget 0xf presence bit. permanent */
52 #define PV855271 (1 << 1) /* PIC: use virt chan iff 64-bit device. */
53 #define PV878674 (~0) /* PIC: Dont allow 64bit PIOs. permanent */
54 #define PV855272 (1 << 1) /* PIC: runaway interrupt WAR */
55 #define PV856155 (1 << 1) /* PIC: arbitration WAR */
56 #define PV856864 (1 << 1) /* PIC: lower timeout to free TNUMs quicker */
57 #define PV856866 (1 << 1) /* PIC: avoid rrb's 0/1/8/9. */
58 #define PV862253 (1 << 1) /* PIC: don't enable write req RAM parity checking */
59 #define PV867308 (3 << 1) /* PIC: make LLP error interrupts FATAL for PIC */
62 * No code is complete without an Assertion macro
65 #if defined(DISABLE_ASSERT)
67 #define ASSERT_ALWAYS(expr)
69 #define ASSERT(expr) do { \
71 printk( "Assertion [%s] failed! %s:%s(line=%d)\n",\
72 #expr,__FILE__,__FUNCTION__,__LINE__); \
73 panic("Assertion panic\n"); \
76 #define ASSERT_ALWAYS(expr) do {\
78 printk( "Assertion [%s] failed! %s:%s(line=%d)\n",\
79 #expr,__FILE__,__FUNCTION__,__LINE__); \
80 panic("Assertion always panic\n"); \
82 #endif /* DISABLE_ASSERT */
84 #endif /* _ASM_IA64_SN_SGI_H */