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

[PATCH] sn: Some more minor clean up

From: Pat Gefre <pfg@sgi.com>

Some more minor clean up
parent a1027f20
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
vertex_hdl_t hwgraph_root; vertex_hdl_t hwgraph_root;
vertex_hdl_t linux_busnum; vertex_hdl_t linux_busnum;
extern void pci_bus_cvlink_init(void); extern int pci_bus_cvlink_init(void);
/* /*
* Debug flag definition. * Debug flag definition.
...@@ -102,7 +102,10 @@ int __init init_hcl(void) ...@@ -102,7 +102,10 @@ int __init init_hcl(void)
return -1; return -1;
} }
pci_bus_cvlink_init(); if (pci_bus_cvlink_init() < 0 ) {
printk("init_hcl: Failed to create pcibus cvlink.\n");
return -1;
}
/* /*
* Initialize the ifconfgi_net driver that does network devices * Initialize the ifconfgi_net driver that does network devices
......
...@@ -22,7 +22,26 @@ ...@@ -22,7 +22,26 @@
static vertex_hdl_t hwgraph_all_cnodes = GRAPH_VERTEX_NONE; static vertex_hdl_t hwgraph_all_cnodes = GRAPH_VERTEX_NONE;
extern vertex_hdl_t hwgraph_root; extern vertex_hdl_t hwgraph_root;
static vertex_hdl_t hwgraph_all_cpuids = GRAPH_VERTEX_NONE;
extern int maxcpus;
void
mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid)
{
char cpuid_buffer[10];
if (cpuid == CPU_NONE)
return;
if (hwgraph_all_cpuids == GRAPH_VERTEX_NONE) {
(void)hwgraph_path_add( hwgraph_root,
EDGE_LBL_CPUNUM,
&hwgraph_all_cpuids);
}
sprintf(cpuid_buffer, "%ld", cpuid);
(void)hwgraph_edge_add( hwgraph_all_cpuids, vhdl, cpuid_buffer);
}
/* /*
** Return the "master" for a given vertex. A master vertex is a ** Return the "master" for a given vertex. A master vertex is a
...@@ -95,33 +114,6 @@ master_node_get(vertex_hdl_t vhdl) ...@@ -95,33 +114,6 @@ master_node_get(vertex_hdl_t vhdl)
} }
} }
static vertex_hdl_t hwgraph_all_cpuids = GRAPH_VERTEX_NONE;
extern int maxcpus;
void
mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid)
{
if (cpuid == CPU_NONE)
return;
(void)labelcl_info_add_LBL(vhdl, INFO_LBL_CPUID, INFO_DESC_EXPORT,
(arbitrary_info_t)cpuid);
{
char cpuid_buffer[10];
if (hwgraph_all_cpuids == GRAPH_VERTEX_NONE) {
(void)hwgraph_path_add( hwgraph_root,
EDGE_LBL_CPUNUM,
&hwgraph_all_cpuids);
}
sprintf(cpuid_buffer, "%ld", cpuid);
(void)hwgraph_edge_add( hwgraph_all_cpuids,
vhdl,
cpuid_buffer);
}
}
/* /*
** If the specified device represents a node, return its ** If the specified device represents a node, return its
** compact node ID; otherwise, return CNODEID_NONE. ** compact node ID; otherwise, return CNODEID_NONE.
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <linux/namei.h> #include <linux/namei.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/dcache.h>
#include <asm/sn/hwgfs.h> #include <asm/sn/hwgfs.h>
...@@ -273,8 +272,7 @@ hwgfs_find_handle( ...@@ -273,8 +272,7 @@ hwgfs_find_handle(
nd.mnt = mntget(hwgfs_vfsmount); nd.mnt = mntget(hwgfs_vfsmount);
nd.dentry = dget(base ? base : hwgfs_vfsmount->mnt_sb->s_root); nd.dentry = dget(base ? base : hwgfs_vfsmount->mnt_sb->s_root);
if (traverse_symlinks) nd.flags = (traverse_symlinks ? LOOKUP_FOLLOW : 0);
nd.flags = LOOKUP_FOLLOW;
error = link_path_walk(name, &nd); error = link_path_walk(name, &nd);
if (likely(!error)) { if (likely(!error)) {
......
...@@ -87,14 +87,23 @@ ...@@ -87,14 +87,23 @@
command string */ command string */
/* brick type response codes */ /* brick type response codes */
#define L1_BRICKTYPE_IP45 0x34 /* 4 */
#define L1_BRICKTYPE_C 0x43 /* C */
#define L1_BRICKTYPE_R 0x52 /* R */
#define L1_BRICKTYPE_CHI_CG 0x76 /* v */
#define L1_BRICKTYPE_N 0x4e /* N */
#define L1_BRICKTYPE_PX 0x23 /* # */ #define L1_BRICKTYPE_PX 0x23 /* # */
#define L1_BRICKTYPE_PE 0x25 /* % */
#define L1_BRICKTYPE_N_p0 0x26 /* & */
#define L1_BRICKTYPE_IP45 0x34 /* 4 */
#define L1_BRICKTYPE_IP41 0x35 /* 5 */
#define L1_BRICKTYPE_TWISTER 0x36 /* 6 */ /* IP53 & ROUTER */
#define L1_BRICKTYPE_IX 0x3d /* = */ #define L1_BRICKTYPE_IX 0x3d /* = */
#define L1_BRICKTYPE_IP34 0x61 /* a */
#define L1_BRICKTYPE_C 0x63 /* c */
#define L1_BRICKTYPE_I 0x69 /* i */
#define L1_BRICKTYPE_N 0x6e /* n */
#define L1_BRICKTYPE_OPUS 0x6f /* o */ #define L1_BRICKTYPE_OPUS 0x6f /* o */
#define L1_BRICKTYPE_P 0x70 /* p */
#define L1_BRICKTYPE_R 0x72 /* r */
#define L1_BRICKTYPE_CHI_CG 0x76 /* v */
#define L1_BRICKTYPE_X 0x78 /* x */
#define L1_BRICKTYPE_X2 0x79 /* y */
/* EEPROM codes (for the "read EEPROM" request) */ /* EEPROM codes (for the "read EEPROM" request) */
/* c brick */ /* c brick */
......
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