1 #ifndef _ASM_IA64_SN_ATE_UTILS_H
2 #define _ASM_IA64_SN_ATE_UTILS_H
4 /* $Id: ate_utils.h,v 1.1 2002/02/28 17:31:25 marcelo Exp $
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
10 * Copyright (C) 1992 - 1997, 2000-2002 Silicon Graphics, Inc. All rights reserved.
14 * struct map X[] .m_size .m_addr
15 * --- ------------ -----------
16 * [0] mapsize(X) unused
18 * [1] map lock * mapwant sv_t *
19 * map access wait for free map space
21 * mapstart(X)-> [2] # units unit number
26 #include <linux/types.h>
28 #define ulong_t uint64_t
32 unsigned long m_size; /* number of units available */
33 unsigned long m_addr; /* address of first available unit */
36 #define mapstart(X) &X[2] /* start of map array */
38 #define mapsize(X) X[0].m_size /* number of empty slots */
39 /* remaining in map array */
40 #define maplock(X) (((spinlock_t *) X[1].m_size))
42 #define mapout(X) ((sv_t *) X[1].m_addr)
45 extern ulong_t atealloc(struct map *, size_t);
46 extern struct map *atemapalloc(ulong_t);
47 extern void atefree(struct map *, size_t, ulong_t);
48 extern void atemapfree(struct map *);
50 #endif /* _ASM_IA64_SN_ATE_UTILS_H */