From: Pat Gefre Some more minor clean up --- 25-akpm/arch/ia64/sn/io/hwgfs/hcl.c | 7 +++- 25-akpm/arch/ia64/sn/io/hwgfs/hcl_util.c | 46 ++++++++++++------------------ 25-akpm/arch/ia64/sn/io/hwgfs/interface.c | 4 -- 25-akpm/include/asm-ia64/sn/ksys/l1.h | 21 +++++++++---- 4 files changed, 40 insertions(+), 38 deletions(-) diff -puN arch/ia64/sn/io/hwgfs/hcl.c~sn32 arch/ia64/sn/io/hwgfs/hcl.c --- 25/arch/ia64/sn/io/hwgfs/hcl.c~sn32 Thu Jan 8 15:23:06 2004 +++ 25-akpm/arch/ia64/sn/io/hwgfs/hcl.c Thu Jan 8 15:23:40 2004 @@ -37,7 +37,7 @@ vertex_hdl_t hwgraph_root; vertex_hdl_t linux_busnum; -extern void pci_bus_cvlink_init(void); +extern int pci_bus_cvlink_init(void); /* * Debug flag definition. @@ -102,7 +102,10 @@ int __init init_hcl(void) 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 diff -puN arch/ia64/sn/io/hwgfs/hcl_util.c~sn32 arch/ia64/sn/io/hwgfs/hcl_util.c --- 25/arch/ia64/sn/io/hwgfs/hcl_util.c~sn32 Thu Jan 8 15:23:06 2004 +++ 25-akpm/arch/ia64/sn/io/hwgfs/hcl_util.c Thu Jan 8 15:24:44 2004 @@ -22,7 +22,26 @@ static vertex_hdl_t hwgraph_all_cnodes = GRAPH_VERTEX_NONE; 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 @@ -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 ** compact node ID; otherwise, return CNODEID_NONE. diff -puN arch/ia64/sn/io/hwgfs/interface.c~sn32 arch/ia64/sn/io/hwgfs/interface.c --- 25/arch/ia64/sn/io/hwgfs/interface.c~sn32 Thu Jan 8 15:23:06 2004 +++ 25-akpm/arch/ia64/sn/io/hwgfs/interface.c Thu Jan 8 15:23:06 2004 @@ -16,7 +16,6 @@ #include #include #include -#include #include @@ -273,8 +272,7 @@ hwgfs_find_handle( nd.mnt = mntget(hwgfs_vfsmount); nd.dentry = dget(base ? base : hwgfs_vfsmount->mnt_sb->s_root); - if (traverse_symlinks) - nd.flags = LOOKUP_FOLLOW; + nd.flags = (traverse_symlinks ? LOOKUP_FOLLOW : 0); error = link_path_walk(name, &nd); if (likely(!error)) { diff -puN include/asm-ia64/sn/ksys/l1.h~sn32 include/asm-ia64/sn/ksys/l1.h --- 25/include/asm-ia64/sn/ksys/l1.h~sn32 Thu Jan 8 15:23:06 2004 +++ 25-akpm/include/asm-ia64/sn/ksys/l1.h Thu Jan 8 15:23:06 2004 @@ -87,14 +87,23 @@ command string */ /* brick type response codes */ +#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_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_IX 0x3d /* = */ +#define L1_BRICKTYPE_IP41 0x35 /* 5 */ +#define L1_BRICKTYPE_TWISTER 0x36 /* 6 */ /* IP53 & ROUTER */ +#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_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) */ /* c brick */ _