Changeset a9ac978 in mainline for boot/arch/sparc64/loader/ofwarch.c
- Timestamp:
- 2006-09-27T20:11:34Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 00b38a3
- Parents:
- 86b31ba9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/sparc64/loader/ofwarch.c
r86b31ba9 ra9ac978 36 36 #include <printf.h> 37 37 #include <string.h> 38 #include <register.h> 38 39 #include "main.h" 39 40 … … 54 55 } 55 56 56 57 #define ASI_UPA_CONFIG 0x4a58 #define UPA_CONFIG_MID_SHIFT 1759 #define UPA_CONFIG_MID_MASK 0x1f60 61 57 int ofw_cpu(void) 62 58 { … … 75 71 current_mid >>= UPA_CONFIG_MID_SHIFT; 76 72 current_mid &= UPA_CONFIG_MID_MASK; 73 74 int cpus; 77 75 78 for ( ; node != 0 && node != -1; node = ofw_get_peer_node(node)) {76 for (cpus = 0; node != 0 && node != -1; node = ofw_get_peer_node(node), cpus++) { 79 77 if (ofw_get_property(node, "device_type", type_name, sizeof(type_name)) > 0) { 80 78 if (strcmp(type_name, "cpu") == 0) { … … 94 92 } 95 93 96 return 1;94 return cpus; 97 95 }
Note:
See TracChangeset
for help on using the changeset viewer.