patch-2.4.22 linux-2.4.22/include/asm-ia64/sn/sgi.h
Next file: linux-2.4.22/include/asm-ia64/sn/simulator.h
Previous file: linux-2.4.22/include/asm-ia64/sn/rw_mmr.h
Back to the patch index
Back to the overall index
- Lines: 119
- Date:
2003-08-25 04:44:43.000000000 -0700
- Orig file:
linux-2.4.21/include/asm-ia64/sn/sgi.h
- Orig date:
2003-06-13 07:51:38.000000000 -0700
diff -urN linux-2.4.21/include/asm-ia64/sn/sgi.h linux-2.4.22/include/asm-ia64/sn/sgi.h
@@ -4,7 +4,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 2000-2002 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
@@ -17,14 +17,18 @@
#include <asm/uaccess.h> /* for copy_??_user */
#include <linux/mm.h>
#include <linux/devfs_fs_kernel.h>
+#ifdef CONFIG_HWGFS_FS
+#include <linux/fs.h>
+#include <asm/sn/hwgfs.h>
+typedef hwgfs_handle_t vertex_hdl_t;
+#else
+typedef devfs_handle_t vertex_hdl_t;
+#endif
typedef int64_t __psint_t; /* needed by klgraph.c */
typedef enum { B_FALSE, B_TRUE } boolean_t;
-#define ctob(x) ((uint64_t)(x)*NBPC)
-#define btoc(x) (((uint64_t)(x)+(NBPC-1))/NBPC)
-
/*
** Possible return values from graph routines.
@@ -50,28 +54,13 @@
typedef uint64_t vhandl_t;
-#ifndef NBPP
-#define NBPP 4096
-#endif
-
-#ifndef D_MP
-#define D_MP 1
-#endif
+#define NBPP PAGE_SIZE
+#define _PAGESZ PAGE_SIZE
#ifndef MAXDEVNAME
#define MAXDEVNAME 256
#endif
-#ifndef NBPC
-#define NBPC 0
-#endif
-
-#ifndef _PAGESZ
-#define _PAGESZ 4096
-#endif
-
-typedef uint64_t mrlock_t; /* needed by devsupport.c */
-
#define HUB_PIO_CONVEYOR 0x1
#define CNODEID_NONE ((cnodeid_t)-1)
#define XTALK_PCI_PART_NUM "030-1275-"
@@ -81,10 +70,6 @@
#define COPYIN(a, b, c) copy_from_user(b,a,c)
#define COPYOUT(a, b, c) copy_to_user(b,a,c)
-#define kvtophys(x) (alenaddr_t) (x)
-#define POFFMASK (NBPP - 1)
-#define poff(X) ((__psunsigned_t)(X) & POFFMASK)
-
#define BZERO(a,b) memset(a, 0, b)
#define kern_malloc(x) kmalloc(x, GFP_KERNEL)
@@ -141,12 +126,6 @@
#define PRINT_PANIC panic
-#ifdef CONFIG_SMP
-#define cpu_enabled(cpu) (test_bit(cpu, &cpu_online_map))
-#else
-#define cpu_enabled(cpu) (1)
-#endif
-
/* print_register() defs */
/*
@@ -172,6 +151,31 @@
extern void print_register(unsigned long long, struct reg_desc *);
-#include <asm/sn/hack.h> /* for now */
+/******************************************
+ * Definitions that do not exist in linux *
+ ******************************************/
+
+#define DELAY(a)
+
+/************************************************
+ * Routines redefined to use linux equivalents. *
+ ************************************************/
+
+/* #define FIXME(s) printk("FIXME: [ %s ] in %s at %s:%d\n", s, __FUNCTION__, __FILE__, __LINE__) */
+
+#define FIXME(s)
+
+/* move to stubs.c yet */
+#define dev_to_vhdl(dev) 0
+#define get_timestamp() 0
+#define us_delay(a)
+#define v_mapphys(a,b,c) 0 // printk("Fixme: v_mapphys - soft->base 0x%p\n", b);
+#define splhi() 0
+#define splx(s)
+
+extern void * snia_kmem_alloc_node(register size_t, register int, cnodeid_t);
+extern void * snia_kmem_zalloc(size_t, int);
+extern void * snia_kmem_zalloc_node(register size_t, register int, cnodeid_t );
+extern int is_specified(char *);
#endif /* _ASM_IA64_SN_SGI_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)