Changeset 0b9ac3c in mainline for kernel/arch/sparc64/include/cpu.h
- Timestamp:
- 2010-02-23T19:03:28Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c62d2e1
- Parents:
- 1ccafee (diff), 5e50394 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/cpu.h
r1ccafee r0b9ac3c 64 64 #endif 65 65 66 typedef struct {67 uint32_t mid; /**< Processor ID as read from68 UPA_CONFIG/FIREPLANE_CONFIG. */69 ver_reg_t ver;70 uint32_t clock_frequency; /**< Processor frequency in Hz. */71 uint64_t next_tick_cmpr; /**< Next clock interrupt should be72 generated when the TICK register73 matches this value. */74 } cpu_arch_t;75 66 67 #if defined (SUN4U) 68 #include <arch/sun4u/cpu.h> 69 #elif defined (SUN4V) 70 #include <arch/sun4v/cpu.h> 71 #endif 76 72 77 /**78 * Reads the module ID (agent ID/CPUID) of the current CPU.79 */80 static inline uint32_t read_mid(void)81 {82 uint64_t icbus_config = asi_u64_read(ASI_ICBUS_CONFIG, 0);83 icbus_config = icbus_config >> ICBUS_CONFIG_MID_SHIFT;84 #if defined (US)85 return icbus_config & 0x1f;86 #elif defined (US3)87 if (((ver_reg_t) ver_read()).impl == IMPL_ULTRASPARCIII_I)88 return icbus_config & 0x1f;89 else90 return icbus_config & 0x3ff;91 #endif92 }93 73 94 74 #endif
Note:
See TracChangeset
for help on using the changeset viewer.