Commit a40fe5e4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sn: Delete invent.h

From: Pat Gefre <pfg@sgi.com>

Delete invent.h
Delete sgi_if.c
Cleaned up some of the NEW/DEL calls
parent 31168afe
...@@ -9,5 +9,5 @@ ...@@ -9,5 +9,5 @@
# Makefile for the sn io routines. # Makefile for the sn io routines.
# #
obj-y += sgi_if.o xswitch.o sgi_io_sim.o cdl.o \ obj-y += xswitch.o sgi_io_sim.o cdl.o \
io.o machvec/ drivers/ platform_init/ sn2/ hwgfs/ io.o machvec/ drivers/ platform_init/ sn2/ hwgfs/
...@@ -10,18 +10,15 @@ ...@@ -10,18 +10,15 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/pci/bridge.h> #include <asm/sn/pci/pic.h>
#include "asm/sn/ioerror_handling.h" #include "asm/sn/ioerror_handling.h"
#include <asm/sn/xtalk/xbow.h> #include <asm/sn/xtalk/xbow.h>
/* these get called directly in cdl_add_connpt in fops bypass hack */ /* these get called directly in cdl_add_connpt in fops bypass hack */
extern int pcibr_attach(vertex_hdl_t);
extern int xbow_attach(vertex_hdl_t); extern int xbow_attach(vertex_hdl_t);
extern int pic_attach(vertex_hdl_t); extern int pic_attach(vertex_hdl_t);
/* /*
* cdl: Connection and Driver List * cdl: Connection and Driver List
* *
...@@ -31,14 +28,12 @@ extern int pic_attach(vertex_hdl_t); ...@@ -31,14 +28,12 @@ extern int pic_attach(vertex_hdl_t);
* IO Infrastructure Drivers e.g. pcibr. * IO Infrastructure Drivers e.g. pcibr.
*/ */
#define MAX_SGI_IO_INFRA_DRVR 7 #define MAX_SGI_IO_INFRA_DRVR 5
static struct cdl sgi_infrastructure_drivers[MAX_SGI_IO_INFRA_DRVR] = static struct cdl sgi_infrastructure_drivers[MAX_SGI_IO_INFRA_DRVR] =
{ {
{ XBRIDGE_WIDGET_PART_NUM, XBRIDGE_WIDGET_MFGR_NUM, pcibr_attach /* &pcibr_fops */}, { PIC_WIDGET_PART_NUM_BUS0, PIC_WIDGET_MFGR_NUM, pic_attach /* &pcibr_fops */},
{ BRIDGE_WIDGET_PART_NUM, BRIDGE_WIDGET_MFGR_NUM, pcibr_attach /* &pcibr_fops */}, { PIC_WIDGET_PART_NUM_BUS1, PIC_WIDGET_MFGR_NUM, pic_attach /* &pcibr_fops */},
{ PIC_WIDGET_PART_NUM_BUS0, PIC_WIDGET_MFGR_NUM, pic_attach /* &pic_fops */},
{ PIC_WIDGET_PART_NUM_BUS1, PIC_WIDGET_MFGR_NUM, pic_attach /* &pic_fops */},
{ XXBOW_WIDGET_PART_NUM, XXBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */}, { XXBOW_WIDGET_PART_NUM, XXBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */},
{ XBOW_WIDGET_PART_NUM, XBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */}, { XBOW_WIDGET_PART_NUM, XBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */},
{ PXBOW_WIDGET_PART_NUM, XXBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */}, { PXBOW_WIDGET_PART_NUM, XXBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */},
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/sn_sal.h> #include <asm/sn/sn_sal.h>
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/hwgfs.h> #include <asm/sn/hwgfs.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
#include <asm/sn/intr.h> #include <asm/sn/intr.h>
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
#include <asm/sn/pci/pciio.h> #include <asm/sn/pci/pciio.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
#include <asm/sn/intr.h> #include <asm/sn/intr.h>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/pci/pcibr.h> #include <asm/sn/pci/pcibr.h>
#include <asm/sn/pci/pcibr_private.h> #include <asm/sn/pci/pcibr_private.h>
......
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
#include <linux/types.h>
#include <linux/ctype.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <asm/sn/sgi.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h>
#include <asm/sn/pci/bridge.h>
#include <asm/sn/ioerror_handling.h>
#include <asm/sn/pci/pciio.h>
#include <asm/sn/slotnum.h>
void *
snia_kmem_zalloc(size_t size, int flag)
{
void *ptr = kmalloc(size, GFP_KERNEL);
if ( ptr )
BZERO(ptr, size);
return(ptr);
}
void
snia_kmem_free(void *ptr, size_t size)
{
kfree(ptr);
}
/*
* the alloc/free_node routines do a simple kmalloc for now ..
*/
void *
snia_kmem_alloc_node(register size_t size, register int flags, cnodeid_t node)
{
/* someday will Allocate on node 'node' */
return(kmalloc(size, GFP_KERNEL));
}
void *
snia_kmem_zalloc_node(register size_t size, register int flags, cnodeid_t node)
{
void *ptr = kmalloc(size, GFP_KERNEL);
if ( ptr )
BZERO(ptr, size);
return(ptr);
}
/*
* print_register() allows formatted printing of bit fields. individual
* bit fields are described by a struct reg_desc, multiple bit fields within
* a single word can be described by multiple reg_desc structures.
* %r outputs a string of the format "<bit field descriptions>"
* %R outputs a string of the format "0x%x<bit field descriptions>"
*
* The fields in a reg_desc are:
* unsigned long long rd_mask; An appropriate mask to isolate the bit field
* within a word, and'ed with val
*
* int rd_shift; A shift amount to be done to the isolated
* bit field. done before printing the isolate
* bit field with rd_format and before searching
* for symbolic value names in rd_values
*
* char *rd_name; If non-null, a bit field name to label any
* out from rd_format or searching rd_values.
* if neither rd_format or rd_values is non-null
* rd_name is printed only if the isolated
* bit field is non-null.
*
* char *rd_format; If non-null, the shifted bit field value
* is printed using this format.
*
* struct reg_values *rd_values; If non-null, a pointer to a table
* matching numeric values with symbolic names.
* rd_values are searched and the symbolic
* value is printed if a match is found, if no
* match is found "???" is printed.
*
*/
void
print_register(unsigned long long reg, struct reg_desc *addr)
{
register struct reg_desc *rd;
register struct reg_values *rv;
unsigned long long field;
int any;
printk("<");
any = 0;
for (rd = addr; rd->rd_mask; rd++) {
field = reg & rd->rd_mask;
field = (rd->rd_shift > 0) ? field << rd->rd_shift : field >> -rd->rd_shift;
if (any && (rd->rd_format || rd->rd_values || (rd->rd_name && field)))
printk(",");
if (rd->rd_name) {
if (rd->rd_format || rd->rd_values || field) {
printk("%s", rd->rd_name);
any = 1;
}
if (rd->rd_format || rd->rd_values) {
printk("=");
any = 1;
}
}
/* You can have any format so long as it is %x */
if (rd->rd_format) {
printk("%llx", field);
any = 1;
if (rd->rd_values)
printk(":");
}
if (rd->rd_values) {
any = 1;
for (rv = rd->rd_values; rv->rv_name; rv++) {
if (field == rv->rv_value) {
printk("%s", rv->rv_name);
break;
}
}
if (rv->rv_name == NULL)
printk("???");
}
}
printk(">\n");
}
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <asm/sn/types.h> #include <asm/sn/types.h>
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/sn_cpuid.h> #include <asm/sn/sn_cpuid.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/klconfig.h> #include <asm/sn/klconfig.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <asm/sn/sn_sal.h> #include <asm/sn/sn_sal.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/kldir.h> #include <asm/sn/kldir.h>
...@@ -43,165 +42,6 @@ extern u64 klgraph_addr[]; ...@@ -43,165 +42,6 @@ extern u64 klgraph_addr[];
void mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid); void mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid);
/*
* Support for verbose inventory via hardware graph.
* klhwg_invent_alloc allocates the necessary size of inventory information
* and fills in the generic information.
*/
invent_generic_t *
klhwg_invent_alloc(cnodeid_t cnode, int class, int size)
{
invent_generic_t *invent;
invent = kern_malloc(size);
if (!invent) return NULL;
invent->ig_module = NODE_MODULEID(cnode);
invent->ig_slot = SLOTNUM_GETSLOT(NODE_SLOTID(cnode));
invent->ig_invclass = class;
return invent;
}
/*
* Add detailed disabled cpu inventory info to the hardware graph.
*/
void
klhwg_disabled_cpu_invent_info(vertex_hdl_t cpuv,
cnodeid_t cnode,
klcpu_t *cpu, slotid_t slot)
{
invent_cpuinfo_t *cpu_invent;
diag_inv_t *diag_invent;
cpu_invent = (invent_cpuinfo_t *)
klhwg_invent_alloc(cnode, INV_PROCESSOR, sizeof(invent_cpuinfo_t));
if (!cpu_invent)
return;
/* Diag information on this processor */
diag_invent = (diag_inv_t *)
klhwg_invent_alloc(cnode, INV_CPUDIAGVAL, sizeof(diag_inv_t));
if (!diag_invent)
return;
/* Disabled CPU */
cpu_invent->ic_gen.ig_flag = 0x0;
cpu_invent->ic_gen.ig_slot = slot;
cpu_invent->ic_cpu_info.cpuflavor = cpu->cpu_prid;
cpu_invent->ic_cpu_info.cpufq = cpu->cpu_speed;
cpu_invent->ic_cpu_info.sdfreq = cpu->cpu_scachespeed;
cpu_invent->ic_cpu_info.sdsize = cpu->cpu_scachesz;
cpu_invent->ic_cpuid = cpu->cpu_info.virtid;
cpu_invent->ic_slice = cpu->cpu_info.physid;
/* Disabled CPU label */
hwgraph_info_add_LBL(cpuv, INFO_LBL_DETAIL_INVENT,
(arbitrary_info_t) cpu_invent);
hwgraph_info_export_LBL(cpuv, INFO_LBL_DETAIL_INVENT,
sizeof(invent_cpuinfo_t));
/* Diagval label - stores reason for disable +{virt,phys}id +diagval*/
hwgraph_info_add_LBL(cpuv, INFO_LBL_DIAGVAL,
(arbitrary_info_t) diag_invent);
hwgraph_info_export_LBL(cpuv, INFO_LBL_DIAGVAL,
sizeof(diag_inv_t));
}
/*
* Add detailed cpu inventory info to the hardware graph.
*/
void
klhwg_cpu_invent_info(vertex_hdl_t cpuv,
cnodeid_t cnode,
klcpu_t *cpu)
{
invent_cpuinfo_t *cpu_invent;
cpu_invent = (invent_cpuinfo_t *)
klhwg_invent_alloc(cnode, INV_PROCESSOR, sizeof(invent_cpuinfo_t));
if (!cpu_invent)
return;
if (KLCONFIG_INFO_ENABLED((klinfo_t *)cpu))
cpu_invent->ic_gen.ig_flag = INVENT_ENABLED;
else
cpu_invent->ic_gen.ig_flag = 0x0;
cpu_invent->ic_cpu_info.cpuflavor = cpu->cpu_prid;
cpu_invent->ic_cpu_info.cpufq = cpu->cpu_speed;
cpu_invent->ic_cpu_info.sdfreq = cpu->cpu_scachespeed;
cpu_invent->ic_cpu_info.sdsize = cpu->cpu_scachesz;
cpu_invent->ic_cpuid = cpu->cpu_info.virtid;
cpu_invent->ic_slice = cpu_physical_id_to_slice(cpu->cpu_info.virtid);
hwgraph_info_add_LBL(cpuv, INFO_LBL_DETAIL_INVENT,
(arbitrary_info_t) cpu_invent);
hwgraph_info_export_LBL(cpuv, INFO_LBL_DETAIL_INVENT,
sizeof(invent_cpuinfo_t));
}
/*
* Add information about the baseio prom version number
* as a part of detailed inventory info in the hwgraph.
*/
void
klhwg_baseio_inventory_add(vertex_hdl_t baseio_vhdl,cnodeid_t cnode)
{
invent_miscinfo_t *baseio_inventory;
unsigned char version = 0,revision = 0;
/* Allocate memory for the "detailed inventory" info
* for the baseio
*/
baseio_inventory = (invent_miscinfo_t *)
klhwg_invent_alloc(cnode, INV_PROM, sizeof(invent_miscinfo_t));
baseio_inventory->im_type = INV_IO6PROM;
/* Store the revision info in the inventory */
baseio_inventory->im_version = version;
baseio_inventory->im_rev = revision;
/* Put the inventory info in the hardware graph */
hwgraph_info_add_LBL(baseio_vhdl, INFO_LBL_DETAIL_INVENT,
(arbitrary_info_t) baseio_inventory);
/* Make the information available to the user programs
* thru hwgfs.
*/
hwgraph_info_export_LBL(baseio_vhdl, INFO_LBL_DETAIL_INVENT,
sizeof(invent_miscinfo_t));
}
/*
* Add detailed cpu inventory info to the hardware graph.
*/
void
klhwg_hub_invent_info(vertex_hdl_t hubv,
cnodeid_t cnode,
klhub_t *hub)
{
invent_miscinfo_t *hub_invent;
hub_invent = (invent_miscinfo_t *)
klhwg_invent_alloc(cnode, INV_MISC, sizeof(invent_miscinfo_t));
if (!hub_invent)
return;
if (KLCONFIG_INFO_ENABLED((klinfo_t *)hub))
hub_invent->im_gen.ig_flag = INVENT_ENABLED;
hub_invent->im_type = INV_HUB;
hub_invent->im_rev = hub->hub_info.revision;
hub_invent->im_speed = hub->hub_speed;
hwgraph_info_add_LBL(hubv, INFO_LBL_DETAIL_INVENT,
(arbitrary_info_t) hub_invent);
hwgraph_info_export_LBL(hubv, INFO_LBL_DETAIL_INVENT,
sizeof(invent_miscinfo_t));
}
/* ARGSUSED */ /* ARGSUSED */
void void
klhwg_add_hub(vertex_hdl_t node_vertex, klhub_t *hub, cnodeid_t cnode) klhwg_add_hub(vertex_hdl_t node_vertex, klhub_t *hub, cnodeid_t cnode)
...@@ -238,8 +78,6 @@ klhwg_add_disabled_cpu(vertex_hdl_t node_vertex, cnodeid_t cnode, klcpu_t *cpu, ...@@ -238,8 +78,6 @@ klhwg_add_disabled_cpu(vertex_hdl_t node_vertex, cnodeid_t cnode, klcpu_t *cpu,
mark_cpuvertex_as_cpu(my_cpu, cpu_id); mark_cpuvertex_as_cpu(my_cpu, cpu_id);
device_master_set(my_cpu, node_vertex); device_master_set(my_cpu, node_vertex);
klhwg_disabled_cpu_invent_info(my_cpu, cnode, cpu, slot);
return; return;
} }
} }
...@@ -271,8 +109,6 @@ klhwg_add_cpu(vertex_hdl_t node_vertex, cnodeid_t cnode, klcpu_t *cpu) ...@@ -271,8 +109,6 @@ klhwg_add_cpu(vertex_hdl_t node_vertex, cnodeid_t cnode, klcpu_t *cpu)
sprintf(name, "%c", 'a' + cpu->cpu_info.physid); sprintf(name, "%c", 'a' + cpu->cpu_info.physid);
(void) hwgraph_edge_add(cpu_dir, my_cpu, name); (void) hwgraph_edge_add(cpu_dir, my_cpu, name);
} }
klhwg_cpu_invent_info(my_cpu, cnode, cpu);
} }
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/sn_cpuid.h> #include <asm/sn/sn_cpuid.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
...@@ -58,12 +57,15 @@ xswitch_vertex_init(vertex_hdl_t xswitch) ...@@ -58,12 +57,15 @@ xswitch_vertex_init(vertex_hdl_t xswitch)
{ {
xswitch_vol_t xvolinfo; xswitch_vol_t xvolinfo;
int rc; int rc;
extern void * snia_kmem_zalloc(size_t size, int flag);
xvolinfo = snia_kmem_zalloc(sizeof(struct xswitch_vol_s), GFP_KERNEL); xvolinfo = kmalloc(sizeof(struct xswitch_vol_s), GFP_KERNEL);
mutex_init(&xvolinfo->xswitch_volunteer_mutex); if (xvolinfo <= 0 ) {
rc = hwgraph_info_add_LBL(xswitch, printk("xswitch_vertex_init: out of memory\n");
INFO_LBL_XSWITCH_VOL, return;
}
memset(xvolinfo, 0, sizeof(struct xswitch_vol_s));
init_MUTEX(&xvolinfo->xswitch_volunteer_mutex);
rc = hwgraph_info_add_LBL(xswitch, INFO_LBL_XSWITCH_VOL,
(arbitrary_info_t)xvolinfo); (arbitrary_info_t)xvolinfo);
ASSERT(rc == GRAPH_SUCCESS); rc = rc; ASSERT(rc == GRAPH_SUCCESS); rc = rc;
} }
...@@ -83,7 +85,8 @@ xswitch_volunteer_delete(vertex_hdl_t xswitch) ...@@ -83,7 +85,8 @@ xswitch_volunteer_delete(vertex_hdl_t xswitch)
rc = hwgraph_info_remove_LBL(xswitch, rc = hwgraph_info_remove_LBL(xswitch,
INFO_LBL_XSWITCH_VOL, INFO_LBL_XSWITCH_VOL,
(arbitrary_info_t *)&xvolinfo); (arbitrary_info_t *)&xvolinfo);
snia_kmem_free(xvolinfo, sizeof(struct xswitch_vol_s)); if (xvolinfo > 0)
kfree(xvolinfo);
} }
/* /*
* A Crosstalk master volunteers to manage xwidgets on the specified xswitch. * A Crosstalk master volunteers to manage xwidgets on the specified xswitch.
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/sn_sal.h> #include <asm/sn/sn_sal.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xbow.h> #include <asm/sn/xtalk/xbow.h>
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
......
/* /*
*
* This file is subject to the terms and conditions of the GNU General Public * This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
...@@ -19,7 +18,6 @@ ...@@ -19,7 +18,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/klconfig.h> #include <asm/sn/klconfig.h>
...@@ -662,7 +660,12 @@ pcibr_device_info_new( ...@@ -662,7 +660,12 @@ pcibr_device_info_new(
* passed into us, into its external representation. See comment * passed into us, into its external representation. See comment
* for the PCIBR_DEVICE_TO_SLOT macro for more information. * for the PCIBR_DEVICE_TO_SLOT macro for more information.
*/ */
NEW(pcibr_info); pcibr_info = kmalloc(sizeof (*(pcibr_info)), GFP_KERNEL);
if ( !pcibr_info ) {
return NULL;
}
memset(pcibr_info, 0, sizeof (*(pcibr_info)));
pciio_device_info_new(&pcibr_info->f_c, pcibr_soft->bs_vhdl, pciio_device_info_new(&pcibr_info->f_c, pcibr_soft->bs_vhdl,
PCIBR_DEVICE_TO_SLOT(pcibr_soft, slot), PCIBR_DEVICE_TO_SLOT(pcibr_soft, slot),
rfunc, vendor, device); rfunc, vendor, device);
...@@ -1025,10 +1028,13 @@ pcibr_attach2(vertex_hdl_t xconn_vhdl, bridge_t *bridge, ...@@ -1025,10 +1028,13 @@ pcibr_attach2(vertex_hdl_t xconn_vhdl, bridge_t *bridge,
* allocate soft state structure, fill in some * allocate soft state structure, fill in some
* fields, and hook it up to our vertex. * fields, and hook it up to our vertex.
*/ */
NEW(pcibr_soft); pcibr_soft = kmalloc(sizeof(*(pcibr_soft)), GFP_KERNEL);
if (ret_softp) if (ret_softp)
*ret_softp = pcibr_soft; *ret_softp = pcibr_soft;
BZERO(pcibr_soft, sizeof *pcibr_soft); if (!pcibr_soft)
return -1;
memset(pcibr_soft, 0, sizeof *pcibr_soft);
pcibr_soft_set(pcibr_vhdl, pcibr_soft); pcibr_soft_set(pcibr_vhdl, pcibr_soft);
pcibr_soft->bs_conn = xconn_vhdl; pcibr_soft->bs_conn = xconn_vhdl;
pcibr_soft->bs_vhdl = pcibr_vhdl; pcibr_soft->bs_vhdl = pcibr_vhdl;
...@@ -1094,7 +1100,10 @@ pcibr_attach2(vertex_hdl_t xconn_vhdl, bridge_t *bridge, ...@@ -1094,7 +1100,10 @@ pcibr_attach2(vertex_hdl_t xconn_vhdl, bridge_t *bridge,
{ {
pcibr_list_p self; pcibr_list_p self;
NEW(self); self = kmalloc(sizeof(*(self)), GFP_KERNEL);
if (!self)
return -1;
memset(self, 0, sizeof(*(self)));
self->bl_soft = pcibr_soft; self->bl_soft = pcibr_soft;
self->bl_vhdl = pcibr_vhdl; self->bl_vhdl = pcibr_vhdl;
self->bl_next = pcibr_list; self->bl_next = pcibr_list;
...@@ -1910,7 +1919,8 @@ pcibr_detach(vertex_hdl_t xconn) ...@@ -1910,7 +1919,8 @@ pcibr_detach(vertex_hdl_t xconn)
/* Clear the software state maintained by the bridge driver for this /* Clear the software state maintained by the bridge driver for this
* bridge. * bridge.
*/ */
DEL(pcibr_soft); kfree(pcibr_soft);
/* Remove the Bridge revision labelled info */ /* Remove the Bridge revision labelled info */
(void)hwgraph_info_remove_LBL(pcibr_vhdl, INFO_LBL_PCIBR_ASIC_REV, NULL); (void)hwgraph_info_remove_LBL(pcibr_vhdl, INFO_LBL_PCIBR_ASIC_REV, NULL);
/* Remove the character device associated with this bridge */ /* Remove the character device associated with this bridge */
...@@ -2443,7 +2453,13 @@ pcibr_piomap_alloc(vertex_hdl_t pconn_vhdl, ...@@ -2443,7 +2453,13 @@ pcibr_piomap_alloc(vertex_hdl_t pconn_vhdl,
mapptr = NULL; mapptr = NULL;
else { else {
pcibr_unlock(pcibr_soft, s); pcibr_unlock(pcibr_soft, s);
NEW(pcibr_piomap); pcibr_piomap = kmalloc(sizeof (*(pcibr_piomap)), GFP_KERNEL);
if ( !pcibr_piomap ) {
PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_PIOMAP, pconn_vhdl,
"pcibr_piomap_alloc: malloc fails\n"));
return NULL;
}
memset(pcibr_piomap, 0, sizeof (*(pcibr_piomap)));
} }
pcibr_piomap->bp_dev = pconn_vhdl; pcibr_piomap->bp_dev = pconn_vhdl;
...@@ -2647,11 +2663,18 @@ pcibr_piospace_alloc(vertex_hdl_t pconn_vhdl, ...@@ -2647,11 +2663,18 @@ pcibr_piospace_alloc(vertex_hdl_t pconn_vhdl,
if (!start_addr) { if (!start_addr) {
pcibr_unlock(pcibr_soft, s); pcibr_unlock(pcibr_soft, s);
PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_PIOMAP, pconn_vhdl, PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_PIOMAP, pconn_vhdl,
"pcibr_piospace_alloc: request 0x%x to big\n", req_size)); "pcibr_piospace_alloc: request 0x%lx to big\n", req_size));
return 0; return 0;
} }
NEW(piosp); piosp = kmalloc(sizeof (*(piosp)), GFP_KERNEL);
if ( !piosp ) {
PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_PIOMAP, pconn_vhdl,
"pcibr_piospace_alloc: malloc fails\n"));
return 0;
}
memset(piosp, 0, sizeof (*(piosp)));
piosp->free = 0; piosp->free = 0;
piosp->space = space; piosp->space = space;
piosp->start = start_addr; piosp->start = start_addr;
...@@ -2906,9 +2929,12 @@ pcibr_dmamap_alloc(vertex_hdl_t pconn_vhdl, ...@@ -2906,9 +2929,12 @@ pcibr_dmamap_alloc(vertex_hdl_t pconn_vhdl,
PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_DMAMAP | PCIBR_DEBUG_DMADIR, pconn_vhdl, PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_DMAMAP | PCIBR_DEBUG_DMADIR, pconn_vhdl,
"pcibr_dmamap_alloc: unable to use direct64\n")); "pcibr_dmamap_alloc: unable to use direct64\n"));
/* PIC only supports 64-bit direct mapping in PCI-X mode. */ /* PIC in PCI-X mode only supports 64-bit direct mapping so
if (IS_PCIX(pcibr_soft)) { * don't fall thru and try 32-bit direct mapping or 32-bit
DEL(pcibr_dmamap); * page mapping
*/
if (IS_PIC_SOFT(pcibr_soft) && IS_PCIX(pcibr_soft)) {
kfree(pcibr_dmamap);
return 0; return 0;
} }
......
/* /*
*
* This file is subject to the terms and conditions of the GNU General Public * This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
...@@ -15,7 +14,6 @@ ...@@ -15,7 +14,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
...@@ -62,7 +60,29 @@ uint64_t bridge_errors_to_dump = BRIDGE_ISR_ERROR_FATAL | ...@@ -62,7 +60,29 @@ uint64_t bridge_errors_to_dump = BRIDGE_ISR_ERROR_FATAL |
int pcibr_llp_control_war_cnt; /* PCIBR_LLP_CONTROL_WAR */ int pcibr_llp_control_war_cnt; /* PCIBR_LLP_CONTROL_WAR */
static struct reg_values xio_cmd_pactyp[] = /*
* register values
* map between numeric values and symbolic values
*/
struct reg_values {
unsigned long long rv_value;
char *rv_name;
};
/*
* register descriptors are used for formatted prints of register values
* rd_mask and rd_shift must be defined, other entries may be null
*/
struct reg_desc {
unsigned long long rd_mask; /* mask to extract field */
int rd_shift; /* shift for extracted value, - >>, + << */
char *rd_name; /* field name */
char *rd_format; /* format to print field */
struct reg_values *rd_values; /* symbolic names of values */
};
/* Crosstalk Packet Types */
static struct reg_values xtalk_cmd_pactyp[] =
{ {
{0x0, "RdReq"}, {0x0, "RdReq"},
{0x1, "RdResp"}, {0x1, "RdResp"},
...@@ -83,11 +103,11 @@ static struct reg_values xio_cmd_pactyp[] = ...@@ -83,11 +103,11 @@ static struct reg_values xio_cmd_pactyp[] =
{0} {0}
}; };
static struct reg_desc xio_cmd_bits[] = static struct reg_desc xtalk_cmd_bits[] =
{ {
{WIDGET_DIDN, -28, "DIDN", "%x"}, {WIDGET_DIDN, -28, "DIDN", "%x"},
{WIDGET_SIDN, -24, "SIDN", "%x"}, {WIDGET_SIDN, -24, "SIDN", "%x"},
{WIDGET_PACTYP, -20, "PACTYP", 0, xio_cmd_pactyp}, {WIDGET_PACTYP, -20, "PACTYP", 0, xtalk_cmd_pactyp},
{WIDGET_TNUM, -15, "TNUM", "%x"}, {WIDGET_TNUM, -15, "TNUM", "%x"},
{WIDGET_COHERENT, 0, "COHERENT"}, {WIDGET_COHERENT, 0, "COHERENT"},
{WIDGET_DS, 0, "DS"}, {WIDGET_DS, 0, "DS"},
...@@ -147,13 +167,6 @@ static struct reg_desc device_bits[] = ...@@ -147,13 +167,6 @@ static struct reg_desc device_bits[] =
{0} {0}
}; };
static void
print_bridge_errcmd(uint32_t cmdword, char *errtype)
{
printk("\t Bridge %s Error Command Word Register ", errtype);
print_register(cmdword, xio_cmd_bits);
}
static char *pcibr_isr_errs[] = static char *pcibr_isr_errs[] =
{ {
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
...@@ -199,12 +212,93 @@ static char *pcibr_isr_errs[] = ...@@ -199,12 +212,93 @@ static char *pcibr_isr_errs[] =
"45: PCI-X split completion message parity error", "45: PCI-X split completion message parity error",
}; };
/*
* print_register() allows formatted printing of bit fields. individual
* bit fields are described by a struct reg_desc, multiple bit fields within
* a single word can be described by multiple reg_desc structures.
* %r outputs a string of the format "<bit field descriptions>"
* %R outputs a string of the format "0x%x<bit field descriptions>"
*
* The fields in a reg_desc are:
* unsigned long long rd_mask; An appropriate mask to isolate the bit field
* within a word, and'ed with val
*
* int rd_shift; A shift amount to be done to the isolated
* bit field. done before printing the isolate
* bit field with rd_format and before searching
* for symbolic value names in rd_values
*
* char *rd_name; If non-null, a bit field name to label any
* out from rd_format or searching rd_values.
* if neither rd_format or rd_values is non-null
* rd_name is printed only if the isolated
* bit field is non-null.
*
* char *rd_format; If non-null, the shifted bit field value
* is printed using this format.
*
* struct reg_values *rd_values; If non-null, a pointer to a table
* matching numeric values with symbolic names.
* rd_values are searched and the symbolic
* value is printed if a match is found, if no
* match is found "???" is printed.
*
*/
static void
print_register(unsigned long long reg, struct reg_desc *addr)
{
register struct reg_desc *rd;
register struct reg_values *rv;
unsigned long long field;
int any;
printk("<");
any = 0;
for (rd = addr; rd->rd_mask; rd++) {
field = reg & rd->rd_mask;
field = (rd->rd_shift > 0) ? field << rd->rd_shift : field >> -rd->rd_shift;
if (any && (rd->rd_format || rd->rd_values || (rd->rd_name && field)))
printk(",");
if (rd->rd_name) {
if (rd->rd_format || rd->rd_values || field) {
printk("%s", rd->rd_name);
any = 1;
}
if (rd->rd_format || rd->rd_values) {
printk("=");
any = 1;
}
}
/* You can have any format so long as it is %x */
if (rd->rd_format) {
printk("%llx", field);
any = 1;
if (rd->rd_values)
printk(":");
}
if (rd->rd_values) {
any = 1;
for (rv = rd->rd_values; rv->rv_name; rv++) {
if (field == rv->rv_value) {
printk("%s", rv->rv_name);
break;
}
}
if (rv->rv_name == NULL)
printk("???");
}
}
printk(">\n");
}
#define BEM_ADD_STR(s) printk("%s", (s)) #define BEM_ADD_STR(s) printk("%s", (s))
#define BEM_ADD_VAR(v) printk("\t%20s: 0x%llx\n", #v, ((unsigned long long)v)) #define BEM_ADD_VAR(v) printk("\t%20s: 0x%llx\n", #v, ((unsigned long long)v))
#define BEM_ADD_REG(r) printk("\t%20s: ", #r); print_register((r), r ## _desc) #define BEM_ADD_REG(r) printk("\t%20s: ", #r); print_register((r), r ## _desc)
#define BEM_ADD_NSPC(n,s) printk("\t%20s: ", n); print_register(s, space_desc) #define BEM_ADD_NSPC(n,s) printk("\t%20s: ", n); print_register(s, space_desc)
#define BEM_ADD_SPC(s) BEM_ADD_NSPC(#s, s) #define BEM_ADD_SPC(s) BEM_ADD_NSPC(#s, s)
/* /*
* display memory directory state * display memory directory state
*/ */
...@@ -225,6 +319,13 @@ pcibr_show_dir_state(paddr_t paddr, char *prefix) ...@@ -225,6 +319,13 @@ pcibr_show_dir_state(paddr_t paddr, char *prefix)
#endif #endif
} }
static void
print_bridge_errcmd(uint32_t cmdword, char *errtype)
{
printk("\t Bridge %s Error Command Word Register ", errtype);
print_register(cmdword, xtalk_cmd_bits);
}
/* /*
* Dump relevant error information for Bridge error interrupts. * Dump relevant error information for Bridge error interrupts.
......
/* /*
*
* This file is subject to the terms and conditions of the GNU General Public * This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
...@@ -15,7 +14,6 @@ ...@@ -15,7 +14,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
...@@ -48,7 +46,11 @@ pcibr_hints_get(vertex_hdl_t xconn_vhdl, int alloc) ...@@ -48,7 +46,11 @@ pcibr_hints_get(vertex_hdl_t xconn_vhdl, int alloc)
if (alloc && (rv != GRAPH_SUCCESS)) { if (alloc && (rv != GRAPH_SUCCESS)) {
NEW(hint); hint = kmalloc(sizeof (*(hint)), GFP_KERNEL);
if ( !hint )
goto abnormal_exit;
memset(hint, 0, sizeof (*(hint)));
hint->rrb_alloc_funct = NULL; hint->rrb_alloc_funct = NULL;
hint->ph_intr_bits = NULL; hint->ph_intr_bits = NULL;
rv = hwgraph_info_add_LBL(xconn_vhdl, rv = hwgraph_info_add_LBL(xconn_vhdl,
...@@ -68,10 +70,7 @@ pcibr_hints_get(vertex_hdl_t xconn_vhdl, int alloc) ...@@ -68,10 +70,7 @@ pcibr_hints_get(vertex_hdl_t xconn_vhdl, int alloc)
return (pcibr_hints_t) ainfo; return (pcibr_hints_t) ainfo;
abnormal_exit: abnormal_exit:
#ifdef LATER kfree(hint);
printf("SHOULD NOT BE HERE\n");
#endif
DEL(hint);
return(NULL); return(NULL);
} }
...@@ -162,18 +161,19 @@ pcibr_hints_subdevs(vertex_hdl_t xconn_vhdl, ...@@ -162,18 +161,19 @@ pcibr_hints_subdevs(vertex_hdl_t xconn_vhdl,
if (ainfo == 0) { if (ainfo == 0) {
uint64_t *subdevp; uint64_t *subdevp;
NEW(subdevp); subdevp = kmalloc(sizeof (*(subdevp)), GFP_KERNEL);
if (!subdevp) { if (!subdevp) {
PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_HINTS, xconn_vhdl, PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_HINTS, xconn_vhdl,
"pcibr_hints_subdevs: subdev ptr alloc failed\n")); "pcibr_hints_subdevs: subdev ptr alloc failed\n"));
return; return;
} }
memset(subdevp, 0, sizeof (*(subdevp)));
*subdevp = subdevs; *subdevp = subdevs;
hwgraph_info_add_LBL(pconn_vhdl, INFO_LBL_SUBDEVS, (arbitrary_info_t) subdevp); hwgraph_info_add_LBL(pconn_vhdl, INFO_LBL_SUBDEVS, (arbitrary_info_t) subdevp);
hwgraph_info_get_LBL(pconn_vhdl, INFO_LBL_SUBDEVS, &ainfo); hwgraph_info_get_LBL(pconn_vhdl, INFO_LBL_SUBDEVS, &ainfo);
if (ainfo == (arbitrary_info_t) subdevp) if (ainfo == (arbitrary_info_t) subdevp)
return; return;
DEL(subdevp); kfree(subdevp);
if (ainfo == (arbitrary_info_t) NULL) { if (ainfo == (arbitrary_info_t) NULL) {
PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_HINTS, xconn_vhdl, PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_HINTS, xconn_vhdl,
"pcibr_hints_subdevs: null subdevs ptr\n")); "pcibr_hints_subdevs: null subdevs ptr\n"));
......
/* /*
*
* This file is subject to the terms and conditions of the GNU General Public * This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
...@@ -15,7 +14,6 @@ ...@@ -15,7 +14,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
...@@ -33,7 +31,7 @@ ...@@ -33,7 +31,7 @@
inline int inline int
compare_and_swap_ptr(void **location, void *old_ptr, void *new_ptr) compare_and_swap_ptr(void **location, void *old_ptr, void *new_ptr)
{ {
FIXME("compare_and_swap_ptr : NOT ATOMIC"); /* FIXME - compare_and_swap_ptr NOT ATOMIC */
if (*location == old_ptr) { if (*location == old_ptr) {
*location = new_ptr; *location = new_ptr;
return(1); return(1);
...@@ -197,7 +195,7 @@ sn_dma_flush(unsigned long addr) { ...@@ -197,7 +195,7 @@ sn_dma_flush(unsigned long addr) {
if (flush_nasid_list[nasid].widget_p[wid_num] == NULL) return; if (flush_nasid_list[nasid].widget_p[wid_num] == NULL) return;
p = &flush_nasid_list[nasid].widget_p[wid_num][0]; p = &flush_nasid_list[nasid].widget_p[wid_num][0];
// find a matching BAR /* find a matching BAR */
for (i=0; i<DEV_PER_WIDGET;i++) { for (i=0; i<DEV_PER_WIDGET;i++) {
for (j=0; j<PCI_ROM_RESOURCE;j++) { for (j=0; j<PCI_ROM_RESOURCE;j++) {
...@@ -208,7 +206,7 @@ sn_dma_flush(unsigned long addr) { ...@@ -208,7 +206,7 @@ sn_dma_flush(unsigned long addr) {
p++; p++;
} }
// if no matching BAR, return without doing anything. /* if no matching BAR, return without doing anything. */
if (i == DEV_PER_WIDGET) return; if (i == DEV_PER_WIDGET) return;
...@@ -216,15 +214,15 @@ sn_dma_flush(unsigned long addr) { ...@@ -216,15 +214,15 @@ sn_dma_flush(unsigned long addr) {
p->flush_addr = 0; p->flush_addr = 0;
// force an interrupt. /* force an interrupt. */
*(bridgereg_t *)(p->force_int_addr) = 1; *(bridgereg_t *)(p->force_int_addr) = 1;
// wait for the interrupt to come back. /* wait for the interrupt to come back. */
while (p->flush_addr != 0x10f); while (p->flush_addr != 0x10f);
// okay, everything is synched up. /* okay, everything is synched up. */
spin_unlock_irqrestore(&p->flush_lock, flags); spin_unlock_irqrestore(&p->flush_lock, flags);
return; return;
...@@ -326,9 +324,10 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl, ...@@ -326,9 +324,10 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl,
lines & 4 ? " INTC" : "", lines & 4 ? " INTC" : "",
lines & 8 ? " INTD" : "")); lines & 8 ? " INTD" : ""));
NEW(pcibr_intr); pcibr_intr = kmalloc(sizeof (*(pcibr_intr)), GFP_KERNEL);
if (!pcibr_intr) if (!pcibr_intr)
return NULL; return NULL;
memset(pcibr_intr, 0, sizeof (*(pcibr_intr)));
pcibr_intr->bi_dev = pconn_vhdl; pcibr_intr->bi_dev = pconn_vhdl;
pcibr_intr->bi_lines = lines; pcibr_intr->bi_lines = lines;
...@@ -400,15 +399,9 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl, ...@@ -400,15 +399,9 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl,
* in xtalk_intr_p. * in xtalk_intr_p.
*/ */
if (!*xtalk_intr_p) { if (!*xtalk_intr_p) {
#ifdef SUPPORT_PRINTING_V_FORMAT printk(KERN_ALERT "pcibr_intr_alloc %s: "
printk(KERN_ALERT "unable to get xtalk interrupt resources",
"pcibr_intr_alloc %v: unable to get xtalk interrupt resources", pcibr_soft->bs_name);
xconn_vhdl);
#else
printk(KERN_ALERT
"pcibr_intr_alloc 0x%p: unable to get xtalk interrupt resources",
(void *)xconn_vhdl);
#endif
/* yes, we leak resources here. */ /* yes, we leak resources here. */
return 0; return 0;
} }
...@@ -450,7 +443,15 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl, ...@@ -450,7 +443,15 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl,
pcibr_intr->bi_ibits |= 1 << pcibr_int_bit; pcibr_intr->bi_ibits |= 1 << pcibr_int_bit;
NEW(intr_entry); intr_entry = kmalloc(sizeof (*(intr_entry)), GFP_KERNEL);
if ( !intr_entry ) {
printk(KERN_ALERT "pcibr_intr_alloc %s: "
"unable to get memory",
pcibr_soft->bs_name);
return 0;
}
memset(intr_entry, 0, sizeof (*(intr_entry)));
intr_entry->il_next = NULL; intr_entry->il_next = NULL;
intr_entry->il_intr = pcibr_intr; intr_entry->il_intr = pcibr_intr;
intr_entry->il_wrbf = &(bridge->b_wr_req_buf[pciio_slot].reg); intr_entry->il_wrbf = &(bridge->b_wr_req_buf[pciio_slot].reg);
...@@ -476,7 +477,7 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl, ...@@ -476,7 +477,7 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl,
* and we replaced it, so we * and we replaced it, so we
* don't need our intr_entry. * don't need our intr_entry.
*/ */
DEL(intr_entry); kfree(intr_entry);
PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_INTR_ALLOC, pconn_vhdl, PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_INTR_ALLOC, pconn_vhdl,
"INT 0x%x (bridge bit %d) replaces erased first\n", "INT 0x%x (bridge bit %d) replaces erased first\n",
pcibr_int_bits, pcibr_int_bit)); pcibr_int_bits, pcibr_int_bit));
...@@ -499,7 +500,7 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl, ...@@ -499,7 +500,7 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl,
* and we replaced it, so we * and we replaced it, so we
* don't need our intr_entry. * don't need our intr_entry.
*/ */
DEL(intr_entry); kfree(intr_entry);
PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_INTR_ALLOC, pconn_vhdl, PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_INTR_ALLOC, pconn_vhdl,
"INT 0x%x (bridge bit %d) replaces erase Nth\n", "INT 0x%x (bridge bit %d) replaces erase Nth\n",
...@@ -522,9 +523,6 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl, ...@@ -522,9 +523,6 @@ pcibr_intr_alloc(vertex_hdl_t pconn_vhdl,
} }
} }
#if DEBUG && INTR_DEBUG
printk("%v pcibr_intr_alloc complete\n", pconn_vhdl);
#endif
hub_intr = (hub_intr_t)xtalk_intr; hub_intr = (hub_intr_t)xtalk_intr;
pcibr_intr->bi_irq = hub_intr->i_bit; pcibr_intr->bi_irq = hub_intr->i_bit;
pcibr_intr->bi_cpu = hub_intr->i_cpuid; pcibr_intr->bi_cpu = hub_intr->i_cpuid;
...@@ -582,7 +580,7 @@ pcibr_intr_free(pcibr_intr_t pcibr_intr) ...@@ -582,7 +580,7 @@ pcibr_intr_free(pcibr_intr_t pcibr_intr)
} }
} }
} }
DEL(pcibr_intr); kfree(pcibr_intr);
} }
void void
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
......
/* /*
*
* This file is subject to the terms and conditions of the GNU General Public * This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
...@@ -16,7 +15,6 @@ ...@@ -16,7 +15,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
...@@ -319,9 +317,8 @@ pcibr_slot_info_return(pcibr_soft_t pcibr_soft, ...@@ -319,9 +317,8 @@ pcibr_slot_info_return(pcibr_soft_t pcibr_soft,
reg_p b_respp; reg_p b_respp;
pcibr_slot_info_resp_t slotp; pcibr_slot_info_resp_t slotp;
pcibr_slot_func_info_resp_t funcp; pcibr_slot_func_info_resp_t funcp;
extern void snia_kmem_free(void *, int);
slotp = snia_kmem_zalloc(sizeof(*slotp), 0); slotp = kmalloc(sizeof(*slotp), GFP_KERNEL);
if (slotp == NULL) { if (slotp == NULL) {
return(ENOMEM); return(ENOMEM);
} }
...@@ -395,7 +392,7 @@ pcibr_slot_info_return(pcibr_soft_t pcibr_soft, ...@@ -395,7 +392,7 @@ pcibr_slot_info_return(pcibr_soft_t pcibr_soft,
return(EFAULT); return(EFAULT);
} }
snia_kmem_free(slotp, sizeof(*slotp)); kfree(slotp);
return(0); return(0);
} }
...@@ -611,7 +608,11 @@ pcibr_slot_info_init(vertex_hdl_t pcibr_vhdl, ...@@ -611,7 +608,11 @@ pcibr_slot_info_init(vertex_hdl_t pcibr_vhdl,
} }
cfgw = pcibr_slot_config_addr(bridge, slot, 0); cfgw = pcibr_slot_config_addr(bridge, slot, 0);
} }
NEWA(pcibr_infoh, nfunc); pcibr_infoh = kmalloc(nfunc*sizeof (*(pcibr_infoh)), GFP_KERNEL);
if ( !pcibr_infoh ) {
return ENOMEM;
}
memset(pcibr_infoh, 0, nfunc*sizeof (*(pcibr_infoh)));
pcibr_soft->bs_slot[slot].bss_ninfo = nfunc; pcibr_soft->bs_slot[slot].bss_ninfo = nfunc;
pcibr_soft->bs_slot[slot].bss_infos = pcibr_infoh; pcibr_soft->bs_slot[slot].bss_infos = pcibr_infoh;
...@@ -957,7 +958,7 @@ pcibr_slot_info_free(vertex_hdl_t pcibr_vhdl, ...@@ -957,7 +958,7 @@ pcibr_slot_info_free(vertex_hdl_t pcibr_vhdl,
pcibr_device_info_free(pcibr_vhdl, slot); pcibr_device_info_free(pcibr_vhdl, slot);
pcibr_infoh = pcibr_soft->bs_slot[slot].bss_infos; pcibr_infoh = pcibr_soft->bs_slot[slot].bss_infos;
DELA(pcibr_infoh,nfunc); kfree(pcibr_infoh);
pcibr_soft->bs_slot[slot].bss_ninfo = 0; pcibr_soft->bs_slot[slot].bss_ninfo = 0;
return(0); return(0);
...@@ -1407,7 +1408,12 @@ pcibr_slot_guest_info_init(vertex_hdl_t pcibr_vhdl, ...@@ -1407,7 +1408,12 @@ pcibr_slot_guest_info_init(vertex_hdl_t pcibr_vhdl,
* build verticies for them). * build verticies for them).
*/ */
if (pcibr_soft->bs_slot[slot].bss_ninfo < 1) { if (pcibr_soft->bs_slot[slot].bss_ninfo < 1) {
NEWA(pcibr_infoh, 1); pcibr_infoh = kmalloc(sizeof (*(pcibr_infoh)), GFP_KERNEL);
if ( !pcibr_infoh ) {
return ENOMEM;
}
memset(pcibr_infoh, 0, sizeof (*(pcibr_infoh)));
pcibr_soft->bs_slot[slot].bss_ninfo = 1; pcibr_soft->bs_slot[slot].bss_ninfo = 1;
pcibr_soft->bs_slot[slot].bss_infos = pcibr_infoh; pcibr_soft->bs_slot[slot].bss_infos = pcibr_infoh;
...@@ -1840,7 +1846,7 @@ pcibr_device_info_free(vertex_hdl_t pcibr_vhdl, pciio_slot_t slot) ...@@ -1840,7 +1846,7 @@ pcibr_device_info_free(vertex_hdl_t pcibr_vhdl, pciio_slot_t slot)
pciio_device_info_unregister(pcibr_vhdl, &pcibr_info->f_c); pciio_device_info_unregister(pcibr_vhdl, &pcibr_info->f_c);
pciio_device_info_free(&pcibr_info->f_c); pciio_device_info_free(&pcibr_info->f_c);
DEL(pcibr_info); kfree(pcibr_info);
} }
/* Reset the mapping usage counters */ /* Reset the mapping usage counters */
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/xtalk/xbow.h> /* Must be before iograph.h to get MAX_PORT_NUM */ #include <asm/sn/xtalk/xbow.h> /* Must be before iograph.h to get MAX_PORT_NUM */
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
...@@ -1158,8 +1157,11 @@ pciio_device_info_new( ...@@ -1158,8 +1157,11 @@ pciio_device_info_new(
pciio_vendor_id_t vendor_id, pciio_vendor_id_t vendor_id,
pciio_device_id_t device_id) pciio_device_id_t device_id)
{ {
if (!pciio_info) if (!pciio_info) {
NEW(pciio_info); pciio_info = kmalloc(sizeof (*(pciio_info)), GFP_KERNEL);
if ( pciio_info )
memset(pciio_info, 0, sizeof (*(pciio_info)));
}
ASSERT(pciio_info != NULL); ASSERT(pciio_info != NULL);
pciio_info->c_slot = slot; pciio_info->c_slot = slot;
...@@ -1181,7 +1183,7 @@ pciio_device_info_free(pciio_info_t pciio_info) ...@@ -1181,7 +1183,7 @@ pciio_device_info_free(pciio_info_t pciio_info)
/* NOTE : pciio_info is a structure within the pcibr_info /* NOTE : pciio_info is a structure within the pcibr_info
* and not a pointer to memory allocated on the heap !! * and not a pointer to memory allocated on the heap !!
*/ */
BZERO((char *)pciio_info,sizeof(pciio_info)); memset((char *)pciio_info, 0, sizeof(pciio_info));
} }
vertex_hdl_t vertex_hdl_t
......
/* /*
*
* This file is subject to the terms and conditions of the GNU General Public * This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
...@@ -15,7 +14,6 @@ ...@@ -15,7 +14,6 @@
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/arch.h> #include <asm/sn/arch.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
...@@ -37,31 +35,6 @@ extern void pcibr_driver_reg_callback(vertex_hdl_t, int, int, int); ...@@ -37,31 +35,6 @@ extern void pcibr_driver_reg_callback(vertex_hdl_t, int, int, int);
extern void pcibr_driver_unreg_callback(vertex_hdl_t, int, int, int); extern void pcibr_driver_unreg_callback(vertex_hdl_t, int, int, int);
/*
* copy inventory_t from conn_v to peer_conn_v
*/
int
pic_bus1_inventory_dup(vertex_hdl_t conn_v, vertex_hdl_t peer_conn_v)
{
inventory_t *pinv, *peer_pinv;
if (hwgraph_info_get_LBL(conn_v, INFO_LBL_INVENT,
(arbitrary_info_t *)&pinv) == GRAPH_SUCCESS)
{
NEW(peer_pinv);
memcpy(peer_pinv, pinv, sizeof(inventory_t));
if (hwgraph_info_add_LBL(peer_conn_v, INFO_LBL_INVENT,
(arbitrary_info_t)peer_pinv) != GRAPH_SUCCESS) {
DEL(peer_pinv);
return 0;
}
return 1;
}
printk("pic_bus1_inventory_dup: cannot get INFO_LBL_INVENT from 0x%lx\n ", (uint64_t)conn_v);
return 0;
}
/* /*
* copy xwidget_info_t from conn_v to peer_conn_v * copy xwidget_info_t from conn_v to peer_conn_v
*/ */
...@@ -83,21 +56,27 @@ pic_bus1_widget_info_dup(vertex_hdl_t conn_v, vertex_hdl_t peer_conn_v, ...@@ -83,21 +56,27 @@ pic_bus1_widget_info_dup(vertex_hdl_t conn_v, vertex_hdl_t peer_conn_v,
if (hwgraph_info_get_LBL(conn_v, INFO_LBL_XWIDGET, if (hwgraph_info_get_LBL(conn_v, INFO_LBL_XWIDGET,
(arbitrary_info_t *)&widget_info) == GRAPH_SUCCESS) { (arbitrary_info_t *)&widget_info) == GRAPH_SUCCESS) {
NEW(peer_widget_info); peer_widget_info = kmalloc(sizeof (*(peer_widget_info)), GFP_KERNEL);
peer_widget_info->w_vertex = peer_conn_v; if ( !peer_widget_info ) {
peer_widget_info->w_id = widget_info->w_id; return 0;
peer_widget_info->w_master = peer_hubv; }
peer_widget_info->w_masterid = peer_hub_info->h_widgetid; memset(peer_widget_info, 0, sizeof (*(peer_widget_info)));
peer_widget_info->w_fingerprint = widget_info_fingerprint;
peer_widget_info->w_vertex = peer_conn_v;
peer_widget_info->w_id = widget_info->w_id;
peer_widget_info->w_master = peer_hubv;
peer_widget_info->w_masterid = peer_hub_info->h_widgetid;
/* structure copy */ /* structure copy */
peer_widget_info->w_hwid = widget_info->w_hwid; peer_widget_info->w_hwid = widget_info->w_hwid;
peer_widget_info->w_efunc = 0; peer_widget_info->w_efunc = 0;
peer_widget_info->w_einfo = 0; peer_widget_info->w_einfo = 0;
peer_widget_info->w_name = kmalloc(strlen(peer_path) + 1, GFP_KERNEL); peer_widget_info->w_name = kmalloc(strlen(peer_path) + 1, GFP_KERNEL);
strcpy(peer_widget_info->w_name, peer_path); strcpy(peer_widget_info->w_name, peer_path);
if (hwgraph_info_add_LBL(peer_conn_v, INFO_LBL_XWIDGET, if (hwgraph_info_add_LBL(peer_conn_v, INFO_LBL_XWIDGET,
(arbitrary_info_t)peer_widget_info) != GRAPH_SUCCESS) { (arbitrary_info_t)peer_widget_info) != GRAPH_SUCCESS) {
DEL(peer_widget_info); kfree(peer_widget_info);
return 0; return 0;
} }
...@@ -172,11 +151,6 @@ pic_bus1_redist(nasid_t nasid, vertex_hdl_t conn_v) ...@@ -172,11 +151,6 @@ pic_bus1_redist(nasid_t nasid, vertex_hdl_t conn_v)
* vertex but that should be safe and we don't * vertex but that should be safe and we don't
* really expect the additions to fail anyway. * really expect the additions to fail anyway.
*/ */
#if 0
if (!pic_bus1_inventory_dup(conn_v, peer_conn_v))
return 0;
pic_bus1_device_desc_dup(conn_v, peer_conn_v);
#endif
if (!pic_bus1_widget_info_dup(conn_v, peer_conn_v, xbow_peer)) if (!pic_bus1_widget_info_dup(conn_v, peer_conn_v, xbow_peer))
return 0; return 0;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
#include <asm/sn/intr.h> #include <asm/sn/intr.h>
...@@ -77,8 +76,9 @@ do_hub_intr_alloc(vertex_hdl_t dev, ...@@ -77,8 +76,9 @@ do_hub_intr_alloc(vertex_hdl_t dev,
xtalk_addr = SH_II_INT0 | ((unsigned long)nasid << 36) | (1UL << 47); xtalk_addr = SH_II_INT0 | ((unsigned long)nasid << 36) | (1UL << 47);
} }
intr_hdl = snia_kmem_alloc_node(sizeof(struct hub_intr_s), KM_NOSLEEP, cnode); intr_hdl = kmalloc(sizeof(struct hub_intr_s), GFP_KERNEL);
ASSERT_ALWAYS(intr_hdl); ASSERT_ALWAYS(intr_hdl);
memset(intr_hdl, 0, sizeof(struct hub_intr_s));
xtalk_info = &intr_hdl->i_xtalk_info; xtalk_info = &intr_hdl->i_xtalk_info;
xtalk_info->xi_dev = dev; xtalk_info->xi_dev = dev;
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/sn/sn2/sn_private.h> #include <asm/sn/sn2/sn_private.h>
#include <asm/sn/sn2/shubio.h> #include <asm/sn/sn2/shubio.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/pci/bridge.h> #include <asm/sn/pci/bridge.h>
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <asm/sn/driver.h> #include <asm/sn/driver.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/driver.h> #include <asm/sn/driver.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h> #include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xtalk.h> #include <asm/sn/xtalk/xtalk.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/iograph.h> #include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/types.h> #include <asm/sn/types.h>
#include <asm/sn/pci/bridge.h> #include <asm/sn/pci/bridge.h>
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#define _ASM_IA64_SN_HCL_H #define _ASM_IA64_SN_HCL_H
#include <asm/sn/sgi.h> #include <asm/sn/sgi.h>
#include <asm/sn/invent.h>
extern vertex_hdl_t hwgraph_root; extern vertex_hdl_t hwgraph_root;
extern vertex_hdl_t linux_busnum; extern vertex_hdl_t linux_busnum;
......
This diff is collapsed.
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <asm/sn/xtalk/xwidget.h> #include <asm/sn/xtalk/xwidget.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h> #include <asm/sn/hcl.h>
#include <asm/sn/hcl_util.h> #include <asm/sn/hcl_util.h>
#include <asm/sn/intr.h> #include <asm/sn/intr.h>
......
...@@ -73,6 +73,8 @@ typedef uint64_t vhandl_t; ...@@ -73,6 +73,8 @@ typedef uint64_t vhandl_t;
typedef cpuid_t cpu_cookie_t; typedef cpuid_t cpu_cookie_t;
#define CPU_NONE (-1) #define CPU_NONE (-1)
#define GRAPH_VERTEX_NONE ((vertex_hdl_t)-1)
/* /*
* mutext support mapping * mutext support mapping
...@@ -122,31 +124,6 @@ mutex_spinlock(spinlock_t *sem) { ...@@ -122,31 +124,6 @@ mutex_spinlock(spinlock_t *sem) {
#define PRINT_PANIC panic #define PRINT_PANIC panic
/* print_register() defs */
/*
* register values
* map between numeric values and symbolic values
*/
struct reg_values {
unsigned long long rv_value;
char *rv_name;
};
/*
* register descriptors are used for formatted prints of register values
* rd_mask and rd_shift must be defined, other entries may be null
*/
struct reg_desc {
unsigned long long rd_mask; /* mask to extract field */
int rd_shift; /* shift for extracted value, - >>, + << */
char *rd_name; /* field name */
char *rd_format; /* format to print field */
struct reg_values *rd_values; /* symbolic names of values */
};
extern void print_register(unsigned long long, struct reg_desc *);
/****************************************** /******************************************
* Definitions that do not exist in linux * * Definitions that do not exist in linux *
******************************************/ ******************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment