From a7e6ebde077bd380d8e6a8dcc35033e011217422 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 18 Jan 2004 18:48:23 -0800 Subject: [PATCH] [PATCH] sn: Some more minor clean up From: Pat Gefre Some more minor clean up --- arch/ia64/sn/io/hwgfs/hcl.c | 7 +++-- arch/ia64/sn/io/hwgfs/hcl_util.c | 46 +++++++++++++------------------ arch/ia64/sn/io/hwgfs/interface.c | 4 +-- include/asm-ia64/sn/ksys/l1.h | 21 ++++++++++---- 4 files changed, 40 insertions(+), 38 deletions(-) diff --git a/arch/ia64/sn/io/hwgfs/hcl.c b/arch/ia64/sn/io/hwgfs/hcl.c index c88faf5bdb5b1..1aca3541a188d 100644 --- a/arch/ia64/sn/io/hwgfs/hcl.c +++ b/arch/ia64/sn/io/hwgfs/hcl.c @@ -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 --git a/arch/ia64/sn/io/hwgfs/hcl_util.c b/arch/ia64/sn/io/hwgfs/hcl_util.c index cf2d0225c2f3a..1db9d9ba73a4e 100644 --- a/arch/ia64/sn/io/hwgfs/hcl_util.c +++ b/arch/ia64/sn/io/hwgfs/hcl_util.c @@ -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 --git a/arch/ia64/sn/io/hwgfs/interface.c b/arch/ia64/sn/io/hwgfs/interface.c index 007ea533bfa6e..6b91dff49a763 100644 --- a/arch/ia64/sn/io/hwgfs/interface.c +++ b/arch/ia64/sn/io/hwgfs/interface.c @@ -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 --git a/include/asm-ia64/sn/ksys/l1.h b/include/asm-ia64/sn/ksys/l1.h index 09f08da60a27d..19179db75fbce 100644 --- a/include/asm-ia64/sn/ksys/l1.h +++ b/include/asm-ia64/sn/ksys/l1.h @@ -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 */ -- 2.53.0