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

1     /* $Id$
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      * This file has definitions for the hub and snac interfaces.
8      *
9      * Copyright (C) 1992 - 1997, 1999 Silcon Graphics, Inc.
10      * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
11      */
12     #ifndef _ASM_SGI_SN_AGENT_H
13     #define _ASM_SGI_SN_AGENT_H
14     
15     #include <linux/config.h>
16     
17     #include <asm/sn/addrs.h>
18     #include <asm/sn/arch.h>
19     //#include <asm/sn/io.h>
20     
21     #if defined(CONFIG_SGI_IP35) || defined(CONFIG_IA64_SGI_SN1) || defined(CONFIG_IA64_GENERIC)
22     #include <asm/sn/sn1/bedrock.h>
23     #endif	/* CONFIG_SGI_IP35 */
24     
25     /*
26      * NIC register macros
27      */
28     
29     #if defined(CONFIG_SGI_IP35) || defined(CONFIG_IA64_SGI_SN1) || defined(CONFIG_IA64_GENERIC)
30     #define HUB_NIC_ADDR(_cpuid) 						   \
31     	REMOTE_HUB_ADDR(COMPACT_TO_NASID_NODEID(cputocnode(_cpuid)),       \
32     		LB_MICROLAN_CTL)
33     #endif
34     
35     #define SET_HUB_NIC(_my_cpuid, _val) 				  	   \
36     	(HUB_S(HUB_NIC_ADDR(_my_cpuid), (_val)))
37     
38     #define SET_MY_HUB_NIC(_v) 					           \
39     	SET_HUB_NIC(cpuid(), (_v))
40     
41     #define GET_HUB_NIC(_my_cpuid) 						   \
42     	(HUB_L(HUB_NIC_ADDR(_my_cpuid)))
43     
44     #define GET_MY_HUB_NIC() 						   \
45     	GET_HUB_NIC(cpuid())
46     
47     #endif /* _ASM_SGI_SN_AGENT_H */
48