Changes in kernel/arch/sparc64/include/cpu.h [d99c1d2:965dc18] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/cpu.h
rd99c1d2 r965dc18 54 54 #ifndef __ASM__ 55 55 56 #include <arch/types.h> 56 57 #include <typedefs.h> 57 58 #include <arch/register.h> … … 63 64 #endif 64 65 66 typedef struct { 67 uint32_t mid; /**< Processor ID as read from 68 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 be 72 generated when the TICK register 73 matches this value. */ 74 } cpu_arch_t; 65 75 66 #if defined (SUN4U) 67 #include <arch/sun4u/cpu.h> 68 #elif defined (SUN4V) 69 #include <arch/sun4v/cpu.h> 76 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 else 90 return icbus_config & 0x3ff; 70 91 #endif 71 92 } 72 93 73 94 #endif
Note:
See TracChangeset
for help on using the changeset viewer.