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-2001 Silicon Graphics, Inc. All rights reserved.
8 */
9
10
11#ifndef _ASM_IA64_SN_HACK_H
12#define _ASM_IA64_SN_HACK_H
13
14#include <asm/sn/types.h>
15#include <asm/uaccess.h>		/* for copy_??_user */
16
17/******************************************
18 * Definitions that do not exist in linux *
19 ******************************************/
20
21typedef int cred_t;	/* This is for compilation reasons */
22struct cred { int x; };
23
24
25#define mrlock(_s, _t, _u)
26#define mrunlock(_s)
27
28/*
29 * Hardware Graph routines that are currently stubbed!
30 */
31#include <linux/devfs_fs_kernel.h>
32
33#define DELAY(a)
34
35/************************************************
36 * Routines redefined to use linux equivalents. *
37 ************************************************/
38
39
40#define FIXME(s)
41
42extern devfs_handle_t dummy_vrtx;
43#define cpuid_to_vertex(cpuid) dummy_vrtx /* (pdaindr[cpuid].pda->p_vertex) */
44
45#define PUTBUF_LOCK(a) { FIXME("PUTBUF_LOCK"); }
46#define PUTBUF_UNLOCK(a) { FIXME("PUTBUF_UNLOCK"); }
47
48typedef int (*splfunc_t)(void);
49
50/* move to stubs.c yet */
51#define dev_to_vhdl(dev) 0
52#define get_timestamp() 0
53#define us_delay(a)
54#define v_mapphys(a,b,c) 0    // printk("Fixme: v_mapphys - soft->base 0x%p\n", b);
55#define splhi()  0
56#define spl7	splhi()
57#define splx(s)
58
59extern void * snia_kmem_alloc_node(register size_t, register int, cnodeid_t);
60extern void * snia_kmem_zalloc(size_t, int);
61extern void * snia_kmem_zalloc_node(register size_t, register int, cnodeid_t );
62extern void * snia_kmem_zone_alloc(register zone_t *, int);
63extern zone_t * snia_kmem_zone_init(register int , char *);
64extern void snia_kmem_zone_free(register zone_t *, void *);
65extern int is_specified(char *);
66extern int cap_able(uint64_t);
67extern int compare_and_swap_ptr(void **, void *, void *);
68
69#endif /* _ASM_IA64_SN_HACK_H */
70