File: /usr/src/linux/arch/ia64/sn/io/stubs.c

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      * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc.
8      * Copyright (C) 2000 by Colin Ngam
9      */
10     
11     #include <linux/types.h>
12     #include <linux/ctype.h>
13     #include <linux/mm.h>
14     #include <linux/slab.h>
15     #include <asm/sn/sgi.h>
16     #include <asm/sn/invent.h>
17     #include <asm/sn/hcl.h>
18     #include <asm/sn/labelcl.h>
19     #include <asm/sn/pci/bridge.h>
20     #include <asm/sn/ioerror_handling.h>
21     #include <asm/sn/pci/pciio.h>
22     #include <asm/sn/slotnum.h>
23     #include <asm/sn/vector.h>
24     
25     /******
26      ****** hack defines ......
27      ******/
28     
29     int pcibr_prefetch_enable_rev, pcibr_wg_enable_rev;
30     int default_intr_pri;
31     int force_fire_and_forget;
32     int ignore_conveyor_override;
33     
34     devfs_handle_t dummy_vrtx;	/* Needed for cpuid_to_vertex() in hack.h */
35     
36     
37     /* ARGSUSED */
38     void hub_widgetdev_enable(devfs_handle_t xconn_vhdl, int devnum)
39             {FIXME("hub_widgetdev_enable");}
40     
41     /* ARGSUSED */
42     void hub_widgetdev_shutdown(devfs_handle_t xconn_vhdl, int devnum)
43             {FIXME("hub_widgetdev_shutdown");}
44     
45     /* ARGSUSED */
46     void hub_widget_reset(devfs_handle_t hubv, xwidgetnum_t widget)
47             {FIXME("hub_widget_reset");}
48     
49     boolean_t
50     is_sys_critical_vertex(devfs_handle_t x)
51     {
52     	FIXME("is_sys_critical_vertex : returns 0");
53     	return(0);
54     }
55     
56     char *
57     nic_bridge_vertex_info(devfs_handle_t v, nic_data_t mcr)
58     {
59     	FIXME("nic_bridge_vertex_info : returns NULL");
60     	return((char *)0);
61     }
62     
63     void *
64     kmem_alloc_node(register size_t size, register int flags, cnodeid_t node)
65     {
66             /* Allocates on node 'node' */
67     	FIXME("kmem_alloc_node : use kmalloc");
68     	return(kmalloc(size, GFP_KERNEL));
69     }
70     
71     void *
72     kmem_zalloc_node(register size_t size, register int flags, cnodeid_t node)
73     {
74     	FIXME("kmem_zalloc_node : use kmalloc");
75     	return(kmalloc(size, GFP_KERNEL));
76     }
77     
78     void
79     kmem_free(void *where, int size)
80     {
81     	FIXME("kmem_free : use kfree");
82     	return(kfree(where));
83     }
84     
85     
86     void *
87     kmem_zone_alloc(register zone_t *zone, int flags)
88     {
89     	FIXME("kmem_zone_alloc : return null");
90     	return((void *)0);
91     }
92     
93     void
94     kmem_zone_free(register zone_t *zone, void *ptr)
95     {
96     	FIXME("kmem_zone_free : no-op");
97     }
98     
99     zone_t *
100     kmem_zone_init(register int size, char *zone_name)
101     {
102     	FIXME("kmem_zone_free : returns NULL");
103     	return((zone_t *)0);
104     }
105     
106     int
107     compare_and_swap_ptr(void **location, void *old_ptr, void *new_ptr)
108     {
109     	FIXME("compare_and_swap_ptr : NOT ATOMIC");
110     	if (*location == old_ptr) {
111     		*location = new_ptr;
112     		return(1);
113     	}
114     	else
115     		return(0);
116     }
117     
118     void *
119     swap_ptr(void **loc, void *new)
120     {
121     	FIXME("swap_ptr : returns null");
122     	return((void *)0);
123     }
124     
125     /* For ml/SN/SN1/slots.c */
126     /* ARGSUSED */
127     slotid_t get_widget_slotnum(int xbow, int widget)
128             {FIXME("get_widget_slotnum"); return (unsigned char)NULL;}
129     
130     /* For router */
131     int
132     router_init(cnodeid_t cnode,int writeid, void *npda_rip)
133             {FIXME("router_init"); return(0);}
134     
135     /* From io/ioerror_handling.c */
136     error_return_code_t
137     sys_critical_graph_vertex_add(devfs_handle_t parent, devfs_handle_t child)
138     	{FIXME("sys_critical_graph_vertex_add"); return(0);}
139     
140     /* From io/ioc3.c */
141     devfs_handle_t
142     ioc3_console_vhdl_get(void)
143     	{FIXME("ioc3_console_vhdl_get"); return( (devfs_handle_t)-1);}
144     
145     void
146     nic_vmc_check(devfs_handle_t vhdl, char *nicinfo)
147     {
148     
149     	FIXME("nic_vmc_check\n");
150     
151     }
152     
153     char *
154     nic_vertex_info_get(devfs_handle_t v)
155     {
156     
157     	FIXME("nic_vertex_info_get\n");
158     	return(NULL);
159     
160     }
161     
162     int
163     vector_read_node(net_vec_t dest, nasid_t nasid,
164                  int write_id, int address,
165                  uint64_t *value)
166     {
167     	FIXME("vector_read_node\n");
168     	return(0);
169     }
170     
171     int
172     vector_write_node(net_vec_t dest, nasid_t nasid,
173                   int write_id, int address,
174                   uint64_t value)
175     {
176     	FIXME("vector_write_node\n");
177     	return(0);
178     }
179