patch-2.4.23 linux-2.4.23/include/asm-ia64/sn/sgi.h
Next file: linux-2.4.23/include/asm-ia64/sn/simulator.h
Previous file: linux-2.4.23/include/asm-ia64/sn/serialio.h
Back to the patch index
Back to the overall index
- Lines: 183
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/include/asm-ia64/sn/sgi.h
- Orig date:
2003-08-25 04:44:43.000000000 -0700
diff -urN linux-2.4.22/include/asm-ia64/sn/sgi.h linux-2.4.23/include/asm-ia64/sn/sgi.h
@@ -7,14 +7,16 @@
* Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
+/*
+ * This file is a bit of a dumping ground. A lot of things that don't really
+ * have a home, but which make life easier, end up here.
+ */
#ifndef _ASM_IA64_SN_SGI_H
#define _ASM_IA64_SN_SGI_H
#include <linux/config.h>
-
#include <asm/sn/types.h>
-#include <asm/uaccess.h> /* for copy_??_user */
#include <linux/mm.h>
#include <linux/devfs_fs_kernel.h>
#ifdef CONFIG_HWGFS_FS
@@ -25,14 +27,15 @@
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;
+/* Nice general name length that lots of people like to use */
+#ifndef MAXDEVNAME
+#define MAXDEVNAME 256
+#endif
/*
-** Possible return values from graph routines.
-*/
+ * Possible return values from graph routines.
+ */
typedef enum graph_error_e {
GRAPH_SUCCESS, /* 0 */
GRAPH_DUP, /* 1 */
@@ -44,87 +47,9 @@
GRAPH_IN_USE /* 7 */
} graph_error_t;
-#define KM_SLEEP 0x0000
-#define KM_NOSLEEP 0x0001 /* needed by kmem_alloc_node(), kmem_zalloc()
- * calls */
-#define VM_NOSLEEP 0x0001 /* needed kmem_alloc_node(), kmem_zalloc_node
- * calls */
-#define XG_WIDGET_PART_NUM 0xC102 /* KONA/xt_regs.h XG_XT_PART_NUM_VALUE */
-
-typedef uint64_t vhandl_t;
-
-
-#define NBPP PAGE_SIZE
-#define _PAGESZ PAGE_SIZE
-
-#ifndef MAXDEVNAME
-#define MAXDEVNAME 256
-#endif
-
-#define HUB_PIO_CONVEYOR 0x1
#define CNODEID_NONE ((cnodeid_t)-1)
-#define XTALK_PCI_PART_NUM "030-1275-"
-#define kdebug 0
-
-
-#define COPYIN(a, b, c) copy_from_user(b,a,c)
-#define COPYOUT(a, b, c) copy_to_user(b,a,c)
-
-#define BZERO(a,b) memset(a, 0, b)
-
-#define kern_malloc(x) kmalloc(x, GFP_KERNEL)
-#define kern_free(x) kfree(x)
-
-typedef cpuid_t cpu_cookie_t;
#define CPU_NONE (-1)
-/*
- * mutext support mapping
- */
-
-#define mutex_spinlock_init(s) spin_lock_init(s)
-inline static unsigned long
-mutex_spinlock(spinlock_t *sem) {
- unsigned long flags = 0;
-// spin_lock_irqsave(sem, flags);
- spin_lock(sem);
- return(flags);
-}
-// #define mutex_spinunlock(s,t) spin_unlock_irqrestore(s,t)
-#define mutex_spinunlock(s,t) spin_unlock(s)
-
-
-#define mutex_t struct semaphore
-#define mutex_init(s) init_MUTEX(s)
-#define mutex_init_locked(s) init_MUTEX_LOCKED(s)
-#define mutex_lock(s) down(s)
-#define mutex_unlock(s) up(s)
-
-#define io_splock(s) mutex_spinlock(s)
-#define io_spunlock(s,t) spin_unlock(s)
-
-#define spin_lock_destroy(s)
-
-#if defined(DISABLE_ASSERT)
-#define ASSERT(expr)
-#define ASSERT_ALWAYS(expr)
-#else
-#define ASSERT(expr) do { \
- if(!(expr)) { \
- printk( "Assertion [%s] failed! %s:%s(line=%d)\n",\
- #expr,__FILE__,__FUNCTION__,__LINE__); \
- panic("Assertion panic\n"); \
- } } while(0)
-
-#define ASSERT_ALWAYS(expr) do {\
- if(!(expr)) { \
- printk( "Assertion [%s] failed! %s:%s(line=%d)\n",\
- #expr,__FILE__,__FUNCTION__,__LINE__); \
- panic("Assertion always panic\n"); \
- } } while(0)
-#endif /* DISABLE_ASSERT */
-
-#define PRINT_PANIC panic
/* print_register() defs */
@@ -151,31 +76,28 @@
extern void print_register(unsigned long long, struct reg_desc *);
-/******************************************
- * 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 *);
+
+/*
+ * No code is complete without an Assertion macro
+ */
+
+#if defined(DISABLE_ASSERT)
+#define ASSERT(expr)
+#define ASSERT_ALWAYS(expr)
+#else
+#define ASSERT(expr) do { \
+ if(!(expr)) { \
+ printk( "Assertion [%s] failed! %s:%s(line=%d)\n",\
+ #expr,__FILE__,__FUNCTION__,__LINE__); \
+ panic("Assertion panic\n"); \
+ } } while(0)
+
+#define ASSERT_ALWAYS(expr) do {\
+ if(!(expr)) { \
+ printk( "Assertion [%s] failed! %s:%s(line=%d)\n",\
+ #expr,__FILE__,__FUNCTION__,__LINE__); \
+ panic("Assertion always panic\n"); \
+ } } while(0)
+#endif /* DISABLE_ASSERT */
#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)