File: /usr/src/linux/include/asm-ia64/sn/hack.h

1     /*
2      *
3      * This file is subject to the terms and conditions of the GNU General Public
4      * License.  See the file "COPYING" in the main directory of this archive
5      * for more details.
6      *
7      * Copyright (C) 2000 Silicon Graphics, Inc.
8      * Copyright (C) 2000 by Jack Steiner (steiner@sgi.com)
9      */
10     
11     
12     #ifndef _ASM_SN_HACK_H
13     #define _ASM_SN_HACK_H
14     
15     #include <asm/sn/types.h>
16     #include <asm/uaccess.h>		/* for copy_??_user */
17     
18     /******************************************
19      * Definitions that do not exist in linux *
20      ******************************************/
21     
22     typedef int cred_t;	/* This is for compilation reasons */
23     struct cred { int x; };
24     
25     
26     #define mrlock(_s, _t, _u)
27     #define mrunlock(_s)
28     
29     /*
30      * Hardware Graph routines that are currently stubbed!
31      */
32     #include <linux/devfs_fs_kernel.h>
33     
34     #define DELAY(a)
35     #define cpuid() 0
36     
37     /************************************************
38      * Routines redefined to use linux equivalents. *
39      ************************************************/
40     
41     /* #define FIXME(s) printk("FIXME: [ %s ] in %s at %s:%d\n", s, __FUNCTION__, __FILE__, __LINE__) */
42     
43     #define FIXME(s)
44     
45     extern devfs_handle_t dummy_vrtx;
46     #define cpuid_to_vertex(cpuid) dummy_vrtx /* (pdaindr[cpuid].pda->p_vertex) */
47     
48     #define PUTBUF_LOCK(a) { FIXME("PUTBUF_LOCK"); }
49     #define PUTBUF_UNLOCK(a) { FIXME("PUTBUF_UNLOCK"); }
50     
51     typedef int (*splfunc_t)(void);
52     
53     /* move to stubs.c yet */
54     #define dev_to_vhdl(dev) 0
55     #define get_timestamp() 0
56     #define us_delay(a)
57     #define v_mapphys(a,b,c) 0    // printk("Fixme: v_mapphys - soft->base 0x%p\n", b);
58     #define splhi()  0
59     #define spl7	splhi()
60     #define splx(s)
61     
62     extern void * kmem_alloc_node(register size_t, register int, cnodeid_t);
63     extern void * kmem_zalloc(size_t, int);
64     extern void * kmem_zalloc_node(register size_t, register int, cnodeid_t );
65     extern void * kmem_zone_alloc(register zone_t *, int);
66     extern zone_t * kmem_zone_init(register int , char *);
67     extern void kmem_zone_free(register zone_t *, void *);
68     extern int is_specified(char *);
69     extern int cap_able(uint64_t);
70     extern int compare_and_swap_ptr(void **, void *, void *);
71     
72     #endif	/* _ASM_SN_HACK_H */
73