Changes in kernel/arch/sparc64/src/sun4v/md.c [74cbac7d:7da160b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/sun4v/md.c
r74cbac7d r7da160b 104 104 static md_element_t *get_element(element_idx_t idx) 105 105 { 106 return (md_element_t *) ( 107 mach_desc +sizeof(md_header_t) + idx * sizeof(md_element_t));106 return (md_element_t *) (mach_desc + 107 sizeof(md_header_t) + idx * sizeof(md_element_t)); 108 108 } 109 109 … … 114 114 uintptr_t name_offset = get_element(idx)->name_offset; 115 115 return (char *) mach_desc + sizeof(md_header_t) + 116 116 md_header->node_blk_sz + name_offset; 117 117 } 118 118 … … 137 137 md_element_t *element = get_element(idx); 138 138 if (element->tag == PROP_VAL && 139 139 str_cmp(key, get_element_name(idx)) == 0) { 140 140 *result = element->d.val; 141 141 return true; … … 161 161 md_element_t *element = get_element(idx); 162 162 if (element->tag == PROP_DATA && 163 163 str_cmp(key, get_element_name(idx)) == 0) { 164 164 *result = (char *) mach_desc + sizeof(md_header_t) + 165 166 165 md_header->node_blk_sz + md_header->name_blk_sz + 166 element->d.y.data_offset; 167 167 return true; 168 168 } … … 186 186 md_element_t *element = get_element(*it); 187 187 if (element->tag == PROP_ARC && 188 188 str_cmp("fwd", get_element_name(*it)) == 0) { 189 189 return true; 190 190 } … … 289 289 290 290 if (element->tag == NODE && 291 291 str_cmp(name, get_element_name(*node)) == 0) { 292 292 return true; 293 293 } … … 306 306 { 307 307 uint64_t retval = __hypercall_fast2(MACH_DESC, KA2PA(mach_desc), 308 308 MD_MAX_SIZE); 309 309 310 310 retval = retval; 311 if (retval != EOK) {311 if (retval != HV_EOK) { 312 312 printf("Could not retrieve machine description, error = %d.\n", 313 313 retval); 314 314 } 315 315 }
Note:
See TracChangeset
for help on using the changeset viewer.